summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorSonicadvance1 <sonicadvance1@gmail.com>2008-09-29 21:22:44 +0000
committerSonicadvance1 <sonicadvance1@gmail.com>2008-09-29 21:22:44 +0000
commitd98c60a0da544cfbe65567d58b088503c84c4e4e (patch)
tree1dc194856c084147a451c4b668f79645c88842eb /Source
parent3d25b525ddb3b30c45c07704347027d123bf00d4 (diff)
Fix compiling in Linux for the most part
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@732 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source')
-rw-r--r--Source/Plugins/Plugin_DSP_HLE/Src/Debugger/PBView.cpp24
-rw-r--r--Source/Plugins/Plugin_DSP_HLE/Src/Debugger/PBView.h1
-rw-r--r--Source/Plugins/Plugin_DSP_HLE/Src/Globals.cpp1
-rw-r--r--Source/Plugins/Plugin_DSP_HLE/Src/Logging/Logging.cpp79
-rw-r--r--Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp1
-rw-r--r--Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_CARD.cpp1
-rw-r--r--Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_InitAudioSystem.cpp1
-rw-r--r--Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Jac.cpp1
-rw-r--r--Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_ROM.cpp1
-rw-r--r--Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.cpp1
-rw-r--r--Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCodes.cpp1
-rw-r--r--Source/Plugins/Plugin_DSP_HLE/Src/main.cpp1
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp6
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp6
14 files changed, 50 insertions, 75 deletions
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/PBView.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/PBView.cpp
index f8448dfef3..d8146720b9 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/PBView.cpp
+++ b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/PBView.cpp
@@ -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);
}
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/PBView.h b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/PBView.h
index 59a32cb6b8..ea6f274e88 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/PBView.h
+++ b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/PBView.h
@@ -19,6 +19,7 @@
#define __PBView_h__
#include <wx/listctrl.h>
+#include <wx/dcclient.h>
#include "Common.h"
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Globals.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Globals.cpp
index bd939bfb3a..7db52df79d 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/Globals.cpp
+++ b/Source/Plugins/Plugin_DSP_HLE/Src/Globals.cpp
@@ -1,7 +1,6 @@
#include <stdarg.h>
#include <stdio.h>
-#include "Common.h"
#include "Globals.h"
void __Log(int, const char *fmt, ...)
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Logging.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Logging.cpp
index e628f2d37f..9e58912008 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Logging.cpp
+++ b/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Logging.cpp
@@ -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
-// ======================================================================================= \ No newline at end of file
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp
index e0c8778ea7..83fc979dee 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp
+++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp
@@ -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
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_CARD.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_CARD.cpp
index de9e919946..a0a6e53c48 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_CARD.cpp
+++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_CARD.cpp
@@ -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"
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_InitAudioSystem.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_InitAudioSystem.cpp
index 741fd446f2..6a667c92ce 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_InitAudioSystem.cpp
+++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_InitAudioSystem.cpp
@@ -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"
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Jac.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Jac.cpp
index a1f6ff3544..f5ee3ba13a 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Jac.cpp
+++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Jac.cpp
@@ -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"
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_ROM.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_ROM.cpp
index 435852fd1a..7b7866eed4 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_ROM.cpp
+++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_ROM.cpp
@@ -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"
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.cpp
index 68734d669c..f3038a616f 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.cpp
+++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.cpp
@@ -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"
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCodes.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCodes.cpp
index 28cfaeca52..6079db9438 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCodes.cpp
+++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCodes.cpp
@@ -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"
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp
index 6d2fa99908..0b06d4f7f3 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp
+++ b/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp
@@ -18,7 +18,6 @@
// =======================================================================================
// Includes
// ------------------
-#include "Common.h"
#include "Globals.h"
#include "ChunkFile.h"
#include "resource.h"
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp b/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp
index 9473436ee7..08d21b2cb1 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp
@@ -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
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp
index 7d1517030d..572e4afd1b 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp
@@ -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;