Some more cleanup.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@52 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -2710,10 +2710,6 @@ SOURCE=..\sc2code\ships\zoqfot\zoqfot.c
|
|||||||
# End Group
|
# End Group
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\sc2code\appglue.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\sc2code\battle.c
|
SOURCE=..\sc2code\battle.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ libsc2_la_LIBADD = \
|
|||||||
libs/liblibs.la
|
libs/liblibs.la
|
||||||
|
|
||||||
noinst_HEADERS = \
|
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 \
|
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 \
|
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 \
|
istrtab.h melee.h nameref.h races.h resinst.h respkg.h \
|
||||||
|
|||||||
@@ -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 */
|
|
||||||
|
|
||||||
@@ -22,13 +22,10 @@
|
|||||||
#include "reslib.h"
|
#include "reslib.h"
|
||||||
#include "vargs.h"
|
#include "vargs.h"
|
||||||
|
|
||||||
typedef DWORD (*GLUEFUNC) (COUNT selector, vararg_dcl args, ...);
|
|
||||||
|
|
||||||
extern MEM_HANDLE LoadCodeResFile (PSTR pStr);
|
extern MEM_HANDLE LoadCodeResFile (PSTR pStr);
|
||||||
extern BOOLEAN InstallCodeResType (COUNT code_type);
|
extern BOOLEAN InstallCodeResType (COUNT code_type);
|
||||||
extern MEM_HANDLE LoadCodeResInstance (RESOURCE res);
|
extern MEM_HANDLE LoadCodeResInstance (RESOURCE res);
|
||||||
extern PVOID CaptureCodeRes (MEM_HANDLE hCode, PVOID pData, PVOID
|
extern PVOID CaptureCodeRes (MEM_HANDLE hCode, PVOID pData, PVOID *ppLocData);
|
||||||
*ppLocData, GLUEFUNC glue_func);
|
|
||||||
extern MEM_HANDLE ReleaseCodeRes (PVOID CodeRef);
|
extern MEM_HANDLE ReleaseCodeRes (PVOID CodeRef);
|
||||||
extern BOOLEAN DestroyCodeRes (MEM_HANDLE hCode);
|
extern BOOLEAN DestroyCodeRes (MEM_HANDLE hCode);
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#ifndef _COMMGLUE_H
|
#ifndef _COMMGLUE_H
|
||||||
#define _COMMGLUE_H
|
#define _COMMGLUE_H
|
||||||
|
|
||||||
|
#include "libs/vargs.h"
|
||||||
|
|
||||||
extern LOCDATA CommData;
|
extern LOCDATA CommData;
|
||||||
extern int cur_comm;
|
extern int cur_comm;
|
||||||
extern UNICODE shared_phrase_buf[256];
|
extern UNICODE shared_phrase_buf[256];
|
||||||
|
|||||||
+29
-110
@@ -27,17 +27,10 @@ LoadVidInstance (DWORD res)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
void
|
|
||||||
unlink (PVOID filename)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
MEM_HANDLE
|
MEM_HANDLE
|
||||||
LoadCodeResFile (PSTR pStr)
|
LoadCodeResFile (PSTR pStr)
|
||||||
{
|
{
|
||||||
(void) pStr; /* Satisfying compiler (unused parameter) */
|
(void) pStr; /* Satisfying compiler (unused parameter) */
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -407,22 +400,16 @@ enum
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
|
InstallCodeResType (COUNT code_type)
|
||||||
InstallCodeResType
|
|
||||||
(COUNT
|
|
||||||
code_type)
|
|
||||||
{
|
{
|
||||||
return (InstallResTypeVectors (code_type,
|
return (InstallResTypeVectors (code_type,
|
||||||
GetCodeResData, mem_release));
|
GetCodeResData, mem_release));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MEM_HANDLE
|
MEM_HANDLE
|
||||||
|
LoadCodeResInstance (DWORD res)
|
||||||
LoadCodeResInstance
|
|
||||||
(DWORD
|
|
||||||
res)
|
|
||||||
{
|
{
|
||||||
MEM_HANDLE hData;
|
MEM_HANDLE hData;
|
||||||
|
|
||||||
@@ -434,51 +421,35 @@ enum
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
|
DestroyCodeRes (MEM_HANDLE hCode)
|
||||||
DestroyCodeRes
|
|
||||||
(MEM_HANDLE
|
|
||||||
hCode)
|
|
||||||
{
|
{
|
||||||
return (mem_release (hCode));
|
return (mem_release (hCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PVOID
|
PVOID
|
||||||
|
CaptureCodeRes (MEM_HANDLE hCode, PVOID pData, PVOID *ppLocData)
|
||||||
CaptureCodeRes
|
|
||||||
(MEM_HANDLE
|
|
||||||
hCode,
|
|
||||||
PVOID
|
|
||||||
pData,
|
|
||||||
PVOID
|
|
||||||
*ppLocData,
|
|
||||||
GLUEFUNC
|
|
||||||
glue_func)
|
|
||||||
{
|
{
|
||||||
MEM_HANDLE *p;
|
MEM_HANDLE *p;
|
||||||
|
|
||||||
if(hCode==0)
|
if(hCode==0)
|
||||||
{
|
{
|
||||||
printf("Ack! dummy.c::CaptureCodeRes() hCode==0! FATAL!\n");
|
printf("Ack! dummy.c::CaptureCodeRes() hCode==0! FATAL!\n");
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
p = (MEM_HANDLE *)mem_lock (hCode);
|
p = (MEM_HANDLE *)mem_lock (hCode);
|
||||||
*p = hCode;
|
*p = hCode;
|
||||||
*ppLocData = &p[1];
|
*ppLocData = &p[1];
|
||||||
|
|
||||||
(void) pData; /* Satisfying compiler (unused parameter) */
|
(void) pData; /* Satisfying compiler (unused parameter) */
|
||||||
(void) glue_func; /* Satisfying compiler (unused parameter) */
|
|
||||||
return (p);
|
return (p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MEM_HANDLE
|
MEM_HANDLE
|
||||||
|
ReleaseCodeRes (PVOID CodeRef)
|
||||||
ReleaseCodeRes
|
|
||||||
(PVOID
|
|
||||||
CodeRef)
|
|
||||||
{
|
{
|
||||||
if (CodeRef)
|
if (CodeRef)
|
||||||
{
|
{
|
||||||
@@ -491,85 +462,33 @@ enum
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DRAWABLE
|
||||||
DWORD
|
CreatePixmapRegion (FRAME Frame, PPOINT lpOrg, SIZE width, SIZE height)
|
||||||
|
|
||||||
race_glue
|
|
||||||
(COUNT
|
|
||||||
selector,
|
|
||||||
vararg_dcl
|
|
||||||
args,
|
|
||||||
...)
|
|
||||||
{
|
{
|
||||||
(void) selector; /* Satisfying compiler (unused parameter) */
|
(void) lpOrg; /* Satisfying compiler (unused parameter) */
|
||||||
(void) args; /* Satisfying compiler (unused parameter) */
|
(void) width; /* Satisfying compiler (unused parameter) */
|
||||||
return (0);
|
(void) height; /* Satisfying compiler (unused parameter) */
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
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) */
|
|
||||||
return (GetFrameHandle (Frame));
|
return (GetFrameHandle (Frame));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
SetPrimNextLink (PPRIMITIVE pPrim, COUNT Link)
|
||||||
SetPrimNextLink
|
|
||||||
(PPRIMITIVE
|
|
||||||
pPrim,
|
|
||||||
COUNT
|
|
||||||
Link)
|
|
||||||
{
|
{
|
||||||
SetPrimLinks (pPrim, END_OF_LIST, Link);
|
SetPrimLinks (pPrim, END_OF_LIST, Link);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
COUNT
|
COUNT
|
||||||
|
GetPrimNextLink (PPRIMITIVE pPrim)
|
||||||
GetPrimNextLink
|
|
||||||
(PPRIMITIVE
|
|
||||||
pPrim)
|
|
||||||
{
|
{
|
||||||
return (GetSuccLink (GetPrimLinks (pPrim)));
|
return (GetSuccLink (GetPrimLinks (pPrim)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
int
|
||||||
|
abs (int n)
|
||||||
char
|
|
||||||
|
|
||||||
*fgets
|
|
||||||
(char
|
|
||||||
*s,
|
|
||||||
int
|
|
||||||
n,
|
|
||||||
FILE
|
|
||||||
*fp)
|
|
||||||
{
|
{
|
||||||
return (0);
|
if (n < 0) n = -n;
|
||||||
|
return (n);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
|
|
||||||
abs
|
|
||||||
(int
|
|
||||||
n)
|
|
||||||
{
|
|
||||||
if (n < 0) n = -n;
|
|
||||||
return (n);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ load_ship (STARSHIPPTR StarShipPtr, BOOLEAN LoadBattleData)
|
|||||||
hOldIndex = SetResourceIndex (h);
|
hOldIndex = SetResourceIndex (h);
|
||||||
|
|
||||||
CodeRef = CaptureCodeRes (LoadCodeRes (INITIAL_CODE_RES),
|
CodeRef = CaptureCodeRes (LoadCodeRes (INITIAL_CODE_RES),
|
||||||
(PVOID)&GlobData, (PVOID)&StarShipPtr->RaceDescPtr, race_glue);
|
(PVOID)&GlobData, (PVOID)&StarShipPtr->RaceDescPtr);
|
||||||
|
|
||||||
if (CodeRef == 0)
|
if (CodeRef == 0)
|
||||||
goto BadLoad;
|
goto BadLoad;
|
||||||
|
|||||||
@@ -233,7 +233,5 @@ extern COUNT GetPrimNextLink (PPRIMITIVE pPrim);
|
|||||||
|
|
||||||
void AlienTalkSegue (COUNT wait_track);
|
void AlienTalkSegue (COUNT wait_track);
|
||||||
|
|
||||||
#include "appglue.h"
|
|
||||||
|
|
||||||
#endif /* _STARCON_H */
|
#endif /* _STARCON_H */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user