Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions src/radrr/include/rrAssert.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* This source file is part of the <https://github.com/Pyogenics/piggy> project, a decompile
* effort for the RAD Game Tools Iggy library <https://www.radgametools.com/iggy.htm>, this
* project does not contain any original code or assets from Iggy.
*
* Copyright (c) 2026 Pyogenics, <https://github.com/Pyogenics>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#ifndef __RADRR_ASSERTH__
#define __RADRR_ASSERTH__

#endif //__RADRR_ASSERTH__
30 changes: 30 additions & 0 deletions src/radrr/include/rrAtomics.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* This source file is part of the <https://github.com/Pyogenics/piggy> project, a decompile
* effort for the RAD Game Tools Iggy library <https://www.radgametools.com/iggy.htm>, this
* project does not contain any original code or assets from Iggy.
*
* Copyright (c) 2026 Pyogenics, <https://github.com/Pyogenics>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#ifndef __RADRR_ATOMICSH__
#define __RADRR_ATOMICSH__

#endif //__RADRR_ATOMICSH__
24 changes: 24 additions & 0 deletions src/radrr/include/rrCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,32 @@
* SOFTWARE.
*/

// Pyogenics: I am unsure if we should make this broadly compatible for drop in source replacement, e.g. instead of just dll and lib replacement
// we could allow developers to just simply drop the source library into the code instead and use our headers. Not sure how much work
// that would require ontop of just the "good enough" implementation we have now, realistically the amount of effort to use these
// headers over the original RAD ones is probably minimal.

// We mirror the RAD include defines to avoid collision with the original library in case of a broken drop in replacement
#ifndef __RADRR_COREH__
#define __RADRR_COREH__

#include <stdint.h>

//
// typedefs
//
typedef int8_t S8;
typedef uint8_t U8;
typedef int16_t S16;
typedef uint16_t U16;
typedef int32_t S32;
typedef uint32_t U32;
typedef int64_t S64;
typedef uint64_t U64;

typedef float F32;
typedef double F64;

typedef S32 RRBOOL;

#endif //__RADRR_COREH__
37 changes: 37 additions & 0 deletions src/radrr/include/rrCpu.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* This source file is part of the <https://github.com/Pyogenics/piggy> project, a decompile
* effort for the RAD Game Tools Iggy library <https://www.radgametools.com/iggy.htm>, this
* project does not contain any original code or assets from Iggy.
*
* Copyright (c) 2026 Pyogenics, <https://github.com/Pyogenics>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#ifndef __RADRR_CPUH__
#define __RADRR_CPUH__

#include "rrCore.h"

S32 rrGetCPUCoreByPrecedence(S32 precedence);
S32 rrGetSlowerCPUCoreByPrecedence(S32 precedence);
S64 rrGetTotalCPUs(void);
S64 rrGetTotalSlowerCPUs(void);

#endif //__RADRR_CPUH__
30 changes: 30 additions & 0 deletions src/radrr/include/rrMath.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* This source file is part of the <https://github.com/Pyogenics/piggy> project, a decompile
* effort for the RAD Game Tools Iggy library <https://www.radgametools.com/iggy.htm>, this
* project does not contain any original code or assets from Iggy.
*
* Copyright (c) 2026 Pyogenics, <https://github.com/Pyogenics>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#ifndef __RADRR_MATHH__
#define __RADRR_MATHH__

#endif //__RADRR_MATHH__
30 changes: 30 additions & 0 deletions src/radrr/include/rrMem.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* This source file is part of the <https://github.com/Pyogenics/piggy> project, a decompile
* effort for the RAD Game Tools Iggy library <https://www.radgametools.com/iggy.htm>, this
* project does not contain any original code or assets from Iggy.
*
* Copyright (c) 2026 Pyogenics, <https://github.com/Pyogenics>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#ifndef __RADRR_MEMH__
#define __RADRR_MEMH__

#endif //__RADRR_MEMH__
30 changes: 30 additions & 0 deletions src/radrr/include/rrString.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* This source file is part of the <https://github.com/Pyogenics/piggy> project, a decompile
* effort for the RAD Game Tools Iggy library <https://www.radgametools.com/iggy.htm>, this
* project does not contain any original code or assets from Iggy.
*
* Copyright (c) 2026 Pyogenics, <https://github.com/Pyogenics>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#ifndef __RADRR_STRINGH__
#define __RADRR_STRINGH__

#endif //__RADRR_STRINGH__
30 changes: 30 additions & 0 deletions src/radrr/include/rrSyncCheck.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* This source file is part of the <https://github.com/Pyogenics/piggy> project, a decompile
* effort for the RAD Game Tools Iggy library <https://www.radgametools.com/iggy.htm>, this
* project does not contain any original code or assets from Iggy.
*
* Copyright (c) 2026 Pyogenics, <https://github.com/Pyogenics>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#ifndef __RADRR_SYNCCHECKH__
#define __RADRR_SYNCCHECKH__

#endif //__RADRR_SYNCCHECKH__
30 changes: 30 additions & 0 deletions src/radrr/include/rrThreads.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* This source file is part of the <https://github.com/Pyogenics/piggy> project, a decompile
* effort for the RAD Game Tools Iggy library <https://www.radgametools.com/iggy.htm>, this
* project does not contain any original code or assets from Iggy.
*
* Copyright (c) 2026 Pyogenics, <https://github.com/Pyogenics>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#ifndef __RADRR_THREADSH__
#define __RADRR_THREADSH__

#endif //__RADRR_THREADSH__
30 changes: 30 additions & 0 deletions src/radrr/include/rrTime.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* This source file is part of the <https://github.com/Pyogenics/piggy> project, a decompile
* effort for the RAD Game Tools Iggy library <https://www.radgametools.com/iggy.htm>, this
* project does not contain any original code or assets from Iggy.
*
* Copyright (c) 2026 Pyogenics, <https://github.com/Pyogenics>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#ifndef __RADRR_TIMEH__
#define __RADRR_TIMEH__

#endif //__RADRR_TIMEH__
7 changes: 6 additions & 1 deletion src/radrr/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# Source definitions
#
sources_radrr = files(
'rrCpu.c'
)
include_directories_radrr = include_directories(
'include'
)


Expand All @@ -11,8 +15,9 @@ sources_radrr = files(
radrr = library(
'radrr',
sources_radrr,
include_directories: include_directories_radrr,
)
radrr_dep = declare_dependency(
include_directories : include_directories( 'include' ),
include_directories : include_directories_radrr,
link_with : [ radrr ],
)
Loading