Compare commits

...
28 Commits
Author SHA1 Message Date
MageKing17 d1444b45ac Merge branch 'master' of https://github.com/scp-fs2open/fs2open.github.com 2015-04-26 10:04:57 -07:00
MageKing17 26553f1327 Voice recognition upgrades.
Switches to an in-process recognizer, removes the hard-coded wing list (which could in accessing invalid memory, when used with a custom grammar file), and fixes up the grammar file a bit.
2015-04-26 10:03:44 -07:00
Cliff Gordon (chief1983) 18ef1f77d4 FreeBSD 10 is on Clang now, -ansi doesn't mean anything here. 2015-04-26 10:27:12 -05:00
chief1983 f187522238 File exists wrappers for bitmaps and animations; eliminates worrying about extensions, only need the base filename and it'll tell you if it's available.
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11328 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-23 12:09:19 +10:00
chief1983 26adf935f7 Globalize various file extension lists littered throughout the code so they can be referenced from other classes as needed, instead of being hardcoded multiple times.
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11327 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-23 12:09:18 +10:00
chief1983 d68baac787 Eliminate some redundancy with ship allowed weapon parsing.
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11326 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-23 12:09:17 +10:00
chief1983 c3d3f4d4dd Update OS X project to work with updated Jansson.
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11325 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-23 12:09:17 +10:00
chief1983 cc037e3259 Upgrade Jansson to 2.7.
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11324 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-23 12:09:16 +10:00
MageKing17 0c60515662 Record mission loading time in the debug log.
(Just changes a printf into an mprintf.)

git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11323 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-23 12:09:15 +10:00
MageKing17 ec88fdbae1 Minor objectsnd.cpp cleanup.
Should be all nonfunctional changes (yes, even those "else" branches that look like they change behavior; functionally speaking, those branches shouldn't get hit because FSO will delete the sounds when they shouldn't apply).

git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11322 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-23 12:09:10 +10:00
MageKing17 83414b238d Remove required_string_3() and required_string_4().
Replaced with usage of required_string_one_of(). (required_string_either() not removed due to different behavior.)

git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11321 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-23 12:09:06 +10:00
MageKing17 a233f62afb Remove some redundant code in parselo.cpp.
7 cases in stuff_string() (both versions) were using identical code. Consolidated into one branch for clarity.

