V-Gears 0
Free Final Fantasy VII engine.
VGearsTexCodec.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 The V-Gears Team
3 *
4 * This file is part of V-Gears
5 *
6 * V-Gears is free software: you can redistribute it and/or modify it under
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, version 3.0 (GPLv3) of the License.
9 *
10 * V-Gears is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#pragma once
17
18#include <OgreImageCodec.h>
19#include <OgreCodec.h>
20#include "VGearsPrerequisites.h"
21
22namespace VGears{
23
27 class _VGearsExport TexCodec : public Ogre::ImageCodec{
28
29 public:
30
34 TexCodec();
35
39 virtual ~TexCodec();
40
46 virtual Ogre::String getType() const;
47
56 virtual Ogre::DataStreamPtr encode(
57 Ogre::MemoryDataStreamPtr& input, CodecDataPtr& output
58 ) const final;
59
69 virtual void encodeToFile(
70 Ogre::MemoryDataStreamPtr& input, const Ogre::String& output,
71 CodecDataPtr& extra
72 ) const final;
73
80 Ogre::Codec::DecodeResult decode(Ogre::DataStreamPtr& input) const;
81
93 virtual Ogre::String magicNumberToFileExt(
94 const char *magic_number, size_t max_bytes
95 ) const;
96
101
113 static void install();
114
126 static void initialise();
127
138 static void shutdown();
139
152 static void uninstall();
153
154 private:
155
160 };
161}
#define _VGearsExport
This file import prerequisites.
Definition: VGearsPrerequisites.h:35
Handles text encoding from font images.
Definition: VGearsTexCodec.h:27
static Ogre::String TYPE_NAME
The codec type name.
Definition: VGearsTexCodec.h:100
static TexCodec * tex_codec_
The text codec.
Definition: VGearsTexCodec.h:159
Definition: FF7NameLookup.h:24
Ogre::String String
Definition: TypeDefine.h:37