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:
meep-eep
2002-09-20 22:30:09 +00:00
parent 14722a31a5
commit 5bf3ca6cd0
8 changed files with 34 additions and 149 deletions
-4
View File
@@ -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
+1 -1
View File
@@ -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 \
-27
View File
@@ -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 */
+1 -4
View File
@@ -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);
+2
View File
@@ -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];
+29 -110
View File
@@ -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);
}
+1 -1
View File
@@ -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;
-2
View File
@@ -233,7 +233,5 @@ extern COUNT GetPrimNextLink (PPRIMITIVE pPrim);
void AlienTalkSegue (COUNT wait_track);
#include "appglue.h"
#endif /* _STARCON_H */