mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 20:59:00 +00:00
ALL: synced with ScummVM
This commit is contained in:
parent
f3400181f8
commit
2f1a4f7b7b
@ -64,6 +64,7 @@ endif
|
||||
ifneq ($(findstring $(MAKEFLAGS),s),s)
|
||||
ifneq ($(VERBOSE_BUILD),1)
|
||||
ifneq ($(VERBOSE_BUILD),yes)
|
||||
QUIET_CC = @echo ' ' C ' ' $@;
|
||||
QUIET_CXX = @echo ' ' C++ ' ' $@;
|
||||
QUIET_AS = @echo ' ' AS ' ' $@;
|
||||
QUIET_NASM = @echo ' ' NASM ' ' $@;
|
||||
@ -97,6 +98,9 @@ ifdef CXX_UPDATE_DEP_FLAG
|
||||
|
||||
# Build rule for C++ files. Makes use of CXX_UPDATE_DEP_FLAG for advanced
|
||||
# dependency tracking.
|
||||
%.o: %.c
|
||||
$(QUIET)$(MKDIR) $(*D)/$(DEPDIR)
|
||||
$(QUIET_CC)$(CC) $(CXX_UPDATE_DEP_FLAG) $(CFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
|
||||
%.o: %.cpp
|
||||
$(QUIET)$(MKDIR) $(*D)/$(DEPDIR)
|
||||
$(QUIET_CXX)$(CXX) $(CXX_UPDATE_DEP_FLAG) $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
|
||||
|
@ -56,9 +56,15 @@
|
||||
* to properly work in exports (i.e. release tar balls etc.).
|
||||
*/
|
||||
const char *gScummVMVersion = SCUMMVM_VERSION;
|
||||
#ifdef __PLAYSTATION2__
|
||||
const char *gScummVMBuildDate = "Git Master"; /* ScummVM Git Master */
|
||||
const char *gScummVMVersionDate = SCUMMVM_VERSION " - PlayStation2";
|
||||
const char *gScummVMFullVersion = "ResidualVM " SCUMMVM_VERSION " - PlayStation2";
|
||||
#else
|
||||
const char *gScummVMBuildDate = __DATE__ " " __TIME__;
|
||||
const char *gScummVMVersionDate = SCUMMVM_VERSION " (" __DATE__ " " __TIME__ ")";
|
||||
const char *gScummVMFullVersion = "ResidualVM " SCUMMVM_VERSION " (" __DATE__ " " __TIME__ ")";
|
||||
#else
|
||||
const char *gScummVMFeatures = ""
|
||||
#ifdef TAINTED_BUILD
|
||||
// TAINTED means the build contains engines/subengines not enabled by default
|
||||
|
@ -410,8 +410,13 @@
|
||||
typedef unsigned int uint32;
|
||||
typedef signed int int32;
|
||||
typedef unsigned int uint;
|
||||
#ifdef __PLAYSTATION2__
|
||||
typedef signed long int64;
|
||||
typedef unsigned long uint64;
|
||||
#else
|
||||
typedef signed long long int64;
|
||||
typedef unsigned long long uint64;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
39
configure
vendored
39
configure
vendored
@ -1379,6 +1379,9 @@ ps2)
|
||||
_host_os=ps2
|
||||
_host_cpu=mips64r5900el
|
||||
_host_alias=ee
|
||||
# PS2 bogus dirs: they actually depend on launch medium
|
||||
datadir='host:data'
|
||||
docdir='host:docs'
|
||||
;;
|
||||
ps3)
|
||||
_host_os=ps3
|
||||
@ -1828,6 +1831,15 @@ if test "$_global_constructors" = yes; then
|
||||
fi
|
||||
echo $_global_constructors
|
||||
|
||||
echo_n "Checking for $_host_alias-strings... " >> "$TMPLOG"
|
||||
if test ! "x$(which $_host_alias-strings 2>/dev/null)" = "x"; then
|
||||
_strings=$_host_alias-strings
|
||||
echo yes >> "$TMPLOG"
|
||||
else
|
||||
_strings=strings
|
||||
echo no >> "$TMPLOG"
|
||||
fi
|
||||
|
||||
#
|
||||
# Check for endianness
|
||||
#
|
||||
@ -1842,9 +1854,9 @@ void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
|
||||
int main() { _ascii (); _ebcdic (); return 0; }
|
||||
EOF
|
||||
$CXX $CXXFLAGS -c -o $TMPO.o tmp_endianness_check.cpp
|
||||
if strings $TMPO.o | grep BIGenDianSyS >/dev/null; then
|
||||
if $_strings $TMPO.o | grep BIGenDianSyS >/dev/null; then
|
||||
_endian=big
|
||||
elif strings $TMPO.o | grep LiTTleEnDian >/dev/null; then
|
||||
elif $_strings $TMPO.o | grep LiTTleEnDian >/dev/null; then
|
||||
_endian=little
|
||||
fi
|
||||
echo $_endian;
|
||||
@ -2301,6 +2313,9 @@ case $_host_os in
|
||||
CXXFLAGS="$CXXFLAGS -G2"
|
||||
DEFINES="$DEFINES -D_EE"
|
||||
DEFINES="$DEFINES -D__PLAYSTATION2__"
|
||||
if test -z "$PS2SDK_OLD"; then
|
||||
DEFINES="$DEFINES -D__NEW_PS2SDK__"
|
||||
fi
|
||||
;;
|
||||
ps3)
|
||||
# Force use of SDL and freetype from the ps3 toolchain
|
||||
@ -2683,6 +2698,8 @@ if test -n "$_host"; then
|
||||
DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL"
|
||||
DEFINES="$DEFINES -DDISABLE_SID"
|
||||
DEFINES="$DEFINES -DDISABLE_NES_APU"
|
||||
CXXFLAGS="$CXXFLAGS -fno-exceptions"
|
||||
CXXFLAGS="$CXXFLAGS -fno-rtti"
|
||||
_backend="ps2"
|
||||
_build_scalers=no
|
||||
_mt32emu=no
|
||||
@ -2690,10 +2707,15 @@ if test -n "$_host"; then
|
||||
# This trick doesn't work for tremor right now, as the PS2 port the resulting library
|
||||
# libtremor, while our code later on expects it to be called libvorbisidec.
|
||||
# TODO: Enable tremor, e.g. by adding -ltremor or by renaming the lib.
|
||||
# Disable this for older SDK as this breaks the build otherwise...
|
||||
if test -z "$PS2SDK_OLD"; then
|
||||
_tremor=yes
|
||||
fi
|
||||
_mad=yes
|
||||
_zlib=yes
|
||||
# HACK to fix compilation of C source files for now.
|
||||
add_line_to_config_mk 'CC = ee-gcc'
|
||||
add_line_to_config_mk 'CC := ee-gcc'
|
||||
add_line_to_config_mk 'CFLAGS := -std=c99 -W -Wno-unused-parameter -Wconversion -pedantic -G2 -s -O2 -Wuninitialized'
|
||||
# HACK to fix linking for now. It seems ee-g++ does not handle linking correctly.
|
||||
LD=ee-gcc
|
||||
|
||||
@ -3210,9 +3232,10 @@ POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-im
|
||||
;;
|
||||
ps2)
|
||||
_elf_loader=yes
|
||||
DEFINES="$DEFINES -DUNCACHED_PLUGINS"
|
||||
_mak_plugins='
|
||||
LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-T$(srcdir)/backends/plugins/ps2/main_prog.ld
|
||||
PLUGIN_LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-T$(srcdir)/backends/plugins/ps2/plugin.ld -lstdc++ -lc
|
||||
LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-T$(srcdir)/backends/plugins/ps2/main_prog.ld
|
||||
PLUGIN_LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-T$(srcdir)/backends/plugins/ps2/plugin.ld -lstdc++ -lc
|
||||
'
|
||||
;;
|
||||
psp)
|
||||
@ -3348,6 +3371,8 @@ if test "$_tremor" = yes && test "$_vorbis" = no; then
|
||||
if test "$_tremolo" = yes ; then
|
||||
add_line_to_config_h '#define USE_TREMOLO'
|
||||
LIBS="$LIBS $TREMOR_LIBS -ltremolo"
|
||||
elif test "$_host" = ps2 ; then
|
||||
LIBS="-ltremor $LIBS"
|
||||
else
|
||||
LIBS="$LIBS $TREMOR_LIBS -lvorbisidec"
|
||||
fi
|
||||
@ -4097,6 +4122,10 @@ else
|
||||
echo "osx"
|
||||
_taskbar=yes
|
||||
;;
|
||||
ps2)
|
||||
# PS2 bogus dir: it actually depends on launch medium
|
||||
DEFINES="$DEFINES -DPLUGIN_DIRECTORY=\\\"host:plugins\\\""
|
||||
;;
|
||||
*)
|
||||
if test "$_libunity" = yes; then
|
||||
echo "unity"
|
||||
|
@ -216,6 +216,11 @@ void MainMenuDialog::reflowLayout() {
|
||||
void MainMenuDialog::save() {
|
||||
int slot = _saveDialog->runModalWithCurrentTarget();
|
||||
|
||||
#if defined(__PLAYSTATION2__) && defined(DYNAMIC_MODULES)
|
||||
char pokeme[32];
|
||||
snprintf(pokeme,32,"hack");
|
||||
#endif
|
||||
|
||||
if (slot >= 0) {
|
||||
Common::String result(_saveDialog->getResultString());
|
||||
if (result.empty()) {
|
||||
|
@ -61,6 +61,7 @@ Debugger::Debugger() {
|
||||
DCmd_Register("help", WRAP_METHOD(Debugger, Cmd_Help));
|
||||
DCmd_Register("openlog", WRAP_METHOD(Debugger, Cmd_OpenLog));
|
||||
|
||||
DCmd_Register("debuglevel", WRAP_METHOD(Debugger, Cmd_DebugLevel));
|
||||
DCmd_Register("debugflag_list", WRAP_METHOD(Debugger, Cmd_DebugFlagsList));
|
||||
DCmd_Register("debugflag_enable", WRAP_METHOD(Debugger, Cmd_DebugFlagEnable));
|
||||
DCmd_Register("debugflag_disable", WRAP_METHOD(Debugger, Cmd_DebugFlagDisable));
|
||||
@ -501,6 +502,25 @@ bool Debugger::Cmd_OpenLog(int argc, const char **argv) {
|
||||
}
|
||||
|
||||
|
||||
bool Debugger::Cmd_DebugLevel(int argc, const char **argv) {
|
||||
if (argc == 1) { // print level
|
||||
DebugPrintf("Debugging is currently %s (set at level %d)\n", (gDebugLevel >= 0) ? "enabled" : "disabled", gDebugLevel);
|
||||
DebugPrintf("Usage: %s <n> where n is 0 to 10 or -1 to disable debugging\n", argv[0]);
|
||||
} else { // set level
|
||||
gDebugLevel = atoi(argv[1]);
|
||||
if (gDebugLevel >= 0 && gDebugLevel < 11) {
|
||||
DebugPrintf("Debug level set to level %d\n", gDebugLevel);
|
||||
} else if (gDebugLevel < 0) {
|
||||
DebugPrintf("Debugging is now disabled\n");
|
||||
} else {
|
||||
DebugPrintf("Invalid debug level value\n");
|
||||
DebugPrintf("Usage: %s <n> where n is 0 to 10 or -1 to disable debugging\n", argv[0]);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Debugger::Cmd_DebugFlagsList(int argc, const char **argv) {
|
||||
const Common::DebugManager::DebugChannelList &debugLevels = DebugMan.listDebugChannels();
|
||||
|
||||
|
@ -193,6 +193,7 @@ protected:
|
||||
bool Cmd_Exit(int argc, const char **argv);
|
||||
bool Cmd_Help(int argc, const char **argv);
|
||||
bool Cmd_OpenLog(int argc, const char **argv);
|
||||
bool Cmd_DebugLevel(int argc, const char **argv);
|
||||
bool Cmd_DebugFlagsList(int argc, const char **argv);
|
||||
bool Cmd_DebugFlagEnable(int argc, const char **argv);
|
||||
bool Cmd_DebugFlagDisable(int argc, const char **argv);
|
||||
|
@ -250,7 +250,18 @@ void Dialog::handleKeyDown(Common::KeyState state) {
|
||||
close();
|
||||
}
|
||||
|
||||
// TODO: tab/shift-tab should focus the next/previous focusable widget
|
||||
if (state.keycode == Common::KEYCODE_TAB) {
|
||||
// TODO: Maybe add Tab behaviours for all widgets too.
|
||||
// searches through widgets on screen for tab widget
|
||||
Widget *w = _firstWidget;
|
||||
while (w) {
|
||||
if (w->_type == kTabWidget)
|
||||
if (w->handleKeyDown(state))
|
||||
return;
|
||||
|
||||
w = w->_next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Dialog::handleKeyUp(Common::KeyState state) {
|
||||
|
@ -183,6 +183,7 @@ void TabWidget::setActiveTab(int tabID) {
|
||||
}
|
||||
_activeTab = tabID;
|
||||
_firstWidget = _tabs[tabID].firstWidget;
|
||||
|
||||
_boss->draw();
|
||||
}
|
||||
}
|
||||
@ -226,12 +227,34 @@ void TabWidget::handleMouseDown(int x, int y, int button, int clickCount) {
|
||||
}
|
||||
|
||||
bool TabWidget::handleKeyDown(Common::KeyState state) {
|
||||
// TODO: maybe there should be a way to switch between tabs
|
||||
// using the keyboard? E.g. Alt-Shift-Left/Right-Arrow or something
|
||||
// like that.
|
||||
if (state.hasFlags(Common::KBD_SHIFT) && state.keycode == Common::KEYCODE_TAB)
|
||||
adjustTabs(kTabBackwards);
|
||||
else if (state.keycode == Common::KEYCODE_TAB)
|
||||
adjustTabs(kTabForwards);
|
||||
|
||||
return Widget::handleKeyDown(state);
|
||||
}
|
||||
|
||||
void TabWidget::adjustTabs(int value) {
|
||||
// Determine which tab is next
|
||||
int tabID = _activeTab + value;
|
||||
if (tabID >= (int)_tabs.size())
|
||||
tabID = 0;
|
||||
else if (tabID < 0)
|
||||
tabID = ((int)_tabs.size() - 1);
|
||||
|
||||
// Slides _firstVisibleTab forward to the correct tab
|
||||
int maxTabsOnScreen = (_w / _tabWidth);
|
||||
if (tabID >= maxTabsOnScreen && (_firstVisibleTab + maxTabsOnScreen) < (int)_tabs.size())
|
||||
_firstVisibleTab++;
|
||||
|
||||
// Slides _firstVisibleTab backwards to the correct tab
|
||||
while (tabID < _firstVisibleTab)
|
||||
_firstVisibleTab--;
|
||||
|
||||
setActiveTab(tabID);
|
||||
}
|
||||
|
||||
void TabWidget::reflowLayout() {
|
||||
Widget::reflowLayout();
|
||||
|
||||
|
@ -28,6 +28,11 @@
|
||||
#include "common/array.h"
|
||||
|
||||
namespace GUI {
|
||||
|
||||
enum {
|
||||
kTabForwards = 1,
|
||||
kTabBackwards = -1
|
||||
};
|
||||
|
||||
class TabWidget : public Widget {
|
||||
typedef Common::String String;
|
||||
@ -109,6 +114,8 @@ protected:
|
||||
virtual void drawWidget();
|
||||
|
||||
virtual Widget *findWidget(int x, int y);
|
||||
|
||||
virtual void adjustTabs(int value);
|
||||
};
|
||||
|
||||
} // End of namespace GUI
|
||||
|
Loading…
x
Reference in New Issue
Block a user