[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src preview_renderer.cxx, NONE, 1.1 previ
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src preview_renderer.cxx, NONE, 1.1 preview_renderer.hxx, NONE, 1.1 |
Date: |
16 Aug 2003 16:20:32 -0000 |
Update of /var/lib/cvs/Games/Pingus/src
In directory dark:/tmp/cvs-serv31731
Added Files:
preview_renderer.cxx preview_renderer.hxx
Log Message:
- some stuff for rendering level previews
--- NEW FILE: preview_renderer.cxx ---
// $Id: preview_renderer.cxx,v 1.1 2003/08/16 16:20:30 grumbel Exp $
//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
// 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 <iostream>
#include "plf.hxx"
#include "world.hxx"
#include "gui/buffer_graphic_context.hxx"
#include "preview_renderer.hxx"
void
PreviewRenderer::render(PLFHandle plf,
const std::string& output_file)
{
std::cout << "PreviewRenderer::render: " << output_file << std::endl;
World* world = new World(*plf);
BufferGraphicContext buffer(world->get_width(), world->get_height());
world->draw(buffer);
buffer.write(output_file);
delete world;
}
/* EOF */
--- NEW FILE: preview_renderer.hxx ---
// $Id: preview_renderer.hxx,v 1.1 2003/08/16 16:20:30 grumbel Exp $
//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
// 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.
#ifndef HEADER_PREVIEW_RENDERER_HXX
#define HEADER_PREVIEW_RENDERER_HXX
#include "plf_res_mgr.hxx"
/** By given a PLF, the PreviewRenderer renders a CL_Canvas with a
graphic of the complete level, it also allows to save it down to a
file */
class PreviewRenderer
{
private:
public:
/** Render the level given by levelfile to as pnm to the file given
* by output_file
*
* @param plf PLF that describes the level
* @param output_file filename of the file to which the result should be
written
*/
static void render(PLFHandle plf, const std::string& output_file);
};
#endif
/* EOF */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src preview_renderer.cxx, NONE, 1.1 preview_renderer.hxx, NONE, 1.1,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/actions waiter.cxx,1.15,1.16
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/gui buffer_graphic_context.cxx, NONE, 1.1 buffer_graphic_context.hxx, NONE, 1.1
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/actions waiter.cxx,1.15,1.16
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/gui buffer_graphic_context.cxx, NONE, 1.1 buffer_graphic_context.hxx, NONE, 1.1
- Index(es):