git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11320 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-23 12:08:31 +10:00
MageKing17 8ef442205c Fix minor problem with weapons.cpp.
If "@Laser Color2:" is defined for a weapon and you override that weapon with a modular table (even if that override entry doesn't actually contain any data), the weapon's laser_color_2 value would get defaulted to its laser_color_1 value. Now, only do that if changing laser_color_1 and the RGB values of the two colors matched before.

git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11319 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-23 12:08:31 +10:00
MageKing17 66bddb970c Commit various updates to the MSVS 2013 project files, following discussion in #scp.
Fixes Mantis 3104, amongst other minor issues. Given the existence of the Community Edition, decided to make FS2_SPEECH and FS2_VOICER defined by default. Setup release builds for debugging symbols. Corrected a few inconsistencies between configurations.

git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11318 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-23 12:08:30 +10:00
chief1983 4ecc546e34 Backport (?) r3727 and 3733 from fs2_open-unstable_old, the old CVS unstable branch.
3727: added MadProf's voice recognition enhancements
3733: fix spelling, and synch with voicerec.cpp

See http://www.hard-light.net/forums/index.php?topic=37643.msg880793#msg880793 for more information.

git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11317 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-23 12:08:29 +10:00
MageKing17 aaec401c8f Removing unused code from hud.cpp
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11315 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-19 00:10:27 +10:00
MageKing17 6f1e33938c Fix a possible crash with -reparse_mainhall.
Left over pointer towards a structure that had been cleared and rebuilt could cause a crash. Found (and fix tested) by Axem. Also thanks to z64555 for bouncing ideas back and forth until this solution was found.

git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11314 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-18 18:12:07 +10:00
chief1983 c4d1ed526c Other half of version bump to 3.7.3, I will probably have that automated by the next release cycle.
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11310 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-18 18:12:06 +10:00
chief1983 161e7498c4 git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11309 387891d4-d844-0410-90c0-e4c51a9137d3 2015-04-18 18:12:04 +10:00
m_m e3311f36ac Fix for Mantis 3156: Fighter beam range depends on target radius
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11307 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-18 00:09:10 +10:00
MageKing17 ed11f9a1c1 Fix objnum/instance confusion in comm menu.
Could cause orders to be grayed out for the wrong ship, due to it happening to have an objnum matching the instance of the ship you were ordering.

git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11305 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-17 06:07:54 +10:00
niffiwan e0e3cffab6 Update credits for 3.7.2
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11304 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-16 00:08:49 +10:00
z64555 b6d48faf4d BMPMAN doxy effort. Also defines EXAMPLE_PATH in the doxyfile to enable use of the @example command, which references code snippets as examples.
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11303 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-14 00:06:58 +10:00
zookeeper 73d6483df6 Typo-fixed and clarified some SEXP argument descriptions.
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11302 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-12 12:07:23 +10:00
zookeeper 3952713eba Fixed "get-ets-values" to "get-ets-value" in the help string.
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11301 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-12 12:07:22 +10:00
z64555 617c530a3b From Echelon9 and myself. Resolves some typos with the debug console parser.
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11300 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-11 18:11:42 +10:00
niffiwan 8c0f95ced8 Fix mantis 3150
Use and set music volume changes requested by sexp_adjust_audio_volume()

git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11299 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-11 12:12:06 +10:00
Goober5000 78f9c8f82c related to Mantis #3130 - don't create a VBO if we're not supposed to
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11298 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-11 12:12:03 +10:00
84 changed files with 6182 additions and 6392 deletions

No files matched your search

+54
View File
@@ -0,0 +1,54 @@
/*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
/**
* @file bm_examples.cpp
* This file contains example code for using bmpman.
*/
#include "bmpman/bmpman.h"
#include "graphics/2d.h"
void bm_create_example() {
static int test_inited = 0;
static int test_bmp;
static uint test_bmp_data[128 * 64];
if (!test_inited) {
test_inited = 1;
// Create the new bitmap and fill in its data.
// When you're done with it completely, call
// bm_release to free up the bitmap handle
test_bmp = bm_create(32, 128, 64, test_bmp_data);
int i, j;
for (i = 0; i < 64; i++) {
for (j = 0; j < 64; j++) {
uint r = i * 4;
test_bmp_data[j + i * 128] = r;
}
}
}
// page out the data, so that the next bm_lock will convert the new data to
// the correct bpp
bm_unload(test_bmp);
// put in new data
int x, y;
gr_reset_clip();
for (y = 0; y < 64; y++) {
for (x = 0; x < 128; x++) {
test_bmp_data[y * 128 + x] = 15;
}
}
// Draw the bitmap, the upper left corner is the origin (0, 0)
gr_set_bitmap(test_bmp);
gr_bitmap(0, 0);
}
+77 -81
View File
@@ -1,121 +1,119 @@
/*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
#ifndef __BM_INTERNAL_H__
#define __BM_INTERNAL_H__
/*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
/**
* @file bm_internal.h
* These are functions and types used by bmpman and a few others.
*
* @details It is a "protected" header that requires BMPMAN_INTERNAL to be defined before it can be included. This is to
* provide a small measure of safety since this functions can cause problems if not used correctly
*/
// extra check to make sure this stuff doesn't end up in normal files
// don't use any of this unless BMPMAN_INTERNAL is defined
#ifdef BMPMAN_INTERNAL
#ifndef BMPMAN_INTERNAL
#error The file header "bmpman/bm_internal.h" is protected. Make sure you know what you are doing!
#endif
#include "globalincs/pstypes.h"
#include "bmpman/bmpman.h"
#include "globalincs/pstypes.h"
// Bitmap types
enum BM_TYPE
{
BM_TYPE_NONE = 0, //!< No type
BM_TYPE_USER, //!< in-memory
BM_TYPE_PCX, //!< PCX
BM_TYPE_TGA, //!< 16 or 32 bit targa
BM_TYPE_DDS, //!< generic identifier for DDS
BM_TYPE_PNG, //!< PNG
BM_TYPE_JPG, //!< 32 bit jpeg
BM_TYPE_ANI, //!< in-house ANI format
BM_TYPE_EFF, //!< specifies any type of animated image, the EFF itself is just text
// no-type ( used in: bm_bitmaps[i].type )
#define BM_TYPE_NONE 0
// in-memory type ( used in: bm_bitmaps[i].type )
#define BM_TYPE_USER 1
// file-type types ( used in: bm_bitmaps[i].type )
#define BM_TYPE_PCX 2
#define BM_TYPE_TGA 3 // 16 or 32 bit targa
#define BM_TYPE_DDS 4 // generic identifier for DDS
#define BM_TYPE_PNG 5 // PNG
#define BM_TYPE_JPG 6 // 32 bit jpeg
#define BM_TYPE_ANI 7 // in-house ANI format
#define BM_TYPE_EFF 8 // specifies any type of animated image, the EFF itself is just text
// c-type types ( used in: bm_bitmaps[i].c_type )
#define BM_TYPE_DXT1 9 // 24 bit with switchable alpha (compressed)
#define BM_TYPE_DXT3 10 // 32 bit with 4 bit alpha (compressed)
#define BM_TYPE_DXT5 11 // 32 bit with 8 bit alpha (compressed)
#define BM_TYPE_CUBEMAP_DDS 12 // generic DDS cubemap (uncompressed cubemap surface)
#define BM_TYPE_CUBEMAP_DXT1 13 // 24-bit cubemap (compressed cubemap surface)
#define BM_TYPE_CUBEMAP_DXT3 14 // 32-bit cubemap (compressed cubemap surface)
#define BM_TYPE_CUBEMAP_DXT5 15 // 32-bit cubemap (compressed cubemap surface)
// special types ( used in: bm_bitmaps[i].type )
#define BM_TYPE_RENDER_TARGET_STATIC 16 // 24/32 bit setup internally as a static render target
#define BM_TYPE_RENDER_TARGET_DYNAMIC 17 // 24/32 bit setup internally as a dynamic render target
// special types
BM_TYPE_RENDER_TARGET_STATIC, //!< 24/32 bit setup internally as a static render target
BM_TYPE_RENDER_TARGET_DYNAMIC, //!< 24/32 bit setup internally as a dynamic render target
// Compressed types (bitmap.c_type)
BM_TYPE_DXT1, //!< 24 bit with switchable alpha
BM_TYPE_DXT3, //!< 32 bit with 4 bit alpha
BM_TYPE_DXT5, //!< 32 bit with 8 bit alpha
BM_TYPE_CUBEMAP_DDS, //!< generic DDS cubemap (uncompressed cubemap surface)
BM_TYPE_CUBEMAP_DXT1, //!< 24-bit cubemap (compressed cubemap surface)
BM_TYPE_CUBEMAP_DXT3, //!< 32-bit cubemap (compressed cubemap surface)
BM_TYPE_CUBEMAP_DXT5 //!< 32-bit cubemap (compressed cubemap surface)
};
/// Moved from cpp file ///////////////////
// Consider these 'protected' structures and functions that should only be used by special bitmap functions
typedef union bm_extra_info {
union bm_extra_info {
struct {
// Stuff needed for animations
int first_frame; // used for animations -- points to index of first frame
int num_frames; // used for animation -- number of frames in the animation
int keyframe; // used for animation -- keyframe info
ubyte fps; // used for animation -- frames per second
int first_frame; //!< used for animations -- points to index of first frame
int num_frames; //!< used for animations -- number of frames in the animation
int keyframe; //!< used for animations -- keyframe info
ubyte fps; //!< used for animations -- frames per second
struct {
// stuff for static animations
ubyte type; // type for individual images
char filename[MAX_FILENAME_LEN]; // filename for individual images
ubyte type; //!< type for individual images
char filename[MAX_FILENAME_LEN]; //!< filename for individual images
} eff;
} ani;
struct {
// Stuff needed for user bitmaps
void *data; // For user bitmaps, this is where the data comes from
ubyte bpp; // For user bitmaps, this is what format the data is
ubyte flags; // Flags passed to bm_create
void* data; //!< For user bitmaps, this is where the data comes from
ubyte bpp; //!< For user bitmaps, this is what format the data is
ubyte flags; //!< For user bitmaps, Flags passed to bm_create
} user;
} bm_extra_info;
};
typedef struct bitmap_entry {
struct bitmap_entry {
// identification
char filename[MAX_FILENAME_LEN]; // filename for this bitmap
char filename[MAX_FILENAME_LEN]; //!< filename for this bitmap
uint signature; // a unique signature identifying the data
uint palette_checksum; // checksum used to be sure bitmap is in current palette
int handle; // Handle = id*MAX_BITMAPS + bitmapnum
int last_used; // When this bitmap was last used
uint signature; //!< a unique signature identifying the data
uint palette_checksum; //!< checksum used to be sure bitmap is in current palette
int handle; //!< Handle = id*MAX_BITMAPS + bitmapnum
int last_used; //!< When this bitmap was last used
ubyte type; // PCX, USER, ANI, etc
ubyte comp_type; // What sort of compressed type, BM_TYPE_NONE if not compressed
signed char ref_count; // Number of locks on bitmap. Can't unload unless ref_count is 0.
ubyte type; //!< PCX, USER, ANI, etc
ubyte comp_type; //!< What sort of compressed type, BM_TYPE_NONE if not compressed
signed char ref_count; //!< Number of locks on bitmap. Can't unload unless ref_count is 0.
int dir_type; // which directory this was loaded from (to skip other locations with same name)
int dir_type; //!< which directory this was loaded from (to skip other locations with same name)
// compressed bitmap stuff (.dds) - RT please take a look at this and tell me if we really need it
int mem_taken; // How much memory does this bitmap use? - UnknownPlayer
int num_mipmaps; // number of mipmap levels, we need to read all of them
int mem_taken; //!< How much memory does this bitmap use? - UnknownPlayer
int num_mipmaps; //!< number of mipmap levels, we need to read all of them
// Stuff to keep track of usage
ubyte preloaded; // If set, then this was loaded from the lst file
int preload_count; // how many times this gets used in game, for unlocking
ubyte used_flags; // What flags it was accessed thru
int load_count;
ubyte preloaded; //!< If set, then this was loaded from the lst file
int preload_count; //!< how many times this gets used in game, for unlocking
ubyte used_flags; //!< What flags it was accessed thru
int load_count;
// Bitmap info
bitmap bm;
bitmap bm; //!< Bitmap info
// Data for animations and user bitmaps
bm_extra_info info;
bm_extra_info info; //!< Data for animations and user bitmaps
#ifdef BMPMAN_NDEBUG
// bookeeping
ubyte used_last_frame; // If set, then it was used last frame
ubyte used_this_frame; // If set, then it was used this frame
int data_size; // How much data this bitmap uses
int used_count; // How many times it was accessed
ubyte used_last_frame; // If set, then it was used last frame
ubyte used_this_frame; // If set, then it was used this frame
int data_size; // How much data this bitmap uses
int used_count; // How many times it was accessed
#endif
} bitmap_entry;
};
extern bitmap_entry bm_bitmaps[MAX_BITMAPS];
// image specific lock functions
void bm_lock_ani( int handle, int bitmapnum, bitmap_entry *be, bitmap *bmp, ubyte bpp, ubyte flags );
void bm_lock_dds( int handle, int bitmapnum, bitmap_entry *be, bitmap *bmp, ubyte bpp, ubyte flags );
@@ -126,6 +124,4 @@ void bm_lock_tga( int handle, int bitmapnum, bitmap_entry *be, bitmap *bmp, ubyt
void bm_lock_user( int handle, int bitmapnum, bitmap_entry *be, bitmap *bmp, ubyte bpp, ubyte flags );
#endif // BMPMAN_INTERNAL
#endif // __BM_INTERNAL_H__
+1742 -1945
View File
File diff suppressed because it is too large. Load diff
+550 -201
View File
@@ -1,288 +1,637 @@
#ifndef _BMPMAN_H
#define _BMPMAN_H
/*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
*/
/**
* @file bmpman.h
* Header file for the bitmap manager (bmpman)
*/
/**
* @example bm_examples.cpp
* @brief This containes examples of bmpman usage
*/
#ifndef _BMPMAN_H
#define _BMPMAN_H
#include "globalincs/pstypes.h"
#include "cfile/cfile.h"
#include "globalincs/pstypes.h"
#ifndef NDEBUG
#define BMPMAN_NDEBUG
#define BMPMAN_NDEBUG //!< Enables BMPMAN debugging code
#endif
#define MAX_BITMAPS 4750 // How many bitmaps the game can handle
// NOTE: MAX_BITMAPS shouldn't need to be bumped again. With the fixed bm_release() and it's
// proper use even the largest missions should stay under this number. With the largest retail
// missions and wasteful content we should still have about 20% of the slots free. If it still
// goes over then it's something the artists need to fix. For instance the Terran Mara fighter,
// with -spec and -glow and using the Shinepack, needs 117 bitmap slots alone. 111 of those is
// just for the glowmaps. This number can be greatly reduced if the number of ani frames for
// another LOD than LOD0 has fewer or no ani frames. A 37 frame glow ani for LOD2 is little
// more than a waste of resources. Future reports of texture corruption should be initially
// approached with content as the cause and not code. If anything we could/should reduce
// MAX_BITMAPS in the future. Where it's at now should accomidate even the largest mods.
// -- Taylor
/**
* @defgroup BMPMAN_CONSTANTS Macro constants used in/with bmpman.h
*
* @{
*/
/**
* @brief How many bitmaps the game can handle
*
* @attention MAX_BITMAPS shouldn't need to be bumped again. With the fixed bm_release() and it's proper use even the
* largest missions should stay under this number. With the largest retail missions and wasteful content we should
* still have about 20% of the slots free. If it still goes over then it's something the artists need to fix.
* For instance the Terran Mara fighter, with -spec and -glow and using the Shinepack, needs 117 bitmap slots alone.
* 111 of those is just for the glowmaps. This number can be greatly reduced if the number of ani frames for another
* LOD than LOD0 has fewer or no ani frames. A 37 frame glow ani for LOD2 is little more than a waste of resources.
* Future reports of texture corruption should be initially approached with content as the cause and not code.
* If anything we could/should reduce MAX_BITMAPS in the future. Where it's at now should accomidate even the
* largest mods. -- Taylor
*/
#define MAX_BITMAPS 4750
#define BMP_AABITMAP (1<<0) // antialiased bitmap
#define BMP_TEX_XPARENT (1<<1) // transparent texture
#define BMP_TEX_OTHER (1<<2) // so we can identify all "normal" textures
#define BMP_TEX_DXT1 (1<<3) // dxt1 compressed 8r8g8b1a (24bit)
#define BMP_TEX_DXT3 (1<<4) // dxt3 compressed 8r8g8b4a (32bit)
#define BMP_TEX_DXT5 (1<<5) // dxt5 compressed 8r8g8b8a (32bit)
#define BMP_TEX_CUBEMAP (1<<6) // a texture made for cubic environment map
// Flag positions for bitmap.flags
// ***** NOTE: bitmap.flags is an 8-bit value, no more BMP_TEX_* flags can be added unless the type is changed!! ******
#define BMP_AABITMAP (1<<0) //!< antialiased bitmap
#define BMP_TEX_XPARENT (1<<1) //!< transparent texture
#define BMP_TEX_OTHER (1<<2) //!< so we can identify all "normal" textures
#define BMP_TEX_DXT1 (1<<3) //!< dxt1 compressed 8r8g8b1a (24bit)
#define BMP_TEX_DXT3 (1<<4) //!< dxt3 compressed 8r8g8b4a (32bit)
#define BMP_TEX_DXT5 (1<<5) //!< dxt5 compressed 8r8g8b8a (32bit)
#define BMP_TEX_CUBEMAP (1<<6) //!< a texture made for cubic environment map
//compressed texture types
#define BMP_TEX_COMP ( BMP_TEX_DXT1 | BMP_TEX_DXT3 | BMP_TEX_DXT5 )
// Combined flags
#define BMP_TEX_COMP ( BMP_TEX_DXT1 | BMP_TEX_DXT3 | BMP_TEX_DXT5 ) //!< Compressed textures
#define BMP_TEX_NONCOMP ( BMP_TEX_XPARENT | BMP_TEX_OTHER ) //!< Non-compressed textures
#define BMP_TEX_ANY ( BMP_TEX_COMP | BMP_TEX_NONCOMP ) //!< Any texture
//non compressed textures
#define BMP_TEX_NONCOMP ( BMP_TEX_XPARENT | BMP_TEX_OTHER )
// Flag positions for bitmap.type
#define BMP_FLAG_RENDER_TARGET_STATIC (1<<0) //!< Texture is a static type
#define BMP_FLAG_RENDER_TARGET_DYNAMIC (1<<1) //!< Texture is a dynamic type (animation)
#define BMP_FLAG_CUBEMAP (1<<2) //!< Texture is a cubemap
// any texture type
#define BMP_TEX_ANY ( BMP_TEX_COMP | BMP_TEX_NONCOMP )
/**
* @}
*/
#define BMP_FLAG_RENDER_TARGET_STATIC (1<<0)
#define BMP_FLAG_RENDER_TARGET_DYNAMIC (1<<1)
#define BMP_FLAG_CUBEMAP (1<<2)
struct bitmap
{
short w; //!< Width, in number of pixels
short h; //!< Height, in number of pixels
short rowsize; //!< What you need to add to go to next row
ubyte bpp; //!< Requested bitdepth of each pixel. ( 7, 8, 15, 16, 24, 32)
ubyte true_bpp; //!< The image's actual bitdepth
ubyte flags; //!< Various texture type flags. @see BMPMAN_CONSTANTS
ptr_u data; //!< Pointer to data, or maybe offset into VRAM.
ubyte *palette; /**< @brief Pointer to this bitmap's palette (if it has one).
* @details If BMP_NO_PALETTE_MAP flag is cleared, this palette just points to the screen palette. (gr_palette)
*/
};
typedef struct bitmap {
short w, h; // Width and height
short rowsize; // What you need to add to go to next row
ubyte bpp; // How many bits per pixel it is. (7,8,15,16,24,32) (what is requested)
ubyte true_bpp; // How many bits per pixel the image actually is.
ubyte flags; // See the BMP_???? defines for values (this isn't for the BMP_FLAG_* stuff)
ptr_u data; // Pointer to data, or maybe offset into VRAM.
ubyte *palette; // If bpp==8, this is pointer to palette. If the BMP_NO_PALETTE_MAP flag
// is not set, this palette just points to the screen palette. (gr_palette)
} bitmap;
extern int bm_texture_ram; //!< how many bytes of textures are used.
extern int Bm_paging; //!< Bool type that indicates if BMPMAN is currently paging.
extern int Bm_paging;
extern const ubyte bm_type_list[]; //!< List of valid bitmap types
extern const char *bm_ext_list[]; //!< List of extensions for those types
extern const int BM_NUM_TYPES; //!< Calculated number of bitmap types
extern const ubyte bm_ani_type_list[]; //!< List of valid bitmap animation types
extern const char *bm_ani_ext_list[]; //!< List of extensions for those types
extern const int BM_ANI_NUM_TYPES; //!< Calculated number of bitmap animation types
extern int GLOWMAP; //!< References a map that is a fully lit version of its index -Bobboau
extern int SPECMAP; //!< References a map that is for specular mapping -Bobboau
extern int ENVMAP; //!< References a map that is for environment mapping -Bobboau
extern int NORMMAP; //!< Normal mapping
extern int HEIGHTMAP; //!< Height map for normal mapping
extern int MISCMAP; //!< Utility map, to be utilized for various things shader authors can come up with
/**
* @brief Initilizes the bitmap manager
*/
void bm_init();
/**
* @brief Closes the bitmap manager, freeing any allocated memory used by bitmaps. Is called at program close.
*/
void bm_close();
int bm_get_cache_slot( int bitmap_id, int separate_ani_frames );
/**
* Gets the cache slot of the bitmap indexed by handle.
*
* @details if the bitmap is an ani, gets the first frame
*
* @returns The cache slot index of the bitmap if handle is valid
*
* @note If the handle is invalid, an Assert() fails
*/
int bm_get_cache_slot(int bitmap_id, int separate_ani_frames);
/**
* @brief Gets the next available bitmap slot.
*/
int bm_get_next_handle();
void *bm_malloc(int n, int size);
/**
* @brief Allocates memory for the given handle.
*
* @returns A pointer to the allocated vm if successful,
* @returns Null, if unsuccessful
*
* @note z64 - This function looks fishy. Not only is handle not used in release builds, but bm_bitmaps[handle].size
* and bm_texture_size aren't modified unless this is a debug build
*/
void *bm_malloc(int handle, int size);
/**
* @brief (DEBUG) Similar to bm_malloc, but only updates how much memory is used
*
* @note z64 - Also fishy (see bm_malloc)
*/
void bm_update_memory_used(int n, int size);
// how many bytes of textures are used.
extern int bm_texture_ram;
// This loads a bitmap so we can draw with it later.
// It returns a negative number if it couldn't load
// the bitmap. On success, it returns the bitmap
// number.
/**
* @brief Loads a bitmap so we can draw with it later.
*
* @param filename
*
* @returns The bitmap number if successful, else
* @returns a negative value if not
*/
int bm_load(const char* filename);
/**
* @brief Loads a bitmap so we can draw with it later. (Preferred version)
*
* @param filename
*
* @returns The bitmap number if successful, else
* @returns a negative value if not
*/
int bm_load(const SCP_string& filename);
// special load function. basically allows you to load a bitmap which already exists (by filename).
// this is useful because in some cases we need to have a bitmap which is locked in screen format
// _and_ texture format, such as pilot pics and squad logos
/**
* @brief Reloads a bitmap as a duplicate.
*
* @details This function basically allows you to load a bitmap which already exists (by filename). This is useful
* because in some cases we need to have a bitmap which is locked in screen format _and_ texture format, such as
* the pilot pics and squad logos
*
* @param filename
*
* @returns The bitmap number if successful, else
* @returns a negative value if not
*/
int bm_load_duplicate(const char *filename);
// Creates a bitmap that exists in RAM somewhere, instead
// of coming from a disk file. You pass in a pointer to a
// block of data. The data can be in the following formats:
// 8 bpp (mapped into game palette)
// 32 bpp
// On success, it returns the bitmap number. You cannot
// free that RAM until bm_release is called on that bitmap.
// See example at bottom of this file
int bm_create( int bpp, int w, int h, void *data = NULL, int flags = 0);
/**
* Loads a bitmap which exists somewhere in the RAM.
*
* @param bpp The bitdepth of the bitmap
* @param w The width of the bitmap
* @param h The height of the bitmap
* @param[in] data The bitmap's data glob
* @param flags
*
* @note The used RAM cannot be freed until bm_release is called on the created bitmap
*/
int bm_create(int bpp, int w, int h, void *data = NULL, int flags = 0);
// Frees up a bitmap's data, but bitmap number 'n' can
// still be used, it will just have to be paged in next
// time it is locked.
int bm_unload( int n, int clear_render_targets = 0, bool nodebug = false);
/**
* @brief Unloads a bitmap's data, but not the bitmap info
*
* @details The bm number (n) may be reused once this function has been called on it. However, it will have to be paged
* in the next time it is locked.
// like bm_unload() except that it's safe to use to free data without worrying about
// load_count so it's safe to use in relation to bm_release() and in gr_*_texture functions
int bm_unload_fast( int n, int clear_render_targets = 0 );
* @param handle The index number of the bitmap to free
* @param clear_render_targets If true, release a render target
* @param nodebug If true, exclude certain debug messages
*
* @returns 0 if not successful,
* @returns 1 if successful
*/
int bm_unload(int handle, int clear_render_targets = 0, bool nodebug = false);
// Frees up a bitmap's data, and it's slot, so bitmap
// number 'n' cannot be used anymore, and bm_load or
// bm_create might reuse the slot.
int bm_release( int n, int clear_render_targets = 0 );
/**
* @brief Quickly unloads a bitmap's data, ignoring the load_count
*
* @details Similar to bm_unload(), except that it can be safely used to free data without worrying about load_count.
* It's safe to use in relation to bm_release() and in gr_*_texture functions
*
* @param handle The bm number of the bitmap to free
* @param clear_render_targets If true, release a render target
*
* @note bm_free_data_fast() is used here and NOT bm_free_data()
*/
int bm_unload_fast(int handle, int clear_render_targets = 0);
// This loads a bitmap sequence so we can draw with it later.
// It returns a negative number if it couldn't load
// the bitmap. On success, it returns the bitmap
// number of the first frame and nframes is set.
extern int bm_load_animation( const char *filename, int *nframes = NULL, int *fps = NULL, int *keyframe = NULL, int can_drop_frames = 0, int dir_type = CF_TYPE_ANY );
/**
* @brief Frees both a bitmap's data and it's associated slot.
*
* @details Once called, the bm number 'n' cannot be used until bm_load or bm_create is re-inits the slot.
*
* @param handle The index number of the bitmap to release
* @param clear_render_targets If nonzero, also release render targets
*
* @returns 1 on success,
* @returns 0 otherwise
*
* @note If the passed handle is that of an ANI, it frees EVERY frame. Be sure to only pass the handle of the first frame!
*
* @todo upgrade return type and clear_render_targets type to bools
*/
int bm_release(int handle, int clear_render_targets = 0);
//Loads either animation (bm_load_animation) or still image (bm_load)
extern int bm_load_either(const char *filename, int *nframes = NULL, int *fps = NULL, int *keyframe = NULL, int can_drop_frames = 0, int dir_type = CF_TYPE_ANY);
/**
* @brief Loads a bitmap sequance so we can draw with it.
*
* @param[in] filename
* @param[out] nframes If non-null, set to the number of frames the animation has
* @param[out] fps If non-null, set to the fps of this animation
* @param[out] keyframe if non null, set to the keyframe index of this animation
* @param[in] can_drop_frames If set, allows dropped frames
* @param[in] dir_type Directory type
*
* @returns The bm number of the first bitmap in the sequence if successful, or
* @returns A negative value if unsuccessful
*/
int bm_load_animation(const char *filename, int *nframes = NULL, int *fps = NULL, int *keyframe = NULL, int can_drop_frames = 0, int dir_type = CF_TYPE_ANY);
// This locks down a bitmap and returns a pointer to a bitmap
// that can be accessed until you call bm_unlock. Only lock
// a bitmap when you need it! This will convert it into the
// appropriate format also.
extern bitmap * bm_lock( int bitmapnum, ubyte bpp, ubyte flags, bool nodebug = false);
/**
* @brief Loads either animation (bm_load_animation) or still image (bm_load)
*
* @param[in] filename
* @param[out] nframes If non-null and loading was successful, set to the number of frames the animation has
* @param[out] fps If non-null and loading was successful, set to the fps of this animation
* @param[out] keyframe if non null and loading was successful, set to the keyframe index of this animation
* @param[in] can_drop_frames
* @param[in] dir_type
*
* @returns The bm number of the first bitmap in the sequence if successful, or
* @returns A negative value if unsuccessful
*/
int bm_load_either(const char *filename, int *nframes = NULL, int *fps = NULL, int *keyframe = NULL, int can_drop_frames = 0, int dir_type = CF_TYPE_ANY);
// The signature is a field that gets filled in with
// a unique signature for each bitmap. The signature for each bitmap
// will also change when the bitmap's data changes.
extern uint bm_get_signature( int bitmapnum);
/**
* @brief Locks down the bitmap indexed by bitmapnum.
*
* @details Also converts the bitmap to the appropriate format specified by bpp and flags. Only lock a bitmap when you
* need it!
*
* @param bitmapnum The number indexing the desired bitmap
* @param bpp The desired bpp of the bitmep
* @param flags The desired bitmap format
* @param nodebug
//gets the image type
* @returns A pointer to the bitmap that's valid until bm_unlock is called if successful, or
* @returns NULL if unsuccessful
*/
bitmap* bm_lock(int handle, ubyte bpp, ubyte flags, bool nodebug = false);
/**
* @brief Returns a unique signiature for the bitmap indexed by handle
*
* @details A signature will change when the bitmap's data changes
*/
uint bm_get_signature(int handle);
/**
* @brief Returns the image type of the given bitmap handle
*/
ubyte bm_get_type(int handle);
// Unlocks a bitmap
extern void bm_unlock( int bitmapnum );
/**
* @brief Unlocks a bitmap
*
* @details Decrements the ref_count member of the bitmap_entry struct, A bitmap can only be unloaded when the
* ref_count is 0
*/
void bm_unlock(int handle);
//WMC - Returns 0 if invalid, nonzero if valid
extern int bm_is_valid(int handle);
/**
* @brief Checks if the bitmap indexed by handle is valid
*
* @details Some early known false or out of range handles (such as negative) are checked within
* an initial routine pass, followed by a more thorough check routine to ensure the
* series of bitmaps within the bm_bitmaps[] structure have not become invalid.
*
* @returns Nonzero if valid, else
* @returns Zero otherwise
*
* @todo z64 - Returned value is essentially a bool type, need to check all caller functions to see if it can safely
* be updated to reflect this
*/
int bm_is_valid(int handle);
// Gets info. w,h,or flags,nframes or fps can be NULL if you don't care.
//WMC - Returns -1 on failure, handle or first frame handle on success.
int bm_get_info( int bitmapnum, int *w=NULL, int * h=NULL, ubyte * flags=NULL, int *nframes=NULL, int *fps=NULL );
/**
* @brief Gets info on the bitmap indexed by handle.
*
* @param[out] w If non-null, gets the width
* @param[out] h If non-null, gets the heigth
* @param[out] flags If non-null, gets the flags
* @param[out] nframs If non-null, gets the nframes
* @param[out] fps If non-null, gets the fps
*
* @returns The handle on success, or
* @returns The handle to the first frame on success, or
* @returns -1 on failure
*/
int bm_get_info(int handle, int *w = NULL, int * h = NULL, ubyte * flags = NULL, int *nframes = NULL, int *fps = NULL);
// get filename
extern void bm_get_filename(int bitmapnum, char *filename);
/**
* @brief Gets the filename of the bitmap indexed by handle
*
* @param[out] filename The filename of the bitmap, if successful. Is set to an empty string if unseccessful
*
* @todo z64 - maybe deprecate this in favor of an SCP_string version
*/
void bm_get_filename(int bitmapnum, char *filename);
// call to load all data for all bitmaps that have been requested to be loaded
extern void bm_gfx_load_all();
extern void bm_unload_all();
/**
* @brief Gets the filename of the bitmap indexed by handle, which must exist.
*
* @details If the bitmap does not exist (i.e. the handle is invalid), then an Assertion halts program execution.
*
* @returns A const char* to the filename of the bitmap
*
* @todo z64 - maybe deprecate this in favor of an SCP_string version.
* @todo z64 - maybe combine this with the other bm_get_filename function like so:
* void bm_get_filename(int handle, SCP_string *filename, bool must_exist = false);
*/
const char *bm_get_filename(int handle);
// call to get the palette for a bitmap
void bm_get_palette(int n, ubyte *pal, char *name);
/**
* @brief Loads all data for all bitmaps that have been requested to be loaded
*
* @note This function is not defined.
*/
void bm_gfx_load_all();
// Hacked function to get a pixel from a bitmap.
// Only works good in 8bpp mode.
void bm_gfx_get_pixel( int bitmap, float u, float v, ubyte *r, ubyte *g, ubyte *b );
/**
* @brief Unloads all used bitmaps, should only ever be called by game_shutdown()
*
* @todo Maybe move this declaration into bmpman.cpp and then extern this function within game_shutdown() to
* ensure it only ever gets called there.
*/
void bm_unload_all();
// Returns number of bytes of bitmaps locked this frame
// ntotal = number of bytes of bitmaps locked this frame
// nnew = number of bytes of bitmaps locked this frame that weren't locked last frame
/**
* @brief Gets the palette for a given bitmap indexed by handle, and optionally the filename
*
* @param[out] pal Is set to reference the bitmap's palette
* @param[out] name (optional) Is set to the bitmap's filename
*
* @todo Maybe get rid of the optional filename and have the callers call bm_get_filename. Less efficient, however.
*/
void bm_get_palette(int handle, ubyte *pal, char *name);
/**
* @brief Hack to get a pixel from a bitmap
*
* @details only works good in 8bpp mode
*
* @note This function is not defined.
*/
void bm_gfx_get_pixel(int bitmap, float u, float v, ubyte *r, ubyte *g, ubyte *b);
/**
* @brief (DEBUG) Gets memory size, in bytes, of the locked bitmaps
*
* @details Both params are non-optional, and must be non-null. There's currently no safety checks on either.
*
* @param ntotal[out] Memory size, in bytes, of the locked bitmaps
* @param nnew[out] Memory size, in bytes, of the bitmaps that were locked since the last frame
*
* @note This is a debug function, and is undefined within release builds
*/
void bm_get_frame_usage(int *ntotal, int *nnew);
// Reload a different image into an existing bmpman slot
/**
* @brief Reloads an existing bmpman slot with different bitmap
*
* @param[in] filename The filename of the image to load
*
* @returns The bitmap handle on success, or
* @returns A negative value on failure
*
* @note This should only be used if you are certain the new picture is the same type, has same dimensions, etc.
*/
int bm_reload(int bitmap_handle, const char* filename);
/*
* Example on using bm_create
*
{
static int test_inited = 0;
static int test_bmp;
static uint test_bmp_data[128*64];
if ( !test_inited ) {
test_inited = 1;
// Create the new bitmap and fill in its data.
// When you're done with it completely, call
// bm_release to free up the bitmap handle
test_bmp = bm_create( 32, 128, 64, test_bmp_data );
int i,j;
for (i=0; i<64; i++ ) {
for (j=0; j<64; j++ ) {
uint r=i*4;
test_bmp_data[j+i*128] = r;
}
}
}
bm_unload(test_bmp); // this pages out the data, so that the
// next bm_lock will convert the new data to the
// correct bpp
// put in new data
int x,y;
gr_reset_clip();
for (y=0; y<64; y++)
for (x=0; x<128; x++ )
test_bmp_data[y*128+x] = 15;
// Draw the bitmap to upper left corner
gr_set_bitmap(test_bmp);
gr_bitmap( 0,0 );
}
*/
//============================================================================
// Paging stuff
//============================================================================
/**
* @brief Tells bmpman to start keeping track of what bitmaps are used where
*/
void bm_page_in_start();
/**
* @brief Tells bmpman to stop paging (?)
*/
void bm_page_in_stop();
// Paging code in a library should call these functions
// in its page in function.
// Marks a texture as being used for this level
// If num_frames is passed, assume this is an animation
void bm_page_in_texture( int bitmapnum, int num_frames = 0 );
/**
* @brief Marks a texture as being used for this level
*
* @param[in] num_frames If specified, assumes this is an animated texture
*/
void bm_page_in_texture(int bitmapnum, int num_frames = 0);
// marks a texture as being a transparent textyre used for this level
// Marks a texture as being used for this level
// If num_frames is passed, assume this is an animation
void bm_page_in_xparent_texture( int bitmapnum, int num_frames=1 );
/**
* @brief Marks a textures as being used for level and is transparant
*
* @param[in] num_frames If specified, assumes this is an animated texture
*/
void bm_page_in_xparent_texture(int bitmapnum, int num_frames = 1);
// Marks an aabitmap as being used for this level
// If num_frames is passed, assume this is an animation
void bm_page_in_aabitmap( int bitmapnum, int num_frames=1 );
/**
* @brief Marks a texture as being used for this level, and is anti-aliased
*
* @param[in] num_frames If specified, assumes this is an animated texture
*/
void bm_page_in_aabitmap(int bitmapnum, int num_frames = 1);
// unload a texture that was paged in
int bm_page_out( int handle );
/**
* @brief Unloads the bitmap indexed by handle that was previously paged-in
*
* @returns 0 If the bitmap had already been released, or
* @returns 0 If the handle is invalid, or
* @returns 1 If successful
*
* @todo The return type should be a bool
*/
int bm_page_out(int handle);
//
// Mode: 0 = High memory
// 1 = Low memory ( every other frame of ani's)
// 2 = Debug low memory ( only use first frame of each ani )
void bm_set_low_mem( int mode );
const char *bm_get_filename(int handle);
/**
* @brief Sets BMPMAN's memory mode
*
* @details 0 = High memory;
* 1 = Low memory (loads every other frame of ani's);
* 2 = Debug low memory (only use first frame of each ani)
*
* @todo This should use an enum, or instead allow an arbitrary number to drop frames (like 1/2, 1/3, etc.)
*/
void bm_set_low_mem(int mode);
/**
* @brief Sets bm_set_components and bm_get_components to reference screen format functions
*/
void BM_SELECT_SCREEN_FORMAT();
/**
* @brief Sets bm_set_components and bm_get_components to reference texture format functions
*/
void BM_SELECT_TEX_FORMAT();
/**
* @brief Sets bm_set_components and bm_get_components to reference texture format functions (with alpha)
*/
void BM_SELECT_ALPHA_TEX_FORMAT();
// set the rgba components of a pixel, any of the parameters can be NULL
extern void (*bm_set_components)(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
extern void (*bm_set_components_32)(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
void bm_set_components_argb_d3d_16_screen(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
void bm_set_components_argb_d3d_32_screen(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
void bm_set_components_argb_d3d_16_tex(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
void bm_set_components_argb_d3d_32_tex(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
/**
* @brief Functional pointer that references any of the bm_set_components functions.
*
* @details The bm_set_components functions packs the RGBA values into the ubyte array referenced by pixel, whose
* format differs according to its bpp value and presence of an alpha channel. The RGBA values are scaled accordingly.
*
* @param[out] pixel The pixel to set
* @param[in] r Red value (may not be NULL)
* @param[in] g Green value (may not be NULL)
* @param[in] b Blue value (may not be NULL)
* @param[in] a Alpha value (currently ignored)
*
* @note z64 - These functions were made predating the introduction of C++ classes, and are basically the equivalent
* of Pixel::set(ubyte *r, ubyte *b, ubyte *g). The original comment mentions that any of the rgba params may be
* NULL, but this is by far _NOT_ the case, as a NULL value will cause undefined behavior (really really bad chroma
* corruption)
*
* @note These functions assume the incoming bitdepth will always be >= to the outgoing bitdepth of the pixel. Should
* the incoming bitdepth be lower, the outgoing values will appear darker than they should be
*/
extern void(*bm_set_components)(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
// get the rgba components of a pixel, any of the parameters can be NULL
/**
* @brief Functional pointer that references any of the bm_set_components_32 functions.
*
* @details The bm_set_components functions packs the RGBA values into the ubyte array referenced by pixel, whose
* format differs according to its bpp value and presence of an alpha channel. The RGBA values are scaled accordingly.
*
* @see bm_set_components
*/
extern void(*bm_set_components_32)(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
/**
* @brief Sets the 16bpp screen pixel to the specified RGBA value
*
* @see bm_set_components
*/
void bm_set_components_argb_16_screen(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
/**
* @brief Sets the 32bpp screen pixel to the specified RGBA value
*
* @see bm_set_components
*/
void bm_set_components_argb_32_screen(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
/**
* @brief Sets the 16bpp texture pixel to the specified RGBA value
*
* @see bm_set_components
*/
void bm_set_components_argb_16_tex(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
/**
* @brief Sets the 32bpp texture pixel to the specified RGBA value
*
* @see bm_set_components
*/
void bm_set_components_argb_32_tex(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
/**
* @brief Gets the RGBA components of a pixel according to the selected mode
*
* @see BM_SELECT_SCREEN_FORMAT() BM_SELECT_TEX_FORMAT() BM_SELECT_ALPHA_TEX_FORMAT()
*/
void bm_get_components(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
extern int GLOWMAP; //this holds a reference to a map that is a fully lit version of its index -Bobboau
extern int SPECMAP; //this holds a reference to a map that is for specular mapping -Bobboau
extern int ENVMAP; //this holds a reference to a map that is for environment mapping -Bobboau
extern int NORMMAP; // normal mapping
extern int HEIGHTMAP; // height map for normal mapping
extern int MISCMAP; // Utility map, to be utilized for various things shader authors can come up with
/**
* @brief Returns the compression type of the bitmap indexed by handle
*/
int bm_is_compressed(int handle);
int bm_is_compressed(int num);
int bm_get_tcache_type(int num);
int bm_get_size(int num);
int bm_get_num_mipmaps(int num);
/**
* @brief Gets the correct TCACHE_TYPE for compressed graphics (uncompressed are assumed TCACHE_TYPE_NORMAL)
*/
int bm_get_tcache_type(int handle);
/**
* @brief Gets the size, in bytes, taken up by the bitmap indexed by handle
*
* @todo retval should be a size_t
*/
int bm_get_size(int handle);
/**
* @brief Gets the number of mipmaps of the indexed texture
*/
int bm_get_num_mipmaps(int handle);
/**
* @brief Checks to see if the indexed bitmap has an alpha channel
*
* @note Currently just checks if the bitmap is 32bpp and is not a .PCX
*
* @todo retval should be a bool
*/
int bm_has_alpha_channel(int handle);
/**
* @brief (DEBUG) Prints all loaded bitmaps to an outwindow
*/
void bm_print_bitmaps();
int bm_make_render_target( int width, int height, int flags );
int bm_is_render_target(int bitmap_id);
/**
* @brief Creates a render target as close to the desired resolution as possible.
*
* @returns the handle of an avilable render target if successful, or
* @returns -1 if not successful
*
* @note BM_FLAG_RENDER_TARGET_STATIC are drawn once/infrequently, while BM_FLAG_RENDER_TARGET_DYNAMIC are drawn roughly once every frame
*/
int bm_make_render_target(int width, int height, int flags);
/**
* @brief Checks to see if the given bitmap indexed by handle is a render target
*
* @returns The render type (BM_TYPE) if it is a render target, or
* @returns 0 if it is not
*/
int bm_is_render_target(int handle);
/**
* @brief (GR function) Calls gr_bm_set_render target for the given bitmap indexed by handle
*
* @returns 1 if successful, or
* @returns 0 if unsuccessful
*
* @todo retval should be a bool
*/
int bm_set_render_target(int handle, int face = -1);
/**
* @brief Loads and parses an .EFF
*
* @param[in] filename The filename of the .EFF
* @param[in] dir_type
* @param[out] nframes (optional) If given, is set to the number of frames this .EFF has
* @param[out] nfps (optional) If given, is set to the fps of this .EFF
* @param[out] key (optional) If given, is set to the keyframe index of this .EFF
* @param[out] type (optional) If given, is set to the BM_TYPE of the .EFF
*
* @returns 0 If successful,
* @returns -1 if not successful
*
* @todo retval should be a bool
*/
int bm_load_and_parse_eff(const char *filename, int dir_type, int *nframes, int *nfps, int *key, ubyte *type);
#endif
+4 -3
View File
@@ -25,6 +25,9 @@
extern int Game_mode;
const char *movie_ext_list[] = { ".ogg", ".mve" };
const int NUM_MOVIE_EXT = sizeof(movie_ext_list) / sizeof(char*);
#define MOVIE_NONE -1
#define MOVIE_OGG 0
@@ -42,8 +45,6 @@ int movie_find(char *filename, char *out_name)
char full_path[MAX_PATH];
char tmp_name[MAX_PATH];
int size, offset = 0;
const int NUM_EXT = 2;
const char *movie_ext[NUM_EXT] = { ".ogg", ".mve" };
if (out_name == NULL)
return MOVIE_NONE;
@@ -57,7 +58,7 @@ int movie_find(char *filename, char *out_name)
char *p = strrchr(tmp_name, '.');
if ( p ) *p = 0;
int rc = cf_find_file_location_ext(tmp_name, NUM_EXT, movie_ext, CF_TYPE_ANY, sizeof(full_path) - 1, full_path, &size, &offset, 0);
int rc = cf_find_file_location_ext(tmp_name, NUM_MOVIE_EXT, movie_ext_list, CF_TYPE_ANY, sizeof(full_path) - 1, full_path, &size, &offset, 0);
if (rc == MOVIE_NONE)
return MOVIE_NONE;
+3
View File
@@ -12,6 +12,9 @@
#ifndef _MOVIE_HEADER_FILE
#define _MOVIE_HEADER_FILE
extern const char *movie_ext_list[];
extern const int NUM_MOVIE_EXT;
bool movie_play(char *name);
void movie_play_two(char *name1, char *name2);
+6 -8
View File
@@ -9,10 +9,8 @@
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////
// Testing Goals
// Breakpoints are set at places that need testing:
// * the value of endptr strtol and strtoul needs to investigated, according to cplusplus.com, *endptr = end of the string that was successfully converted
// TODO: Make a fast version of the parse_long, parse_ulong, etc. That just checks the first 1-3 characters. The fast version will be used in retail builds while the slow/safe version will be in debug's
// @todo Make a fast version of the parse_long, parse_ulong, etc. That just checks the first 1-3 characters. The fast version will be used in retail builds while the slow/safe version will be in debug's
// @todo Maybe make parser functions case-insensitive
////////////////
#include "debugconsole/consoleparse.h"
@@ -466,7 +464,7 @@ void dc_required_string(char *pstr)
dc_ignore_gray_space();
if (strnicmp(pstr, Cp, strlen(pstr))) {
if (strncmp(pstr, Cp, strlen(pstr)) == 0) {
str_found = pstr;
}
@@ -492,10 +490,10 @@ int dc_required_string_either(char *str1, char *str2)
dc_ignore_gray_space();
if (strncmp(str1, Cp, strlen(str1) == 0)) {
if (strncmp(str1, Cp, strlen(str1)) == 0) {
str_found = str1;
i = 0;
} else if (strncmp(str2, Cp, strlen(str2) == 0)) {
} else if (strncmp(str2, Cp, strlen(str2)) == 0) {
str_found = str2;
i = 1;
}
@@ -563,7 +561,7 @@ bool dc_optional_string(const char *pstr)
{
dc_ignore_gray_space();
if (strncmp(pstr, Cp, strlen(pstr) != 0)) {
if (strncmp(pstr, Cp, strlen(pstr)) != 0) {
return false;
} // Else, optional string was found
+6 -6
View File
@@ -623,7 +623,7 @@ CAPTION "About FRED2"
FONT 8, "MS Sans Serif"
BEGIN
ICON IDR_MAINFRAME,IDC_STATIC,10,17,20,20,SS_REALSIZEIMAGE
LTEXT "FRED2_OPEN - FreeSpace Editor, Version 3.7.1 OpenGL",IDC_STATIC,39,8,184,10,SS_NOPREFIX
LTEXT "FRED2_OPEN - FreeSpace Editor, Version 3.7.3 OpenGL",IDC_STATIC,39,8,184,10,SS_NOPREFIX
LTEXT "Copyright © 1999 Volition, Inc. All Rights Reserved",IDC_STATIC,39,17,164,8
DEFPUSHBUTTON "OK",IDOK,229,7,48,14,WS_GROUP
LTEXT """Fred2 is the omega of all giant unwieldy pieces of code. Its big, its horrifying, and it just doesn't care. View it at your own risk."" - Dave Baranec",IDC_STATIC,39,62,238,20
@@ -2121,12 +2121,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Volition Inc."
VALUE "FileDescription", "Fred 2 Open"
VALUE "FileVersion", "3.7.1.000000"
VALUE "FileVersion", "3.7.3.000000"
VALUE "InternalName", "Fred 2 Open"
VALUE "LegalCopyright", "Copyright © 1998"
VALUE "OriginalFilename", "fred2.exe"
VALUE "ProductName", "Fred 2 Open"
VALUE "ProductVersion", "3.7.1"
VALUE "ProductVersion", "3.7.3"
END
END
BLOCK "VarFileInfo"
@@ -2696,12 +2696,12 @@ IDC_CURSOR2 CURSOR "res\\cursor2.cur"
// String Table
//
STRINGTABLE
STRINGTABLE
BEGIN
IDR_MAINFRAME "FRED2_OPEN 3.7.1 - FreeSpace2 Mission Editor\nUntitled\nFRED2\nFreeSpace2 Missions (*.fs2)\n.fs2\nFreeSpace2Mission\nFreeSpace2 Mission"
IDR_MAINFRAME "FRED2_OPEN 3.7.3 - FreeSpace2 Mission Editor\nUntitled\nFRED2\nFreeSpace2 Missions (*.fs2)\n.fs2\nFreeSpace2Mission\nFreeSpace2 Mission"
END
STRINGTABLE
STRINGTABLE
BEGIN
AFX_IDS_APP_TITLE "FRED2"
AFX_IDS_IDLEMESSAGE "For Help, press F1"
+1 -1
View File
@@ -1482,7 +1482,7 @@ int game_start_mission()
int e1 = timer_get_milliseconds();
printf("Level load took %f seconds.\n", (e1 - s1) / 1000.0f );
mprintf(("Level load took %f seconds.\n", (e1 - s1) / 1000.0f ));
return 1;
}
+4 -4
View File
@@ -336,8 +336,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,7,1,000000
PRODUCTVERSION 3,7,1,000000
FILEVERSION 3,7,3,000000
PRODUCTVERSION 3,7,3,000000
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -354,12 +354,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Volition Inc."
VALUE "FileDescription", "FreeSpace 2 Open"
VALUE "FileVersion", "3.7.1.000000"
VALUE "FileVersion", "3.7.3.000000"
VALUE "InternalName", "FreeSpace 2 Open"
VALUE "LegalCopyright", "Copyright © 1998"
VALUE "OriginalFilename", "fs2.exe"
VALUE "ProductName", "FreeSpace 2 Open"
VALUE "ProductVersion", "3.7.1"
VALUE "ProductVersion", "3.7.3"
END
END
BLOCK "VarFileInfo"
+2 -4
View File
@@ -1360,10 +1360,8 @@ void parse_menumusic()
// Goober5000 - check for existence of file
// taylor - check for all file types
const int NUM_EXT = 2;
const char *exts[NUM_EXT] = { ".ogg", ".wav" };
if ( cf_exists_full_ext(Spooled_music[idx].filename, CF_TYPE_MUSIC, NUM_EXT, exts) )
// chief1983 - use type list defined in audiostr.h
if ( cf_exists_full_ext(Spooled_music[idx].filename, CF_TYPE_MUSIC, NUM_AUDIO_EXT, audio_ext_list) )
Spooled_music[idx].flags |= SMF_VALID;
if (!nocreate)
+1 -1
View File
@@ -34,7 +34,7 @@
#define FS_VERSION_MAJOR 3 // major version
#define FS_VERSION_MINOR 7 // increase by 1 for minor revs
#define FS_VERSION_BUILD 1 // bugfix release
#define FS_VERSION_BUILD 3 // bugfix release
#define FS_VERSION_REVIS 000000 // SVN revision
//#define FS_VERSION_IDENT NOX("custom") // special build release identifier, must be a string (don't define unless it's supposed to be used!!)
+11
View File
@@ -20,6 +20,17 @@
//we check background type to avoid messed up colours for ANI
#define ANI_BPP_CHECK (ga->ani.bg_type == BM_TYPE_PCX) ? 16 : 32
// These two functions find if a bitmap or animation exists by filename, no extension needed.
bool generic_bitmap_exists(const char *filename)
{
return cf_exists_full_ext(filename, CF_TYPE_ANY, BM_NUM_TYPES, bm_ext_list);
}
bool generic_anim_exists(const char *filename)
{
return cf_exists_full_ext(filename, CF_TYPE_ANY, BM_ANI_NUM_TYPES, bm_ani_ext_list);
}
// Goober5000
int generic_anim_init_and_stream(generic_anim *anim, const char *anim_filename, ubyte bg_type, bool attempt_hi_res)
{
+2
View File
@@ -52,6 +52,8 @@ typedef struct generic_bitmap {
int bitmap_id;
} generic_bitmap;
bool generic_bitmap_exists(const char *filename);
bool generic_anim_exists(const char *filename);
int generic_anim_init_and_stream(generic_anim *anim, const char *anim_filename, ubyte bg_type, bool attempt_hi_res);
void generic_anim_init(generic_anim *ga);
void generic_anim_init(generic_anim *ga, const char *filename);
+2 -2
View File
@@ -704,7 +704,7 @@ static bool opengl_post_init_table()
if (optional_string("#Effects")) {
while ( !required_string_3("$Name:", "#Ship Effects", "#End") ) {
while ( !required_string_one_of(3, "$Name:", "#Ship Effects", "#End") ) {
char tbuf[NAME_LENGTH+1] = { 0 };
post_effect_t eff;
@@ -752,7 +752,7 @@ static bool opengl_post_init_table()
Ship_effects.push_back(se1);
if (optional_string("#Ship Effects")) {
while ( !required_string_3("$Name:", "#Light Shafts", "#End") ) {
while ( !required_string_one_of(3, "$Name:", "#Light Shafts", "#End") ) {
ship_effect se;
char tbuf[NAME_LENGTH] = { 0 };
+4
View File
@@ -192,6 +192,10 @@ int gr_opengl_create_stream_buffer()
{
opengl_vertex_buffer buffer;
if ( !Use_VBOs ) {
return -1;
}
vglGenBuffersARB(1, &buffer.vbo);
GL_vertex_buffers.push_back(buffer);
-53
View File
@@ -151,49 +151,6 @@ int Supernova_coords[GR_NUM_RESOLUTIONS][2] = {
}
};
// used to draw the kills gauge
hud_frames Kills_gauge;
int Kills_gauge_loaded = 0;
int Kills_gauge_coords[GR_NUM_RESOLUTIONS][2] = {
{ // GR_640
497, 361
},
{ // GR_1024
880, 624
}
};
int Kills_text_coords[GR_NUM_RESOLUTIONS][2] = {
{ // GR_640
503, 365
},
{ // GR_1024
886, 628
}
};
int Kills_text_val_coords_gr[GR_NUM_RESOLUTIONS][2] = {
{ // GR_640
615, 365
},
{ // GR_1024
984, 628
}
};
int Kills_text_val_coords[GR_NUM_RESOLUTIONS][2] = {
{ // GR_640
571, 365
},
{ // GR_1024
954, 628
}
};
char Kills_fname[GR_NUM_RESOLUTIONS][MAX_FILENAME_LEN] = {
"kills1",
"kills1"
};
// used to draw the hud support view
static int Hud_support_view_active;
static int Hud_support_view_abort; // active when we need to display abort message
@@ -237,7 +194,6 @@ int hud_subspace_notify_active();
int hud_objective_notify_active();
void hud_subspace_notify_abort();
void hud_maybe_display_subspace_notify();
void hud_init_kills_gauge();
int hud_maybe_render_emp_icon();
void hud_init_emp_icon();
@@ -1223,7 +1179,6 @@ void HUD_init()
hud_init_wingman_status_gauge();
hud_init_target_static();
hud_init_text_flash_gauge();
hud_init_kills_gauge();
hud_stop_subspace_notify();
hud_stop_objective_notify();
hud_target_last_transmit_level_init();
@@ -2571,14 +2526,6 @@ void HudGaugeLag::render(float frametime)
}
}
/**
* @brief Obsolete initializer for the kills gauge. Now superseded by the new HUD code.
*/
void hud_init_kills_gauge()
{
Kills_gauge_loaded = 1;
}
/**
* @brief Called at mission start to init data, and load support view bitmap if required
*/
+1 -1
View File
@@ -858,7 +858,7 @@ int hud_squadmsg_is_target_order_valid(int order, int find_order, ai_info *aip )
}
// if we are messaging a ship, and that ship is our target, no target type orders are ever active
if ( (Squad_msg_mode == SM_MODE_SHIP_COMMAND) && (target_objnum == Msg_instance) ){
if ( (Squad_msg_mode == SM_MODE_SHIP_COMMAND) && (Objects[target_objnum].instance == Msg_instance) ){
return 0;
}
+10 -15
View File
@@ -35,9 +35,9 @@
char *fs2_open_credit_text =
"SOURCE CODE PROJECT STAFF:\n"
"\n"
"Project Leaders:\n"
"Project Leader:\n"
"\n"
"Cliff \"chief1983\" Gordon\n"
"Fabian \"The E\" Woltermann\n"
"\n"
"Senior Advisors:\n"
"\n"
@@ -45,6 +45,7 @@ char *fs2_open_credit_text =
"Michael \"Zacam\" LaFleur\n"
"Taylor Richards\n"
"Edward \"Inquisitor\" Gardner\n"
"Cliff \"chief1983\" Gordon\n"
"\n"
"Programmers:\n"
"\n"
@@ -52,19 +53,13 @@ char *fs2_open_credit_text =
"Derek \"Kazan\" Meek\n"
"Nick \"phreak\" Iannetta\n"
"Mike \"Bobboau\" Abegg\n"
"Backslash\n"
"Echelon9\n"
"Flaming_Sword\n"
"FUBAR\n"
"Iss Mneur\n"
"kkmic\n"
"Shade\n"
"Soulstorm\n"
"Sushi\n"
"Swifty\n"
"Wanderer\n"
"Fabian \"The E\" Woltermann\n"
"CommanderDJ\n"
"Backslash, Echelon9, Flaming_Sword\n"
"FUBAR, Iss Mneur, kkmic\n"
"Shade, Soulstorm, Sushi\n"
"Swifty, Wanderer, CommanderDJ\n"
"Valathil, MageKing17, Yarn\n"
"m!m, z64555, zookeeper\n"
"jg18, niffiwan\n"
"\n"
"\n"
"Readme Staff:\n"
+8 -7
View File
@@ -59,7 +59,9 @@ extern void game_process_cheats(int k);
SCP_vector< SCP_vector<main_hall_defines> > Main_hall_defines;
main_hall_defines *Main_hall = NULL;
static main_hall_defines *Main_hall = NULL;
static int Main_hall_music_index = -1;
int Vasudan_funny = 0;
int Vasudan_funny_plate = -1;
@@ -439,7 +441,7 @@ void main_hall_init(const SCP_string &main_hall_name)
}
// if we're switching to a different mainhall we may need to change music
if (main_hall_get_music_index(main_hall_get_index(main_hall_to_load)) != main_hall_get_music_index(main_hall_id())) {
if (main_hall_get_music_index(main_hall_get_index(main_hall_to_load)) != Main_hall_music_index) {
main_hall_stop_music(true);
}
@@ -447,8 +449,8 @@ void main_hall_init(const SCP_string &main_hall_name)
snazzy_menu_init();
// assign the proper main hall data
Assert(main_hall_get_pointer(main_hall_to_load) != NULL);
Main_hall = main_hall_get_pointer(main_hall_to_load);
Assertion(Main_hall != NULL, "Failed to obtain pointer to main hall '%s'; get a coder!\n", main_hall_to_load.c_str());
// check if we have to change the ready room's description
if(Main_hall->default_readyroom) {
@@ -1138,7 +1140,6 @@ int main_hall_get_music_index(int main_hall_num)
*/
void main_hall_start_music()
{
int index;
char *filename;
// start a looping ambient sound
@@ -1155,13 +1156,13 @@ void main_hall_start_music()
}
// get music
index = main_hall_get_music_index(main_hall_id());
if (index < 0) {
Main_hall_music_index = main_hall_get_music_index(main_hall_id());
if (Main_hall_music_index < 0) {
nprintf(("Warning", "No music file exists to play music at the main menu!\n"));
return;
}
filename = Spooled_music[index].filename;
filename = Spooled_music[Main_hall_music_index].filename;
Assert(filename != NULL);
// get handle
+1 -1
View File
@@ -561,7 +561,7 @@ void parse_msgtbl()
// now we can start parsing
if (optional_string("#Message Frequencies")) {
while (!required_string_3("$Name:", "#Personas", "#Moods" )) {
while (!required_string_one_of(3, "$Name:", "#Personas", "#Moods" )) {
message_frequency_parse();
}
}
+13 -9
View File
@@ -503,7 +503,7 @@ void obj_snd_do_frame()
}
distance -= add_distance;
if ( distance < 0 ) {
if ( distance < 0.0f ) {
distance = 0.0f;
}
@@ -522,13 +522,13 @@ void obj_snd_do_frame()
alive_vol_mult = 1.0f;
if ( objp->type == OBJ_SHIP ) {
if ( !(Ship_info[Ships[objp->instance].ship_info_index].flags & (SIF_BIG_SHIP | SIF_HUGE_SHIP)) ) {
if ( objp->phys_info.max_vel.xyz.z <= 0 ) {
if ( objp->phys_info.max_vel.xyz.z <= 0.0f ) {
percent_max = 0.0f;
}
else
percent_max = objp->phys_info.fspeed / objp->phys_info.max_vel.xyz.z;
if ( percent_max >= 0.5 )
if ( percent_max >= 0.5f )
speed_vol_multiplier = 1.0f;
else {
speed_vol_multiplier = 0.5f + (percent_max); // linear interp: 0.5->1.0 when 0.0->0.5
@@ -538,22 +538,24 @@ void obj_snd_do_frame()
{
if (osp->flags & OS_TURRET_BASE_ROTATION)
{
if (osp->ss->base_rotation_rate_pct > 0)
if (osp->ss->base_rotation_rate_pct > 0.0f)
rot_vol_mult = ((0.25f + (0.75f * osp->ss->base_rotation_rate_pct)) * osp->ss->system_info->turret_base_rotation_snd_mult);
else
rot_vol_mult = 0;
rot_vol_mult = 0.0f;
}
if (osp->flags & OS_TURRET_GUN_ROTATION)
{
if (osp->ss->gun_rotation_rate_pct > 0)
if (osp->ss->gun_rotation_rate_pct > 0.0f)
rot_vol_mult = ((0.25f + (0.75f * osp->ss->gun_rotation_rate_pct)) * osp->ss->system_info->turret_gun_rotation_snd_mult);
else
rot_vol_mult = 0;
rot_vol_mult = 0.0f;
}
if (osp->flags & OS_SUBSYS_ROTATION )
{
if (osp->ss->flags & SSF_ROTATES) {
rot_vol_mult = 1.0;
rot_vol_mult = 1.0f;
} else {
rot_vol_mult = 0.0f;
}
}
if (osp->flags & OS_SUBSYS_ALIVE)
@@ -568,6 +570,8 @@ void obj_snd_do_frame()
{
if (osp->ss->current_hits <= 0.0f) {
alive_vol_mult = 1.0f;
} else {
alive_vol_mult = 0.0f;
}
}
if (osp->flags & OS_SUBSYS_DAMAGED)
@@ -591,7 +595,7 @@ void obj_snd_do_frame()
new_vol = max_vol - (distance - Snds[osp->id].min) * max_vol / (Snds[osp->id].max - Snds[osp->id].min);
}
if ( new_vol < 0.1 ) {
if ( new_vol < 0.1f ) {
continue;
}
+6 -144
View File
@@ -698,72 +698,6 @@ int required_string_either(char *str1, char *str2)
return -1;
}
// Return 0 or 1 for str1 match, str2 match. Return -1 if neither matches.
// Does not update Mp if token found. If not found, advances, trying to
// find the string. Doesn't advance past the found string.
int required_string_3(char *str1, char *str2, char *str3)
{
int count = 0;
ignore_white_space();
while (count < RS_MAX_TRIES) {
if (strnicmp(str1, Mp, strlen(str1)) == 0) {
// Mp += strlen(str1);
diag_printf("Found required string [%s]\n", token_found = str1);
return 0;
} else if (strnicmp(str2, Mp, strlen(str2)) == 0) {
// Mp += strlen(str2);
diag_printf("Found required string [%s]\n", token_found = str2);
return 1;
} else if (strnicmp(str3, Mp, strlen(str3)) == 0) {
diag_printf("Found required string [%s]\n", token_found = str3);
return 2;
}
error_display(1, "Required token = [%s], [%s] or [%s], found [%.32s].\n", str1, str2, str3, next_tokens());
advance_to_eoln(NULL);
ignore_white_space();
count++;
}
return -1;
}
int required_string_4(char *str1, char *str2, char *str3, char *str4)
{
int count = 0;
ignore_white_space();
while (count < RS_MAX_TRIES) {
if (strnicmp(str1, Mp, strlen(str1)) == 0) {
// Mp += strlen(str1);
diag_printf("Found required string [%s]\n", token_found = str1);
return 0;
} else if (strnicmp(str2, Mp, strlen(str2)) == 0) {
// Mp += strlen(str2);
diag_printf("Found required string [%s]\n", token_found = str2);
return 1;
} else if (strnicmp(str3, Mp, strlen(str3)) == 0) {
diag_printf("Found required string [%s]\n", token_found = str3);
return 2;
} else if (strnicmp(str4, Mp, strlen(str4)) == 0) {
diag_printf("Found required string [%s]\n", token_found = str4);
return 3;
}
error_display(1, "Required token = [%s], [%s], [%s], or [%s], found [%.32s].\n", str1, str2, str3, str4, next_tokens());
advance_to_eoln(NULL);
ignore_white_space();
count++;
}
return -1;
}
// Generic version of old required_string_3 and required_string_4; written by ngld, with some tweaks by MageKing17
int required_string_one_of(int arg_count, ...)
{
@@ -1261,27 +1195,12 @@ void stuff_string(char *outstr, int type, int len, char *terminators)
switch (type) {
case F_RAW:
ignore_gray_space();
copy_to_eoln(read_str, terminators, Mp, read_len);
drop_trailing_white_space(read_str);
advance_to_eoln(terminators);
break;
case F_LNAME:
ignore_gray_space();
copy_to_eoln(read_str, terminators, Mp, read_len);
drop_trailing_white_space(read_str);
advance_to_eoln(terminators);
break;
case F_NAME:
ignore_gray_space();
copy_to_eoln(read_str, terminators, Mp, read_len);
drop_trailing_white_space(read_str);
advance_to_eoln(terminators);
break;
case F_DATE:
case F_FILESPEC:
case F_PATHNAME:
case F_MESSAGE:
ignore_gray_space();
copy_to_eoln(read_str, terminators, Mp, read_len);
drop_trailing_white_space(read_str);
@@ -1295,13 +1214,6 @@ void stuff_string(char *outstr, int type, int len, char *terminators)
required_string("$End Notes:");
break;
case F_FILESPEC:
ignore_gray_space();
copy_to_eoln(read_str, terminators, Mp, read_len);
drop_trailing_white_space(read_str);
advance_to_eoln(terminators);
break;
// F_MULTITEXTOLD keeping for backwards compatability with old missions
// can be deleted once all missions are using new briefing format
@@ -1320,20 +1232,6 @@ void stuff_string(char *outstr, int type, int len, char *terminators)
required_string("$end_multi_text");
break;
case F_PATHNAME:
ignore_gray_space();
copy_to_eoln(read_str, terminators, Mp, read_len);
drop_trailing_white_space(read_str);
advance_to_eoln(terminators);
break;
case F_MESSAGE:
ignore_gray_space();
copy_to_eoln(read_str, terminators, Mp, read_len);
drop_trailing_white_space(read_str);
advance_to_eoln(terminators);
break;
default:
Error(LOCATION, "Unhandled string type %d in stuff_string!", type);
}
@@ -1371,27 +1269,12 @@ void stuff_string(SCP_string &outstr, int type, char *terminators)
switch (type) {
case F_RAW:
ignore_gray_space();
copy_to_eoln(read_str, terminators, Mp);
drop_trailing_white_space(read_str);
advance_to_eoln(terminators);
break;
case F_LNAME:
ignore_gray_space();
copy_to_eoln(read_str, terminators, Mp);
drop_trailing_white_space(read_str);
advance_to_eoln(terminators);
break;
case F_NAME:
ignore_gray_space();
copy_to_eoln(read_str, terminators, Mp);
drop_trailing_white_space(read_str);
advance_to_eoln(terminators);
break;
case F_DATE:
case F_FILESPEC:
case F_PATHNAME:
case F_MESSAGE:
ignore_gray_space();
copy_to_eoln(read_str, terminators, Mp);
drop_trailing_white_space(read_str);
@@ -1405,13 +1288,6 @@ void stuff_string(SCP_string &outstr, int type, char *terminators)
required_string("$End Notes:");
break;
case F_FILESPEC:
ignore_gray_space();
copy_to_eoln(read_str, terminators, Mp);
drop_trailing_white_space(read_str);
advance_to_eoln(terminators);
break;
// F_MULTITEXTOLD keeping for backwards compatability with old missions
// can be deleted once all missions are using new briefing format
@@ -1430,20 +1306,6 @@ void stuff_string(SCP_string &outstr, int type, char *terminators)
required_string("$end_multi_text");
break;
case F_PATHNAME:
ignore_gray_space();
copy_to_eoln(read_str, terminators, Mp);
drop_trailing_white_space(read_str);
advance_to_eoln(terminators);
break;
case F_MESSAGE:
ignore_gray_space();
copy_to_eoln(read_str, terminators, Mp);
drop_trailing_white_space(read_str);
advance_to_eoln(terminators);
break;
default:
Error(LOCATION, "Unhandled string type %d in stuff_string!", type);
}
-2
View File
@@ -110,8 +110,6 @@ extern int optional_string_one_of(int arg_count, ...);
// required
extern int required_string(char *pstr);
extern int required_string_either(char *str1, char *str2);
extern int required_string_3(char *str1, char *str2, char *str3);
extern int required_string_4(char *str1, char *str2, char *str3, char *str4);
extern int required_string_one_of(int arg_count, ...);
// stuff
+10 -10
View File
@@ -10491,7 +10491,7 @@ void sexp_adjust_audio_volume(int node)
if (n > 0) {
int option = audio_volume_option_lookup(CTEXT(n));
if (option > 0) {
if (option >= 0) {
n = CDR(n);
float target_volume = 1.0f;
@@ -32111,7 +32111,7 @@ sexp_help_struct Sexp_help[] = {
"\tReturns a percentage from 0 to 100\r\n"
"\t1: Ship name\r\n" },
{ OP_GET_ETS_VALUE, "get-ets-values\r\n"
{ OP_GET_ETS_VALUE, "get-ets-value\r\n"
"\tGets one ETS index for a ship\r\n"
"\t1: ETS index to get, Engine|Shield|Weapon\r\n"
"\t2: Ship name\r\n"},
@@ -32432,8 +32432,8 @@ sexp_help_struct Sexp_help[] = {
"\tSets the amount of ammo for the specified ballistic bank\r\n"
"\t1: Ship name\r\n"
"\t2: Bank to check (0, 1, and 2 are legal banks)\r\n"
"\t3: Number to set this bank to (If this is larger than the maximimum, bank will be set to maximum).\r\n"
"\t4: Rearm Limit. Support ships will only supply this number of weapons (If this is larger than the maximimum, bank will be set to maximum)"
"\t3: Number to set this bank to (If this is larger than the maximum, bank will be set to maximum).\r\n"
"\t4: Rearm Limit. Support ships will only supply this number of weapons (If this is larger than the maximum, bank will be set to maximum)"
},
// Karajorma
@@ -32441,8 +32441,8 @@ sexp_help_struct Sexp_help[] = {
"\tSets the amount of ammo for the specified bank\r\n"
"\t1: Ship name\r\n"
"\t2: Bank to check (0, 1, 2 and 3 are legal banks)\r\n"
"\t3: Number to set this bank to (If this is larger than the maximimum, bank will be set to maximum).\r\n"
"\t4: Rearm Limit. Support ships will only supply this number of weapons (If this is larger than the maximimum, bank will be set to maximum)"
"\t3: Number to set this bank to (If this is larger than the maximum, bank will be set to maximum).\r\n"
"\t4: Rearm Limit. Support ships will only supply this number of weapons (If this is larger than the maximum, bank will be set to maximum)"
},
// Karajorma
@@ -32451,8 +32451,8 @@ sexp_help_struct Sexp_help[] = {
"\t1: Ship name\r\n"
"\t2: Bank to check (0, 1 and 2 are legal banks)\r\n"
"\t3: Name of the primary weapon \r\n"
"\t4: Number to set this bank to (If this is larger than the maximimum, bank will be set to maximum)\r\n"
"\t5: Rearm Limit. Support ships will only supply this number of weapons (If this is larger than the maximimum, bank will be set to maximum)"
"\t4: Number to set ammo of this bank to (If this is larger than the maximum, bank will be set to maximum)\r\n"
"\t5: Rearm Limit. Support ships will only supply this number of weapons (If this is larger than the maximum, bank will be set to maximum)"
},
// Karajorma
@@ -32461,8 +32461,8 @@ sexp_help_struct Sexp_help[] = {
"\t1: Ship name\r\n"
"\t2: Bank to check (0, 1, 2 and 3 are legal banks)\r\n"
"\t3: Name of the secondary weapon \r\n"
"\t4: Number to set this bank to (If this is larger than the maximimum, bank will be set to maximum)\r\n"
"\t5: Rearm Limit. Support ships will only supply this number of weapons (If this is larger than the maximimum, bank will be set to maximum)"
"\t4: Number to set ammo of this bank to (If this is larger than the maximum, bank will be set to maximum)\r\n"
"\t5: Rearm Limit. Support ships will only supply this number of weapons (If this is larger than the maximum, bank will be set to maximum)"
},
+64 -160
View File
@@ -1256,6 +1256,60 @@ void parse_ship_particle_effect(ship_info* sip, particle_effect* pe, char *id_st
}
}
void parse_allowed_weapons(ship_info *sip, bool is_primary, bool is_dogfight)
{
int i, num_allowed;
int allowed_weapons[MAX_WEAPON_TYPES];
const int max_banks = (is_primary ? MAX_SHIP_PRIMARY_BANKS : MAX_SHIP_SECONDARY_BANKS);
const int weapon_type = (is_dogfight ? DOGFIGHT_WEAPON : REGULAR_WEAPON);
const int offset = (is_primary ? 0 : MAX_SHIP_PRIMARY_BANKS);
const char *allowed_banks_str = is_primary ? (is_dogfight ? "$Allowed Dogfight PBanks:" : "$Allowed PBanks:")
: (is_dogfight ? "$Allowed Dogfight SBanks:" : "$Allowed SBanks:");
const char *bank_type_str = is_primary ? "primary" : "secondary";
// Goober5000 - fixed Bobboau's implementation of restricted banks
int bank;
// Set the weapons filter used in weapons loadout (for primary weapons)
if (optional_string(allowed_banks_str))
{
bank = -1;
while (check_for_string("("))
{
bank++;
// make sure we don't specify more than we have banks for
if (bank >= max_banks)
{
Warning(LOCATION, "%s bank-specific loadout for %s exceeds permissible number of %s banks. Ignoring the rest...", allowed_banks_str, sip->name, bank_type_str);
bank--;
break;
}
num_allowed = stuff_int_list(allowed_weapons, MAX_WEAPON_TYPES, WEAPON_LIST_TYPE);
// actually say which weapons are allowed
for ( i = 0; i < num_allowed; i++ )
{
if ( allowed_weapons[i] >= 0 ) // MK, Bug fix, 9/6/99. Used to be "allowed_weapons" not "allowed_weapons[i]".
{
sip->allowed_bank_restricted_weapons[offset+bank][allowed_weapons[i]] |= weapon_type;
}
}
}
// set flags if need be
if (bank > 0) // meaning there was a restricted bank table entry
{
for (i=0; i<=bank; i++)
{
sip->restricted_loadout_flag[offset+i] |= weapon_type;
}
}
}
}
/**
* Common method for parsing ship/subsystem primary/secondary weapons so that the parser doesn't flip out in the event of a problem.
*
@@ -1355,8 +1409,7 @@ int parse_and_add_briefing_icon_info()
int parse_ship_values(ship_info* sip, bool first_time, bool replace)
{
char buf[SHIP_MULTITEXT_LENGTH];
int i, j, num_allowed;
int allowed_weapons[MAX_WEAPON_TYPES];
int i, j;
int rtn = 0;
char name_tmp[NAME_LENGTH];
@@ -1628,7 +1681,7 @@ int parse_ship_values(ship_info* sip, bool first_time, bool replace)
if (optional_string("$Enable Team Colors:")) {
stuff_boolean(&sip->uses_team_colors);
sip->default_team_name = "None";
}
}
if (optional_string("$Default Team:")) {
char temp[NAME_LENGTH];
@@ -2221,86 +2274,9 @@ int parse_ship_values(ship_info* sip, bool first_time, bool replace)
stuff_float( &sip->weapon_model_draw_distance );
}
// Goober5000 - fixed Bobboau's implementation of restricted banks
int bank;
// Set the weapons filter used in weapons loadout (for primary weapons)
if (optional_string("$Allowed PBanks:"))
{
bank = -1;
while (check_for_string("("))
{
bank++;
// make sure we don't specify more than we have banks for
if (bank >= MAX_SHIP_PRIMARY_BANKS)
{
Warning(LOCATION, "$Allowed PBanks bank-specific loadout for %s exceeds permissible number of primary banks. Ignoring the rest...", sip->name);
bank--;
break;
}
num_allowed = stuff_int_list(allowed_weapons, MAX_WEAPON_TYPES, WEAPON_LIST_TYPE);
// actually say which weapons are allowed
for ( i = 0; i < num_allowed; i++ )
{
if ( allowed_weapons[i] >= 0 ) // MK, Bug fix, 9/6/99. Used to be "allowed_weapons" not "allowed_weapons[i]".
{
sip->allowed_bank_restricted_weapons[bank][allowed_weapons[i]] |= REGULAR_WEAPON;
}
}
}
// set flags if need be
if (bank > 0) // meaning there was a restricted bank table entry
{
for (i=0; i<=bank; i++)
{
sip->restricted_loadout_flag[i] |= REGULAR_WEAPON;
}
}
}
// Set the weapons filter used in weapons loadout (for primary weapons)
if (optional_string("$Allowed Dogfight PBanks:"))
{
bank = -1;
while (check_for_string("("))
{
bank++;
// make sure we don't specify more than we have banks for
if (bank >= MAX_SHIP_PRIMARY_BANKS)
{
Warning(LOCATION, "$Allowed Dogfight PBanks bank-specific loadout for %s exceeds permissible number of primary banks. Ignoring the rest...", sip->name);
bank--;
break;
}
num_allowed = stuff_int_list(allowed_weapons, MAX_WEAPON_TYPES, WEAPON_LIST_TYPE);
// actually say which weapons are allowed
for ( i = 0; i < num_allowed; i++ )
{
if ( allowed_weapons[i] >= 0 ) // MK, Bug fix, 9/6/99. Used to be "allowed_weapons" not "allowed_weapons[i]".
{
sip->allowed_bank_restricted_weapons[bank][allowed_weapons[i]] |= DOGFIGHT_WEAPON;
}
}
}
// set flags if need be
if (bank > 0) // meaning there was a restricted bank table entry
{
for (i=0; i<=bank; i++)
{
sip->restricted_loadout_flag[i] |= DOGFIGHT_WEAPON;
}
}
}
parse_allowed_weapons(sip, true, false);
parse_allowed_weapons(sip, true, true);
// Get primary bank weapons
parse_weapon_bank(sip, true, &sip->num_primary_banks, sip->primary_bank_weapons, sip->primary_bank_ammo_capacity);
@@ -2312,82 +2288,8 @@ int parse_ship_values(ship_info* sip, bool first_time, bool replace)
}
// Set the weapons filter used in weapons loadout (for secondary weapons)
if (optional_string("$Allowed SBanks:"))
{
bank = -1;
while (check_for_string("("))
{
bank++;
// make sure we don't specify more than we have banks for
if (bank >= MAX_SHIP_SECONDARY_BANKS)
{
Warning(LOCATION, "$Allowed SBanks bank-specific loadout for %s exceeds permissible number of secondary banks. Ignoring the rest...", sip->name);
bank--;
break;
}
num_allowed = stuff_int_list(allowed_weapons, MAX_WEAPON_TYPES, WEAPON_LIST_TYPE);
// actually say which weapons are allowed
for ( i = 0; i < num_allowed; i++ )
{
if ( allowed_weapons[i] >= 0 ) // MK, Bug fix, 9/6/99. Used to be "allowed_weapons" not "allowed_weapons[i]".
{
sip->allowed_bank_restricted_weapons[MAX_SHIP_PRIMARY_BANKS+bank][allowed_weapons[i]] |= REGULAR_WEAPON;
}
}
}
// set flags if need be
if (bank > 0) // meaning there was a restricted bank table entry
{
for (i=0; i<=bank; i++)
{
sip->restricted_loadout_flag[MAX_SHIP_PRIMARY_BANKS+i] |= REGULAR_WEAPON;
}
}
}
// Set the weapons filter used in weapons loadout (for secondary weapons)
if (optional_string("$Allowed Dogfight SBanks:"))
{
bank = -1;
while (check_for_string("("))
{
bank++;
// make sure we don't specify more than we have banks for
if (bank >= MAX_SHIP_SECONDARY_BANKS)
{
Warning(LOCATION, "$Allowed Dogfight SBanks bank-specific loadout for %s exceeds permissible number of secondary banks. Ignoring the rest...", sip->name);
bank--;
break;
}
num_allowed = stuff_int_list(allowed_weapons, MAX_WEAPON_TYPES, WEAPON_LIST_TYPE);
// actually say which weapons are allowed
for ( i = 0; i < num_allowed; i++ )
{
if ( allowed_weapons[i] >= 0 ) // MK, Bug fix, 9/6/99. Used to be "allowed_weapons" not "allowed_weapons[i]".
{
sip->allowed_bank_restricted_weapons[MAX_SHIP_PRIMARY_BANKS+bank][allowed_weapons[i]] |= DOGFIGHT_WEAPON;
}
}
}
// set flags if need be
if (bank > 0) // meaning there was a restricted bank table entry
{
for (i=0; i<=bank; i++)
{
sip->restricted_loadout_flag[MAX_SHIP_PRIMARY_BANKS+i] |= DOGFIGHT_WEAPON;
}
}
}
parse_allowed_weapons(sip, false, false);
parse_allowed_weapons(sip, false, true);
// Get secondary bank weapons
parse_weapon_bank(sip, false, &sip->num_secondary_banks, sip->secondary_bank_weapons, sip->secondary_bank_ammo_capacity);
@@ -3257,7 +3159,7 @@ int parse_ship_values(ship_info* sip, bool first_time, bool replace)
}
while (cont_flag) {
int r = required_string_3("#End", "$Subsystem:", "$Name" );
int r = required_string_one_of(3, "#End", "$Subsystem:", "$Name" );
switch (r) {
case 0:
cont_flag = 0;
@@ -3755,8 +3657,10 @@ int parse_ship_values(ship_info* sip, bool first_time, bool replace)
case 2:
cont_flag = 0;
break;
case -1: // Possible return value if -noparseerrors is used
break;
default:
Int3(); // Impossible return value from required_string_3.
Assertion(false, "This should never happen.\n"); // Impossible return value from required_string_one_of.
}
}
+8 -6
View File
@@ -45,6 +45,10 @@ ubyte *Compressed_service_buffer = NULL; // Used to read in compressed data duri
#define AS_HIGHEST_MAX 999999999 // max uncompressed filesize supported is 999 meg
// Globalize the list of audio extensions for use in several sound related files
const char *audio_ext_list[] = { ".ogg", ".wav" };
const int NUM_AUDIO_EXT = sizeof(audio_ext_list) / sizeof(char*);
int Audiostream_inited = 0;
@@ -436,8 +440,6 @@ bool WaveFile::Open(char *pszFilename, bool keep_ext)
int FileSize, FileOffset;
char fullpath[MAX_PATH];
char filename[MAX_FILENAME_LEN];
const int NUM_EXT = 2;
const char *audio_ext[NUM_EXT] = { ".ogg", ".wav" };
m_total_uncompressed_bytes_read = 0;
m_max_uncompressed_bytes_to_read = AS_HIGHEST_MAX;
@@ -448,8 +450,8 @@ bool WaveFile::Open(char *pszFilename, bool keep_ext)
// if we are supposed to load the file as passed...
if (keep_ext) {
for (int i = 0; i < NUM_EXT; i++) {
if ( stristr(pszFilename, audio_ext[i]) ) {
for (int i = 0; i < NUM_AUDIO_EXT; i++) {
if ( stristr(pszFilename, audio_ext_list[i]) ) {
rc = i;
break;
}
@@ -463,14 +465,14 @@ bool WaveFile::Open(char *pszFilename, bool keep_ext)
}
// ... otherwise we just find the best match
else {
rc = cf_find_file_location_ext(filename, NUM_EXT, audio_ext, CF_TYPE_ANY, sizeof(fullpath) - 1, fullpath, &FileSize, &FileOffset);
rc = cf_find_file_location_ext(filename, NUM_AUDIO_EXT, audio_ext_list, CF_TYPE_ANY, sizeof(fullpath) - 1, fullpath, &FileSize, &FileOffset);
}
if (rc < 0) {
goto OPEN_ERROR;
} else {
// set proper filename for later use (assumes that it doesn't already have an extension)
strcat_s( filename, audio_ext[rc] );
strcat_s( filename, audio_ext_list[rc] );
}
m_snd_info.cfp = mmioOpen( fullpath, NULL, MMIO_ALLOCBUF | MMIO_READ );
+3
View File
@@ -46,6 +46,9 @@ typedef struct {
} STRHDL;
#endif // NEED_STRHDL
extern const char *audio_ext_list[];
extern const int NUM_AUDIO_EXT;
// Initializes the audio streaming library. Called
// automatically when the sound stuff is inited.
void audiostream_init();
+2 -3
View File
@@ -18,6 +18,7 @@
#include "sound/acm.h"
#include "osapi/osapi.h"
#include "sound/dscap.h"
#include "sound/audiostr.h"
typedef struct sound_buffer
@@ -460,8 +461,6 @@ int ds_parse_sound_info(char *real_filename, sound_info *s_info)
int rc, FileSize, FileOffset;
char fullpath[MAX_PATH];
char filename[MAX_FILENAME_LEN];
const int NUM_EXT = 2;
const char *audio_ext[NUM_EXT] = { ".ogg", ".wav" };
int rval = -1;
if ( (real_filename == NULL) || (s_info == NULL) ) {
@@ -473,7 +472,7 @@ int ds_parse_sound_info(char *real_filename, sound_info *s_info)
char *p = strrchr(filename, '.');
if ( p ) *p = 0;
rc = cf_find_file_location_ext(filename, NUM_EXT, audio_ext, CF_TYPE_ANY, sizeof(fullpath) - 1, fullpath, &FileSize, &FileOffset);
rc = cf_find_file_location_ext(filename, NUM_AUDIO_EXT, audio_ext_list, CF_TYPE_ANY, sizeof(fullpath) - 1, fullpath, &FileSize, &FileOffset);
if (rc < 0) {
return -1;
+188 -153
View File
@@ -1,153 +1,188 @@
<GRAMMAR LANGID="409">
<DEFINE>
<ID NAME="VID_Counter" VAL="80"/>
<ID NAME="VID_DestoryTarget" VAL="10"/>
<ID NAME="VID_DisableTarget" VAL="11"/>
<ID NAME="VID_DisarmTarget" VAL="12"/>
<ID NAME="VID_DestroySubsys" VAL="13"/>
<ID NAME="VID_ProtectTarget" VAL="14"/>
<ID NAME="VID_IgnoreTarget" VAL="15"/>
<ID NAME="VID_FormWing" VAL="16"/>
<ID NAME="VID_CoverMe" VAL="17"/>
<ID NAME="VID_EngageEnemy" VAL="18"/>
<ID NAME="VID_Depart" VAL="19"/>
<ID NAME="VID_Action" VAL="250"/>
<ID NAME="VID_WingName" VAL="251"/>
<ID NAME="VID_TopMenu" VAL="252"/>
<ID NAME="VID_ShipName" VAL="253"/>
<ID NAME="VID_Number" VAL="254"/>
<ID NAME="VID_Ships" VAL="50"/>
<ID NAME="VID_Wings" VAL="51"/>
<ID NAME="VID_AllFighters" VAL="52"/>
<ID NAME="VID_AllWings" VAL="53"/>
<ID NAME="VID_Reinforcements" VAL="54"/>
<ID NAME="VID_SupportShip" VAL="55"/>
<ID NAME="VID_AbortSupport" VAL="56"/>
<ID NAME="VID_Cancel" VAL="57"/>
<ID NAME="VID_Command" VAL="58"/>
<ID NAME="VID_More" VAL="59"/>
</DEFINE>
<RULE ID="VID_WingName" TOPLEVEL="ACTIVE">
<L PROPID="VID_WingName">
<P VAL="0">Alpha</P>
<P VAL="1">Beta</P>
<P VAL="2">Gamma</P>
<P VAL="3">Delta</P>
<P VAL="4">Epsilon</P>
<P VAL="5">Zeta</P>
<P VAL="6">Eta</P>
<P VAL="7">Theta</P>
<P VAL="8">Iota</P>
<P VAL="9">Kappa</P>
<P VAL="10">Lambda</P>
<P VAL="11">Mu</P>
<P VAL="12">Nu</P>
<P VAL="13">Xi</P>
<P VAL="14">Omicron</P>
<P VAL="15">Pi</P>
<P VAL="16">Rho</P>
<P VAL="17">Sigma</P>
<P VAL="18">Tau</P>
<P VAL="19">Upsilon</P>
<P VAL="20">Phi</P>
<P VAL="21">Chi</P>
<P VAL="22">Psi</P>
<P VAL="23">Omega</P>
</L>
<O>wing</O>
</RULE>
<RULE ID="VID_ShipName" TOPLEVEL="ACTIVE">
<L PROPID="VID_ShipName">
<P VAL="0">Alpha</P>
<P VAL="1">Beta</P>
<P VAL="2">Gamma</P>
<P VAL="3">Delta</P>
<P VAL="4">Epsilon</P>
<P VAL="5">Zeta</P>
<P VAL="6">Eta</P>
<P VAL="7">Theta</P>
<P VAL="8">Iota</P>
<P VAL="9">Kappa</P>
<P VAL="10">Lambda</P>
<P VAL="11">Mu</P>
<P VAL="12">Nu</P>
<P VAL="13">Xi</P>
<P VAL="14">Omicron</P>
<P VAL="15">Pi</P>
<P VAL="16">Rho</P>
<P VAL="17">Sigma</P>
<P VAL="18">Tau</P>
<P VAL="19">Upsilon</P>
<P VAL="20">Phi</P>
<P VAL="21">Chi</P>
<P VAL="22">Psi</P>
<P VAL="23">Omega</P>
</L>
<L PROPID="VID_Number">
<P VAL = "1">one</P>
<P VAL = "2">two</P>
<P VAL = "3">three</P>
<P VAL = "4">four</P>
<P VAL = "5">five</P>
<P VAL = "6">six</P>
<P VAL = "7">seven</P>
<P VAL = "8">eight</P>
<P VAL = "9">nine</P>
</L>
</RULE>
<RULE ID="VID_TopMenu" TOPLEVEL="ACTIVE">
<L PROPID="VID_TopMenu">
<P VAL="VID_Ships" >Ships</P>
<P VAL="VID_Wings" >Wings</P>
<P VAL="VID_AllFighters">All Fighters</P>
<P VAL="VID_AllWings" >All Wings</P>
<P VAL="VID_Reinforcements">Reinforcements</P>
<P VAL="VID_SupportShip">Support ship</P>
<P VAL="VID_SupportShip">Rearm</P>
<P VAL="VID_SupportShip">Repair</P>
<P VAL="VID_AbortSupport">Abort</P>
<P VAL="VID_Cancel">Cancel</P>
<P VAL="VID_Command">Command</P>
<P VAL="VID_More">More</P>
</L>
</RULE>
<RULE ID="VID_Action" TOPLEVEL="ACTIVE">
<L PROPID="VID_Action">
<P VAL="VID_DestoryTarget">Destroy my target</P>
<P VAL="VID_DisableTarget">Disable my target</P>
<P VAL="VID_DisarmTarget" >Disarm my target</P>
<P VAL="VID_DestroySubsys">Destroy subsystem</P>
<P VAL="VID_ProtectTarget">Protect my target</P>
<P VAL="VID_IgnoreTarget" >Ignore my target</P>
<P VAL="VID_FormWing" >Form on my wing</P>
<P VAL="VID_CoverMe" >Cover me</P>
<P VAL="VID_EngageEnemy" >Engage Enemy</P>
<P VAL="VID_EngageEnemy" >Attack</P>
<P VAL="VID_Depart" >Depart</P>
</L>
</RULE>
</GRAMMAR>
<GRAMMAR>
<DEFINE>
<ID NAME="VID_Counter" VAL="80"/>
<ID NAME="VID_DestroyTarget" VAL="10"/>
<ID NAME="VID_DisableTarget" VAL="11"/>
<ID NAME="VID_DisarmTarget" VAL="12"/>
<ID NAME="VID_DestroySubsys" VAL="13"/>
<ID NAME="VID_ProtectTarget" VAL="14"/>
<ID NAME="VID_IgnoreTarget" VAL="15"/>
<ID NAME="VID_FormWing" VAL="16"/>
<ID NAME="VID_CoverMe" VAL="17"/>
<ID NAME="VID_EngageEnemy" VAL="18"/>
<ID NAME="VID_Depart" VAL="19"/>
<ID NAME="VID_Action" VAL="250"/>
<ID NAME="VID_WingName" VAL="251"/>
<ID NAME="VID_TopMenu" VAL="252"/>
<ID NAME="VID_ShipName" VAL="253"/>
<ID NAME="VID_Number" VAL="254"/>
<ID NAME="VID_Ships" VAL="50"/>
<ID NAME="VID_Wings" VAL="51"/>
<ID NAME="VID_AllFighters" VAL="52"/>
<ID NAME="VID_AllWings" VAL="53"/>
<ID NAME="VID_Reinforcements" VAL="54"/>
<ID NAME="VID_SupportShip" VAL="55"/>
<ID NAME="VID_AbortSupport" VAL="56"/>
<ID NAME="VID_Cancel" VAL="57"/>
<ID NAME="VID_Command" VAL="58"/>
<ID NAME="VID_More" VAL="59"/>
<ID NAME="VID_shields" VAL="100"/>
<ID NAME="VID_targeting" VAL="101"/>
<ID NAME="VID_power" VAL="102"/>
<ID NAME="VID_speed" VAL="103"/>
<ID name="VID_other" VAL="104"/>
</DEFINE>
<RULE ID="VID_WingName" TOPLEVEL="ACTIVE">
<L PROPID="VID_WingName">
<P VALSTR="Alpha">Alpha</P>
<P VALSTR="Beta">Beta</P>
<P VALSTR="Gamma">Gamma</P>
<P VALSTR="Delta">Delta</P>
<P VALSTR="Epsilon">Epsilon</P>
<P VALSTR="Zeta">Zeta</P>
<P VALSTR="Eta">Eta</P>
<P VALSTR="Theta">Theta</P>
<P VALSTR="Iota">Iota</P>
<P VALSTR="Kappa">Kappa</P>
<P VALSTR="Lambda">Lambda</P>
<P VALSTR="Mu">Mu</P>
<P VALSTR="Nu">Nu</P>
<P VALSTR="Xi">Xi</P>
<P VALSTR="Omicron">Omicron</P>
<P VALSTR="Pi">Pi</P>
<P VALSTR="Rho">Rho</P>
<P VALSTR="Sigma">Sigma</P>
<P VALSTR="Tau">Tau</P>
<P VALSTR="Upsilon">Upsilon</P>
<P VALSTR="Phi">Phi</P>
<P VALSTR="Chi">Chi</P>
<P VALSTR="Psi">Psi</P>
<P VALSTR="Omega">Omega</P>
</L>
<L PROPID="VID_ShipName">
<P VAl="0">Wing</P>
<P VAL="1">one</P>
<P VAL="2">two</P>
<P VAL="3">three</P>
<P VAL="4">four</P>
<P VAL="5">five</P>
<P VAL="6">six</P>
<P VAL="7">seven</P>
<P VAL="8">eight</P>
<P VAL="9">nine</P>
</L>
<O>
<RULEREF refID="VID_Action"/>
</O>
</RULE>
<RULE ID="VID_Action" TOPLEVEL="ACTIVE">
<L PROPID="VID_Action">
<P VAL="VID_DestroyTarget">Destroy my target</P>
<P VAL="VID_DisableTarget">Disable my target</P>
<P VAL="VID_DisarmTarget">Disarm my target</P>
<P VAL="VID_DestroySubsys">Destroy subsystem</P>
<P VAL="VID_ProtectTarget">Protect my target</P>
<P VAL="VID_IgnoreTarget">Ignore my target</P>
<P VAL="VID_FormWing">Form on my wing</P>
<P VAL="VID_CoverMe">Cover me</P>
<P VAL="VID_EngageEnemy">Engage the Enemy</P>
<P VAL="VID_EngageEnemy">Attack</P>
<P VAL="VID_Depart">Depart</P>
</L>
</RULE>
<RULE ID="VID_TopMenu" TOPLEVEL="ACTIVE">
<L PROPID="VID_TopMenu">
<P VAL="VID_Ships">Ships</P>
<P VAL="VID_Wings">Wings</P>
<P VAL="VID_AllFighters">All Fighters<O><RULEREF REFID="VID_Action"/></O></P>
<P VAL="VID_AllWings">All Wings<O><RULEREF REFID="VID_Action"/></O></P>
<P VAL="VID_Reinforcements">Reinforcements</P>
<P VAL="VID_SupportShip">Support ship</P>
<P VAL="VID_SupportShip">Rearm <O>and repair</O></P>
<P VAL="VID_SupportShip">Repair <O>and rearm</O></P>
<P VAL="VID_AbortSupport">Abort <L><P>support <O>ship</O></P><P>rearm <O>and repair</O></P><P>repair <O>and rearm</O></P></L></P>
<P VAL="VID_Cancel">Cancel</P>
<P VAL="VID_Command">Command</P>
<P VAL="VID_More">More</P>
</L>
</RULE>
<RULE ID="VID_shields" TOPLEVEL="ACTIVE">
<L PROPID="VID_shields">
<P VAL="0">Shields forward</P>
<P VAL="1">Shields left</P>
<P VAL="2">Shields right</P>
<P VAL="3">Shields back</P>
<P VAL="4">Shields all</P>
</L>
</RULE>
<RULE ID="VID_targeting" TOPLEVEL="ACTIVE">
<L PROPID="VID_targeting">
<P VAL="0">Target next</P>
<P VAL="1">Target previous</P>
<P VAL="2">Target hostile</P>
<P VAL="3">Target previous hostile</P>
<P VAL="4">Auto target</P>
<P VAL="5">Target Friendly</P>
<P VAL="6">Target previous friendly</P>
<P VAL="7">Target sight</P>
<P VAL="8">Targets attacker</P>
<P VAL="9">Target sender</P>
<P VAL="10">Stop targeting</P>
<P VAL="11">Target sight subsystem</P>
<P VAL="12">Target next subsystem</P>
<P VAL="13">Target previous subsystem</P>
<P VAL="14">Stop targeting subsystems</P>
<P val="50">Target closest attacker</P>
<P VAL="88">Target next escort</P>
<P VAL="89">Target closest repair ship</P>
<P VAL="90">Target next uninspected</P>
<P VAL="91">Target previous uninspected</P>
<P VAL="92">Target newest</P>
<P VAL="93">Target next turret</P>
<P VAL="94">Target previous turret</P>
<P VAL="95">Target next bomb</P>
<P VAL="96">Target previous bomb</P>
</L>
</RULE>
<RULE ID="VID_speed" TOPLEVEL="ACTIVE">
<L PROPID="VID_speed">
<P VAL="15">Match speed</P>
<P VAL="16">Auto match</P>
</L>
</RULE>
<RULE ID="VID_other" TOPLEVEL="ACTIVE">
<L PROPID="VID_other">
<P VAL="19">Next primary</P>
<P VAL="20">Previous primary</P>
<P VAL="21">cycle secondary</P>
<P VAL="22">secondary rate</P>
<P VAL="63">Radar Range</P>
<P VAL="117">Glide toggle</P>
</L>
</RULE>
<RULE ID="VID_power" TOPLEVEL="ACTIVE">
<L PROPID="VID_power">
<P VAL="69">Increase weapon</P>
<P VAL="70">Decrease weapon</P>
<P VAL="71">Increase shield</P>
<P VAL="72">Decrease shield</P>
<P VAL="73">Increase engine</P>
<P VAL="74">Decrease engine</P>
<P VAL="75">Power balance</P>
<P VAL="201">Max weapons</P>
<P VAL="202">Min weapons</P>
<P VAL="203">Max shields</P>
<P VAL="204">Min shields</P>
<P VAL="205">Max engines</P>
<P VAL="206">Min engines</P>
</L>
</RULE>
</GRAMMAR>
+9 -4
View File
@@ -12,6 +12,7 @@
#include "render/3d.h"
#include "sound/sound.h"
#include "sound/audiostr.h"
#include "gamesnd/eventmusic.h"
#include "cmdline/cmdline.h"
#include "osapi/osapi.h"
#include "globalincs/vmallocator.h"
@@ -284,8 +285,6 @@ int snd_load( game_snd *gs, int allow_hardware_load )
int rc, FileSize, FileOffset;
char fullpath[MAX_PATH];
char filename[MAX_FILENAME_LEN];
const int NUM_EXT = 2;
const char *audio_ext[NUM_EXT] = { ".ogg", ".wav" };
size_t n;
@@ -330,7 +329,7 @@ int snd_load( game_snd *gs, int allow_hardware_load )
char *p = strrchr(filename, '.');
if ( p ) *p = 0;
rc = cf_find_file_location_ext(filename, NUM_EXT, audio_ext, CF_TYPE_ANY, sizeof(fullpath) - 1, fullpath, &FileSize, &FileOffset);
rc = cf_find_file_location_ext(filename, NUM_AUDIO_EXT, audio_ext_list, CF_TYPE_ANY, sizeof(fullpath) - 1, fullpath, &FileSize, &FileOffset);
if (rc < 0)
return -1;
@@ -339,7 +338,7 @@ int snd_load( game_snd *gs, int allow_hardware_load )
CFILE *fp = cfopen_special(fullpath, "rb", FileSize, FileOffset);
// ok, we got it, so set the proper filename for logging purposes
strcat_s(filename, audio_ext[rc]);
strcat_s(filename, audio_ext_list[rc]);
nprintf(("Sound", "SOUND => Loading '%s'\n", filename));
@@ -1518,6 +1517,12 @@ void adjust_volume_on_frame(float* volume_now, aav* data)
//apply change
*volume_now = data->start_volume + (data->delta * done);
CLAMP(*volume_now, 0.0f, 1.0f);
// if setting music volume, trigger volume change in playing tracks
// done here in order to avoid setting music volume in every frame regardless if it changed or not
if (&aav_music_volume == volume_now) {
audiostream_set_volume_all(Master_event_music_volume * aav_music_volume, ASF_EVENTMUSIC);
}
}
void snd_aav_init()
+374 -258
View File
@@ -32,6 +32,7 @@
#include "io/keycontrol.h"
#include "playerman/player.h"
#include "ship/ship.h"
#include "cfile/cfile.h"
CComPtr<ISpRecoGrammar> p_grammarObject; // Pointer to our grammar object
CComPtr<ISpRecoContext> p_recogContext; // Pointer to our recognition context
@@ -39,162 +40,6 @@ CComPtr<ISpRecognizer> p_recogEngine; // Pointer to our recognition engine i
const bool DEBUG_ON = false;
bool VOICEREC_init(HWND hWnd, int event_id, int grammar_id, int command_resource)
{
HRESULT hr = S_OK;
CComPtr<ISpAudio> cpAudio;
while ( 1 )
{
// create a recognition engine
hr = p_recogEngine.CoCreateInstance(CLSID_SpSharedRecognizer);
if ( FAILED( hr ) )
{
MessageBox(hWnd,"Failed to create a recognition engine\n","Error",MB_OK);
printf("Failed to create a recognition engine\n");
break;
}
// create the command recognition context
hr = p_recogEngine->CreateRecoContext( &p_recogContext );
if ( FAILED( hr ) )
{
MessageBox(hWnd,"Failed to create the command recognition context\n","Error",MB_OK);
printf("Failed to create the command recognition context\n");
break;
}
// Let SR know that window we want it to send event information to, and using
// what message
hr = p_recogContext->SetNotifyWindowMessage( hWnd, event_id, 0, 0 );
if ( FAILED( hr ) )
{
MessageBox(hWnd,"Failed to SetNotifyWindowMessage\n","Error",MB_OK);
break;
}
// Tell SR what types of events interest us. Here we only care about command
// recognition.
hr = p_recogContext->SetInterest( SPFEI(SPEI_RECOGNITION), SPFEI(SPEI_RECOGNITION) );
if ( FAILED( hr ) )
{
MessageBox(hWnd,"Failed to set events\n","Error",MB_OK);
break;
}
// Load our grammar, which is the compiled form of simple.xml bound into this executable as a
// user defined ("SRGRAMMAR") resource type.
hr = p_recogContext->CreateGrammar(grammar_id, &p_grammarObject);
if (FAILED(hr))
{
MessageBox(hWnd,"Failed to load grammar\n","Error",MB_OK);
break;
}
hr = p_grammarObject->LoadCmdFromResource(NULL, MAKEINTRESOURCEW(command_resource),
L"SRGRAMMAR", MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL),
SPLO_DYNAMIC);
if ( FAILED( hr ) )
{
MessageBox(hWnd,"Failed to load resource\n","Error",MB_OK);
break;
}
// Set rules to active, we are now listening for commands
hr = p_grammarObject->SetRuleState(NULL, NULL, SPRS_ACTIVE );
if ( FAILED( hr ) )
{
MessageBox(hWnd,"Failed to set listening for commands\n","Error",MB_OK);
break;
}
break;
}
// if we failed and have a partially setup SAPI, close it all down
if ( FAILED( hr ) )
{
VOICEREC_deinit();
}
return ( hr == S_OK);
}
void VOICEREC_deinit()
{
// Release grammar, if loaded
if ( p_grammarObject )
{
p_grammarObject.Release();
}
// Release recognition context, if created
if ( p_recogContext )
{
p_recogContext->SetNotifySink(NULL);
p_recogContext.Release();
}
// Release recognition engine instance, if created
if ( p_recogEngine )
{
p_recogEngine.Release();
}
}
void VOICEREC_execute_command(ISpPhrase *pPhrase, HWND hWnd);
void VOICEREC_process_event(HWND hWnd)
{
CSpEvent event; // Event helper class
// Loop processing events while there are any in the queue
while (event.GetFrom(p_recogContext) == S_OK)
{
// Look at recognition event only
switch (event.eEventId)
{
case SPEI_RECOGNITION:
VOICEREC_execute_command(event.RecoResult(), hWnd);
break;
}
}
}
// Its not enough to update this, phrases.xml must have this info as well
char *wing_names[] =
{
"Alpha",
"Beta",
"Gamma",
"Delta",
"Epsilon",
"Zeta",
"Eta",
"Theta",
"Iota",
"Kappa",
"Lambda",
"Mu",
"Nu",
"Xi",
"Omicron",
"Pi",
"Rho",
"Sigma",
"Tau",
"Upsilon",
"Phi",
"Chi",
"Psi",
"Omega",
};
/******************************************************************************
* ExecuteCommand *
*----------------*
* Description:
* Called to Execute commands that have been identified by the speech engine.
*
******************************************************************************/
extern int button_function(int n);
extern void hud_squadmsg_msg_all_fighters();
extern void hud_squadmsg_shortcut( int command );
@@ -204,126 +49,339 @@ extern int Msg_instance;;
extern int Msg_shortcut_command;
extern int Squad_msg_mode;
void doVid_Action(int action)
{
// If menu is up
if(Player->flags & PLAYER_FLAGS_MSG_MODE)
{
switch(action)
{
case VID_DestroyTarget: Msg_shortcut_command = ATTACK_TARGET_ITEM; break;
case VID_DisableTarget: Msg_shortcut_command = DISABLE_TARGET_ITEM; break;
case VID_DisarmTarget: Msg_shortcut_command = DISARM_TARGET_ITEM; break;
case VID_DestroySubsys: Msg_shortcut_command = DISABLE_SUBSYSTEM_ITEM; break;
case VID_ProtectTarget: Msg_shortcut_command = PROTECT_TARGET_ITEM; break;
case VID_IgnoreTarget: Msg_shortcut_command = IGNORE_TARGET_ITEM; break;
case VID_FormWing: Msg_shortcut_command = FORMATION_ITEM; break;
case VID_CoverMe: Msg_shortcut_command = COVER_ME_ITEM; break;
case VID_EngageEnemy: Msg_shortcut_command = ENGAGE_ENEMY_ITEM; break;
case VID_Depart: Msg_shortcut_command = DEPART_ITEM; break;
default: Msg_shortcut_command = -1; break;
}
if(Msg_instance == MESSAGE_ALL_FIGHTERS || Squad_msg_mode == SM_MODE_ALL_FIGHTERS )
{
// nprintf(("warning", "VOICER hud_squadmsg_send_to_all_fighters\n"));
hud_squadmsg_send_to_all_fighters(Msg_shortcut_command);
}
else if(Squad_msg_mode == SM_MODE_SHIP_COMMAND)
{
// nprintf(("warning", "VOICER msg ship %d\n", Msg_instance));
hud_squadmsg_send_ship_command( Msg_instance, Msg_shortcut_command, 1 );
}
else if(Squad_msg_mode == SM_MODE_WING_COMMAND)
{
// nprintf(("warning", "VOICER msg wing %d\n", Msg_instance));
hud_squadmsg_send_wing_command( Msg_instance, Msg_shortcut_command, 1 );
}
else if(Squad_msg_mode == SM_MODE_REINFORCEMENTS )
{
}
hud_squadmsg_toggle();
}
else
{
switch(action)
{
case VID_DestroyTarget: button_function(ATTACK_MESSAGE); break;
case VID_DisableTarget: button_function(DISABLE_MESSAGE); break;
case VID_DisarmTarget: button_function(DISARM_MESSAGE); break;
case VID_DestroySubsys: button_function(ATTACK_SUBSYSTEM_MESSAGE); break;
case VID_ProtectTarget: button_function(PROTECT_MESSAGE); break;
case VID_IgnoreTarget: button_function(IGNORE_MESSAGE); break;
case VID_FormWing: button_function(FORM_MESSAGE); break;
case VID_CoverMe: button_function(COVER_MESSAGE); break;
case VID_EngageEnemy: button_function(ENGAGE_MESSAGE); break;
case VID_Depart: button_function(WARP_MESSAGE); break;
}
}
}
bool VOICEREC_init(HWND hWnd, int event_id, int grammar_id, int command_resource)
{
HRESULT hr = S_OK;
CComPtr<ISpAudio> cpAudio;
while (true)
{
// create a recognition engine
hr = p_recogEngine.CoCreateInstance(CLSID_SpInprocRecognizer);
if (FAILED(hr))
{
MessageBox(hWnd,"Failed to create a recognition engine\n","Error",MB_OK);
printf("Failed to create a recognition engine\n");
break;
}
// create the command recognition context
hr = p_recogEngine->CreateRecoContext( &p_recogContext );
if (FAILED(hr))
{
MessageBox(hWnd,"Failed to create the command recognition context\n","Error",MB_OK);
printf("Failed to create the command recognition context\n");
break;
}
// Let SR know that window we want it to send event information to, and using
// what message
hr = p_recogContext->SetNotifyWindowMessage( hWnd, event_id, 0, 0 );
if (FAILED(hr))
{
MessageBox(hWnd,"Failed to SetNotifyWindowMessage\n","Error",MB_OK);
break;
}
// Tell SR what types of events interest us. Here we only care about command
// recognition.
hr = p_recogContext->SetInterest( SPFEI(SPEI_RECOGNITION), SPFEI(SPEI_RECOGNITION) );
if (FAILED(hr))
{
MessageBox(hWnd,"Failed to set events\n","Error",MB_OK);
break;
}
// Create a grammar
hr = p_recogContext->CreateGrammar(grammar_id, &p_grammarObject);
if (FAILED(hr))
{
MessageBox(hWnd,"Failed to create grammar\n","Error",MB_OK);
break;
}
// Load our grammar from data\phrases.xml, or if that doesn't exist, from the compiled in
// user defined ("SRGRAMMAR") resource type.
hr = p_grammarObject->LoadCmdFromFile(L"data\\phrases.xml", SPLO_STATIC);
if (FAILED(hr))
{
hr = p_grammarObject->LoadCmdFromResource(NULL, MAKEINTRESOURCEW(command_resource),
L"SRGRAMMAR", MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL),
SPLO_STATIC);
if (FAILED(hr))
{
MessageBox(hWnd,"Failed to load resource\n","Error",MB_OK);
break;
}
}
hr = SpCreateDefaultObjectFromCategoryId(SPCAT_AUDIOIN, &cpAudio);
if (FAILED(hr))
{
MessageBox(hWnd,"Failed to get default audio input\n", "Error", MB_OK);
break;
}
// Set the audio input to our token.
hr = p_recogEngine->SetInput(cpAudio, TRUE);
if (FAILED(hr))
{
MessageBox(hWnd,"Failed to set audio input\n", "Error", MB_OK);
}
// Set rules to active, we are now listening for commands
hr = p_grammarObject->SetRuleState(NULL, NULL, SPRS_ACTIVE );
if (FAILED(hr))
{
MessageBox(hWnd,"Failed to set listening for commands\n","Error",MB_OK);
break;
}
break;
}
// if we failed and have a partially setup SAPI, close it all down
if (FAILED(hr))
{
VOICEREC_deinit();
}
return ( hr == S_OK);
}
void VOICEREC_deinit()
{
// Release grammar, if loaded
if ( p_grammarObject )
{
p_grammarObject.Release();
}
// Release recognition context, if created
if ( p_recogContext )
{
p_recogContext->SetNotifySink(NULL);
p_recogContext.Release();
}
// Release recognition engine instance, if created
if ( p_recogEngine )
{
p_recogEngine.Release();
}
}
void VOICEREC_execute_command(ISpPhrase *pPhrase, HWND hWnd);
void VOICEREC_process_event(HWND hWnd)
{
CSpEvent event; // Event helper class
// Loop processing events while there are any in the queue
while (event.GetFrom(p_recogContext) == S_OK)
{
// Look at recognition event only
switch (event.eEventId)
{
case SPEI_RECOGNITION:
VOICEREC_execute_command(event.RecoResult(), hWnd);
break;
}
}
}
/******************************************************************************
* ExecuteCommand *
*----------------*
* Description:
* Called to Execute commands that have been identified by the speech engine.
*
******************************************************************************/
char VOICEREC_lastCommand[30];
void VOICEREC_execute_command(ISpPhrase *pPhrase, HWND hWnd)
{
SPPHRASE *pElements;
SPPHRASE *pElements;
// Get the phrase elements, one of which is the rule id we specified in
// the grammar. Switch on it to figure out which command was recognized.
if (SUCCEEDED(pPhrase->GetPhrase(&pElements)))
{
// Get the phrase elements, one of which is the rule id we specified in
// the grammar. Switch on it to figure out which command was recognized.
if (SUCCEEDED(pPhrase->GetPhrase(&pElements)))
{
#ifndef NDEBUG
if(DEBUG_ON)
{
WCHAR *pwszText;
char szText[255];
int i;
pPhrase->GetText(SP_GETWHOLEPHRASE, SP_GETWHOLEPHRASE, TRUE, &pwszText, NULL);
MessageBoxW(NULL,pwszText,NULL,MB_OK);
}
switch ( pElements->Rule.ulId )
{
case VID_ShipName:
memset(szText, 0, 255);
for (i=0;i<254;i++)
{
int wingType = pElements->pProperties->vValue.ulVal;
int shipNum = pElements->pProperties->pNextSibling->vValue.ulVal;
char shipName[NAME_LENGTH];
wing_bash_ship_name(shipName, wing_names[wingType], shipNum);
Msg_instance = ship_name_lookup(shipName);
// Can't issue commands to yourself or to nobody
if(Msg_instance < 0 || Msg_instance == Player_obj->instance)
if (*(pwszText + i) == 0)
{
break;
}
if(!(Player->flags & PLAYER_FLAGS_MSG_MODE))
{
hud_squadmsg_toggle();
}
hud_squadmsg_do_mode(SM_MODE_SHIP_COMMAND);
break;
szText[i] = (char)(*(pwszText + i));
szText[i+1] = 0;
}
mprintf(( "recognized speech : %s \n", szText ));
mprintf(( "speech Rule.ulId : %d \n", pElements->Rule.ulId ));
//MessageBoxW(NULL,pwszText,NULL,MB_OK);
::CoTaskMemFree(pwszText);
}
#endif
int part1, part2, part3;
part1 = part2 = part3 = -1;
switch ( pElements->Rule.ulId )
{
case VID_WingName:
{
int wingType = pElements->pProperties->vValue.ulVal;
Msg_instance = wing_lookup(wing_names[wingType]);
if (Msg_instance < 0)
break;
if(!(Player->flags & PLAYER_FLAGS_MSG_MODE))
part1 = pElements->pProperties->vValue.ulVal;
if (pElements->pProperties->pNextSibling)
{
hud_squadmsg_toggle();
part2 = pElements->pProperties->pNextSibling->vValue.ulVal;
if (pElements->pProperties->pNextSibling->pNextSibling)
{
part3 = pElements->pProperties->pNextSibling->pNextSibling->vValue.ulVal;
}
}
if (part2 == -1)
break; // no ship number or wing
const wchar_t* valstr = pElements->pProperties->pszValue;
char* wing_name = new char[wcslen(valstr)+1];
size_t j = 0;
for (size_t i = 0; i < wcslen(valstr); i++) {
int c = wctob(valstr[i]);
if (c != EOF) {
wing_name[j++] = static_cast<char>(c);
}
}
wing_name[j] = '\0';
if (part2 == 0)
{
Msg_instance = wing_lookup(wing_name);
delete[] wing_name;
if (Msg_instance < 0)
break;
if(!(Player->flags & PLAYER_FLAGS_MSG_MODE))
{
hud_squadmsg_toggle();
}
hud_squadmsg_do_mode(SM_MODE_WING_COMMAND);
}
else
{
char shipName[NAME_LENGTH];
wing_bash_ship_name(shipName, wing_name, part2);
delete[] wing_name;
Msg_instance = ship_name_lookup(shipName);
// Can't issue commands to yourself or to nobody
if (Msg_instance < 0 || Msg_instance == Player_obj->instance)
{
break;
}
if(!(Player->flags & PLAYER_FLAGS_MSG_MODE))
{
hud_squadmsg_toggle();
}
hud_squadmsg_do_mode(SM_MODE_SHIP_COMMAND);
}
hud_squadmsg_do_mode(SM_MODE_WING_COMMAND);
break;
if (part3 == -1)
break;
}
case VID_Action:
{
int action = pElements->pProperties->vValue.ulVal;
// If menu is up
if(Player->flags & PLAYER_FLAGS_MSG_MODE)
int action;
if (part3 == -1)
{
switch(action)
{
case VID_DestoryTarget: Msg_shortcut_command = ATTACK_TARGET_ITEM; break;
case VID_DisableTarget: Msg_shortcut_command = DISABLE_TARGET_ITEM; break;
case VID_DisarmTarget: Msg_shortcut_command = DISARM_TARGET_ITEM; break;
case VID_DestroySubsys: Msg_shortcut_command = DISABLE_SUBSYSTEM_ITEM; break;
case VID_ProtectTarget: Msg_shortcut_command = PROTECT_TARGET_ITEM; break;
case VID_IgnoreTarget: Msg_shortcut_command = IGNORE_TARGET_ITEM; break;
case VID_FormWing: Msg_shortcut_command = FORMATION_ITEM; break;
case VID_CoverMe: Msg_shortcut_command = COVER_ME_ITEM; break;
case VID_EngageEnemy: Msg_shortcut_command = ENGAGE_ENEMY_ITEM; break;
case VID_Depart: Msg_shortcut_command = DEPART_ITEM; break;
default: Msg_shortcut_command = -1; break;
}
if(Msg_instance == MESSAGE_ALL_FIGHTERS || Squad_msg_mode == SM_MODE_ALL_FIGHTERS )
{
// nprintf(("warning", "VOICER hud_squadmsg_send_to_all_fighters\n"));
hud_squadmsg_send_to_all_fighters(Msg_shortcut_command);
}
else if(Squad_msg_mode == SM_MODE_SHIP_COMMAND)
{
// nprintf(("warning", "VOICER msg ship %d\n", Msg_instance));
hud_squadmsg_send_ship_command( Msg_instance, Msg_shortcut_command, 1 );
}
else if(Squad_msg_mode == SM_MODE_WING_COMMAND)
{
// nprintf(("warning", "VOICER msg wing %d\n", Msg_instance));
hud_squadmsg_send_wing_command( Msg_instance, Msg_shortcut_command, 1 );
}
else if(Squad_msg_mode == SM_MODE_REINFORCEMENTS )
{
}
hud_squadmsg_toggle();
action = pElements->pProperties->vValue.ulVal;
}
else
{
switch(action)
{
case VID_DestoryTarget: button_function(ATTACK_MESSAGE); break;
case VID_DisableTarget: button_function(DISABLE_MESSAGE); break;
case VID_DisarmTarget: button_function(DISARM_MESSAGE); break;
case VID_DestroySubsys: button_function(ATTACK_SUBSYSTEM_MESSAGE); break;
case VID_ProtectTarget: button_function(PROTECT_MESSAGE); break;
case VID_IgnoreTarget: button_function(IGNORE_MESSAGE); break;
case VID_FormWing: button_function(FORM_MESSAGE); break;
case VID_CoverMe: button_function(COVER_MESSAGE); break;
case VID_EngageEnemy: button_function(ENGAGE_MESSAGE); break;
case VID_Depart: button_function(WARP_MESSAGE); break;
}
action = part3;
}
doVid_Action(action);
break;
}
@@ -346,7 +404,7 @@ void VOICEREC_execute_command(ISpPhrase *pPhrase, HWND hWnd)
switch(action)
{
case VID_Ships:
case VID_Ships:
hud_squadmsg_do_mode( SM_MODE_SHIP_SELECT );
break;
@@ -354,19 +412,22 @@ void VOICEREC_execute_command(ISpPhrase *pPhrase, HWND hWnd)
hud_squadmsg_do_mode( SM_MODE_WING_SELECT );
break;
case VID_AllFighters:
case VID_AllFighters:
case VID_AllWings:
// Msg_instance = MESSAGE_ALL_FIGHTERS;
// Squad_msg_mode == SM_MODE_ALL_FIGHTERS
hud_squadmsg_msg_all_fighters();
if (pElements->pProperties->pFirstChild) {
doVid_Action(pElements->pProperties->pFirstChild->vValue.ulVal);
}
// if(Msg_shortcut_command == -1)
// {
// hud_squadmsg_do_mode( SM_MODE_ALL_FIGHTERS );
// hud_squadmsg_do_mode( SM_MODE_ALL_FIGHTERS );
// }
break;
case VID_Reinforcements:
case VID_Reinforcements:
hud_squadmsg_do_mode( SM_MODE_REINFORCEMENTS );
break;
@@ -384,25 +445,80 @@ void VOICEREC_execute_command(ISpPhrase *pPhrase, HWND hWnd)
break;
}
case VID_shields:
{
int action = pElements->pProperties->vValue.ulVal;
mprintf(("Shield Transfer %d \n", action));
switch(action)
{
case 0: button_function( SHIELD_XFER_TOP ); break;
case 1: button_function( SHIELD_XFER_LEFT ); break;
case 2: button_function( SHIELD_XFER_RIGHT ); break;
case 3: button_function( SHIELD_XFER_BOTTOM ); break;
case 4: button_function( SHIELD_EQUALIZE ); break;
}
break;
}
case VID_speed:
case VID_targeting:
case VID_other:
{
int action = pElements->pProperties->vValue.ulVal;
mprintf(("Targeting/speed %d \n", action));
if (action > -1)
{
button_function( action );
}
break;
/*
switch(action)
{
case 0: button_function( TARGET_NEXT ); break;
cas
}
break;
*/
}
case VID_power:
{
int action = pElements->pProperties->vValue.ulVal;
if (action >= INCREASE_WEAPON && action <= ETS_EQUALIZE)
{
button_function( action );
}
else
// this is for the max engines etc.
{
for (int i=1; i<7; i++)
{
button_function( action - 132 );
}
}
break;
}
/*
/*
hud_squadmsg_do_mode( SM_MODE_SHIP_COMMAND ); // and move to a new mode
hud_squadmsg_do_mode( SM_MODE_WING_COMMAND ); // and move to a new mode
hud_squadmsg_do_mode( SM_MODE_SHIP_COMMAND );
*/
}
// Free the pElements memory which was allocated for us
::CoTaskMemFree(pElements);
}
}
// Free the pElements memory which was allocated for us
::CoTaskMemFree(pElements);
}
}
#endif // VOICER
#endif // _WIN32
+24
View File
@@ -2338,6 +2338,30 @@ int beam_collide_ship(obj_pair *pair)
int hull_enter_collision = model_collide(&mc_hull_enter);
int hull_exit_collision = (beam_will_tool_target(b, ship_objp)) ? model_collide(&mc_hull_exit) : 0;
// If we have a range less than the "far" range, check if the ray actually hit within the range
if (b->range < BEAM_FAR_LENGTH
&& (shield_collision || hull_enter_collision || hull_exit_collision))
{
// We can't use hit_dist as "1" is the distance between p0 and p1
float rangeSq = b->range * b->range;
// actually make sure that the collision points are within range of our beam
if (shield_collision && vm_vec_dist_squared(&b->last_start, &mc_shield.hit_point_world) > rangeSq)
{
shield_collision = 0;
}
if (hull_enter_collision && vm_vec_dist_squared(&b->last_start, &mc_hull_enter.hit_point_world) > rangeSq)
{
hull_enter_collision = 0;
}
if (hull_exit_collision && vm_vec_dist_squared(&mc_hull_exit.hit_point_world, &b->last_start) > rangeSq)
{
hull_exit_collision = 0;
}
}
// check shields for impact
// (tooled ships are probably not going to be maintaining a shield over their exit hole,
// therefore we need only check the entrance, just as with conventional weapons)
+13 -1
View File
@@ -1305,10 +1305,22 @@ int parse_weapon(int subtype, bool replace)
if(optional_string("@Laser Color:"))
{
// This might be confusing at first glance. If we're a modular table (!first_time),
// AND we're providing a new color for the laser (being in this block at all),
// AND the RGB values for laser_color_1 and laser_color_2 match...
// THEN we conclude that laser_color_2 wasn't explicitly defined before, and the modder would probably prefer
// it if the laser didn't suddenly start changing colors from the new to the old over its lifespan. -MageKing17
bool reset = (!first_time && (
(wip->laser_color_1.red == wip->laser_color_2.red) &&
(wip->laser_color_1.green == wip->laser_color_2.green) &&
(wip->laser_color_1.blue == wip->laser_color_2.blue)));
stuff_ubyte(&r);
stuff_ubyte(&g);
stuff_ubyte(&b);
gr_init_color( &wip->laser_color_1, r, g, b );
if (reset) {
gr_init_color( &wip->laser_color_2, wip->laser_color_1.red, wip->laser_color_1.green, wip->laser_color_1.blue );
}
}
// optional string for cycling laser colors
@@ -1317,7 +1329,7 @@ int parse_weapon(int subtype, bool replace)
stuff_ubyte(&g);
stuff_ubyte(&b);
gr_init_color( &wip->laser_color_2, r, g, b );
} else {
} else if (first_time) {
gr_init_color( &wip->laser_color_2, wip->laser_color_1.red, wip->laser_color_1.green, wip->laser_color_1.blue );
}
+3 -3
View File
@@ -2,7 +2,7 @@ dnl configure.ac for fs2_open
dnl
dnl $Id: configure.ac,v 1.31.2.4 2007-05-28 19:36:12 taylor Exp $
AC_INIT(fs2_open, 3.7.1)
AC_INIT(fs2_open, 3.7.3)
AC_CONFIG_SRCDIR(code/freespace2/freespace.cpp)
dnl we need at least version 2.54 of autoconf
@@ -151,7 +151,7 @@ case "$target" in
CPPFLAGS="$CPPFLAGS -I/opt/csw/include"
;;
*freebsd* | *openbsd*)
# FreeBSD 9.1
# FreeBSD 10.1
echo "Using Unix defines (for $host_os $host_cpu)"
echo "************************************************************"
echo "************************ NOTE ******************************"
@@ -163,7 +163,7 @@ case "$target" in
fs2_os_bsd="yes"
if test "$host_cpu" = "amd64"
then
D_CFLAGS="$D_CFLAGS -m64 -march=athlon64 -ansi"
D_CFLAGS="$D_CFLAGS -m64 -march=athlon64"
fi
D_CFLAGS="$D_CFLAGS -DLUA_USE_LINUX"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
+1553 -2651
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (c) 2009-2013 Petri Lehtinen <[email protected]>
Copyright (c) 2009-2014 Petri Lehtinen <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+19 -13
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2013 Petri Lehtinen <petri@digip.org>
* Copyright (c) 2009-2014 Petri Lehtinen <petri@digip.org>
*
* Jansson is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
@@ -22,6 +22,9 @@
#define MAX_INTEGER_STR_LENGTH 100
#define MAX_REAL_STR_LENGTH 100
#define FLAGS_TO_INDENT(f) ((f) & 0x1F)
#define FLAGS_TO_PRECISION(f) (((f) >> 11) & 0x1F)
struct object_key {
size_t serial;
const char *key;
@@ -45,9 +48,9 @@ static const char whitespace[] = " ";
static int dump_indent(size_t flags, int depth, int space, json_dump_callback_t dump, void *data)
{
if(JSON_INDENT(flags) > 0)
if(FLAGS_TO_INDENT(flags) > 0)
{
int i, ws_count = JSON_INDENT(flags);
int i, ws_count = FLAGS_TO_INDENT(flags);
if(dump("\n", 1, data))
return -1;
@@ -65,24 +68,25 @@ static int dump_indent(size_t flags, int depth, int space, json_dump_callback_t
return 0;
}
static int dump_string(const char *str, json_dump_callback_t dump, void *data, size_t flags)
static int dump_string(const char *str, size_t len, json_dump_callback_t dump, void *data, size_t flags)
{
const char *pos, *end;
const char *pos, *end, *lim;
int32_t codepoint;
if(dump("\"", 1, data))
return -1;
end = pos = str;
lim = str + len;
while(1)
{
const char *text;
char seq[13];
int length;
while(*end)
while(end < lim)
{
end = utf8_iterate(pos, &codepoint);
end = utf8_iterate(pos, lim - pos, &codepoint);
if(!end)
return -1;
@@ -126,7 +130,7 @@ static int dump_string(const char *str, json_dump_callback_t dump, void *data, s
/* codepoint is in BMP */
if(codepoint < 0x10000)
{
sprintf(seq, "\\u%04x", codepoint);
sprintf(seq, "\\u%04X", codepoint);
length = 6;
}
@@ -139,7 +143,7 @@ static int dump_string(const char *str, json_dump_callback_t dump, void *data, s
first = 0xD800 | ((codepoint & 0xffc00) >> 10);
last = 0xDC00 | (codepoint & 0x003ff);
sprintf(seq, "\\u%04x\\u%04x", first, last);
sprintf(seq, "\\u%04X\\u%04X", first, last);
length = 12;
}
@@ -207,7 +211,8 @@ static int do_dump(const json_t *json, size_t flags, int depth,
int size;
double value = json_real_value(json);
size = jsonp_dtostr(buffer, MAX_REAL_STR_LENGTH, value);
size = jsonp_dtostr(buffer, MAX_REAL_STR_LENGTH, value,
FLAGS_TO_PRECISION(flags));
if(size < 0)
return -1;
@@ -215,7 +220,7 @@ static int do_dump(const json_t *json, size_t flags, int depth,
}
case JSON_STRING:
return dump_string(json_string_value(json), dump, data, flags);
return dump_string(json_string_value(json), json_string_length(json), dump, data, flags);
case JSON_ARRAY:
{
@@ -336,7 +341,7 @@ static int do_dump(const json_t *json, size_t flags, int depth,
value = json_object_get(json, key);
assert(value);
dump_string(key, dump, data, flags);
dump_string(key, strlen(key), dump, data, flags);
if(dump(separator, separator_length, data) ||
do_dump(value, flags, depth + 1, dump, data))
{
@@ -372,8 +377,9 @@ static int do_dump(const json_t *json, size_t flags, int depth,
while(iter)
{
void *next = json_object_iter_next((json_t *)json, iter);
const char *key = json_object_iter_key(iter);
dump_string(json_object_iter_key(iter), dump, data, flags);
dump_string(key, strlen(key), dump, data, flags);
if(dump(separator, separator_length, data) ||
do_dump(json_object_iter_value(iter), flags, depth + 1,
dump, data))
+36 -44
View File
@@ -1,12 +1,21 @@
/*
* Copyright (c) 2009-2013 Petri Lehtinen <petri@digip.org>
* Copyright (c) 2009-2014 Petri Lehtinen <petri@digip.org>
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
*/
#if HAVE_CONFIG_H
#include <jansson_private_config.h>
#endif
#include <stdlib.h>
#include <string.h>
#if HAVE_STDINT_H
#include <stdint.h>
#endif
#include <jansson_config.h> /* for JSON_INLINE */
#include "jansson_private.h" /* for container_of() */
#include "hashtable.h"
@@ -15,24 +24,13 @@ typedef struct hashtable_list list_t;
typedef struct hashtable_pair pair_t;
typedef struct hashtable_bucket bucket_t;
extern volatile uint32_t hashtable_seed;
/* Implementation of the hash function */
#include "lookup3.h"
#define list_to_pair(list_) container_of(list_, pair_t, list)
/* From http://www.cse.yorku.ca/~oz/hash.html */
static size_t hash_str(const void *ptr)
{
const char *str = (const char *)ptr;
size_t hash = 5381;
size_t c;
while((c = (size_t)*str))
{
hash = ((hash << 5) + hash) + c;
str++;
}
return hash;
}
#define hash_str(key) ((size_t)hashlittle((key), strlen(key), hashtable_seed))
static JSON_INLINE void list_init(list_t *list)
{
@@ -74,19 +72,6 @@ static void insert_to_bucket(hashtable_t *hashtable, bucket_t *bucket,
}
}
static const size_t primes[] = {
5, 13, 23, 53, 97, 193, 389, 769, 1543, 3079, 6151, 12289, 24593,
49157, 98317, 196613, 393241, 786433, 1572869, 3145739, 6291469,
12582917, 25165843, 50331653, 100663319, 201326611, 402653189,
805306457, 1610612741
};
static JSON_INLINE size_t num_buckets(hashtable_t *hashtable)
{
return primes[hashtable->num_buckets];
}
static pair_t *hashtable_find_pair(hashtable_t *hashtable, bucket_t *bucket,
const char *key, size_t hash)
{
@@ -120,7 +105,7 @@ static int hashtable_do_del(hashtable_t *hashtable,
bucket_t *bucket;
size_t index;
index = hash % num_buckets(hashtable);
index = hash & hashmask(hashtable->order);
bucket = &hashtable->buckets[index];
pair = hashtable_find_pair(hashtable, bucket, key, hash);
@@ -167,14 +152,14 @@ static int hashtable_do_rehash(hashtable_t *hashtable)
jsonp_free(hashtable->buckets);
hashtable->num_buckets++;
new_size = num_buckets(hashtable);
hashtable->order++;
new_size = hashsize(hashtable->order);
hashtable->buckets = jsonp_malloc(new_size * sizeof(bucket_t));
if(!hashtable->buckets)
return -1;
for(i = 0; i < num_buckets(hashtable); i++)
for(i = 0; i < hashsize(hashtable->order); i++)
{
hashtable->buckets[i].first = hashtable->buckets[i].last =
&hashtable->list;
@@ -199,14 +184,14 @@ int hashtable_init(hashtable_t *hashtable)
size_t i;
hashtable->size = 0;
hashtable->num_buckets = 0; /* index to primes[] */
hashtable->buckets = jsonp_malloc(num_buckets(hashtable) * sizeof(bucket_t));
hashtable->order = 3;
hashtable->buckets = jsonp_malloc(hashsize(hashtable->order) * sizeof(bucket_t));
if(!hashtable->buckets)
return -1;
list_init(&hashtable->list);
for(i = 0; i < num_buckets(hashtable); i++)
for(i = 0; i < hashsize(hashtable->order); i++)
{
hashtable->buckets[i].first = hashtable->buckets[i].last =
&hashtable->list;
@@ -230,12 +215,12 @@ int hashtable_set(hashtable_t *hashtable,
size_t hash, index;
/* rehash if the load ratio exceeds 1 */
if(hashtable->size >= num_buckets(hashtable))
if(hashtable->size >= hashsize(hashtable->order))
if(hashtable_do_rehash(hashtable))
return -1;
hash = hash_str(key);
index = hash % num_buckets(hashtable);
index = hash & hashmask(hashtable->order);
bucket = &hashtable->buckets[index];
pair = hashtable_find_pair(hashtable, bucket, key, hash);
@@ -249,7 +234,14 @@ int hashtable_set(hashtable_t *hashtable,
/* offsetof(...) returns the size of pair_t without the last,
flexible member. This way, the correct amount is
allocated. */
pair = jsonp_malloc(offsetof(pair_t, key) + strlen(key) + 1);
size_t len = strlen(key);
if(len >= (size_t)-1 - offsetof(pair_t, key)) {
/* Avoid an overflow if the key is very long */
return -1;
}
pair = jsonp_malloc(offsetof(pair_t, key) + len + 1);
if(!pair)
return -1;
@@ -273,7 +265,7 @@ void *hashtable_get(hashtable_t *hashtable, const char *key)
bucket_t *bucket;
hash = hash_str(key);
bucket = &hashtable->buckets[hash % num_buckets(hashtable)];
bucket = &hashtable->buckets[hash & hashmask(hashtable->order)];
pair = hashtable_find_pair(hashtable, bucket, key, hash);
if(!pair)
@@ -294,7 +286,7 @@ void hashtable_clear(hashtable_t *hashtable)
hashtable_do_clear(hashtable);
for(i = 0; i < num_buckets(hashtable); i++)
for(i = 0; i < hashsize(hashtable->order); i++)
{
hashtable->buckets[i].first = hashtable->buckets[i].last =
&hashtable->list;
@@ -316,7 +308,7 @@ void *hashtable_iter_at(hashtable_t *hashtable, const char *key)
bucket_t *bucket;
hash = hash_str(key);
bucket = &hashtable->buckets[hash % num_buckets(hashtable)];
bucket = &hashtable->buckets[hash & hashmask(hashtable->order)];
pair = hashtable_find_pair(hashtable, bucket, key, hash);
if(!pair)
+3 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2013 Petri Lehtinen <petri@digip.org>
* Copyright (c) 2009-2014 Petri Lehtinen <petri@digip.org>
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
@@ -32,7 +32,7 @@ struct hashtable_bucket {
typedef struct hashtable {
size_t size;
struct hashtable_bucket *buckets;
size_t num_buckets; /* index to primes[] */
size_t order; /* hashtable has pow(2, order) buckets */
struct hashtable_list list;
} hashtable_t;
@@ -40,6 +40,7 @@ typedef struct hashtable {
#define hashtable_key_to_iter(key_) \
(&(container_of(key_, struct hashtable_pair, key)->list))
/**
* hashtable_init - Initialize a hashtable object
*
+277
View File
@@ -0,0 +1,277 @@
/* Generate sizeof(uint32_t) bytes of as random data as possible to seed
the hash function.
*/
#ifdef HAVE_CONFIG_H
#include <jansson_private_config.h>
#endif
#include <stdio.h>
#include <time.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_SCHED_H
#include <sched.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if defined(_WIN32)
/* For GetModuleHandle(), GetProcAddress() and GetCurrentProcessId() */
#include <windows.h>
#endif
#include "jansson.h"
static uint32_t buf_to_uint32(char *data) {
size_t i;
uint32_t result = 0;
for (i = 0; i < sizeof(uint32_t); i++)
result = (result << 8) | (unsigned char)data[i];
return result;
}
/* /dev/urandom */
#if !defined(_WIN32) && defined(USE_URANDOM)
static int seed_from_urandom(uint32_t *seed) {
/* Use unbuffered I/O if we have open(), close() and read(). Otherwise
fall back to fopen() */
char data[sizeof(uint32_t)];
int ok;
#if defined(HAVE_OPEN) && defined(HAVE_CLOSE) && defined(HAVE_READ)
int urandom;
urandom = open("/dev/urandom", O_RDONLY);
if (urandom == -1)
return 1;
ok = read(urandom, data, sizeof(uint32_t)) == sizeof(uint32_t);
close(urandom);
#else
FILE *urandom;
urandom = fopen("/dev/urandom", "rb");
if (!urandom)
return 1;
ok = fread(data, 1, sizeof(uint32_t), urandom) == sizeof(uint32_t);
fclose(urandom);
#endif
if (!ok)
return 1;
*seed = buf_to_uint32(data);
return 0;
}
#endif
/* Windows Crypto API */
#if defined(_WIN32) && defined(USE_WINDOWS_CRYPTOAPI)
#include <wincrypt.h>
typedef BOOL (WINAPI *CRYPTACQUIRECONTEXTA)(HCRYPTPROV *phProv, LPCSTR pszContainer, LPCSTR pszProvider, DWORD dwProvType, DWORD dwFlags);
typedef BOOL (WINAPI *CRYPTGENRANDOM)(HCRYPTPROV hProv, DWORD dwLen, BYTE *pbBuffer);
typedef BOOL (WINAPI *CRYPTRELEASECONTEXT)(HCRYPTPROV hProv, DWORD dwFlags);
static int seed_from_windows_cryptoapi(uint32_t *seed)
{
HINSTANCE hAdvAPI32 = NULL;
CRYPTACQUIRECONTEXTA pCryptAcquireContext = NULL;
CRYPTGENRANDOM pCryptGenRandom = NULL;
CRYPTRELEASECONTEXT pCryptReleaseContext = NULL;
HCRYPTPROV hCryptProv = 0;
BYTE data[sizeof(uint32_t)];
int ok;
hAdvAPI32 = GetModuleHandle(TEXT("advapi32.dll"));
if(hAdvAPI32 == NULL)
return 1;
pCryptAcquireContext = (CRYPTACQUIRECONTEXTA)GetProcAddress(hAdvAPI32, "CryptAcquireContextA");
if (!pCryptAcquireContext)
return 1;
pCryptGenRandom = (CRYPTGENRANDOM)GetProcAddress(hAdvAPI32, "CryptGenRandom");
if (!pCryptGenRandom)
return 1;
pCryptReleaseContext = (CRYPTRELEASECONTEXT)GetProcAddress(hAdvAPI32, "CryptReleaseContext");
if (!pCryptReleaseContext)
return 1;
if (!pCryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
return 1;
ok = pCryptGenRandom(hCryptProv, sizeof(uint32_t), data);
pCryptReleaseContext(hCryptProv, 0);
if (!ok)
return 1;
*seed = buf_to_uint32((char *)data);
return 0;
}
#endif
/* gettimeofday() and getpid() */
static int seed_from_timestamp_and_pid(uint32_t *seed) {
#ifdef HAVE_GETTIMEOFDAY
/* XOR of seconds and microseconds */
struct timeval tv;
gettimeofday(&tv, NULL);
*seed = (uint32_t)tv.tv_sec ^ (uint32_t)tv.tv_usec;
#else
/* Seconds only */
*seed = (uint32_t)time(NULL);
#endif
/* XOR with PID for more randomness */
#if defined(_WIN32)
*seed ^= (uint32_t)GetCurrentProcessId();
#elif defined(HAVE_GETPID)
*seed ^= (uint32_t)getpid();
#endif
return 0;
}
static uint32_t generate_seed() {
uint32_t seed;
int done = 0;
#if !defined(_WIN32) && defined(USE_URANDOM)
if (!done && seed_from_urandom(&seed) == 0)
done = 1;
#endif
#if defined(_WIN32) && defined(USE_WINDOWS_CRYPTOAPI)
if (!done && seed_from_windows_cryptoapi(&seed) == 0)
done = 1;
#endif
if (!done) {
/* Fall back to timestamp and PID if no better randomness is
available */
seed_from_timestamp_and_pid(&seed);
}
/* Make sure the seed is never zero */
if (seed == 0)
seed = 1;
return seed;
}
volatile uint32_t hashtable_seed = 0;
#if defined(HAVE_ATOMIC_BUILTINS) && (defined(HAVE_SCHED_YIELD) || !defined(_WIN32))
static volatile char seed_initialized = 0;
void json_object_seed(size_t seed) {
uint32_t new_seed = (uint32_t)seed;
if (hashtable_seed == 0) {
if (__atomic_test_and_set(&seed_initialized, __ATOMIC_RELAXED) == 0) {
/* Do the seeding ourselves */
if (new_seed == 0)
new_seed = generate_seed();
__atomic_store_n(&hashtable_seed, new_seed, __ATOMIC_RELEASE);
} else {
/* Wait for another thread to do the seeding */
do {
#ifdef HAVE_SCHED_YIELD
sched_yield();
#endif
} while(__atomic_load_n(&hashtable_seed, __ATOMIC_ACQUIRE) == 0);
}
}
}
#elif defined(HAVE_SYNC_BUILTINS) && (defined(HAVE_SCHED_YIELD) || !defined(_WIN32))
void json_object_seed(size_t seed) {
uint32_t new_seed = (uint32_t)seed;
if (hashtable_seed == 0) {
if (new_seed == 0) {
/* Explicit synchronization fences are not supported by the
__sync builtins, so every thread getting here has to
generate the seed value.
*/
new_seed = generate_seed();
}
do {
if (__sync_bool_compare_and_swap(&hashtable_seed, 0, new_seed)) {
/* We were the first to seed */
break;
} else {
/* Wait for another thread to do the seeding */
#ifdef HAVE_SCHED_YIELD
sched_yield();
#endif
}
} while(hashtable_seed == 0);
}
}
#elif defined(_WIN32)
static long seed_initialized = 0;
void json_object_seed(size_t seed) {
uint32_t new_seed = (uint32_t)seed;
if (hashtable_seed == 0) {
if (InterlockedIncrement(&seed_initialized) == 1) {
/* Do the seeding ourselves */
if (new_seed == 0)
new_seed = generate_seed();
hashtable_seed = new_seed;
} else {
/* Wait for another thread to do the seeding */
do {
SwitchToThread();
} while (hashtable_seed == 0);
}
}
}
#else
/* Fall back to a thread-unsafe version */
void json_object_seed(size_t seed) {
uint32_t new_seed = (uint32_t)seed;
if (hashtable_seed == 0) {
if (new_seed == 0)
new_seed = generate_seed();
hashtable_seed = new_seed;
}
}
#endif
+28 -19
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2013 Petri Lehtinen <petri@digip.org>
* Copyright (c) 2009-2014 Petri Lehtinen <petri@digip.org>
*
* Jansson is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
@@ -21,11 +21,11 @@ extern "C" {
/* version */
#define JANSSON_MAJOR_VERSION 2
#define JANSSON_MINOR_VERSION 5
#define JANSSON_MINOR_VERSION 7
#define JANSSON_MICRO_VERSION 0
/* Micro version is omitted if it's 0 */
#define JANSSON_VERSION "2.5"
#define JANSSON_VERSION "2.7"
/* Version as a 3-byte hex number, e.g. 0x010201 == 1.2.1. Use this
for numeric comparisons, e.g. #if JANSSON_VERSION_HEX >= ... */
@@ -67,23 +67,26 @@ typedef long json_int_t;
#endif
#define json_typeof(json) ((json)->type)
#define json_is_object(json) (json && json_typeof(json) == JSON_OBJECT)
#define json_is_array(json) (json && json_typeof(json) == JSON_ARRAY)
#define json_is_string(json) (json && json_typeof(json) == JSON_STRING)
#define json_is_integer(json) (json && json_typeof(json) == JSON_INTEGER)
#define json_is_real(json) (json && json_typeof(json) == JSON_REAL)
#define json_is_object(json) ((json) && json_typeof(json) == JSON_OBJECT)
#define json_is_array(json) ((json) && json_typeof(json) == JSON_ARRAY)
#define json_is_string(json) ((json) && json_typeof(json) == JSON_STRING)
#define json_is_integer(json) ((json) && json_typeof(json) == JSON_INTEGER)
#define json_is_real(json) ((json) && json_typeof(json) == JSON_REAL)
#define json_is_number(json) (json_is_integer(json) || json_is_real(json))
#define json_is_true(json) (json && json_typeof(json) == JSON_TRUE)
#define json_is_false(json) (json && json_typeof(json) == JSON_FALSE)
#define json_is_true(json) ((json) && json_typeof(json) == JSON_TRUE)
#define json_is_false(json) ((json) && json_typeof(json) == JSON_FALSE)
#define json_boolean_value json_is_true
#define json_is_boolean(json) (json_is_true(json) || json_is_false(json))
#define json_is_null(json) (json && json_typeof(json) == JSON_NULL)
#define json_is_null(json) ((json) && json_typeof(json) == JSON_NULL)
/* construction, destruction, reference counting */
json_t *json_object(void);
json_t *json_array(void);
json_t *json_string(const char *value);
json_t *json_stringn(const char *value, size_t len);
json_t *json_string_nocheck(const char *value);
json_t *json_stringn_nocheck(const char *value, size_t len);
json_t *json_integer(json_int_t value);
json_t *json_real(double value);
json_t *json_true(void);
@@ -126,6 +129,7 @@ typedef struct {
/* getters, setters, manipulation */
void json_object_seed(size_t seed);
size_t json_object_size(const json_t *object);
json_t *json_object_get(const json_t *object, const char *key);
int json_object_set_new(json_t *object, const char *key, json_t *value);
@@ -199,16 +203,18 @@ int json_array_insert(json_t *array, size_t ind, json_t *value)
}
const char *json_string_value(const json_t *string);
size_t json_string_length(const json_t *string);
json_int_t json_integer_value(const json_t *integer);
double json_real_value(const json_t *real);
double json_number_value(const json_t *json);
int json_string_set(json_t *string, const char *value);
int json_string_setn(json_t *string, const char *value, size_t len);
int json_string_set_nocheck(json_t *string, const char *value);
int json_string_setn_nocheck(json_t *string, const char *value, size_t len);
int json_integer_set(json_t *integer, json_int_t value);
int json_real_set(json_t *real, double value);
/* pack, unpack */
json_t *json_pack(const char *fmt, ...);
@@ -240,6 +246,7 @@ json_t *json_deep_copy(const json_t *value);
#define JSON_DISABLE_EOF_CHECK 0x2
#define JSON_DECODE_ANY 0x4
#define JSON_DECODE_INT_AS_REAL 0x8
#define JSON_ALLOW_NUL 0x10
typedef size_t (*json_load_callback_t)(void *buffer, size_t buflen, void *data);
@@ -252,13 +259,15 @@ json_t *json_load_callback(json_load_callback_t callback, void *data, size_t fla
/* encoding */
#define JSON_INDENT(n) (n & 0x1F)
#define JSON_COMPACT 0x20
#define JSON_ENSURE_ASCII 0x40
#define JSON_SORT_KEYS 0x80
#define JSON_PRESERVE_ORDER 0x100
#define JSON_ENCODE_ANY 0x200
#define JSON_ESCAPE_SLASH 0x400
#define JSON_MAX_INDENT 0x1F
#define JSON_INDENT(n) ((n) & JSON_MAX_INDENT)
#define JSON_COMPACT 0x20
#define JSON_ENSURE_ASCII 0x40
#define JSON_SORT_KEYS 0x80
#define JSON_PRESERVE_ORDER 0x100
#define JSON_ENCODE_ANY 0x200
#define JSON_ESCAPE_SLASH 0x400
#define JSON_REAL_PRECISION(n) (((n) & 0x1F) << 11)
typedef int (*json_dump_callback_t)(const char *buffer, size_t size, void *data);
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010-2013 Petri Lehtinen <petri@digip.org>
* Copyright (c) 2010-2014 Petri Lehtinen <petri@digip.org>
*
* Jansson is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
+9 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2013 Petri Lehtinen <petri@digip.org>
* Copyright (c) 2009-2014 Petri Lehtinen <petri@digip.org>
*
* Jansson is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
@@ -49,6 +49,7 @@ typedef struct {
typedef struct {
json_t json;
char *value;
size_t length;
} json_string_t;
typedef struct {
@@ -64,9 +65,13 @@ typedef struct {
#define json_to_object(json_) container_of(json_, json_object_t, json)
#define json_to_array(json_) container_of(json_, json_array_t, json)
#define json_to_string(json_) container_of(json_, json_string_t, json)
#define json_to_real(json_) container_of(json_, json_real_t, json)
#define json_to_real(json_) container_of(json_, json_real_t, json)
#define json_to_integer(json_) container_of(json_, json_integer_t, json)
/* Create a string by taking ownership of an existing buffer */
json_t *jsonp_stringn_nocheck_own(const char *value, size_t len);
/* Error message formatting */
void jsonp_error_init(json_error_t *error, const char *source);
void jsonp_error_set_source(json_error_t *error, const char *source);
void jsonp_error_set(json_error_t *error, int line, int column,
@@ -76,13 +81,14 @@ void jsonp_error_vset(json_error_t *error, int line, int column,
/* Locale independent string<->double conversions */
int jsonp_strtod(strbuffer_t *strbuffer, double *out);
int jsonp_dtostr(char *buffer, size_t size, double value);
int jsonp_dtostr(char *buffer, size_t size, double value, int prec);
/* Wrappers for custom memory functions */
void* jsonp_malloc(size_t size);
void jsonp_free(void *ptr);
char *jsonp_strndup(const char *str, size_t length);
char *jsonp_strdup(const char *str);
char *jsonp_strndup(const char *str, size_t len);
/* Windows compatibility */
#ifdef _WIN32
+67 -39
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2013 Petri Lehtinen <petri@digip.org>
* Copyright (c) 2009-2014 Petri Lehtinen <petri@digip.org>
*
* Jansson is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
@@ -63,7 +63,10 @@ typedef struct {
strbuffer_t saved_text;
int token;
union {
char *string;
struct {
char *val;
size_t len;
} string;
json_int_t integer;
double real;
} value;
@@ -279,6 +282,13 @@ static void lex_save_cached(lex_t *lex)
}
}
static void lex_free_string(lex_t *lex)
{
jsonp_free(lex->value.string.val);
lex->value.string.val = NULL;
lex->value.string.len = 0;
}
/* assumes that str points to 'u' plus at least 4 valid hex digits */
static int32_t decode_unicode_escape(const char *str)
{
@@ -297,7 +307,7 @@ static int32_t decode_unicode_escape(const char *str)
else if(l_isupper(c))
value += c - 'A' + 10;
else
assert(0);
return -1;
}
return value;
@@ -310,7 +320,7 @@ static void lex_scan_string(lex_t *lex, json_error_t *error)
char *t;
int i;
lex->value.string = NULL;
lex->value.string.val = NULL;
lex->token = TOKEN_INVALID;
c = lex_get_save(lex, error);
@@ -365,14 +375,12 @@ static void lex_scan_string(lex_t *lex, json_error_t *error)
- two \uXXXX escapes (length 12) forming an UTF-16 surrogate pair
are converted to 4 bytes
*/
lex->value.string = jsonp_malloc(lex->saved_text.length + 1);
if(!lex->value.string) {
t = jsonp_malloc(lex->saved_text.length + 1);
if(!t) {
/* this is not very nice, since TOKEN_INVALID is returned */
goto out;
}
/* the target */
t = lex->value.string;
lex->value.string.val = t;
/* + 1 to skip the " */
p = strbuffer_value(&lex->saved_text) + 1;
@@ -381,17 +389,24 @@ static void lex_scan_string(lex_t *lex, json_error_t *error)
if(*p == '\\') {
p++;
if(*p == 'u') {
char buffer[4];
int length;
size_t length;
int32_t value;
value = decode_unicode_escape(p);
if(value < 0) {
error_set(error, lex, "invalid Unicode escape '%.6s'", p - 1);
goto out;
}
p += 5;
if(0xD800 <= value && value <= 0xDBFF) {
/* surrogate pair */
if(*p == '\\' && *(p + 1) == 'u') {
int32_t value2 = decode_unicode_escape(++p);
if(value2 < 0) {
error_set(error, lex, "invalid Unicode escape '%.6s'", p - 1);
goto out;
}
p += 5;
if(0xDC00 <= value2 && value2 <= 0xDFFF) {
@@ -420,16 +435,9 @@ static void lex_scan_string(lex_t *lex, json_error_t *error)
error_set(error, lex, "invalid Unicode '\\u%04X'", value);
goto out;
}
else if(value == 0)
{
error_set(error, lex, "\\u0000 is not allowed");
goto out;
}
if(utf8_encode(value, buffer, &length))
if(utf8_encode(value, t, &length))
assert(0);
memcpy(t, buffer, length);
t += length;
}
else {
@@ -451,11 +459,12 @@ static void lex_scan_string(lex_t *lex, json_error_t *error)
*(t++) = *(p++);
}
*t = '\0';
lex->value.string.len = t - lex->value.string.val;
lex->token = TOKEN_STRING;
return;
out:
jsonp_free(lex->value.string);
lex_free_string(lex);
}
#ifndef JANSSON_USING_CMAKE /* disabled if using cmake */
@@ -474,7 +483,7 @@ static int lex_scan_number(lex_t *lex, int c, json_error_t *error)
{
const char *saved_text;
char *end;
double value;
double doubleval;
lex->token = TOKEN_INVALID;
@@ -499,16 +508,16 @@ static int lex_scan_number(lex_t *lex, int c, json_error_t *error)
}
if(c != '.' && c != 'E' && c != 'e') {
json_int_t value;
json_int_t intval;
lex_unget_unsave(lex, c);
saved_text = strbuffer_value(&lex->saved_text);
errno = 0;
value = json_strtoint(saved_text, &end, 10);
intval = json_strtoint(saved_text, &end, 10);
if(errno == ERANGE) {
if(value < 0)
if(intval < 0)
error_set(error, lex, "too big negative integer");
else
error_set(error, lex, "too big integer");
@@ -518,7 +527,7 @@ static int lex_scan_number(lex_t *lex, int c, json_error_t *error)
assert(end == saved_text + lex->saved_text.length);
lex->token = TOKEN_INTEGER;
lex->value.integer = value;
lex->value.integer = intval;
return 0;
}
@@ -552,13 +561,13 @@ static int lex_scan_number(lex_t *lex, int c, json_error_t *error)
lex_unget_unsave(lex, c);
if(jsonp_strtod(&lex->saved_text, &value)) {
if(jsonp_strtod(&lex->saved_text, &doubleval)) {
error_set(error, lex, "real number overflow");
goto out;
}
lex->token = TOKEN_REAL;
lex->value.real = value;
lex->value.real = doubleval;
return 0;
out:
@@ -571,10 +580,8 @@ static int lex_scan(lex_t *lex, json_error_t *error)
strbuffer_clear(&lex->saved_text);
if(lex->token == TOKEN_STRING) {
jsonp_free(lex->value.string);
lex->value.string = NULL;
}
if(lex->token == TOKEN_STRING)
lex_free_string(lex);
c = lex_get(lex, error);
while(c == ' ' || c == '\t' || c == '\n' || c == '\r')
@@ -635,13 +642,14 @@ out:
return lex->token;
}
static char *lex_steal_string(lex_t *lex)
static char *lex_steal_string(lex_t *lex, size_t *out_len)
{
char *result = NULL;
if(lex->token == TOKEN_STRING)
{
result = lex->value.string;
lex->value.string = NULL;
if(lex->token == TOKEN_STRING) {
result = lex->value.string.val;
*out_len = lex->value.string.len;
lex->value.string.val = NULL;
lex->value.string.len = 0;
}
return result;
}
@@ -659,7 +667,7 @@ static int lex_init(lex_t *lex, get_func get, void *data)
static void lex_close(lex_t *lex)
{
if(lex->token == TOKEN_STRING)
jsonp_free(lex->value.string);
lex_free_string(lex);
strbuffer_close(&lex->saved_text);
}
@@ -680,6 +688,7 @@ static json_t *parse_object(lex_t *lex, size_t flags, json_error_t *error)
while(1) {
char *key;
size_t len;
json_t *value;
if(lex->token != TOKEN_STRING) {
@@ -687,9 +696,14 @@ static json_t *parse_object(lex_t *lex, size_t flags, json_error_t *error)
goto error;
}
key = lex_steal_string(lex);
key = lex_steal_string(lex, &len);
if(!key)
return NULL;
if (memchr(key, '\0', len)) {
jsonp_free(key);
error_set(error, lex, "NUL byte in object key not supported");
goto error;
}
if(flags & JSON_REJECT_DUPLICATES) {
if(json_object_get(object, key)) {
@@ -788,7 +802,21 @@ static json_t *parse_value(lex_t *lex, size_t flags, json_error_t *error)
switch(lex->token) {
case TOKEN_STRING: {
json = json_string_nocheck(lex->value.string);
const char *value = lex->value.string.val;
size_t len = lex->value.string.len;
if(!(flags & JSON_ALLOW_NUL)) {
if(memchr(value, '\0', len)) {
error_set(error, lex, "\\u0000 is not allowed without JSON_ALLOW_NUL");
return NULL;
}
}
json = jsonp_stringn_nocheck_own(value, len);
if(json) {
lex->value.string.val = NULL;
lex->value.string.len = 0;
}
break;
}
+381
View File
@@ -0,0 +1,381 @@
/*
-------------------------------------------------------------------------------
lookup3.c, by Bob Jenkins, May 2006, Public Domain.
These are functions for producing 32-bit hashes for hash table lookup.
hashword(), hashlittle(), hashlittle2(), hashbig(), mix(), and final()
are externally useful functions. Routines to test the hash are included
if SELF_TEST is defined. You can use this free for any purpose. It's in
the public domain. It has no warranty.
You probably want to use hashlittle(). hashlittle() and hashbig()
hash byte arrays. hashlittle() is is faster than hashbig() on
little-endian machines. Intel and AMD are little-endian machines.
On second thought, you probably want hashlittle2(), which is identical to
hashlittle() except it returns two 32-bit hashes for the price of one.
You could implement hashbig2() if you wanted but I haven't bothered here.
If you want to find a hash of, say, exactly 7 integers, do
a = i1; b = i2; c = i3;
mix(a,b,c);
a += i4; b += i5; c += i6;
mix(a,b,c);
a += i7;
final(a,b,c);
then use c as the hash value. If you have a variable length array of
4-byte integers to hash, use hashword(). If you have a byte array (like
a character string), use hashlittle(). If you have several byte arrays, or
a mix of things, see the comments above hashlittle().
Why is this so big? I read 12 bytes at a time into 3 4-byte integers,
then mix those integers. This is fast (you can do a lot more thorough
mixing with 12*3 instructions on 3 integers than you can with 3 instructions
on 1 byte), but shoehorning those bytes into integers efficiently is messy.
-------------------------------------------------------------------------------
*/
#include <stdlib.h>
#ifdef HAVE_CONFIG_H
#include <jansson_private_config.h>
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h> /* defines uint32_t etc */
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h> /* attempt to define endianness */
#endif
#ifdef HAVE_ENDIAN_H
# include <endian.h> /* attempt to define endianness */
#endif
/*
* My best guess at if you are big-endian or little-endian. This may
* need adjustment.
*/
#if (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && \
__BYTE_ORDER == __LITTLE_ENDIAN) || \
(defined(i386) || defined(__i386__) || defined(__i486__) || \
defined(__i586__) || defined(__i686__) || defined(vax) || defined(MIPSEL))
# define HASH_LITTLE_ENDIAN 1
# define HASH_BIG_ENDIAN 0
#elif (defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && \
__BYTE_ORDER == __BIG_ENDIAN) || \
(defined(sparc) || defined(POWERPC) || defined(mc68000) || defined(sel))
# define HASH_LITTLE_ENDIAN 0
# define HASH_BIG_ENDIAN 1
#else
# define HASH_LITTLE_ENDIAN 0
# define HASH_BIG_ENDIAN 0
#endif
#define hashsize(n) ((uint32_t)1<<(n))
#define hashmask(n) (hashsize(n)-1)
#define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k))))
/*
-------------------------------------------------------------------------------
mix -- mix 3 32-bit values reversibly.
This is reversible, so any information in (a,b,c) before mix() is
still in (a,b,c) after mix().
If four pairs of (a,b,c) inputs are run through mix(), or through
mix() in reverse, there are at least 32 bits of the output that
are sometimes the same for one pair and different for another pair.
This was tested for:
* pairs that differed by one bit, by two bits, in any combination
of top bits of (a,b,c), or in any combination of bottom bits of
(a,b,c).
* "differ" is defined as +, -, ^, or ~^. For + and -, I transformed
the output delta to a Gray code (a^(a>>1)) so a string of 1's (as
is commonly produced by subtraction) look like a single 1-bit
difference.
* the base values were pseudorandom, all zero but one bit set, or
all zero plus a counter that starts at zero.
Some k values for my "a-=c; a^=rot(c,k); c+=b;" arrangement that
satisfy this are
4 6 8 16 19 4
9 15 3 18 27 15
14 9 3 7 17 3
Well, "9 15 3 18 27 15" didn't quite get 32 bits diffing
for "differ" defined as + with a one-bit base and a two-bit delta. I
used http://burtleburtle.net/bob/hash/avalanche.html to choose
the operations, constants, and arrangements of the variables.
This does not achieve avalanche. There are input bits of (a,b,c)
that fail to affect some output bits of (a,b,c), especially of a. The
most thoroughly mixed value is c, but it doesn't really even achieve
avalanche in c.
This allows some parallelism. Read-after-writes are good at doubling
the number of bits affected, so the goal of mixing pulls in the opposite
direction as the goal of parallelism. I did what I could. Rotates
seem to cost as much as shifts on every machine I could lay my hands
on, and rotates are much kinder to the top and bottom bits, so I used
rotates.
-------------------------------------------------------------------------------
*/
#define mix(a,b,c) \
{ \
a -= c; a ^= rot(c, 4); c += b; \
b -= a; b ^= rot(a, 6); a += c; \
c -= b; c ^= rot(b, 8); b += a; \
a -= c; a ^= rot(c,16); c += b; \
b -= a; b ^= rot(a,19); a += c; \
c -= b; c ^= rot(b, 4); b += a; \
}
/*
-------------------------------------------------------------------------------
final -- final mixing of 3 32-bit values (a,b,c) into c
Pairs of (a,b,c) values differing in only a few bits will usually
produce values of c that look totally different. This was tested for
* pairs that differed by one bit, by two bits, in any combination
of top bits of (a,b,c), or in any combination of bottom bits of
(a,b,c).
* "differ" is defined as +, -, ^, or ~^. For + and -, I transformed
the output delta to a Gray code (a^(a>>1)) so a string of 1's (as
is commonly produced by subtraction) look like a single 1-bit
difference.
* the base values were pseudorandom, all zero but one bit set, or
all zero plus a counter that starts at zero.
These constants passed:
14 11 25 16 4 14 24
12 14 25 16 4 14 24
and these came close:
4 8 15 26 3 22 24
10 8 15 26 3 22 24
11 8 15 26 3 22 24
-------------------------------------------------------------------------------
*/
#define final(a,b,c) \
{ \
c ^= b; c -= rot(b,14); \
a ^= c; a -= rot(c,11); \
b ^= a; b -= rot(a,25); \
c ^= b; c -= rot(b,16); \
a ^= c; a -= rot(c,4); \
b ^= a; b -= rot(a,14); \
c ^= b; c -= rot(b,24); \
}
/*
-------------------------------------------------------------------------------
hashlittle() -- hash a variable-length key into a 32-bit value
k : the key (the unaligned variable-length array of bytes)
length : the length of the key, counting by bytes
initval : can be any 4-byte value
Returns a 32-bit value. Every bit of the key affects every bit of
the return value. Two keys differing by one or two bits will have
totally different hash values.
The best hash table sizes are powers of 2. There is no need to do
mod a prime (mod is sooo slow!). If you need less than 32 bits,
use a bitmask. For example, if you need only 10 bits, do
h = (h & hashmask(10));
In which case, the hash table should have hashsize(10) elements.
If you are hashing n strings (uint8_t **)k, do it like this:
for (i=0, h=0; i<n; ++i) h = hashlittle( k[i], len[i], h);
By Bob Jenkins, 2006. bob_jenkins@burtleburtle.net. You may use this
code any way you wish, private, educational, or commercial. It's free.
Use for hash table lookup, or anything where one collision in 2^^32 is
acceptable. Do NOT use for cryptographic purposes.
-------------------------------------------------------------------------------
*/
static uint32_t hashlittle(const void *key, size_t length, uint32_t initval)
{
uint32_t a,b,c; /* internal state */
union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */
/* Set up the internal state */
a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
u.ptr = key;
if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {
const uint32_t *k = (const uint32_t *)key; /* read 32-bit chunks */
/* Detect Valgrind or AddressSanitizer */
#ifdef VALGRIND
# define NO_MASKING_TRICK 1
#else
# if defined(__has_feature) /* Clang */
# if __has_feature(address_sanitizer) /* is ASAN enabled? */
# define NO_MASKING_TRICK 1
# endif
# else
# if defined(__SANITIZE_ADDRESS__) /* GCC 4.8.x, is ASAN enabled? */
# define NO_MASKING_TRICK 1
# endif
# endif
#endif
#ifdef NO_MASKING_TRICK
const uint8_t *k8;
#endif
/*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
b += k[1];
c += k[2];
mix(a,b,c);
length -= 12;
k += 3;
}
/*----------------------------- handle the last (probably partial) block */
/*
* "k[2]&0xffffff" actually reads beyond the end of the string, but
* then masks off the part it's not allowed to read. Because the
* string is aligned, the masked-off tail is in the same word as the
* rest of the string. Every machine with memory protection I've seen
* does it on word boundaries, so is OK with this. But VALGRIND will
* still catch it and complain. The masking trick does make the hash
* noticably faster for short strings (like English words).
*/
#ifndef NO_MASKING_TRICK
switch(length)
{
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
case 8 : b+=k[1]; a+=k[0]; break;
case 7 : b+=k[1]&0xffffff; a+=k[0]; break;
case 6 : b+=k[1]&0xffff; a+=k[0]; break;
case 5 : b+=k[1]&0xff; a+=k[0]; break;
case 4 : a+=k[0]; break;
case 3 : a+=k[0]&0xffffff; break;
case 2 : a+=k[0]&0xffff; break;
case 1 : a+=k[0]&0xff; break;
case 0 : return c; /* zero length strings require no mixing */
}
#else /* make valgrind happy */
k8 = (const uint8_t *)k;
switch(length)
{
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
case 11: c+=((uint32_t)k8[10])<<16; /* fall through */
case 10: c+=((uint32_t)k8[9])<<8; /* fall through */
case 9 : c+=k8[8]; /* fall through */
case 8 : b+=k[1]; a+=k[0]; break;
case 7 : b+=((uint32_t)k8[6])<<16; /* fall through */
case 6 : b+=((uint32_t)k8[5])<<8; /* fall through */
case 5 : b+=k8[4]; /* fall through */
case 4 : a+=k[0]; break;
case 3 : a+=((uint32_t)k8[2])<<16; /* fall through */
case 2 : a+=((uint32_t)k8[1])<<8; /* fall through */
case 1 : a+=k8[0]; break;
case 0 : return c;
}
#endif /* !valgrind */
} else if (HASH_LITTLE_ENDIAN && ((u.i & 0x1) == 0)) {
const uint16_t *k = (const uint16_t *)key; /* read 16-bit chunks */
const uint8_t *k8;
/*--------------- all but last block: aligned reads and different mixing */
while (length > 12)
{
a += k[0] + (((uint32_t)k[1])<<16);
b += k[2] + (((uint32_t)k[3])<<16);
c += k[4] + (((uint32_t)k[5])<<16);
mix(a,b,c);
length -= 12;
k += 6;
}
/*----------------------------- handle the last (probably partial) block */
k8 = (const uint8_t *)k;
switch(length)
{
case 12: c+=k[4]+(((uint32_t)k[5])<<16);
b+=k[2]+(((uint32_t)k[3])<<16);
a+=k[0]+(((uint32_t)k[1])<<16);
break;
case 11: c+=((uint32_t)k8[10])<<16; /* fall through */
case 10: c+=k[4];
b+=k[2]+(((uint32_t)k[3])<<16);
a+=k[0]+(((uint32_t)k[1])<<16);
break;
case 9 : c+=k8[8]; /* fall through */
case 8 : b+=k[2]+(((uint32_t)k[3])<<16);
a+=k[0]+(((uint32_t)k[1])<<16);
break;
case 7 : b+=((uint32_t)k8[6])<<16; /* fall through */
case 6 : b+=k[2];
a+=k[0]+(((uint32_t)k[1])<<16);
break;
case 5 : b+=k8[4]; /* fall through */
case 4 : a+=k[0]+(((uint32_t)k[1])<<16);
break;
case 3 : a+=((uint32_t)k8[2])<<16; /* fall through */
case 2 : a+=k[0];
break;
case 1 : a+=k8[0];
break;
case 0 : return c; /* zero length requires no mixing */
}
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
length -= 12;
k += 12;
}
/*-------------------------------- last block: affect all 32 bits of (c) */
switch(length) /* all the case statements fall through */
{
case 12: c+=((uint32_t)k[11])<<24;
case 11: c+=((uint32_t)k[10])<<16;
case 10: c+=((uint32_t)k[9])<<8;
case 9 : c+=k[8];
case 8 : b+=((uint32_t)k[7])<<24;
case 7 : b+=((uint32_t)k[6])<<16;
case 6 : b+=((uint32_t)k[5])<<8;
case 5 : b+=k[4];
case 4 : a+=((uint32_t)k[3])<<24;
case 3 : a+=((uint32_t)k[2])<<16;
case 2 : a+=((uint32_t)k[1])<<8;
case 1 : a+=k[0];
break;
case 0 : return c;
}
}
final(a,b,c);
return c;
}
+12 -7
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2013 Petri Lehtinen <petri@digip.org>
* Copyright (c) 2009-2014 Petri Lehtinen <petri@digip.org>
* Copyright (c) 2011-2012 Basile Starynkevitch <basile@starynkevitch.net>
*
* Jansson is free software; you can redistribute it and/or modify it
@@ -12,6 +12,10 @@
#include "jansson.h"
#include "jansson_private.h"
/* C89 allows these to be macros */
#undef malloc
#undef free
/* memory function pointers */
static json_malloc_t do_malloc = malloc;
static json_free_t do_free = free;
@@ -34,18 +38,19 @@ void jsonp_free(void *ptr)
char *jsonp_strdup(const char *str)
{
char *new_str;
size_t len;
return jsonp_strndup(str, strlen(str));
}
len = strlen(str);
if(len == (size_t)-1)
return NULL;
char *jsonp_strndup(const char *str, size_t len)
{
char *new_str;
new_str = jsonp_malloc(len + 1);
if(!new_str)
return NULL;
memcpy(new_str, str, len + 1);
memcpy(new_str, str, len);
new_str[len] = '\0';
return new_str;
}
+72 -29
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2013 Petri Lehtinen <petri@digip.org>
* Copyright (c) 2009-2014 Petri Lehtinen <petri@digip.org>
* Copyright (c) 2011-2012 Graeme Smecher <graeme.smecher@mail.mcgill.ca>
*
* Jansson is free software; you can redistribute it and/or modify
@@ -125,19 +125,18 @@ static json_t *pack(scanner_t *s, va_list *ap);
/* ours will be set to 1 if jsonp_free() must be called for the result
afterwards */
static char *read_string(scanner_t *s, va_list *ap,
const char *purpose, int *ours)
const char *purpose, size_t *out_len, int *ours)
{
char t;
strbuffer_t strbuff;
const char *str;
size_t length;
char *result;
next_token(s);
t = token(s);
prev_token(s);
if(t != '#' && t != '+') {
if(t != '#' && t != '%' && t != '+') {
/* Optimize the simple case */
str = va_arg(*ap, const char *);
@@ -146,11 +145,14 @@ static char *read_string(scanner_t *s, va_list *ap,
return NULL;
}
if(!utf8_check_string(str, -1)) {
length = strlen(str);
if(!utf8_check_string(str, length)) {
set_error(s, "<args>", "Invalid UTF-8 %s", purpose);
return NULL;
}
*out_len = length;
*ours = 0;
return (char *)str;
}
@@ -170,6 +172,9 @@ static char *read_string(scanner_t *s, va_list *ap,
if(token(s) == '#') {
length = va_arg(*ap, int);
}
else if(token(s) == '%') {
length = va_arg(*ap, size_t);
}
else {
prev_token(s);
length = strlen(str);
@@ -188,15 +193,15 @@ static char *read_string(scanner_t *s, va_list *ap,
}
}
result = strbuffer_steal_value(&strbuff);
if(!utf8_check_string(result, -1)) {
if(!utf8_check_string(strbuff.value, strbuff.length)) {
set_error(s, "<args>", "Invalid UTF-8 %s", purpose);
strbuffer_close(&strbuff);
return NULL;
}
*out_len = strbuff.length;
*ours = 1;
return result;
return strbuffer_steal_value(&strbuff);
}
static json_t *pack_object(scanner_t *s, va_list *ap)
@@ -206,6 +211,7 @@ static json_t *pack_object(scanner_t *s, va_list *ap)
while(token(s) != '}') {
char *key;
size_t len;
int ours;
json_t *value;
@@ -219,15 +225,19 @@ static json_t *pack_object(scanner_t *s, va_list *ap)
goto error;
}
key = read_string(s, ap, "object key", &ours);
key = read_string(s, ap, "object key", &len, &ours);
if(!key)
goto error;
next_token(s);
value = pack(s, ap);
if(!value)
if(!value) {
if(ours)
jsonp_free(key);
goto error;
}
if(json_object_set_new_nocheck(object, key, value)) {
if(ours)
@@ -290,20 +300,20 @@ static json_t *pack(scanner_t *s, va_list *ap)
case '[':
return pack_array(s, ap);
case 's': { /* string */
case 's': /* string */
{
char *str;
size_t len;
int ours;
json_t *result;
str = read_string(s, ap, "string", &ours);
str = read_string(s, ap, "string", &len, &ours);
if(!str)
return NULL;
result = json_string_nocheck(str);
if(ours)
jsonp_free(str);
return result;
if (ours)
return jsonp_stringn_nocheck_own(str, len);
else
return json_stringn_nocheck(str, len);
}
case 'n': /* null */
@@ -340,6 +350,7 @@ static int unpack_object(scanner_t *s, json_t *root, va_list *ap)
{
int ret = -1;
int strict = 0;
int gotopt = 0;
/* Use a set (emulated by a hashtable) to check that all object
keys are accessed. Checking that the correct number of keys
@@ -396,7 +407,7 @@ static int unpack_object(scanner_t *s, json_t *root, va_list *ap)
next_token(s);
if(token(s) == '?') {
opt = 1;
opt = gotopt = 1;
next_token(s);
}
@@ -422,10 +433,26 @@ static int unpack_object(scanner_t *s, json_t *root, va_list *ap)
if(strict == 0 && (s->flags & JSON_STRICT))
strict = 1;
if(root && strict == 1 && key_set.size != json_object_size(root)) {
long diff = (long)json_object_size(root) - (long)key_set.size;
set_error(s, "<validation>", "%li object item(s) left unpacked", diff);
goto out;
if(root && strict == 1) {
/* We need to check that all non optional items have been parsed */
const char *key;
json_t *value;
long unpacked = 0;
if (gotopt) {
/* We have optional keys, we need to iter on each key */
json_object_foreach(root, key, value) {
if(!hashtable_get(&key_set, key)) {
unpacked++;
}
}
} else {
/* No optional keys, we can just compare the number of items */
unpacked = (long)json_object_size(root) - (long)key_set.size;
}
if (unpacked) {
set_error(s, "<validation>", "%li object item(s) left unpacked", unpacked);
goto out;
}
}
ret = 0;
@@ -523,16 +550,32 @@ static int unpack(scanner_t *s, json_t *root, va_list *ap)
}
if(!(s->flags & JSON_VALIDATE_ONLY)) {
const char **target;
const char **str_target;
size_t *len_target = NULL;
target = va_arg(*ap, const char **);
if(!target) {
str_target = va_arg(*ap, const char **);
if(!str_target) {
set_error(s, "<args>", "NULL string argument");
return -1;
}
if(root)
*target = json_string_value(root);
next_token(s);
if(token(s) == '%') {
len_target = va_arg(*ap, size_t *);
if(!len_target) {
set_error(s, "<args>", "NULL string length argument");
return -1;
}
}
else
prev_token(s);
if(root) {
*str_target = json_string_value(root);
if(len_target)
*len_target = json_string_length(root);
}
}
return 0;
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2013 Petri Lehtinen <petri@digip.org>
* Copyright (c) 2009-2014 Petri Lehtinen <petri@digip.org>
*
* Jansson is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2013 Petri Lehtinen <petri@digip.org>
* Copyright (c) 2009-2014 Petri Lehtinen <petri@digip.org>
*
* Jansson is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
+9 -5
View File
@@ -2,12 +2,13 @@
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "jansson_private.h"
#include "strbuffer.h"
/* need config.h to get the correct snprintf */
/* need jansson_private_config.h to get the correct snprintf */
#ifdef HAVE_CONFIG_H
#include <config.h>
#include <jansson_private_config.h>
#endif
#if JSON_HAVE_LOCALECONV
@@ -69,7 +70,7 @@ int jsonp_strtod(strbuffer_t *strbuffer, double *out)
value = strtod(strbuffer->value, &end);
assert(end == strbuffer->value + strbuffer->length);
if(errno == ERANGE && value != 0) {
if((value == HUGE_VAL || value == -HUGE_VAL) && errno == ERANGE) {
/* Overflow */
return -1;
}
@@ -78,13 +79,16 @@ int jsonp_strtod(strbuffer_t *strbuffer, double *out)
return 0;
}
int jsonp_dtostr(char *buffer, size_t size, double value)
int jsonp_dtostr(char *buffer, size_t size, double value, int precision)
{
int ret;
char *start, *end;
size_t length;
ret = snprintf(buffer, size, "%.17g", value);
if (precision == 0)
precision = 17;
ret = snprintf(buffer, size, "%.*g", precision, value);
if(ret < 0)
return -1;
+13 -16
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2013 Petri Lehtinen <petri@digip.org>
* Copyright (c) 2009-2014 Petri Lehtinen <petri@digip.org>
*
* Jansson is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
@@ -8,7 +8,7 @@
#include <string.h>
#include "utf.h"
int utf8_encode(int32_t codepoint, char *buffer, int *size)
int utf8_encode(int32_t codepoint, char *buffer, size_t *size)
{
if(codepoint < 0)
return -1;
@@ -44,7 +44,7 @@ int utf8_encode(int32_t codepoint, char *buffer, int *size)
return 0;
}
int utf8_check_first(char byte)
size_t utf8_check_first(char byte)
{
unsigned char u = (unsigned char)byte;
@@ -80,9 +80,9 @@ int utf8_check_first(char byte)
}
}
int utf8_check_full(const char *buffer, int size, int32_t *codepoint)
size_t utf8_check_full(const char *buffer, size_t size, int32_t *codepoint)
{
int i;
size_t i;
int32_t value = 0;
unsigned char u = (unsigned char)buffer[0];
@@ -136,12 +136,12 @@ int utf8_check_full(const char *buffer, int size, int32_t *codepoint)
return 1;
}
const char *utf8_iterate(const char *buffer, int32_t *codepoint)
const char *utf8_iterate(const char *buffer, size_t bufsize, int32_t *codepoint)
{
int count;
size_t count;
int32_t value;
if(!*buffer)
if(!bufsize)
return buffer;
count = utf8_check_first(buffer[0]);
@@ -152,7 +152,7 @@ const char *utf8_iterate(const char *buffer, int32_t *codepoint)
value = (unsigned char)buffer[0];
else
{
if(!utf8_check_full(buffer, count, &value))
if(count > bufsize || !utf8_check_full(buffer, count, &value))
return NULL;
}
@@ -162,21 +162,18 @@ const char *utf8_iterate(const char *buffer, int32_t *codepoint)
return buffer + count;
}
int utf8_check_string(const char *string, int length)
int utf8_check_string(const char *string, size_t length)
{
int i;
if(length == -1)
length = strlen(string);
size_t i;
for(i = 0; i < length; i++)
{
int count = utf8_check_first(string[i]);
size_t count = utf8_check_first(string[i]);
if(count == 0)
return 0;
else if(count > 1)
{
if(i + count > length)
if(count > length - i)
return 0;
if(!utf8_check_full(&string[i], count, NULL))
+11 -23
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2013 Petri Lehtinen <petri@digip.org>
* Copyright (c) 2009-2014 Petri Lehtinen <petri@digip.org>
*
* Jansson is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
@@ -9,31 +9,19 @@
#define UTF_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#include <jansson_private_config.h>
#endif
#ifdef HAVE_INTTYPES_H
/* inttypes.h includes stdint.h in a standard environment, so there's
no need to include stdint.h separately. If inttypes.h doesn't define
int32_t, it's defined in config.h. */
#include <inttypes.h>
#endif /* HAVE_INTTYPES_H */
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#else /* !HAVE_CONFIG_H */
#ifdef _WIN32
typedef int int32_t;
#else /* !_WIN32 */
/* Assume a standard environment */
#include <inttypes.h>
#endif /* _WIN32 */
int utf8_encode(int32_t codepoint, char *buffer, size_t *size);
#endif /* HAVE_CONFIG_H */
size_t utf8_check_first(char byte);
size_t utf8_check_full(const char *buffer, size_t size, int32_t *codepoint);
const char *utf8_iterate(const char *buffer, size_t size, int32_t *codepoint);
int utf8_encode(int codepoint, char *buffer, int *size);
int utf8_check_first(char byte);
int utf8_check_full(const char *buffer, int size, int32_t *codepoint);
const char *utf8_iterate(const char *buffer, int32_t *codepoint);
int utf8_check_string(const char *string, int length);
int utf8_check_string(const char *string, size_t length);
#endif
+111 -20
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2013 Petri Lehtinen <petri@digip.org>
* Copyright (c) 2009-2014 Petri Lehtinen <petri@digip.org>
*
* Jansson is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
@@ -9,11 +9,19 @@
#define _GNU_SOURCE
#endif
#ifdef HAVE_CONFIG_H
#include <jansson_private_config.h>
#endif
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#include "jansson.h"
#include "hashtable.h"
#include "jansson_private.h"
@@ -21,8 +29,10 @@
/* Work around nonstandard isnan() and isinf() implementations */
#ifndef isnan
#ifndef __sun
static JSON_INLINE int isnan(double x) { return x != x; }
#endif
#endif
#ifndef isinf
static JSON_INLINE int isinf(double x) { return !isnan(x) && isnan(x - x); }
#endif
@@ -36,11 +46,19 @@ static JSON_INLINE void json_init(json_t *json, json_type type)
/*** object ***/
extern volatile uint32_t hashtable_seed;
json_t *json_object(void)
{
json_object_t *object = jsonp_malloc(sizeof(json_object_t));
if(!object)
return NULL;
if (!hashtable_seed) {
/* Autoseed */
json_object_seed(0);
}
json_init(&object->json, JSON_OBJECT);
if(hashtable_init(&object->hashtable))
@@ -76,7 +94,7 @@ json_t *json_object_get(const json_t *json, const char *key)
{
json_object_t *object;
if(!json_is_object(json))
if(!key || !json_is_object(json))
return NULL;
object = json_to_object(json);
@@ -108,7 +126,7 @@ int json_object_set_new_nocheck(json_t *json, const char *key, json_t *value)
int json_object_set_new(json_t *json, const char *key, json_t *value)
{
if(!key || !utf8_check_string(key, -1))
if(!key || !utf8_check_string(key, strlen(key)))
{
json_decref(value);
return -1;
@@ -121,7 +139,7 @@ int json_object_del(json_t *json, const char *key)
{
json_object_t *object;
if(!json_is_object(json))
if(!key || !json_is_object(json))
return -1;
object = json_to_object(json);
@@ -620,33 +638,68 @@ static json_t *json_array_deep_copy(const json_t *array)
/*** string ***/
json_t *json_string_nocheck(const char *value)
static json_t *string_create(const char *value, size_t len, int own)
{
char *v;
json_string_t *string;
if(!value)
return NULL;
string = jsonp_malloc(sizeof(json_string_t));
if(!string)
return NULL;
json_init(&string->json, JSON_STRING);
if(own)
v = (char *)value;
else {
v = jsonp_strndup(value, len);
if(!v)
return NULL;
}
string->value = jsonp_strdup(value);
if(!string->value) {
jsonp_free(string);
string = jsonp_malloc(sizeof(json_string_t));
if(!string) {
if(!own)
jsonp_free(v);
return NULL;
}
json_init(&string->json, JSON_STRING);
string->value = v;
string->length = len;
return &string->json;
}
json_t *json_string(const char *value)
json_t *json_string_nocheck(const char *value)
{
if(!value || !utf8_check_string(value, -1))
if(!value)
return NULL;
return json_string_nocheck(value);
return string_create(value, strlen(value), 0);
}
json_t *json_stringn_nocheck(const char *value, size_t len)
{
return string_create(value, len, 0);
}
/* this is private; "steal" is not a public API concept */
json_t *jsonp_stringn_nocheck_own(const char *value, size_t len)
{
return string_create(value, len, 1);
}
json_t *json_string(const char *value)
{
if(!value)
return NULL;
return json_stringn(value, strlen(value));
}
json_t *json_stringn(const char *value, size_t len)
{
if(!value || !utf8_check_string(value, len))
return NULL;
return json_stringn_nocheck(value, len);
}
const char *json_string_value(const json_t *json)
@@ -657,7 +710,23 @@ const char *json_string_value(const json_t *json)
return json_to_string(json)->value;
}
size_t json_string_length(const json_t *json)
{
if(!json_is_string(json))
return 0;
return json_to_string(json)->length;
}
int json_string_set_nocheck(json_t *json, const char *value)
{
if(!value)
return -1;
return json_string_setn_nocheck(json, value, strlen(value));
}
int json_string_setn_nocheck(json_t *json, const char *value, size_t len)
{
char *dup;
json_string_t *string;
@@ -665,23 +734,32 @@ int json_string_set_nocheck(json_t *json, const char *value)
if(!json_is_string(json) || !value)
return -1;
dup = jsonp_strdup(value);
dup = jsonp_strndup(value, len);
if(!dup)
return -1;
string = json_to_string(json);
jsonp_free(string->value);
string->value = dup;
string->length = len;
return 0;
}
int json_string_set(json_t *json, const char *value)
{
if(!value || !utf8_check_string(value, -1))
if(!value)
return -1;
return json_string_set_nocheck(json, value);
return json_string_setn(json, value, strlen(value));
}
int json_string_setn(json_t *json, const char *value, size_t len)
{
if(!value || !utf8_check_string(value, len))
return -1;
return json_string_setn_nocheck(json, value, len);
}
static void json_delete_string(json_string_t *string)
@@ -692,12 +770,25 @@ static void json_delete_string(json_string_t *string)
static int json_string_equal(json_t *string1, json_t *string2)
{
return strcmp(json_string_value(string1), json_string_value(string2)) == 0;
json_string_t *s1, *s2;
if(!json_is_string(string1) || !json_is_string(string2))
return 0;
s1 = json_to_string(string1);
s2 = json_to_string(string2);
return s1->length == s2->length && !memcmp(s1->value, s2->value, s1->length);
}
static json_t *json_string_copy(const json_t *string)
{
return json_string_nocheck(json_string_value(string));
json_string_t *s;
if(!json_is_string(string))
return NULL;
s = json_to_string(string);
return json_stringn_nocheck(s->value, s->length);
}
+2 -2
View File
@@ -83,7 +83,7 @@
Name="VCLinkerTool"
AdditionalOptions="/FORCE:MULTIPLE"
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib"
OutputFile="$(OutDir)\fred2_open_3_7_1-DEBUG.exe"
OutputFile="$(OutDir)\fred2_open_3_7_3-DEBUG.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;$(ConfigurationName)&quot;;../../oggvorbis/lib;../../openal/libs/win32;../../openal/libs/win64;"
@@ -197,7 +197,7 @@
Name="VCLinkerTool"
AdditionalOptions="/FORCE:MULTIPLE"
AdditionalDependencies="wsock32.lib winmm.lib msacm32.lib vfw32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib"
OutputFile="$(OutDir)\fred2_open_3_7_1.exe"
OutputFile="$(OutDir)\fred2_open_3_7_3.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;$(ConfigurationName)&quot;;../../oggvorbis/lib;../../openal/libs/win32;../../openal/libs/win64;"
+2 -2
View File
@@ -84,7 +84,7 @@
LinkLibraryDependencies="true"
UseLibraryDependencyInputs="false"
AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib"
OutputFile="$(OutDir)\fs2_open_3_7_1-DEBUG.exe"
OutputFile="$(OutDir)\fs2_open_3_7_3-DEBUG.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;$(ConfigurationName)&quot;;../../oggvorbis/lib;../../openal/libs/win32;../../openal/libs/win64;"
@@ -199,7 +199,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib"
OutputFile="$(OutDir)\fs2_open_3_7_1.exe"
OutputFile="$(OutDir)\fs2_open_3_7_3.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;$(ConfigurationName)&quot;;../../oggvorbis/lib;../../openal/libs/win32;../../openal/libs/win64;"
+10 -10
View File
@@ -29,8 +29,8 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying build..."
CommandLine="copy &quot;$(TargetPath)&quot; &quot;$(FS2PATH)/wxfred2_open_3_7_1-debug.exe&quot;&#x0D;&#x0A;copy &quot;$(ProjectDir)..\..\code\wxfred2\wxfred.xrc&quot; &quot;$(FS2PATH)\wxfred.xrc&quot;&#x0D;&#x0A;"
Outputs="$(FS2PATH)/wxfred2_open_3_7_1-debug.exe;$(FS2PATH)\wxfred.xrc"
CommandLine="copy &quot;$(TargetPath)&quot; &quot;$(FS2PATH)/wxfred2_open_3_7_3-debug.exe&quot;&#x0D;&#x0A;copy &quot;$(ProjectDir)..\..\code\wxfred2\wxfred.xrc&quot; &quot;$(FS2PATH)\wxfred.xrc&quot;&#x0D;&#x0A;"
Outputs="$(FS2PATH)/wxfred2_open_3_7_3-debug.exe;$(FS2PATH)\wxfred.xrc"
/>
<Tool
Name="VCXMLDataGeneratorTool"
@@ -80,15 +80,15 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw28d_xrc.lib wxmsw28d_html.lib wxmsw28d_adv.lib wxmsw28d_core.lib wxbase28d_xml.lib wxbase28d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib"
OutputFile="Debug/wxfred2_open_3_7_1-debug.exe"
OutputFile="Debug/wxfred2_open_3_7_3-debug.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="$(WXWIN)/lib,$(WXWIN)/lib/vc_lib"
IgnoreDefaultLibraryNames="libcd.lib,libcid.lib"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/wxfred2_open_3_7_1-debug.pdb"
ProgramDatabaseFile=".\Debug/wxfred2_open_3_7_3-debug.pdb"
GenerateMapFile="true"
MapFileName=".\Debug\Profile\wxfred2/wxfred2_open_3_7_1-debug.map"
MapFileName=".\Debug\Profile\wxfred2/wxfred2_open_3_7_3-debug.map"
SubSystem="2"
TargetMachine="1"
/>
@@ -134,8 +134,8 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying build..."
CommandLine="copy &quot;$(TargetPath)&quot; &quot;$(FS2PATH)\wxfred2_open_3_7_1.exe&quot;&#x0D;&#x0A;copy &quot;$(ProjectDir)..\..\code\wxfred2\wxfred.xrc&quot; &quot;$(FS2PATH)\wxfred.xrc&quot;&#x0D;&#x0A;"
Outputs="$(FS2PATH)\wxfred2_open_3_7_1.exe;$(FS2PATH)\wxfred.xrc"
CommandLine="copy &quot;$(TargetPath)&quot; &quot;$(FS2PATH)\wxfred2_open_3_7_3.exe&quot;&#x0D;&#x0A;copy &quot;$(ProjectDir)..\..\code\wxfred2\wxfred.xrc&quot; &quot;$(FS2PATH)\wxfred.xrc&quot;&#x0D;&#x0A;"
Outputs="$(FS2PATH)\wxfred2_open_3_7_3.exe;$(FS2PATH)\wxfred.xrc"
/>
<Tool
Name="VCXMLDataGeneratorTool"
@@ -185,15 +185,15 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw28_xrc.lib wxmsw28_html.lib wxmsw28_adv.lib wxmsw28_core.lib wxbase28_xml.lib wxbase28.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib"
OutputFile="Release/wxfred2_open_3_7_1.exe"
OutputFile="Release/wxfred2_open_3_7_3.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="$(WXWIN)/lib,$(WXWIN)/lib/vc_lib"
IgnoreDefaultLibraryNames="libc.lib,libci.lib"
GenerateDebugInformation="false"
ProgramDatabaseFile=".\Release/wxfred2_open_3_7_1.pdb"
ProgramDatabaseFile=".\Release/wxfred2_open_3_7_3.pdb"
GenerateMapFile="false"
MapFileName=".\Release\Profile\wxfred2/wxfred2_open_3_7_1.map"
MapFileName=".\Release\Profile\wxfred2/wxfred2_open_3_7_3.map"
SubSystem="2"
TargetMachine="1"
/>
+6 -6
View File
@@ -84,7 +84,7 @@
Name="VCLinkerTool"
AdditionalOptions="/FORCE:MULTIPLE"
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib"
OutputFile="$(OutDir)\fred2_open_3_7_1_NO-SSE-DEBUG.exe"
OutputFile="$(OutDir)\fred2_open_3_7_3_NO-SSE-DEBUG.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;$(ConfigurationName)&quot;;../../oggvorbis/lib;../../openal/libs/win32;../../openal/libs/win64;"
@@ -193,7 +193,7 @@
Name="VCLinkerTool"
AdditionalOptions="/FORCE:MULTIPLE"
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib"
OutputFile="$(OutDir)\fred2_open_3_7_1_SSE-DEBUG.exe"
OutputFile="$(OutDir)\fred2_open_3_7_3_SSE-DEBUG.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;$(ConfigurationName)&quot;;../../oggvorbis/lib;../../openal/libs/win32;../../openal/libs/win64;"
@@ -302,7 +302,7 @@
Name="VCLinkerTool"
AdditionalOptions="/FORCE:MULTIPLE"
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib"
OutputFile="$(OutDir)\fred2_open_3_7_1-DEBUG.exe"
OutputFile="$(OutDir)\fred2_open_3_7_3-DEBUG.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;$(ConfigurationName)&quot;;../../oggvorbis/lib;../../openal/libs/win32;../../openal/libs/win64;"
@@ -416,7 +416,7 @@
Name="VCLinkerTool"
AdditionalOptions="/FORCE:MULTIPLE"
AdditionalDependencies="wsock32.lib winmm.lib msacm32.lib vfw32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib"
OutputFile="$(OutDir)\fred2_open_3_7_1_NO-SSE.exe"
OutputFile="$(OutDir)\fred2_open_3_7_3_NO-SSE.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;$(ConfigurationName)&quot;;../../oggvorbis/lib;../../openal/libs/win32;../../openal/libs/win64;"
@@ -531,7 +531,7 @@
Name="VCLinkerTool"
AdditionalOptions="/FORCE:MULTIPLE"
AdditionalDependencies="wsock32.lib winmm.lib msacm32.lib vfw32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib"
OutputFile="$(OutDir)\fred2_open_3_7_1_SSE.exe"
OutputFile="$(OutDir)\fred2_open_3_7_3_SSE.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;$(ConfigurationName)&quot;;../../oggvorbis/lib;../../openal/libs/win32;../../openal/libs/win64;"
@@ -646,7 +646,7 @@
Name="VCLinkerTool"
AdditionalOptions="/FORCE:MULTIPLE"
AdditionalDependencies="wsock32.lib winmm.lib msacm32.lib vfw32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib"
OutputFile="$(OutDir)\fred2_open_3_7_1.exe"
OutputFile="$(OutDir)\fred2_open_3_7_3.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;$(ConfigurationName)&quot;;../../oggvorbis/lib;../../openal/libs/win32;../../openal/libs/win64;"
+6 -6
View File
@@ -87,7 +87,7 @@
UseLibraryDependencyInputs="false"
AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib ole32.lib advapi32.lib gdi32.lib user32.lib"
ShowProgress="0"
OutputFile="$(OutDir)\fs2_open_3_7_1_NO-SSE-DEBUG.exe"
OutputFile="$(OutDir)\fs2_open_3_7_3_NO-SSE-DEBUG.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;$(ConfigurationName)&quot;;../../oggvorbis/lib;../../openal/libs/win32;../../openal/libs/win64;"
@@ -200,7 +200,7 @@
UseLibraryDependencyInputs="false"
AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib ole32.lib advapi32.lib gdi32.lib user32.lib"
ShowProgress="0"
OutputFile="$(OutDir)\fs2_open_3_7_1_SSE-DEBUG.exe"
OutputFile="$(OutDir)\fs2_open_3_7_3_SSE-DEBUG.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;$(ConfigurationName)&quot;;../../oggvorbis/lib;../../openal/libs/win32;../../openal/libs/win64;"
@@ -313,7 +313,7 @@
UseLibraryDependencyInputs="false"
AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib ole32.lib advapi32.lib gdi32.lib user32.lib"
ShowProgress="0"
OutputFile="$(OutDir)\fs2_open_3_7_1-DEBUG.exe"
OutputFile="$(OutDir)\fs2_open_3_7_3-DEBUG.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;$(ConfigurationName)&quot;;../../oggvorbis/lib;../../openal/libs/win32;../../openal/libs/win64;"
@@ -428,7 +428,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib"
OutputFile="$(OutDir)\fs2_open_3_7_1_NO-SSE.exe"
OutputFile="$(OutDir)\fs2_open_3_7_3_NO-SSE.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;$(ConfigurationName)&quot;;../../oggvorbis/lib;../../openal/libs/win32;../../openal/libs/win64;"
@@ -546,7 +546,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib"
OutputFile="$(OutDir)\fs2_open_3_7_1_SSE.exe"
OutputFile="$(OutDir)\fs2_open_3_7_3_SSE.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;$(ConfigurationName)&quot;;../../oggvorbis/lib;../../openal/libs/win32;../../openal/libs/win64;"
@@ -664,7 +664,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib"
OutputFile="$(OutDir)\fs2_open_3_7_1.exe"
OutputFile="$(OutDir)\fs2_open_3_7_3.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="&quot;$(ConfigurationName)&quot;;../../oggvorbis/lib;../../openal/libs/win32;../../openal/libs/win64;"
+6 -6
View File
@@ -125,12 +125,12 @@
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">fred2_open_3_7_1-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE|Win32'">fred2_open_3_7_1_SSE-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE2|Win32'">fred2_open_3_7_1_SSE2-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">fred2_open_3_7_1</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE|Win32'">fred2_open_3_7_1_SSE</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE2|Win32'">fred2_open_3_7_1_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">fred2_open_3_7_3-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE|Win32'">fred2_open_3_7_3_SSE-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE2|Win32'">fred2_open_3_7_3_SSE2-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">fred2_open_3_7_3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE|Win32'">fred2_open_3_7_3_SSE</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE2|Win32'">fred2_open_3_7_3_SSE2</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<CustomBuildStep>
+6 -6
View File
@@ -124,12 +124,12 @@
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">fs2_open_3_7_1-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE|Win32'">fs2_open_3_7_1_SSE-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE2|Win32'">fs2_open_3_7_1_SSE2-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">fs2_open_3_7_1</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE|Win32'">fs2_open_3_7_1_SSE</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE2|Win32'">fs2_open_3_7_1_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">fs2_open_3_7_3-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE|Win32'">fs2_open_3_7_3_SSE-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE2|Win32'">fs2_open_3_7_3_SSE2-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">fs2_open_3_7_3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE|Win32'">fs2_open_3_7_3_SSE</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE2|Win32'">fs2_open_3_7_3_SSE2</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<CustomBuildStep>
+3 -3
View File
@@ -100,7 +100,7 @@
<AdditionalDependencies>comctl32.lib;rpcrt4.lib;winmm.lib;advapi32.lib;wsock32.lib;wxmsw29ud_core.lib;wxbase29ud.lib</AdditionalDependencies>
</Link>
<CustomBuildStep>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\wxfred2_open_3_7_1-debug.exe" </Command>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\wxfred2_open_3_7_3-debug.exe" </Command>
<Message>Copying build...</Message>
<Outputs>$(FS2PATH)\wxfred2_open$(FS_VERSION_FULL)-debug.exe;$(FS2PATH)\wxfred.xrc;%(Outputs)</Outputs>
</CustomBuildStep>
@@ -159,9 +159,9 @@
<AdditionalDependencies>comctl32.lib;rpcrt4.lib;winmm.lib;advapi32.lib;wsock32.lib;wxmsw29u_core.lib;wxbase29u.lib</AdditionalDependencies>
</Link>
<CustomBuildStep>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)/wxfred2_open_3_7_1.exe"</Command>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)/wxfred2_open_3_7_3.exe"</Command>
<Message>Copying build...</Message>
<Outputs>$(FS2PATH)\wxfred2_open_3_7_1.exe;%(Outputs)</Outputs>
<Outputs>$(FS2PATH)\wxfred2_open_3_7_3.exe;%(Outputs)</Outputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemGroup>
+8 -8
View File
@@ -171,14 +171,14 @@
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">fred2_open_3_7_1-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE|Win32'">fred2_open_3_7_1_SSE-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE2|Win32'">fred2_open_3_7_1_SSE2-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug AVX|Win32'">fred2_open_3_7_1_AVX-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">fred2_open_3_7_1</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE|Win32'">fred2_open_3_7_1_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE2|Win32'">fred2_open_3_7_1_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release AVX|Win32'">fred2_open_3_7_1_AVX</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">fred2_open_3_7_3-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE|Win32'">fred2_open_3_7_3_SSE-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE2|Win32'">fred2_open_3_7_3_SSE2-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug AVX|Win32'">fred2_open_3_7_3_AVX-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">fred2_open_3_7_3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE|Win32'">fred2_open_3_7_3_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE2|Win32'">fred2_open_3_7_3_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release AVX|Win32'">fred2_open_3_7_3_AVX</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<CustomBuildStep>
+8 -8
View File
@@ -170,14 +170,14 @@
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">fs2_open_3_7_1-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE|Win32'">fs2_open_3_7_1_SSE-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE2|Win32'">fs2_open_3_7_1_SSE2-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug AVX|Win32'">fs2_open_3_7_1_AVX-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">fs2_open_3_7_1</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE|Win32'">fs2_open_3_7_1_SSE</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE2|Win32'">fs2_open_3_7_1_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release AVX|Win32'">fs2_open_3_7_1_AVX</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">fs2_open_3_7_3-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE|Win32'">fs2_open_3_7_3_SSE-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE2|Win32'">fs2_open_3_7_3_SSE2-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug AVX|Win32'">fs2_open_3_7_3_AVX-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">fs2_open_3_7_3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE|Win32'">fs2_open_3_7_3_SSE</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE2|Win32'">fs2_open_3_7_3_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release AVX|Win32'">fs2_open_3_7_3_AVX</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<CustomBuildStep>
+4 -4
View File
@@ -95,10 +95,10 @@
<AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;winmm.lib;wxmsw28d_xrc.lib;wxmsw28d_html.lib;wxmsw28d_adv.lib;wxmsw28d_core.lib;wxbase28d_xml.lib;wxbase28d.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexd.lib;wxexpatd.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<CustomBuildStep>
<Command>copy %(FullPath) "$(FS2PATH)/wxfred2_open_3_7_1-debug.exe"
<Command>copy %(FullPath) "$(FS2PATH)/wxfred2_open_3_7_3-debug.exe"
copy "$(ProjectDir)..\..\code\wxfred2\wxfred.xrc" "$(FS2PATH)\wxfred.xrc"</Command>
<Message>Copying build...</Message>
<Outputs>$(FS2PATH)/wxfred2_open_3_7_1-debug.exe;$(FS2PATH)\wxfred.xrc;%(Outputs)</Outputs>
<Outputs>$(FS2PATH)/wxfred2_open_3_7_3-debug.exe;$(FS2PATH)\wxfred.xrc;%(Outputs)</Outputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -146,10 +146,10 @@ copy "$(ProjectDir)..\..\code\wxfred2\wxfred.xrc" "$(FS2PATH)\wxfred.xrc"</Comma
<AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;winmm.lib;wxmsw28_xrc.lib;wxmsw28_html.lib;wxmsw28_adv.lib;wxmsw28_core.lib;wxbase28_xml.lib;wxbase28.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregex.lib;wxexpat.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<CustomBuildStep>
<Command>copy %(FullPath) "$(FS2PATH)\wxfred2_open_3_7_1.exe"
<Command>copy %(FullPath) "$(FS2PATH)\wxfred2_open_3_7_3.exe"
copy "$(ProjectDir)..\..\code\wxfred2\wxfred.xrc" "$(FS2PATH)\wxfred.xrc"</Command>
<Message>Copying build...</Message>
<Outputs>$(FS2PATH)\wxfred2_open_3_7_1.exe;$(FS2PATH)\wxfred.xrc;%(Outputs)</Outputs>
<Outputs>$(FS2PATH)\wxfred2_open_3_7_3.exe;$(FS2PATH)\wxfred.xrc;%(Outputs)</Outputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemGroup>
+50 -82
View File
@@ -170,22 +170,17 @@
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">fred2_open_3_7_1-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE|Win32'">fred2_open_3_7_1_SSE-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE2|Win32'">fred2_open_3_7_1_SSE2-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug AVX|Win32'">fred2_open_3_7_1_AVX-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">fred2_open_3_7_1</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE|Win32'">fred2_open_3_7_1_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE2|Win32'">fred2_open_3_7_1_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release AVX|Win32'">fred2_open_3_7_1_AVX</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">fred2_open_3_7_3-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE|Win32'">fred2_open_3_7_3_SSE-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE2|Win32'">fred2_open_3_7_3_SSE2-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug AVX|Win32'">fred2_open_3_7_3_AVX-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">fred2_open_3_7_3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE|Win32'">fred2_open_3_7_3_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE2|Win32'">fred2_open_3_7_3_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release AVX|Win32'">fred2_open_3_7_3_AVX</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<CustomBuildStep>
<Message>Copying build...</Message>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
</Command>
<Outputs>$(FS2PATH)\$(TargetFileName);%(Outputs)</Outputs>
</CustomBuildStep>
<CustomBuildStep />
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
@@ -199,7 +194,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;FRED;WINVER=0x501;_WIN32_WINNT=0x501;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -214,6 +208,7 @@
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;_VC08;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -228,7 +223,6 @@
<IgnoreSpecificDefaultLibraries>libc.lib;libcd.lib;libcmt.lib;libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -243,17 +237,13 @@
<OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"</Command>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
copy /y "$(OutputPath)$(TargetName).pdb" "$(FS2PATH)\$(TargetName).pdb"</Command>
<Message>Copying FRED build...</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug SSE|Win32'">
<CustomBuildStep>
<Message>Copying build...</Message>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
</Command>
<Outputs>$(FS2PATH)\$(TargetFileName);%(Outputs)</Outputs>
</CustomBuildStep>
<CustomBuildStep />
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
@@ -267,7 +257,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;FRED;WINVER=0x501;_WIN32_WINNT=0x501;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -284,6 +273,7 @@
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;_VC08;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -298,7 +288,6 @@
<IgnoreSpecificDefaultLibraries>libc.lib;libcd.lib;libcmt.lib;libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -313,17 +302,13 @@
<OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"</Command>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
copy /y "$(OutputPath)$(TargetName).pdb" "$(FS2PATH)\$(TargetName).pdb"</Command>
<Message>Copying FRED build...</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug SSE2|Win32'">
<CustomBuildStep>
<Message>Copying build...</Message>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
</Command>
<Outputs>$(FS2PATH)\$(TargetFileName);%(Outputs)</Outputs>
</CustomBuildStep>
<CustomBuildStep />
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
@@ -337,7 +322,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;FRED;WINVER=0x501;_WIN32_WINNT=0x501;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -354,6 +338,7 @@
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;_VC08;_SSE2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -368,7 +353,6 @@
<IgnoreSpecificDefaultLibraries>libc.lib;libcd.lib;libcmt.lib;libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -383,17 +367,13 @@
<OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"</Command>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
copy /y "$(OutputPath)$(TargetName).pdb" "$(FS2PATH)\$(TargetName).pdb"</Command>
<Message>Copying FRED build...</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug AVX|Win32'">
<CustomBuildStep>
<Message>Copying build...</Message>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
</Command>
<Outputs>$(FS2PATH)\$(TargetFileName);%(Outputs)</Outputs>
</CustomBuildStep>
<CustomBuildStep />
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
@@ -407,7 +387,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;FRED;WINVER=0x501;_WIN32_WINNT=0x501;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -424,6 +403,7 @@
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;_VC08;_SSE2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -438,7 +418,6 @@
<IgnoreSpecificDefaultLibraries>libc.lib;libcd.lib;libcmt.lib;libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -453,17 +432,13 @@
<OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"</Command>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
copy /y "$(OutputPath)$(TargetName).pdb" "$(FS2PATH)\$(TargetName).pdb"</Command>
<Message>Copying FRED build...</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<CustomBuildStep>
<Message>Copying build...</Message>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
</Command>
<Outputs>$(FS2PATH)\$(TargetFileName);%(Outputs)</Outputs>
</CustomBuildStep>
<CustomBuildStep />
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
@@ -487,7 +462,7 @@
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>false</FunctionLevelLinking>
<FloatingPointModel>Fast</FloatingPointModel>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
@@ -497,7 +472,8 @@
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;_VC08;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -511,7 +487,6 @@
<EnableUAC>false</EnableUAC>
<IgnoreSpecificDefaultLibraries>libc.lib;libcd.lib;libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -520,23 +495,20 @@
<TargetMachine>MachineX86</TargetMachine>
<AdditionalOptions>/FORCE:MULTIPLE %(AdditionalOptions)</AdditionalOptions>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"</Command>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
copy /y "$(OutputPath)$(TargetName).pdb" "$(FS2PATH)\$(TargetName).pdb"</Command>
<Message>Copying FRED build...</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release SSE|Win32'">
<CustomBuildStep>
<Message>Copying build...</Message>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
</Command>
<Outputs>$(FS2PATH)\$(TargetFileName);%(Outputs)</Outputs>
</CustomBuildStep>
<CustomBuildStep />
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
@@ -571,7 +543,8 @@
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;_VC08;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -585,7 +558,6 @@
<EnableUAC>false</EnableUAC>
<IgnoreSpecificDefaultLibraries>libc.lib;libcd.lib;libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -594,23 +566,20 @@
<TargetMachine>MachineX86</TargetMachine>
<AdditionalOptions>/FORCE:MULTIPLE %(AdditionalOptions)</AdditionalOptions>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"</Command>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
copy /y "$(OutputPath)$(TargetName).pdb" "$(FS2PATH)\$(TargetName).pdb"</Command>
<Message>Copying FRED build...</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release SSE2|Win32'">
<CustomBuildStep>
<Message>Copying build...</Message>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
</Command>
<Outputs>$(FS2PATH)\$(TargetFileName);%(Outputs)</Outputs>
</CustomBuildStep>
<CustomBuildStep />
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
@@ -645,7 +614,8 @@
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;_VC08;_SSE2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -659,7 +629,6 @@
<EnableUAC>false</EnableUAC>
<IgnoreSpecificDefaultLibraries>libc.lib;libcd.lib;libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -668,23 +637,20 @@
<TargetMachine>MachineX86</TargetMachine>
<AdditionalOptions>/FORCE:MULTIPLE %(AdditionalOptions)</AdditionalOptions>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"</Command>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
copy /y "$(OutputPath)$(TargetName).pdb" "$(FS2PATH)\$(TargetName).pdb"</Command>
<Message>Copying FRED build...</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release AVX|Win32'">
<CustomBuildStep>
<Message>Copying build...</Message>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
</Command>
<Outputs>$(FS2PATH)\$(TargetFileName);%(Outputs)</Outputs>
</CustomBuildStep>
<CustomBuildStep />
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
@@ -708,7 +674,7 @@
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>false</FunctionLevelLinking>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
@@ -719,7 +685,8 @@
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;_VC08;_SSE2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -733,7 +700,6 @@
<EnableUAC>false</EnableUAC>
<IgnoreSpecificDefaultLibraries>libc.lib;libcd.lib;libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -742,13 +708,15 @@
<TargetMachine>MachineX86</TargetMachine>
<AdditionalOptions>/FORCE:MULTIPLE %(AdditionalOptions)</AdditionalOptions>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"</Command>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
copy /y "$(OutputPath)$(TargetName).pdb" "$(FS2PATH)\$(TargetName).pdb"</Command>
<Message>Copying FRED build...</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
+138 -176
View File
@@ -169,22 +169,17 @@
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">fs2_open_3_7_1-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE|Win32'">fs2_open_3_7_1_SSE-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE2|Win32'">fs2_open_3_7_1_SSE2-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug AVX|Win32'">fs2_open_3_7_1_AVX-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">fs2_open_3_7_1</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE|Win32'">fs2_open_3_7_1_SSE</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE2|Win32'">fs2_open_3_7_1_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release AVX|Win32'">fs2_open_3_7_1_AVX</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">fs2_open_3_7_3-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE|Win32'">fs2_open_3_7_3_SSE-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE2|Win32'">fs2_open_3_7_3_SSE2-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug AVX|Win32'">fs2_open_3_7_3_AVX-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">fs2_open_3_7_3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE|Win32'">fs2_open_3_7_3_SSE</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE2|Win32'">fs2_open_3_7_3_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release AVX|Win32'">fs2_open_3_7_3_AVX</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<CustomBuildStep>
<Message>Copying build...</Message>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
</Command>
<Outputs>$(FS2PATH)\$(TargetFileName);%(Outputs)</Outputs>
</CustomBuildStep>
<CustomBuildStep />
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
@@ -197,8 +192,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WINDOWS;WIN32;_DEBUG;USE_OPENAL;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<PreprocessorDefinitions>FS2_SPEECH;FS2_VOICER;_WINDOWS;WIN32;_DEBUG;USE_OPENAL;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -214,11 +208,9 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<UndefinePreprocessorDefinitions>NDEBUG;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
<EnablePREfast>false</EnablePREfast>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;_VC08;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_VC08;FS2_VOICER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<ProjectReference>
@@ -235,9 +227,8 @@
<IgnoreSpecificDefaultLibraries>libc.lib;libcd.lib;libcmt.lib;libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
<MapExports>true</MapExports>
<MapExports>false</MapExports>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
@@ -251,19 +242,15 @@
</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"</Command>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
copy /y "$(OutputPath)$(TargetName).pdb" "$(FS2PATH)\$(TargetName).pdb"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copying build...</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug SSE|Win32'">
<CustomBuildStep>
<Message>Copying build...</Message>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
</Command>
<Outputs>$(FS2PATH)\$(TargetFileName);%(Outputs)</Outputs>
</CustomBuildStep>
<CustomBuildStep />
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
@@ -276,8 +263,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WINDOWS;WIN32;_DEBUG;USE_OPENAL;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<PreprocessorDefinitions>FS2_SPEECH;FS2_VOICER;_WINDOWS;WIN32;_DEBUG;USE_OPENAL;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -295,10 +281,9 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<UndefinePreprocessorDefinitions>NDEBUG;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;_VC08;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_VC08;FS2_VOICER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<ProjectReference>
@@ -315,9 +300,8 @@
<IgnoreSpecificDefaultLibraries>libc.lib;libcd.lib;libcmt.lib;libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
<MapExports>true</MapExports>
<MapExports>false</MapExports>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
@@ -331,19 +315,15 @@
</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"</Command>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
copy /y "$(OutputPath)$(TargetName).pdb" "$(FS2PATH)\$(TargetName).pdb"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copying build...</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug SSE2|Win32'">
<CustomBuildStep>
<Message>Copying build...</Message>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
</Command>
<Outputs>$(FS2PATH)\$(TargetFileName);%(Outputs)</Outputs>
</CustomBuildStep>
<CustomBuildStep />
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
@@ -356,8 +336,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WINDOWS;WIN32;_DEBUG;USE_OPENAL;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<PreprocessorDefinitions>FS2_SPEECH;FS2_VOICER;_WINDOWS;WIN32;_DEBUG;USE_OPENAL;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -375,10 +354,9 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<UndefinePreprocessorDefinitions>NDEBUG;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;_VC08;_SSE2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_VC08;_SSE2;FS2_VOICER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<ProjectReference>
@@ -395,9 +373,8 @@
<IgnoreSpecificDefaultLibraries>libc.lib;libcd.lib;libcmt.lib;libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
<MapExports>true</MapExports>
<MapExports>false</MapExports>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
@@ -411,19 +388,15 @@
</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"</Command>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
copy /y "$(OutputPath)$(TargetName).pdb" "$(FS2PATH)\$(TargetName).pdb"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copying build...</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug AVX|Win32'">
<CustomBuildStep>
<Message>Copying build...</Message>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
</Command>
<Outputs>$(FS2PATH)\$(TargetFileName);%(Outputs)</Outputs>
</CustomBuildStep>
<CustomBuildStep />
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
@@ -436,8 +409,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WINDOWS;WIN32;_DEBUG;USE_OPENAL;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<PreprocessorDefinitions>FS2_SPEECH;FS2_VOICER;_WINDOWS;WIN32;_DEBUG;USE_OPENAL;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -455,10 +427,9 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<UndefinePreprocessorDefinitions>NDEBUG;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;_VC08;_SSE2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_VC08;_SSE2;FS2_VOICER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<ProjectReference>
@@ -475,9 +446,8 @@
<IgnoreSpecificDefaultLibraries>libc.lib;libcd.lib;libcmt.lib;libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
<MapExports>true</MapExports>
<MapExports>false</MapExports>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
@@ -491,97 +461,15 @@
</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"</Command>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
copy /y "$(OutputPath)$(TargetName).pdb" "$(FS2PATH)\$(TargetName).pdb"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copying build...</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<CustomBuildStep>
<Message>Copying build...</Message>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
</Command>
<Outputs>$(FS2PATH)\$(TargetFileName);%(Outputs)</Outputs>
</CustomBuildStep>
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;USE_OPENAL;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>false</FunctionLevelLinking>
<FloatingPointModel>Fast</FloatingPointModel>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
<BrowseInformation>
</BrowseInformation>
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
<WarningLevel>Level2</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<UndefinePreprocessorDefinitions>_DEBUG;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;_VC08;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>odbc32.lib;odbccp32.lib;wsock32.lib;winmm.lib;vfw32.lib;msacm32.lib;comctl32.lib;openal32.lib;ogg_static.lib;vorbis_static.lib;vorbisfile_static.lib;theora_static.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>$(Configuration);../../oggvorbis/lib;../../openal/libs/win32;../../openal/libs/win64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<EnableUAC>false</EnableUAC>
<IgnoreSpecificDefaultLibraries>libc.lib;libcd.lib;libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
<MapExports>true</MapExports>
<SubSystem>Windows</SubSystem>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<Bscmake>
<AdditionalOptions>"$(IntDir)*.sbr" %(AdditionalOptions)</AdditionalOptions>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copying build...</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release SSE|Win32'">
<CustomBuildStep>
<Message>Copying build...</Message>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
</Command>
<Outputs>$(FS2PATH)\$(TargetFileName);%(Outputs)</Outputs>
</CustomBuildStep>
<CustomBuildStep />
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
@@ -599,7 +487,82 @@
<OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;USE_OPENAL;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>FS2_SPEECH;FS2_VOICER;NDEBUG;WIN32;_WINDOWS;USE_OPENAL;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>false</FunctionLevelLinking>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
<BrowseInformation>
</BrowseInformation>
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
<WarningLevel>Level2</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<UndefinePreprocessorDefinitions>_DEBUG;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/Zo %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;_VC08;FS2_VOICER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>odbc32.lib;odbccp32.lib;wsock32.lib;winmm.lib;vfw32.lib;msacm32.lib;comctl32.lib;openal32.lib;ogg_static.lib;vorbis_static.lib;vorbisfile_static.lib;theora_static.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>$(Configuration);../../oggvorbis/lib;../../openal/libs/win32;../../openal/libs/win64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<EnableUAC>false</EnableUAC>
<IgnoreSpecificDefaultLibraries>libc.lib;libcd.lib;libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
<MapExports>false</MapExports>
<SubSystem>Windows</SubSystem>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Bscmake>
<AdditionalOptions>"$(IntDir)*.sbr" %(AdditionalOptions)</AdditionalOptions>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
copy /y "$(OutputPath)$(TargetName).pdb" "$(FS2PATH)\$(TargetName).pdb"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copying build...</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release SSE|Win32'">
<CustomBuildStep />
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>$(OutDir)$(ProjectName).tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Full</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>FS2_SPEECH;FS2_VOICER;NDEBUG;WIN32;_WINDOWS;USE_OPENAL;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -615,13 +578,13 @@
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
<WarningLevel>Level2</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>
</DebugInformationFormat>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<UndefinePreprocessorDefinitions>_DEBUG;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/Zo %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;_VC08;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_VC08;FS2_VOICER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
@@ -632,7 +595,6 @@
<EnableUAC>false</EnableUAC>
<IgnoreSpecificDefaultLibraries>libc.lib;libcd.lib;libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
<SubSystem>Windows</SubSystem>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
@@ -641,6 +603,8 @@
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<GenerateDebugInformation>true</GenerateDebugInformation>
<MapExports>false</MapExports>
</Link>
<Bscmake>
<AdditionalOptions>"$(IntDir)*.sbr" %(AdditionalOptions)</AdditionalOptions>
@@ -648,19 +612,15 @@
<OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"</Command>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
copy /y "$(OutputPath)$(TargetName).pdb" "$(FS2PATH)\$(TargetName).pdb"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copying build...</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release SSE2|Win32'">
<CustomBuildStep>
<Message>Copying build...</Message>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
</Command>
<Outputs>$(FS2PATH)\$(TargetFileName);%(Outputs)</Outputs>
</CustomBuildStep>
<CustomBuildStep />
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
@@ -678,7 +638,7 @@
<OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;USE_OPENAL;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>FS2_SPEECH;FS2_VOICER;NDEBUG;WIN32;_WINDOWS;USE_OPENAL;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -694,13 +654,13 @@
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
<WarningLevel>Level2</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>
</DebugInformationFormat>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<UndefinePreprocessorDefinitions>_DEBUG;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/Zo %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;_VC08;_SSE2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_VC08;_SSE2;FS2_VOICER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
@@ -712,7 +672,6 @@
<UACUIAccess>false</UACUIAccess>
<IgnoreSpecificDefaultLibraries>libc.lib;libcd.lib;libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
<SubSystem>Windows</SubSystem>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
@@ -721,6 +680,9 @@
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences>
<MapExports>false</MapExports>
</Link>
<Bscmake>
<AdditionalOptions>"$(IntDir)*.sbr" %(AdditionalOptions)</AdditionalOptions>
@@ -728,19 +690,16 @@
<OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"</Command>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
copy /y "$(OutputPath)$(TargetName).pdb" "$(FS2PATH)\$(TargetName).pdb"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copying build...</Message>
</PostBuildEvent>
<ProjectReference />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release AVX|Win32'">
<CustomBuildStep>
<Message>Copying build...</Message>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
</Command>
<Outputs>$(FS2PATH)\$(TargetFileName);%(Outputs)</Outputs>
</CustomBuildStep>
<CustomBuildStep />
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
@@ -758,12 +717,12 @@
<OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;USE_OPENAL;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>FS2_SPEECH;FS2_VOICER;NDEBUG;WIN32;_WINDOWS;USE_OPENAL;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>false</FunctionLevelLinking>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
@@ -774,13 +733,13 @@
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
<WarningLevel>Level2</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>
</DebugInformationFormat>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<UndefinePreprocessorDefinitions>_DEBUG;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/Zo %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;_VC08;_SSE2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_VC08;_SSE2;FS2_VOICER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
@@ -792,7 +751,6 @@
<UACUIAccess>false</UACUIAccess>
<IgnoreSpecificDefaultLibraries>libc.lib;libcd.lib;libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
<SubSystem>Windows</SubSystem>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
@@ -801,6 +759,9 @@
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<GenerateDebugInformation>true</GenerateDebugInformation>
<MapExports>false</MapExports>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<Bscmake>
<AdditionalOptions>"$(IntDir)*.sbr" %(AdditionalOptions)</AdditionalOptions>
@@ -808,7 +769,8 @@
<OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"</Command>
<Command>copy /y "$(TargetPath)" "$(FS2PATH)\$(TargetFileName)"
copy /y "$(OutputPath)$(TargetName).pdb" "$(FS2PATH)\$(TargetName).pdb"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copying build...</Message>
+34 -26
View File
@@ -158,8 +158,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WINDOWS;WIN32;_DEBUG;PDB_DEBUGGING;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<PreprocessorDefinitions>FS2_SPEECH;FS2_VOICER;_WINDOWS;WIN32;_DEBUG;PDB_DEBUGGING;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
@@ -175,6 +174,8 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<UndefinePreprocessorDefinitions>NDEBUG;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -199,8 +200,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WINDOWS;WIN32;_DEBUG;PDB_DEBUGGING;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<PreprocessorDefinitions>FS2_SPEECH;FS2_VOICER;_WINDOWS;WIN32;_DEBUG;PDB_DEBUGGING;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
@@ -218,6 +218,8 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<UndefinePreprocessorDefinitions>NDEBUG;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -242,8 +244,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WINDOWS;WIN32;_DEBUG;PDB_DEBUGGING;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<PreprocessorDefinitions>FS2_SPEECH;FS2_VOICER;_WINDOWS;WIN32;_DEBUG;PDB_DEBUGGING;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
@@ -261,6 +262,8 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<UndefinePreprocessorDefinitions>NDEBUG;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -285,8 +288,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WINDOWS;WIN32;_DEBUG;PDB_DEBUGGING;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<PreprocessorDefinitions>FS2_SPEECH;FS2_VOICER;_WINDOWS;WIN32;_DEBUG;PDB_DEBUGGING;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
@@ -304,6 +306,8 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<UndefinePreprocessorDefinitions>NDEBUG;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -334,13 +338,13 @@
<OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;PDB_DEBUGGING;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>FS2_SPEECH;FS2_VOICER;NDEBUG;WIN32;_WINDOWS;PDB_DEBUGGING;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>false</FunctionLevelLinking>
<FloatingPointModel>Fast</FloatingPointModel>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
@@ -350,9 +354,10 @@
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>
</DebugInformationFormat>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<UndefinePreprocessorDefinitions>_DEBUG;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -377,7 +382,7 @@
<OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;PDB_DEBUGGING;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>FS2_SPEECH;FS2_VOICER;NDEBUG;WIN32;_WINDOWS;PDB_DEBUGGING;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -394,9 +399,10 @@
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>
</DebugInformationFormat>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<UndefinePreprocessorDefinitions>_DEBUG;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -421,7 +427,7 @@
<OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;PDB_DEBUGGING;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>FS2_SPEECH;FS2_VOICER;NDEBUG;WIN32;_WINDOWS;PDB_DEBUGGING;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -438,9 +444,10 @@
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>
</DebugInformationFormat>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<UndefinePreprocessorDefinitions>_DEBUG;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -465,13 +472,13 @@
<OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>../../code;../../libjpeg;../../libpng;../../lua;../../oggvorbis/include;../../openal/include;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;PDB_DEBUGGING;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>FS2_SPEECH;FS2_VOICER;NDEBUG;WIN32;_WINDOWS;PDB_DEBUGGING;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>false</FunctionLevelLinking>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
@@ -482,9 +489,10 @@
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>
</DebugInformationFormat>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<UndefinePreprocessorDefinitions>_DEBUG;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -528,8 +536,8 @@
<ClCompile Include="..\..\code\cutscene\oggplayer.cpp" />
<ClCompile Include="..\..\code\Debris\debris.cpp" />
<ClCompile Include="..\..\code\debugconsole\console.cpp" />
<ClCompile Include="..\..\code\debugconsole\consolecmds.cpp" />
<ClCompile Include="..\..\code\debugconsole\consoleparse.cpp" />
<ClCompile Include="..\..\code\debugconsole\consolecmds.cpp" />
<ClCompile Include="..\..\code\debugconsole\consoleparse.cpp" />
<ClCompile Include="..\..\code\fireball\fireballs.cpp" />
<ClCompile Include="..\..\code\fireball\warpineffect.cpp" />
<ClCompile Include="..\..\code\gamehelp\contexthelp.cpp" />
@@ -809,8 +817,8 @@
<ClInclude Include="..\..\code\cutscene\mvelib.h" />
<ClInclude Include="..\..\code\cutscene\oggplayer.h" />
<ClInclude Include="..\..\code\debugconsole\console.h" />
<ClInclude Include="..\..\code\debugconsole\consoleparse.h" />
<ClInclude Include="..\..\code\Debris\debris.h" />
<ClInclude Include="..\..\code\debugconsole\consoleparse.h" />
<ClInclude Include="..\..\code\Debris\debris.h" />
<ClInclude Include="..\..\code\DirectX\vasync.h" />
<ClInclude Include="..\..\code\DirectX\vdinput.h" />
<ClInclude Include="..\..\code\DirectX\vdplay.h" />
+2 -6
View File
@@ -166,7 +166,6 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_LIB;WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -198,7 +197,6 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_LIB;WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -232,7 +230,6 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_LIB;WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -266,7 +263,6 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_LIB;WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -311,7 +307,7 @@
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>false</FunctionLevelLinking>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<FloatingPointModel>Fast</FloatingPointModel>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
@@ -427,7 +423,7 @@
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>false</FunctionLevelLinking>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+2 -6
View File
@@ -170,7 +170,6 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -202,7 +201,6 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -236,7 +234,6 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -270,7 +267,6 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -314,7 +310,7 @@
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<FloatingPointModel>Fast</FloatingPointModel>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
@@ -433,7 +429,7 @@
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+6 -14
View File
@@ -159,7 +159,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>PNG_DEBUG=1;WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -190,7 +189,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>PNG_DEBUG=1;WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -223,7 +221,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>PNG_DEBUG=1;WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -256,7 +253,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>PNG_DEBUG=1;WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -301,15 +297,14 @@
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>false</FunctionLevelLinking>
<FloatingPointModel>Fast</FloatingPointModel>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>
</DebugInformationFormat>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<ResourceCompile>
@@ -351,8 +346,7 @@
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>
</DebugInformationFormat>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<ResourceCompile>
@@ -394,8 +388,7 @@
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>
</DebugInformationFormat>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<ResourceCompile>
@@ -429,7 +422,7 @@
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>false</FunctionLevelLinking>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
@@ -437,8 +430,7 @@
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>
</DebugInformationFormat>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<ResourceCompile>
+4 -4
View File
@@ -95,10 +95,10 @@
<AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;winmm.lib;wxmsw28d_xrc.lib;wxmsw28d_html.lib;wxmsw28d_adv.lib;wxmsw28d_core.lib;wxbase28d_xml.lib;wxbase28d.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexd.lib;wxexpatd.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<CustomBuildStep>
<Command>copy %(FullPath) "$(FS2PATH)/wxfred2_open_3_7_1-debug.exe"
<Command>copy %(FullPath) "$(FS2PATH)/wxfred2_open_3_7_3-debug.exe"
copy "$(ProjectDir)..\..\code\wxfred2\wxfred.xrc" "$(FS2PATH)\wxfred.xrc"</Command>
<Message>Copying build...</Message>
<Outputs>$(FS2PATH)/wxfred2_open_3_7_1-debug.exe;$(FS2PATH)\wxfred.xrc;%(Outputs)</Outputs>
<Outputs>$(FS2PATH)/wxfred2_open_3_7_3-debug.exe;$(FS2PATH)\wxfred.xrc;%(Outputs)</Outputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -146,10 +146,10 @@ copy "$(ProjectDir)..\..\code\wxfred2\wxfred.xrc" "$(FS2PATH)\wxfred.xrc"</Comma
<AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;winmm.lib;wxmsw28_xrc.lib;wxmsw28_html.lib;wxmsw28_adv.lib;wxmsw28_core.lib;wxbase28_xml.lib;wxbase28.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregex.lib;wxexpat.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<CustomBuildStep>
<Command>copy %(FullPath) "$(FS2PATH)\wxfred2_open_3_7_1.exe"
<Command>copy %(FullPath) "$(FS2PATH)\wxfred2_open_3_7_3.exe"
copy "$(ProjectDir)..\..\code\wxfred2\wxfred.xrc" "$(FS2PATH)\wxfred.xrc"</Command>
<Message>Copying build...</Message>
<Outputs>$(FS2PATH)\wxfred2_open_3_7_1.exe;$(FS2PATH)\wxfred.xrc;%(Outputs)</Outputs>
<Outputs>$(FS2PATH)\wxfred2_open_3_7_3.exe;$(FS2PATH)\wxfred.xrc;%(Outputs)</Outputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemGroup>
+2 -6
View File
@@ -158,7 +158,6 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -187,7 +186,6 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -218,7 +216,6 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -249,7 +246,6 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -289,7 +285,7 @@
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<FloatingPointModel>Fast</FloatingPointModel>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
@@ -399,7 +395,7 @@
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<FloatingPointModel>Precise</FloatingPointModel>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+8 -8
View File
@@ -170,14 +170,14 @@
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">fred2_open_3_7_1-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE|Win32'">fred2_open_3_7_1_SSE-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE2|Win32'">fred2_open_3_7_1_SSE2-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug AVX|Win32'">fred2_open_3_7_1_AVX-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">fred2_open_3_7_1</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE|Win32'">fred2_open_3_7_1_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE2|Win32'">fred2_open_3_7_1_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release AVX|Win32'">fred2_open_3_7_1_AVX</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">fred2_open_3_7_3-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE|Win32'">fred2_open_3_7_3_SSE-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE2|Win32'">fred2_open_3_7_3_SSE2-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug AVX|Win32'">fred2_open_3_7_3_AVX-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">fred2_open_3_7_3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE|Win32'">fred2_open_3_7_3_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE2|Win32'">fred2_open_3_7_3_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release AVX|Win32'">fred2_open_3_7_3_AVX</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<CustomBuildStep>
+8 -8
View File
@@ -169,14 +169,14 @@
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">fs2_open_3_7_1-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE|Win32'">fs2_open_3_7_1_SSE-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE2|Win32'">fs2_open_3_7_1_SSE2-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug AVX|Win32'">fs2_open_3_7_1_AVX-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">fs2_open_3_7_1</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE|Win32'">fs2_open_3_7_1_SSE</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE2|Win32'">fs2_open_3_7_1_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release AVX|Win32'">fs2_open_3_7_1_AVX</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">fs2_open_3_7_3-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE|Win32'">fs2_open_3_7_3_SSE-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug SSE2|Win32'">fs2_open_3_7_3_SSE2-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug AVX|Win32'">fs2_open_3_7_3_AVX-DEBUG</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">fs2_open_3_7_3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE|Win32'">fs2_open_3_7_3_SSE</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release SSE2|Win32'">fs2_open_3_7_3_SSE2</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release AVX|Win32'">fs2_open_3_7_3_AVX</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<CustomBuildStep>
+4 -4
View File
@@ -95,10 +95,10 @@
<AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;winmm.lib;wxmsw28d_xrc.lib;wxmsw28d_html.lib;wxmsw28d_adv.lib;wxmsw28d_core.lib;wxbase28d_xml.lib;wxbase28d.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexd.lib;wxexpatd.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<CustomBuildStep>
<Command>copy %(FullPath) "$(FS2PATH)/wxfred2_open_3_7_1-debug.exe"
<Command>copy %(FullPath) "$(FS2PATH)/wxfred2_open_3_7_3-debug.exe"
copy "$(ProjectDir)..\..\code\wxfred2\wxfred.xrc" "$(FS2PATH)\wxfred.xrc"</Command>
<Message>Copying build...</Message>
<Outputs>$(FS2PATH)/wxfred2_open_3_7_1-debug.exe;$(FS2PATH)\wxfred.xrc;%(Outputs)</Outputs>
<Outputs>$(FS2PATH)/wxfred2_open_3_7_3-debug.exe;$(FS2PATH)\wxfred.xrc;%(Outputs)</Outputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -146,10 +146,10 @@ copy "$(ProjectDir)..\..\code\wxfred2\wxfred.xrc" "$(FS2PATH)\wxfred.xrc"</Comma
<AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;winmm.lib;wxmsw28_xrc.lib;wxmsw28_html.lib;wxmsw28_adv.lib;wxmsw28_core.lib;wxbase28_xml.lib;wxbase28.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregex.lib;wxexpat.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<CustomBuildStep>
<Command>copy %(FullPath) "$(FS2PATH)\wxfred2_open_3_7_1.exe"
<Command>copy %(FullPath) "$(FS2PATH)\wxfred2_open_3_7_3.exe"
copy "$(ProjectDir)..\..\code\wxfred2\wxfred.xrc" "$(FS2PATH)\wxfred.xrc"</Command>
<Message>Copying build...</Message>
<Outputs>$(FS2PATH)\wxfred2_open_3_7_1.exe;$(FS2PATH)\wxfred.xrc;%(Outputs)</Outputs>
<Outputs>$(FS2PATH)\wxfred2_open_3_7_3.exe;$(FS2PATH)\wxfred.xrc;%(Outputs)</Outputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemGroup>
+8 -8
View File
@@ -54,14 +54,14 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 wsock32.lib winmm.lib msacm32.lib vfw32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib /nologo /subsystem:windows /pdb:none /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /out:"Release/fred2_open_3_7_1.exe" /libpath:"Release" /libpath:"../../STLport-5.2.1/lib" /libpath:"../../oggvorbis/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /MAPINFO:EXPORTS /MAPINFO:LINES /FORCE:MULTIPLE
# ADD LINK32 wsock32.lib winmm.lib msacm32.lib vfw32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib /nologo /subsystem:windows /pdb:none /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /out:"Release/fred2_open_3_7_3.exe" /libpath:"Release" /libpath:"../../STLport-5.2.1/lib" /libpath:"../../oggvorbis/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /MAPINFO:EXPORTS /MAPINFO:LINES /FORCE:MULTIPLE
# SUBTRACT LINK32 /map
# Begin Custom Build - Copying build...
InputPath=.\Release\fred2_open_3_7_1.exe
InputPath=.\Release\fred2_open_3_7_3.exe
SOURCE="$(InputPath)"
"$(FS2PATH)/fred2_open_3_7_1.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy /y $(InputPath) "$(FS2PATH)/fred2_open_3_7_1.exe"
"$(FS2PATH)/fred2_open_3_7_3.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy /y $(InputPath) "$(FS2PATH)/fred2_open_3_7_3.exe"
# End Custom Build
@@ -89,14 +89,14 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 Quartz.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /nodefaultlib:"libcmt.lib" /out:"Debug/fred2_open_3_7_1-debug.exe" /pdbtype:sept /libpath:"Debug" /libpath:"../../STLport-5.2.1/lib" /libpath:"../../oggvorbis/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /MAPINFO:EXPORTS /MAPINFO:LINES /FORCE:MULTIPLE
# ADD LINK32 Quartz.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /nodefaultlib:"libcmt.lib" /out:"Debug/fred2_open_3_7_3-debug.exe" /pdbtype:sept /libpath:"Debug" /libpath:"../../STLport-5.2.1/lib" /libpath:"../../oggvorbis/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /MAPINFO:EXPORTS /MAPINFO:LINES /FORCE:MULTIPLE
# SUBTRACT LINK32 /pdb:none
# Begin Custom Build - Copying build...
InputPath=.\Debug\fred2_open_3_7_1-debug.exe
InputPath=.\Debug\fred2_open_3_7_3-debug.exe
SOURCE="$(InputPath)"
"$(FS2PATH)/fred2_open_3_7_1-debug.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy /y $(InputPath) "$(FS2PATH)/fred2_open_3_7_1-debug.exe"
"$(FS2PATH)/fred2_open_3_7_3-debug.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy /y $(InputPath) "$(FS2PATH)/fred2_open_3_7_3-debug.exe"
# End Custom Build
+8 -8
View File
@@ -54,14 +54,14 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo /o"Release\Profile\Freespace2.bsc" "Release\Profile\*.sbr"
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 Quartz.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib /nologo /subsystem:windows /pdb:none /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /out:"Release/fs2_open_3_7_1.exe" /libpath:"Release" /libpath:"../../STLport-5.2.1/lib" /libpath:"../../oggvorbis/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /MAPINFO:EXPORTS /MAPINFO:LINES
# ADD LINK32 Quartz.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib /nologo /subsystem:windows /pdb:none /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /out:"Release/fs2_open_3_7_3.exe" /libpath:"Release" /libpath:"../../STLport-5.2.1/lib" /libpath:"../../oggvorbis/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /MAPINFO:EXPORTS /MAPINFO:LINES
# SUBTRACT LINK32 /map /debug
# Begin Custom Build - Copying build...
InputPath=.\Release\fs2_open_3_7_1.exe
InputPath=.\Release\fs2_open_3_7_3.exe
SOURCE="$(InputPath)"
"$(FS2PATH)/fs2_open_3_7_1.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy /y $(InputPath) "$(FS2PATH)/fs2_open_3_7_1.exe"
"$(FS2PATH)/fs2_open_3_7_3.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy /y $(InputPath) "$(FS2PATH)/fs2_open_3_7_3.exe"
# End Custom Build
@@ -89,14 +89,14 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo /o"Debug\Profile\Freespace2.bsc" "Debug\Profile\*.sbr"
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 Quartz.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib /nologo /subsystem:windows /map /debug /debugtype:both /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /nodefaultlib:"libcmt.lib" /out:"Debug\fs2_open_3_7_1-debug.exe" /libpath:"Debug" /libpath:"../../STLport-5.2.1/lib" /libpath:"../../oggvorbis/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /MAPINFO:EXPORTS /MAPINFO:LINES
# ADD LINK32 Quartz.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib /nologo /subsystem:windows /map /debug /debugtype:both /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /nodefaultlib:"libcmt.lib" /out:"Debug\fs2_open_3_7_3-debug.exe" /libpath:"Debug" /libpath:"../../STLport-5.2.1/lib" /libpath:"../../oggvorbis/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /MAPINFO:EXPORTS /MAPINFO:LINES
# SUBTRACT LINK32 /pdb:none /incremental:no
# Begin Custom Build - Copying build...
InputPath=.\Debug\fs2_open_3_7_1-debug.exe
InputPath=.\Debug\fs2_open_3_7_3-debug.exe
SOURCE="$(InputPath)"
"$(FS2PATH)/fs2_open_3_7_1-debug.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy /y $(InputPath) "$(FS2PATH)/fs2_open_3_7_1-debug.exe"
"$(FS2PATH)/fs2_open_3_7_3-debug.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy /y $(InputPath) "$(FS2PATH)/fs2_open_3_7_3-debug.exe"
# End Custom Build
+8 -8
View File
@@ -54,18 +54,18 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo /o"Release/Profile/wxFRED2.bsc" "Release\Profile\*.sbr"
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw28_xrc.lib wxmsw28_html.lib wxmsw28_adv.lib wxmsw28_core.lib wxbase28_xml.lib wxbase28.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib /nologo /subsystem:windows /pdb:none /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"Release/wxfred2_open_3_7_1.exe" /libpath:"../../STLport-5.2.1/lib" /libpath:"$(WXWIN)/lib" /libpath:"$(WXWIN)/lib/vc_lib"
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw28_xrc.lib wxmsw28_html.lib wxmsw28_adv.lib wxmsw28_core.lib wxbase28_xml.lib wxbase28.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib /nologo /subsystem:windows /pdb:none /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"Release/wxfred2_open_3_7_3.exe" /libpath:"../../STLport-5.2.1/lib" /libpath:"$(WXWIN)/lib" /libpath:"$(WXWIN)/lib/vc_lib"
# SUBTRACT LINK32 /map /debug /nodefaultlib
# Begin Custom Build - Copying build...
ProjDir=.
InputPath=.\Release\wxfred2_open_3_7_1.exe
InputPath=.\Release\wxfred2_open_3_7_3.exe
SOURCE="$(InputPath)"
BuildCmds= \
copy $(InputPath) "$(FS2PATH)\wxfred2_open_3_7_1.exe" \
copy $(InputPath) "$(FS2PATH)\wxfred2_open_3_7_3.exe" \
copy "$(ProjDir)\..\..\code\wxfred2\wxfred.xrc" "$(FS2PATH)\wxfred.xrc" \
"$(FS2PATH)\wxfred2_open_3_7_1.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
"$(FS2PATH)\wxfred2_open_3_7_3.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(FS2PATH)\wxfred.xrc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
@@ -96,18 +96,18 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo /o"Debug/Profile/wxFRED2.bsc" "Debug\Profile\*.sbr"
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw28d_xrc.lib wxmsw28d_html.lib wxmsw28d_adv.lib wxmsw28d_core.lib wxbase28d_xml.lib wxbase28d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"Debug/wxfred2_open_3_7_1-debug.exe" /pdbtype:sept /libpath:"../../STLport-5.2.1/lib" /libpath:"$(WXWIN)/lib" /libpath:"$(WXWIN)/lib/vc_lib"
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw28d_xrc.lib wxmsw28d_html.lib wxmsw28d_adv.lib wxmsw28d_core.lib wxbase28d_xml.lib wxbase28d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"Debug/wxfred2_open_3_7_3-debug.exe" /pdbtype:sept /libpath:"../../STLport-5.2.1/lib" /libpath:"$(WXWIN)/lib" /libpath:"$(WXWIN)/lib/vc_lib"
# SUBTRACT LINK32 /nodefaultlib
# Begin Custom Build - Copying build...
ProjDir=.
InputPath=.\Debug\wxfred2_open_3_7_1-debug.exe
InputPath=.\Debug\wxfred2_open_3_7_3-debug.exe
SOURCE="$(InputPath)"
BuildCmds= \
copy $(InputPath) "$(FS2PATH)/wxfred2_open_3_7_1-debug.exe" \
copy $(InputPath) "$(FS2PATH)/wxfred2_open_3_7_3-debug.exe" \
copy "$(ProjDir)\..\..\code\wxfred2\wxfred.xrc" "$(FS2PATH)\wxfred.xrc" \
"$(FS2PATH)/wxfred2_open_3_7_1-debug.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
"$(FS2PATH)/wxfred2_open_3_7_3-debug.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(FS2PATH)\wxfred.xrc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
Binary file not shown.
@@ -4534,7 +4534,7 @@
i386,
);
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 3.7.1;
CURRENT_PROJECT_VERSION = "3.7.3";
DEAD_CODE_STRIPPING = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEPLOYMENT_POSTPROCESSING = YES;
@@ -4567,7 +4567,7 @@
i386,
);
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 3.7.1;
CURRENT_PROJECT_VERSION = "3.7.3";
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEPLOYMENT_POSTPROCESSING = YES;
Binary file not shown.
@@ -614,6 +614,8 @@
918A074C1804B4A600983AE1 /* libjansson.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 918A07221804AFAA00983AE1 /* libjansson.a */; };
918A074D1804B4A600983AE1 /* libmongoose.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 918A07141804AF0F00983AE1 /* libmongoose.a */; };
9193B29817EDFEB7003CC0BA /* profiling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9193B29717EDFEB7003CC0BA /* profiling.cpp */; };
91F4EE3A1AB32675006EF158 /* hashtable_seed.c in Sources */ = {isa = PBXBuildFile; fileRef = 91F4EE381AB32675006EF158 /* hashtable_seed.c */; };
91F4EE3B1AB32675006EF158 /* lookup3.h in Headers */ = {isa = PBXBuildFile; fileRef = 91F4EE391AB32675006EF158 /* lookup3.h */; };
F007DDF612F4F44600D2F6C1 /* jconfig.h in Headers */ = {isa = PBXBuildFile; fileRef = F007DDB512F4F44600D2F6C1 /* jconfig.h */; };
F007DDF712F4F44600D2F6C1 /* jdct.h in Headers */ = {isa = PBXBuildFile; fileRef = F007DDB612F4F44600D2F6C1 /* jdct.h */; };
F007DDF912F4F44600D2F6C1 /* jerror.h in Headers */ = {isa = PBXBuildFile; fileRef = F007DDB812F4F44600D2F6C1 /* jerror.h */; };
@@ -1556,6 +1558,8 @@
918A07361804B01800983AE1 /* utf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utf.h; sourceTree = "<group>"; };
918A07371804B01800983AE1 /* value.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = value.c; sourceTree = "<group>"; };
9193B29717EDFEB7003CC0BA /* profiling.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = profiling.cpp; sourceTree = "<group>"; };
91F4EE381AB32675006EF158 /* hashtable_seed.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hashtable_seed.c; sourceTree = "<group>"; };
91F4EE391AB32675006EF158 /* lookup3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lookup3.h; sourceTree = "<group>"; };
B2F67ED704C74A3F00A80002 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
B2F67F1E04C773E400A80002 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = /System/Library/Frameworks/GLUT.framework; sourceTree = "<absolute>"; };
F007DDB512F4F44600D2F6C1 /* jconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jconfig.h; sourceTree = "<group>"; };
@@ -3116,6 +3120,8 @@
918A07261804B01800983AE1 /* jansson */ = {
isa = PBXGroup;
children = (
91F4EE381AB32675006EF158 /* hashtable_seed.c */,
91F4EE391AB32675006EF158 /* lookup3.h */,
918A07271804B01800983AE1 /* dump.c */,
918A07281804B01800983AE1 /* error.c */,
918A07291804B01800983AE1 /* hashtable.c */,
@@ -3544,6 +3550,7 @@
buildActionMask = 2147483647;
files = (
918A07461804B01800983AE1 /* utf.h in Headers */,
91F4EE3B1AB32675006EF158 /* lookup3.h in Headers */,
918A073B1804B01800983AE1 /* hashtable.h in Headers */,
918A073E1804B01800983AE1 /* jansson_private.h in Headers */,
918A07431804B01800983AE1 /* strbuffer.h in Headers */,
@@ -4219,6 +4226,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
91F4EE3A1AB32675006EF158 /* hashtable_seed.c in Sources */,
918A07451804B01800983AE1 /* utf.c in Sources */,
918A07391804B01800983AE1 /* error.c in Sources */,
918A07441804B01800983AE1 /* strconv.c in Sources */,
@@ -4428,7 +4436,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = "3.7.1";
CURRENT_PROJECT_VERSION = "3.7.3";
DEAD_CODE_STRIPPING = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEPLOYMENT_POSTPROCESSING = YES;
@@ -4474,7 +4482,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = "3.7.1";
CURRENT_PROJECT_VERSION = "3.7.3";
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEPLOYMENT_POSTPROCESSING = YES;
@@ -4587,6 +4595,13 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
EXECUTABLE_PREFIX = lib;
GCC_PREPROCESSOR_DEFINITIONS = (
_DEBUG,
SCP_UNIX,
USE_OPENAL,
APPLE_APP,
HAVE_STDINT_H,
);
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
PRODUCT_NAME = "$(TARGET_NAME)";
};
@@ -4599,6 +4614,13 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
EXECUTABLE_PREFIX = lib;
GCC_PREPROCESSOR_DEFINITIONS = (
NDEBUG,
SCP_UNIX,
USE_OPENAL,
APPLE_APP,
HAVE_STDINT_H,
);
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
PRODUCT_NAME = "$(TARGET_NAME)";
};
@@ -8,7 +8,7 @@
<Option virtualFolders="Freespace2/;" />
<Build>
<Target title="Debug">
<Option output="../Debug/Freespace2/lib/fs2_open_3_7_1_debug" prefix_auto="1" extension_auto="1" />
<Option output="../Debug/Freespace2/lib/fs2_open_3_7_3_debug" prefix_auto="1" extension_auto="1" />
<Option working_dir="../freespaceDirectoryLink" />
<Option object_output="../Debug/Freespace2/obj/" />
<Option type="1" />
@@ -24,7 +24,7 @@
</Linker>
</Target>
<Target title="Release">
<Option output="../Release/Freespace2/lib/fs2_open_3_7_1" prefix_auto="1" extension_auto="1" />
<Option output="../Release/Freespace2/lib/fs2_open_3_7_3" prefix_auto="1" extension_auto="1" />
<Option object_output="../Release/Freespace2/obj/" />
<Option type="0" />
<Option compiler="gcc" />