X-Git-Url: https://deadsoftware.ru/gitweb?p=flatwaifu.git;a=blobdiff_plain;f=src%2Fmisc.h;h=20ec63016cfc56393d034b73a17bd70116ef5529;hp=6d4ac768d65b83fa4df470667244eee256a62b8f;hb=ef16dea09f87b15fc6d58fae0aa0832e0648c00e;hpb=a2115940e7643dcb1b87286f3d19fe95f7b79bd3 diff --git a/src/misc.h b/src/misc.h index 6d4ac76..20ec630 100644 --- a/src/misc.h +++ b/src/misc.h @@ -1,84 +1,63 @@ -/* - Copyright (C) Prikol Software 1996-1997 - Copyright (C) Aleksey Volynskov 1996-1997 - Copyright (C) 2011 - - This file is part of the Doom2D:Rembo project. - - Doom2D:Rembo is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. - - Doom2D:Rembo 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, see or - write to the Free Software Foundation, Inc., - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -// Miscellaneous functions +/* Copyright (C) 1996-1997 Aleksey Volynskov + * Copyright (C) 2011 Rambo + * Copyright (C) 2020 SovietPony + * + * 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, version 3 of the License ONLY. + * + * 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, see . + */ + +#ifndef MISC_H_INCLUDED +#define MISC_H_INCLUDED + +#include "glob.h" +#include "view.h" // obj_t +#include // int16_t int32_t #define MAXDIST 2000000L -enum{ - Z_HITWALL=1,Z_HITCEIL=2,Z_HITLAND=4,Z_FALLOUT=8, - Z_INWATER=16,Z_HITWATER=32,Z_HITAIR=64,Z_BLOCK=128 +enum { + Z_HITWALL = 1, + Z_HITCEIL = 2, + Z_HITLAND = 4, + Z_FALLOUT = 8, + Z_INWATER = 16, + Z_HITWATER = 32, + Z_HITAIR = 64, + Z_BLOCK = 128 }; -void *Z_getspr(char[4],int,int,char *); -void *Z_getsnd(char[6]); -void Z_drawspr(int,int,void *,char); -void Z_drawmanspr(int,int,void *,char,byte); -void Z_drawstair(int); -void Z_drawstprcnt(int,int); -void Z_drawstnum(int); -void Z_drawstwpn(int,int); -void Z_drawstkeys(byte); -void Z_drawstlives(char); -int Z_sound(void *,int); -void Z_initst(void); -void Z_drawfld(byte *, int); -int Z_sign(int); -int Z_dec(int,int); -int Z_canstand(int,int,int); -int Z_canfit(int x,int y,int r,int h); -void Z_teleobj(int o,int x,int y); -int Z_moveobj(obj_t *); -int Z_what_cpu(void); -int Z_gunhit(int,int,int,int,int); -int Z_overlap(obj_t *,obj_t *); -int Z_look(obj_t *,obj_t *,int); -int Z_hit(obj_t *,int,int,int); -int Z_hitobj(int id,int d,int o,int t); -void Z_kickobj(obj_t *,int,int,int); -void Z_explode(int,int,int,int); -void Z_bfg9000(int,int,int); -int Z_cansee(int,int,int,int); -int Z_chktrap(int,int d,int o,int t); -int Z_istrapped(int,int,int,int); -int Z_inwater(int x,int y,int r,int h); -int Z_canbreathe(int x,int y,int r,int h); -int Z_getobjpos(int,obj_t *o); - -void Z_water_trap(obj_t *); -void Z_untrap(byte); - -void Z_splash(obj_t *,int n); - -void Z_set_speed(obj_t *,int); - -void Z_calc_time(dword t,word *h,word *m,word *s); - -void Z_putbfch(int); -void Z_printbf(char *,...); -void Z_putsfch(int); -void Z_printsf(char *,...); -void Z_gotoxy(int,int); - -int Z_getacid(int x,int y,int r,int h); - -void Z_clrst(); +extern byte z_dot; +extern byte z_mon; + +int Z_sign (int a); +int Z_dec (int a, int b); +void *Z_getsnd (char n[6]); +int Z_sound (void *s, int v); +void Z_initst (void); +int Z_canstand (int x, int y, int r); +int Z_canfit (int x, int y, int r, int h); +int Z_istrapped (int x, int y, int r, int h); +void Z_set_speed (obj_t *o, int s); +int Z_inwater (int x, int y, int r, int h); +int Z_getacid (int x, int y, int r, int h); +int Z_canbreathe (int x, int y, int r, int h); +int Z_overlap (obj_t *a, obj_t *b); +int Z_cansee (int x, int y, int xd, int yd); +int Z_look (obj_t *a, obj_t *b, int d); +int Z_moveobj (obj_t *p); +void Z_splash (obj_t *p, int n); +void Z_calc_time(dword t, word *h, word *m, word *s); + +int16_t short2host (int16_t x); +int32_t int2host (int32_t x); + +#endif /* MISC_H_INCLUDED */