AngelScriptResolver C Interface
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		
							
								
								
									
										34
									
								
								CInterface/AngelScript/AngelScriptResolver.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								CInterface/AngelScript/AngelScriptResolver.cpp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,34 @@
 | 
				
			|||||||
 | 
					#include "../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
 | 
				
			||||||
 | 
					#include "../Core.hpp"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export AngelScriptResolver* PkmnLib_AngelScriptResolver_Construct() { return new AngelScriptResolver(); }
 | 
				
			||||||
 | 
					export uint8_t PkmnLib_AngelScriptResolver_Destruct(AngelScriptResolver* p) { Try(delete p;) }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export uint8_t PkmnLib_AngelScriptResolver_Initialize(AngelScriptResolver* p,
 | 
				
			||||||
 | 
					                                                      CreatureLib::Battling::BattleLibrary* lib) {
 | 
				
			||||||
 | 
					    Try(p->Initialize(lib);)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export uint8_t PkmnLib_AngelScriptResolver_CreateScript(AngelScriptResolver* p, const char* name, const char* script) {
 | 
				
			||||||
 | 
					    Try(p->CreateScript(name, script);)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					export uint8_t PkmnLib_AngelScriptResolver_FinalizeModule(AngelScriptResolver* p) { Try(p->FinalizeModule();) }
 | 
				
			||||||
 | 
					export uint8_t PkmnLib_AngelScriptResolver_LoadScript(CreatureLib::Battling::Script*& out, AngelScriptResolver* p,
 | 
				
			||||||
 | 
					                                                      ScriptCategory category, const char* scriptName) {
 | 
				
			||||||
 | 
					    Try(out = p->LoadScript(category, Arbutils::CaseInsensitiveConstString(scriptName));)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					export uint8_t PkmnLib_AngelScriptResolver_WriteByteCodeToFile(AngelScriptResolver* p, const char* file,
 | 
				
			||||||
 | 
					                                                               bool stripDebugInfo) {
 | 
				
			||||||
 | 
					    Try(p->WriteByteCodeToFile(file, stripDebugInfo);)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					export uint8_t PkmnLib_AngelScriptResolver_LoadByteCodeFromFile(AngelScriptResolver* p, const char* file) {
 | 
				
			||||||
 | 
					    Try(p->LoadByteCodeFromFile(file);)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					export uint8_t PkmnLib_AngelScriptResolver_WriteByteCodeToMemory(AngelScriptResolver* p, bool stripDebugInfo,
 | 
				
			||||||
 | 
					                                                                 size_t& size, uint8_t*& out) {
 | 
				
			||||||
 | 
					    Try(out = p->WriteByteCodeToMemory(size, stripDebugInfo);)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					export uint8_t PkmnLib_AngelScriptResolver_LoadByteCodeFromMemory(AngelScriptResolver* p, uint8_t* memory,
 | 
				
			||||||
 | 
					                                                                  size_t size) {
 | 
				
			||||||
 | 
					    Try(p->LoadByteCodeFromMemory(memory, size);)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user