RagePhoto: add RagePhotoPrivate class
This commit is contained in:
parent
81675355b0
commit
6bb8843971
6 changed files with 289 additions and 256 deletions
4
.github/workflows/ubuntu.yml
vendored
4
.github/workflows/ubuntu.yml
vendored
|
@ -2,9 +2,9 @@ name: Ubuntu
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ test ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ test ]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BUILD_TYPE: Release
|
BUILD_TYPE: Release
|
||||||
|
|
4
.github/workflows/windows.yml
vendored
4
.github/workflows/windows.yml
vendored
|
@ -2,9 +2,9 @@ name: Windows
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ test ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ test ]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BUILD_TYPE: Release
|
BUILD_TYPE: Release
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -22,14 +22,12 @@
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#include "libragephoto_global.h"
|
#include "libragephoto_global.h"
|
||||||
#include "RagePhotoData.h"
|
#include "RagePhotoData.h"
|
||||||
#include <unordered_map>
|
|
||||||
#include <functional>
|
|
||||||
#include <iostream>
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
typedef std::function<bool(const char*, size_t, RagePhotoData*)> RagePhotoLoadFunc;
|
class RagePhotoPrivate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief GTA V and RDR 2 Photo Parser.
|
* \brief GTA V and RDR 2 Photo Parser.
|
||||||
|
@ -168,8 +166,7 @@ public:
|
||||||
void setTitle(const std::string &title, uint32_t bufferSize = 0); /**< Sets the Photo title. */
|
void setTitle(const std::string &title, uint32_t bufferSize = 0); /**< Sets the Photo title. */
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unordered_map<uint8_t, RagePhotoLoadFunc> m_loadFuncs;
|
RagePhotoPrivate *m_rpp;
|
||||||
RagePhotoData m_data;
|
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
#include "RagePhotoC.h"
|
#include "RagePhotoC.h"
|
||||||
|
|
|
@ -21,8 +21,9 @@
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#include "libragephoto_global.h"
|
#include "libragephoto_global.h"
|
||||||
#include <iostream>
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <iostream>
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
struct LIBRAGEPHOTO_CXX_EXPORT RagePhotoData
|
struct LIBRAGEPHOTO_CXX_EXPORT RagePhotoData
|
||||||
{
|
{
|
||||||
|
@ -47,6 +48,8 @@ struct LIBRAGEPHOTO_CXX_EXPORT RagePhotoData
|
||||||
uint32_t unnamedSum1;
|
uint32_t unnamedSum1;
|
||||||
uint32_t unnamedSum2;
|
uint32_t unnamedSum2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef std::function<bool(const char*, size_t, RagePhotoData*)> RagePhotoLoadFunc;
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|
||||||
#endif // RAGEPHOTODATA_H
|
#endif // RAGEPHOTODATA_H
|
||||||
|
|
31
src/RagePhoto_p.h
Normal file
31
src/RagePhoto_p.h
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
/*****************************************************************************
|
||||||
|
* libragephoto RAGE Photo Parser
|
||||||
|
* Copyright (C) 2021 Syping
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
* are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* This software is provided as-is, no warranties are given to you, we are not
|
||||||
|
* responsible for anything with use of the software, you are self responsible.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef RAGEPHOTO_P_H
|
||||||
|
#define RAGEPHOTO_P_H
|
||||||
|
|
||||||
|
#include "RagePhotoData.h"
|
||||||
|
#include <iostream>
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
|
class RagePhotoPrivate {
|
||||||
|
public:
|
||||||
|
std::unordered_map<uint8_t, RagePhotoLoadFunc> m_loadFuncs;
|
||||||
|
RagePhotoData m_data;
|
||||||
|
};
|
||||||
|
#endif // RAGEPHOTO_P_H
|
Loading…
Reference in a new issue