Navigation Menu

Skip to content

Commit

Permalink
Merge branch 'ui-multiplayer' of https://github.com/skyjake/Doomsday-…
Browse files Browse the repository at this point in the history
…Engine into oculus-refactor
  • Loading branch information
skyjake committed Feb 24, 2014
2 parents 53ec5f6 + 432e1ac commit 7c4e311
Show file tree
Hide file tree
Showing 480 changed files with 15,025 additions and 12,994 deletions.
11 changes: 7 additions & 4 deletions distrib/autobuild.py
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2.7
# coding=utf-8
#
# Script for performing automated build events.
Expand Down Expand Up @@ -64,9 +64,12 @@ def todays_platform_release():
os.chdir(builder.config.DISTRIB_DIR)
oldFiles = DirState('releases', subdirs=False)

print 'platform_release.py...'
os.system("python platform_release.py > %s 2> %s" % \
('buildlog.txt', 'builderrors.txt'))
try:
print 'platform_release.py...'
run_python2("platform_release.py > %s 2> %s" % \
('buildlog.txt', 'builderrors.txt'))
except Exception, x:
print 'Error during platform_release:', x

for n in DirState('releases', subdirs=False).list_new_files(oldFiles):
# Copy any new files.
Expand Down
2 changes: 1 addition & 1 deletion distrib/build_number.py
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2.7
# Determining the number of a build.

import time
Expand Down
3 changes: 2 additions & 1 deletion distrib/build_version.py
Expand Up @@ -3,7 +3,8 @@
import os
import string

DOOMSDAY_DIR = os.path.join(os.getcwd(), '..', 'doomsday')
DOOMSDAY_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..', 'doomsday')

DOOMSDAY_VERSION_FULL = "0.0.0-Name"
DOOMSDAY_VERSION_FULL_PLAIN = "0.0.0"
DOOMSDAY_VERSION_MAJOR = 0
Expand Down
15 changes: 14 additions & 1 deletion distrib/builder/utils.py
Expand Up @@ -192,4 +192,17 @@ def version_cmp(a, b):
def system_command(cmd):
result = subprocess.call(cmd, shell=True)
if result != 0:
raise Exception("Error from " + cmd)
raise Exception("System command \"%s\" returned error code %i" % (cmd, result))


def python2_executable():
if sys.platform[:3] == 'win':
return 'python'
elif mac_os_version() == '10.5':
return '/usr/bin/env python2.5' # required by Snowberry
else:
return '/usr/bin/env python2.7'


def run_python2(script):
system_command(python2_executable() + " " + script)
8 changes: 4 additions & 4 deletions distrib/pilot.py
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2.7
# coding=utf-8
#
# The Doomsday Build Pilot
Expand Down Expand Up @@ -35,6 +35,7 @@
import struct
import time
import SocketServer
import builder.utils

def homeDir():
"""Determines the path of the pilot home directory."""
Expand Down Expand Up @@ -414,8 +415,7 @@ def handleCompletedTasks():


def autobuild(cmd):
cmdLine = "python %s %s" % (os.path.join(pilotcfg.DISTRIB_DIR,
'autobuild.py'), cmd)
cmdLine = "%s %s" % (os.path.join(pilotcfg.DISTRIB_DIR, 'autobuild.py'), cmd)
cmdLine += " --distrib %s" % pilotcfg.DISTRIB_DIR
if 'EVENTS_DIR' in dir(pilotcfg):
cmdLine += " --events %s" % pilotcfg.EVENTS_DIR
Expand All @@ -424,7 +424,7 @@ def autobuild(cmd):

cmdLine += " --branch %s" % currentBranch()

systemCommand(cmdLine)
builder.utils.run_python2(cmdLine)
return True


Expand Down
4 changes: 2 additions & 2 deletions distrib/platform_release.py
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2.7
# This script builds the distribution packages platform-independently.
# No parameters needed; config is auto-detected.

Expand Down Expand Up @@ -160,7 +160,7 @@ def mac_package_snowberry():
f = file('VERSION', 'wt')
f.write(DOOMSDAY_VERSION_FULL)
f.close()
os.system('python buildapp.py py2app')
builder.utils.run_python2('buildapp.py py2app')

# Share it.
duptree('dist/Doomsday Engine.app', 'shared/')
Expand Down
2 changes: 1 addition & 1 deletion doomsday/api/api_player.h
Expand Up @@ -111,7 +111,7 @@ typedef struct {
#define LOOKDIR2DEG(x) ((x) * 85.0f/LOOKDIRMAX)

/// Player lookdir (view pitch) conversion to radians. @ingroup player
#define LOOKDIR2RAD(x) (LOOKDIR2DEG(x)/180*PI)
#define LOOKDIR2RAD(x) (LOOKDIR2DEG(x)/180*DD_PI)

struct mobj_s;
struct polyobj_s;
Expand Down
3 changes: 3 additions & 0 deletions doomsday/apidoc/.gitignore
Expand Up @@ -5,3 +5,6 @@ jdoom
jheretic
jhexen
shell
gui
appfw

6 changes: 4 additions & 2 deletions doomsday/build/build.pro
Expand Up @@ -9,8 +9,10 @@ TEMPLATE = subdirs
# Let's print the build configuration during this qmake invocation.
CONFIG += deng_verbosebuildconfig

include(../macros.pri)

# Always update versions.pri.
system(cd "$$PWD/.." && python configure.py)
runPython2InDir($$PWD/.., configure.py)

include(../config.pri)

Expand All @@ -19,7 +21,7 @@ QMAKE_STRIP = true

# Update the PK3 files.
!deng_nopackres {
system(cd $$PWD/scripts/ && python packres.py --quiet \"$$OUT_PWD/..\")
runPython2InDir($$PWD/scripts/, packres.py --quiet \"$$OUT_PWD/..\")
}

# Install the launcher.
Expand Down
2 changes: 1 addition & 1 deletion doomsday/build/scripts/codex.py
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2.7
# coding=utf-8
#
# Repository Codex Generator by <jaakko.keranen@iki.fi>
Expand Down
2 changes: 1 addition & 1 deletion doomsday/build/scripts/makehelp.py
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2.7

import os, sys
import conhelp
Expand Down
2 changes: 1 addition & 1 deletion doomsday/build/scripts/packres.py
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2.7
# This Python script will create a set of PK3 files that contain the files
# that Doomsday needs at runtime. The PK3 files are organized using the
# traditional data/ and defs/ structure.
Expand Down
2 changes: 1 addition & 1 deletion doomsday/build/scripts/wadcompiler.py
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2.7

import sys, os.path, struct

Expand Down
6 changes: 3 additions & 3 deletions doomsday/build/win32/qmake_msvc.py
@@ -1,6 +1,6 @@
# qmake_msvc.py is a script that generates a full Visual Studio solution with
# a .vcxproj for each subproject. You must set up envconfig.bat before running
# the script. The solution is always placed in a folder called
# qmake_msvc.py is a Python 2 script that generates a full Visual Studio
# solution with a .vcxproj for each subproject. You must set up envconfig.bat
# before running the script. The solution is always placed in a folder called
# "doomsday-msvc-build" at the repository root.
#
# qmake_msvc.py must be called whenever the .pro/.pri files change. The .sln
Expand Down
4 changes: 4 additions & 0 deletions doomsday/client/client.pro
Expand Up @@ -379,6 +379,7 @@ DENG_HEADERS += \
include/ui/dialogs/gamesdialog.h \
include/ui/dialogs/inputsettingsdialog.h \
include/ui/dialogs/logsettingsdialog.h \
include/ui/dialogs/manualconnectiondialog.h \
include/ui/dialogs/networksettingsdialog.h \
include/ui/dialogs/renderersettingsdialog.h \
include/ui/dialogs/videosettingsdialog.h \
Expand All @@ -392,6 +393,7 @@ DENG_HEADERS += \
include/ui/widgets/cvarlineeditwidget.h \
include/ui/widgets/cvarsliderwidget.h \
include/ui/widgets/cvartogglewidget.h \
include/ui/widgets/gamefilterwidget.h \
include/ui/widgets/gameselectionwidget.h \
include/ui/widgets/gamesessionwidget.h \
include/ui/widgets/gameuiwidget.h \
Expand Down Expand Up @@ -704,6 +706,7 @@ SOURCES += \
src/ui/dialogs/gamesdialog.cpp \
src/ui/dialogs/inputsettingsdialog.cpp \
src/ui/dialogs/logsettingsdialog.cpp \
src/ui/dialogs/manualconnectiondialog.cpp \
src/ui/dialogs/networksettingsdialog.cpp \
src/ui/dialogs/videosettingsdialog.cpp \
src/ui/dialogs/vrsettingsdialog.cpp \
Expand All @@ -728,6 +731,7 @@ SOURCES += \
src/ui/widgets/cvarlineeditwidget.cpp \
src/ui/widgets/cvarsliderwidget.cpp \
src/ui/widgets/cvartogglewidget.cpp \
src/ui/widgets/gamefilterwidget.cpp \
src/ui/widgets/gameselectionwidget.cpp \
src/ui/widgets/gamesessionwidget.cpp \
src/ui/widgets/gamewidget.cpp \
Expand Down
4 changes: 4 additions & 0 deletions doomsday/client/data/defaultstyle.pack/colors.dei
Expand Up @@ -42,6 +42,10 @@ group choice {
color popup { rgb $= gui.colorAlpha(background.rgb, 1.0) }
}

group tab {
color selected { rgb $= accent.rgb }
}

group progress {
group light {
color wheel { rgb <1.0, 1.0, 1.0, 0.25> }
Expand Down
18 changes: 13 additions & 5 deletions doomsday/client/data/defaultstyle.pack/fonts.dei
Expand Up @@ -97,6 +97,10 @@ font heading inherits title {
size $: gui.scale(default.size, 1.2)
}

font small inherits default {
size $: gui.scale(__this__.size, 0.75)
}

group editor {
font plaintext inherits default {}
font hint inherits default {
Expand All @@ -109,8 +113,7 @@ group separator {
font empty inherits default {
size $: gui.scale(__this__.size, 0.5)
}
font label inherits default {
size $: gui.scale(__this__.size, 0.75)
font label inherits small {
weight: bold
}
}
Expand All @@ -121,10 +124,15 @@ group choice {
}
}

group slider {
font label inherits default {
size $: gui.scale(__this__.size, 0.75)
group tab {
font label inherits small {
weight: bold
}
font selected inherits tab.label {}
}

group slider {
font label inherits small {}
font value inherits slider.label {
weight: bold
}
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doomsday/client/data/defaultstyle.pack/images.dei
Expand Up @@ -20,6 +20,7 @@ group logo {
}

image alert { path = "graphics/alert.png" }
image fold { path = "graphics/fold.png" }
image gauge { path = "graphics/gauge.png" }
image gear { path = "graphics/gear.png" }
image display { path = "graphics/display.png" }
Expand Down
52 changes: 52 additions & 0 deletions doomsday/client/include/ui/dialogs/manualconnectiondialog.h
@@ -0,0 +1,52 @@
/** @file manualconnectiondialog.h Dialog for connecting to a server.
*
* @authors Copyright (c) 2014 Jaakko Keränen <jaakko.keranen@iki.fi>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
*
* <small>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; either version 2 of the License, or (at your
* option) any later version. 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 for more details. You should have received a copy of the GNU
* General Public License along with this program; if not, see:
* http://www.gnu.org/licenses</small>
*/

#ifndef DENG_CLIENT_MANUALCONNECTIONDIALOG_H
#define DENG_CLIENT_MANUALCONNECTIONDIALOG_H

#include <de/InputDialog>
#include <de/IPersistent>

/**
* Dialog for connecting to a multiplayer server manually using an IP address or domain
* name. The TCP port number can also be optionally provided.
*
* The dialog stores the previously used address persistently.
*/
class ManualConnectionDialog : public de::InputDialog, public de::IPersistent
{
Q_OBJECT

public:
ManualConnectionDialog(de::String const &name = "manualconnection");

// Implements IPersistent.
void operator >> (de::PersistentState &toState) const;
void operator << (de::PersistentState const &fromState);

public slots:
void validate();

protected:
void finish(int result);

private:
DENG2_PRIVATE(d)
};

#endif // DENG_CLIENT_MANUALCONNECTIONDIALOG_H
7 changes: 6 additions & 1 deletion doomsday/client/include/ui/widgets/consolewidget.h
Expand Up @@ -23,6 +23,7 @@
#include <de/GuiWidget>
#include <de/ButtonWidget>
#include <de/LogWidget>
#include <de/IPersistent>

#include "consolecommandwidget.h"

Expand All @@ -34,7 +35,7 @@
*
* @ingroup gui
*/
class ConsoleWidget : public de::GuiWidget
class ConsoleWidget : public de::GuiWidget, public de::IPersistent
{
Q_OBJECT

Expand Down Expand Up @@ -63,6 +64,10 @@ class ConsoleWidget : public de::GuiWidget
void update();
bool handleEvent(de::Event const &event);

// Implements IPersistent.
void operator >> (de::PersistentState &toState) const;
void operator << (de::PersistentState const &fromState);

signals:
void commandModeChanged();
void commandLineGotFocus();
Expand Down

0 comments on commit 7c4e311

Please sign in to comment.