mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-22 15:14:49 -04:00
new filters, cztable, fix crash in enemy drawing
This commit is contained in:
parent
83933755df
commit
a8556070ad
10 changed files with 176 additions and 98 deletions
|
@ -513,7 +513,7 @@ void enemy_draw(const void *src,void *trg,int shade,int scale,int maxspace,int c
|
|||
int rwofs = pcx*(pcy-1);
|
||||
int accu = 0;
|
||||
int *w = ytable;
|
||||
int sp = maxspace*2;
|
||||
int sp = maxspace;
|
||||
|
||||
while (sp > 0 && rwofs >= 0) {
|
||||
*w++ = rwofs;
|
||||
|
@ -700,7 +700,7 @@ void enemy_draw_transp(const void *src,void *trg,const void *shade,int scale,int
|
|||
int rwofs = pcx*(pcy-1);
|
||||
int accu = 0;
|
||||
int *w = ytable;
|
||||
int sp = maxspace*2;
|
||||
int sp = maxspace;
|
||||
|
||||
while (sp > 0 && rwofs >= 0) {
|
||||
*w++ = rwofs;
|
||||
|
@ -889,7 +889,7 @@ void enemy_draw_mirror_transp(const void *src,void *trg,const void *shade,int sc
|
|||
int rwofs = pcx*(pcy-1);
|
||||
int accu = 0;
|
||||
int *w = ytable;
|
||||
int sp = maxspace*2;
|
||||
int sp = maxspace;
|
||||
|
||||
while (sp > 0 && rwofs >= 0) {
|
||||
*w++ = rwofs;
|
||||
|
@ -1079,7 +1079,7 @@ void enemy_draw_mirror(const void *src,void *trg,int shade,int scale,int maxspac
|
|||
int rwofs = pcx*(pcy-1);
|
||||
int accu = 0;
|
||||
int *w = ytable;
|
||||
int sp = maxspace*2;
|
||||
int sp = maxspace;
|
||||
|
||||
while (sp > 0 && rwofs >= 0) {
|
||||
*w++ = rwofs;
|
||||
|
|
24
game/kniha.c
24
game/kniha.c
|
@ -1,4 +1,5 @@
|
|||
#include <platform/platform.h>
|
||||
#include <libs/cztable.h>
|
||||
/*
|
||||
|
||||
Popis jazyka pro psani textu do knihy
|
||||
|
@ -98,20 +99,6 @@ static int picture_len=0;
|
|||
static char winconv=0;
|
||||
static int relpos=0;
|
||||
|
||||
//static char xlat_table[128]="<22>__<5F><5F>_____<5F>_____<5F>__<5F><5F>__________________________________<5F>___<5F>__<5F><5F>__<5F><5F>_<EFBFBD>__<5F><5F>____<5F><5F><EFBFBD>__<5F>___<5F>___<5F>__<5F><5F>__<5F><5F>_<EFBFBD>__<5F><5F>____<5F><5F><EFBFBD>__<5F>";
|
||||
static char xlat_table[128] = {
|
||||
0x9b, 0x5f, 0x5f, 0x86, 0x92, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0xad, 0x5f,
|
||||
0x5f, 0x5f, 0x5f, 0x5f, 0xa8, 0x5f, 0x5f, 0x9f, 0x91, 0x5f, 0x5f, 0x5f,
|
||||
0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f,
|
||||
0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f,
|
||||
0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x8f, 0x5f, 0x5f, 0x5f, 0x8a,
|
||||
0x5f, 0x5f, 0x80, 0x90, 0x5f, 0x5f, 0x89, 0x8b, 0x5f, 0x85, 0x5f, 0x5f,
|
||||
0xa5, 0x95, 0x5f, 0x5f, 0x5f, 0x5f, 0x9e, 0xa6, 0x97, 0x5f, 0x5f, 0x9d,
|
||||
0x5f, 0x5f, 0x5f, 0xa0, 0x5f, 0x5f, 0x5f, 0x8d, 0x5f, 0x5f, 0x87, 0x82,
|
||||
0x5f, 0x5f, 0x88, 0xa1, 0x5f, 0x83, 0x5f, 0x5f, 0xa4, 0xa2, 0x5f, 0x5f,
|
||||
0x5f, 0x5f, 0xa9, 0x96, 0xa3, 0x5f, 0x5f, 0x98, 0x0a
|
||||
};
|
||||
|
||||
static int insert_num(char *text,int pos,int num)
|
||||
{
|
||||
char c=0x80;
|
||||
|
@ -449,11 +436,7 @@ static char skip_section(TMPFILE_RD *txt)
|
|||
|
||||
void prekodovat(char *c)
|
||||
{
|
||||
while (*c)
|
||||
{
|
||||
if (*c>137) *c=xlat_table[*c-138];
|
||||
c++;
|
||||
}
|
||||
windows2kamenik(c, strlen(c), c);
|
||||
}
|
||||
|
||||
static void read_text(TMPFILE_RD *txt)
|
||||
|
@ -493,7 +476,7 @@ static void read_text(TMPFILE_RD *txt)
|
|||
}
|
||||
else wsp=0;
|
||||
if (i=='&') i=temp_storage_getc(txt);
|
||||
if (winconv && i>137) i=xlat_table[i-138];
|
||||
if (winconv) i=windows2kamenik_chr(i);
|
||||
ss[0]=i;
|
||||
xs+=text_width(ss);
|
||||
read_buff[buff_end++]=i;
|
||||
|
@ -528,7 +511,6 @@ static void seek_section(TMPFILE_RD *txt,int sect_number)
|
|||
}
|
||||
if (i==sect_number)
|
||||
{
|
||||
c=temp_storage_getc(txt);
|
||||
while(c!=']')
|
||||
{
|
||||
if (c=='W' || c=='w') winconv=1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue