Fix compiling in Linux for the most part
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@732 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
3d25b525dd
commit
d98c60a0da
|
@ -20,6 +20,9 @@
|
|||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -75,9 +78,8 @@ CPBView::CPBView(wxWindow* parent, const wxWindowID id, const wxPoint& pos, cons
|
|||
|
||||
// Print values from 0 to 63
|
||||
char buffer [33];
|
||||
itoa(i, buffer, 10);
|
||||
sprintf(buffer, "%02i", i);
|
||||
int Item = InsertItem(0, buffer);
|
||||
int Item = InsertItem(0, wxString::FromAscii(buffer));
|
||||
|
||||
|
||||
wxListItem item;
|
||||
|
@ -109,9 +111,7 @@ CPBView::MSWDrawSubItem(wxPaintDC& rPainDC, int item, int subitem)
|
|||
// don't change 0, it has the block values
|
||||
if(subitem > 0)
|
||||
{
|
||||
//#ifdef __WXMSW__ // what's this? should I use that?
|
||||
|
||||
// =======================================================================================
|
||||
#ifdef __WXMSW__ // what's this? should I use that?
|
||||
const wxChar* bgColor = _T("#ffffff");
|
||||
wxBrush bgBrush(bgColor);
|
||||
wxPen bgPen(bgColor);
|
||||
|
@ -121,13 +121,10 @@ CPBView::MSWDrawSubItem(wxPaintDC& rPainDC, int item, int subitem)
|
|||
rPainDC.SetBrush(bgBrush);
|
||||
rPainDC.SetPen(bgPen);
|
||||
rPainDC.DrawRectangle(SubItemRect);
|
||||
// =======================================================================================
|
||||
|
||||
// =======================================================================================
|
||||
#endif
|
||||
// A somewhat primitive attempt to show the playing history for a certain block.
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
wxString text;
|
||||
// ---------------------------------------------------------------------------------------
|
||||
if(subitem == 1)
|
||||
{
|
||||
char cbuff [33];
|
||||
|
@ -152,9 +149,12 @@ CPBView::MSWDrawSubItem(wxPaintDC& rPainDC, int item, int subitem)
|
|||
{
|
||||
text.Printf(wxT("0x%08x"), m_CachedRegs[subitem][item]);
|
||||
}
|
||||
#ifdef __WXMSW__
|
||||
rPainDC.DrawText(text, SubItemRect.GetLeft() + 10, SubItemRect.GetTop() + 4);
|
||||
// =======================================================================================
|
||||
|
||||
#else
|
||||
// May not show up pretty in !Win32
|
||||
rPainDC.DrawText(text, 10, 4);
|
||||
#endif
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#define __PBView_h__
|
||||
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/dcclient.h>
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "Common.h"
|
||||
#include "Globals.h"
|
||||
|
||||
void __Log(int, const char *fmt, ...)
|
||||
|
|
|
@ -20,15 +20,16 @@
|
|||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// =======================================================================================
|
||||
|
||||
// Includes
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
#include "../Globals.h"
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <string> // so that we can test std::string == abc
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
|
||||
#include "Common.h"
|
||||
#endif
|
||||
|
||||
#include "../UCodes/UCodes.h"
|
||||
#include "../UCodes/UCode_AXStructs.h"
|
||||
|
@ -36,27 +37,12 @@
|
|||
|
||||
#include "../Debugger/PBView.h"
|
||||
#include "../Debugger/Debugger.h"
|
||||
// =======================================================================================
|
||||
|
||||
|
||||
// =======================================================================================
|
||||
// Declarations
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// Externals
|
||||
// ---------------------------------------------------------------------------------------
|
||||
float ratioFactor; // a global to get the ratio factor from MixAdd
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// =======================================================================================
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// Parameter blocks
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
std::vector<u32> gloopPos(64);
|
||||
std::vector<u32> gsampleEnd(64);
|
||||
std::vector<u32> gsamplePos(64);
|
||||
|
@ -90,33 +76,33 @@ std::vector<u16> gis_stream(64);
|
|||
std::vector<u16> gupdates4(64);
|
||||
std::vector<u16> gupdates5(64);
|
||||
std::vector<u32> gupdates_addr(64);
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// Counters
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
int j = 0;
|
||||
int k = 0;
|
||||
__int64 l = 0;
|
||||
// ---------------------------------------------------------------------------------------
|
||||
long int l = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// More stuff
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
std::vector< std::vector<int> > vector1(64, std::vector<int>(100,0));
|
||||
int vectorLength = 8;
|
||||
std::vector<u16> vector62(vectorLength);
|
||||
std::vector<u16> vector63(vectorLength);
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// Classes
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
extern CDebugger* m_frame;
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// I placed this in CUCode_AX because there was some kind of problem to call it otherwise,
|
||||
|
@ -128,16 +114,16 @@ void CUCode_AX::Logging(short* _pBuffer, int _iSize, int a)
|
|||
int numberOfPBs = ReadOutPBs(PBs, NUMBER_OF_PBS);
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
// Control how often the screen is updated
|
||||
j++;
|
||||
l++;
|
||||
if (j>20)
|
||||
{
|
||||
|
||||
// =======================================================================================
|
||||
|
||||
// Move all items back - vector1 is a vector1[64][100] vector, I think
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
1 to 2
|
||||
2 3
|
||||
|
@ -150,20 +136,20 @@ void CUCode_AX::Logging(short* _pBuffer, int _iSize, int a)
|
|||
vector1.at(i).at(j-1) = vector1.at(i).at(j);
|
||||
}
|
||||
}
|
||||
// =======================================================================================
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// Save the latest value
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
for (int i = 0; i < numberOfPBs; i++)
|
||||
{
|
||||
vector1.at(i).at(vectorLength-1) = PBs[i].running;
|
||||
}
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// =======================================================================================
|
||||
|
||||
|
||||
// go through all blocks, or only some
|
||||
for (int i = 0; i < numberOfPBs; i++)
|
||||
{
|
||||
|
@ -172,9 +158,9 @@ void CUCode_AX::Logging(short* _pBuffer, int _iSize, int a)
|
|||
if(true)
|
||||
{
|
||||
|
||||
// =======================================================================================
|
||||
|
||||
// Playback history for the GUI debugger
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
std::string sbuff;
|
||||
|
||||
for (int j = 0; j < vectorLength; j++)
|
||||
|
@ -192,14 +178,13 @@ void CUCode_AX::Logging(short* _pBuffer, int _iSize, int a)
|
|||
u32 run = atoi( sbuff.c_str());
|
||||
m_frame->m_GPRListView->m_CachedRegs[1][i] = run;
|
||||
sbuff.clear();
|
||||
// ================================================================================================
|
||||
|
||||
// We could chose to update these only if a block is currently running - Later I'll add options
|
||||
// to see both the current and the lastets active value.
|
||||
//if (PBs[i].running)
|
||||
if (true)
|
||||
{
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
// AXPB base
|
||||
gcoef[i] = PBs[i].unknown1;
|
||||
|
||||
|
@ -242,7 +227,6 @@ void CUCode_AX::Logging(short* _pBuffer, int _iSize, int a)
|
|||
gvolume_right[i] = PBs[i].mixer.volume_right;
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
// hopefully this is false if we don't have a debugging window and so it doesn't cause a crash
|
||||
if(m_frame)
|
||||
{
|
||||
|
@ -284,7 +268,7 @@ void CUCode_AX::Logging(short* _pBuffer, int _iSize, int a)
|
|||
|
||||
|
||||
|
||||
// =======================================================================================
|
||||
|
||||
// New values are written so update - DISABLED - It flickered a lot, even worse than a
|
||||
// console window. I'll add a console window later to show the current status.
|
||||
//if(m_frame)
|
||||
|
@ -292,14 +276,13 @@ void CUCode_AX::Logging(short* _pBuffer, int _iSize, int a)
|
|||
{
|
||||
//m_frame->NotifyUpdate();
|
||||
}
|
||||
// =======================================================================================
|
||||
|
||||
|
||||
k=0;
|
||||
j=0;
|
||||
|
||||
} // end of if (j>20)
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
} // end of function
|
||||
// =======================================================================================
|
|
@ -15,7 +15,6 @@
|
|||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "Common.h"
|
||||
#include "../Globals.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "Common.h"
|
||||
#include "../Globals.h"
|
||||
#include "../DSPHandler.h"
|
||||
#include "UCodes.h"
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "Common.h"
|
||||
#include "../Globals.h"
|
||||
#include "../DSPHandler.h"
|
||||
#include "UCodes.h"
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "Common.h"
|
||||
#include "../Globals.h"
|
||||
#include "UCodes.h"
|
||||
#include "UCode_Jac.h"
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "Common.h"
|
||||
#include "../Globals.h"
|
||||
#include "../DSPHandler.h"
|
||||
#include "UCodes.h"
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
// Games that uses this UCode:
|
||||
// Zelda: The Windwaker, Mario Sunshine, Mario Kart
|
||||
|
||||
#include "Common.h"
|
||||
#include "../Globals.h"
|
||||
#include "UCodes.h"
|
||||
#include "UCode_Zelda.h"
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "Common.h"
|
||||
#include "../Globals.h"
|
||||
|
||||
#include "UCodes.h"
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
// =======================================================================================
|
||||
// Includes
|
||||
// ------------------
|
||||
#include "Common.h"
|
||||
#include "Globals.h"
|
||||
#include "ChunkFile.h"
|
||||
#include "resource.h"
|
||||
|
|
|
@ -83,8 +83,8 @@ void ExecuteDisplayList(u32 address, u32 size)
|
|||
#ifdef DATAREADER_INLINE
|
||||
u32 old_pVideoData = g_pVideoData;
|
||||
|
||||
const u32 startAddress = (u32)Memory_GetPtr(address);
|
||||
g_pVideoData = startAddress;
|
||||
const u8* startAddress = Memory_GetPtr(address);
|
||||
g_pVideoData = *startAddress;
|
||||
#endif
|
||||
// temporarily swap dl and non-dl(small "hack" for the stats)
|
||||
Xchg(stats.thisFrame.numDLPrims, stats.thisFrame.numPrims);
|
||||
|
@ -93,7 +93,7 @@ void ExecuteDisplayList(u32 address, u32 size)
|
|||
Xchg(stats.thisFrame.numBPLoadsInDL, stats.thisFrame.numBPLoads);
|
||||
|
||||
#ifdef DATAREADER_INLINE
|
||||
while((g_pVideoData - startAddress) < size)
|
||||
while((g_pVideoData - *startAddress) < size)
|
||||
#else
|
||||
while((memoryReader.GetReadAddress() - address) < size)
|
||||
#endif
|
||||
|
|
|
@ -324,7 +324,7 @@ void VertexShaderMngr::SetConstants(VERTEXSHADER& vs)
|
|||
INFO_LOG("view: topleft=(%f,%f), wh=(%f,%f), z=(%f,%f)\n",rawViewport[3]-rawViewport[0]-342,rawViewport[4]+rawViewport[1]-342,
|
||||
2 * rawViewport[0], 2 * rawViewport[1], (rawViewport[5]-rawViewport[2])/16777215.0f, rawViewport[5]/16777215.0f);
|
||||
glViewport((int)(rawViewport[3]-rawViewport[0]-342) * MValueX,Renderer::GetTargetHeight()-((int)(rawViewport[4]-rawViewport[1]-342)) * MValueY, abs((int)(2 * rawViewport[0])) * MValueX, abs((int)(2 * rawViewport[1])) * MValueY);
|
||||
glDepthRange((rawViewport[5]-rawViewport[2])/-16777215.0f, rawViewport[5]/16777215.0f);
|
||||
glDepthRange(-(0.0f - (rawViewport[5]-rawViewport[2])/-16777215.0f), rawViewport[5]/16777215.0f);
|
||||
}
|
||||
|
||||
if (bProjectionChanged) {
|
||||
|
@ -344,7 +344,7 @@ void VertexShaderMngr::SetConstants(VERTEXSHADER& vs)
|
|||
g_fProjectionMatrix[8] = 0.0f;
|
||||
g_fProjectionMatrix[9] = 0.0f;
|
||||
g_fProjectionMatrix[10] = rawProjection[4];
|
||||
g_fProjectionMatrix[11] = rawProjection[5];
|
||||
g_fProjectionMatrix[11] = -(0.0f-rawProjection[5]);
|
||||
|
||||
g_fProjectionMatrix[12] = 0.0f;
|
||||
g_fProjectionMatrix[13] = 0.0f;
|
||||
|
@ -365,7 +365,7 @@ void VertexShaderMngr::SetConstants(VERTEXSHADER& vs)
|
|||
g_fProjectionMatrix[8] = 0.0f;
|
||||
g_fProjectionMatrix[9] = 0.0f;
|
||||
g_fProjectionMatrix[10] = rawProjection[4];
|
||||
g_fProjectionMatrix[11] = rawProjection[5];
|
||||
g_fProjectionMatrix[11] = -(0.0f-rawProjection[5]);
|
||||
|
||||
g_fProjectionMatrix[12] = 0;
|
||||
g_fProjectionMatrix[13] = 0;
|
||||
|
|
Loading…
Reference in New Issue