TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
module.cpp
Go to the documentation of this file.
1/***************************************************************************
2 module.cpp -- Dynamic module management
3 -------------------
4 created : Fri Aug 13 22:25:53 CEST 1999
5 copyright : (C) 1999-2014 by Eric Espie, Bernhard Wymann
6 email : torcs@free.fr
7 version : $Id$
8 ***************************************************************************/
9
10/***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
18
34
35#ifdef WIN32
36#include <windows.h>
37#endif
38#include <tgf.h>
39#include "os.h"
40
41void
43{
44}
45
56int
57GfModLoad(unsigned int gfid, char *dllname, tModList **modlist)
58{
59 if (GfOs.modLoad) {
60 return GfOs.modLoad(gfid, dllname, modlist);
61 } else {
62 return -1;
63 }
64}
65
74int
75GfModLoadDir(unsigned int gfid, char *dir, tModList **modlist)
76{
77 if (GfOs.modLoadDir) {
78 return GfOs.modLoadDir(gfid, dir, modlist);
79 } else {
80 return -1;
81 }
82}
83
90int
92{
93 if (GfOs.modUnloadList) {
94 return GfOs.modUnloadList(modlist);
95 } else {
96 return -1;
97 }
98}
99
109int
110GfModInfo(unsigned int gfid, char *dllname, tModList **modlist)
111{
112 if (GfOs.modInfo) {
113 return GfOs.modInfo(gfid, dllname, modlist);
114 } else {
115 return -1;
116 }
117}
118
128int
129GfModInfoDir(unsigned int gfid, char *dir, int level, tModList **modlist)
130{
131 if (GfOs.modInfoDir) {
132 return GfOs.modInfoDir(gfid, dir, level, modlist);
133 } else {
134 return -1;
135 }
136}
137
144int
146{
147 if (GfOs.modFreeInfoList) {
148 return GfOs.modFreeInfoList(modlist);
149 } else {
150 return -1;
151 }
152}
#define dllname
int GfModUnloadList(tModList **modlist)
Unload the DLLs of a list.
Definition module.cpp:91
int GfModLoad(unsigned int gfid, char *dllname, tModList **modlist)
Load the specified DLLs.
Definition module.cpp:57
int GfModInfo(unsigned int gfid, char *dllname, tModList **modlist)
Get the generic information of the specified DLL.
Definition module.cpp:110
int GfModFreeInfoList(tModList **modlist)
Free the info contained in the specified list.
Definition module.cpp:145
int GfModInfoDir(unsigned int gfid, char *dir, int level, tModList **modlist)
Get the generic module information of the DLLs of the specified directory.
Definition module.cpp:129
int GfModLoadDir(unsigned int gfid, char *dir, tModList **modlist)
Load the DLLs in the specified directory.
Definition module.cpp:75
void gfModInit(void)
Definition module.cpp:42
tGfOs GfOs
Definition os.cpp:37
The Gaming Framework API.
struct ModList tModList
list of module interfaces