Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a mixer for GSS and fixed all the warnings. #37

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/textscreen/include/txt_fileselect.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ static char *ExpandExtension(const char *orig)
c = newext;
for (i = 0; i < oldlen; ++i)
{
if (isalpha(orig[i]))
if (isalpha((int)orig[i]))
{
*c++ = '[';
*c++ = tolower(orig[i]);
Expand Down
1 change: 0 additions & 1 deletion include/textscreen/include/txt_gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ void TXT_DrawSpecialSeparator(int x, int y, int w, int h, int sepcolor, int cust
int bx;

int x1;
int b;

TXT_SaveColors(&colors);

Expand Down
5 changes: 2 additions & 3 deletions include/textscreen/include/txt_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,12 +625,11 @@ void TXT_OpenURL(const char *url)
#endif

retval = system(cmd);
free(cmd);
if (retval != 0)
{
fprintf(stderr, "TXT_OpenURL: error executing '%s'; return code %d\n",
cmd, retval);
fprintf(stderr, "TXT_OpenURL: error executing '%s'; return code %d\n", cmd, retval);
}
free(cmd);
}

#endif /* #ifndef _WIN32 */
Expand Down
4 changes: 1 addition & 3 deletions src/demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,7 @@ DEMO_LoadFile(
void
)
{
int filesize;

filesize = GLB_ReadFile(demo_name, 0);
GLB_ReadFile(demo_name, 0);
GLB_ReadFile(demo_name, (char*)playback);

cur_play = 1;
Expand Down
4 changes: 2 additions & 2 deletions src/fileids.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#define FILE_NULL UINT32_MAX
//FILE0000.GLB Items

#define FILE000_ATENTION_TXT 0x00000
#define FILE001_LASTSCR1_TXT 0x00001
#define FILE002_LASTSCR2_TXT 0x00002
Expand Down Expand Up @@ -1730,4 +1730,4 @@
#define FILE4d3_EBOSS11_PIC 0x400d3
#define FILE4d4_STARTG4TILES 0x400d4
#define FILE415_ENDG4TILES 0x40615
#define FILE416_BOGUS4 0x40616
#define FILE416_BOGUS4 0x40616
8 changes: 7 additions & 1 deletion src/fx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ SND_InitSound(

dig_flag = 0;
fx_device = SND_NONE;

music_volume = INI_GetPreferenceLong("Music", "Volume", 127);
music_card = INI_GetPreferenceLong("Music", "CardType", M_NONE);
sys_midi = INI_GetPreferenceLong("Setup", "sys_midi", 0);
Expand All @@ -125,6 +124,10 @@ SND_InitSound(
core_midi_port = INI_GetPreferenceLong("Setup", "core_midi_port", 0);
alsaclient = INI_GetPreferenceLong("Setup", "alsa_output_client", 128);
alsaport = INI_GetPreferenceLong("Setup", "alsa_output_port", 0);
music_samplesperloop = INI_GetPreferenceLong("Music", "SamplesPerLoop", 16);

if(music_samplesperloop < 1 || music_samplesperloop > spec.samples)
music_samplesperloop = 16;

switch (music_card)
{
Expand Down Expand Up @@ -206,7 +209,10 @@ SND_InitSound(
fx_channels = 1;

if (fx_card == M_ADLIB || fx_card == M_WAVE || fx_card == M_CANVAS || fx_card == M_GMIDI)
{
fx_gus = 1;
GSS_Init(fx_card, 0);
}

SDL_PauseAudioDevice(fx_dev, 0);

Expand Down
10 changes: 5 additions & 5 deletions src/gfxapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ GFX_ShadeArea(
)
{
int loop;
char *buf, *cur_table;
char *buf, *cur_table = ltable;

if (!GFX_ClipLines(NULL, &x, &y, &lx, &ly))
return;
Expand Down Expand Up @@ -682,7 +682,7 @@ GFX_ShadeShape(
GFX_PIC* h = (GFX_PIC*)inmem;
GFX_SPRITE* ah;
char rval;
char *cur_table;
char *cur_table = ltable;
char *dest;
int ox = x;
int oy = y;
Expand Down Expand Up @@ -753,7 +753,7 @@ GFX_VShadeLine(
int ly // INPUT : length of line
)
{
char *cur_table;
char *cur_table = ltable;
char *outbuf;
int lx = 1;

Expand Down Expand Up @@ -798,7 +798,7 @@ GFX_HShadeLine(
int lx // INPUT : length of line
)
{
char *cur_table;
char *cur_table = ltable;
char *outbuf;
int ly = 1;

Expand Down Expand Up @@ -1522,7 +1522,7 @@ GFX_StrPixelLen(

for (loop = 0; loop < maxloop; loop++)
{
outlen += infont->width[instr[loop]] + fontspacing;
outlen += infont->width[(int)instr[loop]] + fontspacing;
}

return outlen;
Expand Down
Loading