update mall to build under watcom
This commit is contained in:
parent
080fb9ae68
commit
a63c33cd84
189
mall/MALL.C
189
mall/MALL.C
|
@ -16,6 +16,7 @@
|
||||||
#include <sys\stat.h>
|
#include <sys\stat.h>
|
||||||
#include "ack3d.h"
|
#include "ack3d.h"
|
||||||
#include "ackeng.h"
|
#include "ackeng.h"
|
||||||
|
#include "ackext.h"
|
||||||
#include "kit.h"
|
#include "kit.h"
|
||||||
#include "modplay.h"
|
#include "modplay.h"
|
||||||
|
|
||||||
|
@ -65,31 +66,9 @@ typedef struct {
|
||||||
extern long mFactor;
|
extern long mFactor;
|
||||||
extern long dFactor;
|
extern long dFactor;
|
||||||
|
|
||||||
extern long zdTable[VIEW_WIDTH][200];
|
|
||||||
|
|
||||||
extern UCHAR colordat[];
|
extern UCHAR colordat[];
|
||||||
extern UINT *ObjGrid;
|
|
||||||
extern UINT *Grid;
|
|
||||||
extern UINT FloorMap[];
|
|
||||||
extern short ViewHeight;
|
|
||||||
extern short CeilingHeight;
|
|
||||||
extern short Resolution;
|
|
||||||
extern long kduFactor;
|
|
||||||
extern long kdvFactor;
|
|
||||||
extern long kxFactor;
|
|
||||||
extern long kyFactor;
|
|
||||||
extern short tuFactor;
|
|
||||||
extern short tvFactor;
|
|
||||||
extern short rsHandle;
|
|
||||||
extern ULONG *rbaTable;
|
|
||||||
extern UCHAR *BackArray[];
|
|
||||||
extern long *xNextTable;
|
|
||||||
extern long *yNextTable;
|
|
||||||
extern UINT *Grid;
|
|
||||||
extern long *CosTable;
|
|
||||||
extern long *SinTable;
|
|
||||||
|
|
||||||
ACKENG *ae;
|
ACKENG *ae;
|
||||||
|
|
||||||
// These are the ranges used for distance shading. Will need to be modified
|
// These are the ranges used for distance shading. Will need to be modified
|
||||||
// for the new color palette used.
|
// for the new color palette used.
|
||||||
|
@ -120,10 +99,6 @@ ColorRange ranges[64] = {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
UCHAR scanCode;
|
|
||||||
UCHAR KeyPressed;
|
|
||||||
UCHAR MiniKey;
|
|
||||||
UCHAR Keys[128];
|
|
||||||
int HaveMouse;
|
int HaveMouse;
|
||||||
short FlashIndex;
|
short FlashIndex;
|
||||||
short FlashCount;
|
short FlashCount;
|
||||||
|
@ -156,13 +131,7 @@ ColorRange ranges[64] = {
|
||||||
short Handw2;
|
short Handw2;
|
||||||
short Handh2;
|
short Handh2;
|
||||||
|
|
||||||
long TimerCounter;
|
|
||||||
long ObjCounter[64];
|
long ObjCounter[64];
|
||||||
void (__interrupt __far *oldvec)();
|
|
||||||
void __interrupt __far myInt();
|
|
||||||
|
|
||||||
void (__interrupt __far *oldTimer)();
|
|
||||||
void __interrupt __far myTimer();
|
|
||||||
|
|
||||||
short LastObjectIndex;
|
short LastObjectIndex;
|
||||||
|
|
||||||
|
@ -171,7 +140,6 @@ ColorRange ranges[64] = {
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
volatile short framespersec = 0;
|
volatile short framespersec = 0;
|
||||||
volatile short cframes=0, count=0, ticks=0;
|
volatile short cframes=0, count=0, ticks=0;
|
||||||
volatile short AckTmCount=0, AckTmDelay=0;
|
|
||||||
|
|
||||||
char *ErrorMsgs[] = {
|
char *ErrorMsgs[] = {
|
||||||
"ERR_BADFILE ",
|
"ERR_BADFILE ",
|
||||||
|
@ -198,65 +166,6 @@ volatile short AckTmCount=0, AckTmDelay=0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void AckRegisterStructure(ACKENG *ae);
|
|
||||||
void AckSpeedUp(short);
|
|
||||||
void AckSlowDown(void);
|
|
||||||
|
|
||||||
//=============================================================================
|
|
||||||
// Keyboard interrupt 9
|
|
||||||
//=============================================================================
|
|
||||||
void __interrupt __far myInt(void)
|
|
||||||
{
|
|
||||||
register char x;
|
|
||||||
|
|
||||||
//oldvec(); // Use when screen captures are wanted - calls orig vector
|
|
||||||
|
|
||||||
scanCode = inp(0x60); // read keyboard data port
|
|
||||||
x = inp(0x61);
|
|
||||||
outp(0x61, (x | 0x80));
|
|
||||||
outp(0x61, x);
|
|
||||||
outp(0x20, 0x20);
|
|
||||||
|
|
||||||
Keys[scanCode & 127] = 1;
|
|
||||||
KeyPressed = 1;
|
|
||||||
if (scanCode & 128)
|
|
||||||
{
|
|
||||||
Keys[scanCode & 127] = 0;
|
|
||||||
KeyPressed = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
MiniKey = 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//=============================================================================
|
|
||||||
// Timer interrupt - simply increments a counter for use in program
|
|
||||||
// Calls the old timer after X iterations have cycled so clock stays correct
|
|
||||||
//=============================================================================
|
|
||||||
void __interrupt __far myTimer(void)
|
|
||||||
{
|
|
||||||
if (ShutDownFlag)
|
|
||||||
{
|
|
||||||
_enable();
|
|
||||||
outp(0x20,0x20);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
TimerCounter++;
|
|
||||||
|
|
||||||
AckTmCount++;
|
|
||||||
if (AckTmCount > AckTmDelay)
|
|
||||||
{
|
|
||||||
oldTimer();
|
|
||||||
AckTmCount -= AckTmDelay;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_enable();
|
|
||||||
outp(0x20,0x20);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
short ModSound; // 0 = Off, 1 = On
|
short ModSound; // 0 = Off, 1 = On
|
||||||
short ModPort; // Port of SB card
|
short ModPort; // Port of SB card
|
||||||
|
@ -328,7 +237,7 @@ void ReadConfigFile(void)
|
||||||
|
|
||||||
ModSound = 0;
|
ModSound = 0;
|
||||||
ModPort = 0x220;
|
ModPort = 0x220;
|
||||||
ModIRQ = 7;
|
ModIRQ = 5;
|
||||||
ModDMA = 1;
|
ModDMA = 1;
|
||||||
strcpy(ModName,"MALL.MOD");
|
strcpy(ModName,"MALL.MOD");
|
||||||
|
|
||||||
|
@ -1507,7 +1416,7 @@ if (j > 0 && j != POV_PLAYER)
|
||||||
if (ae->ObjList[j]->CurrentType == NO_WALK)
|
if (ae->ObjList[j]->CurrentType == NO_WALK)
|
||||||
{
|
{
|
||||||
AckSetObjectType(ae,j,NO_INTERACT);
|
AckSetObjectType(ae,j,NO_INTERACT);
|
||||||
ObjCounter[j] = TimerCounter + 18 + (rand() % 120);
|
ObjCounter[j] = AckTimerCounter + 18 + (rand() % 120);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1794,10 +1703,8 @@ MagAmount = MAX_MAG_AMOUNT;
|
||||||
StrAmount = MAX_STR_AMOUNT;
|
StrAmount = MAX_STR_AMOUNT;
|
||||||
|
|
||||||
// Setup keyboard and timer interrupts
|
// Setup keyboard and timer interrupts
|
||||||
oldvec=_dos_getvect(KEYBD);
|
AckSetupKeyboard();
|
||||||
_dos_setvect(KEYBD,myInt);
|
AckSetupTimer();
|
||||||
oldTimer=_dos_getvect(8);
|
|
||||||
_dos_setvect(8,myTimer);
|
|
||||||
AckTmDelay = 3;
|
AckTmDelay = 3;
|
||||||
AckSpeedUp(AckTmDelay); // Set the timer interrupt at 3 times normal
|
AckSpeedUp(AckTmDelay); // Set the timer interrupt at 3 times normal
|
||||||
|
|
||||||
|
@ -1822,18 +1729,18 @@ SetMouseCursor(120,160);
|
||||||
fpos = 64;
|
fpos = 64;
|
||||||
DemoFlag = 0;
|
DemoFlag = 0;
|
||||||
//if (DemoPtr != NULL) DemoFlag = 1;
|
//if (DemoPtr != NULL) DemoFlag = 1;
|
||||||
TimerEnd = TimerCounter + 180;
|
TimerEnd = AckTimerCounter + 180;
|
||||||
|
|
||||||
|
|
||||||
// MUST register each ACKENG structure once before use and after AckInitialize
|
// MUST register each ACKENG structure once before use and after AckInitialize
|
||||||
AckRegisterStructure(ae);
|
AckRegisterStructure(ae);
|
||||||
|
|
||||||
StartTime = TimerCounter;
|
StartTime = AckTimerCounter;
|
||||||
AckBuildView();
|
AckBuildView();
|
||||||
AckDisplayScreen();
|
AckDisplayScreen();
|
||||||
FontColorTable[0] = GetPoint(100,10);
|
FontColorTable[0] = GetPoint(100,10);
|
||||||
CenterString(3,"An ACK-3D Demonstration");
|
CenterString(3,"An ACK-3D Demonstration");
|
||||||
EndTime = TimerCounter - StartTime;
|
EndTime = AckTimerCounter - StartTime;
|
||||||
|
|
||||||
if (!EndTime) EndTime = 1;
|
if (!EndTime) EndTime = 1;
|
||||||
|
|
||||||
|
@ -1939,14 +1846,14 @@ while (!done)
|
||||||
{
|
{
|
||||||
AckSetObjectType(ae,j,NO_WALK);
|
AckSetObjectType(ae,j,NO_WALK);
|
||||||
ae->ObjList[j]->Flags &= ~OF_ANIMDONE;
|
ae->ObjList[j]->Flags &= ~OF_ANIMDONE;
|
||||||
ObjCounter[j] = TimerCounter + 18 + (rand() % 120);
|
ObjCounter[j] = AckTimerCounter + 18 + (rand() % 120);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (TimerCounter > ObjCounter[j])
|
if (AckTimerCounter > ObjCounter[j])
|
||||||
{
|
{
|
||||||
ObjCounter[j] = TimerCounter + 180 + (rand() % 180);
|
ObjCounter[j] = AckTimerCounter + 180 + (rand() % 180);
|
||||||
if (ae->ObjList[j]->CurrentType == NO_WALK)
|
if (ae->ObjList[j]->CurrentType == NO_WALK)
|
||||||
AckSetObjectType(ae,j,NO_ATTACK);
|
AckSetObjectType(ae,j,NO_ATTACK);
|
||||||
else
|
else
|
||||||
|
@ -1963,7 +1870,7 @@ while (!done)
|
||||||
|
|
||||||
CheckMonsters();
|
CheckMonsters();
|
||||||
|
|
||||||
CkStart = TimerCounter;
|
CkStart = AckTimerCounter;
|
||||||
AckBuildView(); // Build floor, ceiling, and walls into ScrnBuffer
|
AckBuildView(); // Build floor, ceiling, and walls into ScrnBuffer
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -1972,19 +1879,19 @@ while (!done)
|
||||||
switch (DemoFlag)
|
switch (DemoFlag)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
if (TimerCounter > TimerEnd)
|
if (AckTimerCounter > TimerEnd)
|
||||||
{
|
{
|
||||||
DemoFlag++;
|
DemoFlag++;
|
||||||
TimerEnd = TimerCounter + 540;
|
TimerEnd = AckTimerCounter + 540;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
ShowBitmap(130,20,ae->ScreenBuffer,Demoht,Demowt,&DemoPtr[4]);
|
ShowBitmap(130,20,ae->ScreenBuffer,Demoht,Demowt,&DemoPtr[4]);
|
||||||
if (TimerCounter > TimerEnd)
|
if (AckTimerCounter > TimerEnd)
|
||||||
{
|
{
|
||||||
DemoFlag = 1;
|
DemoFlag = 1;
|
||||||
TimerEnd = TimerCounter + 2160;
|
TimerEnd = AckTimerCounter + 2160;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -2069,7 +1976,7 @@ while (!done)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
AckDisplayScreen(); // Copy ScrnBuffer to actual video
|
AckDisplayScreen(); // Copy ScrnBuffer to actual video
|
||||||
CkEnd = TimerCounter - CkStart;
|
CkEnd = AckTimerCounter - CkStart;
|
||||||
if (!CkEnd) CkEnd = 1;
|
if (!CkEnd) CkEnd = 1;
|
||||||
|
|
||||||
TurnFactor = INT_ANGLE_1 * CkEnd;
|
TurnFactor = INT_ANGLE_1 * CkEnd;
|
||||||
|
@ -2161,22 +2068,22 @@ while (!done)
|
||||||
MoveAngle = j;
|
MoveAngle = j;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Keys[ESCAPE_KEY])
|
if (AckKeys[ESCAPE_KEY])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if(Keys[RIGHT_ARROW_KEY])
|
if(AckKeys[RIGHT_ARROW_KEY])
|
||||||
{
|
{
|
||||||
Spin += 1;
|
Spin += 1;
|
||||||
SpinAngle += TurnFactor; // INT_ANGLE_1 * Spin;
|
SpinAngle += TurnFactor; // INT_ANGLE_1 * Spin;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Keys[LEFT_ARROW_KEY])
|
if(AckKeys[LEFT_ARROW_KEY])
|
||||||
{
|
{
|
||||||
Spin += 1;
|
Spin += 1;
|
||||||
SpinAngle -= TurnFactor; // -INT_ANGLE_1 * Spin;
|
SpinAngle -= TurnFactor; // -INT_ANGLE_1 * Spin;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Keys[UP_ARROW_KEY])
|
if(AckKeys[UP_ARROW_KEY])
|
||||||
{
|
{
|
||||||
MoveAmount += (MoveFactor + MoveHalfFactor); // 12;
|
MoveAmount += (MoveFactor + MoveHalfFactor); // 12;
|
||||||
if (MoveAmount > MAX_AMOUNT)
|
if (MoveAmount > MAX_AMOUNT)
|
||||||
|
@ -2184,7 +2091,7 @@ while (!done)
|
||||||
MoveAngle = ae->PlayerAngle;
|
MoveAngle = ae->PlayerAngle;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Keys[DOWN_ARROW_KEY])
|
if(AckKeys[DOWN_ARROW_KEY])
|
||||||
{
|
{
|
||||||
j = ae->PlayerAngle + INT_ANGLE_180;
|
j = ae->PlayerAngle + INT_ANGLE_180;
|
||||||
if (j >= INT_ANGLE_360)
|
if (j >= INT_ANGLE_360)
|
||||||
|
@ -2197,102 +2104,96 @@ while (!done)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
if (AckKeys[C_KEY])
|
||||||
if (Keys[C_KEY])
|
|
||||||
{
|
{
|
||||||
ae->SysFlags ^= SYS_SOLID_CEIL;
|
ae->SysFlags ^= SYS_SOLID_CEIL;
|
||||||
ae->SysFlags &= ~SYS_SOLID_BACK;
|
ae->SysFlags &= ~SYS_SOLID_BACK;
|
||||||
Keys[C_KEY] = 0;
|
AckKeys[C_KEY] = 0;
|
||||||
|
|
||||||
if ((ae->SysFlags & SYS_SOLID_CEIL) && (ResScrollBack != 0))
|
if ((ae->SysFlags & SYS_SOLID_CEIL) && (ResScrollBack != 0))
|
||||||
ae->SysFlags |= SYS_SOLID_BACK;
|
ae->SysFlags |= SYS_SOLID_BACK;
|
||||||
AckRegisterStructure(ae);
|
AckRegisterStructure(ae);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Keys[R_KEY])
|
if (AckKeys[R_KEY])
|
||||||
{
|
{
|
||||||
Keys[R_KEY] = 0;
|
AckKeys[R_KEY] = 0;
|
||||||
Resolution++;
|
Resolution++;
|
||||||
if (Resolution > 2)
|
if (Resolution > 2)
|
||||||
Resolution = 0;
|
Resolution = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Keys[F_KEY])
|
if (AckKeys[F_KEY])
|
||||||
{
|
{
|
||||||
ae->SysFlags ^= SYS_SOLID_FLOOR;
|
ae->SysFlags ^= SYS_SOLID_FLOOR;
|
||||||
Keys[F_KEY] = 0;
|
AckKeys[F_KEY] = 0;
|
||||||
AckRegisterStructure(ae);
|
AckRegisterStructure(ae);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (Keys[PGUP_KEY] && ViewHeight < 60)
|
if (AckKeys[PGUP_KEY] && ViewHeight < 60)
|
||||||
{
|
{
|
||||||
ViewHeight++;
|
ViewHeight++;
|
||||||
CeilingHeight++;
|
CeilingHeight++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Keys[PGDN_KEY] && ViewHeight > 4)
|
if (AckKeys[PGDN_KEY] && ViewHeight > 4)
|
||||||
{
|
{
|
||||||
ViewHeight--;
|
ViewHeight--;
|
||||||
CeilingHeight--;
|
CeilingHeight--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Keys[NUM_1_KEY])
|
if (AckKeys[NUM_1_KEY])
|
||||||
{
|
{
|
||||||
Keys[NUM_1_KEY]=0;
|
AckKeys[NUM_1_KEY]=0;
|
||||||
dFactor--;
|
dFactor--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Keys[NUM_2_KEY])
|
if (AckKeys[NUM_2_KEY])
|
||||||
{
|
{
|
||||||
Keys[NUM_2_KEY]=0;
|
AckKeys[NUM_2_KEY]=0;
|
||||||
dFactor++;
|
dFactor++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (Keys[MINUS_KEY])
|
if (AckKeys[MINUS_KEY])
|
||||||
{
|
{
|
||||||
Keys[MINUS_KEY]=0;
|
AckKeys[MINUS_KEY]=0;
|
||||||
mFactor--;
|
mFactor--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Keys[PLUS_KEY])
|
if (AckKeys[PLUS_KEY])
|
||||||
{
|
{
|
||||||
Keys[PLUS_KEY]=0;
|
AckKeys[PLUS_KEY]=0;
|
||||||
mFactor++;
|
mFactor++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Keys[I_KEY])
|
if (AckKeys[I_KEY])
|
||||||
{
|
{
|
||||||
Keys[I_KEY] = 0;
|
AckKeys[I_KEY] = 0;
|
||||||
InfoFlag ^= 1;
|
InfoFlag ^= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Keys[B_KEY])
|
if (AckKeys[B_KEY])
|
||||||
{
|
{
|
||||||
Keys[B_KEY]=0;
|
AckKeys[B_KEY]=0;
|
||||||
mFactor -= 64;
|
mFactor -= 64;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Keys[S_KEY])
|
if (AckKeys[S_KEY])
|
||||||
{
|
{
|
||||||
Keys[S_KEY] = 0;
|
AckKeys[S_KEY] = 0;
|
||||||
mFactor += 64;
|
mFactor += 64;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EndBGmusic();
|
EndBGmusic();
|
||||||
ShutDownFlag = 1;
|
ShutDownFlag = 1;
|
||||||
_disable();
|
|
||||||
AckSlowDown(); // Set the timer back to normal speed
|
AckSlowDown(); // Set the timer back to normal speed
|
||||||
AckWrapUp(ae);
|
AckWrapUp(ae);
|
||||||
AckSetTextmode();
|
AckSetTextmode();
|
||||||
_dos_setvect(KEYBD,oldvec);
|
|
||||||
_dos_setvect(8,oldTimer);
|
|
||||||
_enable();
|
|
||||||
|
|
||||||
if (kbhit())
|
if (kbhit())
|
||||||
getch();
|
getch();
|
||||||
|
|
|
@ -21,8 +21,7 @@ global MODPlayVoice:near
|
||||||
global MODStopVoice:near
|
global MODStopVoice:near
|
||||||
global MODSetPeriod:near
|
global MODSetPeriod:near
|
||||||
global MODSetVolume:near
|
global MODSetVolume:near
|
||||||
;;global _GETDS:near
|
global _GETDS:near
|
||||||
global OurDataSeg:dword
|
|
||||||
|
|
||||||
;±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
;±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||||||
; EQUATES
|
; EQUATES
|
||||||
|
@ -1135,11 +1134,9 @@ IRQSetVect:
|
||||||
IRQHandler:
|
IRQHandler:
|
||||||
pushad ; pushes all the registers
|
pushad ; pushes all the registers
|
||||||
push ds
|
push ds
|
||||||
;;; mov ax,DGROUP ; load the DS selector
|
mov ax,DGROUP ; load the DS selector
|
||||||
;;; mov ds,ax
|
|
||||||
;;; call _GETDS
|
|
||||||
mov ax,cs:[dword ptr OurDataSeg]
|
|
||||||
mov ds,ax
|
mov ds,ax
|
||||||
|
call _GETDS
|
||||||
mov dx,[IOAddr] ; send ack to the SB DSP chip
|
mov dx,[IOAddr] ; send ack to the SB DSP chip
|
||||||
add dx,0Eh
|
add dx,0Eh
|
||||||
in al,dx
|
in al,dx
|
||||||
|
|
56
mall/makefile
Normal file
56
mall/makefile
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
target_config = debug
|
||||||
|
|
||||||
|
target_name = mall
|
||||||
|
|
||||||
|
acklib_incdir = ..\ack_lib
|
||||||
|
acklib_lib = ..\ack_lib\acklib.lib
|
||||||
|
|
||||||
|
object_files = &
|
||||||
|
mall.obj &
|
||||||
|
modplay.obj &
|
||||||
|
mouse.obj
|
||||||
|
|
||||||
|
|
||||||
|
cc_flags_debug = /d2 /zp1 /4r /fp3 /j
|
||||||
|
cc_flags_release = /d1+ /zp1 /4r /fp3 /ontx /oe=40 /j
|
||||||
|
cc_flags = /mf /i=$(acklib_incdir) $(cc_flags_$(target_config))
|
||||||
|
|
||||||
|
link_flags_debug = debug all
|
||||||
|
link_flags_release = debug all
|
||||||
|
link_flags = $(link_flags_$(target_config))
|
||||||
|
|
||||||
|
.c.obj: .AUTODEPEND
|
||||||
|
wcc386 $[. /zq $(cc_flags)
|
||||||
|
|
||||||
|
.asm.obj: .AUTODEPEND
|
||||||
|
tasm $[. /t $(asm_flags)
|
||||||
|
|
||||||
|
$(target_name).lnk: $(object_files)
|
||||||
|
%create $^@
|
||||||
|
%append $^@ NAME $(target_name).exe
|
||||||
|
%append $^@ SYSTEM DOS4G
|
||||||
|
%append $^@ OPTION QUIET
|
||||||
|
%append $^@ OPTION STACK=16k
|
||||||
|
%append $^@ LIBRARY $(acklib_lib)
|
||||||
|
@for %i in ($(object_files)) do %append $^@ FILE %i
|
||||||
|
|
||||||
|
$(target_name).exe: $(object_files) $(target_name).lnk
|
||||||
|
wlink $(link_flags) @$(target_name).lnk
|
||||||
|
|
||||||
|
clean : .SYMBOLIC
|
||||||
|
del *.obj
|
||||||
|
del *.err
|
||||||
|
del $(target_name).exe
|
||||||
|
del $(target_name).lnk
|
||||||
|
|
||||||
|
.NOCHECK
|
||||||
|
build : $(target_name).exe
|
||||||
|
|
||||||
|
.NOCHECK
|
||||||
|
run : $(target_name).exe
|
||||||
|
$(target_name).exe
|
||||||
|
|
||||||
|
.NOCHECK
|
||||||
|
debug : $(target_name).exe
|
||||||
|
wd /swap /trap=rsi $(target_name).exe
|
||||||
|
|
Loading…
Reference in a new issue