mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
Additional clang-format
This commit is contained in:
parent
61be1317b2
commit
38128ea134
@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
Language: Cpp
|
BasedOnStyle: LLVM
|
||||||
# BasedOnStyle: LLVM
|
|
||||||
AccessModifierOffset: -2
|
AccessModifierOffset: -2
|
||||||
AlignAfterOpenBracket: Align
|
AlignAfterOpenBracket: Align
|
||||||
AlignConsecutiveMacros: false
|
AlignConsecutiveMacros: false
|
||||||
|
@ -601,7 +601,7 @@ void grSurface::xlat16_16(char *data, int w, int h, int format) {
|
|||||||
int temp_pix = sptr[(FixToInt(fv) * w) + FixToInt(fu)];
|
int temp_pix = sptr[(FixToInt(fv) * w) + FixToInt(fu)];
|
||||||
int r = (temp_pix >> 8) & 0xf;
|
int r = (temp_pix >> 8) & 0xf;
|
||||||
int g = (temp_pix >> 4) & 0xf;
|
int g = (temp_pix >> 4) & 0xf;
|
||||||
int b = (temp_pix)&0xf;
|
int b = (temp_pix) & 0xf;
|
||||||
|
|
||||||
r <<= 4;
|
r <<= 4;
|
||||||
g <<= 4;
|
g <<= 4;
|
||||||
|
@ -1979,7 +1979,7 @@ bool goal_do_avoid_walls(object *obj, vector *mdir) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// mprintf((0, "Dist %f %f (%d, %d)\n", dist, scale,
|
// mprintf((0, "Dist %f %f (%d, %d)\n", dist, scale,
|
||||||
//facelist[i].room_index, facelist[i].face_index));
|
// facelist[i].room_index, facelist[i].face_index));
|
||||||
|
|
||||||
if (dist < closest_dist) {
|
if (dist < closest_dist) {
|
||||||
closest_dist = dist;
|
closest_dist = dist;
|
||||||
@ -2999,8 +2999,8 @@ bool AINotify(object *obj, ubyte notify_type, void *info) {
|
|||||||
{
|
{
|
||||||
if (!(Game_mode & GM_MULTI)) {
|
if (!(Game_mode & GM_MULTI)) {
|
||||||
for (i = 0; i < AI_NumRendered; i++) {
|
for (i = 0; i < AI_NumRendered; i++) {
|
||||||
// mprintf((0, "I know that I could dodge, if I was aware, says robot
|
// mprintf((0, "I know that I could dodge, if I was aware, says
|
||||||
//%d.\n", AI_RenderedList[i]));
|
// robot %d.\n", AI_RenderedList[i]));
|
||||||
|
|
||||||
if (!BOA_IsVisible(Objects[AI_RenderedList[i]].roomnum, other_obj->roomnum))
|
if (!BOA_IsVisible(Objects[AI_RenderedList[i]].roomnum, other_obj->roomnum))
|
||||||
continue;
|
continue;
|
||||||
@ -4976,8 +4976,8 @@ void ai_move(object *obj) {
|
|||||||
|
|
||||||
int g_status = cur_goal->status_reg;
|
int g_status = cur_goal->status_reg;
|
||||||
|
|
||||||
// if((ai_info->ai_type == AIT_MELEE1) && (ai_info->status_reg
|
// if((ai_info->ai_type == AIT_MELEE1) &&
|
||||||
//& AISR_MELEE))
|
//(ai_info->status_reg & AISR_MELEE))
|
||||||
// {
|
// {
|
||||||
// AIMoveTowardsPosition(obj,
|
// AIMoveTowardsPosition(obj,
|
||||||
//&ai_info->last_see_target_pos, ai_info->attack_vel_percent);
|
//&ai_info->last_see_target_pos, ai_info->attack_vel_percent);
|
||||||
|
@ -845,7 +845,7 @@
|
|||||||
#include "rtperformance.h"
|
#include "rtperformance.h"
|
||||||
#include "demofile.h"
|
#include "demofile.h"
|
||||||
#include "d3music.h"
|
#include "d3music.h"
|
||||||
//#include "gamespy.h"
|
// #include "gamespy.h"
|
||||||
#include "osiris_dll.h"
|
#include "osiris_dll.h"
|
||||||
#include "aiambient.h"
|
#include "aiambient.h"
|
||||||
#include "marker.h"
|
#include "marker.h"
|
||||||
@ -908,7 +908,7 @@ bool Rendering_main_view = false;
|
|||||||
bool Skip_render_game_frame = false;
|
bool Skip_render_game_frame = false;
|
||||||
bool Menu_interface_mode = false;
|
bool Menu_interface_mode = false;
|
||||||
|
|
||||||
//#ifdef GAMEGAUGE
|
// #ifdef GAMEGAUGE
|
||||||
int frames_one_second = 0;
|
int frames_one_second = 0;
|
||||||
int min_one_second = 0x7fffffff;
|
int min_one_second = 0x7fffffff;
|
||||||
int max_one_second = 0;
|
int max_one_second = 0;
|
||||||
@ -921,7 +921,7 @@ short gamegauge_fpslog[GAMEGAUGE_MAX_LOG];
|
|||||||
|
|
||||||
bool Game_gauge_do_time_test = false;
|
bool Game_gauge_do_time_test = false;
|
||||||
char Game_gauge_usefile[_MAX_PATH] = "gg.dem";
|
char Game_gauge_usefile[_MAX_PATH] = "gg.dem";
|
||||||
//#endif
|
// #endif
|
||||||
|
|
||||||
longlong last_timer = 0;
|
longlong last_timer = 0;
|
||||||
|
|
||||||
@ -1005,7 +1005,7 @@ void ShrinkWindow() {
|
|||||||
#define CV_MARKER7 8 // Last marker view
|
#define CV_MARKER7 8 // Last marker view
|
||||||
#define CV_MARKER8 9 // Last marker view
|
#define CV_MARKER8 9 // Last marker view
|
||||||
#define CV_GUIDEBOT 10 // Guide-Bot
|
#define CV_GUIDEBOT 10 // Guide-Bot
|
||||||
//#define CV_COOP 3 //View from a coop player
|
// #define CV_COOP 3 //View from a coop player
|
||||||
|
|
||||||
#define NUM_CAMERA_VIEWS 3
|
#define NUM_CAMERA_VIEWS 3
|
||||||
|
|
||||||
@ -1281,16 +1281,16 @@ void ProcessNormalKey(int key) {
|
|||||||
Clear_screen = 4; // clears screen.
|
Clear_screen = 4; // clears screen.
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//#ifndef DEMO
|
// #ifndef DEMO
|
||||||
case KEY_F5:
|
case KEY_F5:
|
||||||
Game_interface_mode = GAME_TOGGLE_DEMO;
|
Game_interface_mode = GAME_TOGGLE_DEMO;
|
||||||
return;
|
return;
|
||||||
case KEY_ALTED + KEY_F5:
|
case KEY_ALTED + KEY_F5:
|
||||||
DemoAbort(true);
|
DemoAbort(true);
|
||||||
return;
|
return;
|
||||||
//#endif
|
// #endif
|
||||||
// case KEY_SHIFTED+KEY_LAPOSTRO: Game_interface_mode = GAME_TELCOM_CARGO;return;
|
// case KEY_SHIFTED+KEY_LAPOSTRO: Game_interface_mode = GAME_TELCOM_CARGO;return;
|
||||||
// case KEY_ALTED+KEY_LAPOSTRO: Game_interface_mode = GAME_TELCOM_BRIEFINGS; return;
|
// case KEY_ALTED+KEY_LAPOSTRO: Game_interface_mode = GAME_TELCOM_BRIEFINGS; return;
|
||||||
case KEY_SHIFTED + KEY_TAB:
|
case KEY_SHIFTED + KEY_TAB:
|
||||||
Game_interface_mode = GAME_TELCOM_BRIEFINGS;
|
Game_interface_mode = GAME_TELCOM_BRIEFINGS;
|
||||||
return;
|
return;
|
||||||
@ -2474,9 +2474,9 @@ void ProcessKeys() {
|
|||||||
ProcessTestKeys(key);
|
ProcessTestKeys(key);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#ifdef DEMO
|
// #ifdef DEMO
|
||||||
DemoCheats(key);
|
DemoCheats(key);
|
||||||
//#endif
|
// #endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2719,11 +2719,11 @@ void GameRenderFrame(void) {
|
|||||||
|
|
||||||
// Increment frame count
|
// Increment frame count
|
||||||
FrameCount++;
|
FrameCount++;
|
||||||
//#ifdef GAMEGAUGE
|
// #ifdef GAMEGAUGE
|
||||||
frames_one_second++;
|
frames_one_second++;
|
||||||
gamegauge_total_frames++;
|
gamegauge_total_frames++;
|
||||||
//#endif
|
// #endif
|
||||||
// Update our glows
|
// Update our glows
|
||||||
PostUpdateAllLightGlows();
|
PostUpdateAllLightGlows();
|
||||||
|
|
||||||
// Reset our powerup sparkle time if it has overflowed
|
// Reset our powerup sparkle time if it has overflowed
|
||||||
|
@ -1375,7 +1375,7 @@ void WriteAllDoorways(CFILE *ofile);
|
|||||||
// Macro to translate old file handles (pre-version 94) to new ones
|
// Macro to translate old file handles (pre-version 94) to new ones
|
||||||
#define OLD_HANDLE_OBJNUM_MASK 0x3ff // to mask off the object number part of the handle
|
#define OLD_HANDLE_OBJNUM_MASK 0x3ff // to mask off the object number part of the handle
|
||||||
#define OLD_HANDLE_COUNT_MASK 0xfffffc00 // to maks off the count part of the handle
|
#define OLD_HANDLE_COUNT_MASK 0xfffffc00 // to maks off the count part of the handle
|
||||||
#define XLATE_HANDLE(handle) ((((handle)&OLD_HANDLE_COUNT_MASK) << 1) + ((handle)&OLD_HANDLE_OBJNUM_MASK))
|
#define XLATE_HANDLE(handle) ((((handle) & OLD_HANDLE_COUNT_MASK) << 1) + ((handle) & OLD_HANDLE_OBJNUM_MASK))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
@ -883,7 +883,7 @@ bool LoadMission(const char *mssn) {
|
|||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
|
|
||||||
//#endif
|
// #endif
|
||||||
tLevelNode *lvls = NULL; // Temporary storage for level data.
|
tLevelNode *lvls = NULL; // Temporary storage for level data.
|
||||||
tMission *msn;
|
tMission *msn;
|
||||||
CFILE *fp = NULL; // Mission file
|
CFILE *fp = NULL; // Mission file
|
||||||
|
@ -60,7 +60,9 @@
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
static struct { int ringbmp; } NewPyroGaugeData;
|
static struct {
|
||||||
|
int ringbmp;
|
||||||
|
} NewPyroGaugeData;
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -598,7 +598,7 @@
|
|||||||
#include "sounds.h"
|
#include "sounds.h"
|
||||||
#include "mem.h"
|
#include "mem.h"
|
||||||
#include "marker.h"
|
#include "marker.h"
|
||||||
//#include <malloc.h>
|
// #include <malloc.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "psrand.h"
|
#include "psrand.h"
|
||||||
// Allocate and initialize an effect_info struct for an object
|
// Allocate and initialize an effect_info struct for an object
|
||||||
|
@ -2082,9 +2082,9 @@ int PlayerChooseDeathFate(int slot, float damage, bool melee) {
|
|||||||
else
|
else
|
||||||
is_moving = false;
|
is_moving = false;
|
||||||
|
|
||||||
fate = (damage <= DEATH_BREAKUP_THRESHOLD && is_moving && !melee && OBJECT_OUTSIDE(playerobj))
|
fate = (damage <= DEATH_BREAKUP_THRESHOLD && is_moving && !melee && OBJECT_OUTSIDE(playerobj)) ? DEATH_BREAKUP
|
||||||
? DEATH_BREAKUP
|
: (damage <= DEATH_EXPLODE_THRESHOLD || melee) ? DEATH_FALL
|
||||||
: (damage <= DEATH_EXPLODE_THRESHOLD || melee) ? DEATH_FALL : DEATH_INSTANT;
|
: DEATH_INSTANT;
|
||||||
|
|
||||||
if (fate == DEATH_BREAKUP) {
|
if (fate == DEATH_BREAKUP) {
|
||||||
if ((ps_rand() % 4) < 2)
|
if ((ps_rand() % 4) < 2)
|
||||||
|
@ -394,80 +394,80 @@ int SlewFrame(object *obj, int movement_limitations) {
|
|||||||
new_room = obj->roomnum;
|
new_room = obj->roomnum;
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
// NOTE LINK TO ABOVE IF
|
// NOTE LINK TO ABOVE IF
|
||||||
if (outside_mine) { // starting outside the mine?
|
if (outside_mine) { // starting outside the mine?
|
||||||
|
|
||||||
// See if we've moved back into a room
|
// See if we've moved back into a room
|
||||||
new_room = FindPointRoom(&new_pos);
|
new_room = FindPointRoom(&new_pos);
|
||||||
|
|
||||||
if (new_room != -1) { // back in the mine
|
if (new_room != -1) { // back in the mine
|
||||||
outside_mine = 0;
|
outside_mine = 0;
|
||||||
mprintf((0, "SLEW: Re-entered mine at room %d\n", new_room));
|
mprintf((0, "SLEW: Re-entered mine at room %d\n", new_room));
|
||||||
} else // not back in the mine
|
} else // not back in the mine
|
||||||
new_room = obj->roomnum;
|
new_room = obj->roomnum;
|
||||||
} else {
|
} else {
|
||||||
bool was_outside = (ROOMNUM_OUTSIDE(obj->roomnum) != 0);
|
bool was_outside = (ROOMNUM_OUTSIDE(obj->roomnum) != 0);
|
||||||
|
|
||||||
// Limit new position to terrain bounds if outside
|
// Limit new position to terrain bounds if outside
|
||||||
if (was_outside) {
|
if (was_outside) {
|
||||||
if (new_pos.x < 1.0)
|
if (new_pos.x < 1.0)
|
||||||
new_pos.x = 1.0;
|
new_pos.x = 1.0;
|
||||||
if (new_pos.x > TERRAIN_WIDTH * TERRAIN_SIZE - 1.0)
|
if (new_pos.x > TERRAIN_WIDTH * TERRAIN_SIZE - 1.0)
|
||||||
new_pos.x = TERRAIN_WIDTH * TERRAIN_SIZE - 1.0;
|
new_pos.x = TERRAIN_WIDTH * TERRAIN_SIZE - 1.0;
|
||||||
if (new_pos.z < 1.0)
|
if (new_pos.z < 1.0)
|
||||||
new_pos.z = 1.0;
|
new_pos.z = 1.0;
|
||||||
if (new_pos.z > TERRAIN_DEPTH * TERRAIN_SIZE - 1.0)
|
if (new_pos.z > TERRAIN_DEPTH * TERRAIN_SIZE - 1.0)
|
||||||
new_pos.z = TERRAIN_WIDTH * TERRAIN_SIZE - 1.0;
|
new_pos.z = TERRAIN_WIDTH * TERRAIN_SIZE - 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call FVI up get updated room number
|
// Call FVI up get updated room number
|
||||||
fq.p0 = &obj->pos;
|
fq.p0 = &obj->pos;
|
||||||
fq.startroom = obj->roomnum;
|
fq.startroom = obj->roomnum;
|
||||||
fq.p1 = &new_pos;
|
fq.p1 = &new_pos;
|
||||||
fq.rad = 0;
|
fq.rad = 0;
|
||||||
fq.thisobjnum = OBJNUM(obj);
|
fq.thisobjnum = OBJNUM(obj);
|
||||||
fq.ignore_obj_list = NULL;
|
fq.ignore_obj_list = NULL;
|
||||||
fq.flags = FQ_IGNORE_RENDER_THROUGH_PORTALS;
|
fq.flags = FQ_IGNORE_RENDER_THROUGH_PORTALS;
|
||||||
fate = fvi_FindIntersection(&fq, &hit_info);
|
fate = fvi_FindIntersection(&fq, &hit_info);
|
||||||
|
|
||||||
// If bad room, don't move
|
// If bad room, don't move
|
||||||
if ((fate == HIT_OUT_OF_TERRAIN_BOUNDS) || (hit_info.hit_room == -1)) {
|
if ((fate == HIT_OUT_OF_TERRAIN_BOUNDS) || (hit_info.hit_room == -1)) {
|
||||||
new_room = obj->roomnum;
|
new_room = obj->roomnum;
|
||||||
new_pos = obj->pos;
|
new_pos = obj->pos;
|
||||||
} else
|
} else
|
||||||
new_room = hit_info.hit_room;
|
new_room = hit_info.hit_room;
|
||||||
|
|
||||||
// The object hit a wall, and maybe went outside the mine.
|
// The object hit a wall, and maybe went outside the mine.
|
||||||
if (fate == HIT_WALL) {
|
if (fate == HIT_WALL) {
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
mprintf((0, "SLEW: hit wall\n"));
|
mprintf((0, "SLEW: hit wall\n"));
|
||||||
|
|
||||||
// Check if we're in a room
|
// Check if we're in a room
|
||||||
t = FindPointRoom(&new_pos);
|
t = FindPointRoom(&new_pos);
|
||||||
|
|
||||||
if (t != -1) { // We're in a room
|
if (t != -1) { // We're in a room
|
||||||
new_room = t;
|
new_room = t;
|
||||||
mprintf((0, "SLEW: still in mine in room %d\n", new_room));
|
mprintf((0, "SLEW: still in mine in room %d\n", new_room));
|
||||||
} else { // Not in a room. Set a special flag
|
} else { // Not in a room. Set a special flag
|
||||||
outside_mine = 1;
|
outside_mine = 1;
|
||||||
mprintf((0, "SLEW: left mine from room %d\n", new_room));
|
mprintf((0, "SLEW: left mine from room %d\n", new_room));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (new_room != obj->roomnum) { // if we've changed rooms, say so
|
||||||
|
if (ROOMNUM_OUTSIDE(new_room))
|
||||||
|
if (was_outside)
|
||||||
|
mprintf((0, "SLEW: Moved to cell %d, BOA TR %d\n", CELLNUM(new_room), TERRAIN_REGION(new_room)));
|
||||||
|
else
|
||||||
|
mprintf((0, "SLEW: Moved outside to cell %d\n", CELLNUM(new_room)));
|
||||||
|
else if (was_outside)
|
||||||
|
mprintf((0, "SLEW: Moved inside to room %d\n", new_room));
|
||||||
|
else
|
||||||
|
mprintf((0, "SLEW: Moved into room %d\n", new_room));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (new_room != obj->roomnum) { // if we've changed rooms, say so
|
|
||||||
if (ROOMNUM_OUTSIDE(new_room))
|
|
||||||
if (was_outside)
|
|
||||||
mprintf((0, "SLEW: Moved to cell %d, BOA TR %d\n", CELLNUM(new_room), TERRAIN_REGION(new_room)));
|
|
||||||
else
|
|
||||||
mprintf((0, "SLEW: Moved outside to cell %d\n", CELLNUM(new_room)));
|
|
||||||
else if (was_outside)
|
|
||||||
mprintf((0, "SLEW: Moved inside to room %d\n", new_room));
|
|
||||||
else
|
|
||||||
mprintf((0, "SLEW: Moved into room %d\n", new_room));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Now we have the new room, so update the object position
|
// Now we have the new room, so update the object position
|
||||||
ObjSetPos(obj, &new_pos, new_room, NULL, false);
|
ObjSetPos(obj, &new_pos, new_room, NULL, false);
|
||||||
|
|
||||||
|
@ -600,9 +600,9 @@ void TelComMain(bool ingame, bool SelectShip) {
|
|||||||
TelcomStartSound(TCSND_RUNNING);
|
TelcomStartSound(TCSND_RUNNING);
|
||||||
TelcomStopSound(TCSND_STARTUP);
|
TelcomStopSound(TCSND_STARTUP);
|
||||||
|
|
||||||
//#ifdef DEMO
|
// #ifdef DEMO
|
||||||
// Telcom_system.current_status = TS_MISSION;
|
// Telcom_system.current_status = TS_MISSION;
|
||||||
//#endif
|
// #endif
|
||||||
|
|
||||||
// initialize this to -1 so we get events right away
|
// initialize this to -1 so we get events right away
|
||||||
Telcom_mouse_last_effect = -1;
|
Telcom_mouse_last_effect = -1;
|
||||||
@ -1211,7 +1211,7 @@ bool TelComMainMenu(tTelComInfo *tcs) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TCCARGO:
|
case TCCARGO:
|
||||||
//#if (defined DEMO)||(defined OEM)
|
// #if (defined DEMO)||(defined OEM)
|
||||||
MMButtons[mm].enabled = false;
|
MMButtons[mm].enabled = false;
|
||||||
MMButtons[mm].system = TS_OFF;
|
MMButtons[mm].system = TS_OFF;
|
||||||
/*
|
/*
|
||||||
|
@ -509,7 +509,7 @@ void TCAMRenderRoom(int roomnum) {
|
|||||||
|
|
||||||
int r = (texel >> 10) & 0x1f;
|
int r = (texel >> 10) & 0x1f;
|
||||||
int g = (texel >> 5) & 0x1f;
|
int g = (texel >> 5) & 0x1f;
|
||||||
int b = (texel)&0x1f;
|
int b = (texel) & 0x1f;
|
||||||
|
|
||||||
p->p3_r = lm_red[r];
|
p->p3_r = lm_red[r];
|
||||||
p->p3_g = lm_green[g];
|
p->p3_g = lm_green[g];
|
||||||
|
@ -422,9 +422,9 @@ extern float AI_last_time_room_noise_alert_time[MAX_ROOMS + 8];
|
|||||||
#define AIC_STATIC 0
|
#define AIC_STATIC 0
|
||||||
#define AIC_PURE_PATH 1
|
#define AIC_PURE_PATH 1
|
||||||
#define AIC_AIS_FULL 2
|
#define AIC_AIS_FULL 2
|
||||||
//#define AIC_DYNAMIC 3
|
// #define AIC_DYNAMIC 3
|
||||||
//#define AIC_AIS_MOVEMENT 4
|
// #define AIC_AIS_MOVEMENT 4
|
||||||
//#define AIC_AIS_FIRING 5
|
// #define AIC_AIS_FIRING 5
|
||||||
|
|
||||||
// AI Action -- What is it doing?
|
// AI Action -- What is it doing?
|
||||||
|
|
||||||
|
@ -68,12 +68,12 @@ void ait_terrain_clean() {
|
|||||||
ai_terrain_check_list[CELLNUM(ai_segs_checked[i]) >> 3] = 0;
|
ai_terrain_check_list[CELLNUM(ai_segs_checked[i]) >> 3] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef _DEBUG
|
// #ifdef _DEBUG
|
||||||
// for(i = 0; i < ((TERRAIN_WIDTH*TERRAIN_DEPTH)>>3)+1; i++)
|
// for(i = 0; i < ((TERRAIN_WIDTH*TERRAIN_DEPTH)>>3)+1; i++)
|
||||||
// {
|
// {
|
||||||
// ASSERT(ai_terrain_check_list[i] == 0);
|
// ASSERT(ai_terrain_check_list[i] == 0);
|
||||||
// }
|
// }
|
||||||
//#endif
|
// #endif
|
||||||
|
|
||||||
ai_num_segs_checked = 0;
|
ai_num_segs_checked = 0;
|
||||||
}
|
}
|
||||||
|
@ -1205,8 +1205,9 @@ struct hud_menu {
|
|||||||
sel = (stat & (STAT_SHIELDS + STAT_ENERGY)) ? 1 : (grstat & (STAT_SHIELDS + STAT_ENERGY)) ? 2 : 0;
|
sel = (stat & (STAT_SHIELDS + STAT_ENERGY)) ? 1 : (grstat & (STAT_SHIELDS + STAT_ENERGY)) ? 2 : 0;
|
||||||
y = add_hud_option(TXT_HUDSHIELDENERGY, &shield_energy, y, sel, true);
|
y = add_hud_option(TXT_HUDSHIELDENERGY, &shield_energy, y, sel, true);
|
||||||
|
|
||||||
sel = (stat & (STAT_PRIMARYLOAD + STAT_SECONDARYLOAD)) ? 1
|
sel = (stat & (STAT_PRIMARYLOAD + STAT_SECONDARYLOAD)) ? 1
|
||||||
: (grstat & (STAT_PRIMARYLOAD + STAT_SECONDARYLOAD)) ? 2 : 0;
|
: (grstat & (STAT_PRIMARYLOAD + STAT_SECONDARYLOAD)) ? 2
|
||||||
|
: 0;
|
||||||
y = add_hud_option(TXT_HUDWEAPONS, &weapon_loads, y, sel, true);
|
y = add_hud_option(TXT_HUDWEAPONS, &weapon_loads, y, sel, true);
|
||||||
|
|
||||||
sel = (stat & STAT_AFTERBURN) ? 1 : (grstat & STAT_AFTERBURN) ? 2 : 0;
|
sel = (stat & STAT_AFTERBURN) ? 1 : (grstat & STAT_AFTERBURN) ? 2 : 0;
|
||||||
|
@ -408,7 +408,7 @@ void Credits_Display(void) {
|
|||||||
D3MusicStop();
|
D3MusicStop();
|
||||||
ddio_KeyFlush();
|
ddio_KeyFlush();
|
||||||
// ddio_MouseReset(); // -mouse shouldn't be reset. ui system gets hosed
|
// ddio_MouseReset(); // -mouse shouldn't be reset. ui system gets hosed
|
||||||
//unfortunately under NT.
|
// unfortunately under NT.
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1433,8 +1433,9 @@ void CtlConfig(int mode) {
|
|||||||
cfg_cb_data.wpncfg = &wpncfg;
|
cfg_cb_data.wpncfg = &wpncfg;
|
||||||
cfg_cb_data.curcfg = NULL;
|
cfg_cb_data.curcfg = NULL;
|
||||||
menu.AddSimpleOption(UID_CANCEL, TXT_GEN_EXIT);
|
menu.AddSimpleOption(UID_CANCEL, TXT_GEN_EXIT);
|
||||||
menu.SetCurrentOption((mode == CTLCONFIG_WPNSEL) ? IDV_WPNSEL
|
menu.SetCurrentOption((mode == CTLCONFIG_WPNSEL) ? IDV_WPNSEL
|
||||||
: (mode == CTLCONFIG_CONTROLLER) ? IDV_CCONFIG : IDV_KCONFIG);
|
: (mode == CTLCONFIG_CONTROLLER) ? IDV_CCONFIG
|
||||||
|
: IDV_KCONFIG);
|
||||||
menu.SetOnOptionSwitchCB(CtlConfigSwitchCB, (void *)&cfg_cb_data);
|
menu.SetOnOptionSwitchCB(CtlConfigSwitchCB, (void *)&cfg_cb_data);
|
||||||
|
|
||||||
// if(mode==CTLCONFIG_CONTROLLER) {
|
// if(mode==CTLCONFIG_CONTROLLER) {
|
||||||
|
@ -1455,10 +1455,10 @@ void FindHitpointUV(float *u, float *v, vector *point, room *rp, int facenum);
|
|||||||
|
|
||||||
// Break the specified (glass) face into shards
|
// Break the specified (glass) face into shards
|
||||||
// Parameters: rp, facenum - the face to break. The face must be a portal face.
|
// Parameters: rp, facenum - the face to break. The face must be a portal face.
|
||||||
// hitpnt - the point on the face where the face shatters. If NULL, uses center point
|
// hitpnt - the point on the face where the face shatters. If NULL, uses center
|
||||||
//of
|
// point of
|
||||||
// face hitvec - the direction in which the thing that's breaking the glass is moving. If
|
// face hitvec - the direction in which the thing that's breaking the glass is
|
||||||
// NULL, uses the negative of the surface normal
|
// moving. If NULL, uses the negative of the surface normal
|
||||||
void BreakGlassFace(room *rp, int facenum, vector *hitpnt, vector *hitvec) {
|
void BreakGlassFace(room *rp, int facenum, vector *hitpnt, vector *hitvec) {
|
||||||
int roomnum;
|
int roomnum;
|
||||||
vector t_hitpnt, t_hitvec;
|
vector t_hitpnt, t_hitvec;
|
||||||
|
@ -135,10 +135,10 @@ void UnshakePlayer();
|
|||||||
|
|
||||||
// Break the specified (glass) face into shards
|
// Break the specified (glass) face into shards
|
||||||
// Parameters: rp, facenum - the face to break
|
// Parameters: rp, facenum - the face to break
|
||||||
// hitpnt - the point on the face where the face shatters. If NULL, uses center point
|
// hitpnt - the point on the face where the face shatters. If NULL, uses center
|
||||||
//of
|
// point of
|
||||||
// face hitvec - the direction in which the thing that's breaking the glass is moving. If
|
// face hitvec - the direction in which the thing that's breaking the glass is
|
||||||
// NULL, uses the negative of the surface normal
|
// moving. If NULL, uses the negative of the surface normal
|
||||||
void BreakGlassFace(room *rp, int facenum, vector *hitpnt = NULL, vector *hitvec = NULL);
|
void BreakGlassFace(room *rp, int facenum, vector *hitpnt = NULL, vector *hitvec = NULL);
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -1400,10 +1400,10 @@ void DemoReadCollideGenericWeapon(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool LoadDemoDialog() {
|
bool LoadDemoDialog() {
|
||||||
//#ifdef DEMO
|
// #ifdef DEMO
|
||||||
// DoMessageBox(TXT_ERROR, TXT_WRONGVERSION, MSGBOX_OK);
|
// DoMessageBox(TXT_ERROR, TXT_WRONGVERSION, MSGBOX_OK);
|
||||||
// return false;
|
// return false;
|
||||||
//#else
|
// #else
|
||||||
|
|
||||||
char file[_MAX_PATH * 2];
|
char file[_MAX_PATH * 2];
|
||||||
|
|
||||||
@ -1414,7 +1414,7 @@ bool LoadDemoDialog() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
//#endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function aborts the demo recording or playback, regardless of the state
|
// This function aborts the demo recording or playback, regardless of the state
|
||||||
|
@ -419,7 +419,7 @@ char Descent3_temp_directory[_MAX_PATH]; // temp directory to put temp files
|
|||||||
// Descent3: Choke 1
|
// Descent3: Choke 1
|
||||||
// Initializes game elements and invokes the MainLoop
|
// Initializes game elements and invokes the MainLoop
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
//#define BETA
|
// #define BETA
|
||||||
|
|
||||||
#if (defined(OEM) || defined(DEMO))
|
#if (defined(OEM) || defined(DEMO))
|
||||||
void ShowStaticScreen(char *bitmap_filename, bool timed = false, float delay_time = 0.0f);
|
void ShowStaticScreen(char *bitmap_filename, bool timed = false, float delay_time = 0.0f);
|
||||||
@ -568,7 +568,7 @@ void Descent3() {
|
|||||||
// Otherwise this should be called from the main function.
|
// Otherwise this should be called from the main function.
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
//#ifdef GAMEGAUGE
|
// #ifdef GAMEGAUGE
|
||||||
extern int frames_one_second;
|
extern int frames_one_second;
|
||||||
extern int min_one_second;
|
extern int min_one_second;
|
||||||
extern int max_one_second;
|
extern int max_one_second;
|
||||||
@ -577,7 +577,7 @@ extern int gamegauge_total_frames;
|
|||||||
extern float gamegauge_total_time;
|
extern float gamegauge_total_time;
|
||||||
extern short gamegauge_fpslog[GAMEGAUGE_MAX_LOG];
|
extern short gamegauge_fpslog[GAMEGAUGE_MAX_LOG];
|
||||||
|
|
||||||
//#endif
|
// #endif
|
||||||
|
|
||||||
void MainLoop() {
|
void MainLoop() {
|
||||||
int exit_game = 0;
|
int exit_game = 0;
|
||||||
@ -610,7 +610,7 @@ void MainLoop() {
|
|||||||
Credits_Display();
|
Credits_Display();
|
||||||
Function_mode = MENU_MODE;
|
Function_mode = MENU_MODE;
|
||||||
break;
|
break;
|
||||||
//#ifdef GAMEGAUGE
|
// #ifdef GAMEGAUGE
|
||||||
case GAMEGAUGE_MODE: {
|
case GAMEGAUGE_MODE: {
|
||||||
int c;
|
int c;
|
||||||
for (c = 0; c < GAMEGAUGE_MAX_LOG; c++)
|
for (c = 0; c < GAMEGAUGE_MAX_LOG; c++)
|
||||||
@ -619,7 +619,7 @@ void MainLoop() {
|
|||||||
PlayGame();
|
PlayGame();
|
||||||
// exit_game = 1;
|
// exit_game = 1;
|
||||||
} break;
|
} break;
|
||||||
//#endif
|
// #endif
|
||||||
#ifdef EDITOR
|
#ifdef EDITOR
|
||||||
case EDITOR_GAME_MODE: // run level and then instead of menus, go to editor.
|
case EDITOR_GAME_MODE: // run level and then instead of menus, go to editor.
|
||||||
QuickPlayGame();
|
QuickPlayGame();
|
||||||
|
@ -9,7 +9,7 @@ extern ubyte ingame_difficulty;
|
|||||||
|
|
||||||
// DAJ static global instead of subroutine call for speed
|
// DAJ static global instead of subroutine call for speed
|
||||||
#define DIFF_LEVEL (((Game_mode & GM_MULTI)) ? Netgame.difficulty : ingame_difficulty)
|
#define DIFF_LEVEL (((Game_mode & GM_MULTI)) ? Netgame.difficulty : ingame_difficulty)
|
||||||
//#define DIFF_LEVEL (((Game_mode & GM_MULTI))?Netgame.difficulty:dCurrentPilotDifficulty())
|
// #define DIFF_LEVEL (((Game_mode & GM_MULTI))?Netgame.difficulty:dCurrentPilotDifficulty())
|
||||||
|
|
||||||
extern float Diff_ai_dodge_percent[5]; //
|
extern float Diff_ai_dodge_percent[5]; //
|
||||||
extern float Diff_ai_dodge_speed[5]; //
|
extern float Diff_ai_dodge_speed[5]; //
|
||||||
|
@ -928,14 +928,14 @@ void SetScreenMode(int sm, bool force_res_change) {
|
|||||||
rend_initted = 0;
|
rend_initted = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//#ifdef RELEASE
|
// #ifdef RELEASE
|
||||||
// else if (sm == SM_CINEMATIC && (Renderer_type == RENDERER_GLIDE) ) {
|
// else if (sm == SM_CINEMATIC && (Renderer_type == RENDERER_GLIDE) ) {
|
||||||
// if (rend_initted) {
|
// if (rend_initted) {
|
||||||
// rend_Close();
|
// rend_Close();
|
||||||
// rend_initted = 0;
|
// rend_initted = 0;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
//#endif
|
// #endif
|
||||||
else {
|
else {
|
||||||
int scr_width, scr_height, scr_bitdepth;
|
int scr_width, scr_height, scr_bitdepth;
|
||||||
|
|
||||||
|
@ -256,8 +256,8 @@ extern renderer_preferred_state Render_preferred_state;
|
|||||||
extern int Render_preferred_bitdepth;
|
extern int Render_preferred_bitdepth;
|
||||||
|
|
||||||
#define GM_SINGLE 1 // Single player game.
|
#define GM_SINGLE 1 // Single player game.
|
||||||
//#define GM_SERIAL 2 // You are in serial mode (Jason doesn't
|
// #define GM_SERIAL 2 // You are in serial mode (Jason
|
||||||
//like this.)
|
// doesn't like this.)
|
||||||
#define GM_NETWORK 4 // You are in network mode
|
#define GM_NETWORK 4 // You are in network mode
|
||||||
#define GM_MODEM 32 // You are in a modem (serial) game
|
#define GM_MODEM 32 // You are in a modem (serial) game
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
#include "gameloop.h"
|
#include "gameloop.h"
|
||||||
#include "spew.h"
|
#include "spew.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
//#include <malloc.h>
|
// #include <malloc.h>
|
||||||
#include "mem.h"
|
#include "mem.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
|
|
||||||
|
@ -1418,9 +1418,9 @@ void SetCurrentLevel(int level) {
|
|||||||
|
|
||||||
void StartLevelSounds();
|
void StartLevelSounds();
|
||||||
|
|
||||||
//#ifdef GAMEGAUGE
|
// #ifdef GAMEGAUGE
|
||||||
extern float gamegauge_start_time;
|
extern float gamegauge_start_time;
|
||||||
//#endif
|
// #endif
|
||||||
|
|
||||||
// Get rid of any viewer objects in the level
|
// Get rid of any viewer objects in the level
|
||||||
void ClearViewerObjects() {
|
void ClearViewerObjects() {
|
||||||
@ -1620,9 +1620,9 @@ void StartLevel() {
|
|||||||
Gametime = 0.0f;
|
Gametime = 0.0f;
|
||||||
// Start the clock
|
// Start the clock
|
||||||
InitFrameTime();
|
InitFrameTime();
|
||||||
//#ifdef GAMEGAUGE
|
// #ifdef GAMEGAUGE
|
||||||
gamegauge_start_time = timer_GetTime();
|
gamegauge_start_time = timer_GetTime();
|
||||||
//#endif
|
// #endif
|
||||||
LoadLevelProgress(LOAD_PROGRESS_DONE, 0);
|
LoadLevelProgress(LOAD_PROGRESS_DONE, 0);
|
||||||
|
|
||||||
#ifdef MACINTOSH
|
#ifdef MACINTOSH
|
||||||
@ -1920,8 +1920,8 @@ void EndLevel(int state) {
|
|||||||
|
|
||||||
// report the information to the pilot's mission data
|
// report the information to the pilot's mission data
|
||||||
CurrentPilotUpdateMissionStatus();
|
CurrentPilotUpdateMissionStatus();
|
||||||
// Sound_system.StopAllSounds(); -- moved to below because bug was reported that sounds were playing
|
// Sound_system.StopAllSounds(); -- moved to below because bug was reported that sounds were
|
||||||
//in performance screen
|
// playing in performance screen
|
||||||
|
|
||||||
// save our shields (in case this call is due to starting a new level
|
// save our shields (in case this call is due to starting a new level
|
||||||
// in InitPlayerNewLevel, we'll determine if we should restore them
|
// in InitPlayerNewLevel, we'll determine if we should restore them
|
||||||
@ -2084,15 +2084,15 @@ void RunGameMenu() {
|
|||||||
// #endif
|
// #endif
|
||||||
} break;
|
} break;
|
||||||
case GAME_TELCOM_CARGO: {
|
case GAME_TELCOM_CARGO: {
|
||||||
//#ifndef DEMO
|
// #ifndef DEMO
|
||||||
DoWaitPopup(true, TXT_TELCOMLOAD);
|
DoWaitPopup(true, TXT_TELCOMLOAD);
|
||||||
ui_ShowCursor();
|
ui_ShowCursor();
|
||||||
TelComShow(TS_CARGO);
|
TelComShow(TS_CARGO);
|
||||||
ui_HideCursor();
|
ui_HideCursor();
|
||||||
DoWaitPopup(false);
|
DoWaitPopup(false);
|
||||||
//#else
|
// #else
|
||||||
// DoMessageBox(TXT_ERROR, TXT_WRONGVERSION, MSGBOX_OK);
|
// DoMessageBox(TXT_ERROR, TXT_WRONGVERSION, MSGBOX_OK);
|
||||||
//#endif
|
// #endif
|
||||||
} break;
|
} break;
|
||||||
case GAME_TELCOM_BRIEFINGS: {
|
case GAME_TELCOM_BRIEFINGS: {
|
||||||
DoWaitPopup(true, TXT_TELCOMLOAD);
|
DoWaitPopup(true, TXT_TELCOMLOAD);
|
||||||
@ -2102,15 +2102,15 @@ void RunGameMenu() {
|
|||||||
DoWaitPopup(false);
|
DoWaitPopup(false);
|
||||||
} break;
|
} break;
|
||||||
case GAME_TELCOM_AUTOMAP: {
|
case GAME_TELCOM_AUTOMAP: {
|
||||||
//#ifndef DEMO
|
// #ifndef DEMO
|
||||||
DoWaitPopup(true, TXT_TELCOMLOAD);
|
DoWaitPopup(true, TXT_TELCOMLOAD);
|
||||||
ui_ShowCursor();
|
ui_ShowCursor();
|
||||||
TelComShow(TS_MAP);
|
TelComShow(TS_MAP);
|
||||||
ui_HideCursor();
|
ui_HideCursor();
|
||||||
DoWaitPopup(false);
|
DoWaitPopup(false);
|
||||||
//#else
|
// #else
|
||||||
// DoMessageBox(TXT_ERROR, TXT_WRONGVERSION, MSGBOX_OK);
|
// DoMessageBox(TXT_ERROR, TXT_WRONGVERSION, MSGBOX_OK);
|
||||||
//#endif
|
// #endif
|
||||||
} break;
|
} break;
|
||||||
case GAME_PAUSE_INTERFACE:
|
case GAME_PAUSE_INTERFACE:
|
||||||
if (Game_mode & GM_MULTI)
|
if (Game_mode & GM_MULTI)
|
||||||
@ -2371,7 +2371,7 @@ extern int need_to_page_in;
|
|||||||
extern int need_to_page_num;
|
extern int need_to_page_num;
|
||||||
int paged_in_num = 0;
|
int paged_in_num = 0;
|
||||||
|
|
||||||
//#define PAGED_IN_CALC paged_in_count ? (float)paged_in_count/(float)need_to_page_in : 0.0f
|
// #define PAGED_IN_CALC paged_in_count ? (float)paged_in_count/(float)need_to_page_in : 0.0f
|
||||||
#define PAGED_IN_CALC paged_in_num ? (float)paged_in_num / (float)need_to_page_num : 0.0f
|
#define PAGED_IN_CALC paged_in_num ? (float)paged_in_num / (float)need_to_page_num : 0.0f
|
||||||
void PageInShip(int id) {
|
void PageInShip(int id) {
|
||||||
int i, t;
|
int i, t;
|
||||||
|
@ -767,7 +767,7 @@ void BuildTextureBumpmaps(int texhandle) {
|
|||||||
|
|
||||||
int red = ((color >> 10) & 0x1f) << 3;
|
int red = ((color >> 10) & 0x1f) << 3;
|
||||||
int green = ((color >> 5) & 0x1f) << 3;
|
int green = ((color >> 5) & 0x1f) << 3;
|
||||||
int blue = ((color)&0x1f) << 3;
|
int blue = ((color) & 0x1f) << 3;
|
||||||
|
|
||||||
buffer[i * w + t] = (sbyte)(0.29 * red + 0.60 * green + 0.11 * blue);
|
buffer[i * w + t] = (sbyte)(0.29 * red + 0.60 * green + 0.11 * blue);
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ void makecorner(int corner_bmp, int back_bmp, char *tmap, int l, int t, int r, i
|
|||||||
ushort menutga_translate_pixel(int pixel, char *alpha_value) {
|
ushort menutga_translate_pixel(int pixel, char *alpha_value) {
|
||||||
int red = ((pixel >> 16) & 0xFF);
|
int red = ((pixel >> 16) & 0xFF);
|
||||||
int green = ((pixel >> 8) & 0xFF);
|
int green = ((pixel >> 8) & 0xFF);
|
||||||
int blue = ((pixel)&0xFF);
|
int blue = ((pixel) & 0xFF);
|
||||||
int alpha = ((pixel >> 24) & 0xFF);
|
int alpha = ((pixel >> 24) & 0xFF);
|
||||||
|
|
||||||
*alpha_value = alpha;
|
*alpha_value = alpha;
|
||||||
|
@ -315,8 +315,8 @@ extern float Hud_aspect_x;
|
|||||||
extern float Hud_aspect_y;
|
extern float Hud_aspect_y;
|
||||||
|
|
||||||
// normalize hud coordinates
|
// normalize hud coordinates
|
||||||
#define HUD_X(_x) ((float)(_x)*Hud_aspect_x)
|
#define HUD_X(_x) ((float)(_x) * Hud_aspect_x)
|
||||||
#define HUD_Y(_y) ((float)(_y)*Hud_aspect_y)
|
#define HUD_Y(_y) ((float)(_y) * Hud_aspect_y)
|
||||||
|
|
||||||
// number of shield frames in gauge
|
// number of shield frames in gauge
|
||||||
#define NUM_SHIELD_GAUGE_FRAMES 5
|
#define NUM_SHIELD_GAUGE_FRAMES 5
|
||||||
|
@ -960,7 +960,7 @@
|
|||||||
#include "d3music.h"
|
#include "d3music.h"
|
||||||
#include "PilotPicsAPI.h"
|
#include "PilotPicsAPI.h"
|
||||||
#include "osiris_dll.h"
|
#include "osiris_dll.h"
|
||||||
//#include "gamespy.h"
|
// #include "gamespy.h"
|
||||||
#include "mem.h"
|
#include "mem.h"
|
||||||
#include "multi.h"
|
#include "multi.h"
|
||||||
#include "marker.h"
|
#include "marker.h"
|
||||||
@ -970,7 +970,7 @@
|
|||||||
#include "vibeinterface.h"
|
#include "vibeinterface.h"
|
||||||
|
|
||||||
// Uncomment this for all non-US versions!!
|
// Uncomment this for all non-US versions!!
|
||||||
//#define LASERLOCK
|
// #define LASERLOCK
|
||||||
|
|
||||||
// Uncomment this to allow all languages
|
// Uncomment this to allow all languages
|
||||||
#define ALLOW_ALL_LANG 1
|
#define ALLOW_ALL_LANG 1
|
||||||
@ -2020,7 +2020,7 @@ void ShowStaticScreen(char *bitmap_filename, bool timed = false, float delay_tim
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void IntroScreen() {
|
void IntroScreen() {
|
||||||
//#if (defined(OEM) || defined(DEMO) )
|
// #if (defined(OEM) || defined(DEMO) )
|
||||||
#ifdef DEMO
|
#ifdef DEMO
|
||||||
#ifdef MACINTOSH
|
#ifdef MACINTOSH
|
||||||
ShowStaticScreen("graphsim.ogf", true, 3.0);
|
ShowStaticScreen("graphsim.ogf", true, 3.0);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "list.h"
|
#include "list.h"
|
||||||
//#include <malloc.h>
|
// #include <malloc.h>
|
||||||
#include "mem.h"
|
#include "mem.h"
|
||||||
|
|
||||||
// Allocates space for a new list node, returning the pointer to it
|
// Allocates space for a new list node, returning the pointer to it
|
||||||
|
@ -124,7 +124,7 @@ static volatile char already_tried_signal_cleanup = 0;
|
|||||||
#define GAME_VERS_EXT ""
|
#define GAME_VERS_EXT ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#define DEDICATED
|
// #define DEDICATED
|
||||||
namespace {
|
namespace {
|
||||||
extern "C" {
|
extern "C" {
|
||||||
char game_version_buffer[150];
|
char game_version_buffer[150];
|
||||||
|
@ -1702,8 +1702,8 @@ int LGSSnapshot(CFILE *fp) {
|
|||||||
//@@ PageInVClip (Weapons[op->id].fire_image_handle);
|
//@@ PageInVClip (Weapons[op->id].fire_image_handle);
|
||||||
//@@ break;
|
//@@ break;
|
||||||
//@@ }
|
//@@ }
|
||||||
//@@ case RT_POLYOBJ: // be sure to use translated handles for polyobjs
|
//@@ case RT_POLYOBJ: // be sure to use translated handles for
|
||||||
//and textures
|
// polyobjs and textures
|
||||||
//@@ gs_ReadShort(fp, sindex);
|
//@@ gs_ReadShort(fp, sindex);
|
||||||
//@@ new_model = (sindex > -1) ? gs_Xlates->model_handles[sindex] : -1;
|
//@@ new_model = (sindex > -1) ? gs_Xlates->model_handles[sindex] : -1;
|
||||||
//@@ if (new_model != pobji->model_num)
|
//@@ if (new_model != pobji->model_num)
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
#ifdef USE_PROFILER
|
#ifdef USE_PROFILER
|
||||||
#include <profiler.h>
|
#include <profiler.h>
|
||||||
//#include "SpotlightAPI.h"
|
// #include "SpotlightAPI.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef NEEDED
|
#ifdef NEEDED
|
||||||
// =========================
|
// =========================
|
||||||
@ -320,7 +320,7 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
Descent = d3;
|
Descent = d3;
|
||||||
|
|
||||||
//¥ Initialize Metrowerks Code Profiler
|
// ¥ Initialize Metrowerks Code Profiler
|
||||||
bool profilerInitted = false;
|
bool profilerInitted = false;
|
||||||
#ifdef USE_PROFILER
|
#ifdef USE_PROFILER
|
||||||
if (!ProfilerInit(collectDetailed, PPCTimeBase, 1024, 50)) {
|
if (!ProfilerInit(collectDetailed, PPCTimeBase, 1024, 50)) {
|
||||||
@ -332,13 +332,13 @@ int main(int argc, char *argv[]) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//¥ Here we go!!!
|
// ¥ Here we go!!!
|
||||||
PreInitD3Systems();
|
PreInitD3Systems();
|
||||||
|
|
||||||
d3->init();
|
d3->init();
|
||||||
d3->run();
|
d3->run();
|
||||||
|
|
||||||
//¥ Close the Metrowerks Code Profiler
|
// ¥ Close the Metrowerks Code Profiler
|
||||||
#ifdef USE_PROFILER
|
#ifdef USE_PROFILER
|
||||||
if (profilerInitted) {
|
if (profilerInitted) {
|
||||||
mprintf((2, "Dumping profiler results and closing profiler\n"));
|
mprintf((2, "Dumping profiler results and closing profiler\n"));
|
||||||
|
@ -725,9 +725,9 @@ int MainMenu() {
|
|||||||
main_menu.Create();
|
main_menu.Create();
|
||||||
main_menu.AddItem(IDV_NEWGAME, KEY_N, TXT_MENUNEWGAME, MM_STARTMENU_TYPE);
|
main_menu.AddItem(IDV_NEWGAME, KEY_N, TXT_MENUNEWGAME, MM_STARTMENU_TYPE);
|
||||||
main_menu.AddItem(IDV_LOADGAME, KEY_L, TXT_LOADGAME);
|
main_menu.AddItem(IDV_LOADGAME, KEY_L, TXT_LOADGAME);
|
||||||
//#ifndef DEMO
|
// #ifndef DEMO
|
||||||
main_menu.AddItem(IDV_PLAYDEMO, KEY_D, TXT_VIEWDEMO);
|
main_menu.AddItem(IDV_PLAYDEMO, KEY_D, TXT_VIEWDEMO);
|
||||||
//#endif
|
// #endif
|
||||||
main_menu.AddItem(IDV_OPTIONS, KEY_O, TXT_MENUOPTIONS);
|
main_menu.AddItem(IDV_OPTIONS, KEY_O, TXT_MENUOPTIONS);
|
||||||
main_menu.AddItem(IDV_PILOT, KEY_P, TXT_MENUPILOTS);
|
main_menu.AddItem(IDV_PILOT, KEY_P, TXT_MENUPILOTS);
|
||||||
main_menu.AddItem(IDV_MULTIPLAYER, KEY_M, TXT_MENUMULTIPLAYER);
|
main_menu.AddItem(IDV_MULTIPLAYER, KEY_M, TXT_MENUMULTIPLAYER);
|
||||||
@ -1230,7 +1230,7 @@ bool MenuNewGame() {
|
|||||||
i = generate_mission_listbox(msn_lb, n_missions, filelist, LocalLevelsDir, "*.msn");
|
i = generate_mission_listbox(msn_lb, n_missions, filelist, LocalLevelsDir, "*.msn");
|
||||||
#endif
|
#endif
|
||||||
i += generate_mission_listbox(msn_lb, n_missions - i, filelist + i, D3MissionsDir, "*.mn3");
|
i += generate_mission_listbox(msn_lb, n_missions - i, filelist + i, D3MissionsDir, "*.mn3");
|
||||||
//#ifdef RELEASE
|
// #ifdef RELEASE
|
||||||
int k;
|
int k;
|
||||||
for (k = 0; k < n_missions; k++) {
|
for (k = 0; k < n_missions; k++) {
|
||||||
if (!filelist[k])
|
if (!filelist[k])
|
||||||
@ -1249,7 +1249,7 @@ bool MenuNewGame() {
|
|||||||
msn_lb->AddItem(TXT_MAINMISSION);
|
msn_lb->AddItem(TXT_MAINMISSION);
|
||||||
n_missions++;
|
n_missions++;
|
||||||
}
|
}
|
||||||
//#endif
|
// #endif
|
||||||
#else
|
#else
|
||||||
#define OEM_MISSION_NAME "Descent 3: Sol Ascent"
|
#define OEM_MISSION_NAME "Descent 3: Sol Ascent"
|
||||||
#define OEM_TRAINING_NAME "Pilot Training "
|
#define OEM_TRAINING_NAME "Pilot Training "
|
||||||
|
@ -113,7 +113,7 @@
|
|||||||
#include "ddio.h"
|
#include "ddio.h"
|
||||||
#include "stringtable.h"
|
#include "stringtable.h"
|
||||||
#include "multi_dll_mgr.h"
|
#include "multi_dll_mgr.h"
|
||||||
//#include "inetgetfile.h"
|
// #include "inetgetfile.h"
|
||||||
#include "grtext.h"
|
#include "grtext.h"
|
||||||
#include "Mission.h"
|
#include "Mission.h"
|
||||||
#include "mission_download.h"
|
#include "mission_download.h"
|
||||||
|
@ -101,7 +101,7 @@
|
|||||||
#include "d3music.h"
|
#include "d3music.h"
|
||||||
|
|
||||||
#include "ddio.h"
|
#include "ddio.h"
|
||||||
//#include <malloc.h>
|
// #include <malloc.h>
|
||||||
#include "mem.h"
|
#include "mem.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -359,9 +359,10 @@ bool mmInterface::AddItem(int id, int key, const char *text, int type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_menuitems[m_nmenu_items].Create(id, key, MMITEM_X, MMITEM_Y + (m_nmenu_items * 20), text,
|
m_menuitems[m_nmenu_items].Create(id, key, MMITEM_X, MMITEM_Y + (m_nmenu_items * 20), text,
|
||||||
(type == 1) ? UIF_GROUP_START
|
(type == 1) ? UIF_GROUP_START
|
||||||
: (type == 2) ? UIF_GROUP_END
|
: (type == 2) ? UIF_GROUP_END
|
||||||
: (type == 3) ? (UIF_GROUP_START + UIF_GROUP_END) : 0);
|
: (type == 3) ? (UIF_GROUP_START + UIF_GROUP_END)
|
||||||
|
: 0);
|
||||||
m_nmenu_items++;
|
m_nmenu_items++;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -1665,7 +1665,7 @@
|
|||||||
#include "BOA.h"
|
#include "BOA.h"
|
||||||
#include "attach.h"
|
#include "attach.h"
|
||||||
#include "mission_download.h"
|
#include "mission_download.h"
|
||||||
//#include "gamespy.h"
|
// #include "gamespy.h"
|
||||||
#include "multi_world_state.h"
|
#include "multi_world_state.h"
|
||||||
#include "ObjScript.h"
|
#include "ObjScript.h"
|
||||||
#include "audiotaunts.h"
|
#include "audiotaunts.h"
|
||||||
@ -1702,7 +1702,7 @@ player_pos_suppress Player_pos_fix[MAX_PLAYERS];
|
|||||||
|
|
||||||
// Define this if you want to have secondaries be sent as reliable packets
|
// Define this if you want to have secondaries be sent as reliable packets
|
||||||
//(not recommended - talk to Jason)
|
//(not recommended - talk to Jason)
|
||||||
//#define RELIABLE_SECONDARIES
|
// #define RELIABLE_SECONDARIES
|
||||||
|
|
||||||
// If this is true, PXO games won't save the kills, deaths, etc.
|
// If this is true, PXO games won't save the kills, deaths, etc.
|
||||||
bool Multi_no_stats_saved = false;
|
bool Multi_no_stats_saved = false;
|
||||||
@ -9505,7 +9505,7 @@ void MultiDoMSafePowerup(ubyte *data);
|
|||||||
if (sequence < s || sequence > e) \
|
if (sequence < s || sequence > e) \
|
||||||
return; \
|
return; \
|
||||||
}
|
}
|
||||||
//#define ACCEPT_CONDITION(s,e)
|
// #define ACCEPT_CONDITION(s,e)
|
||||||
|
|
||||||
// Takes the individual packet types and passes their data to the appropriate routines
|
// Takes the individual packet types and passes their data to the appropriate routines
|
||||||
void MultiProcessData(ubyte *data, int len, int slot, network_address *from_addr) {
|
void MultiProcessData(ubyte *data, int len, int slot, network_address *from_addr) {
|
||||||
|
@ -492,10 +492,10 @@ extern bool Multi_bail_ui_menu;
|
|||||||
#elif defined(OEM)
|
#elif defined(OEM)
|
||||||
#define MULTI_VERSION 5
|
#define MULTI_VERSION 5
|
||||||
#else
|
#else
|
||||||
//#define MULTI_VERSION 4
|
// #define MULTI_VERSION 4
|
||||||
// Patch 1.1!
|
// Patch 1.1!
|
||||||
//#define MULTI_VERSION 6
|
// #define MULTI_VERSION 6
|
||||||
// Patch 1.3
|
// Patch 1.3
|
||||||
#define MULTI_VERSION 10
|
#define MULTI_VERSION 10
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@
|
|||||||
#include "game.h"
|
#include "game.h"
|
||||||
#include "ddio.h"
|
#include "ddio.h"
|
||||||
#include "Mission.h"
|
#include "Mission.h"
|
||||||
//#include "gametrack.h"
|
// #include "gametrack.h"
|
||||||
#include "stringtable.h"
|
#include "stringtable.h"
|
||||||
#include "pilot.h"
|
#include "pilot.h"
|
||||||
#include "ship.h"
|
#include "ship.h"
|
||||||
@ -252,7 +252,7 @@
|
|||||||
#include "multi_dll_mgr.h"
|
#include "multi_dll_mgr.h"
|
||||||
|
|
||||||
#include "LoadLevel.h"
|
#include "LoadLevel.h"
|
||||||
//#define USE_DIRECTPLAY
|
// #define USE_DIRECTPLAY
|
||||||
|
|
||||||
#ifdef USE_DIRECTPLAY
|
#ifdef USE_DIRECTPLAY
|
||||||
#include "directplay.h"
|
#include "directplay.h"
|
||||||
|
@ -302,7 +302,7 @@
|
|||||||
#include "module.h"
|
#include "module.h"
|
||||||
#include "mem.h"
|
#include "mem.h"
|
||||||
#include "args.h"
|
#include "args.h"
|
||||||
//#define USE_DIRECTPLAY
|
// #define USE_DIRECTPLAY
|
||||||
|
|
||||||
#ifdef USE_DIRECTPLAY
|
#ifdef USE_DIRECTPLAY
|
||||||
#include "directplay.h"
|
#include "directplay.h"
|
||||||
|
@ -621,7 +621,7 @@
|
|||||||
#include "game2dll.h"
|
#include "game2dll.h"
|
||||||
#include "stringtable.h"
|
#include "stringtable.h"
|
||||||
|
|
||||||
//#define USE_DIRECTPLAY
|
// #define USE_DIRECTPLAY
|
||||||
|
|
||||||
#ifdef USE_DIRECTPLAY
|
#ifdef USE_DIRECTPLAY
|
||||||
#include "directplay.h"
|
#include "directplay.h"
|
||||||
@ -629,7 +629,7 @@
|
|||||||
|
|
||||||
#include "dedicated_server.h"
|
#include "dedicated_server.h"
|
||||||
#include "damage.h"
|
#include "damage.h"
|
||||||
//#include "gamespy.h"
|
// #include "gamespy.h"
|
||||||
#include "multi_world_state.h"
|
#include "multi_world_state.h"
|
||||||
#include "ObjScript.h"
|
#include "ObjScript.h"
|
||||||
#include "marker.h"
|
#include "marker.h"
|
||||||
@ -2981,9 +2981,9 @@ void GetNewRankings(object *killed, object *killer) {
|
|||||||
float killed_rank;
|
float killed_rank;
|
||||||
float killer_rank;
|
float killer_rank;
|
||||||
|
|
||||||
//#ifdef OEM
|
// #ifdef OEM
|
||||||
// return;
|
// return;
|
||||||
//#endif
|
// #endif
|
||||||
|
|
||||||
#ifdef DEMO
|
#ifdef DEMO
|
||||||
return;
|
return;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "pstypes.h"
|
#include "pstypes.h"
|
||||||
#include "multi.h"
|
#include "multi.h"
|
||||||
#include "game2dll.h"
|
#include "game2dll.h"
|
||||||
//#include "gametrack.h"
|
// #include "gametrack.h"
|
||||||
|
|
||||||
extern int Join_response_strings[];
|
extern int Join_response_strings[];
|
||||||
|
|
||||||
|
@ -312,7 +312,7 @@
|
|||||||
#include "ConfigItem.h"
|
#include "ConfigItem.h"
|
||||||
#include "appdatabase.h"
|
#include "appdatabase.h"
|
||||||
|
|
||||||
//#define USE_DIRECTPLAY
|
// #define USE_DIRECTPLAY
|
||||||
|
|
||||||
#ifdef USE_DIRECTPLAY
|
#ifdef USE_DIRECTPLAY
|
||||||
#include "directplay.h"
|
#include "directplay.h"
|
||||||
|
@ -1445,7 +1445,9 @@ void newuiSheet::Realize() {
|
|||||||
hot = new newuiHotspot;
|
hot = new newuiHotspot;
|
||||||
bval = desc->internal ? true : false;
|
bval = desc->internal ? true : false;
|
||||||
hot->Create(m_parent, desc->id, desc->title, gx, gy, desc->parm.s[0], desc->parm.s[1],
|
hot->Create(m_parent, desc->id, desc->title, gx, gy, desc->parm.s[0], desc->parm.s[1],
|
||||||
(bval && !hotspot_group) ? UIF_GROUP_START : (bval && hotspot_group) ? UIF_GROUP_END : 0);
|
(bval && !hotspot_group) ? UIF_GROUP_START
|
||||||
|
: (bval && hotspot_group) ? UIF_GROUP_END
|
||||||
|
: 0);
|
||||||
|
|
||||||
if (bval && !hotspot_group) {
|
if (bval && !hotspot_group) {
|
||||||
hotspot_group = true;
|
hotspot_group = true;
|
||||||
|
@ -301,7 +301,7 @@ private:
|
|||||||
newuiHotspot *hot;
|
newuiHotspot *hot;
|
||||||
} obj;
|
} obj;
|
||||||
void *internal; // internal info.
|
void *internal; // internal info.
|
||||||
} * m_gadgetlist;
|
} *m_gadgetlist;
|
||||||
|
|
||||||
UIWindow *m_parent;
|
UIWindow *m_parent;
|
||||||
int m_ngadgets, m_gadgetlimit;
|
int m_ngadgets, m_gadgetlimit;
|
||||||
|
@ -2631,12 +2631,12 @@ void ObjDoFrame(object *obj) {
|
|||||||
if (obj->flags & OF_USES_LIFELEFT)
|
if (obj->flags & OF_USES_LIFELEFT)
|
||||||
obj->lifeleft -= Frametime;
|
obj->lifeleft -= Frametime;
|
||||||
|
|
||||||
//#ifdef _DEBUG
|
// #ifdef _DEBUG
|
||||||
// if(Physics_player_verbose)
|
// if(Physics_player_verbose)
|
||||||
// {
|
// {
|
||||||
// debug_check_terrain_objects();
|
// debug_check_terrain_objects();
|
||||||
// }
|
// }
|
||||||
//#endif _DEBUG
|
// #endif _DEBUG
|
||||||
|
|
||||||
// Process the control for this object
|
// Process the control for this object
|
||||||
switch (obj->control_type) {
|
switch (obj->control_type) {
|
||||||
@ -2701,12 +2701,12 @@ void ObjDoFrame(object *obj) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef _DEBUG
|
// #ifdef _DEBUG
|
||||||
// if(Physics_player_verbose)
|
// if(Physics_player_verbose)
|
||||||
// {
|
// {
|
||||||
// debug_check_terrain_objects();
|
// debug_check_terrain_objects();
|
||||||
// }
|
// }
|
||||||
//#endif _DEBUG
|
// #endif _DEBUG
|
||||||
|
|
||||||
// Update cycled animation
|
// Update cycled animation
|
||||||
if ((obj->control_type != CT_AI) && (obj->control_type != CT_DYING_AND_AI) && (obj->control_type != CT_DEBRIS) &&
|
if ((obj->control_type != CT_AI) && (obj->control_type != CT_DYING_AND_AI) && (obj->control_type != CT_DEBRIS) &&
|
||||||
@ -2718,24 +2718,24 @@ void ObjDoFrame(object *obj) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef _DEBUG
|
// #ifdef _DEBUG
|
||||||
// if(Physics_player_verbose)
|
// if(Physics_player_verbose)
|
||||||
// {
|
// {
|
||||||
// debug_check_terrain_objects();
|
// debug_check_terrain_objects();
|
||||||
// }
|
// }
|
||||||
//#endif _DEBUG
|
// #endif _DEBUG
|
||||||
|
|
||||||
// Do freeze stuff on AI controlled robots
|
// Do freeze stuff on AI controlled robots
|
||||||
if ((obj->type == OBJ_ROBOT || obj->type == OBJ_BUILDING) && obj->control_type == CT_AI && obj->effect_info &&
|
if ((obj->type == OBJ_ROBOT || obj->type == OBJ_BUILDING) && obj->control_type == CT_AI && obj->effect_info &&
|
||||||
(obj->effect_info->type_flags & EF_FREEZE))
|
(obj->effect_info->type_flags & EF_FREEZE))
|
||||||
obj->mtype.phys_info.velocity *= obj->effect_info->freeze_scalar;
|
obj->mtype.phys_info.velocity *= obj->effect_info->freeze_scalar;
|
||||||
|
|
||||||
//#ifdef _DEBUG
|
// #ifdef _DEBUG
|
||||||
// if(Physics_player_verbose)
|
// if(Physics_player_verbose)
|
||||||
// {
|
// {
|
||||||
// debug_check_terrain_objects();
|
// debug_check_terrain_objects();
|
||||||
// }
|
// }
|
||||||
//#endif _DEBUG
|
// #endif _DEBUG
|
||||||
|
|
||||||
// Check for object dead of old age
|
// Check for object dead of old age
|
||||||
if ((obj->flags & OF_USES_LIFELEFT) && (obj->lifeleft < 0)) {
|
if ((obj->flags & OF_USES_LIFELEFT) && (obj->lifeleft < 0)) {
|
||||||
@ -2767,12 +2767,12 @@ void ObjDoFrame(object *obj) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef _DEBUG
|
// #ifdef _DEBUG
|
||||||
// if(Physics_player_verbose)
|
// if(Physics_player_verbose)
|
||||||
// {
|
// {
|
||||||
// debug_check_terrain_objects();
|
// debug_check_terrain_objects();
|
||||||
// }
|
// }
|
||||||
//#endif _DEBUG
|
// #endif _DEBUG
|
||||||
|
|
||||||
// If object is dead, don't do any more processing on it
|
// If object is dead, don't do any more processing on it
|
||||||
if (obj->flags & OF_DEAD) {
|
if (obj->flags & OF_DEAD) {
|
||||||
@ -2780,12 +2780,12 @@ void ObjDoFrame(object *obj) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef _DEBUG
|
// #ifdef _DEBUG
|
||||||
// if(Physics_player_verbose)
|
// if(Physics_player_verbose)
|
||||||
// {
|
// {
|
||||||
// debug_check_terrain_objects();
|
// debug_check_terrain_objects();
|
||||||
// }
|
// }
|
||||||
//#endif _DEBUG
|
// #endif _DEBUG
|
||||||
|
|
||||||
// Do the movement for this object
|
// Do the movement for this object
|
||||||
switch (obj->movement_type) {
|
switch (obj->movement_type) {
|
||||||
@ -2831,12 +2831,12 @@ void ObjDoFrame(object *obj) {
|
|||||||
Int3(); // unknown movement type
|
Int3(); // unknown movement type
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef _DEBUG
|
// #ifdef _DEBUG
|
||||||
// if(Physics_player_verbose)
|
// if(Physics_player_verbose)
|
||||||
// {
|
// {
|
||||||
// debug_check_terrain_objects();
|
// debug_check_terrain_objects();
|
||||||
// }
|
// }
|
||||||
//#endif _DEBUG
|
// #endif _DEBUG
|
||||||
|
|
||||||
// Do special effects stuff to object
|
// Do special effects stuff to object
|
||||||
if (obj->effect_info) {
|
if (obj->effect_info) {
|
||||||
@ -2845,12 +2845,12 @@ void ObjDoFrame(object *obj) {
|
|||||||
RTP_ENDINCTIME(obj_doeffect_time);
|
RTP_ENDINCTIME(obj_doeffect_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef _DEBUG
|
// #ifdef _DEBUG
|
||||||
// if(Physics_player_verbose)
|
// if(Physics_player_verbose)
|
||||||
// {
|
// {
|
||||||
// debug_check_terrain_objects();
|
// debug_check_terrain_objects();
|
||||||
// }
|
// }
|
||||||
//#endif _DEBUG
|
// #endif _DEBUG
|
||||||
|
|
||||||
// Deal with special player movement stuff
|
// Deal with special player movement stuff
|
||||||
if (obj->type == OBJ_PLAYER) {
|
if (obj->type == OBJ_PLAYER) {
|
||||||
@ -2859,12 +2859,12 @@ void ObjDoFrame(object *obj) {
|
|||||||
RTP_ENDINCTIME(obj_move_player_time);
|
RTP_ENDINCTIME(obj_move_player_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef _DEBUG
|
// #ifdef _DEBUG
|
||||||
// if(Physics_player_verbose)
|
// if(Physics_player_verbose)
|
||||||
// {
|
// {
|
||||||
// debug_check_terrain_objects();
|
// debug_check_terrain_objects();
|
||||||
// }
|
// }
|
||||||
//#endif _DEBUG
|
// #endif _DEBUG
|
||||||
|
|
||||||
// Handle interval event for script.
|
// Handle interval event for script.
|
||||||
do {
|
do {
|
||||||
@ -2878,12 +2878,12 @@ void ObjDoFrame(object *obj) {
|
|||||||
} while (0); // this do{}while(0) is here because the RTP_STARTINCTIME/RTP_ENDINCTIME must be in the same scope
|
} while (0); // this do{}while(0) is here because the RTP_STARTINCTIME/RTP_ENDINCTIME must be in the same scope
|
||||||
// and not share scope with another RTP_STARTINCTIME
|
// and not share scope with another RTP_STARTINCTIME
|
||||||
|
|
||||||
//#ifdef _DEBUG
|
// #ifdef _DEBUG
|
||||||
// if(Physics_player_verbose)
|
// if(Physics_player_verbose)
|
||||||
// {
|
// {
|
||||||
// debug_check_terrain_objects();
|
// debug_check_terrain_objects();
|
||||||
// }
|
// }
|
||||||
//#endif _DEBUG
|
// #endif _DEBUG
|
||||||
|
|
||||||
// Cast light
|
// Cast light
|
||||||
do {
|
do {
|
||||||
@ -2893,23 +2893,23 @@ void ObjDoFrame(object *obj) {
|
|||||||
} while (0); // this do{}while(0) is here because the RTP_STARTINCTIME/RTP_ENDINCTIME must be in the same scope
|
} while (0); // this do{}while(0) is here because the RTP_STARTINCTIME/RTP_ENDINCTIME must be in the same scope
|
||||||
// and not share scope with another RTP_STARTINCTIME
|
// and not share scope with another RTP_STARTINCTIME
|
||||||
|
|
||||||
//#ifdef _DEBUG
|
// #ifdef _DEBUG
|
||||||
// if(Physics_player_verbose)
|
// if(Physics_player_verbose)
|
||||||
// {
|
// {
|
||||||
// debug_check_terrain_objects();
|
// debug_check_terrain_objects();
|
||||||
// }
|
// }
|
||||||
//#endif _DEBUG
|
// #endif _DEBUG
|
||||||
|
|
||||||
// if this object is walking/rolling on the terrain, make it not LOD at that point
|
// if this object is walking/rolling on the terrain, make it not LOD at that point
|
||||||
if (obj->movement_type == MT_WALKING && (obj->flags & OF_RENDERED) && OBJECT_OUTSIDE(obj))
|
if (obj->movement_type == MT_WALKING && (obj->flags & OF_RENDERED) && OBJECT_OUTSIDE(obj))
|
||||||
TurnOffLODForCell(CELLNUM(obj->roomnum));
|
TurnOffLODForCell(CELLNUM(obj->roomnum));
|
||||||
|
|
||||||
//#ifdef _DEBUG
|
// #ifdef _DEBUG
|
||||||
// if(Physics_player_verbose)
|
// if(Physics_player_verbose)
|
||||||
// {
|
// {
|
||||||
// debug_check_terrain_objects();
|
// debug_check_terrain_objects();
|
||||||
// }
|
// }
|
||||||
//#endif _DEBUG
|
// #endif _DEBUG
|
||||||
|
|
||||||
// Mark object as not rendered for this frame
|
// Mark object as not rendered for this frame
|
||||||
obj->flags &= ~OF_RENDERED;
|
obj->flags &= ~OF_RENDERED;
|
||||||
|
@ -99,13 +99,13 @@
|
|||||||
#define ROOMNUM_CELLNUM_MASK 0x7fffffff
|
#define ROOMNUM_CELLNUM_MASK 0x7fffffff
|
||||||
|
|
||||||
// Get a cell number from a room number
|
// Get a cell number from a room number
|
||||||
#define CELLNUM(roomnum) ((roomnum)&ROOMNUM_CELLNUM_MASK)
|
#define CELLNUM(roomnum) ((roomnum) & ROOMNUM_CELLNUM_MASK)
|
||||||
|
|
||||||
// Make a room number from a cell number
|
// Make a room number from a cell number
|
||||||
#define MAKE_ROOMNUM(cellnum) ((cellnum) | ROOMNUM_CELLNUM_FLAG)
|
#define MAKE_ROOMNUM(cellnum) ((cellnum) | ROOMNUM_CELLNUM_FLAG)
|
||||||
|
|
||||||
// Determine if a roomnum is really a cell number
|
// Determine if a roomnum is really a cell number
|
||||||
#define ROOMNUM_OUTSIDE(roomnum) (((roomnum)&ROOMNUM_CELLNUM_FLAG) != 0)
|
#define ROOMNUM_OUTSIDE(roomnum) (((roomnum) & ROOMNUM_CELLNUM_FLAG) != 0)
|
||||||
|
|
||||||
// Determine if an object is outside
|
// Determine if an object is outside
|
||||||
#define OBJECT_OUTSIDE(objp) ROOMNUM_OUTSIDE((objp)->roomnum)
|
#define OBJECT_OUTSIDE(objp) ROOMNUM_OUTSIDE((objp)->roomnum)
|
||||||
@ -322,14 +322,14 @@ typedef struct physics_info {
|
|||||||
int num_bounces; // Number of bounces before exploding (PHYSICS_UNLIMITED_BOUNCE is for unlimited bouncing)
|
int num_bounces; // Number of bounces before exploding (PHYSICS_UNLIMITED_BOUNCE is for unlimited bouncing)
|
||||||
|
|
||||||
float coeff_restitution; // What percent of velocity is kept after a bounce
|
float coeff_restitution; // What percent of velocity is kept after a bounce
|
||||||
float mass; // The mass of this object -- what about moving
|
float mass; // The mass of this object -- what about
|
||||||
// into type info
|
// moving into type info
|
||||||
float
|
float
|
||||||
drag; // How fast this slows down -- what about moving into type info
|
drag; // How fast this slows down -- what about moving into type info
|
||||||
float rotdrag; // How much resistance to a change in spin rate -- what about moving into type info
|
float rotdrag; // How much resistance to a change in spin rate -- what about moving into type info
|
||||||
union {
|
union {
|
||||||
float full_thrust; // Maximum thrust magnitude -- what about moving
|
float full_thrust; // Maximum thrust magnitude -- what about
|
||||||
// into type info
|
// moving into type info
|
||||||
float max_velocity;
|
float max_velocity;
|
||||||
};
|
};
|
||||||
union {
|
union {
|
||||||
@ -340,8 +340,8 @@ typedef struct physics_info {
|
|||||||
float turnroll_ratio; // How much roll for a given turning rate -- what about moving into type info
|
float turnroll_ratio; // How much roll for a given turning rate -- what about moving into type info
|
||||||
float
|
float
|
||||||
wiggle_amplitude; // The amplitude of an object's wiggle -- what about moving into type info
|
wiggle_amplitude; // The amplitude of an object's wiggle -- what about moving into type info
|
||||||
float wiggles_per_sec; // How fast something wiggles -- what about moving into
|
float wiggles_per_sec; // How fast something wiggles -- what about
|
||||||
// type info
|
// moving into type info
|
||||||
|
|
||||||
vector dest_pos; // destination position for interpolating velocity (for multiplayer only)
|
vector dest_pos; // destination position for interpolating velocity (for multiplayer only)
|
||||||
|
|
||||||
|
@ -33,11 +33,11 @@ int Num_object_ids[MAX_OBJECT_TYPES];
|
|||||||
|
|
||||||
// Objects that must be remapped so we can reference by index
|
// Objects that must be remapped so we can reference by index
|
||||||
// If you change this array then you must change the defines in the header file
|
// If you change this array then you must change the defines in the header file
|
||||||
//#ifdef _WIN32
|
// #ifdef _WIN32
|
||||||
// char *Static_object_names[]={TBL_GENERIC("GuideBot"),TBL_GENERIC("ChaffChunk"),TBL_GENERIC("GuideBotRed")};
|
// char *Static_object_names[]={TBL_GENERIC("GuideBot"),TBL_GENERIC("ChaffChunk"),TBL_GENERIC("GuideBotRed")};
|
||||||
//#else
|
// #else
|
||||||
char *Static_object_names[] = {TBL_GENERIC("GuideBot"), TBL_GENERIC("ChaffChunk")};
|
char *Static_object_names[] = {TBL_GENERIC("GuideBot"), TBL_GENERIC("ChaffChunk")};
|
||||||
//#endif
|
// #endif
|
||||||
|
|
||||||
#define NUM_STATIC_OBJECTS (sizeof(Static_object_names) / sizeof(*Static_object_names))
|
#define NUM_STATIC_OBJECTS (sizeof(Static_object_names) / sizeof(*Static_object_names))
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
#define PROC_SIZE 128
|
#define PROC_SIZE 128
|
||||||
#define TABSIZE 256
|
#define TABSIZE 256
|
||||||
#define TABMASK (TABSIZE - 1)
|
#define TABMASK (TABSIZE - 1)
|
||||||
#define PERM(x) perm[(x)&TABMASK]
|
#define PERM(x) perm[(x) & TABMASK]
|
||||||
#define INDEX(ix, iy) PERM((ix) + PERM((iy)))
|
#define INDEX(ix, iy) PERM((ix) + PERM((iy)))
|
||||||
#define RANDNBR ((prand()) / (float)RAND_MAX)
|
#define RANDNBR ((prand()) / (float)RAND_MAX)
|
||||||
#define LERP(t, x0, x1) ((x0) + (t) * ((x1) - (x0)))
|
#define LERP(t, x0, x1) ((x0) + (t) * ((x1) - (x0)))
|
||||||
@ -151,7 +151,7 @@ void InitProcedurals() {
|
|||||||
for (i = 0; i < 32768; i++) {
|
for (i = 0; i < 32768; i++) {
|
||||||
int r = (i >> 10) & 0x1f;
|
int r = (i >> 10) & 0x1f;
|
||||||
int g = (i >> 5) & 0x1f;
|
int g = (i >> 5) & 0x1f;
|
||||||
int b = (i)&0x1f;
|
int b = (i) & 0x1f;
|
||||||
r = __max(0, r - 1);
|
r = __max(0, r - 1);
|
||||||
g = __max(0, g - 1);
|
g = __max(0, g - 1);
|
||||||
b = __max(0, b - 1);
|
b = __max(0, b - 1);
|
||||||
@ -1196,7 +1196,7 @@ void EvaluateWaterProcedural(int handle) {
|
|||||||
float cur_frametime = gametime / frametime;
|
float cur_frametime = gametime / frametime;
|
||||||
int int_frame = cur_frametime;
|
int int_frame = cur_frametime;
|
||||||
|
|
||||||
int_frame %= ((diff)*2);
|
int_frame %= ((diff) * 2);
|
||||||
if (int_frame >= diff)
|
if (int_frame >= diff)
|
||||||
int_frame = (diff - 1) - (int_frame % diff);
|
int_frame = (diff - 1) - (int_frame % diff);
|
||||||
else
|
else
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
#include "editor\d3edit.h"
|
#include "editor\d3edit.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#define KATMAI
|
// #define KATMAI
|
||||||
|
|
||||||
// Katmai enhanced rotate only in a release build, because not
|
// Katmai enhanced rotate only in a release build, because not
|
||||||
// everyone has the intel compiler!
|
// everyone has the intel compiler!
|
||||||
@ -222,8 +222,8 @@ inline bool FaceIsRenderable(room *rp, face *fp) {
|
|||||||
// Determines if a face draws with alpha blending
|
// Determines if a face draws with alpha blending
|
||||||
// Parameters: fp - pointer to the face in question
|
// Parameters: fp - pointer to the face in question
|
||||||
// bm_handle - the handle for the bitmap for this frame, or -1 if don't care about
|
// bm_handle - the handle for the bitmap for this frame, or -1 if don't care about
|
||||||
// transparence Returns: bitmask describing the alpha blending for the face the return
|
// transparence Returns: bitmask describing the alpha blending for the face
|
||||||
// bits are the ATF_ flags in renderer.h
|
// the return bits are the ATF_ flags in renderer.h
|
||||||
inline int GetFaceAlpha(face *fp, int bm_handle) {
|
inline int GetFaceAlpha(face *fp, int bm_handle) {
|
||||||
int ret = AT_ALWAYS;
|
int ret = AT_ALWAYS;
|
||||||
if (GameTextures[fp->tmap].flags & TF_SATURATE) {
|
if (GameTextures[fp->tmap].flags & TF_SATURATE) {
|
||||||
@ -1350,7 +1350,7 @@ void RenderSpecularFacesFlat(room *rp) {
|
|||||||
texel = data[int_v * w + int_u];
|
texel = data[int_v * w + int_u];
|
||||||
r = (texel >> 10) & 0x1f;
|
r = (texel >> 10) & 0x1f;
|
||||||
g = (texel >> 5) & 0x1f;
|
g = (texel >> 5) & 0x1f;
|
||||||
b = (texel)&0x1f;
|
b = (texel) & 0x1f;
|
||||||
vr = lm_red[r];
|
vr = lm_red[r];
|
||||||
vg = lm_green[g];
|
vg = lm_green[g];
|
||||||
vb = lm_blue[b];
|
vb = lm_blue[b];
|
||||||
@ -1859,7 +1859,7 @@ void RenderFace(room *rp, int facenum) {
|
|||||||
ushort texel = data[int_v * w + int_u];
|
ushort texel = data[int_v * w + int_u];
|
||||||
int r = (texel >> 10) & 0x1f;
|
int r = (texel >> 10) & 0x1f;
|
||||||
int g = (texel >> 5) & 0x1f;
|
int g = (texel >> 5) & 0x1f;
|
||||||
int b = (texel)&0x1f;
|
int b = (texel) & 0x1f;
|
||||||
p->p3_r = p->p3_l * lm_red[r];
|
p->p3_r = p->p3_l * lm_red[r];
|
||||||
p->p3_g = p->p3_l * lm_green[g];
|
p->p3_g = p->p3_l * lm_green[g];
|
||||||
p->p3_b = p->p3_l * lm_blue[b];
|
p->p3_b = p->p3_l * lm_blue[b];
|
||||||
|
@ -976,23 +976,23 @@ void GetIJ(const vector *normal, int *ii, int *jj) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // y > x
|
else // y > x
|
||||||
if (fabs(normal->y) > fabs(normal->z)) {
|
if (fabs(normal->y) > fabs(normal->z)) {
|
||||||
if (normal->y > 0) {
|
if (normal->y > 0) {
|
||||||
*ii = 0;
|
*ii = 0;
|
||||||
*jj = 2; // y > x, y > z
|
*jj = 2; // y > x, y > z
|
||||||
|
} else {
|
||||||
|
*ii = 2;
|
||||||
|
*jj = 0;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
*ii = 2;
|
if (normal->z > 0) {
|
||||||
*jj = 0;
|
*ii = 1;
|
||||||
|
*jj = 0; // z > y > x
|
||||||
|
} else {
|
||||||
|
*ii = 0;
|
||||||
|
*jj = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (normal->z > 0) {
|
|
||||||
*ii = 1;
|
|
||||||
*jj = 0; // z > y > x
|
|
||||||
} else {
|
|
||||||
*ii = 0;
|
|
||||||
*jj = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2d cross product
|
// 2d cross product
|
||||||
|
@ -103,11 +103,11 @@
|
|||||||
|
|
||||||
#define MAX_SHIPS 30
|
#define MAX_SHIPS 30
|
||||||
|
|
||||||
//#ifdef DEMO //Demo2 will use GL
|
// #ifdef DEMO //Demo2 will use GL
|
||||||
//#define DEFAULT_SHIP "Pyro-SE"
|
// #define DEFAULT_SHIP "Pyro-SE"
|
||||||
//#else
|
// #else
|
||||||
#define DEFAULT_SHIP "Pyro-GL"
|
#define DEFAULT_SHIP "Pyro-GL"
|
||||||
//#endif
|
// #endif
|
||||||
|
|
||||||
// Ship fire flags
|
// Ship fire flags
|
||||||
#define SFF_FUSION 1 // fires like fusion
|
#define SFF_FUSION 1 // fires like fusion
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
#ifndef SOAR_H_
|
#ifndef SOAR_H_
|
||||||
#define SOAR_H_
|
#define SOAR_H_
|
||||||
|
|
||||||
//#ifdef _WIN32
|
// #ifdef _WIN32
|
||||||
//#define SOAR_ENABLED
|
// #define SOAR_ENABLED
|
||||||
//#endif
|
// #endif
|
||||||
|
|
||||||
#ifdef SOAR_ENABLED
|
#ifdef SOAR_ENABLED
|
||||||
|
|
||||||
|
@ -272,11 +272,11 @@ bool DSIsDoorOpenable(int n, int *is_openable) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// doorway state
|
// doorway state
|
||||||
//#define DOORWAY_CLOSED 0 // door is closed
|
// #define DOORWAY_CLOSED 0 // door is closed
|
||||||
//#define DOORWAY_OPENING 1 // door is opening
|
// #define DOORWAY_OPENING 1 // door is opening
|
||||||
//#define DOORWAY_WAITING 2 // door is waiting to be closed
|
// #define DOORWAY_WAITING 2 // door is waiting to be closed
|
||||||
//#define DOORWAY_CLOSING 3 // door is closing
|
// #define DOORWAY_CLOSING 3 // door is closing
|
||||||
//#define DOORWAY_OPEN 4 // door is open, that's it.
|
// #define DOORWAY_OPEN 4 // door is open, that's it.
|
||||||
|
|
||||||
bool DSGetDoorStatus(int n, int *status) {
|
bool DSGetDoorStatus(int n, int *status) {
|
||||||
if (n < 0 || n > Highest_object_index || Objects[n].type != OBJ_DOOR)
|
if (n < 0 || n > Highest_object_index || Objects[n].type != OBJ_DOOR)
|
||||||
|
@ -32,12 +32,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "subtitles.h"
|
#include "subtitles.h"
|
||||||
//#include "gamefont.h"
|
// #include "gamefont.h"
|
||||||
//#include "grtext.h"
|
// #include "grtext.h"
|
||||||
//#include "renderer.h"
|
// #include "renderer.h"
|
||||||
#include "pserror.h"
|
#include "pserror.h"
|
||||||
#include "ddio.h"
|
#include "ddio.h"
|
||||||
//#include "ddvid.h"
|
// #include "ddvid.h"
|
||||||
#include "manage.h"
|
#include "manage.h"
|
||||||
#include "application.h"
|
#include "application.h"
|
||||||
#include "mem.h"
|
#include "mem.h"
|
||||||
|
@ -341,7 +341,7 @@
|
|||||||
#include "CFILE.H"
|
#include "CFILE.H"
|
||||||
#include "AIMain.h"
|
#include "AIMain.h"
|
||||||
|
|
||||||
//#include "samirlog.h"
|
// #include "samirlog.h"
|
||||||
#define LOGFILE(_s)
|
#define LOGFILE(_s)
|
||||||
|
|
||||||
weapon Weapons[MAX_WEAPONS];
|
weapon Weapons[MAX_WEAPONS];
|
||||||
|
@ -173,7 +173,7 @@ inline short tga_read_short() {
|
|||||||
ushort bm_tga_translate_pixel(int pixel, int format) {
|
ushort bm_tga_translate_pixel(int pixel, int format) {
|
||||||
int red = ((pixel >> 16) & 0xFF);
|
int red = ((pixel >> 16) & 0xFF);
|
||||||
int green = ((pixel >> 8) & 0xFF);
|
int green = ((pixel >> 8) & 0xFF);
|
||||||
int blue = ((pixel)&0xFF);
|
int blue = ((pixel) & 0xFF);
|
||||||
int alpha = ((pixel >> 24) & 0xFF);
|
int alpha = ((pixel >> 24) & 0xFF);
|
||||||
ushort newpix;
|
ushort newpix;
|
||||||
|
|
||||||
|
@ -179,10 +179,9 @@ void cf_Close() {
|
|||||||
// Specify a directory to look in for files
|
// Specify a directory to look in for files
|
||||||
// Parameters: path - the directory path. Can be relative to the current cur (the full path will be stored)
|
// Parameters: path - the directory path. Can be relative to the current cur (the full path will be stored)
|
||||||
// ext - if NULL, look in this dir for all files. If non-null, it is a
|
// ext - if NULL, look in this dir for all files. If non-null, it is a
|
||||||
//NULL-terminated
|
// NULL-terminated
|
||||||
// list of file extensions, & the dir will only be searched for files with a
|
// list of file extensions, & the dir will only be searched
|
||||||
// matching extension Returns: true if
|
// for files with a matching extension Returns: true if directory added, else false
|
||||||
// directory added, else false
|
|
||||||
int cf_SetSearchPath(const char *path, char *ext, ...) {
|
int cf_SetSearchPath(const char *path, char *ext, ...) {
|
||||||
if (strlen(path) >= _MAX_PATH)
|
if (strlen(path) >= _MAX_PATH)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef __LNX__DD_SOUND_H_
|
#ifndef __LNX__DD_SOUND_H_
|
||||||
#define __LNX__DD_SOUND_H_
|
#define __LNX__DD_SOUND_H_
|
||||||
|
|
||||||
//#include <pthread.h>
|
// #include <pthread.h>
|
||||||
#include "SDL_thread.h"
|
#include "SDL_thread.h"
|
||||||
|
|
||||||
// Sound Library Internal Error Codes
|
// Sound Library Internal Error Codes
|
||||||
|
@ -410,10 +410,10 @@ void software_mixer::StreamMixer(char *ptr, int len) {
|
|||||||
cur_buf->play_info->user_data, cur_buf->play_info->m_stream_handle, &cur_buf->play_info->m_stream_size);
|
cur_buf->play_info->user_data, cur_buf->play_info->m_stream_handle, &cur_buf->play_info->m_stream_size);
|
||||||
// cur_buf->s->current_position = (char
|
// cur_buf->s->current_position = (char
|
||||||
//*)cur_buf->play_info->m_stream_data; mprintf((0, "%x %d\n",
|
//*)cur_buf->play_info->m_stream_data; mprintf((0, "%x %d\n",
|
||||||
//cur_buf->play_info->m_stream_data, cur_buf->play_info->m_stream_size));
|
// cur_buf->play_info->m_stream_data, cur_buf->play_info->m_stream_size));
|
||||||
ASSERT(!(cur_buf->play_info->m_stream_data && cur_buf->play_info->m_stream_size <= 0));
|
ASSERT(!(cur_buf->play_info->m_stream_data && cur_buf->play_info->m_stream_size <= 0));
|
||||||
// mprintf((0, "Data %X, length %d\n",
|
// mprintf((0, "Data %X, length %d\n",
|
||||||
//cur_buf->play_info->m_stream_data, cur_buf->play_info->m_stream_size));
|
// cur_buf->play_info->m_stream_data, cur_buf->play_info->m_stream_size));
|
||||||
|
|
||||||
if (cur_buf->play_info->m_stream_data) {
|
if (cur_buf->play_info->m_stream_data) {
|
||||||
switch (cur_buf->play_info->m_stream_format) {
|
switch (cur_buf->play_info->m_stream_format) {
|
||||||
|
@ -1034,10 +1034,10 @@ void StreamMixer(char *ptr, int len) {
|
|||||||
cur_buf->play_info->user_data, cur_buf->play_info->m_stream_handle, &cur_buf->play_info->m_stream_size);
|
cur_buf->play_info->user_data, cur_buf->play_info->m_stream_handle, &cur_buf->play_info->m_stream_size);
|
||||||
// cur_buf->s->current_position = (char
|
// cur_buf->s->current_position = (char
|
||||||
//*)cur_buf->play_info->m_stream_data; mprintf((0, "%x %d\n",
|
//*)cur_buf->play_info->m_stream_data; mprintf((0, "%x %d\n",
|
||||||
//cur_buf->play_info->m_stream_data, cur_buf->play_info->m_stream_size));
|
// cur_buf->play_info->m_stream_data, cur_buf->play_info->m_stream_size));
|
||||||
ASSERT(!(cur_buf->play_info->m_stream_data && cur_buf->play_info->m_stream_size <= 0));
|
ASSERT(!(cur_buf->play_info->m_stream_data && cur_buf->play_info->m_stream_size <= 0));
|
||||||
// mprintf((0, "Data %X, length %d\n",
|
// mprintf((0, "Data %X, length %d\n",
|
||||||
//cur_buf->play_info->m_stream_data, cur_buf->play_info->m_stream_size));
|
// cur_buf->play_info->m_stream_data, cur_buf->play_info->m_stream_size));
|
||||||
|
|
||||||
if (cur_buf->play_info->m_stream_data) {
|
if (cur_buf->play_info->m_stream_data) {
|
||||||
switch (cur_buf->play_info->m_stream_format) {
|
switch (cur_buf->play_info->m_stream_format) {
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
#define SOUND_DECAY_MAXTIME 100.0f
|
#define SOUND_DECAY_MAXTIME 100.0f
|
||||||
#define SOUND_GAIN_MAXSCALAR 1.0f
|
#define SOUND_GAIN_MAXSCALAR 1.0f
|
||||||
|
|
||||||
//#define SUPPORT_AUREAL
|
// #define SUPPORT_AUREAL
|
||||||
|
|
||||||
// Creative labs Environmental Audio Extension Interface
|
// Creative labs Environmental Audio Extension Interface
|
||||||
|
|
||||||
|
@ -385,8 +385,8 @@ bool sb_stream_element_init(sound_buffer_info *sb, char *sample_ptr, int sound_l
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Int3(); // unimplemented for
|
Int3();
|
||||||
normal DirectSound CloseHandle(sb->s->hEvent); sb->s->hEvent = NULL;
|
// unimplemented for normal DirectSound CloseHandle(sb->s->hEvent); sb->s->hEvent = NULL;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ typedef struct {
|
|||||||
float fDamping; // 0 to 1
|
float fDamping; // 0 to 1
|
||||||
} EAX_REVERBPROPERTIES;
|
} EAX_REVERBPROPERTIES;
|
||||||
|
|
||||||
//#define EAX_MAX_ENVIRONMENT (EAX_ENVIRONMENT_COUNT - 1)
|
// #define EAX_MAX_ENVIRONMENT (EAX_ENVIRONMENT_COUNT - 1)
|
||||||
|
|
||||||
// presets
|
// presets
|
||||||
#define EAX_PRESET_GENERIC EAX_ENVIRONMENT_GENERIC, 0.5F, 1.493F, 0.5F
|
#define EAX_PRESET_GENERIC EAX_ENVIRONMENT_GENERIC, 0.5F, 1.493F, 0.5F
|
||||||
|
@ -1184,18 +1184,18 @@ DECLARE_INTERFACE_(IA3dMaterial, IUnknown) {
|
|||||||
#define IA3dMaterial_GetTransmittance(p, a, b) (p)->GetTransmittance(a, b)
|
#define IA3dMaterial_GetTransmittance(p, a, b) (p)->GetTransmittance(a, b)
|
||||||
#endif // !defined(__cplusplus) || defined(CINTERFACE)
|
#endif // !defined(__cplusplus) || defined(CINTERFACE)
|
||||||
|
|
||||||
//===================================================================
|
//===================================================================
|
||||||
// Error Codes
|
// Error Codes
|
||||||
//
|
//
|
||||||
// Use macros A3DERROR_CODE(code) for errors and A3DSUCCESS_CODE(code)
|
// Use macros A3DERROR_CODE(code) for errors and A3DSUCCESS_CODE(code)
|
||||||
// for success codes or predefined universal COM success and failure
|
// for success codes or predefined universal COM success and failure
|
||||||
// code.
|
// code.
|
||||||
//
|
//
|
||||||
// All success codes should be mutally exclusive to all other success other.
|
// All success codes should be mutally exclusive to all other success other.
|
||||||
//
|
//
|
||||||
// All error codes should be mutually exclusive to all other error codes.
|
// All error codes should be mutually exclusive to all other error codes.
|
||||||
//
|
//
|
||||||
//===================================================================
|
//===================================================================
|
||||||
|
|
||||||
#define A3DERROR_CODE(code) MAKE_HRESULT(1, FACILITY_ITF, code)
|
#define A3DERROR_CODE(code) MAKE_HRESULT(1, FACILITY_ITF, code)
|
||||||
#define A3DSUCCESS_CODE(code) MAKE_HRESULT(0, FACILITY_ITF, code)
|
#define A3DSUCCESS_CODE(code) MAKE_HRESULT(0, FACILITY_ITF, code)
|
||||||
|
@ -228,6 +228,6 @@ void ddgr_ScaleBitmap16(ushort *dest_data, int dest_width, int x1, int y1, int x
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//・======================================================
|
// ・======================================================
|
||||||
// MacOS Graphics routines
|
// MacOS Graphics routines
|
||||||
//・======================================================
|
// ・======================================================
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
* $NoKeywords: $
|
* $NoKeywords: $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#define check
|
// #define check
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Macintosh Headers
|
// Macintosh Headers
|
||||||
@ -208,13 +208,13 @@ ddgr_error ddgr_os_surf_InitVideo(ddgr_surface *sf) {
|
|||||||
if (macErr)
|
if (macErr)
|
||||||
throw(CMacOSSurfErr("Error while fading in monitor ", macErr, DDGRERR_DRIVERINIT));
|
throw(CMacOSSurfErr("Error while fading in monitor ", macErr, DDGRERR_DRIVERINIT));
|
||||||
|
|
||||||
//¥ All's well!
|
// ¥ All's well!
|
||||||
gFullScreenData.m_video_initted = true;
|
gFullScreenData.m_video_initted = true;
|
||||||
} catch (CMacOSSurfErr theCaughtError) {
|
} catch (CMacOSSurfErr theCaughtError) {
|
||||||
mprintf((0, theCaughtError.m_ErrStr));
|
mprintf((0, theCaughtError.m_ErrStr));
|
||||||
mprintf((0, "DSp MacOS Error: %d\n", theCaughtError.m_MacErr));
|
mprintf((0, "DSp MacOS Error: %d\n", theCaughtError.m_MacErr));
|
||||||
if (gFullScreenData.m_context) {
|
if (gFullScreenData.m_context) {
|
||||||
//¥ The monitor might be faded out so fade it back in and release the context
|
// ¥ The monitor might be faded out so fade it back in and release the context
|
||||||
DSpContext_FadeGammaIn(gFullScreenData.m_context, NULL);
|
DSpContext_FadeGammaIn(gFullScreenData.m_context, NULL);
|
||||||
DSpContext_Release(gFullScreenData.m_context);
|
DSpContext_Release(gFullScreenData.m_context);
|
||||||
gFullScreenData.m_context = nil;
|
gFullScreenData.m_context = nil;
|
||||||
@ -259,13 +259,13 @@ void ddgr_os_surf_CloseVideo(ddgr_surface *sf) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (gFullScreenData.m_context) {
|
if (gFullScreenData.m_context) {
|
||||||
//¥ The monitor might be faded out so fade it back in and release the context
|
// ¥ The monitor might be faded out so fade it back in and release the context
|
||||||
DSpContext_FadeGammaIn(gFullScreenData.m_context, NULL);
|
DSpContext_FadeGammaIn(gFullScreenData.m_context, NULL);
|
||||||
DSpContext_Release(gFullScreenData.m_context);
|
DSpContext_Release(gFullScreenData.m_context);
|
||||||
gFullScreenData.m_context = nil;
|
gFullScreenData.m_context = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
//¥ Video is deinitialized!
|
// ¥ Video is deinitialized!
|
||||||
gFullScreenData.m_video_initted = false;
|
gFullScreenData.m_video_initted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -811,9 +811,9 @@ ddgr_error ddgr_os_surf_AttachHandle(ddgr_surface *sf, unsigned handle) {
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
//¥======================================================
|
// ¥======================================================
|
||||||
// MacOS Full Screen Graphics routines
|
// MacOS Full Screen Graphics routines
|
||||||
//¥======================================================
|
// ¥======================================================
|
||||||
|
|
||||||
// Initialize the macintosh for full screen graphics
|
// Initialize the macintosh for full screen graphics
|
||||||
ddgr_error ddgr_os_surf_fullscreen_Init(ddgr_init_info *info) {
|
ddgr_error ddgr_os_surf_fullscreen_Init(ddgr_init_info *info) {
|
||||||
|
@ -43,16 +43,16 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
//#include <linux/kd.h>
|
// #include <linux/kd.h>
|
||||||
//#include <linux/vt.h>
|
// #include <linux/vt.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
//#include <linux/keyboard.h>
|
// #include <linux/keyboard.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
//#include <linux/unistd.h>
|
// #include <linux/unistd.h>
|
||||||
|
|
||||||
volatile struct tLnxKeys {
|
volatile struct tLnxKeys {
|
||||||
union {
|
union {
|
||||||
|
@ -24,9 +24,9 @@
|
|||||||
#include "ddio.h"
|
#include "ddio.h"
|
||||||
#include "mono.h"
|
#include "mono.h"
|
||||||
|
|
||||||
//##########################################################
|
// ##########################################################
|
||||||
// GGI Interface Functions
|
// GGI Interface Functions
|
||||||
//##########################################################
|
// ##########################################################
|
||||||
void ddio_ggi_EmergencyQuit(int id);
|
void ddio_ggi_EmergencyQuit(int id);
|
||||||
void ddio_ggi_InternalKeyInit(void);
|
void ddio_ggi_InternalKeyInit(void);
|
||||||
static int ddio_ggi_TranslateKey(int c, int code);
|
static int ddio_ggi_TranslateKey(int c, int code);
|
||||||
@ -35,7 +35,7 @@ void ddio_ggi_InternalClose(void);
|
|||||||
void ddio_ggi_KeyHandler(void);
|
void ddio_ggi_KeyHandler(void);
|
||||||
gii_input_t GGI_input_handle;
|
gii_input_t GGI_input_handle;
|
||||||
void ddio_ggi_KeyBoardEventHandler(int transkey, int press);
|
void ddio_ggi_KeyBoardEventHandler(int transkey, int press);
|
||||||
//##########################################################
|
// ##########################################################
|
||||||
|
|
||||||
volatile struct tLnxKeys {
|
volatile struct tLnxKeys {
|
||||||
union {
|
union {
|
||||||
@ -145,9 +145,9 @@ int ddio_KeyToAscii(int code) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
//#################################################
|
// #################################################
|
||||||
// ggi Interface Functions
|
// ggi Interface Functions
|
||||||
//#################################################
|
// #################################################
|
||||||
void ddio_ggi_InternalKeyInit(void) {
|
void ddio_ggi_InternalKeyInit(void) {
|
||||||
static bool first_time = true;
|
static bool first_time = true;
|
||||||
|
|
||||||
|
@ -38,10 +38,10 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
//#include <linux/unistd.h>
|
// #include <linux/unistd.h>
|
||||||
//#include <linux/keyboard.h>
|
// #include <linux/keyboard.h>
|
||||||
//#include <linux/kd.h>
|
// #include <linux/kd.h>
|
||||||
//#include <linux/vt.h>
|
// #include <linux/vt.h>
|
||||||
|
|
||||||
extern volatile struct tLnxKeys {
|
extern volatile struct tLnxKeys {
|
||||||
union {
|
union {
|
||||||
|
@ -37,12 +37,12 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
//#include <linux/keyboard.h>
|
// #include <linux/keyboard.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
//#include <linux/unistd.h>
|
// #include <linux/unistd.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <term.h>
|
#include <term.h>
|
||||||
|
|
||||||
@ -50,9 +50,9 @@
|
|||||||
#include "ddio.h"
|
#include "ddio.h"
|
||||||
#include "mono.h"
|
#include "mono.h"
|
||||||
|
|
||||||
//##########################################################
|
// ##########################################################
|
||||||
// raw Interface Functions
|
// raw Interface Functions
|
||||||
//##########################################################
|
// ##########################################################
|
||||||
void ddio_raw_EmergencyQuit(int id);
|
void ddio_raw_EmergencyQuit(int id);
|
||||||
void ddio_raw_InternalKeyInit(void);
|
void ddio_raw_InternalKeyInit(void);
|
||||||
void ddio_raw_KeyBoardEventHandler(int scancode, int press);
|
void ddio_raw_KeyBoardEventHandler(int scancode, int press);
|
||||||
@ -63,7 +63,7 @@ void init_keyboard();
|
|||||||
void close_keyboard();
|
void close_keyboard();
|
||||||
int kbhit();
|
int kbhit();
|
||||||
int readch();
|
int readch();
|
||||||
//##########################################################
|
// ##########################################################
|
||||||
|
|
||||||
extern volatile struct tLnxKeys {
|
extern volatile struct tLnxKeys {
|
||||||
union {
|
union {
|
||||||
@ -137,9 +137,9 @@ void ddio_normal_InternalResetKey(ubyte key) {
|
|||||||
LKeys[key].status = false;
|
LKeys[key].status = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//#################################################
|
// #################################################
|
||||||
// raw Interface Functions
|
// raw Interface Functions
|
||||||
//#################################################
|
// #################################################
|
||||||
void (*kb_event_handler)(int scancode, int press);
|
void (*kb_event_handler)(int scancode, int press);
|
||||||
void ddio_raw_InternalKeyInit(void) {
|
void ddio_raw_InternalKeyInit(void) {
|
||||||
static bool first_time = true;
|
static bool first_time = true;
|
||||||
|
@ -34,8 +34,8 @@
|
|||||||
#include "../lib/linux/dyna_xwin.h"
|
#include "../lib/linux/dyna_xwin.h"
|
||||||
#include "../lib/linux/dyna_xext.h"
|
#include "../lib/linux/dyna_xext.h"
|
||||||
|
|
||||||
//#include <X11/Xlib.h>
|
// #include <X11/Xlib.h>
|
||||||
//#include <X11/Xutil.h>
|
// #include <X11/Xutil.h>
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
|
|
||||||
extern volatile struct tLnxKeys {
|
extern volatile struct tLnxKeys {
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
#include "ddio_lnx.h"
|
#include "ddio_lnx.h"
|
||||||
#include "application.h"
|
#include "application.h"
|
||||||
#include "args.h"
|
#include "args.h"
|
||||||
//#include "../lib/linux/dyna_xwin.h"
|
// #include "../lib/linux/dyna_xwin.h"
|
||||||
#include "SDL.h"
|
#include "SDL.h"
|
||||||
|
|
||||||
bool ddio_mouseGrabbed = false;
|
bool ddio_mouseGrabbed = false;
|
||||||
|
@ -813,9 +813,9 @@ void gameMacController::set_axis_sensitivity(ct_type axis_type, ubyte axis, floa
|
|||||||
Int3();
|
Int3();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//#ifndef MACINTOSH
|
// #ifndef MACINTOSH
|
||||||
// toggles use of deadzone for controllers. ctl can be 0 to ???
|
// toggles use of deadzone for controllers. ctl can be 0 to ???
|
||||||
// dead zone is from 0.0 to 0.5
|
// dead zone is from 0.0 to 0.5
|
||||||
void gameMacController::set_controller_deadzone(int ctl, float deadzone) {
|
void gameMacController::set_controller_deadzone(int ctl, float deadzone) {
|
||||||
if (deadzone < 0.0)
|
if (deadzone < 0.0)
|
||||||
deadzone = 0.0;
|
deadzone = 0.0;
|
||||||
@ -828,7 +828,7 @@ float gameMacController::get_controller_deadzone(int ctl) {
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
//#endif
|
// #endif
|
||||||
char Ctltext_AxisBindings[][16] = {"", "X-axis", "Y-axis", "Z-axis", "R-axis", "U-axis", "V-axis"};
|
char Ctltext_AxisBindings[][16] = {"", "X-axis", "Y-axis", "Z-axis", "R-axis", "U-axis", "V-axis"};
|
||||||
char Ctltext_BtnBindings[][16] = {"", "btn1", "btn2", "btn3", "btn4", "btn5", "btn6", "btn7", "btn8",
|
char Ctltext_BtnBindings[][16] = {"", "btn1", "btn2", "btn3", "btn4", "btn5", "btn6", "btn7", "btn8",
|
||||||
"btn9", "btn10", "btn11", "btn12", "btn13", "btn14", "btn15", "btn16", "btn17",
|
"btn9", "btn10", "btn11", "btn12", "btn13", "btn14", "btn15", "btn16", "btn17",
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
//#include <assert.h>
|
// #include <assert.h>
|
||||||
|
|
||||||
// Mac Headers
|
// Mac Headers
|
||||||
#include <Files.h>
|
#include <Files.h>
|
||||||
@ -851,7 +851,7 @@ void macify_dospath(const char *dos_path, char *mac_path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#include <Errors.h>
|
#include <Errors.h>
|
||||||
//#include <Files.h>
|
// #include <Files.h>
|
||||||
#include <Script.h>
|
#include <Script.h>
|
||||||
#include "file_io.h"
|
#include "file_io.h"
|
||||||
|
|
||||||
|
@ -153,8 +153,8 @@ bool joy_InitRemoteStick(tJoystick joy, char *server_adr, tJoystickRecord *stick
|
|||||||
// start packet read thread.
|
// start packet read thread.
|
||||||
//@@ Thread_running[(int)joy] = false;
|
//@@ Thread_running[(int)joy] = false;
|
||||||
//@@ unsigned thread_id;
|
//@@ unsigned thread_id;
|
||||||
//@@ unsigned long thread_handle = _beginthreadex(NULL, 0, joy_ReadRemotePacket, &Joysticks[(int)joy],
|
//@@ unsigned long thread_handle = _beginthreadex(NULL, 0, joy_ReadRemotePacket,
|
||||||
1, &thread_id);
|
&Joysticks[(int)joy], 1, &thread_id);
|
||||||
//@@ if (thread_handle == 0) {
|
//@@ if (thread_handle == 0) {
|
||||||
//@@ Error("Remote joystick thread creation failed.");
|
//@@ Error("Remote joystick thread creation failed.");
|
||||||
//@@ }
|
//@@ }
|
||||||
|
@ -202,7 +202,7 @@ bool MacKeyboardHandler(void) {
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
bool ddio_InternalKeyInit(ddio_init_info *init_info) {
|
bool ddio_InternalKeyInit(ddio_init_info *init_info) {
|
||||||
bool result = true;
|
bool result = true;
|
||||||
//¥ Make is so we can get key ups
|
// ¥ Make is so we can get key ups
|
||||||
SetEventMask(everyEvent);
|
SetEventMask(everyEvent);
|
||||||
LMSetSysEvtMask(everyEvent);
|
LMSetSysEvtMask(everyEvent);
|
||||||
|
|
||||||
@ -212,7 +212,7 @@ bool ddio_InternalKeyInit(ddio_init_info *init_info) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
void ddio_InternalKeyClose() {
|
void ddio_InternalKeyClose() {
|
||||||
//¥ Restore the normal event mask
|
// ¥ Restore the normal event mask
|
||||||
SetEventMask(everyEvent - keyUpMask);
|
SetEventMask(everyEvent - keyUpMask);
|
||||||
LMSetSysEvtMask(everyEvent - keyUpMask);
|
LMSetSysEvtMask(everyEvent - keyUpMask);
|
||||||
}
|
}
|
||||||
|
@ -180,10 +180,10 @@ static struct tWinKeyData {
|
|||||||
HHOOK winhook; // windows hook
|
HHOOK winhook; // windows hook
|
||||||
unsigned long thread; // thread id
|
unsigned long thread; // thread id
|
||||||
// osMutex keyframe_mutex; // mutex between
|
// osMutex keyframe_mutex; // mutex between
|
||||||
//internal key frame and key thread.
|
// internal key frame and key thread.
|
||||||
bool nextframe; // used for mutexing between keyframe and thread.
|
bool nextframe; // used for mutexing between keyframe and thread.
|
||||||
bool acquired; // device acquired?
|
bool acquired; // device acquired?
|
||||||
bool thread_active; // used in thread.
|
bool thread_active; // used in thread.
|
||||||
bool suspended;
|
bool suspended;
|
||||||
} WKD = {NULL, NULL, NULL, 0xffffffff, false, false, false, true};
|
} WKD = {NULL, NULL, NULL, 0xffffffff, false, false, false, true};
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#undef EGA
|
#undef EGA
|
||||||
//#include <vga.h>
|
// #include <vga.h>
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int width, height, bytesperpixel, linewidth;
|
int width, height, bytesperpixel, linewidth;
|
||||||
} tinfo;
|
} tinfo;
|
||||||
|
@ -73,7 +73,7 @@ inline float SWAPFLOAT(float x)
|
|||||||
#define MOTOROLA_FLOAT(x) SWAPFLOAT(Endian_SwapFloat(x))
|
#define MOTOROLA_FLOAT(x) SWAPFLOAT(Endian_SwapFloat(x))
|
||||||
*/
|
*/
|
||||||
#define SWAPSHORT(x) (short)(0xFFFF & (((x) << 8) | (((ushort)(x)) >> 8)))
|
#define SWAPSHORT(x) (short)(0xFFFF & (((x) << 8) | (((ushort)(x)) >> 8)))
|
||||||
#define SWAPINT(x) (int)(((x) << 24) | (((ulong)(x)) >> 24) | (((x)&0x0000ff00) << 8) | (((x)&0x00ff0000) >> 8))
|
#define SWAPINT(x) (int)(((x) << 24) | (((ulong)(x)) >> 24) | (((x) & 0x0000ff00) << 8) | (((x) & 0x00ff0000) >> 8))
|
||||||
|
|
||||||
// Stupid function to trick the compiler into letting me byteswap a float
|
// Stupid function to trick the compiler into letting me byteswap a float
|
||||||
inline float SWAPFLOAT(float x) {
|
inline float SWAPFLOAT(float x) {
|
||||||
|
10
lib/Macros.h
10
lib/Macros.h
@ -52,13 +52,13 @@
|
|||||||
#define CHECK_FLAG(_var, _flag) ((_var) & (_flag))
|
#define CHECK_FLAG(_var, _flag) ((_var) & (_flag))
|
||||||
#define max(a, b) (((a) > (b)) ? (a) : (b))
|
#define max(a, b) (((a) > (b)) ? (a) : (b))
|
||||||
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
||||||
#define makeword(_h, _l) (((_h) << 16) + ((_l)&0xffff))
|
#define makeword(_h, _l) (((_h) << 16) + ((_l) & 0xffff))
|
||||||
#define hiword(_v) ((_v) >> 16)
|
#define hiword(_v) ((_v) >> 16)
|
||||||
#define loword(_v) ((_v)&0x0000ffff)
|
#define loword(_v) ((_v) & 0x0000ffff)
|
||||||
#define makeshort(_h, _l) (((_h) << 8) + ((_l)&0x00ff))
|
#define makeshort(_h, _l) (((_h) << 8) + ((_l) & 0x00ff))
|
||||||
#define hibyte(_w) ((_w) >> 8)
|
#define hibyte(_w) ((_w) >> 8)
|
||||||
#define lobyte(_w) ((_w)&0x00ff)
|
#define lobyte(_w) ((_w) & 0x00ff)
|
||||||
#define kb_to_bytes(_kb) ((_kb)*1024)
|
#define kb_to_bytes(_kb) ((_kb) * 1024)
|
||||||
#define _min(a, b) min(a, b)
|
#define _min(a, b) min(a, b)
|
||||||
#define _max(a, b) max(a, b)
|
#define _max(a, b) max(a, b)
|
||||||
#define ABS(a) ((a < 0) ? (-a) : (a))
|
#define ABS(a) ((a < 0) ? (-a) : (a))
|
||||||
|
@ -114,7 +114,7 @@
|
|||||||
#ifndef IDNO
|
#ifndef IDNO
|
||||||
#define IDNO 7
|
#define IDNO 7
|
||||||
#endif
|
#endif
|
||||||
//#define DEBUG_LEVEL 0 //DAJ
|
// #define DEBUG_LEVEL 0 //DAJ
|
||||||
#if defined(WIN32) || defined(__LINUX__)
|
#if defined(WIN32) || defined(__LINUX__)
|
||||||
static const int OSMBOX_OK = 1;
|
static const int OSMBOX_OK = 1;
|
||||||
static const int OSMBOX_YESNO = 2;
|
static const int OSMBOX_YESNO = 2;
|
||||||
@ -161,7 +161,7 @@ void Debug_ConsoleRedirectMessages(int virtual_window, int physical_window);
|
|||||||
} while (0)
|
} while (0)
|
||||||
#elif defined(__LINUX__)
|
#elif defined(__LINUX__)
|
||||||
void ddio_InternalKeyClose();
|
void ddio_InternalKeyClose();
|
||||||
//#define debug_break() do{__asm__ __volatile__ ( "int $3" );}while(0)
|
// #define debug_break() do{__asm__ __volatile__ ( "int $3" );}while(0)
|
||||||
#ifndef MACOSXPPC
|
#ifndef MACOSXPPC
|
||||||
#define debug_break() \
|
#define debug_break() \
|
||||||
do { \
|
do { \
|
||||||
|
@ -200,9 +200,9 @@
|
|||||||
#ifndef __ds3dlib_h__
|
#ifndef __ds3dlib_h__
|
||||||
#define __ds3dlib_h__
|
#define __ds3dlib_h__
|
||||||
|
|
||||||
//#include <windows.h>
|
// #include <windows.h>
|
||||||
//#include <mmsystem.h> // Multi-media system support
|
// #include <mmsystem.h> // Multi-media system support
|
||||||
//#include "dsound.h" // Direct sound header file
|
// #include "dsound.h" // Direct sound header file
|
||||||
|
|
||||||
#include "ssl_lib.h" // Shared sound header (between high and low-levels)
|
#include "ssl_lib.h" // Shared sound header (between high and low-levels)
|
||||||
#include "vecmat.h"
|
#include "vecmat.h"
|
||||||
|
@ -203,7 +203,7 @@
|
|||||||
#include "object.h"
|
#include "object.h"
|
||||||
#include "vecmat.h"
|
#include "vecmat.h"
|
||||||
#include "terrain.h"
|
#include "terrain.h"
|
||||||
//#include "room.h"
|
// #include "room.h"
|
||||||
#include "findintersection_external.h"
|
#include "findintersection_external.h"
|
||||||
|
|
||||||
extern float Ceiling_height;
|
extern float Ceiling_height;
|
||||||
|
@ -85,7 +85,7 @@ fix FloatToFixFast(float num);
|
|||||||
|
|
||||||
// Conversion macros
|
// Conversion macros
|
||||||
//??#define FloatToFix(num) Round((num) * FLOAT_SCALER)
|
//??#define FloatToFix(num) Round((num) * FLOAT_SCALER)
|
||||||
#define FloatToFix(num) ((fix)((num)*FLOAT_SCALER))
|
#define FloatToFix(num) ((fix)((num) * FLOAT_SCALER))
|
||||||
#define IntToFix(num) ((num) << FIX_SHIFT)
|
#define IntToFix(num) ((num) << FIX_SHIFT)
|
||||||
#define ShortToFix(num) (((long)(num)) << FIX_SHIFT)
|
#define ShortToFix(num) (((long)(num)) << FIX_SHIFT)
|
||||||
#define FixToFloat(num) (((float)(num)) / FLOAT_SCALER)
|
#define FixToFloat(num) (((float)(num)) / FLOAT_SCALER)
|
||||||
|
@ -147,9 +147,9 @@ void os_ConsolePrintf(int n, int row, int col, char *format, ...);
|
|||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Operating system includes
|
// Operating system includes
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
//#if defined(WIN32)
|
// #if defined(WIN32)
|
||||||
// #include "win\oewin_os.h"
|
// #include "win\oewin_os.h"
|
||||||
//#elif defined(MACINTOSH) // JCA: not needed
|
// #elif defined(MACINTOSH) // JCA: not needed
|
||||||
// #include "oemac_os.h"
|
// #include "oemac_os.h"
|
||||||
//#endif
|
// #endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#ifndef __LNXDRAW_H_
|
#ifndef __LNXDRAW_H_
|
||||||
#define __LNXDRAW_H_
|
#define __LNXDRAW_H_
|
||||||
|
|
||||||
//#include "dyna_xwin.h"
|
// #include "dyna_xwin.h"
|
||||||
//#include "dyna_xext.h"
|
// #include "dyna_xext.h"
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ typedef struct {
|
|||||||
// Window *pre_created_window; // Window already created
|
// Window *pre_created_window; // Window already created
|
||||||
// XVisualInfo pre_created_visinfo;
|
// XVisualInfo pre_created_visinfo;
|
||||||
} LnxWindowDesc;
|
} LnxWindowDesc;
|
||||||
//#define LNXDRAWF_USEPRECREATEDWIN 0x01
|
// #define LNXDRAWF_USEPRECREATEDWIN 0x01
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
// XSizeHints *lpSizeHints;
|
// XSizeHints *lpSizeHints;
|
||||||
|
@ -35,8 +35,8 @@
|
|||||||
#define __LNXVIDEOMODE_H__
|
#define __LNXVIDEOMODE_H__
|
||||||
|
|
||||||
#include "linux/linux_fix.h"
|
#include "linux/linux_fix.h"
|
||||||
//#include "linux/dyna_xwin.h"
|
// #include "linux/dyna_xwin.h"
|
||||||
//#include <X11/extensions/xf86vmode.h>
|
// #include <X11/extensions/xf86vmode.h>
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
#define MODE_OK 0
|
#define MODE_OK 0
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
#ifndef MEM_H
|
#ifndef MEM_H
|
||||||
#define MEM_H
|
#define MEM_H
|
||||||
|
|
||||||
//#define MEM_USE_RTL 1
|
// #define MEM_USE_RTL 1
|
||||||
|
|
||||||
#ifdef MACINTOSH
|
#ifdef MACINTOSH
|
||||||
#undef MEM_USE_RTL
|
#undef MEM_USE_RTL
|
||||||
|
@ -237,7 +237,7 @@ inline tMusicVal QUANTIZE_MUSICVAL(float fval) { return (fval * 255); }
|
|||||||
|
|
||||||
// OMS Events
|
// OMS Events
|
||||||
#define OMSEVT_MAKE(_evt, _priority) (((_evt) << 2) + (_priority & 0x03))
|
#define OMSEVT_MAKE(_evt, _priority) (((_evt) << 2) + (_priority & 0x03))
|
||||||
#define OMSEVT_PRIORITY(_evt) ((_evt)&0x3)
|
#define OMSEVT_PRIORITY(_evt) ((_evt) & 0x3)
|
||||||
|
|
||||||
#define OMS_EVT_NONE OMSEVT_MAKE(0, 0)
|
#define OMS_EVT_NONE OMSEVT_MAKE(0, 0)
|
||||||
#define OMS_EVT_SONGENDED OMSEVT_MAKE(32, 0) // music completed (parm tells us what theme)
|
#define OMS_EVT_SONGENDED OMSEVT_MAKE(32, 0) // music completed (parm tells us what theme)
|
||||||
|
@ -314,24 +314,24 @@ inline void INADDR_GET_SUN_SUNB(struct in_addr *st, unsigned char *s_b1, unsigne
|
|||||||
#define BOOL bool
|
#define BOOL bool
|
||||||
#define SOCKET unsigned int
|
#define SOCKET unsigned int
|
||||||
#define SOCKADDR_IN sockaddr_in
|
#define SOCKADDR_IN sockaddr_in
|
||||||
//#define SOCKADDR_IPX sockaddr_ipx
|
// #define SOCKADDR_IPX sockaddr_ipx
|
||||||
#define SOCKADDR sockaddr
|
#define SOCKADDR sockaddr
|
||||||
//#define INVALID_SOCKET -1
|
// #define INVALID_SOCKET -1
|
||||||
//#define NSPROTO_IPX AF_IPX
|
// #define NSPROTO_IPX AF_IPX
|
||||||
#define TRUE true
|
#define TRUE true
|
||||||
#define FALSE false
|
#define FALSE false
|
||||||
#define HOSTENT struct hostent
|
#define HOSTENT struct hostent
|
||||||
//#define SOCKET_ERROR -1
|
// #define SOCKET_ERROR -1
|
||||||
|
|
||||||
// Winsock = sockets error translation
|
// Winsock = sockets error translation
|
||||||
//#define WSAEWOULDBLOCK EWOULDBLOCK
|
// #define WSAEWOULDBLOCK EWOULDBLOCK
|
||||||
//#define WSAEINVAL EINVAL
|
// #define WSAEINVAL EINVAL
|
||||||
//#define WSAENOPROTOOPT ENOPROTOOPT
|
// #define WSAENOPROTOOPT ENOPROTOOPT
|
||||||
|
|
||||||
extern bool Use_DirectPlay;
|
extern bool Use_DirectPlay;
|
||||||
|
|
||||||
//#ifdef FIXED
|
// #ifdef FIXED
|
||||||
// inline int WSAGetLastError(){return errno;}
|
// inline int WSAGetLastError(){return errno;}
|
||||||
|
|
||||||
// helper macros for working with SOCKADDR_IN to make it look nicer between windows and Linux
|
// helper macros for working with SOCKADDR_IN to make it look nicer between windows and Linux
|
||||||
inline void INADDR_SET_SUN_SADDR(struct in_addr *st, unsigned int value) { st->S_un.S_addr = value; }
|
inline void INADDR_SET_SUN_SADDR(struct in_addr *st, unsigned int value) { st->S_un.S_addr = value; }
|
||||||
@ -358,7 +358,7 @@ inline void INADDR_GET_SUN_SUNB(struct in_addr *st, unsigned char *s_b1, unsigne
|
|||||||
*s_b3 = st->S_un.S_un_b.s_b3;
|
*s_b3 = st->S_un.S_un_b.s_b3;
|
||||||
*s_b4 = st->S_un.S_un_b.s_b4;
|
*s_b4 = st->S_un.S_un_b.s_b4;
|
||||||
}
|
}
|
||||||
//#endif // FIXED
|
// #endif // FIXED
|
||||||
#endif // OS
|
#endif // OS
|
||||||
|
|
||||||
#define NWT_UNRELIABLE 1
|
#define NWT_UNRELIABLE 1
|
||||||
|
@ -256,7 +256,7 @@ inline void SetDebugBreakHandlers(void (*stop)(), void (*resume)()) {
|
|||||||
if (DebugBreak_callback_resume) \
|
if (DebugBreak_callback_resume) \
|
||||||
(*DebugBreak_callback_resume)(); \
|
(*DebugBreak_callback_resume)(); \
|
||||||
} while (0)
|
} while (0)
|
||||||
///#define ASSERT(x) assert(x)
|
/// #define ASSERT(x) assert(x)
|
||||||
#define ASSERT(x) \
|
#define ASSERT(x) \
|
||||||
do { \
|
do { \
|
||||||
if (!(unsigned)(x)) { \
|
if (!(unsigned)(x)) { \
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__LINUX__) || defined(MACINTOSH)
|
#if defined(__LINUX__) || defined(MACINTOSH)
|
||||||
//#if defined(__LINUX__)
|
// #if defined(__LINUX__)
|
||||||
#ifdef USE_RTP
|
#ifdef USE_RTP
|
||||||
#undef USE_RTP // no rtp for now
|
#undef USE_RTP // no rtp for now
|
||||||
#endif
|
#endif
|
||||||
|
@ -257,7 +257,7 @@ typedef struct {
|
|||||||
int roomnum;
|
int roomnum;
|
||||||
} pos_state;
|
} pos_state;
|
||||||
|
|
||||||
//#define MAX_EFFECT_OFFSETS 5
|
// #define MAX_EFFECT_OFFSETS 5
|
||||||
|
|
||||||
// sound priority values.
|
// sound priority values.
|
||||||
#define SND_PRIORITY_CRITICAL 5 // usually streams have this priority, bumps off any other sounds.
|
#define SND_PRIORITY_CRITICAL 5 // usually streams have this priority, bumps off any other sounds.
|
||||||
|
@ -97,7 +97,7 @@ typedef struct {
|
|||||||
|
|
||||||
// For the following enum table: LIN=Linear, PER=Perspective, NON=No Transparency, LIT = Shaded,
|
// For the following enum table: LIN=Linear, PER=Perspective, NON=No Transparency, LIT = Shaded,
|
||||||
// COLORED=Colored lighting, TRANS=Transparency
|
// COLORED=Colored lighting, TRANS=Transparency
|
||||||
//ALPHA=Alpha renderer
|
// ALPHA=Alpha renderer
|
||||||
|
|
||||||
#define MAX_RENDER_TYPES 15
|
#define MAX_RENDER_TYPES 15
|
||||||
|
|
||||||
|
@ -40,9 +40,9 @@ typedef LONG D3DFIXED;
|
|||||||
*/
|
*/
|
||||||
#define CI_GETALPHA(ci) ((ci) >> 24)
|
#define CI_GETALPHA(ci) ((ci) >> 24)
|
||||||
#define CI_GETINDEX(ci) (((ci) >> 8) & 0xffff)
|
#define CI_GETINDEX(ci) (((ci) >> 8) & 0xffff)
|
||||||
#define CI_GETFRACTION(ci) ((ci)&0xff)
|
#define CI_GETFRACTION(ci) ((ci) & 0xff)
|
||||||
#define CI_ROUNDINDEX(ci) CI_GETINDEX((ci) + 0x80)
|
#define CI_ROUNDINDEX(ci) CI_GETINDEX((ci) + 0x80)
|
||||||
#define CI_MASKALPHA(ci) ((ci)&0xffffff)
|
#define CI_MASKALPHA(ci) ((ci) & 0xffffff)
|
||||||
#define CI_MAKE(a, i, f) (((a) << 24) | ((i) << 8) | (f))
|
#define CI_MAKE(a, i, f) (((a) << 24) | ((i) << 8) | (f))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -54,15 +54,15 @@ typedef LONG D3DFIXED;
|
|||||||
#define RGBA_GETALPHA(rgb) ((rgb) >> 24)
|
#define RGBA_GETALPHA(rgb) ((rgb) >> 24)
|
||||||
#define RGBA_GETRED(rgb) (((rgb) >> 16) & 0xff)
|
#define RGBA_GETRED(rgb) (((rgb) >> 16) & 0xff)
|
||||||
#define RGBA_GETGREEN(rgb) (((rgb) >> 8) & 0xff)
|
#define RGBA_GETGREEN(rgb) (((rgb) >> 8) & 0xff)
|
||||||
#define RGBA_GETBLUE(rgb) ((rgb)&0xff)
|
#define RGBA_GETBLUE(rgb) ((rgb) & 0xff)
|
||||||
#define RGBA_MAKE(r, g, b, a) ((D3DCOLOR)(((a) << 24) | ((r) << 16) | ((g) << 8) | (b)))
|
#define RGBA_MAKE(r, g, b, a) ((D3DCOLOR)(((a) << 24) | ((r) << 16) | ((g) << 8) | (b)))
|
||||||
|
|
||||||
/* D3DRGB and D3DRGBA may be used as initialisers for D3DCOLORs
|
/* D3DRGB and D3DRGBA may be used as initialisers for D3DCOLORs
|
||||||
* The float values must be in the range 0..1
|
* The float values must be in the range 0..1
|
||||||
*/
|
*/
|
||||||
#define D3DRGB(r, g, b) (0xff000000L | (((long)((r)*255)) << 16) | (((long)((g)*255)) << 8) | (long)((b)*255))
|
#define D3DRGB(r, g, b) (0xff000000L | (((long)((r) * 255)) << 16) | (((long)((g) * 255)) << 8) | (long)((b) * 255))
|
||||||
#define D3DRGBA(r, g, b, a) \
|
#define D3DRGBA(r, g, b, a) \
|
||||||
((((long)((a)*255)) << 24) | (((long)((r)*255)) << 16) | (((long)((g)*255)) << 8) | (long)((b)*255))
|
((((long)((a) * 255)) << 24) | (((long)((r) * 255)) << 16) | (((long)((g) * 255)) << 8) | (long)((b) * 255))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Format of RGB colors is
|
* Format of RGB colors is
|
||||||
@ -72,10 +72,10 @@ typedef LONG D3DFIXED;
|
|||||||
*/
|
*/
|
||||||
#define RGB_GETRED(rgb) (((rgb) >> 16) & 0xff)
|
#define RGB_GETRED(rgb) (((rgb) >> 16) & 0xff)
|
||||||
#define RGB_GETGREEN(rgb) (((rgb) >> 8) & 0xff)
|
#define RGB_GETGREEN(rgb) (((rgb) >> 8) & 0xff)
|
||||||
#define RGB_GETBLUE(rgb) ((rgb)&0xff)
|
#define RGB_GETBLUE(rgb) ((rgb) & 0xff)
|
||||||
#define RGBA_SETALPHA(rgba, x) (((x) << 24) | ((rgba)&0x00ffffff))
|
#define RGBA_SETALPHA(rgba, x) (((x) << 24) | ((rgba) & 0x00ffffff))
|
||||||
#define RGB_MAKE(r, g, b) ((D3DCOLOR)(((r) << 16) | ((g) << 8) | (b)))
|
#define RGB_MAKE(r, g, b) ((D3DCOLOR)(((r) << 16) | ((g) << 8) | (b)))
|
||||||
#define RGBA_TORGB(rgba) ((D3DCOLOR)((rgba)&0xffffff))
|
#define RGBA_TORGB(rgba) ((D3DCOLOR)((rgba) & 0xffffff))
|
||||||
#define RGB_TORGBA(rgb) ((D3DCOLOR)((rgb) | 0xff000000))
|
#define RGB_TORGBA(rgb) ((D3DCOLOR)((rgb) | 0xff000000))
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -124,7 +124,7 @@ typedef struct _DDCOLORCONTROL FAR *LPDDCOLORCONTROL;
|
|||||||
* API's
|
* API's
|
||||||
*/
|
*/
|
||||||
#if (defined(WIN32) || defined(_WIN32)) && !defined(_NO_COM)
|
#if (defined(WIN32) || defined(_WIN32)) && !defined(_NO_COM)
|
||||||
//#if defined( _WIN32 ) && !defined( _NO_ENUM )
|
// #if defined( _WIN32 ) && !defined( _NO_ENUM )
|
||||||
typedef BOOL(FAR PASCAL *LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID);
|
typedef BOOL(FAR PASCAL *LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID);
|
||||||
typedef BOOL(FAR PASCAL *LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID);
|
typedef BOOL(FAR PASCAL *LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID);
|
||||||
extern HRESULT WINAPI DirectDrawEnumerateW(LPDDENUMCALLBACKW lpCallback, LPVOID lpContext);
|
extern HRESULT WINAPI DirectDrawEnumerateW(LPDDENUMCALLBACKW lpCallback, LPVOID lpContext);
|
||||||
@ -195,12 +195,12 @@ extern HRESULT WINAPI DirectDrawCreateClipper(DWORD dwFlags, LPDIRECTDRAWCLIPPER
|
|||||||
typedef long HRESULT;
|
typedef long HRESULT;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#ifndef WINNT
|
// #ifndef WINNT
|
||||||
typedef HRESULT(FAR PASCAL *LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
|
typedef HRESULT(FAR PASCAL *LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
|
||||||
typedef HRESULT(FAR PASCAL *LPDDENUMMODESCALLBACK2)(LPDDSURFACEDESC2, LPVOID);
|
typedef HRESULT(FAR PASCAL *LPDDENUMMODESCALLBACK2)(LPDDSURFACEDESC2, LPVOID);
|
||||||
typedef HRESULT(FAR PASCAL *LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
|
typedef HRESULT(FAR PASCAL *LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
|
||||||
typedef HRESULT(FAR PASCAL *LPDDENUMSURFACESCALLBACK2)(LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2, LPVOID);
|
typedef HRESULT(FAR PASCAL *LPDDENUMSURFACESCALLBACK2)(LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2, LPVOID);
|
||||||
//#endif
|
// #endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generic pixel format with 8-bit RGB and alpha components
|
* Generic pixel format with 8-bit RGB and alpha components
|
||||||
|
@ -584,11 +584,11 @@ DECLARE_INTERFACE_(IDirectPlay2, IUnknown) {
|
|||||||
STDMETHOD(SetSessionDesc)(THIS_ LPDPSESSIONDESC2, DWORD) PURE;
|
STDMETHOD(SetSessionDesc)(THIS_ LPDPSESSIONDESC2, DWORD) PURE;
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
||||||
* IDirectPlay2 interface macros
|
* IDirectPlay2 interface macros
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||||
|
|
||||||
@ -662,11 +662,11 @@ DECLARE_INTERFACE_(IDirectPlay2, IUnknown) {
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
||||||
* IDirectPlay3 (and IDirectPlay3A) Interface
|
* IDirectPlay3 (and IDirectPlay3A) Interface
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#undef INTERFACE
|
#undef INTERFACE
|
||||||
#define INTERFACE IDirectPlay3
|
#define INTERFACE IDirectPlay3
|
||||||
@ -723,11 +723,11 @@ DECLARE_INTERFACE_(IDirectPlay3, IDirectPlay2) {
|
|||||||
STDMETHOD(GetPlayerFlags)(THIS_ DPID, LPDWORD) PURE;
|
STDMETHOD(GetPlayerFlags)(THIS_ DPID, LPDWORD) PURE;
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
||||||
* IDirectPlay3 interface macros
|
* IDirectPlay3 interface macros
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||||
|
|
||||||
@ -831,11 +831,11 @@ DECLARE_INTERFACE_(IDirectPlay3, IDirectPlay2) {
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
||||||
* IDirectPlay4 (and IDirectPlay4A) Interface
|
* IDirectPlay4 (and IDirectPlay4A) Interface
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#undef INTERFACE
|
#undef INTERFACE
|
||||||
#define INTERFACE IDirectPlay4
|
#define INTERFACE IDirectPlay4
|
||||||
@ -899,11 +899,11 @@ DECLARE_INTERFACE_(IDirectPlay4, IDirectPlay3) {
|
|||||||
STDMETHOD(CancelPriority)(THIS_ DWORD, DWORD, DWORD) PURE;
|
STDMETHOD(CancelPriority)(THIS_ DWORD, DWORD, DWORD) PURE;
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
||||||
* IDirectPlayX interface macros (for IDirectPlay4 and beyond)
|
* IDirectPlayX interface macros (for IDirectPlay4 and beyond)
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||||
|
|
||||||
@ -1172,25 +1172,25 @@ DECLARE_INTERFACE_(IDirectPlay4, IDirectPlay3) {
|
|||||||
*/
|
*/
|
||||||
#define DPENUMSESSIONS_ALL 0x00000002
|
#define DPENUMSESSIONS_ALL 0x00000002
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Start an asynchronous enum sessions
|
* Start an asynchronous enum sessions
|
||||||
*/
|
*/
|
||||||
#define DPENUMSESSIONS_ASYNC 0x00000010
|
#define DPENUMSESSIONS_ASYNC 0x00000010
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Stop an asynchronous enum sessions
|
* Stop an asynchronous enum sessions
|
||||||
*/
|
*/
|
||||||
#define DPENUMSESSIONS_STOPASYNC 0x00000020
|
#define DPENUMSESSIONS_STOPASYNC 0x00000020
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enumerate sessions even if they require a password
|
* Enumerate sessions even if they require a password
|
||||||
*/
|
*/
|
||||||
#define DPENUMSESSIONS_PASSWORDREQUIRED 0x00000040
|
#define DPENUMSESSIONS_PASSWORDREQUIRED 0x00000040
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return status about progress of enumeration instead of
|
* Return status about progress of enumeration instead of
|
||||||
* showing any status dialogs.
|
* showing any status dialogs.
|
||||||
*/
|
*/
|
||||||
#define DPENUMSESSIONS_RETURNSTATUS 0x00000080
|
#define DPENUMSESSIONS_RETURNSTATUS 0x00000080
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -1241,10 +1241,10 @@ DECLARE_INTERFACE_(IDirectPlay4, IDirectPlay3) {
|
|||||||
*/
|
*/
|
||||||
#define DPOPEN_CREATE 0x00000002
|
#define DPOPEN_CREATE 0x00000002
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return status about progress of open instead of showing
|
* Return status about progress of open instead of showing
|
||||||
* any status dialogs.
|
* any status dialogs.
|
||||||
*/
|
*/
|
||||||
#define DPOPEN_RETURNSTATUS DPENUMSESSIONS_RETURNSTATUS
|
#define DPOPEN_RETURNSTATUS DPENUMSESSIONS_RETURNSTATUS
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -1929,11 +1929,11 @@ DECLARE_INTERFACE_(IDirectPlay, IUnknown) {
|
|||||||
STDMETHOD(SetPlayerName)(THIS_ DPID, LPSTR, LPSTR) PURE;
|
STDMETHOD(SetPlayerName)(THIS_ DPID, LPSTR, LPSTR) PURE;
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
||||||
* IDirectPlay interface macros
|
* IDirectPlay interface macros
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||||
|
|
||||||
|
@ -303,11 +303,11 @@ DECLARE_INTERFACE_(IDirectPlayLobby3, IDirectPlayLobby) {
|
|||||||
STDMETHOD(WaitForConnectionSettings)(THIS_ DWORD) PURE;
|
STDMETHOD(WaitForConnectionSettings)(THIS_ DWORD) PURE;
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
||||||
* IDirectPlayLobby interface macros
|
* IDirectPlayLobby interface macros
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user