Merge with default
This commit is contained in:
@@ -3259,6 +3259,13 @@ ScoreboardC3P2X=SCREEN_CENTER_X*1.75
|
||||
ScoreboardC3P2Y=SCREEN_CENTER_Y*0.45
|
||||
ScoreboardC3P2OnCommand=zoom,0.825;strokecolor,Color("Outline");shadowlength,1
|
||||
|
||||
[ScreenGameplayEditCourse]
|
||||
Class="ScreenGameplayNormal"
|
||||
Fallback="ScreenGameplay"
|
||||
|
||||
PrevScreen="ScreenOptionsCourseOverview"
|
||||
NextScreen="ScreenOptionsCourseOverview"
|
||||
|
||||
[ScreenGameplayShared]
|
||||
Class="ScreenGameplayShared"
|
||||
Fallback="ScreenGameplay"
|
||||
@@ -3835,7 +3842,7 @@ Fallback="ScreenOptionsSimpleService"
|
||||
PrevScreen="ScreenOptionsManageCourses"
|
||||
NextScreen="ScreenOptionsManageCourses"
|
||||
# huh
|
||||
PlayScreen=""
|
||||
PlayScreen="ScreenGameplayEditCourse"
|
||||
EditScreen="ScreenOptionsEditCourse"
|
||||
OptionRowNormalMetricsGroup="OptionRowCourseOverview"
|
||||
|
||||
|
||||
@@ -1659,13 +1659,13 @@
|
||||
AAFF41A60F5BD4AD00FFDB67 /* ScreenOptionsExportPackage.h in Headers */ = {isa = PBXBuildFile; fileRef = AAFF41A20F5BD4AD00FFDB67 /* ScreenOptionsExportPackage.h */; };
|
||||
B75CE3B5137963350076A82D /* SongPosition.h in Headers */ = {isa = PBXBuildFile; fileRef = B75CE3B3137963350076A82D /* SongPosition.h */; };
|
||||
B75CE3B6137963350076A82D /* SongPosition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B75CE3B4137963350076A82D /* SongPosition.cpp */; };
|
||||
B7B0914B1393481B00C33E6B /* glew.c in Sources */ = {isa = PBXBuildFile; fileRef = EE879BAA132E06C50078FDDC /* glew.c */; };
|
||||
EE2153A910A75BEE0074B01B /* NotesLoaderPMS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE2153A710A75BEE0074B01B /* NotesLoaderPMS.cpp */; };
|
||||
EE2153AA10A75BEE0074B01B /* NotesLoaderPMS.h in Headers */ = {isa = PBXBuildFile; fileRef = EE2153A810A75BEE0074B01B /* NotesLoaderPMS.h */; };
|
||||
EE879B60132DEE720078FDDC /* RageDisplay_Legacy_Helpers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE879B5C132DEE720078FDDC /* RageDisplay_Legacy_Helpers.cpp */; };
|
||||
EE879B61132DEE720078FDDC /* RageDisplay_Legacy_Helpers.h in Headers */ = {isa = PBXBuildFile; fileRef = EE879B5D132DEE720078FDDC /* RageDisplay_Legacy_Helpers.h */; };
|
||||
EE879B62132DEE720078FDDC /* RageDisplay_Legacy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE879B5E132DEE720078FDDC /* RageDisplay_Legacy.cpp */; };
|
||||
EE879B63132DEE720078FDDC /* RageDisplay_Legacy.h in Headers */ = {isa = PBXBuildFile; fileRef = EE879B5F132DEE720078FDDC /* RageDisplay_Legacy.h */; };
|
||||
EE879BC3132E06C50078FDDC /* glew.c in Sources */ = {isa = PBXBuildFile; fileRef = EE879BAA132E06C50078FDDC /* glew.c */; };
|
||||
EE906F6612BF3A1B00146C96 /* ScreenInstallOverlay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE906F6412BF3A1B00146C96 /* ScreenInstallOverlay.cpp */; };
|
||||
EE906F6712BF3A1B00146C96 /* ScreenInstallOverlay.h in Headers */ = {isa = PBXBuildFile; fileRef = EE906F6512BF3A1B00146C96 /* ScreenInstallOverlay.h */; };
|
||||
EE906F8212BF3AF800146C96 /* JsonUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE906F8012BF3AF800146C96 /* JsonUtil.cpp */; };
|
||||
@@ -5902,6 +5902,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
B7B0914B1393481B00C33E6B /* glew.c in Sources */,
|
||||
AA29CD520558741A00961A51 /* RageUtil.cpp in Sources */,
|
||||
AA29CD420558741A00961A51 /* RageBitmapTexture.cpp in Sources */,
|
||||
AA29CD430558741A00961A51 /* RageDisplay.cpp in Sources */,
|
||||
@@ -6304,7 +6305,6 @@
|
||||
2B30D6821315EA7E00044B68 /* MouseDevice.cpp in Sources */,
|
||||
EE879B60132DEE720078FDDC /* RageDisplay_Legacy_Helpers.cpp in Sources */,
|
||||
EE879B62132DEE720078FDDC /* RageDisplay_Legacy.cpp in Sources */,
|
||||
EE879BC3132E06C50078FDDC /* glew.c in Sources */,
|
||||
2B76698C132FF71500586512 /* NotesLoaderSMA.cpp in Sources */,
|
||||
2BD06FF1137242680018CB9F /* json_reader.cpp in Sources */,
|
||||
2BD06FF2137242680018CB9F /* json_value.cpp in Sources */,
|
||||
@@ -7182,7 +7182,7 @@
|
||||
GCC_WARN_UNUSED_VALUE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
LIBRARY_STYLE = Bundle;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.2;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.5;
|
||||
PRODUCT_NAME = version;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
@@ -7279,14 +7279,15 @@
|
||||
GCC_WARN_UNUSED_VALUE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
LINKER_DISPLAYS_MANGLED_NAMES = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.3;
|
||||
MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.3;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.5;
|
||||
MACOSX_DEPLOYMENT_TARGET_i386 = 10.5;
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.5;
|
||||
ONLY_LINK_ESSENTIAL_SYMBOLS = YES;
|
||||
PREBINDING = NO;
|
||||
PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES;
|
||||
SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||
SDKROOT_ppc = /Developer/SDKs/MacOSX10.3.9.sdk;
|
||||
SDKROOT = macosx10.5;
|
||||
SDKROOT_i386 = "";
|
||||
SDKROOT_ppc = "";
|
||||
SHARED_PRECOMPS_DIR = "/Library/Caches/com.apple.Xcode.$(UID)/SharedPrecompiledHeaders/$(PRODUCT_NAME)/$(CONFIGURATION)";
|
||||
STRIP_INSTALLED_PRODUCT = NO;
|
||||
STRIP_STYLE = "non-global";
|
||||
@@ -7855,14 +7856,15 @@
|
||||
GCC_WARN_UNUSED_VALUE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
LINKER_DISPLAYS_MANGLED_NAMES = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.3;
|
||||
MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.3;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.5;
|
||||
MACOSX_DEPLOYMENT_TARGET_i386 = 10.5;
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.5;
|
||||
ONLY_LINK_ESSENTIAL_SYMBOLS = YES;
|
||||
PREBINDING = NO;
|
||||
PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES;
|
||||
SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||
SDKROOT_ppc = /Developer/SDKs/MacOSX10.3.9.sdk;
|
||||
SDKROOT = macosx10.5;
|
||||
SDKROOT_i386 = "";
|
||||
SDKROOT_ppc = "";
|
||||
SHARED_PRECOMPS_DIR = "/Library/Caches/com.apple.Xcode.$(UID)/SharedPrecompiledHeaders/$(PRODUCT_NAME)/$(CONFIGURATION)";
|
||||
STRIP_INSTALLED_PRODUCT = YES;
|
||||
STRIP_STYLE = "non-global";
|
||||
@@ -7937,7 +7939,7 @@
|
||||
GCC_WARN_UNUSED_VALUE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
LIBRARY_STYLE = Bundle;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.2;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.5;
|
||||
PRODUCT_NAME = version;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
@@ -8108,7 +8110,7 @@
|
||||
GCC_WARN_UNUSED_VALUE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
LIBRARY_STYLE = Bundle;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.2;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.5;
|
||||
PRODUCT_NAME = version;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
@@ -8201,14 +8203,15 @@
|
||||
GCC_WARN_UNUSED_VALUE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
LINKER_DISPLAYS_MANGLED_NAMES = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.3;
|
||||
MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.3;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.5;
|
||||
MACOSX_DEPLOYMENT_TARGET_i386 = 10.5;
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.5;
|
||||
ONLY_LINK_ESSENTIAL_SYMBOLS = YES;
|
||||
PREBINDING = NO;
|
||||
PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES;
|
||||
SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||
SDKROOT_ppc = /Developer/SDKs/MacOSX10.3.9.sdk;
|
||||
SDKROOT = macosx10.5;
|
||||
SDKROOT_i386 = "";
|
||||
SDKROOT_ppc = "";
|
||||
SHARED_PRECOMPS_DIR = "/Library/Caches/com.apple.Xcode.$(UID)/SharedPrecompiledHeaders/$(PRODUCT_NAME)/$(CONFIGURATION)";
|
||||
STRIP_INSTALLED_PRODUCT = YES;
|
||||
STRIP_STYLE = "non-global";
|
||||
@@ -8236,7 +8239,7 @@
|
||||
GCC_WARN_UNUSED_VALUE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
LIBRARY_STYLE = Bundle;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.2;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.5;
|
||||
PRODUCT_NAME = version;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
@@ -8330,15 +8333,15 @@
|
||||
GCC_WARN_UNUSED_VALUE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
LINKER_DISPLAYS_MANGLED_NAMES = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.4;
|
||||
MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.3;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.5;
|
||||
MACOSX_DEPLOYMENT_TARGET_i386 = 10.5;
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.5;
|
||||
ONLY_LINK_ESSENTIAL_SYMBOLS = YES;
|
||||
PREBINDING = NO;
|
||||
PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES;
|
||||
SDKROOT = macosx10.4;
|
||||
SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||
SDKROOT_ppc = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||
SDKROOT = macosx10.5;
|
||||
SDKROOT_i386 = "";
|
||||
SDKROOT_ppc = "";
|
||||
SHARED_PRECOMPS_DIR = "/Library/Caches/com.apple.Xcode.$(UID)/SharedPrecompiledHeaders/$(PRODUCT_NAME)/$(CONFIGURATION)";
|
||||
STRIP_INSTALLED_PRODUCT = YES;
|
||||
STRIP_STYLE = "non-global";
|
||||
|
||||
+2
-47
@@ -251,7 +251,7 @@ static const Style g_Style_Dance_Double =
|
||||
static const Style g_Style_Dance_Couple =
|
||||
{ // STYLE_DANCE_COUPLE
|
||||
true, // m_bUsedForGameplay
|
||||
false, // m_bUsedForEdit
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
false, // m_bUsedForHowToPlay
|
||||
"couple", // m_szName
|
||||
@@ -359,50 +359,6 @@ static const Style g_Style_Dance_ThreePanel =
|
||||
false, // m_bLockDifficulties
|
||||
};
|
||||
|
||||
static const Style g_Style_Dance_Couple_Edit =
|
||||
{ // STYLE_DANCE_EDIT_COUPLE
|
||||
false, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
false, // m_bUsedForHowToPlay
|
||||
"couple-edit", // m_szName
|
||||
StepsType_dance_couple, // m_StepsType
|
||||
StyleType_OnePlayerOneSide, // m_StyleType
|
||||
8, // m_iColsPerPlayer
|
||||
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
||||
{ // PLAYER_1
|
||||
{ TRACK_1, -DANCE_COL_SPACING*4.0f, NULL },
|
||||
{ TRACK_2, -DANCE_COL_SPACING*3.0f, NULL },
|
||||
{ TRACK_3, -DANCE_COL_SPACING*2.0f, NULL },
|
||||
{ TRACK_4, -DANCE_COL_SPACING*1.0f, NULL },
|
||||
{ TRACK_5, +DANCE_COL_SPACING*1.0f, NULL },
|
||||
{ TRACK_6, +DANCE_COL_SPACING*2.0f, NULL },
|
||||
{ TRACK_7, +DANCE_COL_SPACING*3.0f, NULL },
|
||||
{ TRACK_8, +DANCE_COL_SPACING*4.0f, NULL },
|
||||
},
|
||||
{ // PLAYER_2
|
||||
{ TRACK_1, -DANCE_COL_SPACING*4.0f, NULL },
|
||||
{ TRACK_2, -DANCE_COL_SPACING*3.0f, NULL },
|
||||
{ TRACK_3, -DANCE_COL_SPACING*2.0f, NULL },
|
||||
{ TRACK_4, -DANCE_COL_SPACING*1.0f, NULL },
|
||||
{ TRACK_5, +DANCE_COL_SPACING*1.0f, NULL },
|
||||
{ TRACK_6, +DANCE_COL_SPACING*2.0f, NULL },
|
||||
{ TRACK_7, +DANCE_COL_SPACING*3.0f, NULL },
|
||||
{ TRACK_8, +DANCE_COL_SPACING*4.0f, NULL },
|
||||
},
|
||||
},
|
||||
{ // m_iInputColumn[NUM_GameController][NUM_GameButton]
|
||||
{ 0, 1, 2, 3, Style::END_MAPPING },
|
||||
{ 4, 5, 6, 7, Style::END_MAPPING },
|
||||
},
|
||||
{ // m_iColumnDrawOrder[MAX_COLS_PER_PLAYER];
|
||||
0,1,2,3,4,5,6,7
|
||||
},
|
||||
false, // m_bNeedsZoomOutWith2Players
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
false, // m_bLockDifficulties
|
||||
};
|
||||
|
||||
// todo: re-enable? (lol)
|
||||
/*
|
||||
static const Style g_Style_Dance_Solo_Versus =
|
||||
@@ -493,7 +449,6 @@ static const Style *g_apGame_Dance_Styles[] =
|
||||
&g_Style_Dance_Double,
|
||||
&g_Style_Dance_Couple,
|
||||
&g_Style_Dance_Solo,
|
||||
&g_Style_Dance_Couple_Edit,
|
||||
&g_Style_Dance_Routine,
|
||||
&g_Style_Dance_ThreePanel,
|
||||
NULL
|
||||
@@ -2980,7 +2935,7 @@ const Style* GameManager::GetEditorStyleForStepsType( StepsType st )
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT(0); // this Game is missing a Style that can be used with the editor
|
||||
ASSERT_M(0, ssprintf("The current game cannot use this Style with the editor!"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ static void GetStepsForSong( Song *pSong, vector<Steps*> &vpStepsOut )
|
||||
}
|
||||
|
||||
// XXX: very similar to OptionRowHandlerSteps
|
||||
class OptionRowHandlerSteps : public OptionRowHandler
|
||||
class EditCourseOptionRowHandlerSteps : public OptionRowHandler
|
||||
{
|
||||
public:
|
||||
void Load( int iEntryIndex )
|
||||
@@ -213,7 +213,7 @@ void ScreenOptionsEditCourse::BeginScreen()
|
||||
}
|
||||
|
||||
{
|
||||
OptionRowHandlerSteps *pHand = new OptionRowHandlerSteps;
|
||||
EditCourseOptionRowHandlerSteps *pHand = new EditCourseOptionRowHandlerSteps;
|
||||
pHand->Load( i );
|
||||
pHand->m_Def.m_vsChoices.push_back( "n/a" );
|
||||
pHand->m_Def.m_sName = ssprintf(STEPS.GetValue() + " %d",i+1);
|
||||
@@ -411,7 +411,7 @@ void ScreenOptionsEditCourse::SetCurrentSteps()
|
||||
int iEntryIndex = RowToEntryIndex( iRow );
|
||||
OptionRow &row = *m_pRows[ EntryIndexAndRowTypeToRow(iEntryIndex, RowType_Steps) ];
|
||||
int iStepsIndex = row.GetOneSharedSelection();
|
||||
const OptionRowHandlerSteps *pHand = dynamic_cast<const OptionRowHandlerSteps *>( row.GetHandler() );
|
||||
const EditCourseOptionRowHandlerSteps *pHand = dynamic_cast<const EditCourseOptionRowHandlerSteps *>( row.GetHandler() );
|
||||
ASSERT( pHand );
|
||||
Steps *pSteps = pHand->GetSteps( iStepsIndex );
|
||||
GAMESTATE->m_pCurSteps[PLAYER_1].Set( pSteps );
|
||||
|
||||
@@ -82,9 +82,35 @@ public:
|
||||
static RString ShortenGroupName( RString sLongGroupName );
|
||||
|
||||
// Lookup
|
||||
/**
|
||||
* @brief Retrieve all of the songs that belong to a particular group.
|
||||
* @param sGroupName the name of the group.
|
||||
* @return the songs that belong in the group. */
|
||||
const vector<Song*> &GetSongs( const RString &sGroupName ) const;
|
||||
/**
|
||||
* @brief Retrieve all of the songs in the game.
|
||||
* @return all of the songs. */
|
||||
const vector<Song*> &GetAllSongs() const { return GetSongs(GROUP_ALL); }
|
||||
/**
|
||||
* @brief Retrieve all of the popular songs.
|
||||
*
|
||||
* Popularity is determined specifically by the number of times
|
||||
* a song is chosen.
|
||||
* @return all of the popular songs. */
|
||||
const vector<Song*> &GetPopularSongs() const { return m_pPopularSongs; }
|
||||
|
||||
/**
|
||||
* @brief Retrieve all of the songs in a group that have at least one
|
||||
* valid step for the current gametype.
|
||||
* @param sGroupName the name of the group.
|
||||
* @return the songs within the group that have at least one valid Step. */
|
||||
const vector<Song *> & GetSongsOfCurrentGame( const RString &sGroupName ) const;
|
||||
/**
|
||||
* @brief Retrieve all of the songs in the game that have at least one
|
||||
* valid step for the current gametype.
|
||||
* @return the songs within the game that have at least one valid Step. */
|
||||
const vector<Song *> & GetAllSongsOfCurrentGame() const;
|
||||
|
||||
void GetPreferredSortSongs( vector<Song*> &AddTo ) const;
|
||||
RString SongToPreferredSortSectionName( const Song *pSong ) const;
|
||||
const vector<Course*> &GetPopularCourses( CourseType ct ) const { return m_pPopularCourses[ct]; }
|
||||
@@ -92,11 +118,17 @@ public:
|
||||
Song *FindSong( RString sGroup, RString sSong ) const;
|
||||
Course *FindCourse( RString sPath ) const;
|
||||
Course *FindCourse( RString sGroup, RString sName ) const;
|
||||
/**
|
||||
* @brief Retrieve the number of songs in the game.
|
||||
* @return the number of songs. */
|
||||
int GetNumSongs() const;
|
||||
int GetNumUnlockedSongs() const;
|
||||
int GetNumSelectableAndUnlockedSongs() const;
|
||||
int GetNumAdditionalSongs() const;
|
||||
int GetNumSongGroups() const;
|
||||
/**
|
||||
* @brief Retrieve the number of courses in the game.
|
||||
* @return the number of courses. */
|
||||
int GetNumCourses() const;
|
||||
int GetNumAdditionalCourses() const;
|
||||
int GetNumCourseGroups() const;
|
||||
|
||||
+2
-1
@@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
#include "Style.h"
|
||||
#include "GameState.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageUtil.h"
|
||||
#include "InputMapper.h"
|
||||
@@ -69,7 +70,7 @@ GameInput Style::StyleInputToGameInput( int iCol, PlayerNumber pn ) const
|
||||
}
|
||||
}
|
||||
|
||||
FAIL_M( ssprintf("Invalid column %i,%i", pn, iCol) );
|
||||
FAIL_M( ssprintf("Invalid column number %i for player %i in the style %s", iCol, pn, GAMESTATE->GetCurrentStyle()->m_szName) );
|
||||
};
|
||||
|
||||
int Style::GameInputToColumn( const GameInput &GameI ) const
|
||||
|
||||
@@ -6,9 +6,7 @@
|
||||
#include <objc/objc.h>
|
||||
|
||||
typedef const struct __CFDictionary *CFDictionaryRef;
|
||||
/* XXX: This was changed to a uint32_t later and its header file cannot be included
|
||||
* since Style conflicts. Ugh. */
|
||||
typedef struct _CGDirectDisplayID *CGDirectDisplayID;
|
||||
typedef uint32_t CGDirectDisplayID;
|
||||
|
||||
class LowLevelWindow_MacOSX : public LowLevelWindow
|
||||
{
|
||||
|
||||
@@ -428,8 +428,7 @@ RString LowLevelWindow_MacOSX::TryVideoMode( const VideoModeParams& p, bool& new
|
||||
|
||||
if( bChangeVsync )
|
||||
{
|
||||
long swap = p.vsync ? 1 : 0;
|
||||
|
||||
GLint swap = p.vsync ? 1 : 0;
|
||||
[m_Context setValues:&swap forParameter:NSOpenGLCPSwapInterval];
|
||||
m_CurrentParams.vsync = p.vsync;
|
||||
}
|
||||
@@ -515,8 +514,7 @@ void LowLevelWindow_MacOSX::SetActualParamsFromMode( CFDictionaryRef mode )
|
||||
|
||||
if( !m_CurrentParams.windowed )
|
||||
{
|
||||
long swap;
|
||||
|
||||
GLint swap;
|
||||
m_CurrentParams.width = CGDisplayPixelsWide( kCGDirectMainDisplay );
|
||||
m_CurrentParams.height = CGDisplayPixelsHigh( kCGDirectMainDisplay );
|
||||
CGLGetParameter( CGLGetCurrentContext(), kCGLCPSwapInterval, &swap );
|
||||
|
||||
@@ -28,23 +28,23 @@ bool GetThreadBacktraceContext( uint64_t iID, BacktraceContext *ctx )
|
||||
thread_act_t thread = thread_act_t( iID );
|
||||
|
||||
#if defined(__ppc__)
|
||||
ppc_thread_state state;
|
||||
ppc_thread_state_t state;
|
||||
mach_msg_type_number_t count = PPC_THREAD_STATE_COUNT;
|
||||
|
||||
if( thread_get_state(thread, PPC_THREAD_STATE, thread_state_t(&state), &count) )
|
||||
return false;
|
||||
ctx->FramePtr = (const Frame *)state.r1;
|
||||
ctx->PC = (void *)state.srr0;
|
||||
ctx->FramePtr = (const Frame *)state.__r1;
|
||||
ctx->PC = (void *)state.__srr0;
|
||||
return true;
|
||||
#elif defined(__i386__)
|
||||
i386_thread_state state;
|
||||
i386_thread_state_t state;
|
||||
mach_msg_type_number_t count = i386_THREAD_STATE_COUNT;
|
||||
|
||||
if( thread_get_state(thread, i386_THREAD_STATE, thread_state_t(&state), &count) )
|
||||
return false;
|
||||
ctx->ip = (void *)state.eip;
|
||||
ctx->bp = (void *)state.ebp;
|
||||
ctx->sp = (void *)state.esp;
|
||||
ctx->ip = (void *)state.__eip;
|
||||
ctx->bp = (void *)state.__ebp;
|
||||
ctx->sp = (void *)state.__esp;
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
|
||||
// Only do this for c++ files.
|
||||
#ifdef __cplusplus
|
||||
# include "global.h"
|
||||
#endif
|
||||
|
||||
#ifdef __OBJC__
|
||||
# import <Cocoa/Cocoa.h>
|
||||
#include "global.h"
|
||||
#include <map>
|
||||
#endif
|
||||
|
||||
@@ -456,9 +456,15 @@ void InitializeBacktrace()
|
||||
|
||||
void GetSignalBacktraceContext( BacktraceContext *ctx, const ucontext_t *uc )
|
||||
{
|
||||
#if !defined(MACOSX)
|
||||
ctx->ip = (void *) uc->uc_mcontext->ss.eip;
|
||||
ctx->bp = (void *) uc->uc_mcontext->ss.ebp;
|
||||
ctx->sp = (void *) uc->uc_mcontext->ss.esp;
|
||||
#else
|
||||
ctx->ip = (void *) uc->uc_mcontext->__ss.__eip;
|
||||
ctx->bp = (void *) uc->uc_mcontext->__ss.__ebp;
|
||||
ctx->sp = (void *) uc->uc_mcontext->__ss.__esp;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* The following from VirtualDub: */
|
||||
@@ -629,8 +635,13 @@ struct Frame
|
||||
|
||||
void GetSignalBacktraceContext( BacktraceContext *ctx, const ucontext_t *uc )
|
||||
{
|
||||
#if defined(__ppc__)
|
||||
ctx->PC = (const void *) uc->uc_mcontext->__ss.__srr0;
|
||||
ctx->FramePtr = (const Frame *) uc->uc_mcontext->__ss.__r1;
|
||||
#else
|
||||
ctx->PC = (const void *) uc->uc_mcontext->ss.srr0;
|
||||
ctx->FramePtr = (const Frame *) uc->uc_mcontext->ss.r1;
|
||||
#endif
|
||||
}
|
||||
|
||||
void InitializeBacktrace() { }
|
||||
|
||||
Reference in New Issue
Block a user