mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Fix a couple of minor issues
git-svn-id: https://svn.eduke32.com/eduke32@1488 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
0358aee38e
commit
dbd9e63d00
13 changed files with 63 additions and 30 deletions
|
@ -287,7 +287,7 @@ $(OBJ)/%.$o: $(SRC)/jmact/%.c
|
|||
|
||||
$(OBJ)/%.$o: $(SRC)/misc/%.rc
|
||||
$(COMPILE_STATUS)
|
||||
if windres -i $< -o $@ --include-dir=$(EINC) --include-dir=$(SRC); then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
if windres -i $< -o $@ --include-dir=$(EINC) --include-dir=$(SRC) -DPOLYMER=$(POLYMER); then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/util/%.c
|
||||
$(COMPILE_STATUS)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef _mdsprite_h_
|
||||
# define _mdsprite_h_
|
||||
|
||||
#include "hightile.h"
|
||||
|
||||
#ifdef __POWERPC__
|
||||
#define SHIFTMOD32(a) ((a)&31)
|
||||
#else
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#ifdef POLYMOST
|
||||
|
||||
#include "hightile.h"
|
||||
|
||||
#define CULL_OFFSET 384
|
||||
#define CULL_DELAY 2
|
||||
#define MAXCULLCHECKS 1024
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#include "winlayer.h"
|
||||
#endif
|
||||
|
||||
#include "polymost.h"
|
||||
|
||||
char scantoasc[128] =
|
||||
{
|
||||
0,0,'1','2','3','4','5','6','7','8','9','0','-','=',0,0,
|
||||
|
|
|
@ -9907,8 +9907,10 @@ void setbrightness(char dabrightness, uint8_t *dapal, char noapply)
|
|||
gltexinvalidateall();
|
||||
if (!(noapply&8) && (newpalettesum != lastpalettesum))
|
||||
gltexinvalidate8();
|
||||
#ifdef POLYMER
|
||||
if ((rendmode == 4) && (newpalettesum != lastpalettesum))
|
||||
polymer_texinvalidate();
|
||||
#endif
|
||||
lastpalettesum = newpalettesum;
|
||||
}
|
||||
#endif
|
||||
|
@ -11937,13 +11939,13 @@ int32_t setrendermode(int32_t renderer)
|
|||
UNREFERENCED_PARAMETER(renderer);
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
if (bpp == 8) renderer = 0;
|
||||
else renderer = min(4,max(3,renderer));
|
||||
# ifdef POLYMER
|
||||
else renderer = min(4,max(3,renderer));
|
||||
|
||||
if (renderer == 4)
|
||||
polymer_init();
|
||||
# else
|
||||
if (renderer == 4)
|
||||
renderer = 3;
|
||||
else renderer = 3;
|
||||
# endif
|
||||
|
||||
rendmode = renderer;
|
||||
|
|
|
@ -812,12 +812,15 @@ int32_t initinput(void)
|
|||
joyisgamepad=0, joynumaxes=0, joynumbuttons=0, joynumhats=0;
|
||||
|
||||
{
|
||||
TCHAR layoutname[KL_NAMELENGTH];
|
||||
// GetKeyboardLayoutName(layoutname);
|
||||
// initprintf(" * Keyboard layout: %s\n",layoutname);
|
||||
LoadKeyboardLayout("00000409", KLF_ACTIVATE|KLF_SETFORPROCESS|KLF_SUBSTITUTE_OK);
|
||||
char layoutname[KL_NAMELENGTH];
|
||||
GetKeyboardLayoutName(layoutname);
|
||||
initprintf("Using keyboard layout %s\n",layoutname);
|
||||
if (Bstrcmp(layoutname, "00000409"))
|
||||
{
|
||||
initprintf("Switching kb layout from %s ",layoutname);
|
||||
i = LoadKeyboardLayout("00000409", KLF_ACTIVATE|KLF_SETFORPROCESS|KLF_SUBSTITUTE_OK);
|
||||
GetKeyboardLayoutName(layoutname);
|
||||
initprintf("to %s\n",layoutname);
|
||||
}
|
||||
}
|
||||
|
||||
if (InitDirectInput())
|
||||
|
|
|
@ -697,10 +697,8 @@ inline void G_AddGameLight(int32_t radius, int32_t srcsprite, int32_t zoffset, i
|
|||
|
||||
#else
|
||||
UNREFERENCED_PARAMETER(radius);
|
||||
UNREFERENCED_PARAMETER(sector);
|
||||
UNREFERENCED_PARAMETER(x);
|
||||
UNREFERENCED_PARAMETER(y);
|
||||
UNREFERENCED_PARAMETER(z);
|
||||
UNREFERENCED_PARAMETER(srcsprite);
|
||||
UNREFERENCED_PARAMETER(zoffset);
|
||||
UNREFERENCED_PARAMETER(range);
|
||||
UNREFERENCED_PARAMETER(color);
|
||||
UNREFERENCED_PARAMETER(priority);
|
||||
|
|
|
@ -52,7 +52,7 @@ extern "C" {
|
|||
#include "macros.h"
|
||||
|
||||
#define APPNAME "EDuke32"
|
||||
#define VERSION " 2.0.0unstable"
|
||||
#define VERSION " 1.5.0unstable"
|
||||
// this is checked against http://eduke32.com/VERSION
|
||||
extern const char *s_buildDate;
|
||||
#define HEAD2 APPNAME VERSION
|
||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
//-------------------------------------------------------------------------
|
||||
#include "duke3d.h"
|
||||
|
||||
const char *s_buildDate = "20090708";
|
||||
const char *s_buildDate = "20090807";
|
||||
char *MusicPtr = NULL;
|
||||
int32_t g_musicSize;
|
||||
|
||||
|
|
|
@ -25,8 +25,9 @@ BEGIN
|
|||
CONTROL "&Video mode:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 6, 50, 8
|
||||
CONTROL "", IDCVMODE, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 60, 4, 86, 56
|
||||
CONTROL "&Fullscreen", IDCFULLSCREEN, "BUTTON", BS_CHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 154, 6, 46, 10
|
||||
#ifdef POLYMER
|
||||
CONTROL "&Polymer", IDCPOLYMER, "BUTTON", BS_CHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 203, 6, 40, 10
|
||||
|
||||
#endif
|
||||
CONTROL "Input devices:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 20, 50, 8
|
||||
CONTROL "", IDCINPUT, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 60, 19, 86, 56
|
||||
CONTROL "&Game:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 35, 100, 8
|
||||
|
|
|
@ -172,8 +172,10 @@ static void A_HitscanProjTrail(const vec3_t *sv, const vec3_t *dv, int32_t ang,
|
|||
srcvect.y += destvect.y;
|
||||
srcvect.z += destvect.z;
|
||||
updatesector(srcvect.x,srcvect.y,§);
|
||||
if (sect < 0)
|
||||
break;
|
||||
getzsofslope(sect,srcvect.x,srcvect.y,&n,&j);
|
||||
if (sect < 0 || srcvect.z > j || srcvect.z < n)
|
||||
if (srcvect.z > j || srcvect.z < n)
|
||||
break;
|
||||
j = A_InsertSprite(sect,srcvect.x,srcvect.y,srcvect.z,ProjectileData[atwith].trail,-32,ProjectileData[atwith].txrepeat,ProjectileData[atwith].tyrepeat,ang,0,0,g_player[0].ps->i,0);
|
||||
changespritestat(j,1);
|
||||
|
@ -4068,7 +4070,7 @@ void P_ProcessInput(int32_t snum)
|
|||
if (p->scream_voice >= FX_Ok)
|
||||
{
|
||||
FX_StopSound(p->scream_voice);
|
||||
S_TestSoundCallback(DUKE_SCREAM);
|
||||
// S_TestSoundCallback(DUKE_SCREAM);
|
||||
p->scream_voice = -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -2959,7 +2959,7 @@ CHECKINV1:
|
|||
if (p->scream_voice >= FX_Ok)
|
||||
{
|
||||
FX_StopSound(p->scream_voice);
|
||||
S_TestSoundCallback(DUKE_SCREAM);
|
||||
// S_TestSoundCallback(DUKE_SCREAM);
|
||||
p->scream_voice = -1;
|
||||
}
|
||||
|
||||
|
@ -3106,7 +3106,6 @@ void P_CheckSectors(int32_t snum)
|
|||
|
||||
if (!TEST_SYNC_KEY(g_player[snum].sync->bits, SK_OPEN) && !TEST_SYNC_KEY(g_player[snum].sync->bits, SK_ESCAPE))
|
||||
p->toggle_key_flag = 0;
|
||||
|
||||
else if (!p->toggle_key_flag)
|
||||
{
|
||||
|
||||
|
|
|
@ -338,13 +338,25 @@ int32_t S_PlayMusic(const char *fn, const int32_t sel)
|
|||
}
|
||||
while (0);
|
||||
|
||||
if (fp < 0) return 0;
|
||||
if (fp < 0)
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "S_PlayMusic(): error: can't open '%s' for playback!",fn);
|
||||
return 0;
|
||||
}
|
||||
|
||||
S_StopMusic();
|
||||
|
||||
g_musicSize = MusicLen = kfilelength(fp);
|
||||
MusicLen = kfilelength(fp);
|
||||
MusicPtr = (char *) Bmalloc(MusicLen);
|
||||
kread(fp, MusicPtr, MusicLen);
|
||||
|
||||
if ((g_musicSize = kread(fp, (char *)MusicPtr, MusicLen)) != MusicLen)
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "S_PlayMusic(): error: read %d bytes from '%s', needed %d\n",g_musicSize, fn, MusicLen);
|
||||
kclose(fp);
|
||||
g_musicSize = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
kclose(fp);
|
||||
|
||||
if (!Bmemcmp(MusicPtr, "MThd", 4))
|
||||
|
@ -354,20 +366,23 @@ int32_t S_PlayMusic(const char *fn, const int32_t sel)
|
|||
}
|
||||
else
|
||||
{
|
||||
MusicVoice = FX_PlayLoopedAuto(MusicPtr, MusicLen, 0, 0, 0, ud.config.MusicVolume,
|
||||
ud.config.MusicVolume, ud.config.MusicVolume,
|
||||
FX_MUSIC_PRIORITY, MUSIC_ID);
|
||||
MusicIsWaveform = 1;
|
||||
if ((MusicVoice = FX_PlayLoopedAuto(MusicPtr, MusicLen, 0, 0, 0, ud.config.MusicVolume,
|
||||
ud.config.MusicVolume, ud.config.MusicVolume,
|
||||
FX_MUSIC_PRIORITY, MUSIC_ID)) >= FX_Ok)
|
||||
MusicIsWaveform = 1;
|
||||
}
|
||||
return (alt != 0);
|
||||
}
|
||||
|
||||
void S_StopMusic(void)
|
||||
{
|
||||
MusicPaused = 0;
|
||||
|
||||
if (MusicIsWaveform && MusicVoice >= 0)
|
||||
{
|
||||
FX_StopSound(MusicVoice);
|
||||
MusicVoice = -1;
|
||||
MusicIsWaveform = 0;
|
||||
}
|
||||
|
||||
MUSIC_StopSong();
|
||||
|
@ -437,7 +452,7 @@ int32_t S_PlaySound3D(int32_t num, int32_t i, const vec3_t *pos)
|
|||
{
|
||||
voice = S_PlaySound(num);
|
||||
|
||||
if (voice >= FX_Ok && g_sounds[num].num < SOUNDMAX)
|
||||
if (voice >= FX_Ok && g_sounds[num].num < SOUNDMAX && i >= 0 && i < MAXSPRITES)
|
||||
{
|
||||
g_sounds[num].SoundOwner[g_sounds[num].num].i = i;
|
||||
g_sounds[num].SoundOwner[g_sounds[num].num].voice = voice;
|
||||
|
@ -640,7 +655,7 @@ void S_StopSound(int32_t num)
|
|||
if (num >= 0 && num < MAXSOUNDS && g_sounds[num].num > 0)
|
||||
{
|
||||
FX_StopSound(g_sounds[num].SoundOwner[g_sounds[num].num-1].voice);
|
||||
S_TestSoundCallback(num);
|
||||
// S_TestSoundCallback(num);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -657,7 +672,7 @@ void S_StopEnvSound(int32_t num,int32_t i)
|
|||
if (g_sounds[num].SoundOwner[j].i == i)
|
||||
{
|
||||
FX_StopSound(g_sounds[num].SoundOwner[j].voice);
|
||||
S_TestSoundCallback(num);
|
||||
// S_TestSoundCallback(num);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -694,6 +709,13 @@ void S_Pan3D(void)
|
|||
{
|
||||
i = g_sounds[j].SoundOwner[k].i;
|
||||
|
||||
if (i < 0 || i >= MAXSPRITES)
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "S_Pan3D(): INTERNAL ERROR: invalid id %d!\n",i);
|
||||
k--;
|
||||
continue;
|
||||
}
|
||||
|
||||
Bmemcpy(&s, &sprite[i], sizeof(vec3_t));
|
||||
|
||||
if (PN == APLAYER && sprite[i].yvel == screenpeek)
|
||||
|
|
Loading…
Reference in a new issue