Skip to content

Commit

Permalink
Assorted fixes and cleanups.
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard authored and unknownbrackets committed Mar 6, 2016
1 parent 9d8d810 commit 58b07e0
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 6 deletions.
1 change: 1 addition & 0 deletions GPU/Common/GPUStateUtils.cpp
Expand Up @@ -937,6 +937,7 @@ void ConvertBlendState(GenericBlendState &blendState, bool allowShaderBlend) {
blendState.applyShaderBlending = false;
blendState.dirtyShaderBlend = false;
blendState.useBlendColor = false;
blendState.replaceAlphaWithStencil = REPLACE_ALPHA_NO;

ReplaceBlendType replaceBlend = ReplaceBlendWithShader(allowShaderBlend, gstate.FrameBufFormat());
ReplaceAlphaType replaceAlphaWithStencil = ReplaceAlphaWithStencil(replaceBlend);
Expand Down
2 changes: 1 addition & 1 deletion GPU/Common/TextureCacheCommon.cpp
Expand Up @@ -75,7 +75,7 @@ int TextureCacheCommon::AttachedDrawingHeight() {

void TextureCacheCommon::GetSamplingParams(int &minFilt, int &magFilt, bool &sClamp, bool &tClamp, float &lodBias, u8 maxLevel) {
minFilt = gstate.texfilter & 0x7;
magFilt = (gstate.texfilter>>8) & 1;
magFilt = (gstate.texfilter >> 8) & 1;
sClamp = gstate.isTexCoordClampedS();
tClamp = gstate.isTexCoordClampedT();

Expand Down
4 changes: 4 additions & 0 deletions GPU/Common/TextureCacheCommon.h
Expand Up @@ -17,8 +17,12 @@

#pragma once

#include <map>
#include <vector>

#include "Common/CommonTypes.h"
#include "GPU/Common/GPUDebugInterface.h"
#include "Common/MemoryUtil.h"

enum TextureFiltering {
TEX_FILTER_AUTO = 1,
Expand Down
1 change: 0 additions & 1 deletion GPU/Common/VertexDecoderCommon.h
Expand Up @@ -75,7 +75,6 @@ struct DecVtxFormat {
short stride;
};

// This struct too.
struct TransformedVertex
{
union {
Expand Down
17 changes: 17 additions & 0 deletions Windows/GPU/D3D9Context.h
@@ -1,3 +1,20 @@
// Copyright (c) 2015- PPSSPP Project.

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0 or later versions.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.

// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/

// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.

// Modelled on OpenD3DBase. Might make a cleaner interface later.

#pragma once
Expand Down
2 changes: 1 addition & 1 deletion ext/native/gfx_es2/draw_text.cpp
Expand Up @@ -186,7 +186,7 @@ void TextDrawer::DrawString(DrawBuffer &target, const char *str, float x, float
for (int y = 0; y < entry->bmHeight; y++) {
for (int x = 0; x < entry->bmWidth; x++) {
BYTE bAlpha = (BYTE)((ctx_->pBitmapBits[MAX_TEXT_WIDTH * y + x] & 0xff) >> 4);
bitmapData[entry->bmWidth * y + x] = (bAlpha) | 0xfff0; // ^ rand();
bitmapData[entry->bmWidth * y + x] = (bAlpha) | 0xfff0;
}
}
entry->texture->SetImageData(0, 0, 0, entry->bmWidth, entry->bmHeight, 1, 0, entry->bmWidth * 2, (const uint8_t *)bitmapData);
Expand Down
3 changes: 0 additions & 3 deletions ext/native/native.vcxproj.filters
Expand Up @@ -768,9 +768,6 @@
<Filter Include="file">
<UniqueIdentifier>{49afd06e-eb44-41ac-b038-e109e444a834}</UniqueIdentifier>
</Filter>
<Filter Include="collision">
<UniqueIdentifier>{a52d761c-4c72-4261-be17-50d071bd5cc8}</UniqueIdentifier>
</Filter>
<Filter Include="base">
<UniqueIdentifier>{95e41110-57a2-497f-a938-b4c8e9dd6a27}</UniqueIdentifier>
</Filter>
Expand Down

0 comments on commit 58b07e0

Please sign in to comment.