/* * PVVMUD a 3D MUD * Copyright (C) 1998-1999 Programvareverkstedet (pvv@pvv.org) * * 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, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include "pvvmud.H" #include #include #include #include "gosmessage.H" #include "gos.H" /////////////////////////////////////////////////////////////////////////////// // MsgGOSErrorGetGOS CMsgGOSErrorGetGOS::CMsgGOSErrorGetGOS():CMsgGOSError(){ } CMsgGOSErrorGetGOS * CMsgGOSErrorGetGOS::createMsg(){ return new CMsgGOSErrorGetGOS(); } int CMsgGOSErrorGetGOS::executeMsg(){ // cdebug << "Error: " << getError() << "\n"; CGOS * gos = (CGOS*)getManager(); gos->error(); return true; } /////////////////////////////////////////////////////////////////////////////// // MsgGeometryGetGOS CMsgGeometryGetGOS::CMsgGeometryGetGOS():CMsgGeometry(){ } CMsgGeometryGetGOS * CMsgGeometryGetGOS::createMsg(){ return new CMsgGeometryGetGOS(); } int CMsgGeometryGetGOS::executeMsg(){ // cdebug << "Executing get gos geometry " << getGeometryId() << "\n"; CGOS * gos = (CGOS*)getManager(); CGeometry * geometry = getGeometry(); if (geometry != NULL) gos->geometry(geometry); return TRUE; } CGeometry * CMsgGeometryGetGOS::newGeometry(int geometryId, int numVertices, int numNormals, int numTexCoords, int numPolygons){ CGOS * gos = (CGOS*)getManager(); return gos->newGeometry(geometryId,numVertices,numNormals, numTexCoords,numPolygons); } /////////////////////////////////////////////////////////////////////////////// // MsgMaterialGetGOS CMsgMaterialGetGOS::CMsgMaterialGetGOS():CMsgMaterial(){ } CMsgMaterialGetGOS * CMsgMaterialGetGOS::createMsg(){ return new CMsgMaterialGetGOS(); } int CMsgMaterialGetGOS::executeMsg(){ // cdebug << "Executing get gos material " << getMaterialId() << "\n"; CGOS * gos = (CGOS*)getManager(); CMaterial * material = getMaterial(); if (material != NULL) gos->material(material); return TRUE; } CMaterial * CMsgMaterialGetGOS::newMaterial(int materialId){ CGOS * gos = (CGOS*)getManager(); return gos->newMaterial(materialId); } /////////////////////////////////////////////////////////////////////////////// // MsgTextureGetGOS CMsgTextureGetGOS::CMsgTextureGetGOS():CMsgTexture(){ } CMsgTextureGetGOS * CMsgTextureGetGOS::createMsg(){ return new CMsgTextureGetGOS(); } int CMsgTextureGetGOS::executeMsg(){ // cdebug << "Executing get gos texture " << getTextureId() << "\n"; CGOS * gos = (CGOS*)getManager(); CTexture * texture = getTexture(); if (texture != NULL) gos->texture(texture); return TRUE; } CTexture * CMsgTextureGetGOS::newTexture(int textureId){ CGOS * gos = (CGOS*)getManager(); return gos->newTexture(textureId); }