- started fixing things.

This commit is contained in:
Christoph Oelckers 2019-11-24 00:04:15 +01:00
parent 9ce8d5156c
commit 6280b0b516
8 changed files with 30 additions and 87 deletions

View file

@ -90,6 +90,7 @@ int MV_VoicesPlaying(void);
int MV_VoiceAvailable(int priority);
int MV_SetPitch(int handle, int pitchoffset);
int MV_SetFrequency(int handle, int frequency);
int32_t MV_GetFrequency(int32_t handle, int32_t* frequency);
int MV_PauseVoice(int handle, int pause);
int MV_EndLooping(int handle);
int MV_SetPan(int handle, int vol, int left, int right);

View file

@ -55,12 +55,14 @@ enum GameFunction_t
gamefunc_Shrink_Screen,
gamefunc_Enlarge_Screen,
gamefunc_Center_View,
gamefunc_Look_Straight = gamefunc_Center_View,
gamefunc_Holster_Weapon,
gamefunc_Show_Opponents_Weapon,
gamefunc_Map_Follow_Mode,
gamefunc_See_Coop_View,
gamefunc_See_Co_Op_View = gamefunc_See_Coop_View,
gamefunc_Mouse_Aiming,
gamefunc_Mouseview = gamefunc_Mouse_Aiming,
gamefunc_Toggle_Crosshair,
gamefunc_Steroids,
gamefunc_Quick_Kick,
@ -87,10 +89,15 @@ enum GameFunction_t
gamefunc_Flash_Bomb,
gamefunc_Caltrops,
gamefunc_Zoom_In, // Map controls should not pollute the global button namespace.
gamefunc_Zoom_Out,
gamefunc_Escape, // this shouldn't be a button.
NUMGAMEFUNCTIONS
};
// Actions
struct FButtonStatus
{

View file

@ -15,6 +15,8 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
//-------------------------------------------------------------------------
#if 0
#include "ns.h"
#include "compat.h"
#include "renderlayer.h"
@ -264,9 +266,7 @@ void SetupGameButtons()
CONTROL_DefineFlag(gamefunc_Weapon_5, kFalse);
CONTROL_DefineFlag(gamefunc_Weapon_6, kFalse);
CONTROL_DefineFlag(gamefunc_Weapon_7, kFalse);
CONTROL_DefineFlag(gamefunc_Pause, kFalse);
CONTROL_DefineFlag(gamefunc_Map, kFalse);
CONTROL_DefineFlag(gamefunc_Gamma_Correction, kFalse);
CONTROL_DefineFlag(gamefunc_Escape, kFalse);
CONTROL_DefineFlag(gamefunc_Shrink_Screen, kFalse);
CONTROL_DefineFlag(gamefunc_Enlarge_Screen, kFalse);
@ -276,8 +276,6 @@ void SetupGameButtons()
CONTROL_DefineFlag(gamefunc_Inventory_Right, kFalse);
CONTROL_DefineFlag(gamefunc_Mouseview, kFalse);
CONTROL_DefineFlag(gamefunc_Inventory, kFalse);
CONTROL_DefineFlag(gamefunc_Mouse_Sensitivity_Up, kFalse);
CONTROL_DefineFlag(gamefunc_Mouse_Sensitivity_Down, kFalse);
}
hashtable_t h_gamefuncs = { kMaxGameFunctions<<1, NULL };
@ -1019,3 +1017,4 @@ void CONFIG_WriteSetup(uint32_t flags)
Bfflush(NULL);
}
END_PS_NS
#endif

View file

