some minor cleanups

This commit is contained in:
Gered 2019-11-03 11:06:19 -05:00
parent 800298c59f
commit 1f1185b67f
7 changed files with 29 additions and 35 deletions

View file

@ -7,17 +7,14 @@
#include <stdio.h> #include <stdio.h>
#include <malloc.h> #include <malloc.h>
#include <dos.h> #include <dos.h>
#include <mem.h>
#include <io.h> #include <io.h>
#include <fcntl.h> #include <fcntl.h>
#include <time.h>
#include <string.h> #include <string.h>
#include <process.h>
#include <bios.h>
#include <sys\stat.h> #include <sys\stat.h>
#include "ack3d.h" #include "ack3d.h"
#include "ackeng.h" #include "ackeng.h"
#include "m1.h" #include "m1.h"
#include "mapedit.h"
extern UCHAR colordat[]; extern UCHAR colordat[];
extern char *smFont; extern char *smFont;
@ -2611,7 +2608,7 @@ while (!done)
} }
} }
AckSetTextmode(); AckSetTextMode();
return 0; return 0;
} }

View file

@ -2,6 +2,8 @@
// Author: Lary Myers // Author: Lary Myers
// Copyright (c) 1994 // Copyright (c) 1994
#ifndef M1_H_INCLUDED
#define M1_H_INCLUDED
#define RES_SMFONT 0 // Resource ID's #define RES_SMFONT 0 // Resource ID's
#define RES_MDFONT 1 #define RES_MDFONT 1
@ -220,3 +222,5 @@ int QueryBox(int x,int y,char *Msg);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
short LoadDescFile(char *fName); short LoadDescFile(char *fName);
#endif

View file

@ -7,13 +7,9 @@
#include <stdio.h> #include <stdio.h>
#include <malloc.h> #include <malloc.h>
#include <dos.h> #include <dos.h>
#include <mem.h>
#include <io.h> #include <io.h>
#include <fcntl.h> #include <fcntl.h>
#include <time.h>
#include <string.h> #include <string.h>
#include <process.h>
#include <bios.h>
#include <sys\stat.h> #include <sys\stat.h>
#include "ack3d.h" #include "ack3d.h"
#include "ackeng.h" #include "ackeng.h"
@ -85,7 +81,7 @@ if (LoadType)
} }
bmp = malloc(4096); bmp = (unsigned char*)malloc(4096);
if (bmp == NULL) if (bmp == NULL)
{ {
ReadErrorCode = ERR_NOMEMORY; ReadErrorCode = ERR_NOMEMORY;

View file

@ -3,18 +3,11 @@
// Author: Lary Myers // Author: Lary Myers
// Copyright (c) 1994 // Copyright (c) 1994
#include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <ctype.h>
#include <malloc.h> #include <malloc.h>
#include <dos.h> #include <dos.h>
#include <mem.h>
#include <io.h>
#include <fcntl.h>
#include <time.h>
#include <string.h> #include <string.h>
#include <process.h>
#include <bios.h>
#include <sys\stat.h>
#include "ack3d.h" #include "ack3d.h"
#include "ackeng.h" #include "ackeng.h"
#include "m1.h" #include "m1.h"
@ -50,7 +43,7 @@ short LoadSmallFont(void)
int len; int len;
ht = 2; ht = 2;
smFont = AckReadiff((char *)RES_SMFONT); // "spfont.bbm"); smFont = (char*)AckReadiff((char *)RES_SMFONT); // "spfont.bbm");
if (smFont == NULL) if (smFont == NULL)
return(-1); return(-1);
@ -71,7 +64,7 @@ short LoadMedFont(void)
int len; int len;
ht = 2; ht = 2;
mdFont = AckReadiff((char *)RES_MDFONT); // "font6x9.bbm"); mdFont = (char*)AckReadiff((char *)RES_MDFONT); // "font6x9.bbm");
if (mdFont == NULL) if (mdFont == NULL)
return(-1); return(-1);

View file

@ -1,5 +1,8 @@
/* Header file for ACK-3D Map Editor */ /* Header file for ACK-3D Map Editor */
#ifndef MAPEDIT_H_INCLUDED
#define MAPEDIT_H_INCLUDED
#define CURRENT_SQUAREX 161 #define CURRENT_SQUAREX 161
#define CURRENT_SQUAREY 4 #define CURRENT_SQUAREY 4
@ -50,3 +53,5 @@ unsigned short inkey(void);
void SetVGAmode(void); void SetVGAmode(void);
void SetTextMode(void); void SetTextMode(void);
#endif

View file

@ -1,21 +1,19 @@
IDEAL IDEAL
JUMPS JUMPS
include "prologue.mac" include "prologue.mac"
P386 ; 386 specific opcodes and shit allowed. P386 ; 386 specific opcodes and shit allowed.
P387 ; Allow 386 processor P387 ; Allow 386 processor
model flat
MASM codeseg
.MODEL FLAT ;32-bit OS/2 model
.CODE
IDEAL
PUBLIC SetPalette2_ PUBLIC SetPalette2_
PUBLIC SetVGAmode_ PUBLIC SetVGAmode_
PUBLIC SetTextMode_ PUBLIC SetTextMode_
PUBLIC inkey_ PUBLIC inkey_
PUBLIC PutHex_ PUBLIC PutHex_
;============================================================================== ;==============================================================================
; void SetPalette2(unsigned char *PalBuf,short count); ; void SetPalette2(unsigned char *PalBuf,short count);
@ -119,5 +117,6 @@ Proc PutHex_ near
pop edi pop edi
ret ret
endp endp
end end

View file

@ -6,7 +6,7 @@
#include <dos.h> #include <dos.h>
#include <stdio.h> #include <stdio.h>
#include <dos.h> #include <string.h>
int MouseModifier = 2; int MouseModifier = 2;