Compare commits

...

1 Commits
master ... test

Author SHA1 Message Date
Syping 6bb8843971 RagePhoto: add RagePhotoPrivate class 2 months ago
  1. 4
      .github/workflows/ubuntu.yml
  2. 4
      .github/workflows/windows.yml
  3. 490
      src/RagePhoto.cpp
  4. 11
      src/RagePhoto.h
  5. 5
      src/RagePhotoData.h
  6. 31
      src/RagePhoto_p.h

4
.github/workflows/ubuntu.yml

@ -2,9 +2,9 @@ name: Ubuntu
on:
push:
branches: [ master ]
branches: [ test ]
pull_request:
branches: [ master ]
branches: [ test ]
env:
BUILD_TYPE: Release

4
.github/workflows/windows.yml

@ -2,9 +2,9 @@ name: Windows
on:
push:
branches: [ master ]
branches: [ test ]
pull_request:
branches: [ master ]
branches: [ test ]
env:
BUILD_TYPE: Release

490
src/RagePhoto.cpp

File diff suppressed because it is too large

11
src/RagePhoto.h

@ -22,14 +22,12 @@
#ifdef __cplusplus
#include "libragephoto_global.h"
#include "RagePhotoData.h"
#include <unordered_map>
#include <functional>
#include <iostream>
#include <cstdlib>
#include <cstdint>
#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.
@ -168,8 +166,7 @@ public:
void setTitle(const std::string &title, uint32_t bufferSize = 0); /**< Sets the Photo title. */
private:
std::unordered_map<uint8_t, RagePhotoLoadFunc> m_loadFuncs;
RagePhotoData m_data;
RagePhotoPrivate *m_rpp;
};
#else
#include "RagePhotoC.h"

5
src/RagePhotoData.h

@ -21,8 +21,9 @@
#ifdef __cplusplus
#include "libragephoto_global.h"
#include <iostream>
#include <cstdint>
#include <iostream>
#include <functional>
struct LIBRAGEPHOTO_CXX_EXPORT RagePhotoData
{
@ -47,6 +48,8 @@ struct LIBRAGEPHOTO_CXX_EXPORT RagePhotoData
uint32_t unnamedSum1;
uint32_t unnamedSum2;
};
typedef std::function<bool(const char*, size_t, RagePhotoData*)> RagePhotoLoadFunc;
#endif // __cplusplus
#endif // RAGEPHOTODATA_H

31
src/RagePhoto_p.h

@ -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…
Cancel
Save