00001 00002 #include "Core/precomp.h" 00003 #include <stdlib.h> 00004 #include "API/Core/Resources/resourcetype_boolean.h" 00005 #include "API/Core/Resources/resourcetype_integer.h" 00006 #include "API/Core/Resources/resourcetype_string.h" 00007 #include "API/Core/Resources/resourcetype_raw.h" 00008 #include "API/Core/System/setupcore.h" 00009 00010 static CL_Res_Boolean *restype_boolean = NULL; 00011 static CL_Res_Integer *restype_integer = NULL; 00012 static CL_Res_String *restype_string = NULL; 00013 static CL_Res_Raw *restype_raw = NULL; 00014 00015 void init_system(); // this function is implemented in init_PLATFORM.cpp 00016 void deinit_system(); // this function is implemented in init_PLATFORM.cpp 00017 00018 static int ref_count = 0; 00019 00020 void CL_SetupCore::init() 00021 { 00022 ref_count++; 00023 if (ref_count > 1) return; 00024 00025 restype_boolean = new CL_Res_Boolean; 00026 restype_integer = new CL_Res_Integer; 00027 restype_string = new CL_Res_String; 00028 restype_raw = new CL_Res_Raw; 00029 00030 init_system(); 00031 } 00032 00033 void CL_SetupCore::deinit() 00034 { 00035 ref_count--; 00036 if (ref_count > 0) return; 00037 00038 delete restype_boolean; 00039 delete restype_integer; 00040 delete restype_string; 00041 delete restype_raw; 00042 00043 restype_boolean = NULL; 00044 restype_integer = NULL; 00045 restype_string = NULL; 00046 restype_raw = NULL; 00047 00048 deinit_system(); 00049 }
1.2.6 written by Dimitri van Heesch,
© 1997-2001