diff --git a/sc2/src/msvc++/Starcon2.dsp b/sc2/src/msvc++/Starcon2.dsp index a4563a3c0..add6e65f2 100644 --- a/sc2/src/msvc++/Starcon2.dsp +++ b/sc2/src/msvc++/Starcon2.dsp @@ -2710,10 +2710,6 @@ SOURCE=..\sc2code\ships\zoqfot\zoqfot.c # End Group # Begin Source File -SOURCE=..\sc2code\appglue.h -# End Source File -# Begin Source File - SOURCE=..\sc2code\battle.c # End Source File # Begin Source File diff --git a/sc2/src/sc2code/Makefile.am b/sc2/src/sc2code/Makefile.am index 18c6aedef..2d70d7258 100644 --- a/sc2/src/sc2code/Makefile.am +++ b/sc2/src/sc2code/Makefile.am @@ -30,7 +30,7 @@ libsc2_la_LIBADD = \ libs/liblibs.la noinst_HEADERS = \ - appglue.h build.h clock.h coderes.h collide.h commglue.h demo.h \ + build.h clock.h coderes.h collide.h commglue.h demo.h \ displist.h element.h encount.h globdata.h hyper.h ifontres.h \ igfxres.h ikey_con.h imusicre.h intel.h ires_ind.h isndres.h \ istrtab.h melee.h nameref.h races.h resinst.h respkg.h \ diff --git a/sc2/src/sc2code/appglue.h b/sc2/src/sc2code/appglue.h deleted file mode 100644 index dd0c63f8d..000000000 --- a/sc2/src/sc2code/appglue.h +++ /dev/null @@ -1,27 +0,0 @@ -//Copyright Paul Reiche, Fred Ford. 1992-2002 - -/* - * 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 2 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, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef _APPGLUE_H -#define _APPGLUE_H - -#include "vargs.h" - -extern DWORD race_glue (COUNT selector, vararg_dcl args, ...); - -#endif /* _APPGLUE_H */ - diff --git a/sc2/src/sc2code/coderes.h b/sc2/src/sc2code/coderes.h index 487317c7d..cde94a87c 100644 --- a/sc2/src/sc2code/coderes.h +++ b/sc2/src/sc2code/coderes.h @@ -22,13 +22,10 @@ #include "reslib.h" #include "vargs.h" -typedef DWORD (*GLUEFUNC) (COUNT selector, vararg_dcl args, ...); - extern MEM_HANDLE LoadCodeResFile (PSTR pStr); extern BOOLEAN InstallCodeResType (COUNT code_type); extern MEM_HANDLE LoadCodeResInstance (RESOURCE res); -extern PVOID CaptureCodeRes (MEM_HANDLE hCode, PVOID pData, PVOID - *ppLocData, GLUEFUNC glue_func); +extern PVOID CaptureCodeRes (MEM_HANDLE hCode, PVOID pData, PVOID *ppLocData); extern MEM_HANDLE ReleaseCodeRes (PVOID CodeRef); extern BOOLEAN DestroyCodeRes (MEM_HANDLE hCode); diff --git a/sc2/src/sc2code/commglue.h b/sc2/src/sc2code/commglue.h index 758de0e49..b98843e3c 100644 --- a/sc2/src/sc2code/commglue.h +++ b/sc2/src/sc2code/commglue.h @@ -19,6 +19,8 @@ #ifndef _COMMGLUE_H #define _COMMGLUE_H +#include "libs/vargs.h" + extern LOCDATA CommData; extern int cur_comm; extern UNICODE shared_phrase_buf[256]; diff --git a/sc2/src/sc2code/dummy.c b/sc2/src/sc2code/dummy.c index 7ae1752d1..04df11cfe 100644 --- a/sc2/src/sc2code/dummy.c +++ b/sc2/src/sc2code/dummy.c @@ -27,17 +27,10 @@ LoadVidInstance (DWORD res) return (0); } -/* -void -unlink (PVOID filename) -{ -} -*/ - MEM_HANDLE LoadCodeResFile (PSTR pStr) { - (void) pStr; /* Satisfying compiler (unused parameter) */ + (void) pStr; /* Satisfying compiler (unused parameter) */ return (0); } @@ -407,22 +400,16 @@ enum } - BOOLEAN - - InstallCodeResType - (COUNT - code_type) +BOOLEAN +InstallCodeResType (COUNT code_type) { return (InstallResTypeVectors (code_type, GetCodeResData, mem_release)); } - MEM_HANDLE - - LoadCodeResInstance - (DWORD - res) +MEM_HANDLE +LoadCodeResInstance (DWORD res) { MEM_HANDLE hData; @@ -434,51 +421,35 @@ enum } - BOOLEAN - - DestroyCodeRes - (MEM_HANDLE - hCode) +BOOLEAN +DestroyCodeRes (MEM_HANDLE hCode) { return (mem_release (hCode)); } - PVOID - - CaptureCodeRes - (MEM_HANDLE - hCode, - PVOID - pData, - PVOID - *ppLocData, - GLUEFUNC - glue_func) +PVOID +CaptureCodeRes (MEM_HANDLE hCode, PVOID pData, PVOID *ppLocData) { MEM_HANDLE *p; - if(hCode==0) - { - printf("Ack! dummy.c::CaptureCodeRes() hCode==0! FATAL!\n"); - return(0); - } + if(hCode==0) + { + printf("Ack! dummy.c::CaptureCodeRes() hCode==0! FATAL!\n"); + return(0); + } p = (MEM_HANDLE *)mem_lock (hCode); *p = hCode; *ppLocData = &p[1]; (void) pData; /* Satisfying compiler (unused parameter) */ - (void) glue_func; /* Satisfying compiler (unused parameter) */ return (p); } - MEM_HANDLE - - ReleaseCodeRes - (PVOID - CodeRef) +MEM_HANDLE +ReleaseCodeRes (PVOID CodeRef) { if (CodeRef) { @@ -491,85 +462,33 @@ enum return (0); } - - DWORD - - race_glue - (COUNT - selector, - vararg_dcl - args, - ...) +DRAWABLE +CreatePixmapRegion (FRAME Frame, PPOINT lpOrg, SIZE width, SIZE height) { - (void) selector; /* Satisfying compiler (unused parameter) */ - (void) args; /* Satisfying compiler (unused parameter) */ - return (0); -} - - - DRAWABLE - - CreatePixmapRegion - (FRAME - Frame, - PPOINT - lpOrg, - SIZE - width, - SIZE - height) -{ - (void) lpOrg; /* Satisfying compiler (unused parameter) */ - (void) width; /* Satisfying compiler (unused parameter) */ - (void) height; /* Satisfying compiler (unused parameter) */ + (void) lpOrg; /* Satisfying compiler (unused parameter) */ + (void) width; /* Satisfying compiler (unused parameter) */ + (void) height; /* Satisfying compiler (unused parameter) */ return (GetFrameHandle (Frame)); } - void - - SetPrimNextLink - (PPRIMITIVE - pPrim, - COUNT - Link) +void +SetPrimNextLink (PPRIMITIVE pPrim, COUNT Link) { SetPrimLinks (pPrim, END_OF_LIST, Link); } - COUNT - - GetPrimNextLink - (PPRIMITIVE - pPrim) +COUNT +GetPrimNextLink (PPRIMITIVE pPrim) { return (GetSuccLink (GetPrimLinks (pPrim))); } -/* - - char - - *fgets - (char - *s, - int - n, - FILE - *fp) +int +abs (int n) { - return (0); + if (n < 0) n = -n; + return (n); } -*/ - - int - - abs - (int - n) -{ - if (n < 0) n = -n; - return (n); -} diff --git a/sc2/src/sc2code/loadship.c b/sc2/src/sc2code/loadship.c index 86beee0fe..eb86f2329 100644 --- a/sc2/src/sc2code/loadship.c +++ b/sc2/src/sc2code/loadship.c @@ -41,7 +41,7 @@ load_ship (STARSHIPPTR StarShipPtr, BOOLEAN LoadBattleData) hOldIndex = SetResourceIndex (h); CodeRef = CaptureCodeRes (LoadCodeRes (INITIAL_CODE_RES), - (PVOID)&GlobData, (PVOID)&StarShipPtr->RaceDescPtr, race_glue); + (PVOID)&GlobData, (PVOID)&StarShipPtr->RaceDescPtr); if (CodeRef == 0) goto BadLoad; diff --git a/sc2/src/sc2code/starcon.h b/sc2/src/sc2code/starcon.h index fd1c72160..8fa48de03 100644 --- a/sc2/src/sc2code/starcon.h +++ b/sc2/src/sc2code/starcon.h @@ -233,7 +233,5 @@ extern COUNT GetPrimNextLink (PPRIMITIVE pPrim); void AlienTalkSegue (COUNT wait_track); -#include "appglue.h" - #endif /* _STARCON_H */