summaryrefslogtreecommitdiff
path: root/games/bzflag/patches/patch-ag
diff options
context:
space:
mode:
Diffstat (limited to 'games/bzflag/patches/patch-ag')
-rw-r--r--games/bzflag/patches/patch-ag67
1 files changed, 67 insertions, 0 deletions
diff --git a/games/bzflag/patches/patch-ag b/games/bzflag/patches/patch-ag
new file mode 100644
index 00000000000..f552031bfb1
--- /dev/null
+++ b/games/bzflag/patches/patch-ag
@@ -0,0 +1,67 @@
+$NetBSD: patch-ag,v 1.1.1.1 2002/09/24 12:49:13 blymn Exp $
+
+--- src/platform/NetBSDPlatformFactory.cxx.orig Sun Sep 22 22:29:02 2002
++++ src/platform/NetBSDPlatformFactory.cxx
+@@ -0,0 +1,62 @@
++/* bzflag
++ * Copyright (c) 1993 - 2002 Tim Riker
++ *
++ * This package is free software; you can redistribute it and/or
++ * modify it under the terms of the license found in the file
++ * named LICENSE that should have accompanied this file.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#include "NetBSDPlatformFactory.h"
++#include "NetBSDDisplay.h"
++#include "XVisual.h"
++#include "XWindow.h"
++#include "NetBSDMedia.h"
++
++PlatformFactory* PlatformFactory::getInstance()
++{
++ if (!instance) instance = new NetBSDPlatformFactory;
++ return instance;
++}
++
++NetBSDPlatformFactory::NetBSDPlatformFactory()
++{
++ // do nothing
++}
++
++NetBSDPlatformFactory::~NetBSDPlatformFactory()
++{
++ // do nothing
++}
++
++BzfDisplay* NetBSDPlatformFactory::createDisplay(
++ const char* name, const char*)
++{
++ XDisplay* display = new XDisplay(name, new NetBSDDisplayMode);
++ if (!display || !display->isValid()) {
++ delete display;
++ return NULL;
++ }
++ return display;
++}
++
++BzfVisual* NetBSDPlatformFactory::createVisual(
++ const BzfDisplay* display)
++{
++ return new XVisual((const XDisplay*)display);
++}
++
++BzfWindow* NetBSDPlatformFactory::createWindow(
++ const BzfDisplay* display, BzfVisual* visual)
++{
++ return new XWindow((const XDisplay*)display, (XVisual*)visual);
++}
++
++BzfMedia* NetBSDPlatformFactory::createMedia()
++{
++ return new NetBSDMedia;
++}
++// ex: shiftwidth=2 tabstop=8