@ -20,6 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define __config_h__
#include "compat.h"
#include "gamecontrol.h"
BEGIN_PS_NS
@ -50,48 +51,6 @@ extern const char gamefunctions[kMaxGameFunctions][kMaxGameFuncLen];
extern const char keydefaults[kMaxGameFunctions*2][kMaxGameFuncLen];
extern const char oldkeydefaults[kMaxGameFunctions*2][kMaxGameFuncLen];
enum {
gamefunc_Move_Forward, // 0
gamefunc_Move_Backward, // 1
gamefunc_Turn_Left,
gamefunc_Turn_Right,
gamefunc_Strafe,
gamefunc_Strafe_Left,
gamefunc_Strafe_Right,
gamefunc_Run, // 7
gamefunc_Jump, // 8
gamefunc_Crouch, // 9
gamefunc_Fire, // 10
gamefunc_Open, // 11
gamefunc_Look_Up, // 12
gamefunc_Look_Down,
gamefunc_Look_Straight,
gamefunc_Aim_Up,
gamefunc_Aim_Down,
gamefunc_SendMessage,
gamefunc_Weapon_1,
gamefunc_Weapon_2,
gamefunc_Weapon_3,
gamefunc_Weapon_4,
gamefunc_Weapon_5,
gamefunc_Weapon_6,
gamefunc_Weapon_7,
gamefunc_Mouseview,
gamefunc_Pause,
gamefunc_Map,
gamefunc_Zoom_In,
gamefunc_Zoom_Out,
gamefunc_Gamma_Correction,
gamefunc_Escape,
gamefunc_Shrink_Screen,
gamefunc_Enlarge_Screen,
gamefunc_Inventory,
gamefunc_Inventory_Left,
gamefunc_Inventory_Right,
gamefunc_Mouse_Sensitivity_Up,
gamefunc_Mouse_Sensitivity_Down,
gamefunc_Show_Console,
};
typedef struct {
int32_t usejoystick;

View file

@ -21,6 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//#include <io.h>
//#include <fcntl.h>
#include <malloc.h>
#include "gamecvars.h"
// static int globhiz, globloz, globhihit, globlohit;
@ -122,6 +123,16 @@ void printext(int x, int y, const char *buffer, short tilenum, char invisiblecol
#endif
}
void doTileLoad(int i)
{
tileLoad(i);
#ifdef USE_OPENGL
if (r_precache) PrecacheHardwareTextures(i);
#endif
}
void precache()
{
int i;
@ -129,15 +140,15 @@ void precache()
for (i = 0; i < numsectors; i++)
{
short j = sector[i].ceilingpicnum;
if (waloff[j] == 0) tileLoad(j);
doTileLoad(j);
j = sector[i].floorpicnum;
if (waloff[j] == 0) tileLoad(j);
doTileLoad(j);
}
for (i = 0; i < numwalls; i++)
{
short j = wall[i].picnum;
if (waloff[j] == 0) tileLoad(j);
doTileLoad(j);
}
for (i = 0; i < kMaxSprites; i++)
@ -145,7 +156,7 @@ void precache()
if (sprite[i].statnum < kMaxStatus)
{
short j = sprite[i].picnum;
if (waloff[j] == 0) tileLoad(j);
doTileLoad(j);
}
}
}

View file

@ -77,10 +77,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <time.h>
#include <assert.h>
#ifdef _WIN32
# include "winbits.h"
#endif /* _WIN32 */
BEGIN_PS_NS
@ -1445,27 +1441,8 @@ void CheckKeys()
CONTROL_ClearButton(gamefunc_Enlarge_Screen);
}
// if (BUTTON(gamefunc_Mouse_Sensitivity_Up))
// {
// if (lMouseSens < 64)
// lMouseSens++;
//
// CONTROL_ClearButton(gamefunc_Mouse_Sensitivity_Up);
// StatusMessage(500, "MOUSE SENSITIVITY SET TO %d", lMouseSens);
// }
// else
// {
// if (BUTTON(gamefunc_Mouse_Sensitivity_Down))
// {
// if (lMouseSens >= 1)
// lMouseSens -= 1;
//
// CONTROL_ClearButton(gamefunc_Mouse_Sensitivity_Down);
// StatusMessage(500, "MOUSE SENSITIVITY SET TO %d", lMouseSens);
// }
// }
// F11?
#if 0
if (BUTTON(gamefunc_Gamma_Correction))
{
nGamma++;
@ -1475,6 +1452,7 @@ void CheckKeys()
mysetbrightness((uint8_t)nGamma);
CONTROL_ClearButton(gamefunc_Gamma_Correction);
#endif
}
if (BUTTON(gamefunc_Shrink_Screen))

View file

@ -21,7 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "compat.h"
#include "cache1d.h"
#include "vfs.h"
#include "grpscan.h"
BEGIN_PS_NS
@ -32,14 +31,6 @@ BEGIN_PS_NS
void handleevents();
#endif
#ifndef APPNAME
#define APPNAME "PCExhumed"
#endif
#ifndef APPBASENAME
#define APPBASENAME "pcexhumed"
#endif
// TODO:
#define OSDTEXT_DEFAULT "^00"
#define OSDTEXT_DARKRED "^00"
@ -115,7 +106,6 @@ void UpdateScreenSize();
void HandleAsync();
extern buildvfs_kfd kopen4loadfrommod(const char* filename, char searchfirst);
extern int32_t g_commandSetup;
extern int32_t g_noSetup;

View file

@ -25,12 +25,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "exhumed.h"
#include "common.h"
#include "compat.h"
#include "crc32.h"
//#include "crc32.h"
#include "grpscan.h"
#include "scriptfile.h"
#include "vfs.h"
BEGIN_PS_NS