De bedoeling van dit topic is dat iedereen vragen(over de structuur of een stuk code), bijzonderheden, antwoorden(op de gestelde vragen) post over de unreal public source code.
De source code is te downloaden op http://unreal.epicgames.com/
Naam bestand is: 432 headers
Voorbeeld:
Bijzonderheid: Functies laden uit dll
Bestand: Opengl.cpp
Vraag:Wat doen deze macro's
Bestand: UnVcWin32.h
Ik hoop dat het leerzaam wordt
De source code is te downloaden op http://unreal.epicgames.com/
Naam bestand is: 432 headers
Voorbeeld:
Bijzonderheid: Functies laden uit dll
Bestand: Opengl.cpp
code:
1
2
3
4
5
6
7
8
9
10
| void FindProcs( UBOOL AllowExt )
{
guard(UOpenGLDriver::FindProcs);
#define GL_EXT(name) if( AllowExt ) SUPPORTS##name = FindExt( TEXT(#name)+1 );
#define GL_PROC(ext,ret,func,parms) FindProc( *(void**)&func, #func, #ext, SUPPORTS##ext, AllowExt );
#include "OpenGLFuncs.h"
#undef GL_EXT
#undef GL_PROC
unguard;
} |
Vraag:Wat doen deze macro's
Bestand: UnVcWin32.h
code:
1
2
3
4
5
6
7
| #define DLL_IMPORT __declspec(dllimport) /* Import function from DLL */ #define DLL_EXPORT __declspec(dllexport) /* Export function to DLL */ #define VARARGS __cdecl /* Functions with variable arguments */ #define CDECL __cdecl /* Standard C function */ #define STDCALL __stdcall /* Standard calling convention */ #define FORCEINLINE __forceinline /* Force code to be inline */ #define ZEROARRAY /* Zero-length arrays in structs */ |
Ik hoop dat het leerzaam wordt