Merge pull request #1 from GTAmodding/miami

Miami
This commit is contained in:
Fire_Head 2020-07-29 12:20:02 +03:00 committed by GitHub
commit 52e77c6634
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
267 changed files with 23832 additions and 29992 deletions

View File

@ -24,7 +24,7 @@ install:
- cmd: >-
git submodule update --init --recursive
premake5 vs2019 --with-librw --glewdir=%APPVEYOR_BUILD_FOLDER%/%GLEW_BASE% --glfwdir=%APPVEYOR_BUILD_FOLDER%/%GLFW_BASE%
premake5 vs2019 --with-librw --glewdir=%APPVEYOR_BUILD_FOLDER%/%GLEW_BASE% --glfwdir32=%APPVEYOR_BUILD_FOLDER%/%GLFW_BASE%
build:
project: build/reVC.sln

View File

@ -21,8 +21,6 @@ such that we have a working game at all times.
## Preparing the environment for building
Currently only building on VS2015/2017/2019 (Windows) and GCC (Linux) is tested.
- Clone the repo.
- Run `git submodule init` and `git submodule update`.
- Point GTA_III_RE_DIR environment variable to GTA3 root folder.
@ -30,8 +28,12 @@ Currently only building on VS2015/2017/2019 (Windows) and GCC (Linux) is tested.
- On Windows: one of the `premake-vsXXXX.cmd` variants on root folder
- On Linux: proceed to [Building on Linux](https://github.com/GTAmodding/re3/wiki/Building-on-Linux).
- There are various settings at the very bottom of [config.h](https://github.com/GTAmodding/re3/tree/master/src/core/config.h), you may want to take a look there. i.e. FIX_BUGS define fixes the bugs we've come across.
- **If you use 64-bit D3D9**: We don't ship 64-bit Dx9 SDK. You need to download it from Microsoft if you don't have it(although it should come pre-installed after some Windows version)
> :information_source: **Rendering engine** re3 uses completely homebrew RenderWare-replacement rendering engine; [librw](https://github.com/aap/librw/). librw comes as submodule of re3, but you also can use LIBRW enviorenment variable to specify path to your own librw.
> :information_source: **If you choose OpenAL(OAL) on Windows** You must read [Running OAL build on Windows](https://github.com/GTAmodding/re3/wiki/Running-OAL-build-on-Windows).
> :information_source: **Did you notice librw?** re3 uses completely homebrew RenderWare-replacement rendering engine; [librw](https://github.com/aap/librw/). librw comes as submodule of re3, but you also can use LIBRW enviorenment variable to specify path to your own librw.
## Contributing

2
librw

@ -1 +1 @@
Subproject commit 556f6af1b5a15d5ba1a2254a95076578cd160185
Subproject commit 99c15d5ed78cc112e1055cc89452dd57df28da58

9764
libsndfile.64/ChangeLog Normal file

File diff suppressed because it is too large Load Diff

199
libsndfile.64/NEWS Normal file
View File

@ -0,0 +1,199 @@
Version 1.0.28 (2017-04-02)
* Fix buffer overruns in FLAC and ID3 handling code.
* Move to variable length header storage.
* Fix detection of Large File Support for 32 bit systems.
* Remove large stack allocations in ALAC handling code.
* Remove all use of Variable Length Arrays.
* Minor bug fixes and improvements.
Version 1.0.27 (2016-06-19)
* Fix an SF_INFO seekable flag regression introduced in 1.0.26.
* Fix potential infinite loops on malformed input files.
* Add string metadata read/write for CAF and RF64.
* Add handling of CUE chunks.
* Fix endian-ness issues in PAF files.
* Minor bug fixes and improvements.
Version 1.0.26 (2015-11-22)
* Fix for CVE-2014-9496, SD2 buffer read overflow.
* Fix for CVE-2014-9756, file_io.c divide by zero.
* Fix for CVE-2015-7805, AIFF heap write overflow.
* Add support for ALAC encoder in a CAF container.
* Add support for Cart chunks in WAV files.
* Minor bug fixes and improvements.
Version 1.0.25 (2011-07-13)
* Fix for Secunia Advisory SA45125, heap overflow in PAF file handler.
* Accept broken WAV files with blockalign == 0.
* Minor bug fixes and improvements.
Version 1.0.24 (2011-03-23)
* WAV files now have an 18 byte u-law and A-law fmt chunk.
* Document virtual I/O functionality.
* Two new methods rawHandle() and takeOwnership() in sndfile.hh.
* AIFF fix for non-zero offset value in SSND chunk.
* Minor bug fixes and improvements.
Version 1.0.23 (2010-10-10)
* Add version metadata to Windows DLL.
* Add a missing 'inline' to sndfile.hh.
* Update docs.
* Minor bug fixes and improvements.
Version 1.0.22 (2010-10-04)
* Couple of fixes for SDS file writer.
* Fixes arising from static analysis.
* Handle FLAC files with ID3 meta data at start of file.
* Handle FLAC files which report zero length.
* Other minor bug fixes and improvements.
Version 1.0.21 (2009-12-13)
* Add a couple of new binary programs to programs/ dir.
* Remove sndfile-jackplay (now in sndfile-tools package).
* Add windows only function sf_wchar_open().
* Bunch of minor bug fixes.
Version 1.0.20 (2009-05-14)
* Fix potential heap overflow in VOC file parser (Tobias Klein, http://www.trapkit.de/).
Version 1.0.19 (2009-03-02)
* Fix for CVE-2009-0186 (Alin Rad Pop, Secunia Research).
* Huge number of minor bug fixes as a result of static analysis.
Version 1.0.18 (2009-02-07)
* Add Ogg/Vorbis support (thanks to John ffitch).
* Remove captive FLAC library.
* Many new features and bug fixes.
* Generate Win32 and Win64 pre-compiled binaries.
Version 1.0.17 (2006-08-31)
* Add sndfile.hh C++ wrapper.
* Update Win32 MinGW build instructions.
* Minor bug fixes and cleanups.
Version 1.0.16 (2006-04-30)
* Add support for Broadcast (BEXT) chunks in WAV files.
* Implement new commands SFC_GET_SIGNAL_MAX and SFC_GET_MAX_ALL_CHANNELS.
* Add support for RIFX (big endian WAV variant).
* Fix configure script bugs.
* Fix bug in INST and MARK chunk writing for AIFF files.
Version 1.0.15 (2006-03-16)
* Fix some ia64 issues.
* Fix precompiled DLL.
* Minor bug fixes.
Version 1.0.14 (2006-02-19)
* Really fix MinGW compile problems.
* Minor bug fixes.
Version 1.0.13 (2006-01-21)
* Fix for MinGW compiler problems.
* Allow readin/write of instrument chunks from WAV and AIFF files.
* Compile problem fix for Solaris compiler.
* Minor cleanups and bug fixes.
Version 1.0.12 (2005-09-30)
* Add support for FLAC and Apple's Core Audio Format (CAF).
* Add virtual I/O interface (still needs docs).
* Cygwin and other Win32 fixes.
* Minor bug fixes and cleanups.
Version 1.0.11 (2004-11-15)
* Add support for SD2 files.
* Add read support for loop info in WAV and AIFF files.
* Add more tests.
* Improve type safety.
* Minor optimisations and bug fixes.
Version 1.0.10 (2004-06-15)
* Fix AIFF read/write mode bugs.
* Add support for compiling Win32 DLLS using MinGW.
* Fix problems resulting in failed compiles with gcc-2.95.
* Improve test suite.
* Minor bug fixes.
Version 1.0.9 (2004-03-30)
* Add handling of AVR (Audio Visual Research) files.
* Improve handling of WAVEFORMATEXTENSIBLE WAV files.
* Fix for using pipes on Win32.
Version 1.0.8 (2004-03-14)
* Correct peak chunk handing for files with > 16 tracks.
* Fix for WAV files with huge number of CUE chunks.
Version 1.0.7 (2004-02-25)
* Fix clip mode detection on ia64, MIPS and other CPUs.
* Fix two MacOSX build problems.
Version 1.0.6 (2004-02-08)
* Added support for native Win32 file access API (Ross Bencina).
* New mode to add clippling then a converting from float/double to integer
would otherwise wrap around.
* Fixed a bug in reading/writing files > 2Gig on Linux, Solaris and others.
* Many minor bug fixes.
* Other random fixes for Win32.
Version 1.0.5 (2003-05-03)
* Added support for HTK files.
* Added new function sf_open_fd() to allow for secure opening of temporary
files as well as reading/writing sound files embedded within larger
container files.
* Added string support for AIFF files.
* Minor bug fixes and code cleanups.
Version 1.0.4 (2003-02-02)
* Added suport of PVF and XI files.
* Added functionality for setting and retreiving strings from sound files.
* Minor code cleanups and bug fixes.
Version 1.0.3 (2002-12-09)
* Minor bug fixes.
Version 1.0.2 (2002-11-24)
* Added support for VOX ADPCM.
* Improved error reporting.
* Added version scripting on Linux and Solaris.
* Minor bug fixes.
Version 1.0.1 (2002-09-14)
* Added MAT and MAT5 file formats.
* Minor bug fixes.
Version 1.0.0 (2002-08-16)
* Final release for 1.0.0.
Version 1.0.0rc6 (2002-08-14)
* Release candidate 6 for the 1.0.0 series.
* MacOS9 fixes.
Version 1.0.0rc5 (2002-08-10)
* Release candidate 5 for the 1.0.0 series.
* Changed the definition of sf_count_t which was causing problems when
libsndfile was compiled with other libraries (ie WxWindows).
* Minor bug fixes.
* Documentation cleanup.
Version 1.0.0rc4 (2002-08-03)
* Release candidate 4 for the 1.0.0 series.
* Minor bug fixes.
* Fix broken Win32 "make check".
Version 1.0.0rc3 (2002-08-02)
* Release candidate 3 for the 1.0.0 series.
* Fix bug where libsndfile was reading beyond the end of the data chunk.
* Added on-the-fly header updates on write.
* Fix a couple of documentation issues.
Version 1.0.0rc2 (2002-06-24)
* Release candidate 2 for the 1.0.0 series.
* Fix compile problem for Win32.
Version 1.0.0rc1 (2002-06-24)
* Release candidate 1 for the 1.0.0 series.
Version 0.0.28 (2002-04-27)
* Last offical release of 0.0.X series of the library.
Version 0.0.8 (1999-02-16)
* First offical release.

BIN
libsndfile.64/dist/libsndfile-1.dll vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,857 @@
/*
** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by
** the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*
** sndfile.h -- system-wide definitions
**
** API documentation is in the doc/ directory of the source code tarball
** and at http://www.mega-nerd.com/libsndfile/api.html.
*/
#ifndef SNDFILE_H
#define SNDFILE_H
/* This is the version 1.0.X header file. */
#define SNDFILE_1
#include <stdio.h>
#include <stdint.h>
#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* The following file types can be read and written.
** A file type would consist of a major type (ie SF_FORMAT_WAV) bitwise
** ORed with a minor type (ie SF_FORMAT_PCM). SF_FORMAT_TYPEMASK and
** SF_FORMAT_SUBMASK can be used to separate the major and minor file
** types.
*/
enum
{ /* Major formats. */
SF_FORMAT_WAV = 0x010000, /* Microsoft WAV format (little endian default). */
SF_FORMAT_AIFF = 0x020000, /* Apple/SGI AIFF format (big endian). */
SF_FORMAT_AU = 0x030000, /* Sun/NeXT AU format (big endian). */
SF_FORMAT_RAW = 0x040000, /* RAW PCM data. */
SF_FORMAT_PAF = 0x050000, /* Ensoniq PARIS file format. */
SF_FORMAT_SVX = 0x060000, /* Amiga IFF / SVX8 / SV16 format. */
SF_FORMAT_NIST = 0x070000, /* Sphere NIST format. */
SF_FORMAT_VOC = 0x080000, /* VOC files. */
SF_FORMAT_IRCAM = 0x0A0000, /* Berkeley/IRCAM/CARL */
SF_FORMAT_W64 = 0x0B0000, /* Sonic Foundry's 64 bit RIFF/WAV */
SF_FORMAT_MAT4 = 0x0C0000, /* Matlab (tm) V4.2 / GNU Octave 2.0 */
SF_FORMAT_MAT5 = 0x0D0000, /* Matlab (tm) V5.0 / GNU Octave 2.1 */
SF_FORMAT_PVF = 0x0E0000, /* Portable Voice Format */
SF_FORMAT_XI = 0x0F0000, /* Fasttracker 2 Extended Instrument */
SF_FORMAT_HTK = 0x100000, /* HMM Tool Kit format */
SF_FORMAT_SDS = 0x110000, /* Midi Sample Dump Standard */
SF_FORMAT_AVR = 0x120000, /* Audio Visual Research */
SF_FORMAT_WAVEX = 0x130000, /* MS WAVE with WAVEFORMATEX */
SF_FORMAT_SD2 = 0x160000, /* Sound Designer 2 */
SF_FORMAT_FLAC = 0x170000, /* FLAC lossless file format */
SF_FORMAT_CAF = 0x180000, /* Core Audio File format */
SF_FORMAT_WVE = 0x190000, /* Psion WVE format */
SF_FORMAT_OGG = 0x200000, /* Xiph OGG container */
SF_FORMAT_MPC2K = 0x210000, /* Akai MPC 2000 sampler */
SF_FORMAT_RF64 = 0x220000, /* RF64 WAV file */
/* Subtypes from here on. */
SF_FORMAT_PCM_S8 = 0x0001, /* Signed 8 bit data */
SF_FORMAT_PCM_16 = 0x0002, /* Signed 16 bit data */
SF_FORMAT_PCM_24 = 0x0003, /* Signed 24 bit data */
SF_FORMAT_PCM_32 = 0x0004, /* Signed 32 bit data */
SF_FORMAT_PCM_U8 = 0x0005, /* Unsigned 8 bit data (WAV and RAW only) */
SF_FORMAT_FLOAT = 0x0006, /* 32 bit float data */
SF_FORMAT_DOUBLE = 0x0007, /* 64 bit float data */
SF_FORMAT_ULAW = 0x0010, /* U-Law encoded. */
SF_FORMAT_ALAW = 0x0011, /* A-Law encoded. */
SF_FORMAT_IMA_ADPCM = 0x0012, /* IMA ADPCM. */
SF_FORMAT_MS_ADPCM = 0x0013, /* Microsoft ADPCM. */
SF_FORMAT_GSM610 = 0x0020, /* GSM 6.10 encoding. */
SF_FORMAT_VOX_ADPCM = 0x0021, /* OKI / Dialogix ADPCM */
SF_FORMAT_G721_32 = 0x0030, /* 32kbs G721 ADPCM encoding. */
SF_FORMAT_G723_24 = 0x0031, /* 24kbs G723 ADPCM encoding. */
SF_FORMAT_G723_40 = 0x0032, /* 40kbs G723 ADPCM encoding. */
SF_FORMAT_DWVW_12 = 0x0040, /* 12 bit Delta Width Variable Word encoding. */
SF_FORMAT_DWVW_16 = 0x0041, /* 16 bit Delta Width Variable Word encoding. */
SF_FORMAT_DWVW_24 = 0x0042, /* 24 bit Delta Width Variable Word encoding. */
SF_FORMAT_DWVW_N = 0x0043, /* N bit Delta Width Variable Word encoding. */
SF_FORMAT_DPCM_8 = 0x0050, /* 8 bit differential PCM (XI only) */
SF_FORMAT_DPCM_16 = 0x0051, /* 16 bit differential PCM (XI only) */
SF_FORMAT_VORBIS = 0x0060, /* Xiph Vorbis encoding. */
SF_FORMAT_ALAC_16 = 0x0070, /* Apple Lossless Audio Codec (16 bit). */
SF_FORMAT_ALAC_20 = 0x0071, /* Apple Lossless Audio Codec (20 bit). */
SF_FORMAT_ALAC_24 = 0x0072, /* Apple Lossless Audio Codec (24 bit). */
SF_FORMAT_ALAC_32 = 0x0073, /* Apple Lossless Audio Codec (32 bit). */
/* Endian-ness options. */
SF_ENDIAN_FILE = 0x00000000, /* Default file endian-ness. */
SF_ENDIAN_LITTLE = 0x10000000, /* Force little endian-ness. */
SF_ENDIAN_BIG = 0x20000000, /* Force big endian-ness. */
SF_ENDIAN_CPU = 0x30000000, /* Force CPU endian-ness. */
SF_FORMAT_SUBMASK = 0x0000FFFF,
SF_FORMAT_TYPEMASK = 0x0FFF0000,
SF_FORMAT_ENDMASK = 0x30000000
} ;
/*
** The following are the valid command numbers for the sf_command()
** interface. The use of these commands is documented in the file
** command.html in the doc directory of the source code distribution.
*/
enum
{ SFC_GET_LIB_VERSION = 0x1000,
SFC_GET_LOG_INFO = 0x1001,
SFC_GET_CURRENT_SF_INFO = 0x1002,
SFC_GET_NORM_DOUBLE = 0x1010,
SFC_GET_NORM_FLOAT = 0x1011,
SFC_SET_NORM_DOUBLE = 0x1012,
SFC_SET_NORM_FLOAT = 0x1013,
SFC_SET_SCALE_FLOAT_INT_READ = 0x1014,
SFC_SET_SCALE_INT_FLOAT_WRITE = 0x1015,
SFC_GET_SIMPLE_FORMAT_COUNT = 0x1020,
SFC_GET_SIMPLE_FORMAT = 0x1021,
SFC_GET_FORMAT_INFO = 0x1028,
SFC_GET_FORMAT_MAJOR_COUNT = 0x1030,
SFC_GET_FORMAT_MAJOR = 0x1031,
SFC_GET_FORMAT_SUBTYPE_COUNT = 0x1032,
SFC_GET_FORMAT_SUBTYPE = 0x1033,
SFC_CALC_SIGNAL_MAX = 0x1040,
SFC_CALC_NORM_SIGNAL_MAX = 0x1041,
SFC_CALC_MAX_ALL_CHANNELS = 0x1042,
SFC_CALC_NORM_MAX_ALL_CHANNELS = 0x1043,
SFC_GET_SIGNAL_MAX = 0x1044,
SFC_GET_MAX_ALL_CHANNELS = 0x1045,
SFC_SET_ADD_PEAK_CHUNK = 0x1050,
SFC_SET_ADD_HEADER_PAD_CHUNK = 0x1051,
SFC_UPDATE_HEADER_NOW = 0x1060,
SFC_SET_UPDATE_HEADER_AUTO = 0x1061,
SFC_FILE_TRUNCATE = 0x1080,
SFC_SET_RAW_START_OFFSET = 0x1090,
SFC_SET_DITHER_ON_WRITE = 0x10A0,
SFC_SET_DITHER_ON_READ = 0x10A1,
SFC_GET_DITHER_INFO_COUNT = 0x10A2,
SFC_GET_DITHER_INFO = 0x10A3,
SFC_GET_EMBED_FILE_INFO = 0x10B0,
SFC_SET_CLIPPING = 0x10C0,
SFC_GET_CLIPPING = 0x10C1,
SFC_GET_CUE_COUNT = 0x10CD,
SFC_GET_CUE = 0x10CE,
SFC_SET_CUE = 0x10CF,
SFC_GET_INSTRUMENT = 0x10D0,
SFC_SET_INSTRUMENT = 0x10D1,
SFC_GET_LOOP_INFO = 0x10E0,
SFC_GET_BROADCAST_INFO = 0x10F0,
SFC_SET_BROADCAST_INFO = 0x10F1,
SFC_GET_CHANNEL_MAP_INFO = 0x1100,
SFC_SET_CHANNEL_MAP_INFO = 0x1101,
SFC_RAW_DATA_NEEDS_ENDSWAP = 0x1110,
/* Support for Wavex Ambisonics Format */
SFC_WAVEX_SET_AMBISONIC = 0x1200,
SFC_WAVEX_GET_AMBISONIC = 0x1201,
/*
** RF64 files can be set so that on-close, writable files that have less
** than 4GB of data in them are converted to RIFF/WAV, as per EBU
** recommendations.
*/
SFC_RF64_AUTO_DOWNGRADE = 0x1210,
SFC_SET_VBR_ENCODING_QUALITY = 0x1300,
SFC_SET_COMPRESSION_LEVEL = 0x1301,
/* Cart Chunk support */
SFC_SET_CART_INFO = 0x1400,
SFC_GET_CART_INFO = 0x1401,
/* Following commands for testing only. */
SFC_TEST_IEEE_FLOAT_REPLACE = 0x6001,
/*
** SFC_SET_ADD_* values are deprecated and will disappear at some
** time in the future. They are guaranteed to be here up to and
** including version 1.0.8 to avoid breakage of existing software.
** They currently do nothing and will continue to do nothing.
*/
SFC_SET_ADD_DITHER_ON_WRITE = 0x1070,
SFC_SET_ADD_DITHER_ON_READ = 0x1071
} ;
/*
** String types that can be set and read from files. Not all file types
** support this and even the file types which support one, may not support
** all string types.
*/
enum
{ SF_STR_TITLE = 0x01,
SF_STR_COPYRIGHT = 0x02,
SF_STR_SOFTWARE = 0x03,
SF_STR_ARTIST = 0x04,
SF_STR_COMMENT = 0x05,
SF_STR_DATE = 0x06,
SF_STR_ALBUM = 0x07,
SF_STR_LICENSE = 0x08,
SF_STR_TRACKNUMBER = 0x09,
SF_STR_GENRE = 0x10
} ;
/*
** Use the following as the start and end index when doing metadata
** transcoding.
*/
#define SF_STR_FIRST SF_STR_TITLE
#define SF_STR_LAST SF_STR_GENRE
enum
{ /* True and false */
SF_FALSE = 0,
SF_TRUE = 1,
/* Modes for opening files. */
SFM_READ = 0x10,
SFM_WRITE = 0x20,
SFM_RDWR = 0x30,
SF_AMBISONIC_NONE = 0x40,
SF_AMBISONIC_B_FORMAT = 0x41
} ;
/* Public error values. These are guaranteed to remain unchanged for the duration
** of the library major version number.
** There are also a large number of private error numbers which are internal to
** the library which can change at any time.
*/
enum
{ SF_ERR_NO_ERROR = 0,
SF_ERR_UNRECOGNISED_FORMAT = 1,
SF_ERR_SYSTEM = 2,
SF_ERR_MALFORMED_FILE = 3,
SF_ERR_UNSUPPORTED_ENCODING = 4
} ;
/* Channel map values (used with SFC_SET/GET_CHANNEL_MAP).
*/
enum
{ SF_CHANNEL_MAP_INVALID = 0,
SF_CHANNEL_MAP_MONO = 1,
SF_CHANNEL_MAP_LEFT, /* Apple calls this 'Left' */
SF_CHANNEL_MAP_RIGHT, /* Apple calls this 'Right' */
SF_CHANNEL_MAP_CENTER, /* Apple calls this 'Center' */
SF_CHANNEL_MAP_FRONT_LEFT,
SF_CHANNEL_MAP_FRONT_RIGHT,
SF_CHANNEL_MAP_FRONT_CENTER,
SF_CHANNEL_MAP_REAR_CENTER, /* Apple calls this 'Center Surround', Msft calls this 'Back Center' */
SF_CHANNEL_MAP_REAR_LEFT, /* Apple calls this 'Left Surround', Msft calls this 'Back Left' */
SF_CHANNEL_MAP_REAR_RIGHT, /* Apple calls this 'Right Surround', Msft calls this 'Back Right' */
SF_CHANNEL_MAP_LFE, /* Apple calls this 'LFEScreen', Msft calls this 'Low Frequency' */
SF_CHANNEL_MAP_FRONT_LEFT_OF_CENTER, /* Apple calls this 'Left Center' */
SF_CHANNEL_MAP_FRONT_RIGHT_OF_CENTER, /* Apple calls this 'Right Center */
SF_CHANNEL_MAP_SIDE_LEFT, /* Apple calls this 'Left Surround Direct' */
SF_CHANNEL_MAP_SIDE_RIGHT, /* Apple calls this 'Right Surround Direct' */
SF_CHANNEL_MAP_TOP_CENTER, /* Apple calls this 'Top Center Surround' */
SF_CHANNEL_MAP_TOP_FRONT_LEFT, /* Apple calls this 'Vertical Height Left' */
SF_CHANNEL_MAP_TOP_FRONT_RIGHT, /* Apple calls this 'Vertical Height Right' */
SF_CHANNEL_MAP_TOP_FRONT_CENTER, /* Apple calls this 'Vertical Height Center' */
SF_CHANNEL_MAP_TOP_REAR_LEFT, /* Apple and MS call this 'Top Back Left' */
SF_CHANNEL_MAP_TOP_REAR_RIGHT, /* Apple and MS call this 'Top Back Right' */
SF_CHANNEL_MAP_TOP_REAR_CENTER, /* Apple and MS call this 'Top Back Center' */
SF_CHANNEL_MAP_AMBISONIC_B_W,
SF_CHANNEL_MAP_AMBISONIC_B_X,
SF_CHANNEL_MAP_AMBISONIC_B_Y,
SF_CHANNEL_MAP_AMBISONIC_B_Z,
SF_CHANNEL_MAP_MAX
} ;
/* A SNDFILE* pointer can be passed around much like stdio.h's FILE* pointer. */
typedef struct SNDFILE_tag SNDFILE ;
/* The following typedef is system specific and is defined when libsndfile is
** compiled. sf_count_t will be a 64 bit value when the underlying OS allows
** 64 bit file offsets.
** On windows, we need to allow the same header file to be compiler by both GCC
** and the Microsoft compiler.
*/
#if (defined (_MSCVER) || defined (_MSC_VER) && (_MSC_VER < 1310))
typedef __int64 sf_count_t ;
#define SF_COUNT_MAX 0x7fffffffffffffffi64
#else
typedef __int64 sf_count_t ;
#define SF_COUNT_MAX 0x7FFFFFFFFFFFFFFFLL
#endif
/* A pointer to a SF_INFO structure is passed to sf_open () and filled in.
** On write, the SF_INFO structure is filled in by the user and passed into
** sf_open ().
*/
struct SF_INFO
{ sf_count_t frames ; /* Used to be called samples. Changed to avoid confusion. */
int samplerate ;
int channels ;
int format ;
int sections ;
int seekable ;
} ;
typedef struct SF_INFO SF_INFO ;
/* The SF_FORMAT_INFO struct is used to retrieve information about the sound
** file formats libsndfile supports using the sf_command () interface.
**
** Using this interface will allow applications to support new file formats
** and encoding types when libsndfile is upgraded, without requiring
** re-compilation of the application.
**
** Please consult the libsndfile documentation (particularly the information
** on the sf_command () interface) for examples of its use.
*/
typedef struct
{ int format ;
const char *name ;
const char *extension ;
} SF_FORMAT_INFO ;
/*
** Enums and typedefs for adding dither on read and write.
** See the html documentation for sf_command(), SFC_SET_DITHER_ON_WRITE
** and SFC_SET_DITHER_ON_READ.
*/
enum
{ SFD_DEFAULT_LEVEL = 0,
SFD_CUSTOM_LEVEL = 0x40000000,
SFD_NO_DITHER = 500,
SFD_WHITE = 501,
SFD_TRIANGULAR_PDF = 502
} ;
typedef struct
{ int type ;
double level ;
const char *name ;
} SF_DITHER_INFO ;
/* Struct used to retrieve information about a file embedded within a
** larger file. See SFC_GET_EMBED_FILE_INFO.
*/
typedef struct
{ sf_count_t offset ;
sf_count_t length ;
} SF_EMBED_FILE_INFO ;
/*
** Struct used to retrieve cue marker information from a file
*/
typedef struct
{ int32_t indx ;
uint32_t position ;
int32_t fcc_chunk ;
int32_t chunk_start ;
int32_t block_start ;
uint32_t sample_offset ;
char name [256] ;
} SF_CUE_POINT ;
#define SF_CUES_VAR(count) \
struct \
{ uint32_t cue_count ; \
SF_CUE_POINT cue_points [count] ; \
}
typedef SF_CUES_VAR (100) SF_CUES ;
/*
** Structs used to retrieve music sample information from a file.
*/
enum
{ /*
** The loop mode field in SF_INSTRUMENT will be one of the following.
*/
SF_LOOP_NONE = 800,
SF_LOOP_FORWARD,
SF_LOOP_BACKWARD,
SF_LOOP_ALTERNATING
} ;
typedef struct
{ int gain ;
char basenote, detune ;
char velocity_lo, velocity_hi ;
char key_lo, key_hi ;
int loop_count ;
struct
{ int mode ;
uint32_t start ;
uint32_t end ;
uint32_t count ;
} loops [16] ; /* make variable in a sensible way */
} SF_INSTRUMENT ;
/* Struct used to retrieve loop information from a file.*/
typedef struct
{
short time_sig_num ; /* any positive integer > 0 */
short time_sig_den ; /* any positive power of 2 > 0 */
int loop_mode ; /* see SF_LOOP enum */
int num_beats ; /* this is NOT the amount of quarter notes !!!*/
/* a full bar of 4/4 is 4 beats */
/* a full bar of 7/8 is 7 beats */
float bpm ; /* suggestion, as it can be calculated using other fields:*/
/* file's length, file's sampleRate and our time_sig_den*/
/* -> bpms are always the amount of _quarter notes_ per minute */
int root_key ; /* MIDI note, or -1 for None */
int future [6] ;
} SF_LOOP_INFO ;
/* Struct used to retrieve broadcast (EBU) information from a file.
** Strongly (!) based on EBU "bext" chunk format used in Broadcast WAVE.
*/
#define SF_BROADCAST_INFO_VAR(coding_hist_size) \
struct \
{ char description [256] ; \
char originator [32] ; \
char originator_reference [32] ; \
char origination_date [10] ; \
char origination_time [8] ; \
uint32_t time_reference_low ; \
uint32_t time_reference_high ; \
short version ; \
char umid [64] ; \
char reserved [190] ; \
uint32_t coding_history_size ; \
char coding_history [coding_hist_size] ; \
}
/* SF_BROADCAST_INFO is the above struct with coding_history field of 256 bytes. */
typedef SF_BROADCAST_INFO_VAR (256) SF_BROADCAST_INFO ;
struct SF_CART_TIMER
{ char usage [4] ;
int32_t value ;
} ;
typedef struct SF_CART_TIMER SF_CART_TIMER ;
#define SF_CART_INFO_VAR(p_tag_text_size) \
struct \
{ char version [4] ; \
char title [64] ; \
char artist [64] ; \
char cut_id [64] ; \
char client_id [64] ; \
char category [64] ; \
char classification [64] ; \
char out_cue [64] ; \
char start_date [10] ; \
char start_time [8] ; \
char end_date [10] ; \
char end_time [8] ; \
char producer_app_id [64] ; \
char producer_app_version [64] ; \
char user_def [64] ; \
int32_t level_reference ; \
SF_CART_TIMER post_timers [8] ; \
char reserved [276] ; \
char url [1024] ; \
uint32_t tag_text_size ; \
char tag_text [p_tag_text_size] ; \
}
typedef SF_CART_INFO_VAR (256) SF_CART_INFO ;
/* Virtual I/O functionality. */
typedef sf_count_t (*sf_vio_get_filelen) (void *user_data) ;
typedef sf_count_t (*sf_vio_seek) (sf_count_t offset, int whence, void *user_data) ;
typedef sf_count_t (*sf_vio_read) (void *ptr, sf_count_t count, void *user_data) ;
typedef sf_count_t (*sf_vio_write) (const void *ptr, sf_count_t count, void *user_data) ;
typedef sf_count_t (*sf_vio_tell) (void *user_data) ;
struct SF_VIRTUAL_IO
{ sf_vio_get_filelen get_filelen ;
sf_vio_seek seek ;
sf_vio_read read ;
sf_vio_write write ;
sf_vio_tell tell ;
} ;
typedef struct SF_VIRTUAL_IO SF_VIRTUAL_IO ;
/* Open the specified file for read, write or both. On error, this will
** return a NULL pointer. To find the error number, pass a NULL SNDFILE
** to sf_strerror ().
** All calls to sf_open() should be matched with a call to sf_close().
*/
SNDFILE* sf_open (const char *path, int mode, SF_INFO *sfinfo) ;
/* Use the existing file descriptor to create a SNDFILE object. If close_desc
** is TRUE, the file descriptor will be closed when sf_close() is called. If
** it is FALSE, the descriptor will not be closed.
** When passed a descriptor like this, the library will assume that the start
** of file header is at the current file offset. This allows sound files within
** larger container files to be read and/or written.
** On error, this will return a NULL pointer. To find the error number, pass a
** NULL SNDFILE to sf_strerror ().
** All calls to sf_open_fd() should be matched with a call to sf_close().
*/
SNDFILE* sf_open_fd (int fd, int mode, SF_INFO *sfinfo, int close_desc) ;
SNDFILE* sf_open_virtual (SF_VIRTUAL_IO *sfvirtual, int mode, SF_INFO *sfinfo, void *user_data) ;
/* sf_error () returns a error number which can be translated to a text
** string using sf_error_number().
*/
int sf_error (SNDFILE *sndfile) ;
/* sf_strerror () returns to the caller a pointer to the current error message for
** the given SNDFILE.
*/
const char* sf_strerror (SNDFILE *sndfile) ;
/* sf_error_number () allows the retrieval of the error string for each internal
** error number.
**
*/
const char* sf_error_number (int errnum) ;
/* The following two error functions are deprecated but they will remain in the
** library for the foreseeable future. The function sf_strerror() should be used
** in their place.
*/
int sf_perror (SNDFILE *sndfile) ;
int sf_error_str (SNDFILE *sndfile, char* str, size_t len) ;
/* Return TRUE if fields of the SF_INFO struct are a valid combination of values. */
int sf_command (SNDFILE *sndfile, int command, void *data, int datasize) ;
/* Return TRUE if fields of the SF_INFO struct are a valid combination of values. */
int sf_format_check (const SF_INFO *info) ;
/* Seek within the waveform data chunk of the SNDFILE. sf_seek () uses
** the same values for whence (SEEK_SET, SEEK_CUR and SEEK_END) as
** stdio.h function fseek ().
** An offset of zero with whence set to SEEK_SET will position the
** read / write pointer to the first data sample.
** On success sf_seek returns the current position in (multi-channel)
** samples from the start of the file.
** Please see the libsndfile documentation for moving the read pointer
** separately from the write pointer on files open in mode SFM_RDWR.
** On error all of these functions return -1.
*/
enum
{ SF_SEEK_SET = SEEK_SET,
SF_SEEK_CUR = SEEK_CUR,
SF_SEEK_END = SEEK_END
} ;
sf_count_t sf_seek (SNDFILE *sndfile, sf_count_t frames, int whence) ;
/* Functions for retrieving and setting string data within sound files.
** Not all file types support this features; AIFF and WAV do. For both
** functions, the str_type parameter must be one of the SF_STR_* values
** defined above.
** On error, sf_set_string() returns non-zero while sf_get_string()
** returns NULL.
*/
int sf_set_string (SNDFILE *sndfile, int str_type, const char* str) ;
const char* sf_get_string (SNDFILE *sndfile, int str_type) ;
/* Return the library version string. */
const char * sf_version_string (void) ;
/* Return the current byterate at this point in the file. The byte rate in this
** case is the number of bytes per second of audio data. For instance, for a
** stereo, 18 bit PCM encoded file with an 16kHz sample rate, the byte rate
** would be 2 (stereo) * 2 (two bytes per sample) * 16000 => 64000 bytes/sec.
** For some file formats the returned value will be accurate and exact, for some
** it will be a close approximation, for some it will be the average bitrate for
** the whole file and for some it will be a time varying value that was accurate
** when the file was most recently read or written.
** To get the bitrate, multiple this value by 8.
** Returns -1 for unknown.
*/
int sf_current_byterate (SNDFILE *sndfile) ;
/* Functions for reading/writing the waveform data of a sound file.
*/
sf_count_t sf_read_raw (SNDFILE *sndfile, void *ptr, sf_count_t bytes) ;
sf_count_t sf_write_raw (SNDFILE *sndfile, const void *ptr, sf_count_t bytes) ;
/* Functions for reading and writing the data chunk in terms of frames.
** The number of items actually read/written = frames * number of channels.
** sf_xxxx_raw read/writes the raw data bytes from/to the file
** sf_xxxx_short passes data in the native short format
** sf_xxxx_int passes data in the native int format
** sf_xxxx_float passes data in the native float format
** sf_xxxx_double passes data in the native double format
** All of these read/write function return number of frames read/written.
*/
sf_count_t sf_readf_short (SNDFILE *sndfile, short *ptr, sf_count_t frames) ;
sf_count_t sf_writef_short (SNDFILE *sndfile, const short *ptr, sf_count_t frames) ;
sf_count_t sf_readf_int (SNDFILE *sndfile, int *ptr, sf_count_t frames) ;
sf_count_t sf_writef_int (SNDFILE *sndfile, const int *ptr, sf_count_t frames) ;
sf_count_t sf_readf_float (SNDFILE *sndfile, float *ptr, sf_count_t frames) ;
sf_count_t sf_writef_float (SNDFILE *sndfile, const float *ptr, sf_count_t frames) ;
sf_count_t sf_readf_double (SNDFILE *sndfile, double *ptr, sf_count_t frames) ;
sf_count_t sf_writef_double (SNDFILE *sndfile, const double *ptr, sf_count_t frames) ;
/* Functions for reading and writing the data chunk in terms of items.
** Otherwise similar to above.
** All of these read/write function return number of items read/written.
*/
sf_count_t sf_read_short (SNDFILE *sndfile, short *ptr, sf_count_t items) ;
sf_count_t sf_write_short (SNDFILE *sndfile, const short *ptr, sf_count_t items) ;
sf_count_t sf_read_int (SNDFILE *sndfile, int *ptr, sf_count_t items) ;
sf_count_t sf_write_int (SNDFILE *sndfile, const int *ptr, sf_count_t items) ;
sf_count_t sf_read_float (SNDFILE *sndfile, float *ptr, sf_count_t items) ;
sf_count_t sf_write_float (SNDFILE *sndfile, const float *ptr, sf_count_t items) ;
sf_count_t sf_read_double (SNDFILE *sndfile, double *ptr, sf_count_t items) ;
sf_count_t sf_write_double (SNDFILE *sndfile, const double *ptr, sf_count_t items) ;
/* Close the SNDFILE and clean up all memory allocations associated with this
** file.
** Returns 0 on success, or an error number.
*/
int sf_close (SNDFILE *sndfile) ;
/* If the file is opened SFM_WRITE or SFM_RDWR, call fsync() on the file
** to force the writing of data to disk. If the file is opened SFM_READ
** no action is taken.
*/
void sf_write_sync (SNDFILE *sndfile) ;
/* The function sf_wchar_open() is Windows Only!
** Open a file passing in a Windows Unicode filename. Otherwise, this is
** the same as sf_open().
**
** In order for this to work, you need to do the following:
**
** #include <windows.h>
** #define ENABLE_SNDFILE_WINDOWS_PROTOTYPES 1
** #including <sndfile.h>
*/
#if (defined (ENABLE_SNDFILE_WINDOWS_PROTOTYPES) && ENABLE_SNDFILE_WINDOWS_PROTOTYPES)
SNDFILE* sf_wchar_open (LPCWSTR wpath, int mode, SF_INFO *sfinfo) ;
#endif
/* Getting and setting of chunks from within a sound file.
**
** These functions allow the getting and setting of chunks within a sound file
** (for those formats which allow it).
**
** These functions fail safely. Specifically, they will not allow you to overwrite
** existing chunks or add extra versions of format specific reserved chunks but
** should allow you to retrieve any and all chunks (may not be implemented for
** all chunks or all file formats).
*/
struct SF_CHUNK_INFO
{ char id [64] ; /* The chunk identifier. */
unsigned id_size ; /* The size of the chunk identifier. */
unsigned datalen ; /* The size of that data. */
void *data ; /* Pointer to the data. */
} ;
typedef struct SF_CHUNK_INFO SF_CHUNK_INFO ;
/* Set the specified chunk info (must be done before any audio data is written
** to the file). This will fail for format specific reserved chunks.
** The chunk_info->data pointer must be valid until the file is closed.
** Returns SF_ERR_NO_ERROR on success or non-zero on failure.
*/
int sf_set_chunk (SNDFILE * sndfile, const SF_CHUNK_INFO * chunk_info) ;
/*
** An opaque structure to an iterator over the all chunks of a given id
*/
typedef struct SF_CHUNK_ITERATOR SF_CHUNK_ITERATOR ;
/* Get an iterator for all chunks matching chunk_info.
** The iterator will point to the first chunk matching chunk_info.
** Chunks are matching, if (chunk_info->id) matches the first
** (chunk_info->id_size) bytes of a chunk found in the SNDFILE* handle.
** If chunk_info is NULL, an iterator to all chunks in the SNDFILE* handle
** is returned.
** The values of chunk_info->datalen and chunk_info->data are ignored.
** If no matching chunks are found in the sndfile, NULL is returned.
** The returned iterator will stay valid until one of the following occurs:
** a) The sndfile is closed.
** b) A new chunk is added using sf_set_chunk().
** c) Another chunk iterator function is called on the same SNDFILE* handle
** that causes the iterator to be modified.
** The memory for the iterator belongs to the SNDFILE* handle and is freed when
** sf_close() is called.
*/
SF_CHUNK_ITERATOR *
sf_get_chunk_iterator (SNDFILE * sndfile, const SF_CHUNK_INFO * chunk_info) ;
/* Iterate through chunks by incrementing the iterator.
** Increments the iterator and returns a handle to the new one.
** After this call, iterator will no longer be valid, and you must use the
** newly returned handle from now on.
** The returned handle can be used to access the next chunk matching
** the criteria as defined in sf_get_chunk_iterator().
** If iterator points to the last chunk, this will free all resources
** associated with iterator and return NULL.
** The returned iterator will stay valid until sf_get_chunk_iterator_next
** is called again, the sndfile is closed or a new chunk us added.
*/
SF_CHUNK_ITERATOR *
sf_next_chunk_iterator (SF_CHUNK_ITERATOR * iterator) ;
/* Get the size of the specified chunk.
** If the specified chunk exists, the size will be returned in the
** datalen field of the SF_CHUNK_INFO struct.
** Additionally, the id of the chunk will be copied to the id
** field of the SF_CHUNK_INFO struct and it's id_size field will
** be updated accordingly.
** If the chunk doesn't exist chunk_info->datalen will be zero, and the
** id and id_size fields will be undefined.
** The function will return SF_ERR_NO_ERROR on success or non-zero on
** failure.
*/
int
sf_get_chunk_size (const SF_CHUNK_ITERATOR * it, SF_CHUNK_INFO * chunk_info) ;
/* Get the specified chunk data.
** If the specified chunk exists, up to chunk_info->datalen bytes of
** the chunk data will be copied into the chunk_info->data buffer
** (allocated by the caller) and the chunk_info->datalen field
** updated to reflect the size of the data. The id and id_size
** field will be updated according to the retrieved chunk
** If the chunk doesn't exist chunk_info->datalen will be zero, and the
** id and id_size fields will be undefined.
** The function will return SF_ERR_NO_ERROR on success or non-zero on
** failure.
*/
int
sf_get_chunk_data (const SF_CHUNK_ITERATOR * it, SF_CHUNK_INFO * chunk_info) ;
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif /* SNDFILE_H */

View File

@ -0,0 +1,446 @@
/*
** Copyright (C) 2005-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
**
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
**
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the author nor the names of any contributors may be used
** to endorse or promote products derived from this software without
** specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
** PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
** OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
** OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
** ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
** The above modified BSD style license (GPL and LGPL compatible) applies to
** this file. It does not apply to libsndfile itself which is released under
** the GNU LGPL or the libsndfile test suite which is released under the GNU
** GPL.
** This means that this header file can be used under this modified BSD style
** license, but the LGPL still holds for the libsndfile library itself.
*/
/*
** sndfile.hh -- A lightweight C++ wrapper for the libsndfile API.
**
** All the methods are inlines and all functionality is contained in this
** file. There is no separate implementation file.
**
** API documentation is in the doc/ directory of the source code tarball
** and at http://www.mega-nerd.com/libsndfile/api.html.
*/
#ifndef SNDFILE_HH
#define SNDFILE_HH
#include <sndfile.h>
#include <string>
#include <new> // for std::nothrow
class SndfileHandle
{ private :
struct SNDFILE_ref
{ SNDFILE_ref (void) ;
~SNDFILE_ref (void) ;
SNDFILE *sf ;
SF_INFO sfinfo ;
int ref ;
} ;
SNDFILE_ref *p ;
public :
/* Default constructor */
SndfileHandle (void) : p (NULL) {} ;
SndfileHandle (const char *path, int mode = SFM_READ,
int format = 0, int channels = 0, int samplerate = 0) ;
SndfileHandle (std::string const & path, int mode = SFM_READ,
int format = 0, int channels = 0, int samplerate = 0) ;
SndfileHandle (int fd, bool close_desc, int mode = SFM_READ,
int format = 0, int channels = 0, int samplerate = 0) ;
SndfileHandle (SF_VIRTUAL_IO &sfvirtual, void *user_data, int mode = SFM_READ,
int format = 0, int channels = 0, int samplerate = 0) ;
#ifdef ENABLE_SNDFILE_WINDOWS_PROTOTYPES
SndfileHandle (LPCWSTR wpath, int mode = SFM_READ,
int format = 0, int channels = 0, int samplerate = 0) ;
#endif
~SndfileHandle (void) ;
SndfileHandle (const SndfileHandle &orig) ;
SndfileHandle & operator = (const SndfileHandle &rhs) ;
/* Mainly for debugging/testing. */
int refCount (void) const { return (p == NULL) ? 0 : p->ref ; }
operator bool () const { return (p != NULL) ; }
bool operator == (const SndfileHandle &rhs) const { return (p == rhs.p) ; }
sf_count_t frames (void) const { return p ? p->sfinfo.frames : 0 ; }
int format (void) const { return p ? p->sfinfo.format : 0 ; }
int channels (void) const { return p ? p->sfinfo.channels : 0 ; }
int samplerate (void) const { return p ? p->sfinfo.samplerate : 0 ; }
int error (void) const ;
const char * strError (void) const ;
int command (int cmd, void *data, int datasize) ;
sf_count_t seek (sf_count_t frames, int whence) ;
void writeSync (void) ;
int setString (int str_type, const char* str) ;
const char* getString (int str_type) const ;
static int formatCheck (int format, int channels, int samplerate) ;
sf_count_t read (short *ptr, sf_count_t items) ;
sf_count_t read (int *ptr, sf_count_t items) ;
sf_count_t read (float *ptr, sf_count_t items) ;
sf_count_t read (double *ptr, sf_count_t items) ;
sf_count_t write (const short *ptr, sf_count_t items) ;
sf_count_t write (const int *ptr, sf_count_t items) ;
sf_count_t write (const float *ptr, sf_count_t items) ;
sf_count_t write (const double *ptr, sf_count_t items) ;
sf_count_t readf (short *ptr, sf_count_t frames) ;
sf_count_t readf (int *ptr, sf_count_t frames) ;
sf_count_t readf (float *ptr, sf_count_t frames) ;
sf_count_t readf (double *ptr, sf_count_t frames) ;
sf_count_t writef (const short *ptr, sf_count_t frames) ;
sf_count_t writef (const int *ptr, sf_count_t frames) ;
sf_count_t writef (const float *ptr, sf_count_t frames) ;
sf_count_t writef (const double *ptr, sf_count_t frames) ;
sf_count_t readRaw (void *ptr, sf_count_t bytes) ;
sf_count_t writeRaw (const void *ptr, sf_count_t bytes) ;
/**< Raw access to the handle. SndfileHandle keeps ownership. */
SNDFILE * rawHandle (void) ;
/**< Take ownership of handle, if reference count is 1. */
SNDFILE * takeOwnership (void) ;
} ;
/*==============================================================================
** Nothing but implementation below.
*/
inline
SndfileHandle::SNDFILE_ref::SNDFILE_ref (void)
: sf (NULL), sfinfo (), ref (1)
{}
inline
SndfileHandle::SNDFILE_ref::~SNDFILE_ref (void)
{ if (sf != NULL) sf_close (sf) ; }
inline
SndfileHandle::SndfileHandle (const char *path, int mode, int fmt, int chans, int srate)
: p (NULL)
{
p = new (std::nothrow) SNDFILE_ref () ;
if (p != NULL)
{ p->ref = 1 ;
p->sfinfo.frames = 0 ;
p->sfinfo.channels = chans ;
p->sfinfo.format = fmt ;
p->sfinfo.samplerate = srate ;
p->sfinfo.sections = 0 ;
p->sfinfo.seekable = 0 ;
p->sf = sf_open (path, mode, &p->sfinfo) ;
} ;
return ;
} /* SndfileHandle const char * constructor */
inline
SndfileHandle::SndfileHandle (std::string const & path, int mode, int fmt, int chans, int srate)
: p (NULL)
{
p = new (std::nothrow) SNDFILE_ref () ;
if (p != NULL)
{ p->ref = 1 ;
p->sfinfo.frames = 0 ;
p->sfinfo.channels = chans ;
p->sfinfo.format = fmt ;
p->sfinfo.samplerate = srate ;
p->sfinfo.sections = 0 ;
p->sfinfo.seekable = 0 ;
p->sf = sf_open (path.c_str (), mode, &p->sfinfo) ;
} ;
return ;
} /* SndfileHandle std::string constructor */
inline
SndfileHandle::SndfileHandle (int fd, bool close_desc, int mode, int fmt, int chans, int srate)
: p (NULL)
{
if (fd < 0)
return ;
p = new (std::nothrow) SNDFILE_ref () ;
if (p != NULL)
{ p->ref = 1 ;
p->sfinfo.frames = 0 ;
p->sfinfo.channels = chans ;
p->sfinfo.format = fmt ;
p->sfinfo.samplerate = srate ;
p->sfinfo.sections = 0 ;
p->sfinfo.seekable = 0 ;
p->sf = sf_open_fd (fd, mode, &p->sfinfo, close_desc) ;
} ;
return ;
} /* SndfileHandle fd constructor */
inline
SndfileHandle::SndfileHandle (SF_VIRTUAL_IO &sfvirtual, void *user_data, int mode, int fmt, int chans, int srate)
: p (NULL)
{
p = new (std::nothrow) SNDFILE_ref () ;
if (p != NULL)
{ p->ref = 1 ;
p->sfinfo.frames = 0 ;
p->sfinfo.channels = chans ;
p->sfinfo.format = fmt ;
p->sfinfo.samplerate = srate ;
p->sfinfo.sections = 0 ;
p->sfinfo.seekable = 0 ;
p->sf = sf_open_virtual (&sfvirtual, mode, &p->sfinfo, user_data) ;
} ;
return ;
} /* SndfileHandle std::string constructor */
inline
SndfileHandle::~SndfileHandle (void)
{ if (p != NULL && --p->ref == 0)
delete p ;
} /* SndfileHandle destructor */
inline
SndfileHandle::SndfileHandle (const SndfileHandle &orig)
: p (orig.p)
{ if (p != NULL)
++p->ref ;
} /* SndfileHandle copy constructor */
inline SndfileHandle &
SndfileHandle::operator = (const SndfileHandle &rhs)
{
if (&rhs == this)
return *this ;
if (p != NULL && --p->ref == 0)
delete p ;
p = rhs.p ;
if (p != NULL)
++p->ref ;
return *this ;
} /* SndfileHandle assignment operator */
inline int
SndfileHandle::error (void) const
{ return sf_error (p->sf) ; }
inline const char *
SndfileHandle::strError (void) const
{ return sf_strerror (p->sf) ; }
inline int
SndfileHandle::command (int cmd, void *data, int datasize)
{ return sf_command (p->sf, cmd, data, datasize) ; }
inline sf_count_t
SndfileHandle::seek (sf_count_t frame_count, int whence)
{ return sf_seek (p->sf, frame_count, whence) ; }
inline void
SndfileHandle::writeSync (void)
{ sf_write_sync (p->sf) ; }
inline int
SndfileHandle::setString (int str_type, const char* str)
{ return sf_set_string (p->sf, str_type, str) ; }
inline const char*
SndfileHandle::getString (int str_type) const
{ return sf_get_string (p->sf, str_type) ; }
inline int
SndfileHandle::formatCheck (int fmt, int chans, int srate)
{
SF_INFO sfinfo ;
sfinfo.frames = 0 ;
sfinfo.channels = chans ;
sfinfo.format = fmt ;
sfinfo.samplerate = srate ;
sfinfo.sections = 0 ;
sfinfo.seekable = 0 ;
return sf_format_check (&sfinfo) ;
}
/*---------------------------------------------------------------------*/
inline sf_count_t
SndfileHandle::read (short *ptr, sf_count_t items)
{ return sf_read_short (p->sf, ptr, items) ; }
inline sf_count_t
SndfileHandle::read (int *ptr, sf_count_t items)
{ return sf_read_int (p->sf, ptr, items) ; }
inline sf_count_t
SndfileHandle::read (float *ptr, sf_count_t items)
{ return sf_read_float (p->sf, ptr, items) ; }
inline sf_count_t
SndfileHandle::read (double *ptr, sf_count_t items)
{ return sf_read_double (p->sf, ptr, items) ; }
inline sf_count_t
SndfileHandle::write (const short *ptr, sf_count_t items)
{ return sf_write_short (p->sf, ptr, items) ; }
inline sf_count_t
SndfileHandle::write (const int *ptr, sf_count_t items)
{ return sf_write_int (p->sf, ptr, items) ; }
inline sf_count_t
SndfileHandle::write (const float *ptr, sf_count_t items)
{ return sf_write_float (p->sf, ptr, items) ; }
inline sf_count_t
SndfileHandle::write (const double *ptr, sf_count_t items)
{ return sf_write_double (p->sf, ptr, items) ; }
inline sf_count_t
SndfileHandle::readf (short *ptr, sf_count_t frame_count)
{ return sf_readf_short (p->sf, ptr, frame_count) ; }
inline sf_count_t
SndfileHandle::readf (int *ptr, sf_count_t frame_count)
{ return sf_readf_int (p->sf, ptr, frame_count) ; }
inline sf_count_t
SndfileHandle::readf (float *ptr, sf_count_t frame_count)
{ return sf_readf_float (p->sf, ptr, frame_count) ; }
inline sf_count_t
SndfileHandle::readf (double *ptr, sf_count_t frame_count)
{ return sf_readf_double (p->sf, ptr, frame_count) ; }
inline sf_count_t
SndfileHandle::writef (const short *ptr, sf_count_t frame_count)
{ return sf_writef_short (p->sf, ptr, frame_count) ; }
inline sf_count_t
SndfileHandle::writef (const int *ptr, sf_count_t frame_count)
{ return sf_writef_int (p->sf, ptr, frame_count) ; }
inline sf_count_t
SndfileHandle::writef (const float *ptr, sf_count_t frame_count)
{ return sf_writef_float (p->sf, ptr, frame_count) ; }
inline sf_count_t
SndfileHandle::writef (const double *ptr, sf_count_t frame_count)
{ return sf_writef_double (p->sf, ptr, frame_count) ; }
inline sf_count_t
SndfileHandle::readRaw (void *ptr, sf_count_t bytes)
{ return sf_read_raw (p->sf, ptr, bytes) ; }
inline sf_count_t
SndfileHandle::writeRaw (const void *ptr, sf_count_t bytes)
{ return sf_write_raw (p->sf, ptr, bytes) ; }
inline SNDFILE *
SndfileHandle::rawHandle (void)
{ return (p ? p->sf : NULL) ; }
inline SNDFILE *
SndfileHandle::takeOwnership (void)
{
if (p == NULL || (p->ref != 1))
return NULL ;
SNDFILE * sf = p->sf ;
p->sf = NULL ;
delete p ;
p = NULL ;
return sf ;
}
#ifdef ENABLE_SNDFILE_WINDOWS_PROTOTYPES
inline
SndfileHandle::SndfileHandle (LPCWSTR wpath, int mode, int fmt, int chans, int srate)
: p (NULL)
{
p = new (std::nothrow) SNDFILE_ref () ;
if (p != NULL)
{ p->ref = 1 ;
p->sfinfo.frames = 0 ;
p->sfinfo.channels = chans ;
p->sfinfo.format = fmt ;
p->sfinfo.samplerate = srate ;
p->sfinfo.sections = 0 ;
p->sfinfo.seekable = 0 ;
p->sf = sf_wchar_open (wpath, mode, &p->sfinfo) ;
} ;
return ;
} /* SndfileHandle const wchar_t * constructor */
#endif
#endif /* SNDFILE_HH */

View File

@ -0,0 +1,47 @@
; Auto-generated by create_symbols_file.py
LIBRARY libsndfile-1.dll
EXPORTS
sf_command @1
sf_open @2
sf_close @3
sf_seek @4
sf_error @7
sf_perror @8
sf_error_str @9
sf_error_number @10
sf_format_check @11
sf_read_raw @16
sf_readf_short @17
sf_readf_int @18
sf_readf_float @19
sf_readf_double @20
sf_read_short @21
sf_read_int @22
sf_read_float @23
sf_read_double @24
sf_write_raw @32
sf_writef_short @33
sf_writef_int @34
sf_writef_float @35
sf_writef_double @36
sf_write_short @37
sf_write_int @38
sf_write_float @39
sf_write_double @40
sf_strerror @50
sf_get_string @60
sf_set_string @61
sf_version_string @68
sf_open_fd @70
sf_wchar_open @71
sf_open_virtual @80
sf_write_sync @90
sf_set_chunk @100
sf_get_chunk_size @101
sf_get_chunk_data @102
sf_get_chunk_iterator @103
sf_next_chunk_iterator @104
sf_current_byterate @110

Binary file not shown.

View File

@ -0,0 +1,12 @@
prefix=c:/devel/target/libsndfile
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: sndfile
Description: A library for reading and writing audio files
Requires:
Version: 1.0.28
Libs: -L${libdir} -lsndfile
Libs.private: Ext/libflac.la Ext/libvorbis.la Ext/libogg.la
Cflags: -I${includedir}

BIN
mpg123.64/dist/libmpg123.dll vendored Normal file

Binary file not shown.

159
mpg123.64/include/fmt123.h Normal file
View File

@ -0,0 +1,159 @@
/*
libmpg123: MPEG Audio Decoder library
separate header just for audio format definitions not tied to
library code
copyright 1995-2020 by the mpg123 project
free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
*/
#ifndef MPG123_ENC_H
#define MPG123_ENC_H
/** \file fmt123.h Audio format definitions. */
/** \defgroup mpg123_enc mpg123 PCM sample encodings
* These are definitions for audio formats used by libmpg123 and
* libout123.
*
* @{
*/
/** An enum over all sample types possibly known to mpg123.
* The values are designed as bit flags to allow bitmasking for encoding
* families.
* This is also why the enum is not used as type for actual encoding variables,
* plain integers (at least 16 bit, 15 bit being used) cover the possible
* combinations of these flags.
*
* Note that (your build of) libmpg123 does not necessarily support all these.
* Usually, you can expect the 8bit encodings and signed 16 bit.
* Also 32bit float will be usual beginning with mpg123-1.7.0 .
* What you should bear in mind is that (SSE, etc) optimized routines may be
* absent for some formats. We do have SSE for 16, 32 bit and float, though.
* 24 bit integer is done via postprocessing of 32 bit output -- just cutting
* the last byte, no rounding, even. If you want better, do it yourself.
*
* All formats are in native byte order. If you need different endinaness, you
* can simply postprocess the output buffers (libmpg123 wouldn't do anything
* else). The macro MPG123_SAMPLESIZE() can be helpful there.
*/
enum mpg123_enc_enum
{
/* 0000 0000 0000 1111 Some 8 bit integer encoding. */
MPG123_ENC_8 = 0x00f
/* 0000 0000 0100 0000 Some 16 bit integer encoding. */
, MPG123_ENC_16 = 0x040
/* 0100 0000 0000 0000 Some 24 bit integer encoding. */
, MPG123_ENC_24 = 0x4000
/* 0000 0001 0000 0000 Some 32 bit integer encoding. */
, MPG123_ENC_32 = 0x100
/* 0000 0000 1000 0000 Some signed integer encoding. */
, MPG123_ENC_SIGNED = 0x080
/* 0000 1110 0000 0000 Some float encoding. */
, MPG123_ENC_FLOAT = 0xe00
/* 0000 0000 1101 0000 signed 16 bit */
, MPG123_ENC_SIGNED_16 = (MPG123_ENC_16|MPG123_ENC_SIGNED|0x10)
/* 0000 0000 0110 0000 unsigned 16 bit */
, MPG123_ENC_UNSIGNED_16 = (MPG123_ENC_16|0x20)
/* 0000 0000 0000 0001 unsigned 8 bit */
, MPG123_ENC_UNSIGNED_8 = 0x01
/* 0000 0000 1000 0010 signed 8 bit */
, MPG123_ENC_SIGNED_8 = (MPG123_ENC_SIGNED|0x02)
/* 0000 0000 0000 0100 ulaw 8 bit */
, MPG123_ENC_ULAW_8 = 0x04
/* 0000 0000 0000 1000 alaw 8 bit */
, MPG123_ENC_ALAW_8 = 0x08
/* 0001 0001 1000 0000 signed 32 bit */
, MPG123_ENC_SIGNED_32 = MPG123_ENC_32|MPG123_ENC_SIGNED|0x1000
/* 0010 0001 0000 0000 unsigned 32 bit */
, MPG123_ENC_UNSIGNED_32 = MPG123_ENC_32|0x2000
/* 0101 0000 1000 0000 signed 24 bit */
, MPG123_ENC_SIGNED_24 = MPG123_ENC_24|MPG123_ENC_SIGNED|0x1000
/* 0110 0000 0000 0000 unsigned 24 bit */
, MPG123_ENC_UNSIGNED_24 = MPG123_ENC_24|0x2000
/* 0000 0010 0000 0000 32bit float */
, MPG123_ENC_FLOAT_32 = 0x200
/* 0000 0100 0000 0000 64bit float */
, MPG123_ENC_FLOAT_64 = 0x400
/* Any possibly known encoding from the list above. */
, MPG123_ENC_ANY = ( MPG123_ENC_SIGNED_16 | MPG123_ENC_UNSIGNED_16
| MPG123_ENC_UNSIGNED_8 | MPG123_ENC_SIGNED_8
| MPG123_ENC_ULAW_8 | MPG123_ENC_ALAW_8
| MPG123_ENC_SIGNED_32 | MPG123_ENC_UNSIGNED_32
| MPG123_ENC_SIGNED_24 | MPG123_ENC_UNSIGNED_24
| MPG123_ENC_FLOAT_32 | MPG123_ENC_FLOAT_64 )
};
/** Get size of one PCM sample with given encoding.
* This is included both in libmpg123 and libout123. Both offer
* an API function to provide the macro results from library
* compile-time, not that of you application. This most likely
* does not matter as I do not expect any fresh PCM sample
* encoding to appear. But who knows? Perhaps the encoding type
* will be abused for funny things in future, not even plain PCM.
* And, by the way: Thomas really likes the ?: operator.
* \param enc the encoding (mpg123_enc_enum value)
* \return size of one sample in bytes
*/
#define MPG123_SAMPLESIZE(enc) ( \
(enc) < 1 \
? 0 \
: ( (enc) & MPG123_ENC_8 \
? 1 \
: ( (enc) & MPG123_ENC_16 \
? 2 \
: ( (enc) & MPG123_ENC_24 \
? 3 \
: ( ( (enc) & MPG123_ENC_32 \
|| (enc) == MPG123_ENC_FLOAT_32 ) \
? 4 \
: ( (enc) == MPG123_ENC_FLOAT_64 \
? 8 \
: 0 \
) ) ) ) ) )
/** Representation of zero in differing encodings.
* This exists to define proper silence in various encodings without
* having to link to libsyn123 to do actual conversions at runtime.
* You have to handle big/little endian order yourself, though.
* This takes the shortcut that any signed encoding has a zero with
* all-zero bits. Unsigned linear encodings just have the highest bit set
* (2^(n-1) for n bits), while the nonlinear 8-bit ones are special.
* \param enc the encoding (mpg123_enc_enum value)
* \param siz bytes per sample (return value of MPG123_SAMPLESIZE(enc))
* \param off byte (octet) offset counted from LSB
* \return unsigned byte value for the designated octet
*/
#define MPG123_ZEROSAMPLE(enc, siz, off) ( \
(enc) == MPG123_ENC_ULAW_8 \
? (off == 0 ? 0xff : 0x00) \
: ( (enc) == MPG123_ENC_ALAW_8 \
? (off == 0 ? 0xd5 : 0x00) \
: ( (((enc) & (MPG123_ENC_SIGNED|MPG123_ENC_FLOAT)) || (siz) != ((off)+1)) \
? 0x00 \
: 0x80 \
) ) )
/** Structure defining an audio format.
* Providing the members as individual function arguments to define a certain
* output format is easy enough. This struct makes is more comfortable to deal
* with a list of formats.
* Negative values for the members might be used to communicate use of default
* values.
*/
struct mpg123_fmt
{
long rate; /**< sampling rate in Hz */
int channels; /**< channel count */
/** encoding code, can be single value or bitwise or of members of
* mpg123_enc_enum */
int encoding;
};
/* @} */
#endif

1697
mpg123.64/include/mpg123.h Normal file

File diff suppressed because it is too large Load Diff

BIN
mpg123.64/lib/libmpg123.lib Normal file

Binary file not shown.

View File

@ -6,10 +6,17 @@ newoption {
}
newoption {
trigger = "glfwdir",
trigger = "glfwdir64",
value = "PATH",
description = "Directory of glfw",
default = "glfw-3.3.2.bin.WIN32"
default = "glfw-3.3.2.bin.WIN64",
}
newoption {
trigger = "glfwdir32",
value = "PATH",
description = "Directory of glfw",
default = "glfw-3.3.2.bin.WIN32",
}
newoption {
@ -48,12 +55,14 @@ workspace "reVC"
filter { "system:windows" }
platforms {
"win-x86-RW33_d3d8-mss",
"win-x86-RW34_d3d8-mss",
"win-x86-librw_d3d9-mss",
"win-x86-librw_gl3_glfw-mss",
"win-x86-RW33_d3d8-oal",
"win-x86-RW34_d3d8-oal",
"win-x86-librw_d3d9-oal",
"win-x86-librw_gl3_glfw-oal",
"win-amd64-librw_d3d9-oal",
"win-amd64-librw_gl3_glfw-oal",
}
filter { "system:linux" }
@ -88,16 +97,21 @@ workspace "reVC"
filter { "platforms:*librw_d3d9*" }
defines { "RW_D3D9" }
if(not _OPTIONS["with-librw"]) then
libdirs { path.join(Librw, "lib/win-x86-d3d9/%{cfg.buildcfg}") }
libdirs { path.join(Librw, "lib/win-%{getarch(cfg.architecture)}-d3d9/%{cfg.buildcfg}") }
end
filter "platforms:*librw_gl3_glfw*"
defines { "RW_GL3" }
includedirs { path.join(_OPTIONS["glfwdir"], "include") }
includedirs { path.join(_OPTIONS["glewdir"], "include") }
if(not _OPTIONS["with-librw"]) then
libdirs { path.join(Librw, "lib/%{getsys(cfg.system)}-%{getarch(cfg.architecture)}-gl3/%{cfg.buildcfg}") }
end
filter "platforms:*x86-librw_gl3_glfw*"
includedirs { path.join(_OPTIONS["glfwdir32"], "include") }
filter "platforms:*amd64-librw_gl3_glfw*"
includedirs { path.join(_OPTIONS["glfwdir64"], "include") }
filter "platforms:win*librw_gl3_glfw*"
defines { "GLEW_STATIC" }
@ -128,7 +142,7 @@ project "librw"
targetdir "lib/%{cfg.platform}/%{cfg.buildcfg}"
files { path.join(Librw, "src/*.*") }
files { path.join(Librw, "src/*/*.*") }
filter "platforms:*RW33*"
filter "platforms:*RW34*"
flags { "ExcludeFromBuild" }
filter {}
end
@ -206,23 +220,31 @@ project "reVC"
linkoptions "/SAFESEH:NO"
characterset ("MBCS")
targetextension ".exe"
filter "platforms:win*oal"
filter "platforms:win-x86*oal"
includedirs { "openal-soft/include" }
includedirs { "libsndfile/include" }
includedirs { "mpg123/include" }
includedirs { "libsndfile.32/include" }
includedirs { "mpg123.32/include" }
libdirs { "mpg123.32/lib" }
libdirs { "libsndfile32/lib" }
libdirs { "openal-soft/libs/Win32" }
libdirs { "libsndfile/lib" }
libdirs { "mpg123/lib" }
filter "platforms:win-amd64*oal"
includedirs { "openal-soft/include" }
includedirs { "libsndfile.64/include" }
includedirs { "mpg123.64/include" }
libdirs { "mpg123.64/lib" }
libdirs { "libsndfile.64/lib" }
libdirs { "openal-soft/libs/Win64" }
filter "platforms:linux*oal"
links { "openal", "mpg123", "sndfile", "pthread" }
filter "platforms:*RW33*"
filter "platforms:*RW34*"
staticruntime "on"
includedirs { "rwsdk/include/d3d8" }
libdirs { "rwsdk/lib/d3d8/release" }
links { "rwcore", "rpworld", "rpmatfx", "rpskin", "rphanim", "rtbmp", "rtquat", "rtcharse" }
links { "rwcore", "rpworld", "rpmatfx", "rpskin", "rphanim", "rtbmp", "rtquat", "rtanim", "rtcharse", "rpanisot" }
defines { "RWLIBS" }
linkoptions "/SECTION:_rwcseg,ER!W /MERGE:_rwcseg=.text"
@ -236,16 +258,24 @@ project "reVC"
end
links { "rw" }
filter "platforms:*d3d*"
includedirs { "dxsdk/include" }
libdirs { "dxsdk/lib" }
filter "platforms:*d3d9*"
links { "d3d9" }
filter "platforms:win*gl3_glfw*"
filter "platforms:*x86*d3d*"
includedirs { "dxsdk/include" }
libdirs { "dxsdk/lib" }
filter "platforms:*amd64*d3d9*"
defines { "USE_D3D9" }
filter "platforms:win-x86*gl3_glfw*"
libdirs { path.join(_OPTIONS["glewdir"], "lib/Release/Win32") }
libdirs { path.join(_OPTIONS["glfwdir"], "lib-" .. string.gsub(_ACTION or '', "vs", "vc")) }
libdirs { path.join(_OPTIONS["glfwdir32"], "lib-" .. string.gsub(_ACTION or '', "vs", "vc")) }
links { "opengl32", "glew32s", "glfw3" }
filter "platforms:win-amd64*gl3_glfw*"
libdirs { path.join(_OPTIONS["glewdir"], "lib/Release/x64") }
libdirs { path.join(_OPTIONS["glfwdir64"], "lib-" .. string.gsub(_ACTION or '', "vs", "vc")) }
links { "opengl32", "glew32s", "glfw3" }
filter "platforms:linux*gl3_glfw*"

View File

@ -1,793 +0,0 @@
/* If this file is used outside of the core RW SDK,
* the following things need to be defined
*/
#if (!defined(RWASSERT))
#define RWASSERT(_assertval) /* No op */
#endif
#if (!defined(RWFUNCTION))
#define RWFUNCTION(_rwfunctionstring) /* No op */
#endif
#if (!defined(RWRETURN))
#define RWRETURN(_rwreturnval) return(_rwreturnval)
#endif
#if (!defined(RWRETURNVOID))
#define RWRETURNVOID() return
#endif
/* These are used by specular lighting,
* sorry I have to leave them in here... IDBS
* I'll make it neater when I have time.
*/
#if (!defined(FALLOFFAMBIENT))
#define FALLOFFAMBIENT() /* No op */
#endif
#if (!defined(FALLOFFDIRECTIONAL))
#define FALLOFFDIRECTIONAL() /* No op */
#endif
#if (!defined(FALLOFFPOINT))
#define FALLOFFPOINT() /* No op */
#endif
#if (!defined(FALLOFFSPOT))
#define FALLOFFSPOT() /* No op */
#endif
#if (!defined(FALLOFFSOFTSPOT))
#define FALLOFFSOFTSPOT() /* No op */
#endif
/***************************************************************************
_rwApplyAmbientLight
On entry : Instanced data
: Light
: Optional inverse object matrix
: (to transform light to object space)
: Inverse scale of object
: Surface properties of the light
On exit :
*/
static void
_rwApplyAmbientLight(VERTSARG,
const void *voidLight,
const RwMatrix * __RWUNUSED__ inverseMat,
RwReal __RWUNUSED__ invScale,
const RwSurfaceProperties * surfaceProps)
{
CAMVERTDECL;
NUMVERTDECL;
const RpLight *light = (const RpLight *) voidLight;
RwReal scale;
RwV3d vertToLight;
RWFUNCTION(RWSTRING("_rwApplyAmbientLight"));
RWASSERT(light);
RWASSERT(surfaceProps);
CAMVERTINIT();
NUMVERTINIT();
/* No directional component:
* (this is used in CAMVERTADDRGBA in a specular lighting node) */
vertToLight.x = 0;
vertToLight.y = 0;
vertToLight.z = 0;
/* rpLIGHTAMBIENT - Constant illumination on all vertices
*/
if (rwObjectTestPrivateFlags(light, rpLIGHTPRIVATENOCHROMA))
{
scale = 255.0f * light->color.red * surfaceProps->ambient;
/* Ambient light affects all vertices the same */
while (numVert--)
{
RwReal lum = scale;
#undef FALLOFFCALC
#define FALLOFFCALC FALLOFFAMBIENT
CAMVERTADDRGBA(1, 1, 1, 0);
CAMVERTINC();
}
}
else
/* perform for coloured lights */
{
scale = 255.0f * surfaceProps->ambient;
/* Ambient light affects all vertices the same */
while (numVert--)
{
RwReal lum = scale;
#undef FALLOFFCALC
#define FALLOFFCALC FALLOFFAMBIENT
CAMVERTADDRGBA(light->color.red, light->color.green,
light->color.blue, 0);
CAMVERTINC();
}
}
RWRETURNVOID();
}
/***************************************************************************
_rwApplyDirectionalLight
On entry : Instanced data
: Light
: Optional inverse object matrix
: (to transform light to object space)
: Inverse scale of object
: Surface properties of the light
On exit :
*/
static void
_rwApplyDirectionalLight(VERTSARG,
const void *voidLight,
const RwMatrix * inverseMat,
RwReal __RWUNUSED__ invScale,
const RwSurfaceProperties * surfaceProps)
{
OBJCAMVERTDECL;
NUMVERTDECL;
const RpLight *light = (const RpLight *) voidLight;
RwV3d vertToLight;
RwReal scale;
RwReal dot;
RwFrame *lightFrame;
RWFUNCTION(RWSTRING("_rwApplyDirectionalLight"));
RWASSERT(light);
RWASSERT(surfaceProps);
OBJCAMVERTINIT();
NUMVERTINIT();
/* rpLIGHTDIRECTIONAL - Lighting scaled by dot product
* of vertex normal and light lookAt vector.
*/
/* This may not have a frame - we need to check */
lightFrame = RpLightGetFrame(light);
if (lightFrame)
{
vertToLight = RwFrameGetLTM(lightFrame)->at;
/* Transform the light into object space if necessary */
if (inverseMat)
{
RwV3dTransformVectors(&vertToLight, &vertToLight, 1, inverseMat);
_rwV3dNormalize(&vertToLight, &vertToLight);
}
/* Vert TO light */
RwV3dScale(&vertToLight, &vertToLight, -1);
/* Optimise for grey lights? */
if (rwObjectTestPrivateFlags(light, rpLIGHTPRIVATENOCHROMA))
{
/* Use one of the light colour intensities as general intensity */
/* light vector tests are to be identical to others */
scale = 255.0f * light->color.red * surfaceProps->diffuse;
/* Loop through each of the vertices */
while (numVert--)
{
RwV3d objNormal;
OBJVERTGETNORMAL(&objNormal);
/* Calculate angle between vertex normal and light vector */
dot = RwV3dDotProduct(&vertToLight, &objNormal);
/* Ensure vector is facing light,
* don't light areas not facing */
if (dot > 0.0f)
{
RwReal lum = dot * scale;
#undef FALLOFFCALC
#define FALLOFFCALC FALLOFFDIRECTIONAL
CAMVERTADDRGBA(1, 1, 1, 0);
}
/* Next vertex */
OBJCAMVERTINC();
}
}
else
/* perform for coloured lights */
{
scale = 255.0f * surfaceProps->diffuse;
/* Loop through each of the vertices */
while (numVert--)
{
RwV3d objNormal;
OBJVERTGETNORMAL(&objNormal);
/* Calculate angle between vertex normal and light vector */
dot = RwV3dDotProduct(&vertToLight, &objNormal);
/* Ensure vector is facing light,
* don't light areas not facing */
if (dot > 0.0f)
{
RwReal lum = dot * scale;
#define FALLOFFCALC FALLOFFDIRECTIONAL
CAMVERTADDRGBA(light->color.red, light->color.green,
light->color.blue, 0);
}
/* Next vertex */
OBJCAMVERTINC();
}
}
}
RWRETURNVOID();
}
/***************************************************************************
_rwApplyPointLight
On entry : Instanced data
: Light
: Optional inverse object matrix
: (to transform light to object space)
: Inverse scale of object
: Surface properties of the light
On exit :
*/
static void
_rwApplyPointLight(VERTSARG, const void *voidLight,
const RwMatrix * inverseMat,
RwReal invScale, const RwSurfaceProperties * surfaceProps)
{
OBJCAMVERTDECL;
NUMVERTDECL;
const RpLight *light = (const RpLight *) voidLight;
RwReal scale, recipRad;
RwV3d lightPos, vertToLight;
RwReal radSquared;
RWFUNCTION(RWSTRING("_rwApplyPointLight"));
RWASSERT(light);
RWASSERT(surfaceProps);
OBJCAMVERTINIT();
NUMVERTINIT();
/* rpLIGHTPOINT - Linear falloff with distance, scaled by
* dot product of vertex normal and light to vertex vector.
*/
lightPos = RwFrameGetLTM(RpLightGetFrame(light))->pos;
if (inverseMat)
{
RwReal scaledRad;
scaledRad = ((light->radius) * (invScale));
radSquared = ((scaledRad) * (scaledRad));
recipRad = (((RwReal) (1)) / (scaledRad));
/* Transform light into object space */
RwV3dTransformPoints(&lightPos, &lightPos, 1, inverseMat);
}
else
{
radSquared = ((light->radius) * (light->radius));
recipRad = (((RwReal) (1)) / (light->radius));
}
if (rwObjectTestPrivateFlags(light, rpLIGHTPRIVATENOCHROMA))
{
/* The scale encapsulates the common elements to do
* with light intensity and surface lighting properties
*/
scale =
((((RwReal) (255)) * (light->color.red))) *
(surfaceProps->diffuse);
while (numVert--)
{
RwV3d objVertex, objNormal;
RwReal dot, dist2;
OBJVERTGETPOS(&objVertex);
OBJVERTGETNORMAL(&objNormal);
/* Discover the vector between vertex and light and it's length */
RwV3dSub(&vertToLight, &lightPos, &objVertex);
/* Ensure that this vertex is facing the light source */
dot = RwV3dDotProduct(&vertToLight, &objNormal);
if (dot > 0.0f)
{
/* Ensure vertex lies within the light's radius */
dist2 = RwV3dDotProduct(&vertToLight, &vertToLight);
if (dist2 < radSquared)
{
RwReal lum;
RwReal recipDist;
RwReal dist;
rwSqrt(&dist, dist2);
recipDist =
(dist > 0.0f) ? (((RwReal) 1) / dist) : 0.0f;
/*
* The following simplifies down to:
*
* -scale *
* (dot/dist) *
* (1 - dist/lightRadius)
*
* Where
* scale
* takes care of the light intensity and
* diffuse lighting coefficient
* (dot/dist)
* is a normalised dot product of
* light->vertex vector and vertex normal
* (1 - dist/lightRadius)
* is a linear falloff factor
*/
lum = scale * dot * (recipDist - recipRad);
/* Calculate the luminance at vertex */
#undef FALLOFFCALC
#define FALLOFFCALC FALLOFFPOINT
CAMVERTADDRGBA(1, 1, 1, 0);
}
}
OBJCAMVERTINC();
}
}
else
{
scale = (((RwReal) (255)) * (surfaceProps->diffuse));
while (numVert--)
{
RwV3d objVertex, objNormal;
RwReal dot, dist2;
OBJVERTGETPOS(&objVertex);
OBJVERTGETNORMAL(&objNormal);
/* Discover the vector between vertex and light and it's length */
RwV3dSub(&vertToLight, &lightPos, &objVertex);
/* Ensure that this vertex is facing the light source */
dot = RwV3dDotProduct(&vertToLight, &objNormal);
if (dot > 0.0f)
{
dist2 = RwV3dDotProduct(&vertToLight, &vertToLight);
/* Ensure vertex lies within the light's radius */
if (dist2 < radSquared)
{
RwReal lum;
RwReal recipDist;
RwReal dist;
/* Only now calculate the actual length of vector */
rwSqrt(&dist, dist2);
recipDist =
(dist > 0.0f) ? (((RwReal) 1) / dist) : 0.0f;
lum = scale * dot * (recipDist - recipRad);
/* Alter the luminance according to light colour */
#define FALLOFFCALC FALLOFFPOINT
CAMVERTADDRGBA(light->color.red, light->color.green,
light->color.blue, 0);
}
}
/* Next point */
OBJCAMVERTINC();
}
}
RWRETURNVOID();
}
/***************************************************************************
_rwApplySpotLight
On entry : Instanced data
: Light
: Optional inverse object matrix
: (to transform light to object space)
: Inverse scale of object
: Surface properties of the light
On exit :
*/
static void
_rwApplySpotLight(VERTSARG,
const void *voidLight,
const RwMatrix * inverseMat,
RwReal invScale, const RwSurfaceProperties * surfaceProps)
{
OBJCAMVERTDECL;
NUMVERTDECL;
const RpLight *light = (const RpLight *) voidLight;
RwReal recipRad;
RwReal radSquared;
RwV3d lightPos, at;
RWFUNCTION(RWSTRING("_rwApplySpotLight"));
RWASSERT(light);
RWASSERT(surfaceProps);
OBJCAMVERTINIT();
NUMVERTINIT();
/* rpLIGHTSPOT - Linear falloff with distance, cone to restrict
* angle that light has effect, constant intensity across cone,
* scaled by dot product of vertex normal and light to vertex vector.
*/
lightPos = RwFrameGetLTM(RpLightGetFrame(light))->pos;
at = RwFrameGetLTM(RpLightGetFrame(light))->at;
if (inverseMat)
{
RwReal scaledRad;
scaledRad = ((light->radius) * (invScale));
recipRad = (((RwReal) (1)) / (scaledRad));
radSquared = ((scaledRad) * (scaledRad));
/* Transform light into object space */
/* The at is required to ensure within cone */
RwV3dTransformPoints(&lightPos, &lightPos, 1, inverseMat);
RwV3dTransformVectors(&at, &at, 1, inverseMat);
_rwV3dNormalize(&at, &at);
}
else
{
recipRad = (((RwReal) (1)) / (light->radius));
radSquared = ((light->radius) * (light->radius));
}
if (rwObjectTestPrivateFlags(light, rpLIGHTPRIVATENOCHROMA))
{
RwReal scale =
((RwReal) 255) * (light->color.red) * (surfaceProps->diffuse);
while (numVert--)
{
RwV3d vertToLight, objVertex, objNormal;
RwReal dot;
OBJVERTGETPOS(&objVertex);
OBJVERTGETNORMAL(&objNormal);
/* Find the squared distance from light point to vertex */
RwV3dSub(&vertToLight, &lightPos, &objVertex);
/* Ensure that this vertex is facing the light source */
dot = RwV3dDotProduct(&vertToLight, &objNormal);
if (dot > 0.0f)
{
RwReal dist2;
/* Ensure vertex lies within the light's radius */
dist2 = RwV3dDotProduct(&vertToLight, &vertToLight);
if (dist2 < radSquared)
{
RwReal dist;
RwReal compare;
RwReal proj;
rwSqrt(&dist, dist2);
compare = dist * light->minusCosAngle;
proj = RwV3dDotProduct(&vertToLight, &at);
if (proj < compare)
{
RwReal lum;
RwReal recipDist;
/* Get the real distance from the light
* to the vertex (not squared) */
recipDist =
(dist > 0.0f) ? (((RwReal) 1) / dist) : 0.0f;
/* This model is the same as the point source
* inside the cone, zero outside the cone */
lum = scale * dot * (recipDist - recipRad);
#undef FALLOFFCALC
#define FALLOFFCALC FALLOFFSPOT
CAMVERTADDRGBA(1, 1, 1, 0);
}
}
/* Next vertex */
OBJCAMVERTINC();
}
}
}
else
{
RwReal scale =
(((RwReal) (255)) * (surfaceProps->diffuse));
while (numVert--)
{
RwV3d vertToLight, objVertex, objNormal;
RwReal dot;
OBJVERTGETPOS(&objVertex);
OBJVERTGETNORMAL(&objNormal);
/* Find the squared distance from light point to vertex */
RwV3dSub(&vertToLight, &lightPos, &objVertex);
/* Ensure that this vertex is facing the light source */
dot = RwV3dDotProduct(&vertToLight, &objNormal);
if (dot > 0.0f)
{
RwReal dist2;
/* Ensure vertex lies within the light's radius */
dist2 = RwV3dDotProduct(&vertToLight, &vertToLight);
if (dist2 < radSquared)
{
RwReal dist;
RwReal compare;
RwReal proj;
rwSqrt(&dist, dist2);
compare = dist * light->minusCosAngle;
proj = RwV3dDotProduct(&vertToLight, &at);
if (proj < compare)
{
RwReal lum;
RwReal recipDist;
recipDist =
(dist > 0.0f) ? (((RwReal) 1) / dist) : 0.0f;
/* This model is the same as the point source
* inside the cone, zero outside the cone */
lum = scale * dot * (recipDist - recipRad);
/* Introduce the light colours as a
* scaling factor for luminance */
#define FALLOFFCALC FALLOFFSPOT
CAMVERTADDRGBA(light->color.red,
light->color.green, light->color.blue,
0);
}
}
}
/* Next */
OBJCAMVERTINC();
}
}
RWRETURNVOID();
}
/***************************************************************************
_rwApplySpotSoftLight
On entry : Instanced data
: Light
: Optional inverse object matrix
: (to transform light to object space)
: Inverse scale of object
: Surface properties of the light
On exit :
*/
static void
_rwApplySpotSoftLight(VERTSARG, const void *voidLight,
const RwMatrix * inverseMat, RwReal invScale,
const RwSurfaceProperties * surfaceProps)
{
OBJCAMVERTDECL;
NUMVERTDECL;
const RpLight *light = (const RpLight *) voidLight;
RwReal recipRad;
RwReal radSquared;
RwV3d lightPos, at;
RWFUNCTION(RWSTRING("_rwApplySpotSoftLight"));
RWASSERT(light);
RWASSERT(surfaceProps);
OBJCAMVERTINIT();
NUMVERTINIT();
/* rpLIGHTSPOTSOFT - Linear falloff with distance, cone to restrict
* angle that light has effect, falloff to edge of cone, scaled by
* dot product of vertex normal and light to vertex vector.
*/
lightPos = RwFrameGetLTM(RpLightGetFrame(light))->pos;
at = RwFrameGetLTM(RpLightGetFrame(light))->at;
if (inverseMat)
{
RwReal scaledRad;
scaledRad = ((light->radius) * (invScale));
recipRad = (((RwReal) (1)) / (scaledRad));
radSquared = ((scaledRad) * (scaledRad));
/* Transform light into object space */
/* The at is required to ensure within cone */
RwV3dTransformPoints(&lightPos, &lightPos, 1, inverseMat);
RwV3dTransformVectors(&at, &at, 1, inverseMat);
_rwV3dNormalize(&at, &at);
}
else
{
recipRad = 1.0f / light->radius;
radSquared = light->radius * light->radius;
}
if (rwObjectTestPrivateFlags(light, rpLIGHTPRIVATENOCHROMA))
{
RwReal scale =
((RwReal) 255) * (light->color.red) * (surfaceProps->diffuse);
while (numVert--)
{
RwV3d vertToLight, objVertex, objNormal;
RwReal dot;
OBJVERTGETPOS(&objVertex);
OBJVERTGETNORMAL(&objNormal);
/* Find the squared distance from light point to vertex */
RwV3dSub(&vertToLight, &lightPos, &objVertex);
/* Ensure that this vertex is facing the light source */
dot = RwV3dDotProduct(&vertToLight, &objNormal);
if (dot > 0.0f)
{
RwReal dist2;
/* Ensure vertex lies within the light's radius */
dist2 = RwV3dDotProduct(&vertToLight, &vertToLight);
if (dist2 < radSquared)
{
RwReal dist;
RwReal compare;
RwReal proj;
rwSqrt(&dist, dist2);
compare = dist * light->minusCosAngle;
proj = RwV3dDotProduct(&vertToLight, &at);
if (proj < compare)
{
RwReal lum;
RwReal recipDist;
RwReal normalise;
recipDist =
(dist > 0.0f) ? (((RwReal) 1) / dist) : 0.0f;
/* This model is the same as the point source
* inside the cone, zero outside the cone */
lum = scale * dot * (recipDist - recipRad);
/* It has an extra term for quadratic falloff
* across the cone though */
normalise = (dist + compare);
RWASSERT(normalise >= 0.0f);
if (normalise > 0.0f)
{
normalise = (dist + proj) / normalise;
normalise *= normalise;
lum *= (((RwReal) 1) - normalise);
}
#undef FALLOFFCALC
#define FALLOFFCALC FALLOFFSOFTSPOT
CAMVERTADDRGBA(1, 1, 1, 0);
}
}
}
/* Next */
OBJCAMVERTINC();
}
}
else
{
RwReal scale = 255.0f * surfaceProps->diffuse;
while (numVert--)
{
RwV3d vertToLight, objVertex, objNormal;
RwReal dot;
OBJVERTGETPOS(&objVertex);
OBJVERTGETNORMAL(&objNormal);
/* Find the squared distance from light point to vertex */
RwV3dSub(&vertToLight, &lightPos, &objVertex);
/* Ensure that this vertex is facing the light source */
dot = RwV3dDotProduct(&vertToLight, &objNormal);
if (dot > 0.0f)
{
RwReal dist2;
/* Ensure vertex lies within the light's radius */
dist2 = RwV3dDotProduct(&vertToLight, &vertToLight);
if (dist2 < radSquared)
{
RwReal dist;
RwReal compare;
RwReal proj;
rwSqrt(&dist, dist2);
compare = dist * light->minusCosAngle;
proj = RwV3dDotProduct(&vertToLight, &at);
if (proj < compare)
{
RwReal lum;
RwReal normalise;
RwReal recipDist;
/* Get the real distance from the light
* to the vertex (not squared) */
recipDist =
(dist > 0.0f) ? (((RwReal) 1) / dist) : 0.0f;
/* This model is the same as the point source
* inside the cone, zero outside the cone */
lum = scale * dot * (recipDist - recipRad);
/* It has an extra term for quadratic falloff
* across the cone though */
/* It has an extra term for quadratic falloff
* across the cone though */
normalise = (dist + compare);
RWASSERT(normalise >= 0.0f);
if (normalise > 0.0f)
{
normalise = (dist + proj) / normalise;
normalise *= normalise;
lum *= (((RwReal) 1) - normalise);
}
/* Introduce the light colours as a
* scaling factor for luminance */
#undef FALLOFFCALC
#define FALLOFFCALC FALLOFFSOFTSPOT
CAMVERTADDRGBA(light->color.red,
light->color.green,
light->color.blue, 0);
}
}
}
/* Next */
OBJCAMVERTINC();
}
}
RWRETURNVOID();
}

View File

@ -7,7 +7,7 @@
/**
* \defgroup rpanisot RpAnisot
* \ingroup rpplugin
* \ingroup mipmapping
*
* Anisotropic Texture Sampling Plugin for RenderWare Graphics.
*/
@ -22,7 +22,7 @@
* \li \b Plugin \b attachments: \ref RpWorldPluginAttach, \ref RpAnisotPluginAttach
*
* \subsection anisotoverview Overview
* The RpAnisot plugin is used to extend an RwTexture with a maximum
* The RpAnisot plugin is used to extend an \ref RwTexture with a maximum
* anisotropy value that will be used when a particular texture is drawn.
* When textured polygons are viewed nearly edge on, for example when looking
* dowm a road or a football pitch, distant pixels are not sampled very well

View File

@ -139,472 +139,6 @@

View File

@ -31,7 +31,7 @@
/**
* \defgroup rpcollis RpCollision
* \ingroup rpplugin
* \ingroup collisiondetection
*
* Collision Plugin for RenderWare Graphics.
*/
@ -67,12 +67,12 @@ enum RpIntersectType
};
typedef enum RpIntersectType RpIntersectType;
typedef union RpIntersectData RpIntersectData;
/**
* \ingroup rpcollis
* RpIntersectData, this union type is used to specify the parameters
* for an intersection primitive of the desired type (\ref RpIntersectType)
*/
typedef union RpIntersectData RpIntersectData;
union RpIntersectData
{
RwLine line; /**<For type rpINTERSECTLINE */
@ -144,7 +144,6 @@ struct RpCollisionBuildParam
/**
* \ingroup rpcollis
* \typedef RpIntersectionCallBackWorldTriangle
* \ref RpIntersectionCallBackWorldTriangle represents the function called
* from \ref RpCollisionWorldForAllIntersections for all intersections between
* the specified primitive and the static geometry in a given world. This
@ -152,6 +151,10 @@ struct RpCollisionBuildParam
* indicate success. The callback may return NULL to terminate further
* callbacks on the world.
*
* \note The memory pointed to by collTriangle is stored on the stack.
* This memory should be considered volatile. To use this data outside
* of the iterator, copy the contents.
*
* \param intersection Pointer to the intersection primitive.
* \param sector Pointer to the world sector containing the triangle.
* \param collTriangle Pointer to the \ref RpCollisionTriangle representing
@ -181,7 +184,6 @@ typedef RpCollisionTriangle *(*RpIntersectionCallBackWorldTriangle)
/**
* \ingroup rpcollis
* \typedef RpIntersectionCallBackAtomic
* \ref RpIntersectionCallBackAtomic represents the function called from
* \ref RpWorldForAllAtomicIntersections for all intersections between the
* specified primitive and collision atomics in a given world. This function
@ -215,7 +217,6 @@ typedef RpAtomic *(*RpIntersectionCallBackAtomic)
/**
* \ingroup rpcollis
* \typedef RpIntersectionCallBackWorldSector
* \ref RpIntersectionCallBackWorldSector represents the function called from
* \ref RpWorldForAllWorldSectorIntersections for all intersections between the
* specified primitive and world sectors in a given world. This function should
@ -234,7 +235,6 @@ typedef RpWorldSector *(*RpIntersectionCallBackWorldSector)
/**
* \ingroup rpcollis
* \typedef RpIntersectionCallBackGeometryTriangle
* \ref RpIntersectionCallBackGeometryTriangle represents the function called
* from \ref RpAtomicForAllIntersections and
* \ref RpCollisionGeometryForAllIntersections

View File

@ -137,472 +137,6 @@

View File

@ -1,261 +1,6 @@
/* Doxygen Core Library groups */
/**
* \defgroup rwcore Core Library
*
* Core Library
*/
/**
* \defgroup datatypes Data Types
* \ingroup rwcore
*
* Basic Data Types
*/
#ifndef RWPLCORE
/**
* \defgroup rwbbox RwBBox
* \ingroup rwcore
*
* Bounding Box
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwcamera RwCamera
* \ingroup rwcore
*
* Cameras define how and what things can be seen. They also define the
* depth and width of the view by the use of clip-planes and the view
* window.
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwcameravertex RwCameraVertex
* \ingroup rwcore
*
* Camera space vertex data access
*/
#endif /* RWPLCORE */
/**
* \defgroup rwdebug RwDebug
* \ingroup rwcore
*
* Debug handling
*/
/**
* \defgroup rwengine RwEngine
* \ingroup rwcore
*
* Device handling.
*/
/**
* \defgroup rwerror RwError
* \ingroup rwcore
*
* Error code handling
*/
#ifndef RWPLCORE
/**
* \defgroup rwframe RwFrame
* \ingroup rwcore
*
* Frames define relationships between objects and the world
*/
#endif /* RWPLCORE */
/**
* \defgroup rwfreelist RwFreeList
* \ingroup rwcore
*
* Free lists
*/
#ifndef RWPLCORE
/**
* \defgroup rwimage RwImage
* \ingroup rwcore
*
* Image handling.
*/
#endif /* RWPLCORE */
/**
* \defgroup rwim2d RwIm2D
* \ingroup rwcore
*
* 2D immediate mode support
*/
#ifndef RWPLCORE
/**
* \defgroup rwim2dcameravertex RwIm2DCameraVertex
* \ingroup rwcore
*
* 2D Camera space vertex data access
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwim2dvertex RwIm2DVertex
* \ingroup rwcore
*
* Im2D Vertex data access
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwim3d RwIm3D
* \ingroup rwcore
*
* 3D immediate mode support
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwim3dvertex RwIm3DVertex
* \ingroup rwcore
*
* Im3D Vertex data access
*/
#endif /* RWPLCORE */
/**
* \defgroup rwmatrix RwMatrix
* \ingroup rwcore
*
* Handling binary matrix representations.
*/
/**
* \defgroup rwmem RwMem
* \ingroup rwcore
*
* Memory
*/
#ifndef RWPLCORE
/**
* \defgroup rwobject RwObject
* \ingroup rwcore
*
* object
*/
#endif /* RWPLCORE */
/**
* \defgroup rwos RwOs
* \ingroup rwcore
*
* Operating System
*/
#ifndef RWPLCORE
/**
* \defgroup rwraster RwRaster
* \ingroup rwcore
*
* Image/raster coupling handling.
*/
#endif /* RWPLCORE */
/**
* \defgroup rwrenderstate RwRenderState
* \ingroup rwcore
*
* Render states
*/
/**
* \defgroup rwresources RwResources
* \ingroup rwcore
*
* Resource handling.
* Resources are used to instance objects into.
*/
/**
* \defgroup rwrgba RwRGBA
* \ingroup rwcore
*
* Color space functionality.
*/
/**
* \defgroup rwstream RwStream
* \ingroup rwcore
*
* Stream
*/
#ifndef RWPLCORE
/**
* \defgroup rwtexdict RwTexDictionary
* \ingroup rwcore
*
* Texture Dictionary
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwtexture RwTexture
* \ingroup rwcore
*
* Texture handling.
* Textures are special cases of rasters that can be applied to polygons.
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwv2d RwV2d
* \ingroup rwcore
*
* 2D Vector mathematics.
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwv3d RwV3d
* \ingroup rwcore
*
* 3D Vector mathematics.
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwcorepowerpipe PowerPipe
* \ingroup rwcore
*
* PowerPipe
*/
#endif /* RWPLCORE */
#ifndef RWPLCORE
/**
* \defgroup rwcoregeneric Generic
* \ingroup rwcorepowerpipe
*
* Generic Pipeline
*
*/
#endif /* RWPLCORE */
#ifdef DOXYGEN
#include "doxygen.h"
#endif /* DOXYGEN */
/* These are plugins */
#define rwID_METRICSPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x01)
@ -306,137 +51,10 @@
#define rwID_MULTITEXPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2c)
#define rwID_CHAINPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2d)
#define rwID_TOONPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2e)
#define rwID_PTANKPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2f)
#define rwID_PRTSTDPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x30)
/********************************************************/
/* Doxygen plugin groups. */
#ifndef RWPLCORE
/**
* \defgroup rpplugin Plugins
*
* API Plugins
*
*/
/**
* \defgroup rpworld RpWorld
* \ingroup rpplugin
*
* World handling Plugin
*
* Gives objects context,
* and provides a mechanism for efficient static object rendering.
*/
/********************************************************/
/**
* \defgroup rpworlddatatypes Data Types
* \ingroup rpworld
*
* RpWorld Data types
*/
/**
* \defgroup rpatomic RpAtomic
* \ingroup rpworld
*
* Atomics
*/
/**
* \defgroup rpclump RpClump
* \ingroup rpworld
*
* Clumps
*/
/**
* \defgroup rpgeometry RpGeometry
* \ingroup rpworld
*
* Handling atomic's geometry
*/
/**
* \defgroup rpinterpolator RpInterpolator
* \ingroup rpworld
*
* Interpolators
*/
/**
* \defgroup rplight RpLight
* \ingroup rpworld
*
* Lighting 3D objects.
* Lights are used to illuminate atomics and worlds
*/
/**
* \defgroup rpmaterial RpMaterial
* \ingroup rpworld
*
* Handling surface materials
* Materials describe how things are to appear when rendered
*/
/**
* \defgroup rpmesh RpMesh
* \ingroup rpworld
*
* Provide construction and enumeration facilities for meshes.
*/
/**
* \defgroup rpmorphtarget RpMorphTarget
* \ingroup rpworld
*
* Morph Targets
*/
/**
* \defgroup rpworldsub RpWorld
* \ingroup rpworld
*
* RpWorld sub group
*/
/**
* \defgroup rpworldsector RpWorldSector
* \ingroup rpworld
*
* Handling atomic sectors
*/
/**
* \defgroup rpworldrwcamera RwCamera
* \ingroup rpworld
*
* Cameras
*/
/**
* \defgroup rpworldpowerpipe PowerPipe
* \ingroup rpworld
*
* PowerPipe
*/
/**
* \defgroup rpworldp2generic Generic
* \ingroup rpworldpowerpipe
*
* Generic
*/
#endif /* RWPLCORE */
#define rwID_PTANKPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2f)
#define rwID_PRTSTDPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x30)
#define rwID_PDSPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x31)
#define rwID_PRTADVPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x32)
/* These are toolkits */
#define rwID_CHARSEPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x80)
@ -480,93 +98,9 @@
#define rwID_BARYCENTRIC MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb2)
#define rwID_PITEXDICTIONARYTK MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb3)
#define rwID_TOCTOOLKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb4)
/**********************************************************************/
/* Doxygen Toolkit groups */
/**
* \defgroup rttool Toolkits
*
* API Toolkits
*/
/**
* \defgroup fxpack FXPack
*
* FXPack component group
*/
/**********************************************************************/
/**
* \defgroup platformspecific Platform Specific
*
* Links to all platform specific information in the API Reference can
* be found in this folder.
*/
/**********************************************************************/
/* Index Page definition for API Reference. Don't mess with it unless you know what you're doing. */
#define rwID_TPLTOOLKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb5)
#define rwID_ALTPIPETOOLKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb6)
#define rwID_ANIMTOOLKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb7)
#define rwID_SKINSPLITTOOKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb8)
/**
* \mainpage RenderWare Graphics API Reference
*
* \image html rwglogo.jpg
*
* This document provides an API Reference for release 3.3 of the RenderWare
* Graphics SDK.
*
* You do not have to wait for a major release to obtain a current API
* Reference. An up-to-date API Reference is compiled every week and goes out
* with the weekly build. The footer declares when it was generated.
*
* \section otherdocs Documentation Available
* RenderWare Graphics is supplied with:
*
* - A top-level README.PDF -- If you read nothing else, at least read this!
* - this API Reference
* - the User Guide
* - Artist's documentation (if installed)
* - Examples documentation
* - Maestro documentation
* - Tools documentation
* - White Papers
* - readme.txt files for each of the supplied Examples
*
* \section contactus Contact Us
*
* \subsection csl Criterion Software Ltd.
* For general information about RenderWare e-mail info@csl.com.
*
* \subsection devrels Developer Relations
*
* For information regarding Support please email devrels@csl.com
*
* \subsection sales Sales
*
* For sales information contact: rw-sales@csl.com
*
* \section copyright Copyright Notice
*
* The information in this document is subject to change without notice and does not represent
* a commitment on the part of Criterion Software Ltd. The software described in this document is
* furnished under a license agreement or a non-disclosure agreement. The software may be used or
* copied only in accordance with the terms of the agreement. It is against the law to copy the
* software on any medium except as specifically allowed in the license or non-disclosure agreement.
*
* No part of this documentation may be reproduced or transmitted in any form or by any means for any
* purpose without the express written permis­sion of Criterion Software Ltd.
*
* Copyright © 1993 - 2002 Criterion Software Ltd. All rights reserved.
*
* Canon and RenderWare are registered trademarks of Canon Inc. Nintendo is a registered trademark
* and NINTENDO GAMECUBE a trademark of Nintendo Co., Ltd. Microsoft is a registered trademark and
* Xbox is a trademark of Microsoft Corporation. PlayStation is a registered trademark of Sony Computer
* Entertainment Inc.
*
* All other trademarks mentioned herein are the property of their respective companies.
*
*/

View File

@ -31,7 +31,7 @@
#include <rwcore.h>
#include <rpdbgerr.h>
static const char rcsid[] __RWUNUSED__ = "@@(#)$Id: //RenderWare/RW33Active/dev/rwsdk/src/plcore/rpdbgerr.c#1 $";
static const char rcsid[] __RWUNUSED__ = "@@(#)$Id: rpdbgerr.c,v 1.2 2004/08/31 17:40:34 gtristram Exp $";
#ifdef RWDEBUG

View File

@ -16,8 +16,6 @@
/* Pick up _ASSERTE macro */
#ifdef _XBOX
#include <xtl.h>
#else /* _XBOX */
#include <windows.h>
#endif /* _XBOX */
#if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC))
#define _CRTDBG_MAP_ALLOC
@ -235,6 +233,22 @@ do \
} \
while (0)
#define RWASSERTM(condition, messageArgs) \
do \
{ \
if (!(condition)) \
{ \
RwDebugSendMessage(rwDEBUGASSERT, \
__dbFunctionName, \
RWSTRING(#condition)); \
RwDebugSendMessage(rwDEBUGMESSAGE, \
__dbFunctionName, \
_rwdbsprintf messageArgs); \
} \
RWASSERTE(condition); \
} \
while (0)
#else /* RWDEBUG */
#define RWRETURN(value) return(value)
@ -253,6 +267,7 @@ while (0)
#define RWFUNCTION(name)
#define RWAPIFUNCTION(name)
#define RWASSERT(condition)
#define RWASSERTM(condition, messageArgs)
#define RWMESSAGE(args)
#endif

View File

@ -28,7 +28,7 @@
/**
* \defgroup rpdmorph RpDMorph
* \ingroup rpplugin
* \ingroup deltamorphing
* \file rpdmorph.h
*
* Delta Morphing Plugin for RenderWare Graphics.
@ -153,7 +153,7 @@ RpDMorphTargetGetFlags( RpDMorphTarget *dMorphTarget );
* These functions work at the DMorphAtomic level.
*/
extern RpAtomic *
RpDMorphAtomicInitalize( RpAtomic *atomic );
RpDMorphAtomicInitialize( RpAtomic *atomic );
extern RwReal *
RpDMorphAtomicGetDMorphValues( RpAtomic *atomic );

View File

@ -139,472 +139,6 @@

File diff suppressed because it is too large Load Diff

View File

@ -139,472 +139,6 @@
@ -630,11 +164,6 @@ enum e_rwdb_CriterionHANIM
{
E_RP_HANIM_INTERP_IDINUSE,
E_RP_HANIM_INTERP_BLOCKFULL,
E_RP_HANIM_INTERP_IDUNKNOWN,
e_rwdb_CriterionHANIMLAST = RWFORCEENUMSIZEINT
};

View File

@ -34,7 +34,7 @@
/**
* \defgroup rplodatm RpLODAtomic
* \ingroup rpplugin
* \ingroup scenemanagement
*
* Level of Detail Management Plugin for RenderWare Graphics.
*/
@ -72,6 +72,9 @@ extern "C"
{
#endif /* __cplusplus */
extern void
RpLODAtomicCacheSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern RwBool
RpLODAtomicPluginAttach( void );

View File

@ -142,472 +142,6 @@

View File

@ -33,7 +33,7 @@
/**
* \defgroup rplogo RpLogo
* \ingroup rpplugin
* \ingroup 2dtools
*
* Logo Plugin for RenderWare Graphics.
*/

View File

@ -139,472 +139,6 @@

View File

@ -1,7 +1,7 @@
/**
* \defgroup rpltmap RpLtMap
* \ingroup rpplugin
* \ingroup lighting
*
* Lightmap Plugin for RenderWare Graphics.
*/
@ -17,6 +17,15 @@
#include "rpworld.h"
/* Used during lightmap illumination (sliver triangles are skipped
* (their texels should be filled by dilate()), because their normals
* can't be accurately calculated) */
#define rpLTMAPDEFAULTSLIVERAREATHRESHOLD (0.001f)
/* Used during lightmap UV calculation (polySets may be
* joined on the basis of vertices with equal positions) */
#define rpLTMAPDEFAULTVERTEXWELDTHRESHOLD (0.1f)
#define rpLTMAPDEFAULTLIGHTMAPSIZE 128
#define rpLTMAPMINLIGHTMAPSIZE 16
#define rpLTMAPMAXLIGHTMAPSIZE 512/*?? any better way of determining this ??*/

View File

@ -138,472 +138,6 @@

View File

@ -17,7 +17,7 @@
/**
* \defgroup rpmatfx RpMatFX
* \ingroup rpplugin
* \ingroup materials
*
* Material Effects Plugin for RenderWare Graphics.
*/
@ -58,6 +58,10 @@ extern "C"
#endif /* __cplusplus */
/*--- Plugin functions ------------------------------------------------------*/
extern void
RpMatFXMaterialDataSetFreeListCreateParams( RwInt32 blockSize,
RwInt32 numBlocksToPrealloc );
extern RwBool
RpMatFXPluginAttach( void );

View File

@ -138,472 +138,6 @@

View File

@ -7,9 +7,9 @@
/**
* \defgroup rpmipkl RpMipmapKL
* \ingroup rpplugin
* \ingroup mipmapping
*
* PS2/MipMap KL Value Plugin for RenderWare Graphics.
* PlayStation 2 / MipMap KL Value Plugin for RenderWare Graphics.
*/
#include <rwcore.h>
@ -19,6 +19,28 @@ extern "C"
{
#endif
#if (defined(SKY2_DRVMODEL_H)) || (defined(NULLSKY_DRVMODEL_H))
#define RpMipmapKLTextureSetDefaultK RpSkyTextureSetDefaultMipmapK
#define RpMipmapKLTextureSetDefaultL RpSkyTextureSetDefaultMipmapL
#define RpMipmapKLTextureGetDefaultK RpSkyTextureGetDefaultMipmapK
#define RpMipmapKLTextureGetDefaultL RpSkyTextureGetDefaultMipmapL
#define RpMipmapKLTextureSetK RpSkyTextureSetMipmapK
#define RpMipmapKLTextureSetL RpSkyTextureSetMipmapL
#define RpMipmapKLTextureGetK RpSkyTextureGetMipmapK
#define RpMipmapKLTextureGetL RpSkyTextureGetMipmapL
#define RpMipmapKLPluginAttach() (TRUE)
#else /* (defined(SKY2_DRVMODEL_H)) || (defined(NULLSKY_DRVMODEL_H)) */
extern RwReal RpMipmapKLTextureSetDefaultK(RwReal val);
extern RwUInt32 RpMipmapKLTextureSetDefaultL(RwUInt32 val);
extern RwReal RpMipmapKLTextureGetDefaultK(void);
@ -31,6 +53,8 @@ extern RwUInt32 RpMipmapKLTextureGetL(RwTexture *tex);
extern RwBool RpMipmapKLPluginAttach(void);
#endif /* (defined(SKY2_DRVMODEL_H)) || (defined(NULLSKY_DRVMODEL_H)) */
#ifdef __cplusplus
}
#endif

View File

@ -139,472 +139,6 @@

View File

@ -38,7 +38,7 @@
/**
* \defgroup rpmorph RpMorph
* \ingroup rpplugin
* \ingroup morphing
*
* Morphing Plugin for RenderWare Graphics.
*/
@ -76,7 +76,6 @@ struct RpMorphInterpolator
/**
* \ingroup rpmorph
* \typedef RpMorphGeometryCallBack
* This is the callback function supplied to \ref RpMorphGeometrySetCallBack
* and returned from \ref RpMorphGeometryGetCallBack.
* The supplied function will be passed a pointer to the geometry's parent atomic,

View File

@ -138,472 +138,6 @@

View File

@ -4,7 +4,7 @@
/**
* \defgroup rppatch RpPatch
* \ingroup rpplugin
* \ingroup bezierpatches
*
* Bezier patch library
*
@ -124,7 +124,7 @@
* \ingroup rppatch
* \ref RpPatchMeshFlag
* When creating a \ref RpPatchMesh, these flags can be OR'ed together to
* specify the format along with the \ref rpPATCHMESHTEXCOORDSETS (n) macro
* specify the format along with the \ref rpPATCHMESHTEXCOORDSETS(num) macro
* to specify the number of texture coordinate sets required.
*
* \see RpPatchMeshCreate
@ -220,7 +220,7 @@ typedef struct RpPatchMesh RpPatchMesh;
* The patch mesh should be unlocked with \ref RpPatchMeshUnlock before it is
* added to an \ref RpAtomic with \ref RpPatchAtomicSetPatchMesh.
*
* \see RpPatchMesDefinition
* \see RpPatchMeshDefinition
*/
struct RpPatchMesh
{
@ -278,7 +278,7 @@ struct RpPatchLODRange
/**
* \ingroup rppatch
* \typedef RpPatchLODUserData
* \ref RpPatchLODUserData
* typedef for the user data passed to the \ref RpPatchLODCallBack
* function which calculates the atomics' LOD.
*
@ -289,9 +289,14 @@ typedef void *RpPatchLODUserData;
/**
* \ingroup rppatch
* \typedef RpPatchLODCallBack
* \ref RpPatchLODCallBack
* typedef for the patch atomic LOD calculation function.
*
* \param atomic
* \param userData
*
* \return
*
* \see RpPatchAtomicSetPatchLODCallBack
* \see RpPatchAtomicGetPatchLODCallBack
*/
@ -309,6 +314,13 @@ extern "C"
/*---------------------------------------------------------------------------*
*- Plugin functions -*
*---------------------------------------------------------------------------*/
extern void
RpPatchGeometrySetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern void
RpPatchAtomicSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern RwBool
RpPatchPluginAttach(void);

View File

@ -138,472 +138,6 @@

View File

@ -28,7 +28,7 @@
/**
* \defgroup rpprtstd RpPrtStd
* \ingroup rpplugin
* \ingroup particles
*
* Particle Animation Plugin for RenderWare Graphics.
*/
@ -52,7 +52,7 @@
#define PRTSTD_RSRAND2(_seed) (((RwReal)((RwReal) (_seed) * PRTSTD_SRAND_IMAX) * \
#define PRTSTD_2RSRAND2(_seed) (((RwReal)((RwReal) (_seed) * PRTSTD_SRAND_IMAX) * \
(RwReal)1.0))
/**
@ -84,6 +84,8 @@ enum RpPrtStdEmitterFlags
rpPRTSTDEMITTERFLAGUPDATEPARTICLE = 0x00000020, /**< This indicated if the emitter's particles are updated. */
rpPRTSTDEMITTERFLAGRENDER = 0x00000040, /**< This indicates if the emitter is rendered. */
rpPRTSTDEMITTERFLAGRENDERPARTICLE = 0x00000080, /**< This indicates if the emitter's particles are rendered. */
rpPRTSTDEMITTERFLAGNOBUFFERSWAP = 0x00000100, /**< Internal usage */
rpPRTSTDEMITTERFLAGSTREAMREAD = 0x00000200, /**< Internal usage */
rpPRTSTDEMITTERFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
@ -109,15 +111,12 @@ enum RpPrtStdParticleCallBackCode
rpPRTSTDPARTICLECALLBACKRENDER, /**< Particle render callback */
rpPRTSTDPARTICLECALLBACKCREATE, /**< Particle create callback */
rpPRTSTDPARTICLECALLBACKDESTROY, /**< Particle destroy callback */
rpPRTSTDPARTICLECALLBACKSTREAMREAD, /**< Particle stream input callback */
rpPRTSTDPARTICLECALLBACKSTREAMWRITE, /**< Particle stream outout callback */
rpPRTSTDPARTICLECALLBACKSTREAMGETSIZE, /**< Particle stream get size callback */
rpPRTSTDPARTICLECALLBACKFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
typedef enum RpPrtStdParticleCallBackCode RpPrtStdParticleCallBackCode;
#define rpPRTSTDEMITTERCALLBACKMAX 10
#define rpPRTSTDEMITTERCALLBACKMAX 11
/**
* \ingroup rpprtstd
@ -137,6 +136,7 @@ enum RpPrtStdEmitterCallBackCode
rpPRTSTDEMITTERCALLBACKSTREAMREAD, /**< Emitter stream input callback */
rpPRTSTDEMITTERCALLBACKSTREAMWRITE, /**< Emitter stream output callback */
rpPRTSTDEMITTERCALLBACKSTREAMGETSIZE, /**< Emitter stream get size callback */
rpPRTSTDEMITTERCALLBACKCLONE, /**< Emitter clone callback */
rpPRTSTDEMITTERCALLBACKFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
@ -154,7 +154,7 @@ typedef struct RpPrtStdEmitter RWALIGN(RpPrtStdEmitter, rwMATRIXALIGNMENT);
/**
* \ingroup rpprtstd
* \typedef RpPrtStdEmitterCallBack
* \ref RpPrtStdEmitterCallBack
* \ref RpPrtStdEmitterCallBack represents the function called for processing
* a \ref RpPrtStdEmitter. There can several types of the functions, each performing a
* specific task defined by \ref RpPrtStdEmitterCallBackCode.
@ -172,7 +172,6 @@ typedef RpPrtStdEmitter *
typedef struct RpPrtStdParticleBatch RWALIGN(RpPrtStdParticleBatch, rwMATRIXALIGNMENT);
/**
* \ingroup rpprtstd
* \typedef RpPrtStdParticleCallBack
* \ref RpPrtStdParticleCallBack represents the function called for processing
* a \ref RpPrtStdParticleBatch. There can be several types of the functions, each
* performing a specific task defined by \ref RpPrtStdParticleCallBackCode.
@ -189,7 +188,6 @@ typedef RpPrtStdParticleBatch *
/**
* \ingroup rpprtstd
* \typedef RpPrtStdEmitterCallBackArray
* \ref RpPrtStdEmitterCallBackArray represents a set of callback functions for
* processing a \ref RpPrtStdEmitter. All the functions are of the type \ref
* RpPrtStdEmitterCallBack.
@ -201,7 +199,6 @@ typedef RpPrtStdEmitterCallBack
/**
* \ingroup rpprtstd
* \typedef RpPrtStdParticleCallBackArray
* \ref RpPrtStdParticleCallBackArray represents a set of callback functions for
* processing a \ref RpPrtStdParticleBatch. All the functions are of the type \ref
* RpPrtStdParticleCallBack.
@ -221,7 +218,6 @@ typedef RpPrtStdParticleCallBack
typedef struct RpPrtStdEmitterClass RpPrtStdEmitterClass;
/**
* \ingroup rpprtstd
* \typedef RpPrtStdEClassSetupCallBack
* \ref RpPrtStdEClassSetupCallBack represents the function called for setting up an
* emitter class's set of callback function. The callback function is called
* after an emitter class is streamed in.
@ -237,7 +233,6 @@ typedef RpPrtStdEmitterClass *
typedef struct RpPrtStdParticleClass RpPrtStdParticleClass;
/**
* \ingroup rpprtstd
* \typedef RpPrtStdPClassSetupCallBack
* \ref RpPrtStdPClassSetupCallBack represents the function called for setting up an
* emitter class's set of callback function. The callback function is called
* after an emitter class is streamed in.
@ -273,6 +268,7 @@ struct RpPrtStdPropertyTable
RpPrtStdPropertyTable *next; /**< Internal usage */
RwInt32 id; /**< Property table's id */
RwInt32 refCount; /**< Reference count. Internal usage */
RwInt32 numProp; /**< Number of properties in the table */
RwInt32 maxProp; /**< Internal usage */
@ -295,6 +291,7 @@ struct RpPrtStdEmitterClass
RpPrtStdEmitterClass *next; /**< Internal usage */
RwInt32 id; /**< Emitter class's id */
RwInt32 refCount; /**< Reference count. Internal usage */
RwInt32 objSize; /**< Size of the emitter */
RpPrtStdPropertyTable *propTab; /**< Reference to a table of emitter properties */
@ -316,6 +313,7 @@ struct RpPrtStdParticleClass
RpPrtStdParticleClass *next; /**< Internal usage */
RwInt32 id; /**< Particle class's id */
RwInt32 refCount; /**< Reference count. Internal usage */
RwInt32 objSize; /**< Size of a particle */
RpPrtStdPropertyTable *propTab; /**< Reference to a table of particle properties */
@ -403,7 +401,6 @@ struct RpPrtStdEmitter
#define rpPRTSTDPROPERTYCODEEMITTERSTANDARD 1
#define rpPRTSTDPROPERTYCODEEMITTERPRTCOLOR 2
#define rpPRTSTDPROPERTYCODEEMITTERPRTTEXCOORDS 3
#define rpPRTSTDPROPERTYCODEEMITTERPRTANIMFRAME 4
#define rpPRTSTDPROPERTYCODEEMITTERPRTSIZE 5
#define rpPRTSTDPROPERTYCODEEMITTERPTANK 6
#define rpPRTSTDPROPERTYCODEEMITTERPRTVELOCITY 7
@ -414,7 +411,6 @@ struct RpPrtStdEmitter
#define rpPRTSTDEMITTERDATAFLAGSTANDARD 0x00000001
#define rpPRTSTDEMITTERDATAFLAGPRTCOLOR 0x00000002
#define rpPRTSTDEMITTERDATAFLAGPRTTEXCOORDS 0x00000004
#define rpPRTSTDEMITTERDATAFLAGPRTANIMFRAME 0x00000008
#define rpPRTSTDEMITTERDATAFLAGPRTSIZE 0x00000010
#define rpPRTSTDEMITTERDATAFLAGPTANK 0x00000020
#define rpPRTSTDEMITTERDATAFLAGPRTMATRIX 0x00000040
@ -436,7 +432,7 @@ typedef struct RpPrtStdEmitterStandard RpPrtStdEmitterStandard;
* particles. Once an emitter has reached its maximum number of particles, no further particles are
* emitted until some of the existing particles have died.
*
* Most properties have a bias value to vary the property value. This uses the seed field
* Most properties have a bias value to vary the property's value. This uses the seed field
* to give a degreee of randomness.
*/
struct RpPrtStdEmitterStandard
@ -522,15 +518,6 @@ struct RpPrtStdEmitterPrtTexCoords
prtEndUV1Bias; /**< Particle end bottom right texcoords bias */
};
typedef struct RpPrtStdEmitterPrtAnimFrame RpPrtStdEmitterPrtAnimFrame;
struct RpPrtStdEmitterPrtAnimFrame
{
RwInt32 prtNumFrames;
RwTexCoords *prtAnimFrameTexCoords;
};
typedef struct RpPrtStdEmitterPrtSize RpPrtStdEmitterPrtSize;
/**
@ -550,18 +537,47 @@ struct RpPrtStdEmitterPrtSize
prtEndSizeBias; /**< Particle end size bias */
};
/**
* \ingroup rpprtstd
* A set of flag settings for use in the \ref RpPrtStdEmitterPrtMatrix flag
*/
enum RpPrtStdEmitterPrtMatrixFlags
{
rpPRTSTDEMITTERPRTMTXFLAGSCNSMTX = 0x00000001, /**< Apply the prtCnsMtx matrix to
* each particle if set */
RPPRTSTDEMITTERPRTMTXFLAGSFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
typedef enum RpPrtStdEmitterPrtMatrixFlags RpPrtStdEmitterPrtMatrixFlags;
typedef struct RpPrtStdEmitterPrtMatrix RWALIGN(RpPrtStdEmitterPrtMatrix, rwMATRIXALIGNMENT);
/**
* \ingroup rpprtstd
* \struct RpPrtStdEmitterPrtMatrix
*
* An optional structure to construct a matrix for each particle during emissions. A particle
* can be represented as a single matrix. This gives the particles an orientation rather than
* just a simple position.
*
* This allows transformation to be applied to the particles, such as rotation. If
* \ref rpPRTSTDEMITTERPRTMTXFLAGSCNSMTX is set in the flag, then the prtCnsMatrix is applied to each
* particle during particle update.
*
* If this structure is not present, then it assumes the particles will have just a position
* property.
*/
struct RpPrtStdEmitterPrtMatrix
{
RwMatrix prtCnsMtx;
RwMatrix prtCnsMtx; /**< Transformation matrix to be applied to each particle */
RwV3d prtPosMtxAt,
prtPosMtxAtBias;
RwV3d prtPosMtxUp,
prtPosMtxUpBias;
RwV3d prtPosMtxAt, /**< Particle initial look at vector */
prtPosMtxAtBias; /**< Particle initial look at vector bias */
RwV3d prtPosMtxUp, /**< Particle initial up vector. */
prtPosMtxUpBias; /**< Particle initial up vector bias */
RwInt32 flags;
RwInt32 flags; /**< Particle matrix flag. See \ref RpPrtStdEmitterPrtMatrixFlags */
};
/************************************************************************
@ -584,18 +600,42 @@ enum RpPrtStdPTankPropertyCode
typedef enum RpPrtStdPTankPropertyCode RpPrtStdPTankPropertyCode;
typedef struct RpPrtStdEmitterPTank RpPrtStdEmitterPTank;
/**
* \ingroup rpprtstd
* \struct RpPrtStdEmitterPTank
*
* A structure for storing the data required to create a RpPTank for use
* with the emitter. The structure allows the user to create a RpPTank
* manually.
*/
struct RpPrtStdEmitterPTank
{
RwUInt32 dataFlags,
platFlags,
numPrt,
maxPrt,
updateFlags,
emitFlags;
RpAtomic *pTank;
RwChar **dataInPtrs,
**dataOutPtrs;
RwInt32 *dataStride;
RwUInt32 dataFlags, /**< Data flag used in RpPTank creation. See
* \ref RpPTankAtomicCreate */
platFlags, /**< Platform flag used in RpPTank creation. See
* \ref RpPTankAtomicCreate */
numPrt, /**< An integer representing the current number of active
* particles */
maxPrt, /**< An integer representing the maxiumum number of particles
* stored in the RpPTank */
updateFlags, /**< A flag representing the properties to be updated by
* the particle emiiter during update. A user may select to
* update some properties manually by unsetting the relevant
* bits in the flag.
* The flag settings are the same as \ref RpPTankDataFlags */
emitFlags; /**< A flag representing the properties to be initialised
* by the particle emitter during particles emission. A user
* may select to initialise some properties manually by
* unsetting the relevant bits in the flag.
* The flag settings are the same as \ref RpPTankDataFlags */
RpAtomic *pTank; /**< Pointer to the RpPTank */
RwChar **dataInPtrs, /**< Internal usage */
**dataOutPtrs; /**< Internal usage */
RwInt32 *dataStride; /**< Internal usage */
RwUInt32 strSrcBlend; /**< Internal usage */
RwUInt32 strDstBlend; /**< Internal usage */
RwBool strVtxABlend; /**< Internal usage */
};
/************************************************************************
@ -608,7 +648,6 @@ struct RpPrtStdEmitterPTank
#define rpPRTSTDPROPERTYCODEPARTICLEPOSITION 1
#define rpPRTSTDPROPERTYCODEPARTICLECOLOR 2
#define rpPRTSTDPROPERTYCODEPARTICLETEXCOORDS 3
#define rpPRTSTDPROPERTYCODEPARTICLEANIMFRAME 4
#define rpPRTSTDPROPERTYCODEPARTICLESIZE 5
#define rpPRTSTDPROPERTYCODEPARTICLEVELOCITY 6
#define rpPRTSTDPROPERTYCODEPARTICLEMATRIX 7
@ -619,7 +658,6 @@ struct RpPrtStdEmitterPTank
#define rpPRTSTDPARTICLEDATAFLAGPOSITION 0x00000002
#define rpPRTSTDPARTICLEDATAFLAGCOLOR 0x00000004
#define rpPRTSTDPARTICLEDATAFLAGTEXCOORDS 0x00000008
#define rpPRTSTDPARTICLEDATAFLAGANIMFRAME 0x00000010
#define rpPRTSTDPARTICLEDATAFLAGSIZE 0x00000020
#define rpPRTSTDPARTICLEDATAFLAGVELOCITY 0x00000040
#define rpPRTSTDPARTICLEDATAFLAGMATRIX 0x00000080
@ -675,15 +713,6 @@ struct RpPrtStdParticleTexCoords
deltaUV1; /**< Particle's bottom right texcoords rate of change */
};
typedef struct RpPrtStdParticleAnimFrame RpPrtStdParticleAnimFrame;
struct RpPrtStdParticleAnimFrame
{
RwInt32 frame;
RwReal delta;
};
typedef struct RpPrtStdParticleSize RpPrtStdParticleSize;
/**
@ -714,10 +743,13 @@ extern "C"
/************************************************************************/
extern RwBool
RpParticleStandardPluginAttach( void );
RpPrtStdPluginAttach( void );
/************************************************************************/
extern RwBool
RpAtomicIsParticleEmitter(RpAtomic *atomic);
extern RpAtomic *
RpPrtStdAtomicCreate(RpPrtStdEmitterClass *eClass, void *data);
@ -749,6 +781,9 @@ RpPrtStdEmitterCreate(RpPrtStdEmitterClass *eClass);
extern RwBool
RpPrtStdEmitterDestroy(RpPrtStdEmitter *emt);
extern RpPrtStdEmitter *
RpPrtStdEmitterClone(RpPrtStdEmitter *emt);
extern RpPrtStdEmitter *
RpPrtStdEmitterForAllParticleBatch(RpPrtStdEmitter *emt,
RpPrtStdParticleCallBack callback,
@ -835,7 +870,6 @@ RpPrtStdPropTabStreamWrite(RpPrtStdPropertyTable *eClass,
extern RwInt32
RpPrtStdPropTabStreamGetSize(RpPrtStdPropertyTable *eClass);
/************************************************************************/
extern RwBool
@ -941,6 +975,11 @@ RpPrtStdGlobalDataStreamWrite(RwStream *stream);
extern RwInt32
RpPrtStdGlobalDataStreamGetSize( void );
extern void
RpPrtStdGlobalDataSetStreamEmbedded( RwBool embedded );
extern RwBool
RpPrtStdGlobalDataGetStreamEmbedded( void );
/************************************************************************/
@ -963,10 +1002,18 @@ extern RpPrtStdEmitter *
RpPrtStdEmitterStdEmitCB(RpAtomic *atomic,
RpPrtStdEmitter *emt, void *data);
extern RpPrtStdEmitter *
RpPrtStdEmitterStdCloneCB(RpAtomic *atomic,
RpPrtStdEmitter *emt, void *data);
extern RpPrtStdEmitter *
RpPrtStdEmitterStdCreateCB(RpAtomic *atomic,
RpPrtStdEmitter *emt, void *data);
extern RpPrtStdEmitter *
RpPrtStdEmitterStdDestroyCB(RpAtomic *atomic,
RpPrtStdEmitter *emt, void *data);
extern RpPrtStdEmitter *
RpPrtStdEmitterStdBeginUpdateCB(RpAtomic *atomic,
RpPrtStdEmitter *emt, void *data);

View File

@ -160,480 +160,14 @@
enum e_rwdb_CriterionParticleStandard
enum e_rwdb_CriterionPrtStandard
{
e_rwdb_CriterionParticleStandardLAST = RWFORCEENUMSIZEINT
e_rwdb_CriterionPrtStandardLAST = RWFORCEENUMSIZEINT
};
typedef enum e_rwdb_CriterionParticleStandard e_rwdb_CriterionParticleStandard;
typedef enum e_rwdb_CriterionPrtStandard e_rwdb_CriterionPrtStandard;

View File

@ -13,12 +13,13 @@
/**
* \defgroup rpptank RpPTank
* \ingroup rpplugin
* \ingroup particles
*
* PTank Plugin for RenderWare.
*/
/*--- Include files ---*/
#include <string.h>
#include "rwcore.h"
@ -139,7 +140,7 @@ enum RpPTankInstanceFlags
rpPTANKIFLAGCENTER = ((int)0x01000000), /**<Center position changed*/
/* free = ((int)0x04000000), */
/* free = ((int)0x08000000), */
/* free = ((int)0x10000000), */
rpPTANKIFLAGALPHABLENDING = ((int)0x10000000), /**<Internal Use*/
rpPTANKIFLAGALL = ((int)0xFFFFFFFF),
RPPTANKINSTANCEFLAGSFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
@ -244,20 +245,22 @@ extern const RwInt32 datasize[];
/**
* \ingroup rpptank
* \typedef rpptankAllocCallBack
* \ref RpPTankAllocCallBack
*
* ...
*/
typedef void *(* rpPTankAllocCallBack)(RpPTankData *ptankGlobal,
typedef void *(* RpPTankAllocCallBack)(RpPTankData *ptankGlobal,
RwInt32 maxPCount,
RwUInt32 dataFlags,
RwUInt32 platFlags);
/**
* \ingroup rpptank
* \typedef rpPTankCreateCallBack
* \ref RpPTankCreateCallBack
*
* ...
*/
typedef RwBool (* rpPTankCreateCallBack)(RpAtomic *atomic,
typedef RwBool (* RpPTankCreateCallBack)(RpAtomic *atomic,
RpPTankData *ptankGlobal,
RwInt32 maxPCount,
RwUInt32 dataFlags,
@ -265,37 +268,37 @@ typedef RwBool (* rpPTankCreateCallBack)(RpAtomic *atomic,
/**
* \ingroup rpptank
* \typedef rpPTankInstanceCallBack
* \ref RpPTankInstanceCallBack
* ...
*/
typedef RwBool (* rpPTankInstanceCallBack)(RpAtomic *atomic,
typedef RwBool (* RpPTankInstanceCallBack)(RpAtomic *atomic,
RpPTankData *ptankGlobal,
RwInt32 actPCount,
RwUInt32 instFlags);
/**
* \ingroup rpptank
* \typedef rpPTankRenderCallBack
* \ref RpPTankRenderCallBack
* ...
*/
typedef RwBool (* rpPTankRenderCallBack)(RpAtomic *atomic,
typedef RwBool (* RpPTankRenderCallBack)(RpAtomic *atomic,
RpPTankData *ptankGlobal,
RwInt32 actPCount);
typedef struct rpPTankCallBacks rpPTankCallBacks;
typedef struct RpPTankCallBacks RpPTankCallBacks;
struct rpPTankCallBacks
struct RpPTankCallBacks
{
rpPTankAllocCallBack alloc;
rpPTankCreateCallBack create;
rpPTankInstanceCallBack instance;
rpPTankRenderCallBack render;
RpPTankAllocCallBack alloc;
RpPTankCreateCallBack create;
RpPTankInstanceCallBack instance;
RpPTankRenderCallBack render;
};
/* private typedefs */
typedef struct rpPTANKInstanceSetupData rpPTANKInstanceSetupData;
typedef struct RpPTANKInstanceSetupData RpPTANKInstanceSetupData;
struct rpPTANKInstanceSetupData
struct RpPTANKInstanceSetupData
{
RwBool instancePositions;
RwBool instanceUVs;
@ -312,27 +315,27 @@ struct rpPTANKInstanceSetupData
};
typedef void (* rpPTankGENInstancePosCallback)(
typedef void (* RpPTankGENInstancePosCallback)(
RpPTankLockStruct *dstCluster,
RwV3d *right,
RwV3d *up,
RwInt32 pCount,
RpPTankData *ptankGlobal);
typedef void (* rpPTankGENInstanceCallback)(
typedef void (* RpPTankGENInstanceCallback)(
RpPTankLockStruct *dstCluster,
RwInt32 pCount,
RpPTankData *ptankGlobal);
typedef void (* rpPTankGENInstanceSetupCallback)(
rpPTANKInstanceSetupData *data,
typedef void (* RpPTankGENInstanceSetupCallback)(
RpPTANKInstanceSetupData *data,
RpAtomic *atomic,
RpPTankData *ptankGlobal,
RwInt32 actPCount,
RwUInt32 instFlags);
typedef void (* rpPTankGENInstanceEndingCallback)(
rpPTANKInstanceSetupData *data,
typedef void (* RpPTankGENInstanceEndingCallback)(
RpPTANKInstanceSetupData *data,
RpAtomic *atomic,
RpPTankData *ptankGlobal,
RwInt32 actPCount,
@ -351,15 +354,15 @@ struct RpPTankAtomicExtPrv
/* Rendering callback */
RpAtomicCallBackRender defaultRenderCB;
rpPTankCallBacks ptankCallBacks;
RpPTankCallBacks ptankCallBacks;
/* Instancing CallBacks */
rpPTankGENInstanceSetupCallback insSetupCB;
rpPTankGENInstancePosCallback insPosCB;
rpPTankGENInstanceCallback insUVCB;
rpPTankGENInstanceCallback insColorsCB;
rpPTankGENInstanceCallback insNormalsCB;
rpPTankGENInstanceEndingCallback insEndingCB;
RpPTankGENInstanceSetupCallback insSetupCB;
RpPTankGENInstancePosCallback insPosCB;
RpPTankGENInstanceCallback insUVCB;
RpPTankGENInstanceCallback insColorsCB;
RpPTankGENInstanceCallback insNormalsCB;
RpPTankGENInstanceEndingCallback insEndingCB;
RwUInt32 lockFlags;
RwUInt32 instFlags;
@ -390,7 +393,6 @@ extern RwInt32 _rpPTankGlobalsOffset; /* Offset in RwEngine */
#endif
extern RwBool
RpPTankPluginAttach(void);
@ -523,7 +525,7 @@ MACRO_START\
RPATOMICPTANKPLUGINDATA(atm_)->publicData.cColor = *col_;\
if( RpGeometryGetMaterial(RpAtomicGetGeometry(atm_),0) )\
{\
RpMaterialSetColor(\
(void)RpMaterialSetColor(\
RpGeometryGetMaterial(RpAtomicGetGeometry(atm_),0),\
&RPATOMICPTANKPLUGINDATA(atm_)->publicData.cColor);\
}\
@ -759,6 +761,14 @@ extern RpAtomic *
RpPTankAtomicUnlock(RpAtomic *atomic);
/*
* Stealth functions *********************************************************
*/
RpAtomic*
_rpPTankAtomicCreateCustom(RwInt32 maxParticleNum,
RwUInt32 dataFlags, RwUInt32 platFlags,
RpPTankCallBacks *callbacks);
#ifdef __cplusplus
}
#endif /* __cplusplus */
@ -767,6 +777,41 @@ RpPTankAtomicUnlock(RpAtomic *atomic);
/*---- start: c:/daily/rwsdk/plugin/ptank/d3d8/ptankplatform.h----*/
/**
* \defgroup rpptankd3d8 D3D8
* \ingroup rpptank
*
* D3D8 specific documentation.
*/
/**
* \ingroup rpptankd3d8
* \par D3D8 specific data flags
*
* <ul>
* <li> rpPTANKD3D8FLAGSUSEPOINTSPRITES selects the D3D8 optimized pipeline. At the
* moment, this pipeline use point sprites when the hardware supports them,
* which don't allow use of all the PTank flags. Only the following flags are
* supported when using the D3D8 optimized pipes:
*
* <ul>
* <li> rpPTANKDFLAGPOSITION
* <li> rpPTANKDFLAGNORMAL
* <li> rpPTANKDFLAGSIZE (if the hardware supports the D3DFVF_PSIZE vertex format flag)
* <li> rpPTANKDFLAGCOLOR
* <li> rpPTANKDFLAGUSECENTER
* <li> rpPTANKDFLAGARRAY
* <li> rpPTANKDFLAGSTRUCTURE
* </ul>
*
* The texture coordinates are generated by the hardware and can't be specified.
* </ul>
*
* If the hardware does not support point sprites, the default pipeline is used
* instead.
*
*/
enum RpPTankD3D8Flags
{
rpPTANKD3D8FLAGSUSEPOINTSPRITES = 0x00000001,
@ -774,6 +819,8 @@ enum RpPTankD3D8Flags
rpPTANKD3D8FLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
typedef enum RpPTankD3D8Flags RpPTankD3D8Flags;
/*---- end: c:/daily/rwsdk/plugin/ptank/d3d8/ptankplatform.h----*/
#endif /* RPPTANK_H */

View File

@ -143,472 +143,6 @@

View File

@ -32,7 +32,7 @@
/**
* \defgroup rppvs RpPVS
* \ingroup rpplugin
* \ingroup pvs
*
* Geometric Potentially Visible Set Plugin for RenderWare Graphics.
*/
@ -122,11 +122,14 @@ typedef RpWorldSector *(*RpPVSCallBack) (RpWorldSector * worldSector,
#define RpPVSCallback RpPVSCallBack
typedef struct _RpPVSCallBack _RpPVSCallBack;
#if (!defined(DOXYGEN))
struct _RpPVSCallBack
{
RpPVSCallBack callback;
void *data;
};
#endif /* (!defined(DOXYGEN)) */
enum _rpPVSPartitionId
{
@ -145,6 +148,7 @@ typedef struct _rpPVSPolyList *_rpPVSPolyListPtr;
typedef struct _rpPVSPoly _rpPVSPoly;
typedef struct _rpPVSPoly *_rpPVSPolyPtr;
#if (!defined(DOXYGEN))
typedef struct _rpPVSPlaneEq _rpPVSPlaneEq;
struct _rpPVSPlaneEq
{
@ -158,12 +162,13 @@ struct _rpPVSPlaneEq
_rpPVSPartitionId lastresult; /* temp: stores result of last polygon wrt this plane */
};
typedef struct
typedef struct RwV3i RwV3i;
struct RwV3i
{
RwInt32 x;
RwInt32 y;
RwInt32 z;
}RwV3i;
};
typedef struct _rpPVSPolyRecord _rpPVSPolyRecord;
struct _rpPVSPolyRecord
@ -205,47 +210,45 @@ struct _rpPVSPolyList
};
typedef struct RpPVS RpPVS;
struct RpPVS
{
RwInt32 sectorID; /* Id of the sector */
RwInt32 vismaplength; /* Length of vismap */
RwInt32 sampleKey; /* Currently unused, for future use */
RwInt32 sectorID;
RwInt32 vismaplength;
RwInt32 sampleKey;
RpPVSVisMap *vismap;
_rpPVSPolyListPtr sectailpoly; /* Pointer to last polygon in polygons list that is in this sector */
_rpPVSPolyListPtr sectailpoly;
_rpPVSPartitionId potential;
_rpPVSPartitionId potential; /* temp: is sector in out or split from current shadow volume - for heirarchical clip */
RwUInt32 numpols;
RwBBox sbox; /* Bounding box of the sector */
RwBBox gbox; /* Bounding box of the geometry of the sector */
RwReal diagonal; /* Diagonal size of bounding box of the sector */
RwV3d centre; /* Centre of the sector */
RwInt32 axessig[3]; /* sampling significance of the axes of the gbox */
RwBBox sbox;
RwBBox gbox;
RwReal diagonal;
RwV3d centre;
RwInt32 axessig[3];
};
typedef struct RpPVSCache RpPVSCache;
struct RpPVSCache
{
RwBool processed; /* flag to indicate exisiting PVS data for the world */
RwBool formatted; /* flag to indicate exisiting intermediate polygonal data for PVS generation */
RwBool processed;
RwBool formatted;
RwInt32 NumWorldSectors;
/* stats collection */
RwInt32 ptotal;
RwInt32 paccept;
/* pipeline hooking */
RwBool hooked;
/* used during vismap allocation */
RwUInt32 nextID;
RwInt32 viscount;
/* Used during construction */
RpPVSProgressCallBack progressCallBack;
_rpPVSPolyListPtr polygons; /* A copy of the input data set of all world polygons */
_rpPVSPolyListPtr polygons;
RpWorldSectorCallBackRender renderCallBack;
};
@ -255,23 +258,23 @@ struct RpPVSGlobalVars
{
RpWorld *World;
RwInt32 worldOffset; /* Offset into global data */
RwInt32 sectorOffset; /* Offset into global data */
RwInt32 worldOffset;
RwInt32 sectorOffset;
RwBool collis; /* Collision detection */
RwBool bfc; /* Backface culling */
RwBool collis;
RwBool bfc;
RwInt32 NumWorldSectors;
RwInt32 progress_count;
RwReal diagonal;
RwReal gran;
RwInt32 InSector; /* Current sector id */
RwV3d ViewPos; /* Current view pos */
RpPVS *CurrPVS; /* Current PVS sector */
RwInt32 InSector;
RwV3d ViewPos;
RpPVS *CurrPVS;
};
#endif /* (!defined(DOXYGEN)) */
/****************************************************************************

View File

@ -140,472 +140,6 @@

View File

@ -28,7 +28,7 @@
/**
* \defgroup rprandom RpRandom
* \ingroup rpplugin
* \ingroup mathtools
*
* Random Number Generation Plugin for RenderWare Graphics.
*/

View File

@ -138,472 +138,6 @@

View File

@ -4,7 +4,7 @@
/**
* \defgroup rpskin RpSkin
* \ingroup rpplugin
* \ingroup skinning
*
* Skin Plugin for RenderWare Graphics.
*/
@ -48,7 +48,7 @@ struct RwMatrixWeights
/**
* \ingroup rpskin
* \typedef RpSkin
* \struct RpSkin
*
* Skin object. This should be considered an opaque type.
* Use the RpSkin API functions to access.
@ -69,6 +69,9 @@ extern "C"
/*---------------------------------------------------------------------------*
*- Plugin functions -*
*---------------------------------------------------------------------------*/
extern void RpSkinSetFreeListCreateParams(
RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern RwBool
RpSkinPluginAttach(void);
@ -114,6 +117,9 @@ RpSkinGetVertexBoneIndices( RpSkin *skin );
extern const RwMatrix *
RpSkinGetSkinToBoneMatrices( RpSkin *skin );
extern RwBool
RpSkinIsSplit( RpSkin *skin );
/*---------------------------------------------------------------------------*
*- Skin pipeline -*
*---------------------------------------------------------------------------*/
@ -131,7 +137,6 @@ enum RpSkinType
rpSKINTYPEGENERIC = 1, /**<Generic skin rendering. */
rpSKINTYPEMATFX = 2, /**<Material effects skin rendering. */
rpSKINTYPETOON = 3, /**<Toon skin rendering. */
rpSKINTYPEMATFXTOON = 4, /**<Note Toon + MatFX on same object NOT currently supported */
rpSKINTYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
typedef enum RpSkinType RpSkinType;
@ -143,6 +148,32 @@ RpSkinAtomicSetType( RpAtomic *atomic,
extern RpSkinType
RpSkinAtomicGetType( RpAtomic *atomic );
/*---------------------------------------------------------------------------*
*- Internal API -*
*---------------------------------------------------------------------------*/
extern RpGeometry *
_rpSkinInitialize(RpGeometry *geometry);
extern RpGeometry *
_rpSkinDeinitialize(RpGeometry *geometry);
extern RwUInt8 *
_rpSkinGetMeshBoneRemapIndices( RpSkin *skin );
extern RwUInt8 *
_rpSkinGetMeshBoneRLECount( RpSkin *skin );
extern RwUInt8 *
_rpSkinGetMeshBoneRLE( RpSkin *skin );
extern RpSkin *
_rpSkinSplitDataCreate( RpSkin *skin, RwUInt32 boneLimit,
RwUInt32 numMatrices, RwUInt32 numMeshes,
RwUInt32 numRLE );
extern RwBool
_rpSkinSplitDataDestroy( RpSkin *skin );
/*---------------------------------------------------------------------------*/
#ifdef __cplusplus
@ -167,6 +198,29 @@ RpSkinAtomicGetType( RpAtomic *atomic );
* D3D8 skin pipeline extension.
*/
/**
* \defgroup rpskind3d8features Features
* \ingroup rpskind3d8
*
* D3D8 skin pipeline features.
*/
/**
* \defgroup rpskind3d8restrictions Restrictions
* \ingroup rpskind3d8
*
* D3D8 skin pipeline restrictions.
*/
/**
* \defgroup rpskinbonelimit Bone limit
* \ingroup rpskind3d8restrictions
*
* \par Bone limit
* The bone limit is 256 as skinning is performed on the CPU.
*
*/
/*===========================================================================*
*--- D3D8 Defines -----------------------------------------------------------*

View File

@ -138,472 +138,6 @@

View File

@ -39,7 +39,7 @@
/**
* \defgroup rpspline RpSpline
* \ingroup rpplugin
* \ingroup mathtools
*
* Spline Plugin for RenderWare Graphics.
*/

View File

@ -138,472 +138,6 @@

View File

@ -1,141 +0,0 @@
/*
* Stereo camera plugin
*/
/**********************************************************************
*
* File : rpstereo.h
*
* Abstract : Add Stereo Camera support to RenderWare
*
**********************************************************************
*
* This file is a product of Criterion Software Ltd.
*
* This file is provided as is with no warranties of any kind and is
* provided without any obligation on Criterion Software Ltd. or
* Canon Inc. to assist in its use or modification.
*
* Criterion Software Ltd. will not, under any
* circumstances, be liable for any lost revenue or other damages arising
* from the use of this file.
*
* Copyright (c) 1998 Criterion Software Ltd.
* All Rights Reserved.
*
* RenderWare is a trademark of Canon Inc.
*
************************************************************************/
#ifndef RPSTEREO_H
#define RPSTEREO_H
/**
* \defgroup rpstereo RpStereo
* \ingroup rpplugin
*
* Stereo Camera Plugin for RenderWare Graphics.
*/
/*--- Include files ---*/
#include <rwcore.h>
#include <rpworld.h>
#include "rpstereo.rpe" /* automatically generated header file */
/*--- Global Structures ---*/
/* Supported Stereo Modes */
/**
* \ingroup rpstereo
* \ref RpStereoCameraMode
* Stereo camera mode enumeration.
*/
enum RpStereoCameraMode
{
rpNASTEREOMODE = 0,
rpSTEREOMONO, /**< Render as Mono camera - single
* image
*/
rpSTEREOLEFTRIGHT, /**< Vertical split screen. Left eye
* image on left of screen. Right eye
* image on right of screen.
*/
rpSTEREORIGHTLEFT, /**< Vertical split screen. Right eye
* image on left of screen. Left eye image
* on right of screen.
*/
rpSTEREOROTATE90, /**< As for rpSTEREOLEFTRIGHT - with
* the images rotated inwards by 90 degrees
*/
rpSTEREOINTERLACEDLEFTRIGHT, /**< Left and right eye images on
* alternate scanlines. The left eye image
* on the topmost line of the display.
*/
rpSTEREOINTERLACEDRIGHTLEFT, /**< Left and right eye images on
* alternate scanlines. The right eye
* image is on the topmost line of the
* display.
*/
rpSTEREOLASTMODE,
rpSTEREOCAMERAMODEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
/*
* typedef for stereo camera mode enumeration.
*/
typedef enum RpStereoCameraMode RpStereoCameraMode;
/*--- Constants ---*/
/* These may be used to quickly adapt an existing application to a
* stereo version.
*/
#ifdef RPSTEREO_OVERLOAD
#define RwCameraBeginUpdate RpStereoCameraBeginUpdate
#define RwCameraEndUpdate RpStereoCameraEndUpdate
#undef RpWorldRender
#define RpWorldRender RpStereoWorldRender
#undef RpClumpRender
#define RpClumpRender RpStereoClumpRender
#undef RpAtomicRender
#define RpAtomicRender RpStereoAtomicRender
#undef RpWorldSectorRender
#define RpWorldSectorRender RpStereoWorldSectorRender
#endif
/*--- Plugin API Functions ---*/
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
RwBool RpStereoPluginAttach(void);
RpWorld *RpStereoWorldRender(RpWorld *world);
RpClump *RpStereoClumpRender(RpClump *clump);
RpAtomic *RpStereoAtomicRender(RpAtomic *atomic);
RpWorldSector *RpStereoWorldSectorRender(RpWorldSector *sector);
RwCamera *RpStereoCameraBeginUpdate(RwCamera *camera);
RwCamera *RpStereoCameraEndUpdate(RwCamera *stereoCam);
RwReal RpStereoCameraGetSeparation(RwCamera *stereoCam);
RwReal RpStereoCameraGetFocal(RwCamera *stereoCam);
RpStereoCameraMode RpStereoCameraGetMode(RwCamera *stereoCam);
RwCamera *RpStereoCameraSetSeparation(RwCamera *stereoCam, RwReal dist);
RwCamera *RpStereoCameraSetFocal(RwCamera *stereoCam, RwReal focal);
RwCamera *RpStereoCameraSetMode(RwCamera *stereoCam, RpStereoCameraMode newMode);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* RPSTEREO_H */

View File

@ -1,641 +0,0 @@
enum e_rwdb_CriterionStereo
{
E_RP_STEREO_INVMODE,
E_RP_STEREO_INVFOCAL,
e_rwdb_CriterionStereoLAST = RWFORCEENUMSIZEINT
};
typedef enum e_rwdb_CriterionStereo e_rwdb_CriterionStereo;

View File

@ -3,7 +3,7 @@
/**
* \defgroup rpuserdata RpUserData
* \ingroup rpplugin
* \ingroup scenemanagement
*
* User Data Plugin for RenderWare Graphics.
*/

View File

@ -139,472 +139,6 @@

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,7 @@
/**
* \defgroup rt2d Rt2d
* \ingroup rttool
* \ingroup 2dtools
*
* 2D Rendering Toolkit for RenderWare.
*/
@ -117,6 +117,7 @@
Includes
*/
#include "rpworld.h"
#include "rt2d.rpe" /* automatically generated header file */
/****************************************************************************
@ -132,6 +133,13 @@
#define Rt2dCTMReadMacro(_result) \
(RwMatrixCopy((_result), _rt2dCTMGet()), (_result))
#if defined (GCN_DRVMODEL_H)
#define VERTEXCACHESIZE 64
#else
#define VERTEXCACHESIZE 256
#endif
/****************************************************************************
Global Types
*/
@ -152,16 +160,21 @@ typedef struct rt2dShadeParameters rt2dShadeParameters;
* rt2dShadeParameters
* describes Shade Parameters
*/
#if (!defined(DOXYGEN))
struct rt2dShadeParameters
{
RwRGBAReal col; /* col */
RwV2d uv; /* uv */
};
#endif /* (!defined(DOXYGEN)) */
/**
* \ingroup rt2ddatatypes
* \typedef Rt2dBrush
* typedef for a structure describing a Brush (opaque)
* \struct Rt2dBrush
* Brush object.
* This should be considered an opaque type.
* Use Rt2dBrush API functions to access.
*/
typedef struct Rt2dBrush Rt2dBrush;
@ -169,35 +182,37 @@ typedef struct Rt2dBrush Rt2dBrush;
* Rt2dBrush
* structure describing a Brush
*/
#if defined (GCN_DRVMODEL_H)
#define VERTEXCACHESIZE 64
#else
#define VERTEXCACHESIZE 256
#endif
#if (!defined(DOXYGEN))
struct Rt2dBrush
{
RWIM3DVERTEX vertex[VERTEXCACHESIZE];
rt2dShadeParameters top;
rt2dShadeParameters dtop;
rt2dShadeParameters bottom;
rt2dShadeParameters dbottom;
RwInt32 calcFields;
RwRGBA colorCache;
RwInt32 flag;
RwTexture *texture;
RpMaterial *material;
RwReal halfwidth;
RwInt32 refCount;
};
#endif /* (!defined(DOXYGEN)) */
/**
* \ingroup rt2ddatatypes
* \typedef Rt2dPath
* typedef for a structure describing a Path (opaque)
* \struct Rt2dPath
* Path object.
* This should be considered an opaque type.
* Use Rt2dPath API functions to access.
*/
typedef struct Rt2dPath Rt2dPath;
/**
* \ingroup rt2ddatatypes
* \typedef Rt2dFont
* typedef for a structure describing a Font (opaque)
* \struct Rt2dFont
* Font object.
* This should be considered an opaque type.
* Use Rt2dFont API functions to access.
*/
typedef struct Rt2dFont Rt2dFont;
@ -206,11 +221,6 @@ typedef struct Rt2dFont Rt2dFont;
*/
typedef struct _rt2dFontDictionaryNode _rt2dFontDictionaryNode;
/**
* \ingroup rt2ddatatypes
* \typedef Rt2dBBox
* typedef for a structure describing a Bounding Box
*/
typedef struct Rt2dBBox Rt2dBBox;
/**
@ -228,8 +238,8 @@ struct Rt2dBBox
/**
* \ingroup rt2ddatatypes
* \typedef Rt2dObject
* typedef for a structure describing a 2d Object
* \struct Rt2dObject
* Structure describing a 2d Object
* This should be considered an opaque type.
* Use Rt2dObject, Rt2dScene, Rt2dShape, Rt2dPickRegion or Rt2dObjectString
* API functions to access.
@ -246,6 +256,7 @@ typedef struct _rt2dScene _rt2dScene;
*/
typedef struct _rt2dDepthOfObject _rt2dDepthOfObject;
#if (!defined(DOXYGEN))
/*
* typedef for a structure describing the depth of an object
*/
@ -265,15 +276,47 @@ struct _rt2dScene
RwSList *depths; /* depths for depthsort */
RwBool isDirtyDepths; /* depthsort needs updating */
};
#endif /* (!defined(DOXYGEN)) */
/*
* typedef for a structure describing a shape (opaque)
*/
typedef struct _rt2dShape _rt2dShape;
#if (!defined(DOXYGEN))
typedef struct _rt2dShapeRep _rt2dShapeRep;
struct _rt2dShapeRep
{
RwSList *nodes; /* individual stroked/filled regions of the shape */
RwUInt32 refCount; /* number of shapes referencing this rep */
RpGeometry *geometry; /* Shareable geometry */
};
extern _rt2dShapeRep *
_rt2dShapeRepCreate();
extern RwBool
_rt2dShapeRepDestroy(_rt2dShapeRep *);
extern RwUInt32
_rt2dShapeRepAddRef(_rt2dShapeRep *);
typedef struct _rt2dSceneResourcePool _rt2dSceneResourcePool;
struct _rt2dSceneResourcePool
{
_rt2dShapeRep **shapeReps;
RwUInt32 numShapeReps;
};
extern RwBool
_rt2dSceneResourcePoolFindShapeRep(const _rt2dSceneResourcePool * pool,
const _rt2dShapeRep * rep, RwInt32 * npIndex);
struct _rt2dShape
{
RwSList *nodes; /* individual stroked/filled regions of the shape */
_rt2dShapeRep *rep;
RwRGBA *colorCache; /* Shape's color cache */
RpAtomic *atomic; /* Atomic repn */
};
/*
@ -295,6 +338,7 @@ struct _rt2dPickRegion
/*
* structure describing a renderable text string
*/
struct _rt2dObjectString
{
RwChar *textString; /* Text string to be rendered */
@ -303,6 +347,7 @@ struct _rt2dObjectString
RwReal height; /* Font rendering Height */
_rt2dFontDictionaryNode *font; /* Dictionary node identifying font to be used */
};
#endif /* (!defined(DOXYGEN)) */
/*
* typedef for a renderable string
@ -324,6 +369,7 @@ enum Rt2dObjectTypeEnum {
typedef union _rt2dObjectdata _rt2dObjectdata;
#if (!defined(DOXYGEN))
union _rt2dObjectdata
{
_rt2dShape shape;
@ -335,11 +381,13 @@ union _rt2dObjectdata
/*
* A base structure for forming a hierarchy of 2D shapes
*/
#if (!defined(DOXYGEN))
#define Rt2dObjectIsLocked 0x00000001
#define Rt2dObjectDirtyLTM 0x00000002
#define Rt2dObjectVisible 0x00000004
#define Rt2dObjectIsLocked 0x00000001
#define Rt2dObjectDirtyLTM 0x00000002
#define Rt2dObjectVisible 0x00000004
#define Rt2dObjectDirtyColor 0x00000008
#define Rt2dObjectStringGotNoFonts 0x01000000
struct Rt2dObject
{
@ -357,11 +405,35 @@ struct Rt2dObject
/**
* \ingroup rt2ddatatypes
* \typedef Rt2dObjectCallBack
* typedef for a callback on an object
* \ref Rt2dObjectCallBack
* typedef for a callback on an object in a collection
*
* \param object is a specific object
* \param parent is the containing scene
* \param data is user data
*
* \return return value is ignored
*/
typedef Rt2dObject *(* Rt2dObjectCallBack)(Rt2dObject *object, Rt2dObject *parent, void *data);
/**
* \ingroup rt2ddatatypes
* \ref Rt2dFontCallBackRead
* Rt2dFontCallBackRead represents the function used by Rt2dFontRead to read
* the specified font from a disk file. This function should return a
* pointer to the font to indicate success. The returned font is owned by
* the Rt2d internal font dictionary, and is destroyed on calling
* \ref Rt2dClose
*
* \param name is the name of the font to read
*
* \return return the font if successful, NULL otherwise
*
* \see Rt2dFontSetReadCallBack
* \see Rt2dFontGetReadCallBack
*/
typedef Rt2dFont*(* Rt2dFontCallBackRead)(const RwChar *name);
/**
* \ingroup rt2ddatatypes
* \ref Rt2dJustificationType
@ -381,6 +453,20 @@ enum Rt2dJustificationType
*/
typedef enum Rt2dJustificationType Rt2dJustificationType;
/**
* \ingroup rt2ddatatypes
* \ref Rt2dShapeNodeFlag
* Passed to \ref Rt2dShapeAddNode, these flags specify
* the type and properties of the path.
*/
enum Rt2dShapeNodeFlag
{
rt2dSHAPENODEFLAGNONE = 0x0000,
rt2dSHAPENODEFLAGSOLID = 0x0001, /**< Shape's node is a solid, not outline */
rt2dSHAPENODEFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT /* Ensure sizeof(enum) == sizeof(RwInt32) */
};
#if (! ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ))
#define Rt2dBrushSetWidth(_brush, _width) \
@ -397,7 +483,20 @@ typedef enum Rt2dJustificationType Rt2dJustificationType;
/****************************************************************************
Function prototypes
*/
extern void
Rt2dBrushSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern void
Rt2dFontSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern void
Rt2dFontDictNodeSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern void
Rt2dObjectSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern void
Rt2dPathSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
/*
* INITIALIZE
@ -407,6 +506,13 @@ Rt2dOpen(RwCamera *cam);
extern void
Rt2dClose(void);
extern void
Rt2dTriVertSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern void
Rt2dTriPolySetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
/*
* PATHS
*/
@ -518,6 +624,12 @@ Rt2dFontSetPath(const RwChar *path);
extern Rt2dFont *
Rt2dFontRead(const RwChar *name);
extern RwBool
Rt2dFontSetReadCallBack(Rt2dFontCallBackRead fpCallBack);
extern Rt2dFontCallBackRead
Rt2dFontGetReadCallBack (void);
extern RwUInt32
_rt2dFontStreamGetSize(Rt2dFont *font);
@ -695,6 +807,10 @@ Rt2dObjectIsObjectString(Rt2dObject *object);
extern Rt2dObject *
Rt2dObjectCopy(Rt2dObject *dst, Rt2dObject *src);
/* in-place dst version, destruction not req */
extern Rt2dObject *
_rt2dObjectCopy(Rt2dObject *dst, Rt2dObject *src);
/*
* HIERARCHICAL SCENE FUNCTIONS - SCENE
*/
@ -766,14 +882,8 @@ Rt2dShapeCreate(void);
extern RwBool
Rt2dShapeDestroy(Rt2dObject * shape);
extern Rt2dBrush *
Rt2dShapeGetNewBrush(Rt2dObject *shape);
extern Rt2dPath *
Rt2dShapeGetNewPath(Rt2dObject *shape);
extern Rt2dObject *
Rt2dShapeAddNode(Rt2dObject *shape, Rt2dPath *path, Rt2dBrush *fill, Rt2dBrush *stroke );
Rt2dShapeAddNode(Rt2dObject *shape, RwUInt32 flag, Rt2dPath *path, Rt2dBrush *brush );
extern RwInt32
Rt2dShapeGetNodeCount(Rt2dObject *shape);
@ -792,9 +902,15 @@ Rt2dShapeRender(Rt2dObject *object);
extern Rt2dObject *
Rt2dShapeMorph(Rt2dObject *result,
Rt2dObject *source,
Rt2dObject *destination,
RwReal alpha);
Rt2dObject *source,
Rt2dObject *destination,
RwReal alpha);
extern Rt2dObject *
Rt2dShapeLock(Rt2dObject * shape);
extern Rt2dObject *
Rt2dShapeUnlock(Rt2dObject * shape);
/*
* HIERARCHICAL SCENE FUNCTIONS - PICK REGION
@ -895,6 +1011,7 @@ Rt2dCTMRead(RwMatrix * result);
#endif /* ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) */
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@ -129,472 +129,6 @@
@ -620,6 +154,7 @@ enum e_rwdb_Criterion2D
{
E_RW_FONTNOTFOUND,
e_rwdb_Criterion2DLAST = RWFORCEENUMSIZEINT
};

View File

@ -10,8 +10,8 @@
#define RT2DANIM_H
/**
* \defgroup rt2danim Rt2dAnim
* \ingroup rttool
* \defgroup rt2danim Rt2dAnim (inc. Maestro)
* \ingroup 2dtools
*
* A toolkit to coordinate the display, storage and manipulation of 2D
* animations.
@ -166,101 +166,132 @@ typedef enum Rt2dStringLabelType Rt2dStringLabelType;
/**
* \ingroup rt2danimsub
* \typedef Rt2dAnimProps
* typedef for a structure describing the current state of a scene (opaque)
* \struct Rt2dAnimProps
* Structure describing the current state of a scene.
* This should be considered an opaque type. Use the
* Rt2dAnim API functions to access.
*/
typedef struct Rt2dAnimProps Rt2dAnimProps;
/**
* \ingroup rt2danimsub
* \typedef Rt2dKeyFrameList
* typedef for a structure describing a list of keyframes
* \struct Rt2dKeyFrameList
* Structure describing an entire list of keyframes
* This should be considered an opaque type. Use the
* Rt2dKeyFrameList API functions to access.
*/
typedef struct Rt2dKeyFrameList Rt2dKeyFrameList;
/**
* \ingroup rt2danimsub
* \typedef Rt2dAnimObjectUpdate
* typedef for a structure describing a set of changes to a 2d object (opaque)
* \struct Rt2dKeyFrameSet
* structure describing a set of keyframe actions to be applied to a 2D object.
* This should be considered an opaque type. Use the
* Rt2dAnim API functions to access.
*/
typedef struct Rt2dKeyFrameSet Rt2dKeyFrameSet;
/**
* \ingroup rt2danimsub
* \struct Rt2dAnimObjectUpdate
* Structure describing an unoptimized update to an object
* This should be considered an opaque type. Use the
* Rt2dAnim API functions to access.
*/
typedef struct Rt2dAnimObjectUpdate Rt2dAnimObjectUpdate;
/**
* \ingroup rt2danimsub
* \typedef Rt2dKeyFrameTransform
* typedef for a structure describing a transform change to a 2d object (opaque)
* \struct Rt2dKeyFrameTransform
* Structure describing a transform change to a 2d object.
* This should be considered an opaque type. Use the
* Rt2dAnim API functions to access.
*/
typedef struct Rt2dKeyFrameTransform Rt2dKeyFrameTransform;
/**
* \ingroup rt2danimsub
* \typedef Rt2dKeyFrameColor
* typedef for a structure describing a color change to a 2d object (opaque)
/*
* Typedef for struct Rt2dKeyFrameColor describing a color
* change to a 2d object.
*/
typedef struct Rt2dKeyFrameColor Rt2dKeyFrameColor;
/**
* \ingroup rt2danimsub
* \typedef Rt2dKeyFrameShow
* typedef for a structure describing a displayable or depth change to a 2d object (opaque)
/*
* Structure describing a displayable or depth change to a 2d object.
*/
typedef struct Rt2dKeyFrameShow Rt2dKeyFrameShow;
/**
* \ingroup rt2danimsub
* \typedef Rt2dKeyFrameMorph
* typedef for a structure describing a morph change to a 2d object (opaque)
/*
* Structure describing a morph change to a 2d object.
*/
typedef struct Rt2dKeyFrameMorph Rt2dKeyFrameMorph;
/**
* \ingroup rt2danimsub
* \typedef Rt2dAnim
* typedef for a structure describing a 2d animation (opaque)
* \struct Rt2dAnim
* Structure describing a 2d animation.
* This should be considered an opaque type. Use the
* Rt2dAnim API functions to access.
*/
typedef struct Rt2dAnim Rt2dAnim;
/**
* \ingroup rt2dbutton
* \typedef Rt2dButton
* typedef for a structure describing a button (opaque)
* \struct Rt2dButton
* Structure describing a button.
* This should be considered an opaque type. Use the
* Rt2dButton API functions to access.
*/
typedef struct Rt2dButton Rt2dButton;
/**
* \ingroup rt2dcel
* \typedef Rt2dCel
* typedef for a structure describing a cel (opaque)
* \struct Rt2dCel
* Structure describing a cel.
* This should be considered an opaque type. Use the
* Rt2dCel API functions to access.
*/
typedef struct Rt2dCel Rt2dCel;
/**
* \ingroup rt2dcel
* \typedef Rt2dCelList
* typedef for a structure describing a cel list (opaque)
* \struct Rt2dCelList
* Structure describing a cel list.
* This should be considered an opaque type. Use the
* Rt2dCel API functions to access.
*/
typedef struct Rt2dCelList Rt2dCelList;
/**
* \ingroup rt2dmaestro
* \typedef Rt2dMaestro
* typedef for a structure describing a maestro (opaque)
* \struct Rt2dMaestro
* Structure describing a maestro.
* This should be considered an opaque type. Use the
* Rt2dMaestro API functions to access.
*/
typedef struct Rt2dMaestro Rt2dMaestro;
/**
* \ingroup rt2dmessage
* \typedef Rt2dMessage
* typedef for a structure describing a message (opaque)
/*
* Structure describing a message.
*/
typedef struct Rt2dMessage Rt2dMessage;
/**
* \ingroup rt2dmessage
* \struct Rt2dMessageList
* Structure describing a message.
* This should be considered an opaque type. Use the
* Rt2dMessage API functions to access.
*/
typedef struct Rt2dMessageList Rt2dMessageList;
/**
* \ingroup rt2dstringlabel
* \typedef Rt2dStringLabel
* typedef for a structure describing a string label (opaque)
* \struct Rt2dStringLabel
* Structure used to store and access named data, either internal or user.
* A type and a name may be used to access internal and user data.
*
* This should be considered an opaque type. Use the
* Rt2dStringLabel API functions to access.
*/
typedef struct Rt2dStringLabel Rt2dStringLabel;
@ -277,7 +308,8 @@ struct Rt2dKeyFrameTransform
/**
* \ingroup rt2danimsub
* \struct Rt2dKeyFrameColor
* structure describing a color setting action
* Structure describing a color
* change to a 2d object.
*/
struct Rt2dKeyFrameColor
{
@ -287,7 +319,7 @@ struct Rt2dKeyFrameColor
/**
* \ingroup rt2danimsub
* \struct Rt2dKeyFrameShow
* structure describing a show/hide action
* Structure describing a show/hide change and a depth change to a 2d object.
*/
struct Rt2dKeyFrameShow
{
@ -299,7 +331,7 @@ struct Rt2dKeyFrameShow
/**
* \ingroup rt2danimsub
* \struct Rt2dKeyFrameMorph
* structure describing a morph action
* Structure describing a morph change to a 2d object.
*/
struct Rt2dKeyFrameMorph
{
@ -355,69 +387,73 @@ MACRO_START \
} \
MACRO_STOP
/**
* \ingroup rt2dstringlabel
* \struct Rt2dStringLabel
* structure containing label information. The enitityType identifies the type
/*
* structure containing label information. The entityType identifies the type
* of the label. The label's name is stored as an index
* in common storage area. The entityType and name of the label are used as keys
* during a search. Additional internal and user data can be stored with the
* label.
*/
#if (!defined(DOXYGEN))
struct Rt2dStringLabel
{
RwUInt32 entityType; /**< type of the label
(\ref Rt2dStringLabelType) */
RwInt32 nameIndex; /**< index of name in internal data
RwUInt32 entityType; /* type of the label
(see Rt2dStringLabelType) */
RwInt32 nameIndex; /* index of name in internal data
area */
void *internalData; /**< internal data */
void *userData; /**< customizable data */
void *internalData; /* internal data */
void *userData; /* customizable data */
};
#endif /* (!defined(DOXYGEN)) */
#define _rt2dStringLabelGetStringLabelTypeMacro(_strLabel) \
((_strLabel)->entityType);
((_strLabel)->entityType)
#define _rt2dStringLabelSetStringLabelTypeMacro(_strLabel, _entityType) \
((_strLabel)->entityType = (_entityType));
((_strLabel)->entityType = (_entityType))
#define _rt2dStringLabelGetNameIndexMacro(_strLabel) \
((_strLabel)->nameIndex);
((_strLabel)->nameIndex)
#define _rt2dStringLabelSetNameIndexMacro(_strLabel, _index) \
((_strLabel)->nameIndex = (_index));
((_strLabel)->nameIndex = (_index))
#define _rt2dStringLabelGetInternalDataMacro(_strLabel) \
((_strLabel)->internalData);
((_strLabel)->internalData)
#define _rt2dStringLabelSetInternalDataMacro(_strLabel, _internalData) \
((_strLabel)->internalData = (_internalData));
((_strLabel)->internalData = (_internalData))
#define _rt2dStringLabelGetUserDataMacro(_strLabel) \
((_strLabel)->userData);
((_strLabel)->userData)
#define _rt2dStringLabelSetUserDataMacro(_strLabel, _userData) \
((_strLabel)->userData = (_userData));
((_strLabel)->userData = (_userData))
/**
* \ingroup rt2dcel
* \struct Rt2dCel
/*
* structure containing cel information. The name of the cel is stored as an
* index into a label table. The buttons in the cel are stored as indices. These
* reference a list of buttons held by the cel's parent maestro. Any messages
* reference a list of buttons held by the cel's parent maestro. Any messages
* to be process when the cel is active is stored as index into the parent's
* maestro's message storage area.
*/
#if (!defined(DOXYGEN))
struct Rt2dCel
{
RwInt32 strLabelIndex; /**< Frame label */
RwInt32 celIndex; /**< Frame number */
RwSList *buttonIndices; /**< List of buttons active in
this frame */
RwInt32 messageListIndex; /**< Messages to be posted after
displaying this frame */
RwInt32 strLabelIndex; /* Frame label */
RwInt32 celIndex; /* Frame number */
RwSList *buttonIndices; /* List of buttons active in
this frame */
RwInt32 messageListIndex; /* Messages to be posted after
displaying this frame */
};
#endif /* (!defined(DOXYGEN)) */
#define _rt2dCelGetStringLabelIndexMacro(_cel) \
((_cel)->strLabelIndex);
@ -443,14 +479,16 @@ typedef Rt2dAnim *(*Rt2dAnimCallBack)(Rt2dAnim *object,
void *data);
/**
* \ingroup rt2danimsub
* \typedef Rt2dKeyFrameListCallBack
* \ref Rt2dKeyFrameListCallBack
* This typedef defines a callback function to apply to a frame list.
*
* \param anim Pointer to the animation
* \param props Pointer to the props that the animation acts upon
* \param keyframeList The key frame list
* \param anim Pointer to the animation
* \param props Pointer to the props that the animation acts upon
* \param keyframeList The key frame list
* \param keyframeListTime The key frame list time
* \param data User defined data
* \param data User defined data
*
* \return return value is ignored
*/
typedef Rt2dKeyFrameList *(Rt2dKeyFrameListCallBack)(
Rt2dAnim *anim,
@ -461,12 +499,14 @@ typedef Rt2dKeyFrameList *(Rt2dKeyFrameListCallBack)(
/**
* \ingroup rt2danimsub
* \typedef Rt2dAnimOnEndReachedCallBack
* \ref Rt2dAnimOnEndReachedCallBack
* This typedef defines a callback function called at the end of an animation.
*
* \param anim Pointer to the animation ending
* \param props Pointer to the props that the animation acts upon
* \param anim Pointer to the animation ending
* \param props Pointer to the props that the animation acts upon
* \param remainingDeltaTime Remaining time
*
* \return return value is ignored
*/
typedef Rt2dAnim *(*Rt2dAnimOnEndReachedCallBack)(Rt2dAnim *anim,
Rt2dAnimProps *props,
@ -474,14 +514,14 @@ typedef Rt2dAnim *(*Rt2dAnimOnEndReachedCallBack)(Rt2dAnim *anim,
/**
* \ingroup rt2dmaestro
* \typedef Rt2dMaestroAnimationsCallBack
* \ref Rt2dMaestroAnimationsCallBack
* \ref Rt2dMaestroAnimationsCallBack represents the function called from
* \ref Rt2dMaestroForAllAnimations for all animations in the maestro.
* This function
* should return the current maestro to indicate success. The callback may
* return NULL to terminate further callbacks on the maestro.
*
* \param maestro Pointer to parent maestro.
* \param maestro Pointer to parent maestro.
* \param anim Pointer to the animation.
* \param props Pointer to the anim's props.
* \param pData Pointer to private data.
@ -494,7 +534,6 @@ typedef Rt2dMaestro *(*Rt2dMaestroAnimationsCallBack)
/**
* \ingroup rt2dmessage
* \typedef Rt2dMessageHandlerCallBack
* \ref Rt2dMessageHandlerCallBack represents the function called from
* \ref Rt2dMaestroProcessMessages for all messages in the maestro's
* process message queue. The maestro does not filter any messages. The
@ -504,7 +543,7 @@ typedef Rt2dMaestro *(*Rt2dMaestroAnimationsCallBack)
* callback may return NULL to terminate further callbacks on the maestro.
*
* \param maestro Pointer to parent maestro.
* \param message Pointer to the message.
* \param message Pointer to the message.
*
* \return Pointer to the message.
*/
@ -530,6 +569,18 @@ typedef Rt2dMessage *
* Data access macros.
*/
/*
* Toolkit-level initialization / finalization
*/
/*
* INITIALIZE
*/
extern void
Rt2dAnimOpen(void);
extern void
Rt2dAnimClose(void);
/*
* Rt2dAnim
*/
@ -747,7 +798,7 @@ Rt2dMaestroAddButton(Rt2dMaestro *maestro, RwInt32 strLabelIdx, RwInt32 objectId
extern Rt2dCel *
Rt2dCelCreate(Rt2dMaestro *maestro,
RwChar *name,
const RwChar *name,
RwInt32 celIndex, RwInt32 messageListIndex);
extern Rt2dCelList *
@ -966,7 +1017,7 @@ Rt2dMessageHandlerDefaultCallBack(Rt2dMaestro *maestro, Rt2dMessage *message);
*/
extern Rt2dStringLabel *
Rt2dMaestroFindStringLabel(Rt2dMaestro *maestro,
Rt2dStringLabelType entityType, RwChar *lookupName,
Rt2dStringLabelType entityType, const RwChar *lookupName,
RwInt32 *index);
extern Rt2dStringLabel *
@ -974,7 +1025,7 @@ Rt2dMaestroGetStringLabelByIndex(Rt2dMaestro *maestro, RwInt32 index);
extern Rt2dMaestro *
Rt2dMaestroAddStringLabel(Rt2dMaestro *maestro,
Rt2dStringLabelType entityType, RwChar *name,
Rt2dStringLabelType entityType, const RwChar *name,
void *internalData, RwInt32 *index);
extern const RwChar *
@ -985,28 +1036,28 @@ Rt2dMaestroGetStringLabelName(Rt2dMaestro *maestro,
#if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE))
#define Rt2dStringLabelGetStringLabelType(_strLabel) \
_rt2dStringLabelGetStringLabelTypeMacro((_strLabel));
_rt2dStringLabelGetStringLabelTypeMacro((_strLabel))
#define Rt2dStringLabelSetStringLabelType(_strLabel, _entityType) \
_rt2dStringLabelSetStringLabelTypeMacro((_strLabel), (_entityType));
_rt2dStringLabelSetStringLabelTypeMacro((_strLabel), (_entityType))
#define Rt2dStringLabelGetNameIndex(_strLabel) \
_rt2dStringLabelGetNameIndexMacro((_strLabel));
_rt2dStringLabelGetNameIndexMacro((_strLabel))
#define Rt2dStringLabelSetNameIndex(_strLabel, _index) \
_rt2dStringLabelSetNameIndexMacro((_strLabel), (_index));
_rt2dStringLabelSetNameIndexMacro((_strLabel), (_index))
#define Rt2dStringLabelGetInternalData(_strLabel) \
_rt2dStringLabelGetInternalDataMacro((_strLabel));
_rt2dStringLabelGetInternalDataMacro((_strLabel))
#define Rt2dStringLabelSetInternalData(_strLabel, _internalData) \
_rt2dStringLabelSetInternalDataMacro((_strLabel), (_internalData));
_rt2dStringLabelSetInternalDataMacro((_strLabel), (_internalData))
#define Rt2dStringLabelGetUserData(_strLabel) \
_rt2dStringLabelGetUserDataMacro((_strLabel));
_rt2dStringLabelGetUserDataMacro((_strLabel))
#define Rt2dStringLabelSetUserData(_strLabel, _userData) \
_rt2dStringLabelSetUserDataMacro((_strLabel), (_userData));
_rt2dStringLabelSetUserDataMacro((_strLabel), (_userData))
#else /* !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */

View File

@ -150,480 +150,14 @@
enum rwPLUGIN_ERRENUM
enum e_rwdb_Criterion2DAnim
{
rwPLUGIN_ERRENUMLAST = RWFORCEENUMSIZEINT
e_rwdb_Criterion2DAnimLAST = RWFORCEENUMSIZEINT
};
typedef enum rwPLUGIN_ERRENUM rwPLUGIN_ERRENUM;
typedef enum e_rwdb_Criterion2DAnim e_rwdb_Criterion2DAnim;

View File

@ -11,7 +11,7 @@
/**
* \defgroup rtbary RtBary
* \ingroup rttool
* \ingroup mathtools
*
* Barycentric Toolkit for RenderWare.
*/
@ -32,7 +32,7 @@
/**
* \ingroup rtbary
* \typedef RtBaryV4d
* \ref RtBaryV4d
* typedef for the 4 element homogeneous row of a transform matrix mapping
* a point from Cartesian space to the barycentric space defined by a triangle.
*/
@ -40,7 +40,7 @@ typedef RwReal RtBaryV4d[4];
/**
* \ingroup rtbary
* \typedef RtBaryTransform
* \ref RtBaryTransform
* typedef for the 4x4 homogeneous transform matrix mapping a point
* from Cartesian space to the barycentric space defined by a triangle.
*/

View File

@ -145,472 +145,6 @@

View File

@ -8,17 +8,12 @@
/**
* \defgroup rtbezpatch RtBezPat
* \ingroup rttool
* \ingroup mathtools
*
* The Bezier Patch Toolkit is a group of functions that support the way
* RenderWare processes patches.
*/
/**
* \ingroup rtbezpatch
* \typedef RtBezierV4d
* typedef for struct RtBezierV4d.
*/
typedef struct RtBezierV4d RtBezierV4d;
/**
@ -42,7 +37,7 @@ struct RtBezierV4d
/**
* \ingroup rtbezpatch
* \typedef RtBezierRow
* \ref RtBezierRow
* typedef for a row of vectors.
* RtBezierRow is an array of 4 vectors
*/
@ -50,7 +45,7 @@ typedef RtBezierV4d RtBezierRow[4];
/**
* \ingroup rtbezpatch
* \typedef RtBezierMatrix
* \ref RtBezierMatrix
* typedef for a matrix of 4*4 vectors.
* RtBezierMatrix is an array of 4 rows.
*/

View File

@ -129,472 +129,6 @@

View File

@ -12,7 +12,7 @@
/**
* \defgroup rtbmp RtBMP
* \ingroup rttool
* \ingroup imageconversiontools
*
* BMP Image Format Toolkit for RenderWare.
*

View File

@ -129,472 +129,6 @@

View File

@ -16,7 +16,7 @@
/**
* \defgroup rtcharset RtCharset
* \ingroup rttool
* \ingroup 2dtools
*
* Character Set/Foot Toolkit for RenderWare.
*/
@ -61,7 +61,7 @@ struct RtCharsetDesc
/**
* \ingroup rtcharset
* \typedef RtCharset
* \ref RtCharset
* typedef for a structure defining a character set (opaque).
* \see RtCharsetCreate
*/

View File

@ -129,472 +129,6 @@

View File

@ -10,15 +10,15 @@
#define RTIMPORT_H
/**
* \defgroup rtimport RtWorldImport
* \ingroup rttool
* \defgroup rtworldimport RtWorldImport
* \ingroup basicgeometry
*
* World Import Toolkit for Renderware.
* World Import Toolkit for RenderWare.
*/
/**
* \defgroup selectors RtWorldImportPartitionSelectors
* \ingroup rtimport
* \ingroup rtworldimport
*
* The set of provided RtWorldImportPartitionSelectors:
* Selects a good partition by calling one of the
@ -29,7 +29,7 @@
/**
* \defgroup iterators RtWorldImportPartitionIterators
* \ingroup rtimport
* \ingroup rtworldimport
*
* The set of provided RtWorldImportPartitionIterators:
* Iterates through a set of candidate partitions, possibly
@ -39,7 +39,7 @@
/**
* \defgroup evaluators RtWorldImportPartitionEvaluators
* \ingroup rtimport
* \ingroup rtworldimport
*
* The set of provided RtWorldImportPartitionEvaluators:
* Uses a combination of statistics, build sector, build status, and
@ -51,7 +51,7 @@
/**
* \defgroup terminators RtWorldImportPartitionTerminators
* \ingroup rtimport
* \ingroup rtworldimport
*
* The set of provided RtWorldImportPartitionTerminators:
* Checks given criteria about the statistics, build sector, build status, and
@ -61,7 +61,7 @@
/**
* \defgroup kd RtWorldImportGuideKD
* \ingroup rtimport
* \ingroup rtworldimport
*
* Tools to manipulate the \ref RtWorldImportGuideKDTree that is used to
* manually build the sectors of a world.
@ -69,7 +69,7 @@
/**
* \defgroup hints RtWorldImportHints
* \ingroup rtimport
* \ingroup rtworldimport
*
* Tools to aid the build process by giving hints as to what geometry should
* not be split, and what geometry makes for a good partitioning guide.
@ -96,7 +96,7 @@
#define rtWORLDIMPORTPROGRESSBSPCOMPRESSEND 5
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \def rtWORLDIMPORTINVALIDPARTITION
*
* This value means that no partition was found, or that the partition was
@ -104,51 +104,61 @@
*/
#define rtWORLDIMPORTINVALIDPARTITION RwRealMAXVAL
/* maintained in Bin-tree */
#define CONGRUENTVERTEXCHILDREN 2
/* maintained in Quad-tree */
#define WELDVERTEXCHILDREN 4
/****************************************************************************
Global types
*/
/**
* Internal use only
*/
typedef union RtWorldImportVertexState RtWorldImportVertexState;
/**
* \ingroup rtimport
* \typedef RtWorldImportVertex
*
* typedef for struct \ref RtWorldImportVertex
*/
#if (!defined(DOXYGEN))
typedef struct RtWorldImportVertex RtWorldImportVertex;
/**
* \ingroup rtimport
* \typedef RtWorldImportWeldVertex
*
* typedef for struct \ref RtWorldImportWeldVertex
*/
typedef struct RtWorldImportWeldVertex RtWorldImportWeldVertex;
/**
* \ingroup rtimport
* \typedef RtWorldImportBuildVertex
*
* typedef for struct \ref RtWorldImportBuildVertex
*/
typedef struct RtWorldImportBuildVertex RtWorldImportBuildVertex;
/* Internal use only */
typedef union RtWorldImportVertexState RtWorldImportVertexState;
/* Internal use only */
union RtWorldImportVertexState
{
/* clipFlags, two types, first is based on partition only, 2nd is
* also based on partition, but takes overlaps into consideration. i.e.
* number splits is usually higher in clipFlags[0] than [1] */
RwInt32 clipFlags[2]; /* Internal use only */
RwInt32 forwardingAddress; /* Internal use only */
RtWorldImportVertex *vpVert; /* Internal use only */
RtWorldImportWeldVertex *vpWeldVert; /* Internal use only */
RtWorldImportBuildVertex *vpBuildVert; /* Internal use only */
RwSList *slist; /* Internal use only */
};
#endif /* (!defined(DOXYGEN)) */
/**
* \ingroup rtimport
* \typedef RtWorldImportBuildPolyInfo
* \ingroup rtworldimport
* \struct RtWorldImportVertex
* Holds data for each vertex in the import world.
*
* typedef for struct \ref RtWorldImportBuildPolyInfo
*/
struct RtWorldImportVertex
{
RwV3d OC; /**< World space vertex position */
RwV3d normal; /**< World space vertex normal */
RwRGBA preLitCol; /**< Vertex Prelight color */
RwTexCoords texCoords[rwMAXTEXTURECOORDS];
/**< Vertex texture coordinates */
RtWorldImportVertexState state; /**< Internal use only */
RwInt32 matIndex; /**< Vertex material index */
void *pUserdata; /**< Pointer to unspecified per vertex user data */
};
typedef struct RtWorldImportBuildPolyInfo RtWorldImportBuildPolyInfo;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportBuildPolyInfo
*
* Information about a polygon
@ -167,7 +177,7 @@ struct RtWorldImportBuildPolyInfo
typedef union RtWorldImportBuildVertexMode RtWorldImportBuildVertexMode;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportBuildVertexMode
*
* Mode of the vertex.
@ -182,7 +192,7 @@ union RtWorldImportBuildVertexMode
};
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportBuildVertex
*
* A list of polygons as a list of vertices where the end of poly boundary
@ -198,30 +208,16 @@ struct RtWorldImportBuildVertex
/**< we store some poly info in the end marker of a boundary */
};
/**
* \ingroup rtimport
* \typedef RtWorldImportGuideKDTree
*
* typedef for struct \ref RtWorldImportGuideKDTree
*/
typedef struct RtWorldImportGuideKDTree RtWorldImportGuideKDTree;
/* NB Merged RtWorldImportPartition with RtWorldImportBuildClipStatistics because
* there was a unique one-to-one relationship between them, and it made things easier
* just updating one stucture, without having to update both in sequence...
*/
/**
* \ingroup rtimport
* \typedef RtWorldImportBuildClipStatistics
*
* typedef for struct \ref RtWorldImportBuildClipStatistics
*/
typedef struct RtWorldImportBuildClipStatistics RtWorldImportBuildClipStatistics;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportBuildClipStatistics
*
* Holds statistics about a partition or candidate partition during
@ -231,15 +227,15 @@ struct RtWorldImportBuildClipStatistics
{
RwInt32 numPotentialSplit;
/**< The number of polygons split by the partition,
* disgregarding overlaps */
* disregarding overlaps */
RwInt32 numPotentialLeft;
/**< The number of potential polygons and fragments on the
* left of the partition, disgregarding overlaps */
* left of the partition, disregarding overlaps */
RwInt32 numPotentialRight;
/**< The number of potential polygons and fragments on the
* right of the partition, disgregarding overlaps */
* right of the partition, disregarding overlaps */
RwInt32 numActualSplit;
@ -276,15 +272,13 @@ struct RtWorldImportBuildClipStatistics
/**< The actual, relative size of the overlap on the right of the partition */
};
/**
* \ingroup rtimport
* \typedef RtWorldImportPartition
*
* typedef for struct \ref RtWorldImportPartition
/*
* typedef for struct RtWorldImportPartition
*/
typedef struct RtWorldImportPartition RtWorldImportPartition;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportPartition
*
* A partitioning plane.
@ -311,8 +305,14 @@ struct RtWorldImportPartition
/**< The statistics for the partition */
};
/*
* typedef for struct \ref RtWorldImportGuideKDTree
*/
typedef struct RtWorldImportGuideKDTree RtWorldImportGuideKDTree;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportGuideKDTree
* Represents the structure of a binary tree with
* no contents per se. It is used to build a BSP in a user specified
@ -342,6 +342,7 @@ struct RtWorldImportGuideKDTree
typedef struct _rtWorldImportGuideKDStackElement _rtWorldImportGuideKDStackElement;
#if (!defined(DOXYGEN))
struct _rtWorldImportGuideKDStackElement
{
RwBool terminal;
@ -357,16 +358,15 @@ struct _rtWorldImportGuideKDStack
_rtWorldImportGuideKDStackElement *current;
_rtWorldImportGuideKDStackElement *bottom;
};
#endif /* (!defined(DOXYGEN)) */
/**
* \ingroup rtimport
* \typedef RtWorldImportBuildSector
*
* typedef for struct \ref RtWorldImportBuildSector
/*
* typedef for struct RtWorldImportBuildSector
*/
typedef struct RtWorldImportBuildSector RtWorldImportBuildSector;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportBuildSector
*
* Holds information about the sector that is being subdivided
@ -401,15 +401,13 @@ struct RtWorldImportBuildSector
/**< Maximum number of materials in the in the world */
};
/**
* \ingroup rtimport
* \typedef RtWorldImportBuildStatus
*
* typedef for struct \ref RtWorldImportBuildStatus
/*
* typedef for struct RtWorldImportBuildStatus
*/
typedef struct RtWorldImportBuildStatus RtWorldImportBuildStatus;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportBuildStatus
* World Import Build Status Structure
* Used to store the current tree's build status
@ -419,50 +417,41 @@ struct RtWorldImportBuildStatus
RwInt32 depth; /**< current depth in the tree */
};
/**
* Internal use only
*/
union RtWorldImportVertexState
typedef struct RwRGBAUInt32 RwRGBAUInt32;
#if (!defined(DOXYGEN))
struct RwRGBAUInt32
{
/* clipFlags, two types, first is based on partition only, 2nd is
* also based on partition, but takes overlaps into consideration. i.e.
* number splits is usually higher in clipFlags[0] than [1] */
RwInt32 clipFlags[2]; /**< Internal use only */
RwInt32 forwardingAddress; /**< Internal use only */
RtWorldImportVertex *vpVert; /**< Internal use only */
RtWorldImportWeldVertex *vpWeldVert; /**< Internal use only */
RtWorldImportBuildVertex *vpBuildVert; /**< Internal use only */
RwSList *slist; /**< Internal use only */
RwUInt32 red, green, blue, alpha;
};
/**
* \ingroup rtimport
* \struct RtWorldImportVertex
* Holds data for each vertex in the import world.
*
*/
struct RtWorldImportVertex
typedef struct RtWorldImportCongruentVertex RtWorldImportCongruentVertex;
struct RtWorldImportCongruentVertex
{
RwV3d OC; /**< World space vertex position */
RwV3d normal; /**< World space vertex normal */
RwRGBA preLitCol; /**< Vertex Prelight color */
RwTexCoords texCoords[rwMAXTEXTURECOORDS];
/**< Vertex texture coordinates */
RtWorldImportVertexState state; /**< Internal use only */
RwInt32 matIndex; /**< Vertex material index */
void *pUserdata; /**< Pointer to unspecified per vertex user data */
RwInt32 destIdx;
RtWorldImportVertex vertex;
RtWorldImportVertex Mean;
RwRGBAUInt32 preLitMean;
RwInt32 refCount;
RtWorldImportCongruentVertex *child[CONGRUENTVERTEXCHILDREN];
};
/**
* \ingroup rtimport
* \typedef RtWorldImportTriangle
struct RtWorldImportWeldVertex
{
RtWorldImportVertex *sourcePtr;
RtWorldImportCongruentVertex *CongruentVertex;
RtWorldImportWeldVertex *child[WELDVERTEXCHILDREN];
};
#endif /* (!defined(DOXYGEN)) */
/*
* Holds data for each triangle in the import world.
*
* \see RtWorldImportTriangle
*/
typedef struct RtWorldImportTriangle RtWorldImportTriangle;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportTriangle
* Holds data for each triangle in the import world.
*
@ -476,38 +465,69 @@ struct RtWorldImportTriangle
};
/*
* typedef for struct RtWorldImportBBoxHintDesc
*/
typedef struct RtWorldImportBBoxHintDesc RtWorldImportBBoxHintDesc;
/**
* \ingroup rtimport
* \typedef RtWorldImportHints
*
* typedef for struct \ref RtWorldImportHints
* \ingroup rtworldimport
* \struct RtWorldImportBBoxHintDesc
* Bounding box hints and (priority) values used to control the world
* sectorization process.
*/
struct RtWorldImportBBoxHintDesc
{
RwBBox bBox; /**< The (necessarily orthogonal) bounding box */
RwReal value; /**< The value or priority of the hint (highest is most important) */
};
/*
* typedef for struct RtWorldImportHints
*/
typedef struct RtWorldImportHints RtWorldImportHints;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportHints
* Bounding box hints used to control the world sectorization process.
* \see RtWorldImportHintsSet
*/
struct RtWorldImportHints
{
/** The bounding box hints */
RwBBox *boundingBoxes;
/** The number of bounding box hints */
RwInt32 numBoundingBoxes;
RtWorldImportBBoxHintDesc *boundingBoxes; /**< The bounding box hints */
RwInt32 numBoundingBoxes; /**< The number of bounding box hints */
};
/**
* \ingroup rtimport
* \typedef RtWorldImportParameters
* \ingroup rtworldimport
* \ref RtWorldImportHintGroup
*
* An enumeration that can be passed to
* \ref RtWorldImportHintsSetGroup and \ref RtWorldImportHintsGetGroup to determine
* whether hints will contribute towards the shield hint group or partition hint group
*/
typedef enum
{
rtWORLDIMPORTSHIELDHINT = 0,
rtWORLDIMPORTPARTITIONHINT,
rtWORLDIMPORTFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}
RtWorldImportHintGroup;
/*
* typedef for struct \ref RtWorldImportParameters
*/
typedef struct RtWorldImportParameters RtWorldImportParameters;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportParameters
* Parameters used with \ref RtWorldImportCreateWorld.
* They are initialized to default values using \ref RtWorldImportParametersInit.
@ -563,15 +583,13 @@ struct RtWorldImportParameters
/**< If TRUE the world will be checked for validity during the build process. */
};
/**
* \ingroup rtimport
* \typedef RtWorldImport
*
* typedef for struct \ref RtWorldImport
/*
* typedef for struct RtWorldImport
*/
typedef struct RtWorldImport RtWorldImport;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImport
* World Import State Structure
*/
@ -583,14 +601,10 @@ struct RtWorldImport
RtWorldImportTriangle *polygons; /**< Triangle array */
RwInt32 numPolygons; /**< Triangle count */
RwSurfaceProperties surfaceProps; /**< The world's surface
lighting properties */
};
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \ref RtWorldImportProgressCallBack is the type for the callback function supplied to
* \ref RtWorldImportSetProgressCallBack.
*
@ -626,65 +640,102 @@ struct RtWorldImport
typedef RwBool (*RtWorldImportProgressCallBack)(RwInt32 msg, RwReal value);
/**
* \ingroup rtimport
* \typedef RtWorldImportDestroyVertexUserdataCallBack
* \ingroup rtworldimport
* \ref RtWorldImportDestroyVertexUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* vertex destruction.
*
* \param pUserdata
*
* \return
*/
typedef RwBool (*RtWorldImportDestroyVertexUserdataCallBack)(void **pUserdata);
/**
* \ingroup rtimport
* \typedef RtWorldImportCloneVertexUserdataCallBack
* \ingroup rtworldimport
* \ref RtWorldImportCloneVertexUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* vertex cloning.
*
* \param pUserdataDst
* \param pUserdataSrc
*
* \return
*/
typedef RwBool (*RtWorldImportCloneVertexUserdataCallBack)(void **pUserdataDst, void **pUserdataSrc);
/**
* \ingroup rtimport
* \typedef RtWorldImportInterpVertexUserdataCallBack
* \ingroup rtworldimport
* \ref RtWorldImportInterpVertexUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* vertex interpolation.
*
* \param pUserdataDst
* \param pUserdata1
* \param pUserdata2
* \param delta
*
* \return
*/
typedef RwBool (*RtWorldImportInterpVertexUserdataCallBack)(void **pUserdataDst, void **pUserdata1, void **pUserdata2, RwReal delta);
/**
* \ingroup rtimport
* \typedef RtWorldImportDestroyPolygonUserdataCallBack
* \ingroup rtworldimport
* \ref RtWorldImportDestroyPolygonUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* polygon destruction.
*
* \param pUserdata
*
* \return
*/
typedef RwBool (*RtWorldImportDestroyPolygonUserdataCallBack)(void **pUserdata);
/**
* \ingroup rtimport
* \typedef RtWorldImportSplitPolygonUserdataCallBack
* \ingroup rtworldimport
* \ref RtWorldImportSplitPolygonUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* polygon division.
*
* \param pUserdataDst
* \param pUserdataSrc
*
* \return
*/
typedef RwBool (*RtWorldImportSplitPolygonUserdataCallBack)(void **pUserdataDst, void **pUserdataSrc);
/**
* \ingroup rtimport
* \typedef RtWorldImportSectorSetVertexUserdataCallBack
* \ingroup rtworldimport
* \ref RtWorldImportSectorSetVertexUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* the setting of the vertex user data.
*
* \param pUserdata
* \param sector
* \param index
*
* \return
*/
typedef RwBool (*RtWorldImportSectorSetVertexUserdataCallBack)(void **pUserdata, RpWorldSector *sector, RwInt32 index);
/**
* \ingroup rtimport
* \typedef RtWorldImportSectorSetPolygonUserdataCallBack
* \ingroup rtworldimport
* \ref RtWorldImportSectorSetPolygonUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* the setting of the polygon user data.
*
* \param pUserdata
* \param sector
* \param index
*
* \return
*/
typedef RwBool (*RtWorldImportSectorSetPolygonUserdataCallBack)(void **pUserdata, RpWorldSector *sector, RwInt32 index);
@ -692,12 +743,18 @@ typedef RwBool (*RtWorldImportSectorSetPolygonUserdataCallBack)(void **pUserdata
/**
* \ingroup rtimport
* \typedef RtWorldImportTerminationBuildCallBack
* \ingroup rtworldimport
* \ref RtWorldImportTerminationBuildCallBack
*
* A pointer to the function that will be called during the
* build process to determine whether the current sector should
* be subdivided further, or terminated.
*
* \param buildSector
* \param buildStatus
* \param pData
*
* \return
*/
typedef RwBool (*RtWorldImportTerminationBuildCallBack)
(RtWorldImportBuildSector *buildSector,
@ -705,11 +762,17 @@ typedef RwBool (*RtWorldImportTerminationBuildCallBack)
void *pData);
/**
* \ingroup rtimport
* \typedef RtWorldImportPartitionBuildCallBack
* \ingroup rtworldimport
* \ref RtWorldImportPartitionBuildCallBack
*
* A pointer to the function that will be called during the
* build process to select a suitable sector partition.
*
* \param buildSector
* \param buildStatus
* \param partition
*
* \return
*/
typedef RwReal (*RtWorldImportPartitionBuildCallBack)
(RtWorldImportBuildSector *buildSector,
@ -717,15 +780,13 @@ typedef RwReal (*RtWorldImportPartitionBuildCallBack)
RtWorldImportPartition *partition,
void *pData);
/**
* \ingroup rtimport
* \typedef RtWorldImportBuildCallBacks
*
/*
* typedef for struct \ref RtWorldImportBuildCallBacks
*/
typedef struct RtWorldImportBuildCallBacks RtWorldImportBuildCallBacks; /* MAYBE: rename to SectorCallBacks ?*/
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportBuildCallBacks
* Sectorization callbacks
*/
@ -741,15 +802,13 @@ struct RtWorldImportBuildCallBacks
/**< Termination callback user data */
};
/**
* \ingroup rtimport
* \typedef RtWorldImportUserdataCallBacks
*
/*
* typedef for struct \ref RtWorldImportUserdataCallBacks
*/
typedef struct RtWorldImportUserdataCallBacks RtWorldImportUserdataCallBacks;
/**
* \ingroup rtimport
* \ingroup rtworldimport
* \struct RtWorldImportUserdataCallBacks
* Bundle of callbacks
*/
@ -772,8 +831,8 @@ struct RtWorldImportUserdataCallBacks
};
/**
* \ingroup rtimport
* \typedef RtWorldImportBuildPartitionSelector
* \ingroup rtworldimport
* \ref RtWorldImportBuildPartitionSelector
*
* An enumeration that can be passed to
* \ref RtWorldImportSetStandardBuildPartitionSelector to determine
@ -821,8 +880,6 @@ extern "C"
extern RwBool
_rtImportBuildSectorFindBBox(RtWorldImportBuildSector *buildSector, RwBBox *bbpOut);
/* TODO: decide where these scheme functions are going and which ones are public and
whether _rt or RT should be used */
extern void
_rtWorldImportGuideKDCopy(RtWorldImportGuideKDTree *KD, RpSector *spSector, RwInt32 depth);
extern void _rtWorldImportGuideKDStackDestroy(_rtWorldImportGuideKDStack *stack);
@ -862,6 +919,12 @@ RtWorldImportMaterialSeparatePartitionSelector(RtWorldImportBuildSector *buildSe
RtWorldImportBuildStatus *buildStatus,
RtWorldImportPartition *partition,
void *userData);
extern RwReal
RtWorldImportPartitionHintPartitionSelector(RtWorldImportBuildSector *buildSector,
RtWorldImportBuildStatus *buildStatus,
RtWorldImportPartition *partition,
void * __RWUNUSED__ userData);
extern RwReal
RtWorldImportMaximumOccluderPartitionSelector(RtWorldImportBuildSector *buildSector,
@ -1109,14 +1172,13 @@ RtWorldImportSectorAspectSizePartitionTerminator(RtWorldImportBuildSector * buil
/* END TODO */
/* WorldImport hints */
extern void
RtWorldImportHintsSet(RtWorldImportHints *hints);
RtWorldImportHintsSetGroup(RtWorldImportHints *hints, RtWorldImportHintGroup group);
extern RtWorldImportHints *
RtWorldImportHintsGet(void);
RtWorldImportHintsGetGroup(RtWorldImportHintGroup group);
extern RtWorldImportHints *
RtWorldImportHintsCreate(void);
@ -1175,14 +1237,6 @@ extern RwInt32 RtWorldImportGetNumTriangles(RtWorldImport * nohsworld);
extern RtWorldImportTriangle *
RtWorldImportGetTriangles(RtWorldImport * nohsworld);
/* Surface lighting characteristics */
extern RtWorldImport *
RtWorldImportSetSurfaceProperties(RtWorldImport * world,
RwSurfaceProperties *
surface);
extern RwSurfaceProperties *
RtWorldImportGetSurfaceProperties(RtWorldImport * world);
/* Progress callbacks */
extern void
@ -1254,6 +1308,12 @@ RtWorldImportSetStandardBuildPartitionSelector(RtWorldImportBuildPartitionSelect
#define RtWorldImportParametersInitialize(_paramsPtr) \
*(_paramsPtr) = *RtWorldImportParametersInit();
/* Back compatibility with former hints which only permitted type zero (shield) hints... */
#define RtWorldImportHintsSet(_hints) \
RtWorldImportHintsSetGroup(_hints, rtWORLDIMPORTSHIELDHINT);
#define RtWorldImportHintsGet() \
RtWorldImportHintsGetGroup(rtWORLDIMPORTSHIELDHINT);
#endif /* RTIMPORT_H */

View File

@ -128,472 +128,6 @@

File diff suppressed because it is too large Load Diff

View File

@ -1,645 +0,0 @@
enum e_rwdb_CriterionIntel
{
e_rwdb_CriterionIntelLAST = RWFORCEENUMSIZEINT
};
typedef enum e_rwdb_CriterionIntel e_rwdb_CriterionIntel;

View File

@ -10,8 +10,8 @@
#define RTINTSEC_H
/**
* \defgroup rtintersect RtIntersection
* \ingroup rttool
* \defgroup rtintersection RtIntersection
* \ingroup mathtools
*
* Object Intersection Toolkit for RenderWare.
*/

View File

@ -128,472 +128,6 @@

View File

@ -1,7 +1,7 @@
/**
* \defgroup rtltmap RtLtMap
* \ingroup rttool
* \ingroup lighting
*
* Lightmap Generation Toolkit for RenderWare.
*/
@ -21,7 +21,6 @@
/**
* \ingroup rtltmap
* \typedef RtLtMapIlluminateSampleCallBack
* \ref RtLtMapIlluminateSampleCallBack is the callback to be called, from
* within \ref RtLtMapIlluminate, for groups of samples in the objects
* currently being illuminated.
@ -32,7 +31,7 @@
*
* This callback will receive an array of color values to fill in, each
* representing one sample in the current object - this may correspond to
* a texel in the current object's lightmap or the prelight colour of a
* a texel in the current object's lightmap or the prelight color of a
* vertex, depending on whether the object is lightmapped and/or vertex-lit.
* It will receive positions (in world-space) for each sample and the normal
* vector (again, in world-space) of each sample (normals are interpolated
@ -44,7 +43,7 @@
* The barycentric coordinates may be used, for example, to allow a callback
* to easily import existing lighting data (e.g from previously generated
* lightmaps in a different format, or from an art package with lighting
* functionality).
* functionality).
*
* NOTE: The alpha channel of the RwRGBA results array must NOT be modified.
* These values are used internally and their modification may result in
@ -82,7 +81,6 @@ typedef RwRGBA *(*RtLtMapIlluminateSampleCallBack)(RwRGBA *results,
/**
* \ingroup rtltmap
* \typedef RtLtMapIlluminateVisCallBack
* \ref RtLtMapIlluminateVisCallBack is the callback to be called, from
* within \ref RtLtMapIlluminate, to determine the visibility between a
* sample and a light.
@ -94,7 +92,7 @@ typedef RwRGBA *(*RtLtMapIlluminateSampleCallBack)(RwRGBA *results,
* Each sample may represent a texel in the current object's lightmap
* or the prelight color of a vertex, depending on whether the object
* is lightmapped and/or vertex-lit (see \ref RtLtMapObjectFlags).
*
*
* The callback will receive a pointer to the world of the current
* \ref RtLtMapLightingSession (this may be used to perform intersection
* tests), the world-space position of the sample, the world-space
@ -111,15 +109,15 @@ typedef RwRGBA *(*RtLtMapIlluminateSampleCallBack)(RwRGBA *results,
* expressed by modifying the RwRGBAReal value. This defaults to bright
* white but may be reduced to signify that the light from the light
* source should be attenuated. This could be used to take into account
* light-filtering objects in the scene (such as coloured glass or fog).
* light-filtering objects in the scene (such as colored glass or fog).
*
* The default RtLtMapIlluminateVisCallBack supplied with RtLtMap is
* \ref RtLtMapDefaultVisCallBack. This callback performs visibility
* tests using the line-intersection tests from \ref rtintersect. It tests
* tests using the line-intersection tests from \ref rtintersection. It tests
* for occlusion by RpWorldSectors and RpAtomics and it respects the
* relevant \ref RtLtMapObjectFlags and \ref RtLtMapMaterialFlags but it
* does not filter light; visibility is determined to be either one or zero.
*
*
* \param world The world of the current RtLtMapLightingSession
* \param result An RwRGBAReal value to attentuate this light's
* contribution to the current sample
@ -141,7 +139,6 @@ typedef RwBool (*RtLtMapIlluminateVisCallBack)(RpWorld *world,
/**
* \ingroup rtltmap
* \typedef RtLtMapIlluminateProgressCallBack
* \ref RtLtMapIlluminateProgressCallBack is the callback to be called, from
* within \ref RtLtMapIlluminate, to allow a user to track lighting progress.
*
@ -214,17 +211,17 @@ typedef enum RtLtMapProgressMessage RtLtMapProgressMessage;
typedef struct RtLtMapLightingSession RtLtMapLightingSession;
/**
* \ingroup rtltmap
* \typedef RtLtMapLightingSession
* The \ref RtLtMapLightingSession structure holds information to be passed to
* \struct RtLtMapLightingSession
* The RtLtMapLightingSession structure holds information to be passed to
* \ref RtLtMapIlluminate. It is used to parameterize the lighting process.
*
* The \ref RtLtMapLightingSession structure encapsulates a set of objects and
* The RtLtMapLightingSession structure encapsulates a set of objects and
* keeps track of the proportion of samples, within that set, that have already
* been lit by calls to \ref RtLtMapIlluminate. Each call performs lighting for
* one 'slice' of the whole 'session'. If the camera member is non-NULL, it is
* important that the camera is not moved between lighting slices.
*
* The \ref RtLtMapLightingSession is also passed to
* The RtLtMapLightingSession is also passed to
* \ref RtLtMapLightMapsCreate, \ref RtLtMapLightMapsClear,
* \ref RtLtMapLightMapsDestroy and \ref RtLtMapAreaLightGroupCreate,
* though not all of the session structure's member will be used in
@ -327,7 +324,7 @@ typedef enum RtLtMapMaterialFlags RtLtMapMaterialFlags;
/**
* \ingroup rtltmap
* \ref RtLtMapObjectFlags is an enumerated type specifying the different
* RtLtMapObjectFlags is an enumerated type specifying the different
* lightmap-related flags which may be applied to world sectors and
* atomics. These values will be taken into consideration within
* \ref RtLtMapLightMapsCreate and \ref RtLtMapIlluminate.
@ -345,11 +342,11 @@ enum RtLtMapObjectFlags
rtLTMAPOBJECTNAFLAG = 0,
rtLTMAPOBJECTLIGHTMAP = 1, /**< This object is to be lightmapped */
rtLTMAPOBJECTVERTEXLIGHT = 2, /**< This object's vertex prelight colours should
* be lit within \ref RtLtMapIlluminate. */
rtLTMAPOBJECTVERTEXLIGHT = 2, /**< This object's vertex prelight colors should
be lit within \ref RtLtMapIlluminate. */
rtLTMAPOBJECTNOSHADOW = 4, /**< This object does not cast shadows (useful, for
* example, for moving objects for which dynamic
* shadows are to be rendered - such as doors) */
example, for moving objects for which dynamic
shadows are to be rendered - such as doors) */
rtLTMAPOBJECTFLAGFORCEENUMSIZEINT = 0x7FFFFFFF
};
@ -358,10 +355,13 @@ typedef enum RtLtMapObjectFlags RtLtMapObjectFlags;
/* Area-lighting stuff:*
***********************/
typedef struct RtLtMapAreaLightGroup RtLtMapAreaLightGroup;
/**
* \ingroup rtltmap
* \typedef RtLtMapAreaLightGroup
* \ref RtLtMapAreaLightGroup is a structure which acts as a container
* \struct RtLtMapAreaLightGroup
* RtLtMapAreaLightGroup is a structure which acts as a container
* for area lights created by a call to \ref RtLtMapAreaLightGroupCreate.
* The containers may be chained and passed to \ref RtLtMapIlluminate.
* Each container has an optional pointer to a RwFrame which is used to
@ -376,7 +376,6 @@ typedef enum RtLtMapObjectFlags RtLtMapObjectFlags;
* \see RtLtMapIlluminate
* \see RtLtMapIlluminateVisCallBack
*/
typedef struct RtLtMapAreaLightGroup RtLtMapAreaLightGroup;
struct RtLtMapAreaLightGroup
{
RwSList *meshes; /**< A list of hierarchically-grouped area lights */
@ -388,13 +387,15 @@ struct RtLtMapAreaLightGroup
/* Area light triangles are grouped by source mesh (this may change) */
typedef struct LtMapAreaLightMesh LtMapAreaLightMesh;
#if (!defined(DOXYGEN))
struct LtMapAreaLightMesh
{
RwUInt32 flags; /* To hold hierarchical visibility culling flags,
* relevant to the object/triangle *currently* being lit. */
RpMaterial *material; /* The emitter material, containing colour, etc */
RpMaterial *material; /* The emitter material, containing color, etc */
RwSphere sphere; /* Each mesh has an associated center and radius */
RwReal ROI; /* Centred on the above sphere, the R.O.I. of the
RwReal ROI; /* Centered on the above sphere, the R.O.I. of the
* samples in this mesh (a conservative estimate) */
RwSList *triangles; /* A list of the area light triangles in this mesh */
};
@ -412,6 +413,37 @@ struct LtMapAreaLight
* not worth storing 3 points, coarse culling is fine) */
RwV3d *lights; /* Array of area light sample positions (in world-space) */
};
#endif /* (!defined(DOXYGEN)) */
#if (defined(SKY2_DRVMODEL_H) || defined(NULLSKY_DRVMODEL_H))
/**
* \ingroup rtltmapps2
* \ref RtLtMapSkyLumCalcCallBack is the callback to be called, from
* within \ref RtLtMapSkyBaseTextureProcess, to allow a user to select the
* function to process the textures for rendering on the PlayStation 2.
*
* The function is called for each span of a full color image, or for the
* CLUT in a palettised image, to compute the luminance and stores it in
* the alpha component of the texel.
*
* \param scanline A pointer to a scanline of \ref RwRGBA data.
* \param width Width of the scanline, in pixels.
*
* \return A pointer to the scanline on success, NULL otherwise.
*
* \see RtLtMapSkyBaseTextureProcess
* \see RtLtMapSkyLightingSessionBaseTexturesProcess
* \see RtLtMapSkyLightMapMakeDarkMap
* \see RtLtMapSkyLumCalcMaxCallBack
* \see RtLtMapSkyLumCalcSigmaCallBack
* \see RtLtMapSkySetLumCalcCallBack
* \see RtLtMapSkyGetLumCalcCallBack
*/
typedef RwRGBA *(*RtLtMapSkyLumCalcCallBack)(RwRGBA *scanline,
RwUInt32 width );
#endif /* (defined(SKY2_DRVMODEL_H) || defined(NULLSKY_DRVMODEL_H)) */
#ifdef __cplusplus
@ -487,6 +519,12 @@ RtLtMapDefaultVisCallBack(RpWorld *world,
RwV3d *lightPos,
RpLight __RWUNUSED__ *light);
extern void
RtLtMapSetVisCallBackCollisionScalar(RwReal scalar);
extern RwReal
RtLtMapGetVisCallBackCollisionScalar(void);
extern RtLtMapLightingSession *
RtLtMapLightingSessionInitialize(RtLtMapLightingSession *session,
RpWorld *world);
@ -562,7 +600,6 @@ extern RwBool
RtLtMapSetAreaLightErrorCutoff(RwReal tolerance);
/* Texture-saving functionality: */
extern RwTexDictionary *
RtLtMapTexDictionaryCreate(RtLtMapLightingSession *session);
@ -588,7 +625,13 @@ extern RpAtomic *RtLtMapSkyAtomicBaseTexturesProcess(RpAtomic *atomic);
extern RpWorldSector *
RtLtMapSkyWorldSectorBaseTexturesProcess(RpWorldSector *sector);
extern RtLtMapLightingSession *
RtLtMapSkyBaseTexturesProcess(RtLtMapLightingSession *session);
RtLtMapSkyLightingSessionBaseTexturesProcess(RtLtMapLightingSession *session);
extern RwRGBA *RtLtMapSkyLumCalcMaxCallBack( RwRGBA *scanline, RwUInt32 width );
extern RwRGBA *RtLtMapSkyLumCalcSigmaCallBack( RwRGBA *scanline, RwUInt32 width );
extern RwBool RtLtMapSkySetLumCalcCallBack(RtLtMapSkyLumCalcCallBack cback);
extern RtLtMapSkyLumCalcCallBack RtLtMapSkyGetLumCalcCallBack( void );
#endif /* (defined(SKY2_DRVMODEL_H) || defined(NULLSKY_DRVMODEL_H)) */

View File

@ -138,472 +138,6 @@

View File

@ -15,9 +15,9 @@
/**
* \defgroup rtmipk RtMipmapK
* \ingroup rttool
* \ingroup mipmapping
*
* Ps2/Mipmap K Value Toolkit for RenderWare.
* PlayStation 2 / Mipmap K Value Toolkit for RenderWare.
*/
/****************************************************************************

View File

@ -128,472 +128,6 @@

View File

@ -11,7 +11,7 @@
/**
* \defgroup rtpick RtPick
* \ingroup rttool
* \ingroup collisiondetection
*
* Picking Toolkit for RenderWare.
*/

View File

@ -128,472 +128,6 @@

View File

@ -11,7 +11,7 @@
/**
* \defgroup rtpitexd RtPITexD
* \ingroup rttool
* \ingroup texturedictionaries
*
* Platform Independent Texture Dictionaries
*

View File

@ -182,472 +182,6 @@

View File

@ -12,7 +12,7 @@
/**
* \defgroup rtpng RtPNG
* \ingroup rttool
* \ingroup imageconversiontools
*
* PNG/Portable Network Graphics Image Format Toolkit for RenderWare.
*

View File

@ -129,472 +129,6 @@

View File

@ -10,7 +10,7 @@
/**
* \defgroup rtquat RtQuat
* \ingroup rttool
* \ingroup mathtools
*
* Quaternion Toolkit for RenderWare.
*
@ -392,7 +392,7 @@ MACRO_START \
\
/* Matrix is orthogonal */ \
rwMatrixSetFlags((mpMatrix), \
(rwMATRIXTYPEORTHOGANAL & \
(rwMATRIXTYPEORTHOGONAL & \
~rwMATRIXINTERNALIDENTITY) ); \
\
} \

View File

@ -145,472 +145,6 @@

Some files were not shown because too many files have changed in this diff Show More