mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Delete more old detritus
This commit is contained in:
parent
30ecde5bc9
commit
1e6c13cb56
9 changed files with 6 additions and 93 deletions
|
@ -6415,7 +6415,7 @@ void actOnBirthPacket(SceNetAdhocMatchingContext * context, SceNetEtherAddr * se
|
||||||
SceNetEtherAddr mac;
|
SceNetEtherAddr mac;
|
||||||
memcpy(&mac, context->rxbuf + 1, sizeof(SceNetEtherAddr));
|
memcpy(&mac, context->rxbuf + 1, sizeof(SceNetEtherAddr));
|
||||||
|
|
||||||
// Allocate Memory (If this fails... we are fucked.)
|
// Allocate Memory
|
||||||
SceNetAdhocMatchingMemberInternal * sibling = (SceNetAdhocMatchingMemberInternal *)malloc(sizeof(SceNetAdhocMatchingMemberInternal));
|
SceNetAdhocMatchingMemberInternal * sibling = (SceNetAdhocMatchingMemberInternal *)malloc(sizeof(SceNetAdhocMatchingMemberInternal));
|
||||||
|
|
||||||
// Allocated Memory
|
// Allocated Memory
|
||||||
|
|
|
@ -390,7 +390,6 @@
|
||||||
<ClInclude Include="..\..\ext\native\base\stringutil.h" />
|
<ClInclude Include="..\..\ext\native\base\stringutil.h" />
|
||||||
<ClInclude Include="..\..\ext\native\data\base64.h" />
|
<ClInclude Include="..\..\ext\native\data\base64.h" />
|
||||||
<ClInclude Include="..\..\ext\native\data\compression.h" />
|
<ClInclude Include="..\..\ext\native\data\compression.h" />
|
||||||
<ClInclude Include="..\..\ext\native\data\listable.h" />
|
|
||||||
<ClInclude Include="..\..\ext\native\ext\cityhash\city.h" />
|
<ClInclude Include="..\..\ext\native\ext\cityhash\city.h" />
|
||||||
<ClInclude Include="..\..\ext\native\ext\cityhash\citycrc.h" />
|
<ClInclude Include="..\..\ext\native\ext\cityhash\citycrc.h" />
|
||||||
<ClInclude Include="..\..\ext\native\ext\gason\gason.h" />
|
<ClInclude Include="..\..\ext\native\ext\gason\gason.h" />
|
||||||
|
|
|
@ -712,9 +712,6 @@
|
||||||
<ClInclude Include="..\..\ext\native\data\compression.h">
|
<ClInclude Include="..\..\ext\native\data\compression.h">
|
||||||
<Filter>data</Filter>
|
<Filter>data</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\ext\native\data\listable.h">
|
|
||||||
<Filter>data</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\ext\native\json\json_reader.h" />
|
<ClInclude Include="..\..\ext\native\json\json_reader.h" />
|
||||||
<ClInclude Include="..\..\ext\native\json\json_writer.h" />
|
<ClInclude Include="..\..\ext\native\json\json_writer.h" />
|
||||||
<ClInclude Include="..\..\ext\native\ext\gason\gason.h">
|
<ClInclude Include="..\..\ext\native\ext\gason\gason.h">
|
||||||
|
|
|
@ -2,27 +2,6 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
// inflate/deflate convenience wrapper. Uses zlib.
|
||||||
bool compress_string(const std::string& str, std::string *dest, int compressionlevel = 9);
|
bool compress_string(const std::string& str, std::string *dest, int compressionlevel = 9);
|
||||||
bool decompress_string(const std::string& str, std::string *dest);
|
bool decompress_string(const std::string& str, std::string *dest);
|
||||||
|
|
||||||
|
|
||||||
// Delta encoding/decoding - many formats benefit from a pass of this before zlibbing.
|
|
||||||
// WARNING : Do not use these with floating point data, especially not float16...
|
|
||||||
|
|
||||||
template <class T>
|
|
||||||
inline void delta(T *data, int length) {
|
|
||||||
T prev = data[0];
|
|
||||||
for (int i = 1; i < length; i++) {
|
|
||||||
T temp = data[i] - prev;
|
|
||||||
prev = data[i];
|
|
||||||
data[i] = temp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class T>
|
|
||||||
inline void dedelta(T *data, int length) {
|
|
||||||
for (int i = 1; i < length; i++) {
|
|
||||||
data[i] += data[i - 1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
class Listable
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual ~Listable() {}
|
|
||||||
virtual const char *getItem(size_t i) const = 0;
|
|
||||||
virtual size_t numItems() const = 0;
|
|
||||||
|
|
||||||
// Returns -1 for not found.
|
|
||||||
// Child classes are meant to specialize this if they have a faster way
|
|
||||||
// than brute force search.
|
|
||||||
virtual int getIndex(const char *text) {
|
|
||||||
for (size_t i = 0; i < numItems(); i++) {
|
|
||||||
if (!strcmp(getItem(i), text))
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class ArrayListable : public Listable
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
ArrayListable(const char * const*arr, size_t count) : arr_(arr), count_(count) {}
|
|
||||||
virtual ~ArrayListable() {}
|
|
||||||
|
|
||||||
virtual const char *getItem(size_t i) const { return arr_[i]; }
|
|
||||||
virtual size_t numItems() const { return count_; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
const char *const*arr_;
|
|
||||||
size_t count_;
|
|
||||||
};
|
|
||||||
|
|
||||||
class VectorListable : public Listable
|
|
||||||
{
|
|
||||||
VectorListable(const std::vector<std::string> &vec) : vec_(vec) {}
|
|
||||||
virtual ~VectorListable() {}
|
|
||||||
|
|
||||||
virtual const char *getItem(size_t i) const { return vec_[i].c_str(); }
|
|
||||||
virtual size_t numItems() const { return vec_.size(); }
|
|
||||||
|
|
||||||
private:
|
|
||||||
const std::vector<std::string> &vec_;
|
|
||||||
};
|
|
|
@ -29,7 +29,6 @@ int RIFFReader::ReadInt() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// let's get into the business
|
|
||||||
bool RIFFReader::Descend(uint32_t intoId) {
|
bool RIFFReader::Descend(uint32_t intoId) {
|
||||||
if (depth_ > 30)
|
if (depth_ > 30)
|
||||||
return false;
|
return false;
|
||||||
|
@ -83,7 +82,6 @@ bool RIFFReader::Descend(uint32_t intoId) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// let's ascend out
|
|
||||||
void RIFFReader::Ascend() {
|
void RIFFReader::Ascend() {
|
||||||
// ascend, and restore information
|
// ascend, and restore information
|
||||||
depth_--;
|
depth_--;
|
||||||
|
@ -91,7 +89,6 @@ void RIFFReader::Ascend() {
|
||||||
eof_ = stack[depth_].parentEOF;
|
eof_ = stack[depth_].parentEOF;
|
||||||
}
|
}
|
||||||
|
|
||||||
// read a block
|
|
||||||
void RIFFReader::ReadData(void *what, int count) {
|
void RIFFReader::ReadData(void *what, int count) {
|
||||||
memcpy(what, data_ + pos_, count);
|
memcpy(what, data_ + pos_, count);
|
||||||
pos_ += count;
|
pos_ += count;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// RIFF file format reader/writer. Very old code, basically a total mess but it still works.
|
// Simple RIFF file format reader/writer.
|
||||||
// Has nothing to do with the ChunkFile.h used in Dolphin or PPSSPP.
|
// Unrelated to the ChunkFile.h used in Dolphin and PPSSPP.
|
||||||
|
|
||||||
// TO REMEMBER WHEN USING:
|
// TO REMEMBER WHEN USING:
|
||||||
|
|
||||||
|
|
|
@ -390,7 +390,6 @@
|
||||||
<ClInclude Include="base\stringutil.h" />
|
<ClInclude Include="base\stringutil.h" />
|
||||||
<ClInclude Include="data\base64.h" />
|
<ClInclude Include="data\base64.h" />
|
||||||
<ClInclude Include="data\compression.h" />
|
<ClInclude Include="data\compression.h" />
|
||||||
<ClInclude Include="data\listable.h" />
|
|
||||||
<ClInclude Include="ext\cityhash\city.h" />
|
<ClInclude Include="ext\cityhash\city.h" />
|
||||||
<ClInclude Include="ext\cityhash\citycrc.h" />
|
<ClInclude Include="ext\cityhash\citycrc.h" />
|
||||||
<ClInclude Include="ext\gason\gason.h" />
|
<ClInclude Include="ext\gason\gason.h" />
|
||||||
|
@ -1211,4 +1210,4 @@
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -110,12 +110,6 @@
|
||||||
<ClInclude Include="ui\ui.h">
|
<ClInclude Include="ui\ui.h">
|
||||||
<Filter>ui</Filter>
|
<Filter>ui</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="data\listable.h">
|
|
||||||
<Filter>data</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="base\logging.h">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="net\http_client.h">
|
<ClInclude Include="net\http_client.h">
|
||||||
<Filter>net</Filter>
|
<Filter>net</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
@ -775,9 +769,6 @@
|
||||||
<ClCompile Include="thin3d\d3d11_loader.cpp">
|
<ClCompile Include="thin3d\d3d11_loader.cpp">
|
||||||
<Filter>thin3d</Filter>
|
<Filter>thin3d</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="base\logging.cpp">
|
|
||||||
<Filter>base</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="gfx_es2\draw_text_win.cpp">
|
<ClCompile Include="gfx_es2\draw_text_win.cpp">
|
||||||
<Filter>gfx</Filter>
|
<Filter>gfx</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -901,4 +892,4 @@
|
||||||
<UniqueIdentifier>{5b740c6f-8dbc-4529-9114-6564b37b3548}</UniqueIdentifier>
|
<UniqueIdentifier>{5b740c6f-8dbc-4529-9114-6564b37b3548}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
Loading…
Add table
Reference in a new issue