mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-03-21 17:55:13 -05:00
29 lines
875 B
C
29 lines
875 B
C
#ifndef GUARD_MESSAGESENCODER_H
|
|
#define GUARD_MESSAGESENCODER_H
|
|
|
|
|
|
#include "MessagesConverter.h"
|
|
|
|
class MessagesEncoder : public MessagesConverter
|
|
{
|
|
map <string, uint16_t> cmdmap;
|
|
map <string, uint16_t> charmap;
|
|
|
|
void ReadMessagesFromText(string& filename);
|
|
void ReadMessagesFromGMM(string& filename);
|
|
void ReadMessagesFromJson(string& filename);
|
|
void WriteMessagesToBin(string& filename);
|
|
u16string EncodeMessage(const string& message, int & i);
|
|
void CharmapRegisterCharacter(string& code, uint16_t value) override;
|
|
void CmdmapRegisterCommand(string& command, uint16_t value) override;
|
|
public:
|
|
MessagesEncoder(Options &options) : MessagesConverter(options) {}
|
|
void ReadInput() override;
|
|
void Convert() override;
|
|
void WriteOutput() override;
|
|
~MessagesEncoder() override = default;
|
|
};
|
|
|
|
|
|
#endif //GUARD_MESSAGESENCODER_H
|