mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
# Conflicts: # src/CMakeLists.txt
This commit is contained in:
commit
34216ddd8e
12 changed files with 41 additions and 34 deletions
|
@ -1244,11 +1244,14 @@ endif()
|
|||
|
||||
if( MSVC )
|
||||
option( ZDOOM_GENERATE_MAPFILE "Generate .map file for debugging." OFF )
|
||||
set( LINKERSTUFF "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\"" )
|
||||
if( ZDOOM_GENERATE_MAPFILE )
|
||||
set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\" /DELAYLOAD:\"libmpg123-0.dll\" /DELAYLOAD:\"libsndfile-1.dll\" /MAP")
|
||||
else()
|
||||
set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\" /DELAYLOAD:\"libmpg123-0.dll\" /DELAYLOAD:\"libsndfile-1.dll\"")
|
||||
set( LINKERSTUFF ${LINKERSTUFF} "/MAP" )
|
||||
endif()
|
||||
if( NOT NO_OPENAL )
|
||||
set( LINKERSTUFF ${LINKERSTUFF} "/DELAYLOAD:\"libmpg123-0.dll\" /DELAYLOAD:\"libsndfile-1.dll\"" )
|
||||
endif()
|
||||
set_target_properties(zdoom PROPERTIES LINK_FLAGS ${LINKERSTUFF})
|
||||
|
||||
add_custom_command(TARGET zdoom POST_BUILD
|
||||
COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\win32\\zdoom.exe.manifest\" -outputresource:\"$<TARGET_FILE:zdoom>\"\;\#1
|
||||
|
|
|
@ -225,7 +225,7 @@ public:
|
|||
|
||||
void SetSelection(int Selection)
|
||||
{
|
||||
float f = fabs(SELECTED_JOYSTICK->GetAxisScale(mAxis));
|
||||
float f = fabsf(SELECTED_JOYSTICK->GetAxisScale(mAxis));
|
||||
if (Selection) f*=-1;
|
||||
SELECTED_JOYSTICK->SetAxisScale(mAxis, f);
|
||||
}
|
||||
|
|
|
@ -2305,7 +2305,7 @@ void P_PlayerThink (player_t *player)
|
|||
{
|
||||
// A negative scale is used to prevent G_AddViewAngle/G_AddViewPitch
|
||||
// from scaling with the FOV scale.
|
||||
desired *= fabs(player->ReadyWeapon->FOVScale);
|
||||
desired *= fabsf(player->ReadyWeapon->FOVScale);
|
||||
}
|
||||
if (player->FOV != desired)
|
||||
{
|
||||
|
|
|
@ -2311,9 +2311,9 @@ void FMODSoundRenderer::UpdateListener(SoundListener *listener)
|
|||
pos.z = listener->position.Z;
|
||||
|
||||
float angle = listener->angle;
|
||||
forward.x = cos(angle);
|
||||
forward.x = cosf(angle);
|
||||
forward.y = 0;
|
||||
forward.z = sin(angle);
|
||||
forward.z = sinf(angle);
|
||||
|
||||
up.x = 0;
|
||||
up.y = 1;
|
||||
|
|
|
@ -175,7 +175,7 @@ int WinMIDIDevice::GetTechnology() const
|
|||
|
||||
int WinMIDIDevice::SetTempo(int tempo)
|
||||
{
|
||||
MIDIPROPTEMPO data = { sizeof(MIDIPROPTEMPO), tempo };
|
||||
MIDIPROPTEMPO data = { sizeof(MIDIPROPTEMPO), (DWORD)tempo };
|
||||
return midiStreamProperty(MidiOut, (LPBYTE)&data, MIDIPROP_SET | MIDIPROP_TEMPO);
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ int WinMIDIDevice::SetTempo(int tempo)
|
|||
|
||||
int WinMIDIDevice::SetTimeDiv(int timediv)
|
||||
{
|
||||
MIDIPROPTIMEDIV data = { sizeof(MIDIPROPTIMEDIV), timediv };
|
||||
MIDIPROPTIMEDIV data = { sizeof(MIDIPROPTIMEDIV), (DWORD)timediv };
|
||||
return midiStreamProperty(MidiOut, (LPBYTE)&data, MIDIPROP_SET | MIDIPROP_TIMEDIV);
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
* T is the enum type of individual flags,
|
||||
* TT is the underlying integer type used (defaults to DWORD)
|
||||
*/
|
||||
template<typename T, typename TT = DWORD>
|
||||
template<typename T, typename TT = uint32>
|
||||
class TFlags
|
||||
{
|
||||
struct ZeroDummy {};
|
||||
|
|
|
@ -5553,7 +5553,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_DropItem)
|
|||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetSpeed)
|
||||
{
|
||||
PARAM_ACTION_PROLOGUE;
|
||||
PARAM_INT(speed);
|
||||
PARAM_FIXED(speed);
|
||||
PARAM_INT_OPT(ptr) { ptr = AAPTR_DEFAULT; }
|
||||
|
||||
AActor *ref = COPY_AAPTR(self, ptr);
|
||||
|
@ -5573,7 +5573,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetSpeed)
|
|||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetFloatSpeed)
|
||||
{
|
||||
PARAM_ACTION_PROLOGUE;
|
||||
PARAM_INT(speed);
|
||||
PARAM_FIXED(speed);
|
||||
PARAM_INT_OPT(ptr) { ptr = AAPTR_DEFAULT; }
|
||||
|
||||
AActor *ref = COPY_AAPTR(self, ptr);
|
||||
|
|
|
@ -143,11 +143,13 @@ FxExpression *FxExpression::Resolve(FCompileContext &ctx)
|
|||
|
||||
FxExpression *FxExpression::ResolveAsBoolean(FCompileContext &ctx)
|
||||
{
|
||||
///FIXME: Use an actual boolean type
|
||||
FxExpression *x = Resolve(ctx);
|
||||
if (x != NULL)
|
||||
{
|
||||
switch (x->ValueType.Type)
|
||||
{
|
||||
case VAL_Int:
|
||||
case VAL_Sound:
|
||||
case VAL_Color:
|
||||
case VAL_Name:
|
||||
|
@ -155,6 +157,9 @@ FxExpression *FxExpression::ResolveAsBoolean(FCompileContext &ctx)
|
|||
break;
|
||||
|
||||
default:
|
||||
ScriptPosition.Message(MSG_ERROR, "Not an integral type");
|
||||
delete this;
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2140,7 +2145,6 @@ FxExpression *FxRandomPick::Resolve(FCompileContext &ctx)
|
|||
|
||||
ExpEmit FxRandomPick::Emit(VMFunctionBuilder *build)
|
||||
{
|
||||
#pragma message("FxRandomPick::Emit: Floating point part needs reviewing!")
|
||||
unsigned i;
|
||||
|
||||
assert(choices.Size() > 0);
|
||||
|
@ -2166,6 +2170,14 @@ ExpEmit FxRandomPick::Emit(VMFunctionBuilder *build)
|
|||
// automatically pick it as the destination register for each case.
|
||||
resultreg.Free(build);
|
||||
|
||||
// For floating point results, we need to get a new register, since we can't
|
||||
// reuse the integer one used to store the random result.
|
||||
if (ValueType == VAL_Float)
|
||||
{
|
||||
resultreg = ExpEmit(build, REGT_FLOAT);
|
||||
resultreg.Free(build);
|
||||
}
|
||||
|
||||
// Allocate space for the jump table.
|
||||
size_t jumptable = build->Emit(OP_JMP, 0);
|
||||
for (i = 1; i < choices.Size(); ++i)
|
||||
|
@ -2188,8 +2200,7 @@ ExpEmit FxRandomPick::Emit(VMFunctionBuilder *build)
|
|||
else
|
||||
{
|
||||
double val = static_cast<FxConstant *>(choices[i])->GetValue().GetFloat();
|
||||
build->Emit(OP_PARAM, 0, REGT_FLOAT | REGT_KONST, build->GetConstantFloat(val));
|
||||
build->ParamChange(-1); // all params should use the same register here.
|
||||
build->Emit(OP_LKF, resultreg.RegNum, build->GetConstantFloat(val));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2200,14 +2211,7 @@ ExpEmit FxRandomPick::Emit(VMFunctionBuilder *build)
|
|||
// was expected. Copy it to the one we wanted.
|
||||
|
||||
resultreg.Reuse(build); // This is really just for the assert in Reuse()
|
||||
if (ValueType == VAL_Int)
|
||||
{
|
||||
build->Emit(OP_MOVE, resultreg.RegNum, casereg.RegNum, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
build->Emit(OP_MOVEF, resultreg.RegNum, casereg.RegNum, 0);
|
||||
}
|
||||
build->Emit(ValueType == VAL_Int ? OP_MOVE : OP_MOVEF, resultreg.RegNum, casereg.RegNum, 0);
|
||||
resultreg.Free(build);
|
||||
}
|
||||
// Free this register so the remaining cases can use it.
|
||||
|
|
|
@ -190,7 +190,7 @@ void SF2Envelope::Release(Voice *v)
|
|||
if (stage == SF2_ATTACK)
|
||||
{
|
||||
// The attack stage does not use an attenuation in cB like all the rest.
|
||||
volume = log10(volume) * -200;
|
||||
volume = float(log10(volume) * -200);
|
||||
}
|
||||
stage = SF2_RELEASE;
|
||||
bUpdating = true;
|
||||
|
|
|
@ -94,7 +94,7 @@ void Renderer::recompute_freq(int v)
|
|||
if (ch->pitchfactor == 0)
|
||||
{
|
||||
/* Damn. Somebody bent the pitch. */
|
||||
ch->pitchfactor = pow(2.f, ((abs(pb) * ch->pitchsens) / (8191.f * 1200.f)));
|
||||
ch->pitchfactor = float(pow(2.f, ((abs(pb) * ch->pitchsens) / (8191.f * 1200.f))));
|
||||
}
|
||||
if (pb < 0)
|
||||
{
|
||||
|
|
|
@ -1487,10 +1487,10 @@ void D3DFB::DoOffByOneCheck ()
|
|||
float texbot = 1.f / float(FBHeight);
|
||||
FBVERTEX verts[4] =
|
||||
{
|
||||
{ -0.5f, -0.5f, 0.5f, 1.f, 0, ~0, 0.f, 0.f },
|
||||
{ 255.5f, -0.5f, 0.5f, 1.f, 0, ~0, texright, 0.f },
|
||||
{ 255.5f, 0.5f, 0.5f, 1.f, 0, ~0, texright, texbot },
|
||||
{ -0.5f, 0.5f, 0.5f, 1.f, 0, ~0, 0.f, texbot }
|
||||
{ -0.5f, -0.5f, 0.5f, 1.f, D3DCOLOR_RGBA(0,0,0,0), D3DCOLOR_RGBA(255,255,255,255), 0.f, 0.f },
|
||||
{ 255.5f, -0.5f, 0.5f, 1.f, D3DCOLOR_RGBA(0,0,0,0), D3DCOLOR_RGBA(255,255,255,255), texright, 0.f },
|
||||
{ 255.5f, 0.5f, 0.5f, 1.f, D3DCOLOR_RGBA(0,0,0,0), D3DCOLOR_RGBA(255,255,255,255), texright, texbot },
|
||||
{ -0.5f, 0.5f, 0.5f, 1.f, D3DCOLOR_RGBA(0,0,0,0), D3DCOLOR_RGBA(255,255,255,255), 0.f, texbot }
|
||||
};
|
||||
int i, c;
|
||||
|
||||
|
|
|
@ -1424,8 +1424,8 @@ static HCURSOR CreateBitmapCursor(int xhot, int yhot, HBITMAP and_mask, HBITMAP
|
|||
ICONINFO iconinfo =
|
||||
{
|
||||
FALSE, // fIcon
|
||||
xhot, // xHotspot
|
||||
yhot, // yHotspot
|
||||
(DWORD)xhot, // xHotspot
|
||||
(DWORD)yhot, // yHotspot
|
||||
and_mask, // hbmMask
|
||||
color_mask // hbmColor
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue