Skip to content

Commit

Permalink
Merge branch 'master' of github.com:skyjake/Doomsday-Engine
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Jul 18, 2016
2 parents 2a9911c + c2a7bc5 commit e006d8f
Show file tree
Hide file tree
Showing 32 changed files with 390 additions and 149 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -4,7 +4,7 @@ This is the source code for Doomsday Engine: a portable, enhanced source port of

For [compilation instructions](http://wiki.dengine.net/w/Compilation) and other details, see the documentation wiki: http://wiki.dengine.net/

Linux 64-bit [![Linux Build Status](https://travis-ci.org/skyjake/Doomsday-Engine.svg)](https://travis-ci.org/skyjake/Doomsday-Engine)
Linux 64-bit [![Linux Build Status](https://travis-ci.org/skyjake/Doomsday-Engine.svg)](https://travis-ci.org/skyjake/Doomsday-Engine) Windows 32-bit [![Windows Build Status](https://ci.appveyor.com/api/projects/status/79h7egw7q225gj2h?svg=true)](https://ci.appveyor.com/project/skyjake/doomsday-engine)

## Libraries

Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml.disabled → appveyor.yml
@@ -1,7 +1,7 @@
# Build configuration for AppVeyor CI Windows builds
configuration: Release
platform: Win32
os: Visual Studio 2013
os: Visual Studio 2015
environment:
DENG_DEPEND_PATH: c:\projects\doomsday-engine\deps
before_build:
Expand All @@ -10,7 +10,7 @@ before_build:
- 7z x deps.7z
- md build-ci
- cd build-ci
- cmake -G "Visual Studio 12 2013" -DQMAKE=C:\Qt\5.5\msvc2013\bin\qmake.exe -DDENG_ENABLE_TESTS=ON ..\doomsday
- cmake -G "Visual Studio 14 2015" -DQMAKE=C:\Qt\5.6\msvc2015\bin\qmake.exe -DDENG_ENABLE_TESTS=ON ..\doomsday
build:
parallel: true
verbosity: minimal
Expand Down
4 changes: 4 additions & 0 deletions doomsday/apps/client/include/ui/clientwindow.h
Expand Up @@ -53,6 +53,7 @@ class ConsoleWidget;
class TaskBarWidget;
class BusyWidget;
class AlertDialog;
class HomeWidget;

/**
* Top-level window that contains UI widgets. @ingroup gui
Expand All @@ -79,6 +80,7 @@ class ClientWindow : public de::BaseWindow
de::GuiWidget &taskBarBlur();
ConsoleWidget &console();
de::NotificationAreaWidget &notifications();
HomeWidget &home();
GameWidget &game();
BusyWidget &busy();
AlertDialog &alerts();
Expand Down Expand Up @@ -125,6 +127,8 @@ class ClientWindow : public de::BaseWindow
*/
void setGameMinimized(bool minimize);

bool isGameMinimized() const;

/**
* Must be called before any canvas windows are created. Defines the
* default OpenGL format settings for the contained canvases.
Expand Down
4 changes: 2 additions & 2 deletions doomsday/apps/client/include/ui/home/homewidget.h
Expand Up @@ -40,8 +40,8 @@ class HomeWidget : public de::GuiWidget, public de::IPersistent
bool dispatchEvent(de::Event const &event,
bool (de::Widget::*memberFunc)(de::Event const &)) override;

void moveOnscreen();
void moveOffscreen();
void moveOnscreen(de::TimeDelta span = 1.5);
void moveOffscreen(de::TimeDelta span = 1.5);

// Events.
void update() override;
Expand Down
1 change: 1 addition & 0 deletions doomsday/apps/client/include/ui/widgets/busywidget.h
Expand Up @@ -34,6 +34,7 @@ class BusyWidget : public de::GuiWidget

void renderTransitionFrame();
void releaseTransitionFrame();
void clearTransitionFrameToBlack();
de::GLTexture const *transitionFrame() const;

// Events.
Expand Down
8 changes: 7 additions & 1 deletion doomsday/apps/client/include/ui/widgets/gamewidget.h
Expand Up @@ -14,7 +14,7 @@
* 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>
* http://www.gnu.org/licenses</small>
*/

#ifndef CLIENT_GAMEWIDGET_H
Expand All @@ -41,6 +41,12 @@ class GameWidget : public de::GuiWidget
*/
void glApplyViewport(de::Rectanglei const &rect);

/**
* Pauses the game, if one is currently running and pausing is allowed.
*/
void pause();

// Events.
void viewResized();
void update();
void drawContent();
Expand Down
7 changes: 6 additions & 1 deletion doomsday/apps/client/include/ui/widgets/packageswidget.h
Expand Up @@ -47,14 +47,19 @@ class PackagesWidget : public de::GuiWidget, public de::IPersistent
virtual bool isPackageHighlighted(de::String const &packageId) const = 0;
};

enum PopulateBehavior { PopulationDisabled, PopulationEnabled };

public:
PackagesWidget(de::String const &name = de::String());
PackagesWidget(PopulateBehavior popBehavior = PopulationEnabled,
de::String const &name = de::String());

PackagesWidget(de::StringList const &manualPackageIds,
de::String const &name = de::String());

de::ProgressWidget &progress();

void setPopulationEnabled(bool enable);

void setFilterEditorMinimumY(de::Rule const &minY);

//void setMaximumPanelHeight(de::Rule const &maxHeight);
Expand Down
3 changes: 1 addition & 2 deletions doomsday/apps/client/include/ui/widgets/taskbarwidget.h
Expand Up @@ -63,8 +63,7 @@ public slots:
void unloadGame();
void showAbout();
void showUpdaterSettings();
void switchGame();
void showMultiplayer();
void showOrHideHome();
void connectToServerManually();
void showTutorial();
void openPackagesSidebar();
Expand Down
15 changes: 10 additions & 5 deletions doomsday/apps/client/src/gl/dgl_common.cpp
Expand Up @@ -375,11 +375,16 @@ DENG_EXTERN_C void DGL_SetScissor(RectRaw const *rect)

GameWidget &game = ClientWindow::main().game();

GLState::current().setNormalizedScissor(
game.normalizedRect(
Rectanglei(rect->origin.x, rect->origin.y,
rect->size.width, rect->size.height),
game.rule().recti())).apply();
// Note that the game is unaware of the game widget position, assuming that (0,0)
// is the top left corner of the drawing area. Fortunately, the current viewport
// has been set to cover the game widget area, so we can set the scissor relative
// to it.

auto norm = GuiWidget::normalizedRect(Rectanglei(rect->origin.x, rect->origin.y,
rect->size.width, rect->size.height),
Rectanglei::fromSize(game.rule().recti().size()));

GLState::current().setNormalizedScissor(norm).apply();
}

#undef DGL_SetScissor2
Expand Down
4 changes: 2 additions & 2 deletions doomsday/apps/client/src/gl/gl_draw.cpp
Expand Up @@ -409,7 +409,7 @@ DENG_EXTERN_C void GL_BeginBorderedProjection(dgl_borderedprojectionstate_t* bp)
int offset = int((bp->availWidth - bp->scaleFactor * bp->width) / 2 + .5f);
if(bp->flags & BPF_OVERDRAW_CLIP)
{
DGL_SetScissor2(DENG_GAMEVIEW_X + offset, DENG_GAMEVIEW_Y,
DGL_SetScissor2(offset, 0,
int(bp->scaleFactor * bp->width), bp->availHeight);
}

Expand All @@ -422,7 +422,7 @@ DENG_EXTERN_C void GL_BeginBorderedProjection(dgl_borderedprojectionstate_t* bp)
int offset = int((bp->availHeight - bp->scaleFactor * 1.2f * bp->height) / 2 + .5f);
if(bp->flags & BPF_OVERDRAW_CLIP)
{
DGL_SetScissor2(DENG_GAMEVIEW_X, DENG_GAMEVIEW_Y + offset,
DGL_SetScissor2(0, offset,
bp->availWidth, int(bp->scaleFactor * 1.2f * bp->height));
}

Expand Down
4 changes: 2 additions & 2 deletions doomsday/apps/client/src/network/net_main.cpp
Expand Up @@ -1306,7 +1306,7 @@ D_CMD(Net)
}
else return false;
}
else if(!stricmp(argv[1], "setup"))
/*else if(!stricmp(argv[1], "setup"))
{
// Start network setup.
if(!stricmp(argv[2], "client"))
Expand All @@ -1315,7 +1315,7 @@ D_CMD(Net)
ClientWindow::main().taskBar().showMultiplayer();
}
else return false;
}
}*/
#endif
}

Expand Down

0 comments on commit e006d8f

Please sign in to comment.