mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-05 14:10:27 -04:00
more controller support and fix some crashes
This commit is contained in:
parent
3f946405b9
commit
0e251dcd05
19 changed files with 608 additions and 195 deletions
|
@ -17,6 +17,7 @@
|
|||
#include <libs/pcx.h>
|
||||
#include "globals.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#define AUTOMAP_BACK RGB555(8,4,0)
|
||||
#define AUTOMAP_VODA RGB555(0,15,31)
|
||||
|
@ -141,11 +142,15 @@ void save_text_to_map(int x,int y,int depth,char *text)
|
|||
{
|
||||
char c[512],*d;
|
||||
if (text[0]==0) return;
|
||||
d = text;
|
||||
while (*d && isspace(*d)) ++d;
|
||||
if (!*d) return;
|
||||
memset(c,1,sizeof(c));
|
||||
strncpy(c+12,text,sizeof(c)-13);
|
||||
c[511] = 0;
|
||||
if (texty_v_mape==NULL) texty_v_mape=create_list(8);
|
||||
d=texty_v_mape[str_add(&texty_v_mape,c)];
|
||||
int id = str_add(&texty_v_mape,c);
|
||||
d=texty_v_mape[id];
|
||||
x=(x-320)+map_xr;
|
||||
y=(y-197)+map_yr;
|
||||
memcpy(d,&x,4);memcpy(d+4,&y,4);memcpy(d+8,&depth,4);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue