McJobless Posted August 8, 2011 Share Posted August 8, 2011 (edited) /* Yelo: Open Sauce SDK Halo 1 (Editing Kit) Edition Copyright (C) 2005-2010 Kornner Studios (http://kornner.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #define PLATFORM_GUERILLA 0x00000001 #define PLATFORM_TOOL 0x00000002 #define PLATFORM_SAPIEN 0x00000003 #if !defined(PLATFORM_ID) #if defined(PLATFORM_TYPE_GUERILLA) #define PLATFORM_ID PLATFORM_GUERILLA #elif defined(PLATFORM_TYPE_TOOL) #define PLATFORM_ID PLATFORM_TOOL #elif defined(PLATFORM_TYPE_SAPIEN) #define PLATFORM_ID PLATFORM_SAPIEN #else #error PLATFORM_TYPE not defined. Step 1: Bash head on keyboard. Step 2: Repeat. #endif #endif // Calling convention of guerilla\tool\sapien #define PLATFORM_API __cdecl #define PLATFORM_IS_EDITOR 1 // See this header for more "Engine pointer markup system" documentation #include <Memory/MemoryInterfaceShared.hpp> ////////////////////////////////////////////////////////////////////////// // Engine pointer markup system // // [g_addr] : Guerilla memory address // [t_addr] : Tool memory address // [s_addr] : Sapien memory address // ////////////////////////////////////////////////////////////////////////// #if PLATFORM_ID == PLATFORM_GUERILLA #define ENGINE_DPTR(type, name, g_addr, t_addr, s_addr) \ static type##** const pp##name = CAST_PTR(type##**, g_addr); BOOST_STATIC_ASSERT( g_addr != NULL ); #define ENGINE_PTR(type, name, g_addr, t_addr, s_addr) \ static type##* const p##name = CAST_PTR(type##*, g_addr); BOOST_STATIC_ASSERT( g_addr != NULL ); #define FUNC_PTR(name, g_addr, t_addr, s_addr) enum FUNC_PTR_##name { PTR_##name = g_addr };BOOST_STATIC_ASSERT( PTR_##name != NULL ); #define DATA_PTR(name, g_addr, t_addr, s_addr) enum DATA_PTR_##name { PTR_##name = g_addr };BOOST_STATIC_ASSERT( PTR_##name != NULL ); #define PLATFORM_VALUE(g_value, t_value, s_value) g_value #elif PLATFORM_ID == PLATFORM_TOOL #define ENGINE_DPTR(type, name, g_addr, t_addr, s_addr) \ static type##** const pp##name = CAST_PTR(type##**, t_addr); BOOST_STATIC_ASSERT( t_addr != NULL ); #define ENGINE_PTR(type, name, g_addr, t_addr, s_addr) \ static type##* const p##name = CAST_PTR(type##*, t_addr); BOOST_STATIC_ASSERT( t_addr != NULL ); #define FUNC_PTR(name, g_addr, t_addr, s_addr) enum FUNC_PTR_##name { PTR_##name = t_addr };BOOST_STATIC_ASSERT( PTR_##name != NULL ); #define DATA_PTR(name, g_addr, t_addr, s_addr) enum DATA_PTR_##name { PTR_##name = g_addr };BOOST_STATIC_ASSERT( PTR_##name != NULL ); #define PLATFORM_VALUE(g_value, t_value, s_value) t_value #elif PLATFORM_ID == PLATFORM_SAPIEN #define ENGINE_DPTR(type, name, g_addr, t_addr, s_addr) \ static type##** const pp##name = CAST_PTR(type##**, s_addr); BOOST_STATIC_ASSERT( s_addr != NULL ); #define ENGINE_PTR(type, name, g_addr, t_addr, s_addr) \ static type##* const p##name = CAST_PTR(type##*, s_addr); BOOST_STATIC_ASSERT( s_addr != NULL ); #define FUNC_PTR(name, g_addr, t_addr, s_addr) enum FUNC_PTR_##name { PTR_##name = s_addr };BOOST_STATIC_ASSERT( PTR_##name != NULL ); #define DATA_PTR(name, g_addr, t_addr, s_addr) enum DATA_PTR_##name { PTR_##name = s_addr };BOOST_STATIC_ASSERT( PTR_##name != NULL ); #define PLATFORM_VALUE(g_value, t_value, s_value) s_value #endif Error happens: 1>------ Build started: Project: Halo1_CheApe, Configuration: Debug Win32 ------ 1>Compiling... 1>Precompile.cpp 1>h:\open-sauce\opensauce\halo1\halo1_cheape\common\platform.hpp(33) : fatal error C1189: #error : PLATFORM_TYPE not defined. Step 1: Bash head on keyboard. Step 2: Repeat. 1>Build log was saved at "file://H:\open-sauce\obj\Halo1_CheApe\Debug\BuildLog.htm" 1>Halo1_CheApe - 1 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Please help; I've been up for several nights trying to get this to work, and now that I have the correct compiler and libraries, it seems somewhat unfair that I can't figure out how to define this thing... Nevermind everybody, I locked in the wrong code up the top, giving me this error. Thanks for the concern... Edited August 8, 2011 by Extreme110 Link to comment Share on other sites More sharing options...
apemax Posted August 8, 2011 Share Posted August 8, 2011 Well i'm no expert but it seems you haven't defined PLATFORM_TYPE_GUERILLA, PLATFORM_TYPE_TOOL or PLATFORM_TYPE_SAPIEN. Have you tried putting: #include <Memory/MemoryInterfaceShared.hpp> before: #pragma once #define PLATFORM_GUERILLA 0x00000001 #define PLATFORM_TOOL 0x00000002 #define PLATFORM_SAPIEN 0x00000003 #if !defined(PLATFORM_ID) #if defined(PLATFORM_TYPE_GUERILLA) #define PLATFORM_ID PLATFORM_GUERILLA #elif defined(PLATFORM_TYPE_TOOL) #define PLATFORM_ID PLATFORM_TOOL #elif defined(PLATFORM_TYPE_SAPIEN) #define PLATFORM_ID PLATFORM_SAPIEN #else #error PLATFORM_TYPE not defined. Step 1: Bash head on keyboard. Step 2: Repeat. #endif #endif // Calling convention of guerilla\tool\sapien #define PLATFORM_API __cdecl #define PLATFORM_IS_EDITOR 1 Link to comment Share on other sites More sharing options...
McJobless Posted August 8, 2011 Author Share Posted August 8, 2011 Nah, this is Visual Studio, and I forgot to assign what I was compiling; it was set to the Default "Debug" mode, which just runs through the files to that point. What I wanted to compile was "Release_Guerilla", "Release_Tool" and "Release_Sapien". BTW, this entire source code is backwards...when something goes right, it just screws up in the end. It's ridiculous... Link to comment Share on other sites More sharing options...
apemax Posted August 8, 2011 Share Posted August 8, 2011 Ok glad you fixed it. :) Link to comment Share on other sites More sharing options...
Recommended Posts