Files
DNF_DEV/source/Tool/Ifstream_NPK.h
2026-02-08 16:20:50 +08:00

42 lines
686 B
C++

#pragma once
#include <fstream>
#include <string>
typedef unsigned char BYTE;
class Ifstream_NPK : public std::ifstream
{
private:
const BYTE Key[256];
public:
// 构造函数
Ifstream_NPK();
// char* 转整数
int CharToInt(char *Str);
// char* 转Long
long CharToLong(char *Str);
// 读整数
int ReadInt();
// 读无符号整数
unsigned int ReadUnsignedInt();
// 读字符串
std::string ReadString();
// 读取信息
std::string ReadInfo();
// 读LONG
long ReadLong();
// 读取无符号long
unsigned long ReadUnsignedLong();
// 读指定长度数据
BYTE *ReadCustomSize(int Size);
};