1
// vi:ts=4:shiftwidth=4:expandtab
2
/***************************************************************************
3
gbdecoder.cpp - description
5
begin : Thu Mar 22 2001
6
copyright : (C) 2001 by ejoy
7
email : ejoy@users.sourceforge.net
8
***************************************************************************/
10
/***************************************************************************
12
* This program is free software; you can redistribute it and/or modify *
13
* it under the terms of the GNU General Public License as published by *
14
* the Free Software Foundation; either version 2 of the License, or *
15
* (at your option) any later version. *
17
***************************************************************************/
19
#include "gbdecoder.h"
21
GBDecoder::GBDecoder() {}
23
GBDecoder::~GBDecoder() {}
25
//check if c is byte1 of a gbcode
26
bool GBDecoder::IsCode1(char c) {
27
return (c >= 0xA1 && c <= 0xF7);
30
//check if c is byte2 of a gbcode
31
bool GBDecoder::IsCode2(char c) {
32
return (c >= 0xA1 && c <= 0xFE);
35
unsigned int GBDecoder::Index(char c1, char c2) {
36
return (c1 - 0xa1) * 94 + c2 - 0xa1;