mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2024-11-23 13:02:18 +00:00
Make Grimm build
This commit is contained in:
parent
caca24cc53
commit
009b958e4a
14 changed files with 40 additions and 16 deletions
|
@ -2,10 +2,10 @@ cmake_minimum_required(VERSION 2.8...3.22 FATAL_ERROR)
|
|||
project(dhewm3sdk)
|
||||
|
||||
option(BASE "Build the base (game/) game code" ON)
|
||||
set(BASE_NAME "base" CACHE STRING "Name of the mod built from game/ (will result in \${BASE_NAME}.dll)")
|
||||
set(BASE_NAME "grimm" CACHE STRING "Name of the mod built from game/ (will result in \${BASE_NAME}.dll)")
|
||||
set(BASE_DEFS "GAME_DLL" CACHE STRING "Compiler definitions for the mod built from game/")
|
||||
|
||||
option(D3XP "Build the d3xp/ game code" ON)
|
||||
option(D3XP "Build the d3xp/ game code" OFF)
|
||||
set(D3XP_NAME "d3xp" CACHE STRING "Name of the mod built from d3xp/ (will result in \${D3XP_NAME}.dll)")
|
||||
set(D3XP_DEFS "GAME_DLL;_D3XP;CTF" CACHE STRING "Compiler definitions for the mod built from d3xp/")
|
||||
|
||||
|
@ -20,6 +20,10 @@ set(src_game_mod
|
|||
# add additional .cpp files of your mod in game/
|
||||
# (that you added to the ones already existant in the SDK/in dhewm3)
|
||||
# like "game/MyFile.cpp" (without quotes, one file per line)
|
||||
game/Grab.h
|
||||
game/Grab.cpp
|
||||
game/physics/Force_Grab.h
|
||||
game/physics/Force_Grab.cpp
|
||||
)
|
||||
|
||||
set(src_d3xp_mod
|
||||
|
|
|
@ -35,6 +35,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#include "WorldSpawn.h"
|
||||
|
||||
#include "Actor.h"
|
||||
#include "Fx.h"
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -325,8 +325,8 @@ public:
|
|||
// sikk---> Portal Sky Box
|
||||
idEntityPtr<idEntity> portalSkyEnt;
|
||||
bool portalSkyActive;
|
||||
void idGameLocal::SetPortalSkyEnt( idEntity *ent ) { portalSkyEnt = ent; }
|
||||
bool idGameLocal::IsPortalSkyAcive( void ) { return portalSkyActive; }
|
||||
void SetPortalSkyEnt( idEntity *ent ) { portalSkyEnt = ent; }
|
||||
bool IsPortalSkyAcive( void ) { return portalSkyActive; }
|
||||
pvsHandle_t GetPlayerPVS( void ) { return playerPVS; };
|
||||
// <---sikk
|
||||
|
||||
|
@ -693,4 +693,6 @@ extern const float DEFAULT_GRAVITY;
|
|||
extern const idVec3 DEFAULT_GRAVITY_VEC3;
|
||||
extern const int CINEMATIC_SKIP_DELAY;
|
||||
|
||||
#include "Entity.h"
|
||||
|
||||
#endif /* !__GAME_LOCAL_H__ */
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// sikk---> Object Manipulation
|
||||
|
||||
#include "../idlib/precompiled.h"
|
||||
#pragma hdrstop
|
||||
|
||||
#include "Game_local.h"
|
||||
#include "Grab.h"
|
||||
#include "Misc.h"
|
||||
#include "Player.h"
|
||||
#include "gamesys/SysCvar.h"
|
||||
|
||||
#define MAX_DRAG_TRACE_DISTANCE 80.0f
|
||||
#define TRACE_BOUNDS_SIZE 3.0f
|
||||
|
|
10
game/Grab.h
10
game/Grab.h
|
@ -1,3 +1,9 @@
|
|||
#ifndef _Grab_h_defined
|
||||
#define _Grab_h_defined
|
||||
|
||||
#include "Entity.h"
|
||||
#include "physics/Force_Grab.h"
|
||||
|
||||
// sikk---> Object Manipulation
|
||||
/*
|
||||
===============================================================================
|
||||
|
@ -23,7 +29,7 @@ public:
|
|||
|
||||
idEntity * GetGrabEntity( void ) const { return dragEnt.GetEntity(); }
|
||||
int GetThrownTime( void ) const { return lastThrownTime; }
|
||||
int SetThrownTime( int time ) { lastThrownTime = time; }
|
||||
void SetThrownTime( int time ) { lastThrownTime = time; }
|
||||
|
||||
private:
|
||||
idEntityPtr<idEntity> dragEnt; // entity being dragged
|
||||
|
@ -41,3 +47,5 @@ private:
|
|||
|
||||
};
|
||||
// <---sikk
|
||||
|
||||
#endif // _Grab_h_defined
|
||||
|
|
|
@ -32,6 +32,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#include "Fx.h"
|
||||
|
||||
#include "Moveable.h"
|
||||
#include "SmokeParticles.h"
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
@ -290,7 +291,7 @@ void idMoveable::Hide( void ) {
|
|||
|
||||
// grimm --> blood spray
|
||||
last_spraytime = 0;
|
||||
if ( mtr_collide.c_str() != "" && last_spraytime < gameLocal.GetTime() ) {
|
||||
if ( mtr_collide.c_str()[0] != '\0' && last_spraytime < gameLocal.GetTime() ) {
|
||||
idVec3 org = physicsObj.GetOrigin();
|
||||
gameLocal.ProjectDecal( org, GetPhysics()->GetGravity(), 128.0f, true, 96.0f, mtr_collide.c_str() );
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#include "Camera.h"
|
||||
#include "Fx.h"
|
||||
#include "Misc.h"
|
||||
#include "Moveable.h"
|
||||
|
||||
const int ASYNC_PLAYER_INV_AMMO_BITS = idMath::BitsForInteger( 999 ); // 9 bits to cover the range [0, 999]
|
||||
const int ASYNC_PLAYER_INV_CLIP_BITS = -7; // -7 bits to cover the range [-1, 60]
|
||||
|
@ -1403,7 +1404,7 @@ void idPlayer::Init( void ) {
|
|||
//grimm -->
|
||||
music_suspense = gameLocal.FindEntity("music_suspense");
|
||||
music_combat = gameLocal.FindEntity("music_combat");
|
||||
use_combat_music = gameLocal.world->spawnArgs.GetBool("use_combat_music", false);
|
||||
use_combat_music = gameLocal.world->spawnArgs.GetBool("use_combat_music", "0");
|
||||
combat_musicon = false;
|
||||
music_waittime = 0.0f;
|
||||
|
||||
|
@ -7288,7 +7289,7 @@ void idPlayer::Event_SetSlomoSound( float slomoval ) {
|
|||
idPlayer::SpawnThing( char clname );
|
||||
=================
|
||||
*/
|
||||
void idPlayer::SpawnThing( char *clname ) {
|
||||
void idPlayer::SpawnThing( const char *clname ) {
|
||||
float yaw;
|
||||
idVec3 org;
|
||||
idDict dict;
|
||||
|
|
|
@ -39,6 +39,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#include "PlayerIcon.h"
|
||||
#include "GameEdit.h"
|
||||
|
||||
#include "Grab.h"
|
||||
|
||||
class idAI;
|
||||
|
||||
/*
|
||||
|
@ -639,7 +641,7 @@ public:
|
|||
void CheckKillAccolade( void );
|
||||
int lastAccoladeCheck;
|
||||
int nextAccoladeCheck;
|
||||
void SpawnThing( char *clname );
|
||||
void SpawnThing( const char *clname );
|
||||
|
||||
// obstacle checking (move cloth etc..)
|
||||
void CheckObstacle( void );
|
||||
|
|
|
@ -37,6 +37,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#include "SmokeParticles.h"
|
||||
|
||||
#include "Projectile.h"
|
||||
#include "Fx.h"
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
@ -946,7 +947,7 @@ void idProjectile::Explode( const trace_t &collision, idEntity *ignore ) {
|
|||
}
|
||||
// sikk---> Entities hit directly by a projectile will no longer be ignored by splash damage
|
||||
// PostEventSec( &EV_RadiusDamage, delay, ignore );
|
||||
PostEventSec( &EV_RadiusDamage, delay, NULL );
|
||||
PostEventSec( &EV_RadiusDamage, delay );
|
||||
} else {
|
||||
// Event_RadiusDamage( ignore );
|
||||
Event_RadiusDamage( NULL );
|
||||
|
|
|
@ -31,6 +31,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#include "Game_local.h"
|
||||
|
||||
#include "SmokeParticles.h"
|
||||
#include "Entity.h"
|
||||
|
||||
static const char *smokeParticle_SnapshotName = "_SmokeParticle_Snapshot_";
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#include "Player.h"
|
||||
|
||||
#include "Trigger.h"
|
||||
#include "ai/AI.h"
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// sikk---> Object Manipulation
|
||||
|
||||
#include "../../idlib/precompiled.h"
|
||||
#pragma hdrstop
|
||||
|
||||
#include "Force_Grab.h"
|
||||
#include "../Game_local.h"
|
||||
|
||||
CLASS_DECLARATION( idForce, idForce_Grab )
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#ifndef __FORCE_GRAB_H__
|
||||
#define __FORCE_GRAB_H__
|
||||
|
||||
#include "physics/Force.h"
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#ifndef __LIB_H__
|
||||
#define __LIB_H__
|
||||
|
||||
#include "sys/platform.h" // dword
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
|
|
Loading…
Reference in a new issue