From: <bal...@us...> - 2003-12-18 20:20:56
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/DLGImporter In directory sc8-pr-cvs1:/tmp/cvs-serv30825 Added Files: DLGImporter.cpp DLGImpCD.h DLGImpCD.cpp DLGImp.h DLGImp.cpp Log Message: First Import : DLGImporter Module : Empty Dialog Importer --- NEW FILE: DLGImporter.cpp --- /* GemRB - Infinity Engine Emulator * Copyright (C) 2003 The GemRB Project * * 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. * * $Header: /cvsroot/gemrb/gemrb/gemrb/plugins/DLGImporter/DLGImporter.cpp,v 1.1 2003/12/18 20:20:52 balrog994 Exp $ * */ // 2DAImporter.cpp : Defines the entry point for the DLL application. // #include "../../includes/globals.h" #include "DLGImpCD.h" #ifdef WIN32 #define GEM_EXPORT_DLL __declspec(dllexport) #else #define GEM_EXPORT_DLL #endif #ifdef WIN32 #include <windows.h> BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { return TRUE; } #endif GEM_EXPORT_DLL int LibNumberClasses() { return 1; } GEM_EXPORT_DLL ClassDesc *LibClassDesc(int i) { switch(i) { case 0: return &DlgImpCD; default: return 0; } } GEM_EXPORT_DLL const char *LibDescription() { return "DLG File Importer"; } GEM_EXPORT_DLL unsigned long LibVersion() { return VERSION_GEMRB; } --- NEW FILE: DLGImpCD.h --- /* GemRB - Infinity Engine Emulator * Copyright (C) 2003 The GemRB Project * * 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. * * $Header: /cvsroot/gemrb/gemrb/gemrb/plugins/DLGImporter/DLGImpCD.h,v 1.1 2003/12/18 20:20:52 balrog994 Exp $ * */ #ifndef DLGIMPCD_H #define DLGIMPCD_H #include "../Core/ClassDesc.h" class DLGImpCD : public ClassDesc { public: DLGImpCD(void); ~DLGImpCD(void); void * Create(void); const char* ClassName(void); SClass_ID SuperClassID(void); Class_ID ClassID(void); const char* InternalName(void); }; static DLGImpCD DlgImpCD; #endif --- NEW FILE: DLGImpCD.cpp --- /* GemRB - Infinity Engine Emulator * Copyright (C) 2003 The GemRB Project * * 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. * * $Header: /cvsroot/gemrb/gemrb/gemrb/plugins/DLGImporter/DLGImpCD.cpp,v 1.1 2003/12/18 20:20:52 balrog994 Exp $ * */ #include "DLGImpCD.h" #include "DLGImp.h" DLGImpCD::DLGImpCD(void) { } DLGImpCD::~DLGImpCD(void) { } void * DLGImpCD::Create(void) { return new DLGImp(); } const char* DLGImpCD::ClassName(void) { return "DLGImporter"; } SClass_ID DLGImpCD::SuperClassID(void) { return IE_DLG_CLASS_ID; } Class_ID DLGImpCD::ClassID(void) { return Class_ID(0x76adef24, 0x17adc342); } const char* DLGImpCD::InternalName(void) { return "DLGImp"; } --- NEW FILE: DLGImp.h --- /* GemRB - Infinity Engine Emulator * Copyright (C) 2003 The GemRB Project * * 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. * * $Header: /cvsroot/gemrb/gemrb/gemrb/plugins/DLGImporter/DLGImp.h,v 1.1 2003/12/18 20:20:52 balrog994 Exp $ * */ #ifndef DLGIMP_H #define DLGIMP_H #include "../Core/DialogMgr.h" #include "../../includes/globals.h" class DLGImp : public DialogMgr { private: DataStream * str; bool autoFree; public: DLGImp(void); ~DLGImp(void); bool Open(DataStream * stream, bool autoFree = true); Dialog * GetDialog(); public: void release(void) { delete this; } }; #endif --- NEW FILE: DLGImp.cpp --- /* GemRB - Infinity Engine Emulator * Copyright (C) 2003 The GemRB Project * * 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. * * $Header: /cvsroot/gemrb/gemrb/gemrb/plugins/DLGImporter/DLGImp.cpp,v 1.1 2003/12/18 20:20:52 balrog994 Exp $ * */ #include "../../includes/win32def.h" #include "DLGImp.h" #include "../Core/FileStream.h" DLGImp::DLGImp(void) { str = NULL; autoFree = false; } DLGImp::~DLGImp(void) { if(str && autoFree) delete(str); } bool DLGImp::Open(DataStream * stream, bool autoFree) { if(stream == NULL) return false; if(str && this->autoFree) delete(str); str = stream; this->autoFree = autoFree; return true; } Dialog * DLGImp::GetDialog() { return NULL; } |