ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/Client.xs
(Generate patch)

Comparing deliantra/Deliantra-Client/Client.xs (file contents):
Revision 1.51 by root, Wed Apr 19 20:46:44 2006 UTC vs.
Revision 1.52 by root, Wed Apr 19 21:17:15 2006 UTC

9#include <string.h> 9#include <string.h>
10#include <stdio.h> 10#include <stdio.h>
11 11
12#include <SDL.h> 12#include <SDL.h>
13#include <SDL_image.h> 13#include <SDL_image.h>
14#include <SDL_mixer.h>
14#include <SDL_opengl.h> 15#include <SDL_opengl.h>
15 16
16#include <glib/gmacros.h> 17#include <glib/gmacros.h>
17 18
18#include <pango/pango.h> 19#include <pango/pango.h>
36 37
37#define FOW_DARKNESS 32 38#define FOW_DARKNESS 32
38 39
39#define MAP_EXTEND_X 32 40#define MAP_EXTEND_X 32
40#define MAP_EXTEND_Y 512 41#define MAP_EXTEND_Y 512
42
43typedef Mix_Chunk *CFClient__MixChunk;
44typedef Mix_Music *CFClient__MixMusic;
41 45
42static PangoContext *context; 46static PangoContext *context;
43static PangoFontMap *fontmap; 47static PangoFontMap *fontmap;
44 48
45typedef struct cf_layout { 49typedef struct cf_layout {
406 ); 410 );
407 SDL_WM_SetCaption ("Crossfire+ Client " VERSION, "Crossfire+"); 411 SDL_WM_SetCaption ("Crossfire+ Client " VERSION, "Crossfire+");
408 OUTPUT: 412 OUTPUT:
409 RETVAL 413 RETVAL
410 414
415int
416Mix_VolumeMusic (int newvol = -1)
417
418int
419Mix_OpenAudio (int frequency = 22050, int format = MIX_DEFAULT_FORMAT, int channels = 1, int chunksize = 512)
420
421void
422Mix_CloseAudio ()
423
424int
425Mix_AllocateChannels (int numchans = -1)
426
411void 427void
412lowdelay (int fd, int val = 1) 428lowdelay (int fd, int val = 1)
413 CODE: 429 CODE:
414#ifndef _WIN32 430#ifndef _WIN32
415 setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof (val)); 431 setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof (val));
1151 } 1167 }
1152 } 1168 }
1153 } 1169 }
1154} 1170}
1155 1171
1172MODULE = CFClient PACKAGE = CFClient::MixChunk
1173
1174CFClient::MixChunk
1175new_from_file (SV *class, char *path)
1176 CODE:
1177 RETVAL = Mix_LoadWAV (path);
1178 OUTPUT:
1179 RETVAL
1180
1181void
1182DESTROY (CFClient::MixChunk self)
1183 CODE:
1184 Mix_FreeChunk (self);
1185
1186int
1187volume (CFClient::MixChunk self, int volume = -1)
1188 CODE:
1189 RETVAL = Mix_VolumeChunk (self, volume);
1190 OUTPUT:
1191 RETVAL
1192
1193int
1194play (CFClient::MixChunk self, int channel = -1, int loops = 0, int ticks = -1)
1195 CODE:
1196 RETVAL = Mix_PlayChannelTimed (channel, self, loops, ticks);
1197 OUTPUT:
1198 RETVAL
1199
1200MODULE = CFClient PACKAGE = CFClient::MixMusic
1201
1202int
1203volume (int volume = -1)
1204 CODE:
1205 RETVAL = Mix_VolumeMusic (volume);
1206 OUTPUT:
1207 RETVAL
1208
1209CFClient::MixMusic
1210new_from_file (SV *class, char *path)
1211 CODE:
1212 RETVAL = Mix_LoadMUS (path);
1213 OUTPUT:
1214 RETVAL
1215
1216void
1217DESTROY (CFClient::MixMusic self)
1218 CODE:
1219 Mix_FreeMusic (self);
1220
1221int
1222play (CFClient::MixMusic self, int loops = -1)
1223 CODE:
1224 RETVAL = Mix_PlayMusic (self, loops);
1225 OUTPUT:
1226 RETVAL
1227

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines