aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFathi Boudra <fabo@debian.org>2011-10-20 15:18:11 +0300
committerFathi Boudra <fabo@debian.org>2011-10-20 15:18:11 +0300
commit840643efa638de9dc44f45dc4f3f1c81c2985498 (patch)
treec4d2f3b70c4138f8f7df772b09e663d7794d9456
downloadioquake3-gles-840643efa638de9dc44f45dc4f3f1c81c2985498.tar.gz
Initial import1772-openpandora
-rwxr-xr-x.gitignore2
-rw-r--r--.svnignore2
-rw-r--r--BUGS4
-rw-r--r--COPYING.txt281
-rw-r--r--ChangeLog3150
-rw-r--r--Makefile2334
-rw-r--r--Makefile.local23
-rw-r--r--NOTTODO1
-rw-r--r--README575
-rw-r--r--TODO1
-rw-r--r--code/AL/VERSION16
-rw-r--r--code/AL/al.h506
-rw-r--r--code/AL/alc.h166
-rw-r--r--code/AL/alctypes.h142
-rw-r--r--code/AL/altypes.h352
-rw-r--r--code/AL/alut.h90
-rw-r--r--code/SDL12/include/SDL.h101
-rw-r--r--code/SDL12/include/SDL_active.h63
-rw-r--r--code/SDL12/include/SDL_audio.h284
-rw-r--r--code/SDL12/include/SDL_byteorder.h29
-rw-r--r--code/SDL12/include/SDL_cdrom.h202
-rw-r--r--code/SDL12/include/SDL_config.h45
-rw-r--r--code/SDL12/include/SDL_config_amiga.h80
-rw-r--r--code/SDL12/include/SDL_config_dreamcast.h106
-rw-r--r--code/SDL12/include/SDL_config_macos.h112
-rw-r--r--code/SDL12/include/SDL_config_macosx.h150
-rw-r--r--code/SDL12/include/SDL_config_minimal.h62
-rw-r--r--code/SDL12/include/SDL_config_nds.h115
-rw-r--r--code/SDL12/include/SDL_config_os2.h141
-rw-r--r--code/SDL12/include/SDL_config_symbian.h146
-rw-r--r--code/SDL12/include/SDL_config_win32.h183
-rw-r--r--code/SDL12/include/SDL_copying.h22
-rw-r--r--code/SDL12/include/SDL_cpuinfo.h69
-rw-r--r--code/SDL12/include/SDL_endian.h209
-rw-r--r--code/SDL12/include/SDL_error.h72
-rw-r--r--code/SDL12/include/SDL_events.h356
-rw-r--r--code/SDL12/include/SDL_getenv.h28
-rw-r--r--code/SDL12/include/SDL_joystick.h187
-rw-r--r--code/SDL12/include/SDL_keyboard.h135
-rw-r--r--code/SDL12/include/SDL_keysym.h326
-rw-r--r--code/SDL12/include/SDL_loadso.h78
-rw-r--r--code/SDL12/include/SDL_main.h106
-rw-r--r--code/SDL12/include/SDL_mouse.h143
-rw-r--r--code/SDL12/include/SDL_mutex.h177
-rw-r--r--code/SDL12/include/SDL_name.h11
-rw-r--r--code/SDL12/include/SDL_opengl.h6556
-rw-r--r--code/SDL12/include/SDL_platform.h110
-rw-r--r--code/SDL12/include/SDL_quit.h55
-rw-r--r--code/SDL12/include/SDL_rwops.h155
-rw-r--r--code/SDL12/include/SDL_stdinc.h620
-rw-r--r--code/SDL12/include/SDL_syswm.h225
-rw-r--r--code/SDL12/include/SDL_thread.h120
-rw-r--r--code/SDL12/include/SDL_timer.h125
-rw-r--r--code/SDL12/include/SDL_types.h28
-rw-r--r--code/SDL12/include/SDL_version.h91
-rw-r--r--code/SDL12/include/SDL_video.h951
-rw-r--r--code/SDL12/include/begin_code.h191
-rw-r--r--code/SDL12/include/close_code.h46
-rw-r--r--code/asm/ftola.s160
-rw-r--r--code/asm/matha.s54
-rw-r--r--code/asm/qasm.h37
-rw-r--r--code/asm/snapvectora.s103
-rw-r--r--code/asm/snd_mixa.s217
-rw-r--r--code/botlib/aasfile.h267
-rw-r--r--code/botlib/be_aas.h221
-rw-r--r--code/botlib/be_aas_bsp.h89
-rw-r--r--code/botlib/be_aas_bspq3.c487
-rw-r--r--code/botlib/be_aas_cluster.c1546
-rw-r--r--code/botlib/be_aas_cluster.h38
-rw-r--r--code/botlib/be_aas_debug.c777
-rw-r--r--code/botlib/be_aas_debug.h62
-rw-r--r--code/botlib/be_aas_def.h306
-rw-r--r--code/botlib/be_aas_entity.c437
-rw-r--r--code/botlib/be_aas_entity.h63
-rw-r--r--code/botlib/be_aas_file.c582
-rw-r--r--code/botlib/be_aas_file.h42
-rw-r--r--code/botlib/be_aas_funcs.h47
-rw-r--r--code/botlib/be_aas_main.c429
-rw-r--r--code/botlib/be_aas_main.h61
-rw-r--r--code/botlib/be_aas_move.c1101
-rw-r--r--code/botlib/be_aas_move.h71
-rw-r--r--code/botlib/be_aas_optimize.c312
-rw-r--r--code/botlib/be_aas_optimize.h33
-rw-r--r--code/botlib/be_aas_reach.c4538
-rw-r--r--code/botlib/be_aas_reach.h68
-rw-r--r--code/botlib/be_aas_route.c2210
-rw-r--r--code/botlib/be_aas_route.h67
-rw-r--r--code/botlib/be_aas_routealt.c240
-rw-r--r--code/botlib/be_aas_routealt.h40
-rw-r--r--code/botlib/be_aas_sample.c1393
-rw-r--r--code/botlib/be_aas_sample.h69
-rw-r--r--code/botlib/be_ai_char.c790
-rw-r--r--code/botlib/be_ai_char.h48
-rw-r--r--code/botlib/be_ai_chat.c3042
-rw-r--r--code/botlib/be_ai_chat.h113
-rw-r--r--code/botlib/be_ai_gen.c134
-rw-r--r--code/botlib/be_ai_gen.h33
-rw-r--r--code/botlib/be_ai_goal.c1821
-rw-r--r--code/botlib/be_ai_goal.h118
-rw-r--r--code/botlib/be_ai_move.c3570
-rw-r--r--code/botlib/be_ai_move.h142
-rw-r--r--code/botlib/be_ai_weap.c543
-rw-r--r--code/botlib/be_ai_weap.h104
-rw-r--r--code/botlib/be_ai_weight.c925
-rw-r--r--code/botlib/be_ai_weight.h83
-rw-r--r--code/botlib/be_ea.c509
-rw-r--r--code/botlib/be_ea.h66
-rw-r--r--code/botlib/be_interface.c901
-rw-r--r--code/botlib/be_interface.h57
-rw-r--r--code/botlib/botlib.h516
-rw-r--r--code/botlib/l_crc.c152
-rw-r--r--code/botlib/l_crc.h29
-rw-r--r--code/botlib/l_libvar.c295
-rw-r--r--code/botlib/l_libvar.h63
-rw-r--r--code/botlib/l_log.c170
-rw-r--r--code/botlib/l_log.h46
-rw-r--r--code/botlib/l_memory.c464
-rw-r--r--code/botlib/l_memory.h76
-rw-r--r--code/botlib/l_precomp.c3238
-rw-r--r--code/botlib/l_precomp.h180
-rw-r--r--code/botlib/l_script.c1447
-rw-r--r--code/botlib/l_script.h247
-rw-r--r--code/botlib/l_struct.c462
-rw-r--r--code/botlib/l_struct.h75
-rw-r--r--code/botlib/l_utils.h37
-rw-r--r--code/botlib/lcc.mak55
-rw-r--r--code/botlib/linux-i386.mak92
-rw-r--r--code/cgame/cg_consolecmds.c578
-rw-r--r--code/cgame/cg_draw.c2663
-rw-r--r--code/cgame/cg_drawtools.c817
-rw-r--r--code/cgame/cg_effects.c718
-rw-r--r--code/cgame/cg_ents.c1037
-rw-r--r--code/cgame/cg_event.c1215
-rw-r--r--code/cgame/cg_info.c297
-rw-r--r--code/cgame/cg_local.h1668
-rw-r--r--code/cgame/cg_localents.c886
-rw-r--r--code/cgame/cg_main.c1988
-rw-r--r--code/cgame/cg_marks.c2274
-rw-r--r--code/cgame/cg_newdraw.c1849
-rw-r--r--code/cgame/cg_particles.c2018
-rw-r--r--code/cgame/cg_players.c2618
-rw-r--r--code/cgame/cg_playerstate.c526
-rw-r--r--code/cgame/cg_predict.c628
-rw-r--r--code/cgame/cg_public.h238
-rw-r--r--code/cgame/cg_scoreboard.c534
-rw-r--r--code/cgame/cg_servercmds.c1121
-rw-r--r--code/cgame/cg_snapshot.c403
-rw-r--r--code/cgame/cg_syscalls.asm106
-rw-r--r--code/cgame/cg_syscalls.c445
-rw-r--r--code/cgame/cg_view.c876
-rw-r--r--code/cgame/cg_weapons.c2298
-rw-r--r--code/client/cl_avi.c671
-rw-r--r--code/client/cl_cgame.c1105
-rw-r--r--code/client/cl_cin.c1668
-rw-r--r--code/client/cl_console.c795
-rw-r--r--code/client/cl_curl.c338
-rw-r--r--code/client/cl_curl.h102
-rw-r--r--code/client/cl_input.c1045
-rw-r--r--code/client/cl_keys.c1515
-rw-r--r--code/client/cl_main.c4229
-rw-r--r--code/client/cl_net_chan.c167
-rw-r--r--code/client/cl_parse.c913
-rw-r--r--code/client/cl_scrn.c597
-rw-r--r--code/client/cl_ui.c1154
-rw-r--r--code/client/client.h627
-rw-r--r--code/client/keycodes.h279
-rw-r--r--code/client/keys.h55
-rw-r--r--code/client/libmumblelink.c185
-rw-r--r--code/client/libmumblelink.h35
-rw-r--r--code/client/qal.c351
-rw-r--r--code/client/qal.h245
-rw-r--r--code/client/snd_adpcm.c330
-rw-r--r--code/client/snd_codec.c237
-rw-r--r--code/client/snd_codec.h98
-rw-r--r--code/client/snd_codec_ogg.c477
-rw-r--r--code/client/snd_codec_wav.c294
-rw-r--r--code/client/snd_dma.c1541
-rw-r--r--code/client/snd_local.h251
-rw-r--r--code/client/snd_main.c550
-rw-r--r--code/client/snd_mem.c265
-rw-r--r--code/client/snd_mix.c741
-rw-r--r--code/client/snd_openal.c2504
-rw-r--r--code/client/snd_public.h82
-rw-r--r--code/client/snd_wavelet.c253
-rw-r--r--code/game/ai_chat.c1226
-rw-r--r--code/game/ai_chat.h61
-rw-r--r--code/game/ai_cmd.c1992
-rw-r--r--code/game/ai_cmd.h37
-rw-r--r--code/game/ai_dmnet.c2610
-rw-r--r--code/game/ai_dmnet.h61
-rw-r--r--code/game/ai_dmq3.c5460
-rw-r--r--code/game/ai_dmq3.h206
-rw-r--r--code/game/ai_main.c1698
-rw-r--r--code/game/ai_main.h299
-rw-r--r--code/game/ai_team.c2080
-rw-r--r--code/game/ai_team.h39
-rw-r--r--code/game/ai_vcmd.c550
-rw-r--r--code/game/ai_vcmd.h36
-rw-r--r--code/game/bg_lib.c2133
-rw-r--r--code/game/bg_lib.h125
-rw-r--r--code/game/bg_local.h83
-rw-r--r--code/game/bg_misc.c1604
-rw-r--r--code/game/bg_pmove.c2069
-rw-r--r--code/game/bg_public.h738
-rw-r--r--code/game/bg_slidemove.c325
-rw-r--r--code/game/chars.h134
-rw-r--r--code/game/g_active.c1191
-rw-r--r--code/game/g_arenas.c376
-rw-r--r--code/game/g_bot.c1013
-rw-r--r--code/game/g_client.c1364
-rw-r--r--code/game/g_cmds.c1685
-rw-r--r--code/game/g_combat.c1196
-rw-r--r--code/game/g_items.c1010
-rw-r--r--code/game/g_local.h972
-rw-r--r--code/game/g_main.c1845
-rw-r--r--code/game/g_mem.c61
-rw-r--r--code/game/g_misc.c482
-rw-r--r--code/game/g_missile.c808
-rw-r--r--code/game/g_mover.c1631
-rw-r--r--code/game/g_public.h429
-rw-r--r--code/game/g_rankings.c1135
-rw-r--r--code/game/g_rankings.h396
-rw-r--r--code/game/g_session.c190
-rw-r--r--code/game/g_spawn.c643
-rw-r--r--code/game/g_svcmds.c508
-rw-r--r--code/game/g_syscalls.asm225
-rw-r--r--code/game/g_syscalls.c790
-rw-r--r--code/game/g_target.c467
-rw-r--r--code/game/g_team.c1486
-rw-r--r--code/game/g_team.h88
-rw-r--r--code/game/g_trigger.c465
-rw-r--r--code/game/g_utils.c666
-rw-r--r--code/game/g_weapon.c1145
-rw-r--r--code/game/inv.h166
-rw-r--r--code/game/match.h134
-rw-r--r--code/game/syn.h34
-rw-r--r--code/jpeg-6b/README385
-rw-r--r--code/jpeg-6b/ioq3-changes.diff916
-rw-r--r--code/jpeg-6b/jcapimin.c280
-rw-r--r--code/jpeg-6b/jcapistd.c161
-rw-r--r--code/jpeg-6b/jccoefct.c449
-rw-r--r--code/jpeg-6b/jccolor.c459
-rw-r--r--code/jpeg-6b/jcdctmgr.c389
-rw-r--r--code/jpeg-6b/jchuff.c909
-rw-r--r--code/jpeg-6b/jchuff.h47
-rw-r--r--code/jpeg-6b/jcinit.c72
-rw-r--r--code/jpeg-6b/jcmainct.c293
-rw-r--r--code/jpeg-6b/jcmarker.c664
-rw-r--r--code/jpeg-6b/jcmaster.c590
-rw-r--r--code/jpeg-6b/jcomapi.c106
-rw-r--r--code/jpeg-6b/jconfig.h40
-rw-r--r--code/jpeg-6b/jcparam.c610
-rw-r--r--code/jpeg-6b/jcphuff.c833
-rw-r--r--code/jpeg-6b/jcprepct.c354
-rw-r--r--code/jpeg-6b/jcsample.c519
-rw-r--r--code/jpeg-6b/jctrans.c388
-rw-r--r--code/jpeg-6b/jdapimin.c395
-rw-r--r--code/jpeg-6b/jdapistd.c275
-rw-r--r--code/jpeg-6b/jdatadst.c151
-rw-r--r--code/jpeg-6b/jdatasrc.c218
-rw-r--r--code/jpeg-6b/jdcoefct.c736
-rw-r--r--code/jpeg-6b/jdcolor.c396
-rw-r--r--code/jpeg-6b/jdct.h176
-rw-r--r--code/jpeg-6b/jddctmgr.c269
-rw-r--r--code/jpeg-6b/jdhuff.c651
-rw-r--r--code/jpeg-6b/jdhuff.h201
-rw-r--r--code/jpeg-6b/jdinput.c381
-rw-r--r--code/jpeg-6b/jdmainct.c512
-rw-r--r--code/jpeg-6b/jdmarker.c1360
-rw-r--r--code/jpeg-6b/jdmaster.c557
-rw-r--r--code/jpeg-6b/jdmerge.c400
-rw-r--r--code/jpeg-6b/jdphuff.c668
-rw-r--r--code/jpeg-6b/jdpostct.c290
-rw-r--r--code/jpeg-6b/jdsample.c478
-rw-r--r--code/jpeg-6b/jdtrans.c143
-rw-r--r--code/jpeg-6b/jerror.c256
-rw-r--r--code/jpeg-6b/jerror.h291
-rw-r--r--code/jpeg-6b/jfdctflt.c168
-rw-r--r--code/jpeg-6b/jfdctfst.c224
-rw-r--r--code/jpeg-6b/jfdctint.c283
-rw-r--r--code/jpeg-6b/jidctflt.c242
-rw-r--r--code/jpeg-6b/jidctfst.c368
-rw-r--r--code/jpeg-6b/jidctint.c389
-rw-r--r--code/jpeg-6b/jidctred.c398
-rw-r--r--code/jpeg-6b/jinclude.h116
-rw-r--r--code/jpeg-6b/jload.c145
-rw-r--r--code/jpeg-6b/jmemansi.c167
-rw-r--r--code/jpeg-6b/jmemdos.c638
-rw-r--r--code/jpeg-6b/jmemmgr.c1118
-rw-r--r--code/jpeg-6b/jmemname.c276
-rw-r--r--code/jpeg-6b/jmemnobs.c105
-rw-r--r--code/jpeg-6b/jmemsys.h198
-rw-r--r--code/jpeg-6b/jmorecfg.h364
-rw-r--r--code/jpeg-6b/jpegint.h392
-rw-r--r--code/jpeg-6b/jpeglib.h1096
-rw-r--r--code/jpeg-6b/jpegtran.c504
-rw-r--r--code/jpeg-6b/jquant1.c856
-rw-r--r--code/jpeg-6b/jquant2.c1310
-rw-r--r--code/jpeg-6b/jutils.c179
-rw-r--r--code/jpeg-6b/jversion.h14
-rw-r--r--code/libcurl/curl/curl.h1563
-rw-r--r--code/libcurl/curl/curlver.h56
-rw-r--r--code/libcurl/curl/easy.h81
-rw-r--r--code/libcurl/curl/mprintf.h62
-rw-r--r--code/libcurl/curl/multi.h344
-rw-r--r--code/libcurl/curl/stdcheaders.h34
-rw-r--r--code/libcurl/curl/types.h1
-rwxr-xr-xcode/libs/macosx/libSDL-1.2.0.dylibbin0 -> 4436304 bytes
-rw-r--r--code/libs/macosx/libSDLmain.abin0 -> 97816 bytes
-rwxr-xr-xcode/libs/win32/libSDL.dll.abin0 -> 123944 bytes
-rwxr-xr-xcode/libs/win32/libSDL.la41
-rw-r--r--code/libs/win32/libSDLmain.abin0 -> 208386 bytes
-rw-r--r--code/libs/win32/libcurl.abin0 -> 253484 bytes
-rw-r--r--code/libspeex/_kiss_fft_guts.h160
-rw-r--r--code/libspeex/arch.h239
-rw-r--r--code/libspeex/bits.c372
-rw-r--r--code/libspeex/buffer.c176
-rw-r--r--code/libspeex/cb_search.c612
-rw-r--r--code/libspeex/cb_search.h103
-rw-r--r--code/libspeex/cb_search_arm4.h137
-rw-r--r--code/libspeex/cb_search_bfin.h112
-rw-r--r--code/libspeex/cb_search_sse.h84
-rw-r--r--code/libspeex/config.h23
-rw-r--r--code/libspeex/echo_diagnostic.m72
-rw-r--r--code/libspeex/exc_10_16_table.c50
-rw-r--r--code/libspeex/exc_10_32_table.c66
-rw-r--r--code/libspeex/exc_20_32_table.c66
-rw-r--r--code/libspeex/exc_5_256_table.c290
-rw-r--r--code/libspeex/exc_5_64_table.c98
-rw-r--r--code/libspeex/exc_8_128_table.c162
-rw-r--r--code/libspeex/fftwrap.c288
-rw-r--r--code/libspeex/fftwrap.h58
-rw-r--r--code/libspeex/filterbank.c227
-rw-r--r--code/libspeex/filterbank.h66
-rw-r--r--code/libspeex/filters.c821
-rw-r--r--code/libspeex/filters.h90
-rw-r--r--code/libspeex/filters_arm4.h96
-rw-r--r--code/libspeex/filters_bfin.h515
-rw-r--r--code/libspeex/filters_sse.h336
-rw-r--r--code/libspeex/fixed_arm4.h148
-rw-r--r--code/libspeex/fixed_arm5e.h178
-rw-r--r--code/libspeex/fixed_bfin.h173
-rw-r--r--code/libspeex/fixed_debug.h487
-rw-r--r--code/libspeex/fixed_generic.h106
-rw-r--r--code/libspeex/gain_table.c160
-rw-r--r--code/libspeex/gain_table_lbr.c64
-rw-r--r--code/libspeex/hexc_10_32_table.c66
-rw-r--r--code/libspeex/hexc_table.c162
-rw-r--r--code/libspeex/high_lsp_tables.c163
-rw-r--r--code/libspeex/include/speex/speex.h424
-rw-r--r--code/libspeex/include/speex/speex_bits.h174
-rw-r--r--code/libspeex/include/speex/speex_buffer.h68
-rw-r--r--code/libspeex/include/speex/speex_callbacks.h134
-rw-r--r--code/libspeex/include/speex/speex_config_types.h18
-rw-r--r--code/libspeex/include/speex/speex_echo.h123
-rw-r--r--code/libspeex/include/speex/speex_header.h94
-rw-r--r--code/libspeex/include/speex/speex_jitter.h197
-rw-r--r--code/libspeex/include/speex/speex_preprocess.h190
-rw-r--r--code/libspeex/include/speex/speex_resampler.h340
-rw-r--r--code/libspeex/include/speex/speex_stereo.h91
-rw-r--r--code/libspeex/include/speex/speex_types.h126
-rw-r--r--code/libspeex/jitter.c840
-rw-r--r--code/libspeex/kiss_fft.c523
-rw-r--r--code/libspeex/kiss_fft.h108
-rw-r--r--code/libspeex/kiss_fftr.c297
-rw-r--r--code/libspeex/kiss_fftr.h51
-rw-r--r--code/libspeex/lpc.c201
-rw-r--r--code/libspeex/lpc.h53
-rw-r--r--code/libspeex/lpc_bfin.h131
-rw-r--r--code/libspeex/lsp.c656
-rw-r--r--code/libspeex/lsp.h64
-rw-r--r--code/libspeex/lsp_bfin.h89
-rw-r--r--code/libspeex/lsp_tables_nb.c360
-rw-r--r--code/libspeex/ltp.c839
-rw-r--r--code/libspeex/ltp.h141
-rw-r--r--code/libspeex/ltp_arm4.h187
-rw-r--r--code/libspeex/ltp_bfin.h419
-rw-r--r--code/libspeex/ltp_sse.h92
-rw-r--r--code/libspeex/math_approx.h332
-rw-r--r--code/libspeex/mdf.c1177
-rw-r--r--code/libspeex/misc_bfin.h54
-rw-r--r--code/libspeex/modes.c362
-rw-r--r--code/libspeex/modes.h161
-rw-r--r--code/libspeex/modes_wb.c300
-rw-r--r--code/libspeex/nb_celp.c1903
-rw-r--r--code/libspeex/nb_celp.h203
-rw-r--r--code/libspeex/os_support.h169
-rw-r--r--code/libspeex/preprocess.c1185
-rw-r--r--code/libspeex/pseudofloat.h379
-rw-r--r--code/libspeex/quant_lsp.c385
-rw-r--r--code/libspeex/quant_lsp.h74
-rw-r--r--code/libspeex/quant_lsp_bfin.h165
-rw-r--r--code/libspeex/resample.c1179
-rw-r--r--code/libspeex/sb_celp.c1488
-rw-r--r--code/libspeex/sb_celp.h155
-rw-r--r--code/libspeex/smallft.c1261
-rw-r--r--code/libspeex/smallft.h46
-rw-r--r--code/libspeex/speex.c250
-rw-r--r--code/libspeex/speex_callbacks.c144
-rw-r--r--code/libspeex/speex_header.c188
-rw-r--r--code/libspeex/stack_alloc.h115
-rw-r--r--code/libspeex/stereo.c296
-rw-r--r--code/libspeex/testdenoise.c44
-rw-r--r--code/libspeex/testecho.c53
-rw-r--r--code/libspeex/testenc.c146
-rw-r--r--code/libspeex/testenc_uwb.c137
-rw-r--r--code/libspeex/testenc_wb.c140
-rw-r--r--code/libspeex/vbr.c275
-rw-r--r--code/libspeex/vbr.h70
-rw-r--r--code/libspeex/vorbis_psy.h97
-rw-r--r--code/libspeex/vq.c147
-rw-r--r--code/libspeex/vq.h54
-rw-r--r--code/libspeex/vq_arm4.h115
-rw-r--r--code/libspeex/vq_bfin.h107
-rw-r--r--code/libspeex/vq_sse.h120
-rw-r--r--code/libspeex/window.c102
-rw-r--r--code/null/mac_net.c65
-rw-r--r--code/null/null_client.c94
-rw-r--r--code/null/null_glimp.c56
-rw-r--r--code/null/null_input.c37
-rw-r--r--code/null/null_main.c116
-rw-r--r--code/null/null_net.c64
-rw-r--r--code/null/null_snddma.c60
-rwxr-xr-xcode/pnd/GenerateQGL.pl147
-rwxr-xr-xcode/pnd/egl_glimp.c560
-rwxr-xr-xcode/pnd/egl_glimp.h72
-rwxr-xr-xcode/pnd/egl_input.c97
-rwxr-xr-xcode/pnd/egl_input.h24
-rwxr-xr-xcode/pnd/pnd_event.c435
-rwxr-xr-xcode/pnd/pnd_event.h12
-rwxr-xr-xcode/pnd/pnd_type.h306
-rw-r--r--code/pnd/qgl.h2187
-rw-r--r--code/q3_ui/ui_addbots.c412
-rw-r--r--code/q3_ui/ui_atoms.c1261
-rw-r--r--code/q3_ui/ui_cdkey.c291
-rw-r--r--code/q3_ui/ui_cinematics.c350
-rw-r--r--code/q3_ui/ui_confirm.c293
-rw-r--r--code/q3_ui/ui_connect.c266
-rw-r--r--code/q3_ui/ui_controls2.c1664
-rw-r--r--code/q3_ui/ui_credits.c181
-rw-r--r--code/q3_ui/ui_demo2.c291
-rw-r--r--code/q3_ui/ui_display.c265
-rw-r--r--code/q3_ui/ui_gameinfo.c815
-rw-r--r--code/q3_ui/ui_ingame.c349
-rw-r--r--code/q3_ui/ui_loadconfig.c274
-rw-r--r--code/q3_ui/ui_local.h802
-rw-r--r--code/q3_ui/ui_login.c208
-rw-r--r--code/q3_ui/ui_main.c249
-rw-r--r--code/q3_ui/ui_menu.c419
-rw-r--r--code/q3_ui/ui_mfield.c439
-rw-r--r--code/q3_ui/ui_mods.c247
-rw-r--r--code/q3_ui/ui_network.c281
-rw-r--r--code/q3_ui/ui_options.c229
-rw-r--r--code/q3_ui/ui_playermodel.c731
-rw-r--r--code/q3_ui/ui_players.c1249
-rw-r--r--code/q3_ui/ui_playersettings.c513
-rw-r--r--code/q3_ui/ui_preferences.c419
-rw-r--r--code/q3_ui/ui_qmenu.c1745
-rw-r--r--code/q3_ui/ui_rankings.c420
-rw-r--r--code/q3_ui/ui_rankstatus.c209
-rw-r--r--code/q3_ui/ui_removebots.c342
-rw-r--r--code/q3_ui/ui_saveconfig.c212
-rw-r--r--code/q3_ui/ui_serverinfo.c273
-rw-r--r--code/q3_ui/ui_servers2.c1643
-rw-r--r--code/q3_ui/ui_setup.c327
-rw-r--r--code/q3_ui/ui_signup.c286
-rw-r--r--code/q3_ui/ui_sound.c316
-rw-r--r--code/q3_ui/ui_sparena.c50
-rw-r--r--code/q3_ui/ui_specifyleague.c333
-rw-r--r--code/q3_ui/ui_specifyserver.c213
-rw-r--r--code/q3_ui/ui_splevel.c1013
-rw-r--r--code/q3_ui/ui_sppostgame.c644
-rw-r--r--code/q3_ui/ui_spreset.c194
-rw-r--r--code/q3_ui/ui_spskill.c329
-rw-r--r--code/q3_ui/ui_startserver.c1976
-rw-r--r--code/q3_ui/ui_team.c200
-rw-r--r--code/q3_ui/ui_teamorders.c447
-rw-r--r--code/q3_ui/ui_video.c1289
-rw-r--r--code/qcommon/cm_load.c842
-rw-r--r--code/qcommon/cm_local.h196
-rw-r--r--code/qcommon/cm_patch.c1777
-rw-r--r--code/qcommon/cm_patch.h103
-rw-r--r--code/qcommon/cm_polylib.c737
-rw-r--r--code/qcommon/cm_polylib.h68
-rw-r--r--code/qcommon/cm_public.h76
-rw-r--r--code/qcommon/cm_test.c521
-rw-r--r--code/qcommon/cm_trace.c1464
-rw-r--r--code/qcommon/cmd.c796
-rw-r--r--code/qcommon/common.c3453
-rw-r--r--code/qcommon/cvar.c1271
-rw-r--r--code/qcommon/files.c3556
-rw-r--r--code/qcommon/huffman.c447
-rw-r--r--code/qcommon/ioapi.c182
-rw-r--r--code/qcommon/ioapi.h75
-rw-r--r--code/qcommon/md4.c208
-rw-r--r--code/qcommon/md5.c310
-rw-r--r--code/qcommon/msg.c1786
-rw-r--r--code/qcommon/net_chan.c740
-rw-r--r--code/qcommon/net_ip.c1681
-rw-r--r--code/qcommon/puff.c758
-rw-r--r--code/qcommon/puff.h43
-rw-r--r--code/qcommon/q_math.c1009
-rw-r--r--code/qcommon/q_platform.h347
-rw-r--r--code/qcommon/q_shared.c1393
-rw-r--r--code/qcommon/q_shared.h1302
-rw-r--r--code/qcommon/qcommon.h1167
-rw-r--r--code/qcommon/qfiles.h581
-rw-r--r--code/qcommon/surfaceflags.h80
-rw-r--r--code/qcommon/unzip.c1621
-rw-r--r--code/qcommon/unzip.h355
-rw-r--r--code/qcommon/vm.c913
-rw-r--r--code/qcommon/vm_interpreted.c908
-rw-r--r--code/qcommon/vm_local.h190
-rw-r--r--code/qcommon/vm_none.c10
-rw-r--r--code/qcommon/vm_powerpc.c2170
-rw-r--r--code/qcommon/vm_powerpc_asm.c1009
-rw-r--r--code/qcommon/vm_powerpc_asm.h156
-rw-r--r--code/qcommon/vm_sparc.c1648
-rw-r--r--code/qcommon/vm_sparc.h78
-rw-r--r--code/qcommon/vm_x86.c1235
-rw-r--r--code/qcommon/vm_x86_64.c1047
-rw-r--r--code/qcommon/vm_x86_64_assembler.c1434
-rw-r--r--code/renderer/qgl.h403
-rw-r--r--code/renderer/tr_animation.c658
-rw-r--r--code/renderer/tr_backend.c1285
-rw-r--r--code/renderer/tr_bsp.c1871
-rw-r--r--code/renderer/tr_cmds.c566
-rw-r--r--code/renderer/tr_curve.c626
-rw-r--r--code/renderer/tr_flares.c538
-rw-r--r--code/renderer/tr_font.c549
-rw-r--r--code/renderer/tr_image.c1606
-rw-r--r--code/renderer/tr_image_bmp.c239
-rw-r--r--code/renderer/tr_image_jpg.c497
-rw-r--r--code/renderer/tr_image_pcx.c175
-rw-r--r--code/renderer/tr_image_png.c2488
-rw-r--r--code/renderer/tr_image_tga.c320
-rw-r--r--code/renderer/tr_init.c1258
-rw-r--r--code/renderer/tr_light.c394
-rw-r--r--code/renderer/tr_local.h1720
-rw-r--r--code/renderer/tr_main.c1404
-rw-r--r--code/renderer/tr_marks.c454
-rw-r--r--code/renderer/tr_mesh.c418
-rw-r--r--code/renderer/tr_model.c1148
-rw-r--r--code/renderer/tr_noise.c93
-rw-r--r--code/renderer/tr_public.h171
-rw-r--r--code/renderer/tr_scene.c418
-rw-r--r--code/renderer/tr_shade.c1548
-rw-r--r--code/renderer/tr_shade_calc.c1231
-rw-r--r--code/renderer/tr_shader.c3075
-rw-r--r--code/renderer/tr_shadows.c374
-rw-r--r--code/renderer/tr_sky.c873
-rw-r--r--code/renderer/tr_surface.c1290
-rw-r--r--code/renderer/tr_types.h212
-rw-r--r--code/renderer/tr_world.c668
-rw-r--r--code/sdl/sdl_gamma.c91
-rw-r--r--code/sdl/sdl_glimp.c1027
-rw-r--r--code/sdl/sdl_icon.h132
-rw-r--r--code/sdl/sdl_input.c1052
-rw-r--r--code/sdl/sdl_snd.c299
-rw-r--r--code/server/server.h461
-rw-r--r--code/server/sv_bot.c631
-rw-r--r--code/server/sv_ccmds.c1319
-rw-r--r--code/server/sv_client.c1914
-rw-r--r--code/server/sv_game.c965
-rw-r--r--code/server/sv_init.c771
-rw-r--r--code/server/sv_main.c1131
-rw-r--r--code/server/sv_net_chan.c209
-rw-r--r--code/server/sv_rankings.c1537
-rw-r--r--code/server/sv_snapshot.c699
-rw-r--r--code/server/sv_world.c691
-rw-r--r--code/sys/con_log.c129
-rw-r--r--code/sys/con_passive.c68
-rw-r--r--code/sys/con_tty.c476
-rw-r--r--code/sys/con_win32.c358
-rw-r--r--code/sys/sys_cocoa.m40
-rw-r--r--code/sys/sys_loadlib.h49
-rw-r--r--code/sys/sys_local.h56
-rw-r--r--code/sys/sys_main.c570
-rw-r--r--code/sys/sys_unix.c613
-rw-r--r--code/sys/sys_win32.c665
-rw-r--r--code/sys/win_resource.h44
-rw-r--r--code/sys/win_resource.rc76
-rw-r--r--code/tools/asm/README.Id10
-rw-r--r--code/tools/asm/cmdlib.c1140
-rw-r--r--code/tools/asm/cmdlib.h152
-rw-r--r--code/tools/asm/lib.txt31
-rw-r--r--code/tools/asm/mathlib.h94
-rw-r--r--code/tools/asm/notes.txt16
-rw-r--r--code/tools/asm/ops.txt132
-rw-r--r--code/tools/asm/opstrings.h175
-rw-r--r--code/tools/asm/q3asm.c1646
-rw-r--r--code/tools/lcc/COPYRIGHT61
-rw-r--r--code/tools/lcc/LOG91
-rw-r--r--code/tools/lcc/README21
-rw-r--r--code/tools/lcc/README.id3
-rw-r--r--code/tools/lcc/cpp/cpp.c327
-rw-r--r--code/tools/lcc/cpp/cpp.h166
-rw-r--r--code/tools/lcc/cpp/eval.c524
-rw-r--r--code/tools/lcc/cpp/getopt.c53
-rw-r--r--code/tools/lcc/cpp/hideset.c112
-rw-r--r--code/tools/lcc/cpp/include.c154
-rw-r--r--code/tools/lcc/cpp/lex.c580
-rw-r--r--code/tools/lcc/cpp/macro.c515
-rw-r--r--code/tools/lcc/cpp/nlist.c104
-rw-r--r--code/tools/lcc/cpp/tokens.c371
-rw-r--r--code/tools/lcc/cpp/unix.c128
-rw-r--r--code/tools/lcc/doc/4.html754
-rw-r--r--code/tools/lcc/doc/bprint.183
-rw-r--r--code/tools/lcc/doc/bprint.pdfbin0 -> 4963 bytes
-rw-r--r--code/tools/lcc/doc/install.html796
-rw-r--r--code/tools/lcc/doc/lcc.1605
-rw-r--r--code/tools/lcc/doc/lcc.pdfbin0 -> 16421 bytes
-rw-r--r--code/tools/lcc/etc/bytecode.c66
-rw-r--r--code/tools/lcc/etc/lcc.c853
-rw-r--r--code/tools/lcc/lburg/gram.c682
-rw-r--r--code/tools/lcc/lburg/gram.y202
-rw-r--r--code/tools/lcc/lburg/lburg.1179
-rw-r--r--code/tools/lcc/lburg/lburg.c671
-rw-r--r--code/tools/lcc/lburg/lburg.h65
-rw-r--r--code/tools/lcc/src/alloc.c94
-rw-r--r--code/tools/lcc/src/bind.c8
-rw-r--r--code/tools/lcc/src/bytecode.c367
-rw-r--r--code/tools/lcc/src/c.h729
-rw-r--r--code/tools/lcc/src/config.h102
-rw-r--r--code/tools/lcc/src/dag.c736
-rw-r--r--code/tools/lcc/src/dagcheck.md210
-rw-r--r--code/tools/lcc/src/decl.c1162
-rw-r--r--code/tools/lcc/src/enode.c545
-rw-r--r--code/tools/lcc/src/error.c137
-rw-r--r--code/tools/lcc/src/event.c28
-rw-r--r--code/tools/lcc/src/expr.c711
-rw-r--r--code/tools/lcc/src/gen.c830
-rw-r--r--code/tools/lcc/src/init.c318
-rw-r--r--code/tools/lcc/src/inits.c7
-rw-r--r--code/tools/lcc/src/input.c135
-rw-r--r--code/tools/lcc/src/lex.c923
-rw-r--r--code/tools/lcc/src/list.c56
-rw-r--r--code/tools/lcc/src/main.c225
-rw-r--r--code/tools/lcc/src/null.c74
-rw-r--r--code/tools/lcc/src/output.c135
-rw-r--r--code/tools/lcc/src/prof.c228
-rw-r--r--code/tools/lcc/src/profio.c276
-rw-r--r--code/tools/lcc/src/simp.c587
-rw-r--r--code/tools/lcc/src/stmt.c696
-rw-r--r--code/tools/lcc/src/string.c122
-rw-r--r--code/tools/lcc/src/sym.c314
-rw-r--r--code/tools/lcc/src/symbolic.c494
-rw-r--r--code/tools/lcc/src/token.h133
-rw-r--r--code/tools/lcc/src/trace.c181
-rw-r--r--code/tools/lcc/src/tree.c223
-rw-r--r--code/tools/lcc/src/types.c748
-rw-r--r--code/ui/ui_atoms.c519
-rw-r--r--code/ui/ui_gameinfo.c324
-rw-r--r--code/ui/ui_local.h1136
-rw-r--r--code/ui/ui_main.c5981
-rw-r--r--code/ui/ui_players.c1379
-rw-r--r--code/ui/ui_public.h191
-rw-r--r--code/ui/ui_shared.c5789
-rw-r--r--code/ui/ui_shared.h450
-rw-r--r--code/ui/ui_syscalls.asm101
-rw-r--r--code/ui/ui_syscalls.c401
-rw-r--r--code/zlib/adler32.c149
-rw-r--r--code/zlib/crc32.c423
-rw-r--r--code/zlib/crc32.h441
-rw-r--r--code/zlib/inffast.c318
-rw-r--r--code/zlib/inffast.h11
-rw-r--r--code/zlib/inffixed.h94
-rw-r--r--code/zlib/inflate.c1368
-rw-r--r--code/zlib/inflate.h115
-rw-r--r--code/zlib/inftrees.c329
-rw-r--r--code/zlib/inftrees.h55
-rw-r--r--code/zlib/zconf.h332
-rw-r--r--code/zlib/zlib.h1357
-rw-r--r--code/zlib/zutil.c318
-rw-r--r--code/zlib/zutil.h269
-rwxr-xr-xcross-make-mingw.sh6
-rw-r--r--id-readme.txt145
-rwxr-xr-xmake-macosx-ub.sh180
-rw-r--r--md4-readme.txt54
-rw-r--r--misc/ReadMe-OSX.rtf29
-rw-r--r--misc/ioquake3-folder.icnsbin0 -> 280366 bytes
-rw-r--r--misc/msvc/cgame.def3
-rw-r--r--misc/msvc/cgame.vcproj1514
-rw-r--r--misc/msvc/game.def3
-rw-r--r--misc/msvc/game.vcproj1893
-rwxr-xr-xmisc/msvc/ioq3.sln61
-rw-r--r--misc/msvc/q3_ui.def3
-rw-r--r--misc/msvc/q3_ui.vcproj2465
-rw-r--r--misc/msvc/quake3.vcproj3224
-rw-r--r--misc/msvc/ui.def3
-rw-r--r--misc/msvc/ui.vcproj1018
-rw-r--r--misc/nsis/Makefile15
-rw-r--r--misc/nsis/ioquake3-q3a.nsi248
-rw-r--r--misc/nsis/ioquake3-q3ctc.nsi140
-rw-r--r--misc/nsis/ioquake3.nsi.in186
-rw-r--r--misc/osxfe/ioquake3fe/Controller.h22
-rw-r--r--misc/osxfe/ioquake3fe/Controller.m97
-rw-r--r--misc/osxfe/ioquake3fe/English.lproj/ErrorWindow.xib473
-rw-r--r--misc/osxfe/ioquake3fe/English.lproj/InfoPlist.stringsbin0 -> 92 bytes
-rw-r--r--misc/osxfe/ioquake3fe/English.lproj/Localizable.stringsbin0 -> 470 bytes
-rw-r--r--misc/osxfe/ioquake3fe/English.lproj/MainMenu.xib3209
-rw-r--r--misc/osxfe/ioquake3fe/ErrorWindow.h10
-rw-r--r--misc/osxfe/ioquake3fe/ErrorWindow.m18
-rw-r--r--misc/osxfe/ioquake3fe/ErrorWindowController.h16
-rw-r--r--misc/osxfe/ioquake3fe/ErrorWindowController.m20
-rw-r--r--misc/osxfe/ioquake3fe/Info.plist28
-rwxr-xr-xmisc/osxfe/ioquake3fe/ioquake3.icnsbin0 -> 35224 bytes
-rw-r--r--misc/osxfe/ioquake3fe/ioquake3fe.xcodeproj/TemplateIcon.icnsbin0 -> 52318 bytes
-rw-r--r--misc/osxfe/ioquake3fe/ioquake3fe.xcodeproj/bw.mode1v31391
-rw-r--r--misc/osxfe/ioquake3fe/ioquake3fe.xcodeproj/bw.pbxuser204
-rw-r--r--misc/osxfe/ioquake3fe/ioquake3fe.xcodeproj/project.pbxproj310
-rw-r--r--misc/osxfe/ioquake3fe/ioquake3fe_Prefix.pch7
-rw-r--r--misc/osxfe/ioquake3fe/main.m14
-rw-r--r--misc/quake3-tango.pngbin0 -> 30792 bytes
-rw-r--r--misc/quake3-tango.xcfbin0 -> 229111 bytes
-rw-r--r--misc/quake3.icnsbin0 -> 35224 bytes
-rw-r--r--misc/quake3.icobin0 -> 25614 bytes
-rw-r--r--misc/quake3.pngbin0 -> 764 bytes
-rw-r--r--misc/quake3.svg67
-rwxr-xr-xmisc/setup/MacOSX/SLA-dmg.sh73
-rw-r--r--misc/setup/Makefile15
-rw-r--r--misc/setup/Solaris_pkg.sh180
-rwxr-xr-xmisc/setup/doit122
-rwxr-xr-xmisc/setup/install-desktop-files.sh14
-rw-r--r--misc/setup/ioq3demo.sh50
-rw-r--r--misc/setup/ioquake3.SlackBuild77
-rw-r--r--misc/setup/ioquake3.desktop9
-rw-r--r--misc/setup/ioquake3.sh50
-rw-r--r--misc/setup/pkg/ioq3ded.sh48
-rw-r--r--misc/setup/pkg/ioquake3.sh48
-rw-r--r--misc/setup/pkg/ioquake3/depend2
-rw-r--r--misc/setup/pkg/ioquake3/pkginfo.template12
-rw-r--r--misc/setup/pkg/ioquake3/postinstall21
-rw-r--r--misc/setup/pkg/ioquake3/postremove21
-rw-r--r--misc/setup/pkg/ioquake3/preinstall10
-rw-r--r--misc/setup/pkg/ioquake3/preremove10
-rw-r--r--misc/setup/pkg/ioquake3/prototype.template8
-rw-r--r--misc/setup/pkg/ioquake3/space1
-rw-r--r--misc/setup/pkg/ioquake3d/depend1
-rw-r--r--misc/setup/pkg/ioquake3d/pkginfo.template12
-rw-r--r--misc/setup/pkg/ioquake3d/postinstall10
-rw-r--r--misc/setup/pkg/ioquake3d/postremove10
-rw-r--r--misc/setup/pkg/ioquake3d/preinstall10
-rw-r--r--misc/setup/pkg/ioquake3d/preremove10
-rw-r--r--misc/setup/pkg/ioquake3d/prototype.template7
-rw-r--r--misc/setup/pkg/ioquake3d/space1
-rw-r--r--misc/setup/pkg/ioquake3m/depend1
-rw-r--r--misc/setup/pkg/ioquake3m/pkginfo.template12
-rw-r--r--misc/setup/pkg/ioquake3m/postinstall10
-rw-r--r--misc/setup/pkg/ioquake3m/postremove10
-rw-r--r--misc/setup/pkg/ioquake3m/preinstall10
-rw-r--r--misc/setup/pkg/ioquake3m/preremove10
-rw-r--r--misc/setup/pkg/ioquake3m/prototype.template7
-rw-r--r--misc/setup/pkg/ioquake3m/space1
-rwxr-xr-xmisc/setup/preuninstall.sh10
-rw-r--r--misc/setup/setup.xml.in134
-rw-r--r--misc/setup/setup.xml.mod33
-rw-r--r--misc/setup/slack-desc12
-rw-r--r--misc/setup/splash.xpm2289
-rw-r--r--ui/hud.txt7
-rw-r--r--ui/hud2.txt7
-rw-r--r--ui/ingame.txt16
-rw-r--r--ui/menudef.h308
-rw-r--r--ui/menus.txt39
-rw-r--r--voip-readme.txt199
765 files changed, 391413 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100755
index 0000000..d6ff91a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+*~
+*.o
diff --git a/.svnignore b/.svnignore
new file mode 100644
index 0000000..810b319
--- /dev/null
+++ b/.svnignore
@@ -0,0 +1,2 @@
+build
+Makefile.local
diff --git a/BUGS b/BUGS
new file mode 100644
index 0000000..081c55d
--- /dev/null
+++ b/BUGS
@@ -0,0 +1,4 @@
+- On Solaris/SPARC gcc optimizations higher than -O0 currently lead
+ to a segfault
+
+https://bugzilla.icculus.org/ for more.
diff --git a/COPYING.txt b/COPYING.txt
new file mode 100644
index 0000000..98443f3
--- /dev/null
+++ b/COPYING.txt
@@ -0,0 +1,281 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..d8f866b
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,3150 @@
+2008-04-04 Various contributors
+ + Solaris fixes
+ + Replace vsprintf function in bg_lib.c with vsnprintf implementation started by Patrick Powell
+ + Compile bg_* files separately for each game module, as originally intended
+ + Write q3config_server.cfg for the server, to avoid reseting client variables
+ after running a dedicated server
+ + Split image decoders into their own files
+ + OS X build updates for most compatibility
+ + Slackbuild
+ + Detect available resolutions and offer them in the in game menus
+ + A few botlib fixes
+ + Fix poppy captured audio when recording videos
+ + Extend console logging on crash errors
+ + Merge *BSD platform definitions in q_platform.h
+ + IRIX support
+ + Remove all the old bat/sh QVM building scripts
+ + Make master server used client configurable (cl_master)
+ + Fix to QVM compilation on big endian architectures
+ + OpenBSD support
+ + Autocomplete key names
+ + Don't build client command completion on the dedicated server
+ + Don't apply colour escape chars on input fields
+ + Rewrite of the win32 dedicated console
+ + Improved Makefile startup time
+ + Build dedicated server binary on Windows
+ + Bump Q3_VERSION to 1.35
+ + Replacement of platform specific backends with a generic SDL one
+ + Merge win_net.c and unix_net.c to net_ip.c
+ + Demote input related console information to developer only so that it doesn't
+ spam the console every time input settings are changed
+ + PNG texture support
+ + Cleanup of tabulation in R_LoadImage
+ + Fixes to console scrolling
+ + New x86_64 vm that doesn't use gas
+ + Early out AABB collision optimisation
+ + Generate QVM dependicies in a better way
+ + Build process is quieter
+ + Replace horrendously long list of Makefile build rules with set of inference rules
+ + Allow CC to be overridden externally to the Makefile
+ + Move storage of console history from a cvar to a file in order to alleviate
+ security concerns
+ + Fix bug where transparent surfaces wouldn't draw over skyboxes
+ + Add input sanitising to various sound playing functions called from mods
+ + Explicitly set OpenAL distance attenuation model
+ + Increased the number of registers used for the opStack in the PPC vm from
+ 12 to 16
+ + Fix endian issue in MDR loading
+ + Add cURL support for HTTP/FTP downloading
+ + Disable video command when not playing back a demo
+ + Print the SVN version string in Com_Init()
+ + OpenAL device enumeration support
+ + Fix 100% CPU usage on idle dedicated servers
+ + Windows home directory support
+ + Improve correctness of AVI files created by video command
+ + Better SDL joystick support
+ + sv_minRate
+ + [cl|sv]_packetdelay
+ + Various security fixes
+ + Fix JIT compiler code execution on NX-protected win32 OS
+ + Fix r_overBrightBits variable getting ignored on Linux
+ + cl_guid for semi-reliable server authentication
+ + Anisotropic texture filtering
+ + Video export doesn't crap out with sv_pure 1 anymore
+ + Video export doesn't crap out when writing > 2Gb files anymore
+ + Fix to a bug where servers with long uptimes (~27 days) would consume 100%
+ CPU if the running game did not set the nextmap cvar
+ + Some OSes no longer requires a vid_restart when changing r_fullscreen
+
+2006-01-24 Various contributors
+ + Persistent console history
+ + Added code to sleep a bit when q3 has no focus and sleep a lot when it's
+ minimised (SDL only)
+ + Cull excess speaker entities when using OpenAL
+ + Fix the operation of the delete key in *nix
+ + Only check the checksum on baseq3 pak0.pk3
+ + Overhaul of console autocompletion
+ - No longer does weird stuff like move the cursor inappropriately
+ - Autocomplete works with compound commands
+ - Special autocomplete on some commands e.g. \map, \demo
+ - Removed various hacks used to counter the original autocomplete code
+ + Fixed the ability to disable Ogg Vorbis
+ + s/i686/i586/ - see bug #2578
+ + Some sloppily coded mods call the Q3 sound API with NaNs -- sanitise this
+ + Removed advertising clause from BSD license as per mailing list discussion
+ + "make distclean" now does what you'd expect
+ + "make clean toolsclean" now does what "make distclean" did before
+ + GPL MD4 implementation
+
+2006-01-16 Various contributors
+ + Move code/unix/Makefile to ./Makefile
+ + x86 OS X support
+ + "quake3" shell script as shipped with 1.32 (on linux) no longer needed
+ + Ogg codec support from Joerg Dietrich
+ + Fix to the gcc4/-O0 x86 JIT compiler bug
+ + Up the defaults for zone and hunk memory since some mods (UT) have large
+ memory requirements that will have increased versus 1.32b due to some of the
+ alignment fixes
+ + Dependency generation for the .asm files
+ + Remove FS_SetRestrictions
+ + Add FS_CheckPak0 for better error messages where dumb users are involved
+ + Added cl_autoRecordDemo, which when enabled automatically records a new demo
+ on each map change
+ + Only display the g_synchronousClients warning when it's appropriate
+ + Remove custom memcpy/memset code
+ + AVI video output
+ - Uses motion jpeg codec by default
+ - Use cl_aviFrameRate to set a framerate
+ - \video [filename] to start capture
+ - \stopvideo to stop capture
+ - Audio capture is a bit ropey
+ + General Makefile improvements
+ + Support for MinGW cross compilation
+ + NetBSD support from optical
+ + x86_64 JIT bytecode compiler no longer disabled by default
+ + msvc project files updated and moved to win32/msvc
+ + Various alignment fixes
+ + Solaris (x86 and sparc) support from Vincent S. Cojot
+ + Fixed Altivec-based mesh rendering
+ + Ditch Mac OS 9 support
+ + Added a Makefile option USE_LOCAL_HEADERS which can be disabled to use system
+ headers if desired
+ + Detection of Altivec on Mac OS X
+ + SMP support with sdl_glimp.c on Mac OS X.
+ + Add "very high quality" option (patch from Pascal de Bruijn)
+ + Support for RIFF files with zero length data chunks (yes they exist, and yes,
+ they're legal)
+ + Support for ccache. If you want it, add USE_CCACHE=1 to Makefile.local
+ + Mac OS X now uses SDL backend, all Objective C removed
+ + Partial implementation of FS_Seek for files in pk3s
+ + Implementation of r_dlightBacks from Shane Isley
+ + OpenAL support, from BlackAura aka Stuart Dalton
+ + An abstract codec system, simplifying support for new formats
+ + Ignore in_dgamouse setting if dga isn't available
+ + Removed hard coded mouse acceleration in *nix input code
+ + Basically rewrote the lcc Makefile to be more sane
+ + Removed various bits of lcc that weren't built/needed
+ + General portability improvements
+ + Various variables added that aid packaging, from vapier
+ + Centralise architecture defines in q_platform.h
+ + Replaced a bunch of inline and __inline with ID_INLINE
+ + Replaced a bunch of __i386__ with id386
+ + General tidy up of asm preprocessor decisions
+ + Removed C_ONLY from the dedicated server build
+ + Removed rule to build C++ (for splines) from the Makefile
+ + General decrufting
+ + Split USE_SDL into USE_SDL_VIDEO and USE_SDL_AUDIO
+ + Various assorted bug fixes
+
+2005-10-29 Various contributors
+ + nasm syntax asm ported to gas
+ + Disabled-by-default MD4 support
+ + cons build system removed
+ + Better FreeBSD support
+ + Makefile generates dependencies
+ + Some SDL sound tweaks
+ + qvm build tools and qvms are now built with the rest of the binaries
+ + q3asm-turbo from Phaethon
+ + Moved various displaced c and h files into more appropriate places
+ + A shitload (can I say shit?) of bug fixes -- see the svn log for details
+
+2005-09-22 Tim Angus <tim@ngus.net>
+ + MinGW port
+
+2005-09-??
+ + SDL Stuff (icculus)
+ + x86_64 (ludwig von angstenheimer)
+ + patches from a cast of thousands
+
+2004-05-22 Timothee Besset <ttimo@idsoftware.com>
+ + updated the xcode project from Apple's version
+ now with the latest vm_ppc code
+
+2004-05-21 Timothee Besset <ttimo@idsoftware.com>
+ + fixed the Linux build to compile again on sid (glext.h and gcc3 warnings)
+ + 2 weeks ago, hacked up the source to compile on panther / xcode 1.1
+ several cleanups were needed, and VM support seems broke (hangs or crashes)
+ + got altivec optimisations from Apple (Kenneth Dyke)
+ merged back in
+ + looks like with the new code merge the VM support is back in and working
+
+2003-09-15 Timothee Besset <ttimo@idsoftware.com>
+ + import Q3 java master code, cleanups on monster
+
+2003-08-31 Timothee Besset <ttimo@idsoftware.com>
+ + loki_setup hell
+ https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=626
+ http://zerowing.idsoftware.com/linux/q3a/index.html#glibc
+ text mode installer in loki_setup image built on Mandrake 7.2 crashes on
+ some glibc 2.3 systems such as RH9 etc. need to move to a different
+ version of the installer, and update old installers to keep them still
+ 'installing' moving to build the setup binaries on Debian Woody systems
+ (glibc 2.2, text mode installer will no longer work on 2.1 systems) hacked
+ together a new setup, using setup tree from RTCW. would need a complete
+ revamp if a new full setup with new binaries is needed
+
+2003-07-17 Timothee Besset <ttimo@idsoftware.com>
+ + new cvsreport, testing per-module config
+
+2003-01-19 Timothee Besset <ttimo@idsoftware.com>
+ + building on both gcc 2.x and 3.x
+ added conf modules to check gcc version
+ ccache support
+
+2003-01-13 Timothee Besset <ttimo@idsoftware.com>
+ + tweaking around for gcc 3.x build
+ edit Conscript to change the compiler
+
+2002-12-16 Timothee Besset <ttimo@idsoftware.com>
+ + added pbEmit class to auth code, emit CD keys to local PB master
+
+2002-11-14 Timothee Besset <ttimo@idsoftware.com>
+ + up to latest makeself.sh
+ + add both quake3.x86 and quake3-smp.x86 to setup
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=573
+ console setup crash / glibc 2.3 (Debian Sid)
+ investigated, put together a workaround
+
+2002-11-5 Timothee Besset <ttimo@idsoftware.com>
+ + Linux building both smp and non-smp again. Will have to put both in setup
+ + added in_subframe to toggle X subframe event handling
+ + reworked the timing code to be more reliable
+ + cleaned up dgamouse/in_mouse code, removed unnecessary dgamouse var
+ + made the mouse grabbing an in_nograb cvar, no longer a compile time option
+ in_nograb 1 force in_dgamouse 0 and r_fullscreen 0 (any of those two will b0rk)
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=565
+ mouse issues on Suze 8.1 - related to subframe event timing
+ added code chunk to detect broken X timing and disable subframe
+ + tweaked the subframe/X bug workaround to be less paranoid
+
+2002-10-28 Timothee Besset <ttimo@idsoftware.com>
+ + no longer blocking demo recording if g_synchronous clients != 0
+ only sending out a warning (everyone does g_sync 1 ; record ; g_sync 0)
+
+2002-10-21 Timothee Besset <ttimo@idsoftware.com>
+ + building final mod sdk setups (added lcc bins, added link to q3asm-turbo in readme)
+
+2002-10-8 Timothee Besset <ttimo@idsoftware.com>
+ + quickfix cl_maxpackets > 125 brings back to 100
+
+1.32 release ---
+
+2002-10-7 Timothee Besset <ttimo@idsoftware.com>
+ + made the 'demo' command case-insensitive on extension match (it was confused by demo FOUR.DM_68)
+ + mouse wheel scrolling with in_mouse 1 + window mode was not working, fixed (DI didn't catch)
+ + removing on-the-fly pk3 build from Linux setup, using the finalized ones now
+ added 'pk3' option to cons for toggle of pk3 building
+
+2002-10-5 Timothee Besset <ttimo@idsoftware.com>
+ + updated win32 mod sdk (in win32/mod-sdk-setup)
+ added q3asm and lcc source
+ updated the .bat to build VMs
+
+2002-10-3 Timothee Besset <ttimo@idsoftware.com>
+ + linux mod sdk, wrote the bulk of the scripts
+
+2002-9-30 Timothee Besset <ttimo@idsoftware.com>
+ + ATVI Quake 3 1.32 Patch #9
+ rolling back to the way it was before, leaving 1v1 force vote exploit, the fix was worse than the bug
+ from comment on bug #9 in tracker:
+
+ actually the fix is worse than the original bug
+
+ after the fix, voting when you are alone on the server was no longer working
+ it was kinda intended in the fix, that you would have to be at least two to pass a vote .. but
+ it is an oversight.
+
+ calling a vote in a 1v1 game against a bot fails immediately
+ (calling a vote in any situation where there's only 1 live player fails)
+
+ Say a server's running some lame custom map that you have but a friend doesn't. You can't go
+ on the server and change it to the map you want to play, so he ends up having to auto-dl it at
+ 8K a second just so you can switch from it.
+
+ This particular 2 clients, vote / quit exploit would involve too many changes to fix properly.
+ I am reverting back to the old version, and leaving as WNF
+
+2002-9-29 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=50
+ added Wheel support to the DirectInput code IN_DIMouse (in_mouse 1)
+ tweaked the Wheel mouse reading for in_mouse -1 (old win32 input code)
+ handle correctly when zDelta is > 120
+ provide a in_logitechbug cvar to handle buggy Logitech MouseWare driver sending wheel events twice
+
+2002-9-26 Timothee Besset <ttimo@idsoftware.com>
+ + ATVI Quake 3 1.32 Patch #38
+ adding trap_SetPbClStatus, reliably checks for PB presence before enabling PB in UI
+
+2002-9-25 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=551
+ SVF_CLIENTMASK, fixed a typo
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=555
+ pushed cl_maxpackets upper limit to 125 (from 100) per CPMA Arqon's request
+
+2002-9-24 Timothee Besset <ttimo@idsoftware.com>
+ + ATVI Quake 3 1.32 Patch #33
+ PB reporting sv_paused cvar hacked, fixed SV_CheckPaused to use a Cvar_Set
+ + ATVI Quake 3 1.32 Patch #24
+ added [skipnotify] from RTCW, use to display in the console only, but not on client screen
+ (also fixes pb_msgprefix and pb_sv_msgprefix)
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=553
+ using correct error message if listen server starting as cl_punkbuster 0 sv_punkbuster 1
+ + ATVI Quake 3 1.32 Patch #35
+ text auto wrap in UI code was eating the last word if it was wrapping
+ fixed in Q3 and TA UI (this bug could have affected the server print message also)
+ + some updates to the win32 cons post-build process
+
+2002-9-21 Timothee Besset <ttimo@idsoftware.com>
+ + adding bspc cons build script
+
+2002-9-19 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=552
+ disconnect reason is transmitted in the disconnect command and processed into com_errorMessage
+ (similar to RTCW behaviour)
+ added UI for com_errorMessage cvar in baseq3/, if client is kicked/dropped/disconnected for whatever reason
+ (this is already functional in TA)
+ + ATVI Quake 3 1.32 Patch #9
+ failing vote if there's only one voting client (fixes exploit on 2-player server where one player votes then disconnects, forcing vote to pass)
+ + ATVI Quake 3 1.32 Patch #5
+ removed the userInfoChanged message (was a debugging leftover)
+ + ATVI Quake 3 1.32 Patch #18
+ rcon was not properly fixed yet, this only showed up for PB commands
+ changed the rcon parsing again to be more reliable
+
+2002-9-18 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=549
+ the demo command has a list of compatible protocols, it will loop through 66 67 68
+ you can do '/demo four' and it will try four.dm_66 four.dm_67 four.dm_68
+ or you can explicitely give a '/demo demoname.dm_??'
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=551
+ added SVF_CLIENTMASK (0x00000002), works only with <= 32 players
+ set bitmask of players to which send entity
+
+2002-9-17 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=550
+ rcon bug fix
+ + some scons updates for win32 (post build)
+ + 1.32rc2
+
+2002-9-06 Timothee Besset <ttimo@idsoftware.com>
+ + updated completely the setup system:
+ fixed cons stuff to build setup with cons -- release setup
+ working from new setup codebase with some custom patches:
+ https://bugzilla.icculus.org/show_bug.cgi?id=52
+ https://bugzilla.icculus.org/show_bug.cgi?id=53
+ checked that BSD support was still in (brandelfing and symlinks) .. will have to get tester feedback
+ bumped version to 1.32rc1
+ TODO: update the windows .VCT (standalone setup and auto-update)
+
+2002-9-04 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=543
+ backport from RTCW 1.4 code
+ rcon commands where sent after being tokenized and rebuilt
+ that was breaking any quoting, for instance 'rcon g_motd "hooka pooka"'
+ added Cmd_Cmd() to retrieve the un-tokenized command and transmit as is on both ends
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=542
+ b0rked text wrapping in connect screen
+ was a missing sizeScale in q3_ui/, and a bad param in ui/
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=540
+ backport fix to pk3 reordering, happens when clearing the references, bad order from connection may break stuff
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=527
+ TA ui/, quickfix to netSource (mod stuff, doesn't affect TA)
+ + cleaned up broken old DO_WIN32 stuff in cons scripts
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=526
+ typo in models2.shader
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=443
+ Linux client: sub-frame timing of key/mouse events
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=453
+ added mousewheel support: wheel to scroll, ctrl+wheel to scroll faster, shift+wheel to scroll history
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=545
+ bumped server count to 4096
+ + keep around: __asm__ __volatile__ ("int $0x03");
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=516
+ moved screenshots to backend with a new RC_SCREENSHOT render command
+ fixes the r_smp 1 garbled screenshots
+
+2002-8-29 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=539
+ new VM code from Raven's Sof2
+ + cons / qvmtools build system fixes
+ + had to get a new qe3.ico again (resource compiler error)
+ http://vasin.hypermart.net/eei.htm
+ + updated, basic testing on win32, merging back in trunk
+ + merged bug-539 branch back into trunk, officialize the new VM code
+
+2002-8-26 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=472
+ linux client: handle ctrl+space situations (could leave space locked on + space not working with ctrl on)
+ + update the build system, build q3lcc and q3asm etc. on demand
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=62
+ fixed invisible players/entities
+
+2002-8-23 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=536
+ fixing donedl being ignored after autodl if map_restart'ed (propagate from RTCW)
+ ignoring multiple map_restart (propagated from RTCW)
+ + reworked the server 'client text ignored' message to only trigger when there's actually a message that doesn't get to the game VM
+
+2002-8-18 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=528
+ ydnar: reorg bits in the drawsurf sort index, push MAX_SHADERS to 2^12
+ + commented out some debug stuff in java auth server
+ + added FAQ item with Linux & BSD patch to handle broadcast on multiple interfaces
+
+2002-8-15 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=534
+ fixing rcon being broken on NT/XP with > 23 days uptime (or so)
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=525
+ changed the rcon buffer size to avoid overflows and dropping part of the message
+
+2002-8-14 Timothee Besset <ttimo@idsoftware.com>
+ + hacked in some experimental win32 stuff to the cons files
+ (win32 recognition and pk3 installs .. very very experimental but I needed it for win32 dev)
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=521
+ ui/ and q3_ui/ : added text auto wrapping in the connection screen drawing (server message)
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=531
+ removed the MPlayer stuff from the server browsers
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=505
+ enabled back the ignore if protocol is != (fixes Wolf servers showing in browser)
+
+2002-8-10 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=500
+ propagated IP banning fix from RTCW
+
+2002-8-08 Timothee Besset <ttimo@idsoftware.com>
+ + propagate additional sv_lanForceRate fix from RTCW
+
+2002-8-07 Timothee Besset <ttimo@idsoftware.com>
+ + added trap_FS_Seek
+
+2002-8-05 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=50
+ fixed the DI mouse init procedure
+
+2002-8-05 Timothee Besset <ttimo@idsoftware.com>
+ + removed sv_allowanonymous, was dummy and polluting the serverinfo
+ (sv_allowanonymous was designed to flag wether server was public or not, but that's replaced by g_needpass)
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=514
+ sv_strictAuth (default 1): server variable to control wether strict CDKEY auth should be performed
+ this is required if you want reliable cl_guid on the server
+ extended the getIpAuthorize (server->auth message) syntax
+ sending the fs_game at all times (default 'baseq3'), dummy sv_allowAnonymous 0, strict auth flag
+ NOTE: 1.31 server on baseq3 sends a getIpAuthorize packet like:
+ processing packet: getIpAuthorize -1230824753 217.128.77.195 0
+ the auth server will mistakenly read fs_game as '0'
+ + TAGGED the master / auth source as pre-1_32
+ will need to go back to this to comment out all my debugging crap
+
+2002-8-04 Timothee Besset <ttimo@idsoftware.com>
+ + cleaned master server stuff, client was prompting master.quake3arena.com,
+ server was sending heartbeats to master3.idsoftware.com
+ both point to 192.246.40.56, unified to master.quake3arena.com
+ the MPlayer master, master.quake3world.com doesn't exist anymore, switched it to master.quake3arena.com
+
+2002-8-02 Timothee Besset <ttimo@idsoftware.com>
+ + added auth server source, reorganized
+ + auth server name / master key optionally set on command line for master and auth servers
+ + auth and master config in build system
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=524
+ changed default GL driver from libGL.so to libGL.so.1
+ see LSB 1.2 spec: http://www.linuxbase.org/spec/refspecs/LSB_1.2.0/gLSB/libgl.html
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=480
+ applying the 'no cp command' experimental fix for beta phase
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=462
+ backported from RTCW, fix to packet fragmenting emission
+ FIXME: there is some verbose code that we have to take out in the final version (grep for #462)
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=475
+ backported from RTCW, don't get dropped if the server changes map while connecting (ignore outdated cp)
+ + PROTOCOL BUMPED TO 68
+
+2002-8-01 Timothee Besset <ttimo@idsoftware.com>
+ + Linux: dedicated build was not setting up signal handler like the full client does
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=522
+ SplashDamage bugfix, now clearing client gentity before GAME_INIT call (instead of after)
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=498
+ fixed NET_AdrToString to print the port as unsigned int (for ports > 1^^15, was showing negative)
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=501
+ maintain IP in userinfo sent to game
+ + checking in master server source
+
+2002-7-31 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=513
+ https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=506
+ porting fix from RTCW codebase. client re-orders it's pk3s to scan in the same order than the server
+ this eliminates several 'Invalid .PK3 file referenced' situations (caused by client not referencing the same thing as server)
+ + fixed border remnants in ta ui
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=517
+ ERR_DROP if PB client off / server on conflict when starting local server
+ + quickfix to q3 ui / punkbuster detect in server browser
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=458
+ code fix, no more taunt spam
+ + cons install of PB .so files
+ + correct MOD_KAMIKAZE and MOD_JUICED in TA games.log
+
+2002-7-29 Timothee Besset <ttimo@idsoftware.com>
+ + q3 ui: completed confirmation prompts and messages (added UI_ConfirmMenu_Style & UI_Message)
+ + ta ui: backported 'conditionalopen' from RTCW (conditionalopen <cvar> <menu1> <menu2>)
+ + ta ui: confirmation prompt for punkbuster enable/disable etc.
+ + added the win32 DLLs to pb/win32/
+
+2002-7-28 Timothee Besset <ttimo@idsoftware.com>
+ + ta ui: sv_punkbuster in StartServer menu
+ + ta ui: added cl_punkbuster in server browser
+ + view filters are in a modal dialog
+ + new files: filter.menu menus.txt (pak3.pk3 updated)
+ + fix broken link in Linux FAQ
+
+2002-7-27 Timothee Besset <ttimo@idsoftware.com>
+ + ta ui: PB display in the browser, in it's additional tab, with sorting
+
+2002-7-26 Timothee Besset <ttimo@idsoftware.com>
+ + PB UI: for baseq3/ AND missionpack/
+ q3_ui: Punkbuster: Enable/Disable in server broswer (cl_punkbuster)
+ q3_ui: PB logo, PB Yes/No in browser (TODO: validate this to be working)
+ q3_ui: added sv_punkbuster toggle in start server menu
+ + automated building of the new PK3s, unix/Conscript-pk3
+
+2002-7-25 Timothee Besset <ttimo@idsoftware.com>
+ + added PB build scripts on Linux, fixed the Linux build
+
+2002-7-12 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=511
+ fixing re.SetColor crash for widescreen displays (q3dm11)
+ was calling to the renderer while not registered
+
+2002-6-19 Timothee Besset <ttimo@idsoftware.com>
+ + r_roundImagesDown 0 + map q3dm16 -> tr_image.c ResampleTexture crash
+ buffer overflow because of resample to 2048x..
+ xian_q3dm12_leftwall4fin.jpg 1152x384
+ bumped one buffer byte p1[1024] -> byte p1[2048], added a safe check
+
+2002-6-14 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=493
+ propagate a renderer fix from RTCW. fixes a one-frame visual glitch when mod code
+ registers a shader after drawsurfaces are generated but before the frame is rendered
+
+2002-6-12 Timothee Besset <ttimo@idsoftware.com>
+ + added cons and pcons to unix/, updated the build script
+
+2002-5-24 Timothee Besset <ttimo@idsoftware.com>
+ towards a new Q3 release?
+ some bug fixes require protocol change, or mod code/mod interface change to be fixed properly
+ this is a biz decision, dunno yet if we are going to want a new protocol (probably not)
+ -> have to create a branch for the 1.31b, i.e. backwards compatible with 1.31 'Stable-1_31'
+ and put the 1.32 specific / protocol changes on trunk
+ no telling what will go in SOS in the end .. probably 1.32
+
+2002-5-5 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=491
+ adding a sv_lanForceRate (defaults to 1) to turn on/off server forcing rate of LAN clients
+ (only affects LAN dedicated clients - dedicated 1, default behaviour forces LAN clients to 99999 rate)
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=470
+ fixing potential overflows with cl_cdkey (propagated from RTCW)
+ + cons-based build system (imported from Wolf, was partly written for mod tools release already)
+ building with SMP on by default
+ + better #ifdef SMP handling ('disabled at compile time' message)
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=494
+ Q_vsnprintf for vsprintf calls in the core
+ not putting this in game code as we'd need a vsnprintf implementation in bg_lib.c
+
+2002-4-5 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=462
+ taking out the fix which was found broken and incomplete
+
+2002-8-4 Timothee Besset <ttimo@idsoftware.com>
+ + adding NO_MOUSEGRAB define (select in the Makefile)
+
+2002-2-4 Timothee Besset <ttimo@idsoftware.com>
+ + applying Gareth's SMP patch
+ + count number of CPUs (Sys_ProcessorCount in unix_shared.c), default r_smp appropriately
+ + bumping version to 1.32
+ + if XInitThreads fails, set r_smp to zero
+
+2002-28-2 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=462
+ send potential remaining fragmented packets before sending a gamestate
+
+2002-26-2 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=455
+ removed old libMesaVoodooGL.so loading code
+ Voodoo cards should use XF4/DRI, that load code was outdated and confusing people with broken OpenGL
+
+2002-16-1 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=441
+ adding brandelf calls to the setup building process so that our binaries run on BSD
+
+2002-1-1 Timothee Besset <ttimo@idsoftware.com>
+ + updated FAQ with BSD info (bug #441)
+ + FAQ update on CLIENT_UNKNOWN_TO_AUTH
+ + FAQ update for proper strace usage
+
+2001-12-12 Timothee Besset <ttimo@idsoftware.com>
+ + Q3 1.31 point release
+ updating build_setup.sh to new pk3 files
+ (baseq3/pak7.pk3 missionpack/pak2.pk3)
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=395
+ adding quake3.xpm icon, and modified the setup accordingly to put symlinks
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=390
+ ignoring SIGTTIN SIGTTOU
+
+2001-06-12 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=402
+ bug with full scene
+
+2001-04-12 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=398
+ cg_bobup cheat protect
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=399
+ fixed Setup > System > Driver info crash
+ + checked in code/spank.sh script, perform checksuming
+
+2001-18-09 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=371
+ propagating sound code fixes from Wolf to Q3
+
+2001-11-08 Timothee Besset <ttimo@idsoftware.com>
+ + setup script was still broken, damn shell expansion
+ the exit code for Q3 was always zero instead of $?
+ propagating the fix to Wolf
+
+2001-11-04 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=382
+ modified challenge code for motd to be truly random
+
+2001-10-31 Timothee Besset <ttimo@idsoftware.com>
+ Moved updated q3asm and lcc source at the toplevel, MissionPack/q3asm
+ and MissionPack/lcc
+
+2001-10-29 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=381
+ build system is now functional
+
+2001-10-21 Timothee Besset <ttimo@idsoftware.com>
+ + updated Sys_LoadDll code on linux to search in the following order:
+ #1 current directory
+ #2 fs_homepath
+ #3 fs_basepath
+ this was needed to make mod developement easier
+
+2001-10-09 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=51
+ the code to buffer the redirection was in there but disabled? (Com_Printf)
+ enabled it back
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=52
+ connection issues / userinfo
+ client side fix, instead of sending 'connect <userinfo>' packet
+ we now send 'connect "<userinfo>"'
+
+2001-10-08 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=371
+ added a PROT_READ to the mmap call
+ this was needed to go around a bug in glibc i586 i686, memset doing read access
+ since the audio_fd is opened O_RDWD this is harmless to Q3
+
+2001-10-07 Timothee Besset <ttimo@idsoftware.com>
+ + updating from SOS
+ S_WriteLinearBlastStereo16 C/asm is back in snd_mix.c (Graeme)
+ r_showtris r_shownormal cheat protections
+ + Sys_LoadDll changes:
+ removing -debug search when loading native dlls
+ changing the fatal aborts when not finding native from release only to debug only (was a misfeature)
+ used to search in cd_path which is bogus, now searching in pwd if basepath fails
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=275
+ fixed r_fullbright not being cheat protected / was a CVAR_LATCHED|CVAR_CHEAT issue
+
+2001-09-06 Timothee Besset <ttimo@idsoftware.com>
+ + updated from SOS, some changes to qcommon/unzip.c (statics)
+
+2001-08-27 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=3
+ Added some code in CL_InitDownloads to use FS_ComparePaks and print out information about server-referenced paks that are missing on the client. It is a first step, allows to get precise information about what can cause a connection to fail (typically when the user is sent back to the main screen).
+
+2001-08-22 Timothee Besset <ttimo@idsoftware.com>
+ + https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=86
+ fixed sound bug (with Graeme hints)
+
+2001-08-20 Timothee Besset <ttimo@idsoftware.com>
+ + made sure Sys_Printf doesn't get into an endless loop if logfile is on
+ fixed qconsole.log issues, +set logfile 1 +set fs_debug 1 was crashing (any OS)
+ fixed logfile 1 / ttycon 1 issue, didn't exit properly (same endless looping)
+ also fixes an issue reported by q3f team
+ + changed rcon commands from Com_DPrintf to Com_Printf so that they show up in the console
+ (with IP information)
+
+2001-08-19 Timothee Besset <ttimo@idsoftware.com>
+ + fixed https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=91
+ (autodownload toggle in q3 ui)
+ + fixed https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=76
+ g_password issue
+ + fixed https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=93
+ cheat protecting r_lodCurveError
+ + wontfix https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=92
+
+2001-08-18 Timothee Besset <ttimo@idsoftware.com>
+ + more fixes to the 7-button mouse code (linux only)
+ + updated faq about gamma slider
+ + added "servers don't show up in ingame browser" to faq
+ + added Alt+Enter toggle for fullscreen/windowed (linux)
+
+2001-08-16 Timothee Besset <ttimo@idsoftware.com>
+ reconfiguring CVS repository to give access to Gareth
+ + testin gareth's access
+
+2001-08-03 Timothee Besset <ttimo@idsoftware.com>
+ * https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=85
+ fixes in the setup code for older bash versions
+
+2001-08-02 Timothee Besset <ttimo@idsoftware.com>
+ * commented out assembly implementation of S_WriteLinearBlastStereo16, using modified C implementation from Zaphod
+ need to check performance: https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=88
+ * finished const declarations in CG_Trace calls, was needed in pmove_t declaration and some other functions
+ cgame/cg_local.h : CG_trace trap_CM_BoxTrace
+ game/bg_public.h : using const in pmove_t trace functions prototypes
+ (fixes gcc warnings: assignment from incompatible pointer type)
+
+2001-07-26 Timothee Besset <ttimo@idsoftware.com>
+ * https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=78
+ mapped K_MOUSE4 K_MOUSE5
+
+2001-07-23 Timothee Besset <ttimo@idsoftware.com>
+ * https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=5
+ more fixes, handling meta characters and various kinds of backspace
+
+2001-07-22 Timothee Besset <ttimo@idsoftware.com>
+ * https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=5
+ after testing feedback, fixed more stuff:
+ better backspace, works with putty and potentially more terminals
+ * https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=51
+ band aid fix to rcon status, incresed MAX_PUSHED_EVENTS from 256 to 1024
+ (adds 28kb of mem requirements)
+
+2001-07-21 Timothee Besset <ttimo@idsoftware.com>
+ * https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=2
+ using XF86 Gamma extension to set the gamma in game from the menus
+ (previous behaviour was to set /r_gamma and restart, renderer relying on s_gammatable)
+ restoring initial gamma on GLimp_ShutDown
+
+2001-07-19 Timothee Besset <ttimo@idsoftware.com>
+ * https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=5
+ first usable version of dedicated console
+ added history and completion functionality
+ ready for some testing
+ still some TODOs and FIXMEs:
+ keep the currently edited line when going back from history exploration
+ edit the current line with cursor, insert mode etc.
+
+2001-07-18 Timothee Besset <ttimo@idsoftware.com>
+ * starting TAB completion and history for the dedicated server (tty console)
+ removed Sys_ConsoleOutput (unused)
+ removing bogus nostdout variable
+ cleanup of a big chunk of code that Bernd commented out and scheduled for deletion
+ moved completion code from client/cl_keys.c stuff into qcommon/common.c, Field_CompleteCommand(field_t*)
+
+2001-07-13 Timothee Besset <ttimo@idsoftware.com>
+ * fixed https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=8
+ screenshots overwrites
+ * fixed https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=31
+ DOUBLE SIGNAL FAULT
+
+2001-07-11 Timothee Besset <ttimo@idsoftware.com>
+ * fix for french keybards / console toggle / bound to XK_twosuperior
+
+2001-07-10 Timothee Besset <ttimo@idsoftware.com>
+ * https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=19
+ cleanup of the keyboard code, adding com_developer message in case XLookupString would fail
+
+2001-07-10 Timothee Besset <ttimo@idsoftware.com>
+ * https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=33
+ using our custom handlers for X errors, should make things more robust
+ (X docs say some X errors are not fatal, but the default X handler exits the app anyway)
+
+2001-07-08 Timothee Besset <ttimo@idsoftware.com>
+ * https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=19
+ keyboard state issues, fixed the sticking with ctrl key (thks relnev)
+
+2001-07-07 Timothee Besset <ttimo@idsoftware.com>
+ * closing https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=13
+ the fixes to bug #9 solved this one too
+ * checking in to SOS
+
+2001-07-05 Timothee Besset <ttimo@idsoftware.com>
+ * work on https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=9
+ filesystem code changes:
+ updated the documentation in files.c to the current system
+ added correct fs_homepath fs_basepath fs_cdpath scanning to FS_SV_FOpenFileRead
+ (fixes description.txt not found, and probably a few other linux issues)
+
+2001-06-29 Timothee Besset <ttimo@idsoftware.com>
+ * fixed setup issues (graphical/console)
+ https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=6
+
+2001-06-26 Timothee Besset <ttimo@idsoftware.com>
+ * bug tracker is online at https://zerowing.idsoftware.com/bugzilla
+ authentication, use login: bugs password: b00gies
+ for now, using it as the linux bug tracker, possible use for more OSes and programs if anyone is interested.
+ * tweaked the graphical setup to send to bugs@idsoftware.com on errors instead of support@lokigames.com
+
+2001-06-19 Timothee Besset <ttimo@idsoftware.com>
+ * fixed generated launch script /usr/local/bin/quake3, exit $* should be exit
+
+2001-06-18 Timothee Besset <ttimo@idsoftware.com>
+ * rebuilt 1.29f setups, released as 1.29f-beta1 'Q3 1.29f linux-i386 Jun 19 2001'
+
+2001-06-10 Timothee Besset <ttimo@idsoftware.com>
+ * rebuilt against PR source, packaged 1.29b setups
+
+2001-05-25 Timothee Besset <ttimo@idsoftware.com>
+ * graphical setup, based on Loki's setup tool (GPL)
+
+2001-05-22 Timothee Besset <ttimo@idsoftware.com>
+ * changed fs_basepath to fs_homepath, according to Graeme's changes (probably missed this change?)
+ this fixes the q3key prompting at each game startup
+
+2001-05-20 Timothee Besset <ttimo@idsoftware.com>
+ * rebuilding 1.28b, various fixes on linux build:
+ - SetProgramPath was renamed to Sys_SetDefaultCDPath in unix_shared.c
+ updated unix_main.c accordingly
+ - some prototypes in qgl.h are guarded by #ifndef GL_VERSION_1_2 (ARB extentions)
+ those prototypes are needed by linux_glimp for importing functions and casting, added a #ifdef __linux__
+ (not a clean solution)
+ - game/q_shared.h
+ little endian / big endian functions have been added
+ gcc generates warnings about functions being unused .. inlined them
+ - cgame/cg_marks.c
+ // TTimo
+ // gcc warning: might be used uninitialized
+ float sInc = 0.0;
+ float s = 0.0;
+
+2001-05-15 Timothee Besset <ttimo@idsoftware.com>
+ * fixes to linux Makefile for bspc 2.1h
+ * various updates to 1.28b on linux
+
+2001-05-09 Timothee Besset <ttimo@idsoftware.com>
+
+ * R. Duffy reverted game/bg_pmove.c PM_CheckDuck, was a merging screup on my side
+ * updated setup to 1.27z, removed the .so from the setup distribution (they were in 1.27g because of issues)
+ FIXME: gotta get pk3's first
+
+2001-05-04 Timothee Besset <ttimo@idsoftware.com>
+
+ * fixes to gcc, building RC for 1.27s
+
+2001-05-01 Timothee Besset <ttimo@idsoftware.com>
+
+ * added qcommon/huffman.c to the Makefile
+ * gcc -Wall:
+ commenting out
+ CL_Netchan_Encode CL_Netchan_Decode (cl_net_chan.c)
+ Netchan_ScramblePacket Netchan_UnScramblePacket (net_chan.c)
+ SV_Netchan_Encode SV_Netchan_Decode (sv_net_chan.c)
+
+2001-04-26 Timothee Besset <ttimo@idsoftware.com>
+
+ * fixed dedicated server crash when entering the VM_COMPILED qagame on a mod (some statics lacked initialization)
+
+2001-04-25 Timothee Besset <ttimo@idsoftware.com>
+
+ * added $(Q3POBJ) to clean target (cleanup of platform-dependent objects)
+ * more make clean improvements
+
+2001-04-23 Timothee Besset <ttimo@idsoftware.com>
+
+ * cleanup the mod selection code, remove duplicates
+ * some issues with release builds, my main developement box doesn't build stable binaries with release settings
+ removing -fomit-frame-pointer seems to fix (there's probably a performance hit)
+ see OMIT-FRAME-POINTER.txt
+
+2001-04-13 Timothee Besset <ttimo@idsoftware.com>
+
+ * checked in a first set of merged files
+
+2001-04-06 Timothee Besset <ttimo@idsoftware.com>
+
+ * merged back the core linux parts to make 1.27g linux build from the Source Safe tree again
+
+2001-02-27 Bernd Kreimeier <bk@lokigames.com>
+
+ * CVS: tag with changes as of today
+ cvs tag id1-27j-loki01027
+
+ * code/qcommon/msg.c: numFields loop (SOS).
+ * code/qcommon/files.c: ue Q_stricmp (SOS uses stricmp, was strcmp).
+ * code/game/q_shared.h (Q3_VERSION): 1.27j. Also
+ MAX_STRING_TOKENS upped from 256 to 1024 (SOS).
+
+ * code/server/sv_snapshot.c (SV_AddEntitiesVisibleFromPoint): see below.
+ * code/game/g_public.h (SVF_NOTSINGLECLIENT): added (SOS).
+
+ * code/server/sv_ccmds.c: see below.
+ * code/game/g_main.c: g_gametype cvar now userinfo (SOS).
+
+ * code/game/g_active.c (SendPendingPredictableEvents): new (SOS).
+ * code/game/bg_misc.c: new SOS (sos010227)
+
+ * SOS: new update sos010227.
+
+2001-02-22 Bernd Kreimeier <bk@lokigames.com>
+
+ * CVS: now in sync with last SOS and cleanup up
+ cvs tag id1-27i-loki01022
+
+ * code/ui/ui_shared.c: below.
+ * code/ui/ui_main.c: leftover code!
+ * code/server/sv_world.c: below.
+ * code/server/sv_snapshot.c: below.
+ * code/server/sv_init.c: below.
+ * code/server/sv_game.c: below.
+ * code/server/sv_client.c: below.
+ * code/server/sv_ccmds.c: below.
+ * code/server/sv_bot.c: below.
+ * code/server/server.h: below.
+ * code/renderer/tr_surface.c: below.
+ * code/renderer/tr_shader.c: changed assert to early return.
+ * code/renderer/tr_shade_calc.c: below.
+ * code/renderer/tr_shade.c: below.
+ * code/renderer/tr_scene.c: below.
+ * code/renderer/tr_mesh.c: below.
+ * code/renderer/tr_local.h: below.
+ * code/qcommon/vm_x86.c: cleanup.
+ * code/qcommon/vm.c: below.
+ * code/qcommon/unzip.c: below.
+ * code/qcommon/qcommon.h: below.
+ * code/qcommon/files.c: below.
+ * code/qcommon/cvar.c: cleanup.
+
+2001-02-21 Bernd Kreimeier <bk@lokigames.com>
+
+ * code/qcommon/common.c: cleanup.
+ * code/qcommon/cm_trace.c: cleanup.
+ * code/qcommon/cm_patch.c: cleanup.
+ * code/qcommon/cm_public.h: cleanup.
+ * code/game/q_shared.h: cleanup.
+ * code/game/q_shared.c: cleanup.
+ * code/game/q_math.c: cleanup.
+ * code/game/g_syscalls.asm: changed (once more) floor,ceil etc.
+ * code/game/g_spawn.c: cleanup.
+ * code/game/g_session.c: cleanup.
+ * code/game/g_cmds.c: cleanup.
+ * code/game/g_client.c: cleanup.
+ * code/game/g_arenas.c: cleanup.
+ * code/game/bg_slidemove.c: cleanup.
+ * code/game/bg_pmove.c (PM_CheckDuck): old call to trace?
+ * code/game/bg_misc.c: cleanup.
+ * code/game/be_aas.h: dead code.
+ * code/game/ai_dmq3.c: cleanup. One clear/copy switched?
+ * code/game/ai_dmnet.c: more //*/. Why oh why not DEBUG....
+
+ * code/client/snd_mix.c: below.
+ * code/client/snd_dma.c: below.
+ * code/client/keys.h: cleanup.
+ TODO: #error in q3_ui/keycodes.h ?
+
+ * code/client/client.h: cleanup.
+ * code/client/cl_main.c: misplaced bracket. Cleanup.
+ * code/client/cl_keys.c: below.
+ * code/client/cl_cin.c: below.
+ * code/client/cl_cgame.c: cleanup.
+ TODO: define assert for Win32 or guard my assertions.
+
+ * code/cgame/cg_syscalls.c: below.
+ * code/cgame/cg_servercmds.c: below.
+ * code/cgame/cg_players.c: cleanup.
+
+ * code/cgame/cg_newdraw.c: remember to diff against cg_newDraw.c
+ in SOS (mixed case).
+ TODO: get id to use cg_newdraw.c, and to remove cg_newDraw.c/cpp.
+
+ * code/cgame/cg_main.c: below.
+ * code/cgame/cg_local.h: below.
+ * code/cgame/cg_event.c: below.
+ * code/cgame/cg_drawtools.c: below.
+ * code/cgame/cg_draw.c: cleanup.
+ * code/cgame/cg_consolecmds.c: dead code.
+ * code/bspc/qbsp.h: below.
+ * code/bspc/l_poly.c: below.
+ * code/bspc/l_math.c: cleanup.
+ * code/bspc/bspc.c: cleanup.
+ * code/bspc/be_aas_bspc.c: cleanup.
+ * code/bspc/aas_map.c: kept comments - merge loss at their end?
+ * code/bspc/aas_file.c: cleanup.
+
+ * code/botlib/be_interface.c: this file is plain impossible. There
+ are layers of code made dead with /* */ and the resurrected by
+ //* or // /* or variations of this. I reverted to exact mirror
+ image of SOS to be sure - short of removing it's too easy to mistake
+ live code for dead one.
+ Later: have to change 5 occurences to avoid gcc complaints about
+ nested comment tokens.
+ TODO: somebody please get rid of the cruft in here.
+
+ * code/botlib/be_ai_move.c: redundant typedef.
+ * code/botlib/be_ai_chat.c: assertions on signed string index.
+ Note: this is not in my ChangeLog - ouch.
+ TODO: use gcc -fsigned-char on all platsforms to enforce Win32
+ TODO behavior (PPC has a default unsigned char, Intel has not).
+ * code/botlib/be_aas_sample.c (AAS_TraceClientBBox): one code block
+ was placed in different location, and one FPE hack not used. I would
+ expect that divide by zero will still occur here.
+
+ * code/botlib/be_aas_reach.c: below.
+ * code/botlib/be_aas_cluster.c: cleanup.
+ * CVS: the last tag (below) marks the version with a lot of history
+ and additional comments. I am now bringing the codebase in sync with
+ SOS as of yesterday, cleaning out comments, dead code and other
+ differences to minimize a diff - in a valiant if futile attempt to
+ roll back changes into the id codebase.
+ Note: I ignore the $SOS$ - these are unfortunate but will change
+ in the same awkward way at their end.
+ Note: I stick to #if 0 instead of C comments around dead code id
+ kept (nested comments issue). The commentary is changed to sosYYMMDD
+ and includes the token DEAD.
+
+2001-02-20 Bernd Kreimeier <bk@lokigames.com>
+
+ * CVS: update, then tag current version as
+ cvs tag id1-27i-loki010219
+
+ * SOS: patched up to sos010219.
+
+ * code/qcommon/cm_trace.c (CM_Trace): fabs on sphere offsets (SOS).
+ * code/game/bg_slidemove.c (PM_StepSlideMove): stepSize vs. STEPSIZE (SOS).
+ * code/game/bg_pmove.c (PM_CheckDuck): fix in stand up check (SOS).
+ * code/bspc/bspc.c (main): -capsule (SOS).
+ * code/bspc/qbsp.h: below (SOS).
+ * code/bspc/be_aas_bspc.c (capsule_collision): added (SOS).
+ * code/bspc/aas_map.c (CapsuleOriginDistanceFromPlane): added and used (SOS).
+ * code/bspc/aas_file.c (AAS_WriteAASFile): removed diagnostics recently
+ added. No matter how long you wait, they'll always get you ;-).
+ * code/botlib/be_aas_cluster.c: enabled LogWrites, different flood (SOS).
+
+ * SOS: patching up to snapshot sos010219.
+ Note: For brevity, I use as marker sosYYMMDD now instead of bkYYMMDD, to
+ distinguish from changes not in SOS.
+
+ * CVS: tagged current version before patching up with SOS.
+ cvs tag id1-27i-loki010216-bsd
+
+2001-02-16 Bernd Kreimeier <bk@lokigames.com>
+
+ * code/server/sv_init.c: DLL_ONLY sets sv_pure to 0 and ROM.
+ TODO: determine good sv_pure policy for DLL-only servers.
+
+ * code/renderer/tr_shade_calc.c: my_ftol implementation (BSD).
+
+ * code/unix/Makefile: FreeBSD sections.
+ TODO: include target-specific Make-freebsd etc.,
+ include a Make-local not in CVS for build preferences,
+ and generally clean up this mess.
+ * code/unix/unix_glw.h: guard #error
+ * code/unix/linux_snd.c: soundcard.h location (BSD).
+ * code/unix/linux_glimp.c: guard system headers.
+ Later: added Joystick stubs.
+ Note: linux_ etc. prefixes start to loose meaning as we
+ re-use most of this on UNIXes anyway. I didn't use Raf's
+ freebsd_joystick.c but instead put generic stubs here.
+ TODO: introduce generic -DNO_JOYSTICK flag.
+ * code/renderer/tr_local.h: my_ftol guard.
+ * code/renderer/qgl.h: FreeBSD guards.
+ * code/qcommon/vm_x86.c: sys/types include on FreeBSD.
+ * code/qcommon/md4.c: Win32 pragma guard.
+ * code/qcommon/common.c: Com_Memcpy/Memset external.
+ * code/game/q_shared.h: added FreeBSD defines.
+ * code/game/q_math.c (BoxOnPlaneSide): FreeBSD conditional.
+ TODO: check whether we have/need the assembly version anyway.
+ * code/client/snd_mix.c: use C fallback on FreeBSD.
+ Note: all of the above changes from the original port by Rafael Barrero.
+
+ * CVS: tagged current version before merging FreeBSD related changes.
+ cvs tag id1-27i-loki010215-ppc
+
+2001-02-15 Bernd Kreimeier <bk@lokigames.com>
+
+ * code/unix/Makefile: BSD related changes.
+ * code/cgame/cg_draw.c: hacked phone jack rendering check for Debug.
+ TODO: finish Debug, fix CG_DrawDisconnect !!!
+
+ * code/unix/vm_x86.c: error on compile attempts. Fight redundancy!
+ * code/qcommon/vm_x86.c (VM_CallCompiled): dummy for linkage on PPC.
+ Note: DLL_ONLY is the global Makefile option for DLL-only builts.
+ Currently only executed on Linux.
+ * code/unix/unix_main.c: *ppc postfix for DLLs. Ignored the changes
+ to redundant code (have to remove the unused Un/LoadDll/API calls).
+ * code/server/sv_game.c (VMA): changed macro (see below). PPC.
+ * code/qcommon/vm.c (VM_DllSyscall): see lengthy commentary by Ryan.
+ The existing VM code makes certain assumptions about the layout of
+ varargs on the stack, which fall apart with call conventions that
+ don't even put all parameters on the stack (gcc on PPC, register-rich).
+ Using a dedicated memory area as our own stack. This should actually
+ be the default behavior.
+ Later: make vm_* cvars INIT/ROM for DLL_ONLY target.
+
+ * code/qcommon/common.c: PPC change (from Ryan Gordon).
+
+2001-02-07 Bernd Kreimeier <bk@lokigames.com>
+
+ * code/unix/unix_main.c: disabled FPE for debug for the time
+ being (that is, until I can figure out
+ Program received signal SIGFPE, Arithmetic exception.
+ RB_BeginSurface (shader=0x449572e0, fogNum=0) at ..//renderer/tr_shade.c:307
+ 307 tess.shaderTime = backEnd.refdef.floatTime - tess.shader->timeOffset;
+ without any NaN's involved.
+ TODO: unmask other FPE's selectively (see Mike's Tribes2, no getenv though).
+
+2001-02-06 Bernd Kreimeier <bk@lokigames.com>
+
+ * SOS: up to date with todays snapshot.
+ Note: got the date wrong, comment used was bk010205. Duh.
+
+ * code/server/sv_snapshot.c (SV_UpdateServerCommandsToClient): below.
+ * code/server/sv_main.c (SV_ReplacePendingServerCommands): new (SOS).
+ * code/server/server.h: reliableSent (SOS).
+
+ * code/renderer/tr_shade.c (ProjectDlightTexture): see below.
+ * code/renderer/tr_scene.c: see below.
+ * code/renderer/tr_public.h: see below (SOS).
+ * code/renderer/tr_local.h: additive light support (SOS).
+
+ * code/qcommon/cm_trace.c (CM_Trace): new tw.sphere.use branch (SOS).
+
+ * code/game/g_spawn.c: notta, notq3a entities (SOS).
+ * code/game/ai_dmq3.c: MAX_ACTIVATEAREAS search (SOS).
+
+ * code/client/cl_cgame.c: see below.
+ * code/cgame/cg_syscalls.c (trap_R_AddAdditiveLightToScene): below.
+ * code/cgame/cg_syscalls.asm: see below (trap_R_AddAdditiveLightToScene).
+ * code/cgame/cg_public.h: CG_R_ADDADDITIVELIGHTTOSCENE (SOS).
+
+ * code/bspc/l_math.c: new VectorLengthSquared, removed rotate/matrix (SOS).
+ * code/bspc/bspc.c (BSPC_VERSION): was 2.1e, now?
+ * code/bspc/be_aas_bspc.c (BotImport_Trace): CM_BoxTrace sig. (SOS).
+ * code/bspc/aas_file.c (AAS_WriteAASFile): SOS.
+ * code/botlib/be_aas_sample.c (AAS_DeAllocAASLink): SOS.
+
+ * code/unix/unix_main.c (Sys_LoadDll): do not load from installdir
+ in NDEBUG (confusing relic from old Makefile). Postfix -debug.so
+ for debug binaries to let both builds coexist.
+
+ * code/unix/Makefile: updated install targets and VERSION.
+
+ * Win32: build from SOS snapshot.
+ Note: Unix CR/LF in *.dsw/*.dsp fucks up MSVC++.
+
+2001-02-02 Bernd Kreimeier <bk@lokigames.com>
+
+ * SOS: all changes up to today.
+
+ * code/server/sv_init.c (SV_TouchCGame): added. Also memset
+ on reallocated client data (SOS).
+ * code/qcommon/qcommon.h: see below.
+ * code/qcommon/cvar.c (Cvar_SetLatched): new (SOS).
+ * code/qcommon/cm_trace.c: more sphere test fixes (SOS).
+ Note: SOS encryption key expired and updated by MrElusive.
+
+ * code/qcommon/cm_patch.c (CM_TraceThroughPatchCollide):
+ fix from MrElusive, fall through curved corner floors (q3dm17).
+ Later: also in SOS (so is shadow FPE fix).
+
+ * Win32: can't get an unadulterated SOS snapshot to build.
+ First, fix CR/LF back again (Linux client converts all).
+ find . -name '*.ds*' -print
+ alias dos2unix='recode ibmpc..lat1'
+ alias unix2dos='recode lat1..ibmpc'
+ Next, find a *.dws that works? Nope, no cigar.
+
+2001-02-01 Bernd Kreimeier <bk@lokigames.com>
+
+ * Win32: have to update dsp/dsw/etc. files in CVS, too.
+
+ * CVS: tag previous version before update
+ cvs tag id1-27h-loki010131-beta3
+
+ * code/game/q_math.c (Q_rsqrt): guard, #ifndef __linux__
+ for assert (for Win32 build).
+ TODO: assert replacement for Win32?
+ * code/q3_ui/ui_qmenu.c: see below.
+ * code/q3_ui/ui_players.c: see below.
+ * code/q3_ui/ui_controls2.c: float const with f postfix
+ Note: Win32 C4305 warning. Somebody at id has been doing
+ a lot of these recently as well...
+
+ * code/cgame/cg_players.c (CG_PlayerShadow): applied fix by
+ MrElusive, removed FPE hack (player shadows on zero mormals).
+ Prolly in this evenings' CVS.
+
+ * code/server/sv_game.c: new signatures (capsule again).
+ * code/server/server.h: new signatures (SV_Trace,ClipToEntity).
+ * code/server/sv_bot.c: new signatures (above).
+ * code/qcommon/cm_trace.c: a truckload of changes. Math
+ code added before moved upwards. Capsule traces added all
+ over the place, old box traces moved in conditional
+ branches, functions renamed and wrapped. Eliminated some
+ of the previous' versions deadcode to keep diffs smaller.
+ TODO: once a point release is out and reasonably bug
+ TODO free, remove // bkYYMMDD annotations where SOS related.
+
+ * code/qcommon/cm_public.h: new signatures in prototypes.
+ * code/qcommon/cm_patch.c: dead code re-enabled, new
+ sections (conditional branches for spheres) added to
+ several trace functions.
+ * code/qcommon/cm_local.h (CAPSULE_MODEL_HANDLE): added.
+ * code/qcommon/cm_load.c (CM_TempBoxModel): capsules.
+
+ * code/game/q_shared.h (Q3_VERSION): 1.27i now (new QVM traps).
+
+ * code/game/g_syscalls.asm: see below.
+ * code/game/g_public.h (SVF_CAPSULE): added (SOS). Also
+ G_ entry poiints for capsule traces.
+
+ * code/client/cl_cgame.c: see below.
+ * code/cgame/cg_syscalls.c: see below.
+ * code/cgame/cg_syscalls.asm: see below.
+ * code/cgame/cg_public.h: new capsule trace code (SOS).
+
+2001-01-31 Bernd Kreimeier <bk@lokigames.com>
+
+ * Win32: test compile (WinCVS, MSVC++). Have to guard isnan.
+ Note: too much shit going on....
+
+2001-01-30 Bernd Kreimeier <bk@lokigames.com>
+
+ * CVS: update for patching up (pre-1.27i).
+
+ * SOS: new changes (new collision detection primitives).
+ Now Version 1.27i.
+ TODO: start testing using DLL's (QVM code is out of sync).
+
+2001-01-25 Bernd Kreimeier <bk@lokigames.com>
+
+ * SOS: caught up till today (below).
+ * code/qcommon/cm_trace.c: new functions added: RotatePoint,
+ TransposeMatrix, CreateRotationMatrix (SOS).
+ (CM_TransformedBoxTrace): new rotation code used here.
+
+ * code/q3_ui/ui_demo2.c: sizeof(extension). SOS.
+ * code/game/g_cmds.c (G_SayTo): CON_CONNECTED.
+ * code/game/ai_main.c: HOOK added (SOS).
+ * code/botlib/be_aas_move.c (AAS_HorizontalVelocityForJump):
+ correct fix for FPE occuring (SOS).
+ * code/game/ai_dmq3.c: initmove.viewoffset (SOS).
+
+ * code/game/q_math.c: guard asser/isnan with Q3_VM (q3asm).
+ TODO: define Com_Error based assert macro? NDEBUG?
+
+2001-01-24 Bernd Kreimeier <bk@lokigames.com>
+
+ * code/server/sv_ccmds.c (SV_MapRestart_f): some debug.
+ TODO: map_restart 0 disconnects external client in 1.27h?
+
+ * code/renderer/tr_image.c (LoadTGA): added some commentary
+ and dead code based on fixes from GtkRadiant (Leonardo found
+ flipped TGA's).
+
+2001-01-23 Bernd Kreimeier <bk@lokigames.com>
+
+ * BETA3: finished testing, ready to upload to id FTP.
+ Later: neither the FreeBSD beta not the Linux Beta3
+ uloaded. Beta2 not yet released, and clients get
+ disconnected with Beta2 and Beta3 on SV_MapRestart_f.
+
+2001-01-22 Bernd Kreimeier <bk@lokigames.com>
+
+ * code/client/cl_main.c (CL_InitDownloads): undid yesterday (SOS).
+ * code/botlib/be_aas_sample.c (AAS_DeAllocAASLink): guard print (SOS).
+ * code/server/sv_client.c (SV_DirectConnect): VM_Call disconnect (SOS).
+ * code/qcommon/files.c (FS_ListFilteredFiles): trailing slashes (SOS).
+ * code/game/g_cmds.c (SetTeam): print change (SOS).
+ Note: the above plus VectorClear(v1) (below) are todays SOS changes.
+
+ * code/cgame/cg_players.c (CG_PlayerShadow): ignore bogus
+ (all zero) planes. This caused FPE in ProjectPointOnPlane.
+ TODO: why does trace return zero normal planes?
+ Note: gdb seems totally at loss with vec3_t arrays....
+
+ * code/botlib/be_aas_sample.c (AAS_TraceAreas): FPE.
+ NaN in uninitialized v1 that wasn't supposed to be referred
+ to in this branch.
+
+ * code/botlib/be_aas_move.c (AAS_HorizontalVelocityForJump):
+ FPE divide by zero (zero zvel, zero t) for jump estimates.
+
+ * code/client/cl_main.c (CL_Frame):1856. uivm==NULL on
+ client after server crashed.
+ TODO: check that uivm always non-NULL for client.
+ TODO: do setenv(FX_NO_SIGNALS) to avoid exit errors...
+
+ * code/unix/linux_glimp.c (GLW_SetMode): added "Indirect"
+ Mesa token to software rendering detection. Reworded error
+ output and added drivername.
+ TODO: measure framerate instead?
+
+2001-01-21 Bernd Kreimeier <bk@lokigames.com>
+
+ * SOS: caught up with changes up until today.
+
+ * code/server/sv_init.c (SV_SetConfigstring): gentity != NULL
+
+ * code/server/sv_client.c: connect to "{all bots" server.
+ * code/renderer/tr_init.c: JPEG extension on screenshots
+ * code/qcommon/files.c: modes based on mods, fs_basegame
+
+ * code/q3_ui/ui_demo2.c: dm3 extension (demo names, protocol).
+
+ * code/game/g_client.c: savedEvents[] removed.
+ * code/game/bg_misc.c: event sequence fixes.
+ * code/client/snd_dma.c (S_StopBackgroundTrack): different use.
+ * code/client/cl_main.c: demo file handling changed (names).
+ Also CL_InitDownloads: always next download.
+
+ * code/cgame/cg_servercmds.c: cg_thirdPerson.
+ * code/cgame/cg_weapons.c: see below.
+ Also CG_ShotgunPattern: different call (seed parameter).
+
+ * code/cgame/cg_main.c: see below.
+ * code/cgame/cg_local.h: new cg_noProjectileTrail Cvar.
+ * code/cgame/cg_effects.c (CG_BubbleTrail): early out (above).
+
+ * code/bspc/l_poly.c (BOGUS_RANGE): increased.
+ * code/bspc/bspc.c: applied patch up to "2.1e"
+
+2001-01-18 Bernd Kreimeier <bk@lokigames.com>
+
+ * code/ui/ui_main.c: below.
+ * code/q3_ui/ui_main.c: UI_HASUNIQUECDKEY comment.
+ Note: mods have to return qfalse. See Bug #2890 in Fenris.
+
+2001-01-17 Bernd Kreimeier <bk@lokigames.com>
+
+ * BETA2: finished testing, uploaded to id's FTP for release.
+
+2001-01-16 Bernd Kreimeier <bk@lokigames.com>
+
+ * CVS: checking in preparation for Beta2.
+ cvs tag id1-27h-loki010116-beta2
+
+ * SOS: new bspc "2.1e". No change on 1.27h.
+
+ * TEST: patch-up seems to work fine. No new files have been added
+ to the linkage (i.e. the ft2/ files now added), so we might not be
+ feature complete.
+
+ * code/game/g_active.c (ClientThink_real): id MISSIONPACK
+ conditional in addition to the ones I added earlier.
+ * code/qcommon/files.c: REJECT. Linux hack for userdir threw it off.
+ * code/qcommon/unzip.c: REJECT. CRC-32 section removed.
+ Later: unused tempB
+
+ * code/q3_ui/ui_syscalls.asm: REJECT. Start/StopBackgroundTrack.
+ * code/ui/ui_syscalls.asm: REJECT. syscalls ids from 1.27h
+ as of SOS (floor/ceil - will this ever get straightened out)
+ * code/win32/win_input.c: REJECT. g_pMouse edit.
+ * ui/menus.txt: REJECT. Replaced with 1.27h version.
+ Note: some more due to $SOS$.
+
+ * ui/: new scripts.
+ cinematicmenu.menu, demo_quit.menu, ingame.txt, serverinfo_old.menu
+ vid_restart.menu
+
+ * code/ft2/ttconfig.h: below.
+ * code/ft2/sfconfig.h: below.
+ * code/ft2/pstables.h: below.
+ * code/ft2/psnames.c: below.
+ * code/ft2/psdriver.h/c: below.
+ * code/ft2/keys.h: below.
+ * code/ft2/ftbbox.c: new in 1.27h
+
+ * code/cgame/cg_newdraw.c: beware: cg_newDraw.c gets lost in diff easily.
+
+ * code/cgame/cg_rankings.c: file removed from SOS.
+
+2001-01-15 Bernd Kreimeier <bk@lokigames.com>
+
+ * Patch-up: patching up from RC4 to 1.27h current.
+ No changes since 010112 snapshot.
+ ln -s sos010112/ work
+ diff -urbB sos001204-rc4/ work > work.diff
+ ln -s cvs-1.27g/ work
+ patch -p0 < work.diff > work.patch
+ find cvs1.27g/ -name '*.rej' -print
+
+ * SOS: adding the remaining SOS snapshots to CVS.
+ cvs import Quake3_sos sos001211 pr1-27g-win32-001211
+ Note: at this point id warned about repository corruption.
+ Watch out for the syscall stuff in particular.
+ cvs import Quake3_sos sos010104 pr1-27g-win32-010104
+ cvs import Quake3_sos sos010108 pr1-27h-win32-010108
+ cvs import Quake3_sos sos010110 pr1-27h-win32-010110
+ cvs import Quake3_sos sos010112 pr1-27h-win32-010112
+ Note: the first 1.27h might be the public (server only)
+ beta released, the second one was post release. Beware
+ of source files added and removed (botlib headers, FT2).
+ Note: why so late? Don't ask...
+
+2001-01-08 Bernd Kreimeier <bk@lokigames.com>
+
+ * SOS: id's working up to 1.27h (server side fix for
+ Guard exploit seems to force earlier release). Updating
+ CVS (most of the changes are debug code put in and
+ then disabled, plus some fixes as below). Next patching
+ up to current SOS.
+
+2001-01-07 Bernd Kreimeier <bk@lokigames.com>
+
+ * Makefile: need to rework this for multiple platforms.
+ We also need null/null_vm.c for platforms where we don't
+ have JIT (assembly emit).
+
+2001-01-04 Bernd Kreimeier <bk@lokigames.com>
+
+ * code/q3_ui/ui_connect.c (UI_DisplayDownloadInfo): time
+ information for current (vs. start of download) is wrong,
+ thus negative 1 "estimated time", as well as transfer
+ rate just negative downloadSize. Not fixed.
+
+ * code/unix/unix_main.c (Sys_ParseArgs): added.
+ Note: for support/us, to identify builts. This is only
+ a skeleton right now - if I ever feel the need to support
+ more than "-v" and "--version" I'll have to flesh this out.
+
+ * code/unix/linux_glimp.c (signal_handler): see below.
+ * code/unix/unix_main.c (Sys_Exit): added an abstraction
+ layer for exit/_exit/assert/raise issues.
+ Note: need both a better debug/backtrace handling, and
+ have to find a way to determine why/where the alleged
+ startup/exit errors happen...
+
+2001-01-03 Bernd Kreimeier <bk@lokigames.com>
+
+ * code/game/g_mem.c (G_Alloc): ERR_DROP initiated by
+ addbot commands for large sv_maxclients, allegedly
+ caused segfaults in 1.17. Not reproducible.
+ TODO: recover more gracefully from failure to add bot?
+
+ * code/renderer/tr_light.c (R_LightForPoint): Tim Angus
+ reports a crashbug with nolight maps. Also assertion in
+ R_SetupEntityLightingGrid, might want conditional there.
+ DONE: fixed crash on LightForPoint for nolight maps.
+
+ * code/qcommon/qcommon.h: NUM_SERVER_PORTS. A feature
+ request to increase this, or make it more flexible
+ otherwise (Fenris).
+ TODO: id decision on more flexible NUM_SERVER_PORTS.
+
+2001-01-02 Bernd Kreimeier <bk@lokigames.com>
+
+ * code/unix/snapvector.nasm: fixed FPU bit (the current
+ one had reserved bits off, behavior should not change).
+ * code/qcommon/vm_x86.c: fixed symbols (below).
+ * code/unix/ftol.nasm: FPU bits weren't correct (duh).
+ DONE: shoot-though floor (q3dm5)
+ DONE: cursor-in-rect off (TA/Player model selection)
+ Note: in gdb, "disassemble <funcname>" is your friend.
+
+ * code/cgame/cg_public.h: CG_MEMSET is set to 100. In
+ cg_syscalls.asm it's 101. If I change it I get Bad trap 100
+ from the cgame VM code, so the 1.27g "official" VM code
+ uses it.
+
+ * code/unix/linux_common.c: have to fall back to C, the
+ current assembly is buggy...
+ * code/unix/Makefile (linux_common.o): added.
+ Later: also for dedicated. Less portable this way.
+ TODO: C_ONLY for dedicated on non-i386 only?
+
+ * code/qcommon/common.c: do not use memcpy/memset under Linux.
+ * code/unix/linux_common.c: added Andrew's assembly port.
+ TODO: C_ONLY for Com_Memset/Memcpy? Conditionals are fubared.
+
+ * code/qcommon/vm.c (VM_Init): use Win32 defaults (do not
+ use DLL's by default). This exposes DLL rounding errors
+ (damage through floors), and we don't want DLL's used by
+ default anyway.
+ TODO: why vm_ui default of 1?
+
+ * code/botlib/l_precomp.c (SourceWarning): removed assert.
+
+ * code/game/bg_lib.c (acos): defined, but we don't actually
+ use it except where the cg_syscalls.asm trap is used.
+
+ * code/game/g_public.h: missing lots of trap tokens.
+ * code/game/g_syscalls.c: missing lots of traps.
+ * code/game/g_syscalls.asm: more inconsistent hooks, were:
+ equ floor -111
+ equ ceil -112
+ equ testPrintInt -113
+ equ testPrintFloat -114
+ now changed to match cg_syscalls.
+ Note: fixed this in UI earlier, how did this slip through
+ the diffs against SOS?
+
+ * code/game/g_syscalls.c: no acos hook.
+ * code/cgame/cg_syscalls.c: no acos hook.
+ * code/cgame/cg_syscalls.asm: has acos hook as -112
+ Note: report from Tim Angus. The acos function is in bg_lib.c
+ which is linked only into ui (not q3_ui). That means we are
+ using libc acos right now?
+ Note: QVM traps are negative?
+
+ * BSD/Irix: tagged current CVS (not all of the below) as
+ cvs tag id1-27g-loki010102-bsd1
+ for BSD work (Rafael Barrero). Also be used for Irix update.
+
+2001-01-01 Bernd Kreimeier <bk@lokigames.com>
+
+ * SOS: adding the remaining SOS snapshots to CVS.
+ cvs import Quake3_sos sos001201-rc3 pr1-27f-win32-001201-rc3
+ cvs import Quake3_sos sos001202 pr1-27f-win32-001202
+ cvs import Quake3_sos sos001204 pr1-27g-win32-001204-rc4
+ This is the codebase to which the Linux branch has been patched
+ up. I can't verify whether this is identical to the RC4 codebase
+ as the tag doesn't work (but can check against the ZIP file..)
+ cvs import Quake3_sos sos001211 pr1-27g-win32-001211
+ The above snapshot contains a (post-release?) fix to ui_syscalls
+ in ui/ and q3_ui/. This change has been used in Linux (Beta1 and
+ above). At this point, id discouraged further use of SOS due to
+ repository corruption on their end. No further snapshots were
+ taken since.
+
+ * Fenris: since the release of the Beta1 bugs have been
+ maintained at http://fenris.lokigames.com/. I am going to
+ list issues here as they get fixed.
+
+2000-12-21 Bernd Kreimeier <bk@lokigames.com>
+
+ * code/renderer/tr_font.c: graceful silence with old mods?
+ * code/botlib/l_precomp.c (SourceWarning): graceful exit if old mod?
+
+2000-12-20 Bernd Kreimeier <bk@lokigames.com>
+
+ * code/server/sv_ccmds.c (SV_MapRestart_f): see below.
+ * code/qcommon/vm.c: currentVM is 0x0 in VM_ArgPtr.
+ In VM_Call, oldVM was NULL - made conditional the
+ reset of currentVM to oldVM.
+
+2000-12-18 Bernd Kreimeier <bk@lokigames.com>
+
+ * BETA1: closed Linux beta release. Stripped debug
+ and release binaries, DLL's, and pak4.pk3. CVS checkin,
+ will be tagged as
+ cvs tag id1-27g-loki001218-beta1
+ Later: id added a pak5.pk3 to the Win32 point release,
+ added this to the BETA1 best.
+
+ * code/qcommon/vm_x86.c: C37F.
+ * code/unix/snapvector.nasm: C37F.
+ Note: short of any real evidence, I gamble and use max.
+ precision (as well as default Linux precision, but NOT
+ Win32 precision). It seems that precision change is not
+ really an issue (despite Graeme's claim that the cursor
+ in the menu was/is off). I also pick the roundiung behavior
+ that is seemingly used by ANSI and gcc (but possibly not
+ Win32 _ftol depending on build).
+
+2000-12-15 Bernd Kreimeier <bk@lokigames.com>
+
+ * code/unix/Makefile: added snapvector.o
+ * code/unix/unix_shared.c: #if 0'ed the old snapvector code.
+ * code/unix/snapvector.nasm (Sys_SnapVectorCW): two new
+ assembly functions from AndrewH that explicitely set the
+ FPU control word to convert vec3_t, to ensure cross-platform
+ behavior for both DLL and QVM.
+
+ * code/unix/ftol.nasm (Q_ftolC37F): for globals.
+
+ * code/unix/unix_main.c: took out global FPU manipulation.
+ For clarity this should be VM only.
+ * code/qcommon/vm_x86.c: added prototypes for the ftol
+ library. To select a specific behavior for the entire VM,
+ set ftolPtr accordingly.
+ Later: the GCC ftol function of course affect the stack
+ (there is no "declspec naked"). The problem seems to be
+ that the VM never handles the stack in a way compatible
+ to regular gcc C functions. For some odd reason _ftol seems
+ to do the right thing under Win32. All 4 control words
+ implemented at the moment work just fine with the menus.
+
+ * code/unix/ftol.nasm: added a small library of "safe" qftol
+ variations that explicitely set the control word to the
+ relevant (4) possibilities.
+
+2000-12-13 Bernd Kreimeier <bk@lokigames.com>
+
+ * code/qcommon/vm_x86.c: an entire day spent trying to nail
+ the ftol issues. It breaks down like this: id used to use
+ an unsafe (no setting FPU control word) fistp. That seemingly
+ caused subtle physics bugs which nobody cared about in 1.17.
+ They then changed the UI code, and ran into the UI bugs:
+ menu entries shifted to the right, fonts vanishing. Then
+ they switched to using _ftol. Then they had to reproduce
+ the old behavior for the physics code due to public outrage.
+ My original port used a simple (long)float cast, which gcc
+ seemingly compiles to code that does OR 0C00 on whatever
+ current control word (precision unchanged). This breaks the
+ menus. If I use the unprotected fistp instead, which should
+ (Linux 037F default) use "nearest/even", then my menus are
+ correct. That would mean Win32 _ftol in id's compile does
+ the same, only that would require /qifist or some equivalent
+ compile flag, which I can't find. Two disassemblies of _ftol
+ I got from others showed OR 0C00 as part of the default (ANSI)
+ behavior.
+
+2000-12-13 Bernd Kreimeier <bk@lokigames.com>
+
+ * code/game/bg_pmove.c (PmoveSingle): trap_SnapVector.
+ The one true and single call to snap velocity.
+ Note: bspc/map.c:void SnapVector(vec3_t normal)
+ qcommon/cm_patch.c:void CM_SnapVector(vec3_t normal)
+ game/q_shared.h: #define SnapVector(v) {v[0]=((int)(v[0]));...
+
+ * code/client/cl_cgame.c: CG_SNAPVECTOR.
+ * code/server/sv_game.c: G_SNAPVECTOR.
+ Note: these go through trap_SnapVector in syscalls.
+
+ * code/unix/unix_shared.c (Sys_SnapVector): sticking to
+ old Linux version for now...
+ * code/win32/win_shared.c (Sys_SnapVector): changed.
+ Note: Graeme points out this was changed to fix ftol
+ artifacts?
+ TODO: calculate errors for various ftol variants...
+
+ * code/qcommon/vm_x86.c: both the old fistp code (1.17)
+ and the new qftol function apparatently work. Using the
+ ftol.nasm code for now.
+
+ * code/unix/Makefile: DO_NASM and ftol.o.
+
+ * code/unix/ftol.nasm (qftol): created from Mike's SoF
+ replacements, with Andrew's help to satify the VM
+ stack/call requirements.
+ TODO: use Q_ftol herein to replace myftol elsewhere.
+
+ * code/unix/unix_main.c (Sys_ConfigureFPU): SIGFPE.
+ TODO: divide by zero in botlib. Disable this for now.
+ Note: we can't introduce calculation differences between
+ versions, so fixing these will have to wait.
+
+ * code/qcommon/vm_x86.c: two new lines in Win32 branch
+ missing from Linux assembly in AsmCall:
+ mov eax, dword ptr [edi]
+ and eax, [callMask]
+ Added, doesn't seem to affect UI etc. bugs.
+ Later: no FTOL_PTR, use fistp non-IEEE assembly as in old
+ version. This seems to work for Q3 and TA, while qftol
+ (simple cast) does not - for Win32 Graeme says the reverse
+ is true.
+
+ * code/qcommon/vm_x86_old.c: used the old cvs-1.17 version.
+ Two fixes (Hunk_Alloc, Com_Memcpy), and it works:
+ +set vm_game 2 +set vm_ui 2 +set vm_cgame 2
+ UI, cgame and game w/o apparent problems.
+
+2000-12-12 Bernd Kreimeier <bk@lokigames.com>
+
+ * code/unix/Makefile: cleanup of redundant flags.
+ Removed bogus MALLOC_CHECK (note to self: export MALLOC_CHECK_=2).
+ Also DO_SHLIB_CC on all UI DLL's.
+ Added and removed DEBUG_VM flag.
+ TODO: figure out whether Zoid did UI this way intentionally.
+ Note: this seemingly fixed the botimport problem, although
+ most of the changes were just redundant CFLAGS removed. Given
+ our wanker toolchain, should have been more paranoid. All
+ DLL's can now be used w/o apparent problems.
+
+ * code/server/sv_main.c: gvm init.
+ * code/server/sv_game.c: gvm assertions.
+ * code/unix/unix_main.c (Sys_LoadDll): print vmMain
+ Note: top no avail. There is some odd ld/gdb problem here
+ that prevents examining globals and obfuscates part of
+ the stack between VM_Call and lower level code, through
+ G_InitGame. This is not just DLL's being loaded and unloaded.
+ Wromg flags during build? The vmCvar for "bot_developer"
+ ends up overlapping global botimport in memory, which
+ thus zero-fills part of the function pointer table.
+
+ * code/server/sv_bot.c (SV_BotInitBotLib): this (by way of
+ GetBotLibAPI) is responsible for setting botimport, which,
+ if using the game DLL, is not properly set up. Called in
+ SV_Init().
+
+ * code/game/q_shared.c: Q_strncpyz does zero padding (duh).
+ Note: calls strncpy, which does a zero fill up to destsize.
+ If destsize exceeds memory size, zero padding will overwrite
+ adjacent memory. Suspicion was this happend to botimport.
+
+ * code/qcommon/cvar.c: possible problem in Q_strncpyz call.
+
+ * code/botlib/be_ai_weap.c (weaponinfo_fields): made this static.
+ Note: it seems that the "number" string got replaced by
+ p def.fields[0]
+ {name = 0x40000000 "\177ELF\001\001\001", offset = 2, type = 50, ..
+ Memory corruption?
+
+ * code/game/inv.h (WEAPONINDEX_GAUNTLET): defined here.
+ * botfiles/weapons.c (Gauntlet): the baseq3/qagamei386.so parser
+ breaks here:
+ number WEAPONINDEX_GAUNTLET
+ * code/botlib/l_precomp.c (SourceWarning): added assertion to
+ trap botlib parsing problem..
+
+ * RC1: for beta test. Using my own vm/ui.qvm files in this case.
+ TODO: Setup with nouninstall.
+ TODO: fix game DLL/ botlib setup problem (so all DLL's work)
+ TODO: SIGFPE
+ TODO: profile?
+
+ * code/unix/Makefile (ai_vcmd.o): added to game DLL linkage.
+ How the fuck did this happen?
+ DONE: "qagamei386.so: undefined symbol: BotVoiceChat_Defend"
+
+ * TEST: +set vm_ui 2 (vm_x86, not interpreter). Breaks!
+ Further: qagame had undefined, but seemingly gets reloaded
+ second try (I hate the Linux linker).
+ * TODO: never reload fail DLL, abort engine
+
+
+2000-12-11 Bernd Kreimeier <bk@lokigames.com>
+
+ * TEST: recompile QVM/DLL and executable to test new UI code.
+ The UI QVMs from the paks still do not work.
+
+ * SOS: changes in UI code!
+ * code/q3_ui/ui_public.h: this file is deprecated
+ Note: e.g. it does not contain the background track calls.
+ * code/ui/ui_public.h: the uiImport_t enum here determines
+ the values.
+ * code/ui/ui_syscalls.asm: same as q3_ui now, were:
+ equ floor -111
+ equ ceil -112
+ * code/q3_ui/ui_syscalls.asm: these are now switched, were:
+ equ trap_S_StartBackgroundTrack -63
+ equ trap_S_StopBackgroundTrack -64
+ The new values match the ui/ equivalent. Also, floor (-108)
+ and ceil (-109) are different in ui/.
+
+ * CVS: going to check in this snapshot and tag it as
+ cvs tag id1-27g-loki001209-rc4
+ Presumed equivalent to SOS tag "1.27g RC4" (master). As I can't
+ obtain the tagged code using SOS (neither Win32 nor Linux client)
+ I can only guess.
+
+ * TEST: use my own VM code, ion baseq3/vm/*.qvm and missionpack/vm/.
+ This works - in other words, the menu bug seems in the UI code, and
+ is fixed in my codebase.
+
+ * TEST: make release.
+ Note: I can postpone DLL specific problems. Bad performance is not
+ as important as outright bugs. Thus the UI QVM issue is the only
+ one that stops me from creating an RC.
+ TODO: Q3 UI QVM code from pak file does not work (neither does TA).
+ TODO: sound with video playback still awful. Threaded sound, I guess.
+ TODO: ERROR: couldn't open demos/DEMO002.dm3.dm_48 (same demo001.dm3.dm_48)
+
+ TODO: do not show Q3 demos in TA menu?
+ TODO: new demos for Q3? Or at least error message?
+
+ * code/game/bg_lib.c: itrinsics excluded by Q3_VM (another -O
+ compile). Uninitialized variable.
+ * code/unix/Makefile: -O for uninit on patched code. Also shortcuts.
+ TODO: DC_ONLY seems an obsolete flag, used in Makefiles, not source.
+
+ * TEST: +set sv_pure 0 +set vm_game 1 +set vm_cgame 1 +set vm_ui 0
+ Turns out that the pak0.pk3 UI QVM code is seemingly broken in TA
+ and Q3, but my UI DLL is not. In reverse, the QVM game/cgame for
+ Q3 seems to work quite well (including bots). The TA game/cgame
+ also works, including botlib init.
+ TODO: BotLib Init using game DLL gives:
+ TODO: Error: file weapons.c, line 38: unknown structure field number
+ TODO: Fatal: couldn't load the weapon config
+ TODO: Error: BotLoadMap: bot library used before being setup
+
+ * TEST: checked the rc4winstlr.zip CD tree against
+ my test install. baseq3/pak4.pl3 and missionpack/pak0.pk3
+ are identical, but I finally recognized that there was
+ a missionpack/pak1.pk3 not in the final install - left over
+ from an earlier update from id. Doesn't seem to affect the
+ DLL based runs at all.
+ Note: I still do not have the final CD snapshot Robert
+ promised me mid last week, they haven't even fixed the
+ FTP account they took down. Communication with id is as
+ abyssmal as ever.
+
+2000-12-08 Bernd Kreimeier <bk@lokigames.com>
+
+ * TEST: running with RC4 data files.
+ TODO: "bot library used before setup" (Q3+TA)
+ TODO: Q3 old mods wreak havoc (graceful bounce)
+ TODO: supress "FreeType code not available" in renderer
+ TODO: can't move in Q3
+ TODO: items flicker in Q3
+ TODO: no decals in Q3
+ TODO: VM UI code still broken (Q3+TA)
+ TODO: sound code is awful
+ TODO: video playback inferior to earlier builds
+
+ * code/q3_ui/ui_local.h: prototype trap_VerifyCDKey(..)
+ * code/game/g_active.c ( StuckInOtherClient): TA only.
+ * code/cgame/cg_draw.c: 4x unbalanced `#endif' - from patch?
+ * code/null/null_client.c (CL_CDKeyValidate): dummy added.
+ * code/qcommon/common.c: Q_acos missing, changed conditionals
+
+ * code/qcommon/vm_x86.c: unreacheable _asm instruction that
+ gcc doesn't quite like... #if 0'ed for now
+ TODO: understand _asm { mov eax,[ebx] }, fix it for gcc
+
+ * TEST: compile...
+
+ * code/ui/ui_main.c: full REJECT. Manual merge.
+ Note: preserved debug_protocol lines, who knows what it's good for.
+
+ * code/qcommon/files.c: REJECT. SafeMode, demo server FS_Restart.
+
+ * code/client/snd_mem.c: REJECT: $SOS$.
+ * code/client/snd_dma.c: REJECT: $SOS$.
+ * code/client/cl_cin.c: REJECT. com_timescale, $SOS$.
+
+ * code/cgame/cg_draw.c: REJECT. Lots, but virtually all either
+ float postfix (on some, not all places), or #ifndef MISSIONPACK
+ that I had already put in during -Werror (conditional unused).
+
+ * code/cgame/cg_consolecmds.c: REJECT. id commented unused code
+ that I had #if 0'ed earlier.
+
+ * code/game/: three REJECT for $SOS$.
+ * code/botlib/: lots REJECT for $SOS$.
+
+ * Patch: patching up from demo source.
+ ln -s sos001204-rc4 work
+ diff -urbB sos001122-demo/ work > work.diff
+ ln -s cvs-1.27b/ work
+ patch -p0 < work.diff > work.patch
+ find cvs1.27b/ -name '*.rej' -print
+
+ * CVS: going to check in this snapshot and tag it as
+ cvs tag id1-27b-loki001208-demo
+ Then patching up to RC4, as of sos001204-rc4 (no changes since,
+ should be equivalent to SOS tag "1.27g RC4" (raduffy), i.e. master.
+
+ * TEST: installed demota/ from Win32 distribution. Binary
+ fails claiming "Corrupted pak0.pk3". Abandoned.
+ Note: a Linux demo for Q3TA has no priority. Most important is
+ the Q3A point release in time for Q3TA hitting shelves, followed
+ by testing for Q3TA. The source is in CVS and tagged (see above)
+ in case a demo matching the released files has to be provided
+ later.
+
+
+2000-12-07 Bernd Kreimeier <bk@lokigames.com>
+
+ * TEST: compile and link - succeeds.
+
+ * code/ui/ui_main.c: UI_StopServerRefresh now uaws.
+ New unused variables.
+
+ * code/unix/unix_main.c: added Sys_LowPhysicalMemory() stub.
+ TODO: write Linux equivalent to GlobalMemoryStatus.
+
+ * code/qcommon/common.c: Com_Memset/Com_Memcpy. Neither assembly
+ nor C versions included if not on Win32 i386.
+ TODO: using/porting assembly?
+
+ * code/qcommon/files.c: unused variable.
+ TODO: fs_scrambledProductId unused if 0 for now.
+ Note: -DFS_MISSING for id's pak cleanup, not used.
+
+ * TEST: compile and link - fails.
+
+ * code/macosx/Client/Makefile.postamble: empty ORIG.
+ * code/macosx/Client/Makefile.preamble: ORIG. $(BOTLIB_OBJS) added.
+
+ * code/server/sv_client.c: ORIG. Com_Memset.
+ * code/renderer/tr_shader.c: ORIG. Com_Memset, CIN_Shader.
+ * code/qcommon/vm_x86.c: ORIG. Com_Memcpy.
+ * code/qcommon/unzip.c: REJECT. Com_Memcpy, $SOS$.
+ * code/qcommon/qcommon.h: ORIG. PROTOCOL 47, plus Sys_LowPhysicalMemory.
+ * code/qcommon/md4.c: Com_Memset,Com_Memcpy (ORIG).
+ * code/qcommon/files.c (Sys_ConcatenateFileList): REJECT.
+ Our additons threw it off, plus $SOS$.
+ * code/qcommon/common.c: they fixed same unused variables (REJECT).
+
+ * code/ui/ui_shared.c: additions (ORIG).
+ * code/ui/ui_gameinfo.c: COM_Compress added (ORIG).
+ * code/ui/ui_atoms.c: print statements removed (ORIG).
+ * code/ui/ui_main.c (UI_DoServerRefresh): REJECT on comment edit...
+
+ * code/game/g_cmds.c (Cmd_VoiceTaunt_f): logic changed heavily. ORIG.
+ * code/game/q_shared.h: Q3_VERSION "Q3 Team Arena Demo 1.27b"
+ plus Com_Memset, Com_Memcpy, CIN_shader, COM_Compress.
+ * code/game/g_main.c: Cvar change only
+ * code/game/ai_dmq3.c: $SOS$.
+
+ * code/client/snd_mix.c: Com_Memset
+ * code/client/client.h: additions (ORIG).
+ * code/client/snd_mem.c: see below.
+ * code/client/snd_dma.c: $SOS$ (CVS keyword).
+
+ * code/client/cl_cin.c: they removed unused (REJECT).
+ * code/cgame/cg_servercmds.c: ORIG. compress, noTaunt etc.
+ * code/cgame/cg_main.c: ORIG. Conditonal branch, COM_Compress.
+ * code/cgame/cg_consolecmds.c: ORIG. Cvar values changed.
+ * code/cgame/cg_draw.c (CG_DrawTeamBackground): ORIG.
+ no reject but *.orig file created. I just mark spots were
+ code changed after verifying the patch succeeded.
+
+ * code/cgame/cg_event.c: fixed reject (REJECT).
+ * code/botlib/: all *.rej here due to SOS/CVS $Keyword$.
+ TODO: preserve SOS comments/rev history somehow.
+
+ * Patch: patching up to demo source.
+ ln -s sos001122-demo work
+ diff -urbB sos001119/ work > work.diff
+ ln -s cvs-1.26/ work
+ patch -p0 < work.diff > work.patch
+ find cvs1.26/ -name '*.rej' -print
+
+ * CVS: going to check in this snapshot and tag it as
+ cvs tag id1-26w-loki001207
+ to prepare for upgrading to RC4. I have already made
+ many more changes than I wanted to w/o getting any
+ closer to pinpointing the problem, I might as well
+ patch up to id's more current sources.
+
+ * code/botlib/be_interface.c: initialize by memset. Turns
+ out that this fails in Export_BotLibSetup on BotSetupWeaponAI
+ loading "weapons.c" (from the pak, presumably) with an unknown
+ structure field number. Mismatch of datafiles vs. source again.
+
+ TODO: id replaced memsets in later source.
+ TODO: have memsets on all exports and imports.
+
+ * SOS: RC4 source should be tagged "1.27g RC4" (raduffy).
+ Unfortunately the Linux client doesn't care a bit. Show
+ History does work if from/to date differ by at least a
+ day, and it shows the tag on code/ (only that subtree),
+ but recursive get aborts halfway.
+ Manual: http://www.sourcegear.com/SOS/Doc/
+
+2000-12-06 Bernd Kreimeier <bk@lokigames.com>
+
+ * TEST: accepting missing shaders now. No bots, but I can
+ actually enter the game and play (more than can be said for
+ classic Q3 right now).
+ TODO: Error: BotStartFrame: bot library used before being setup
+
+ * code/renderer/tr_shader.c: took out assertion for now...
+ * TEST: now missiopack/cgame loads
+ TODO: tr_shader.c:2275: R_FindShaderByName: failed
+ TODO: searches ui/assets/3_cursor2.TGA, has ui/assets/3_cursor3.tga
+
+ * code/unix/Makefile (MPCGOBJ): ui_shared.o (duh).
+ DONE: /cgamei386.so: undefined symbol: PC_Float_Parse
+
+ * code/botlib/be_ai_goal.c: initialize campspots etc. This
+ might or might not fix this one (didn't get back to gdb due
+ to mouse-only navigation).
+ DONE: 0x80d1d5b in BotFreeInfoEntities () at be_ai_goal.c:447
+
+ * TEST: this time with missionpack/cgame loading... noy
+ TODO: TA menu blocked after end of intro movie
+ TODO: console in_mouse 1 doesn't grap pointer even on vid_start?
+
+ * code/cgame/cg_newdraw.c: -Werror.
+ * code/unix/Makefile (MPCGOBJ): cg_newdraw.o was missing (duh).
+ DONE: missionpack/cgamei386.so: undefined symbol: CG_OwnerDrawVisible"
+
+ * code/ui/ui_shared.c:1309 assign after bail on NULL.
+ DONE: segfault in Item_SetFocus (item=0x0, x=0, y=0)
+
+ * TEST: new set of DLL's (this time hopefully correct).
+ All baseq3/ DLL's load, as does the missionpack/ UI DLL.
+ The menus now work in both (TA seems mouse-only on everything
+ but "Quit"). Segfault on delayed TA "Quit" (stack fubared):
+ #5 0x809fc28 in VM_Call (vm=0x88408a0, callnum=3) at ..//qcommon/vm.c:617
+ #6 0x805aafc in CL_KeyEvent (key=9, down=qtrue, time=128644) cl_keys.c:1194
+ TODO: TA menu's w/o mouse?
+ TODO: Win32 goes submenus but does not unfold
+ TODO: Linux does not go submenus
+
+ * code/ui/ui_main.c: see below.
+ TODO: LCC gets fits - operands of = have illegal types
+ TODO: 'pointer to const unsigned char' and 'pointer to const char'
+ * code/ui/ui_shared.c: see below.
+ * code/ui/ui_gameinfo.c: see below.
+ * code/ui/ui_atoms.c: see below.
+ * code/game/g_bot.c: more cruft.
+ * code/cgame/cg_draw.c: loads of functions modified for
+ MISSIONPACK that aren't used at all for MISSIONPACK anymore.
+ Development relics.
+
+ * code/cgame/cg_consolecmds.c: -Werror.
+ Note: due to Makefile error never ever compiled...
+
+ * code/unix/Makefile: fixed various dependency errors
+ for game and ui library.
+ TODO: create a new Makefile with patsubst and rules.
+ TODO: why C_ONLY in the i386 dedicated server?
+
+ * code/unix/unix_main.c: use dlerror() excessively.
+ Littered more unused DLL related functions with assert(0).
+ TODO: clean up Sys_Load/UnloadDll (a real mess)
+ TODO: remove Zoid code cruft (unused per-DLL functions)
+
+ * code/game/bg_misc.c: changed G_Printf for Com_Printf.
+ This was undefined in baseq3/uii386.so preventing loading.
+
+ * TEST: +set sv_pure 0 +set vm_game 0 +set vm_cgame 0 +set vm_ui 0
+ Note: so far I used only the game DLL.. duh.
+ UI DLL fails to load: missing G_Printf.
+
+ * code/unix/Makefile: -DMALLOC_CHECK in addition to
+ the -DZONE_DEBUG I have used since switching to calloc.
+ Using MALLOC_CHECK=1 for now, might use 2 if something
+ comes up.
+
+ * code/renderer/tr_init.c (GL_SetDefaultState): it does get
+ called, but does not show up in the log.
+
+ * TEST: tried executing a script - get bounced.
+ TODO: is there any way to jump into a map?
+ TODO: cl_cinematics 0 (supress all fullscreen RoQ)
+ Next: used r_logfile 200 in Win32 (RC4) and Linux.
+ There is a buckload of setup code seemingly not done
+ at all in Linux? Either that, or logging is enabled
+ with a delay in Linux.
+
+ * code/unix/linux_glimp.c: fixed autorepeat (H2/Fakk2 way).
+
+2000-12-05 Bernd Kreimeier <bk@lokigames.com>
+
+ * code/renderer/tr_mesh.c: added assert there.
+ * TEST: menus and in-game drawing are just as they were with
+ the initial SOS001119 port. In addition:
+ R_AddMD3Surfaces: no such frame 0 to -2147483477
+ for 'models/players/xaero/upper.md3'
+ R_AddMD3Surfaces: no such frame -2147483477 to 171
+ R_AddMD3Surfaces: no such frame 171 to -2147483498
+ ad nauseam (used as my player model).
+ Triggered: haveing a trRefEntity_t *) 0x41dbbd00 with
+ frame = -2147483477. Might be a red herring (PRINT_DEVELOPER),
+ ignore for now.
+
+ * code/ui/ui_main.c: missing return.
+ * code/ui/ui_shared.c: excess byte in initializer (which gcc
+ did not caught, but LCC did). Also LCC complains about
+ missing returns, but gcc doesn't (neither says unreacheable
+ code though). If necessary (MsVC?) guard with Q3_VM.
+
+ * code/q3_ui/ui_ingame.c: see below.
+ * code/q3_ui/ui_atoms.c: voidfunc_f. LCC warns about conversion
+ from `pointer to void' to `pointer to void function(void)'
+ being compiler dependent. Casting NULL. Guess what, doesn't fix
+ it either.
+ TODO: do not use these cursed scripts to generate VM code,
+ we do not have proper rules for LCC/q3asm, thus the files never
+ get updated.
+
+ * code/unix/Makefile: for paranoia's sake recreated the 1.17
+ compile for the UI DLL (where only q_shared/math were actually
+ compiled as DO_SHLIB_CC.
+ Later: switched to different gcc.
+
+ * STATIC: remaining problems are vmMain (same entry point for all
+ DLL's), could use cgMain, uiMain and gMain here for HARD_LINKED.
+ Note: I don't think id has used this in ages.
+ Plus all the collisions in *_syscalls.c, which simply can't be
+ fixed cheaply. None is the superset of 2 others, neither seems
+ w/o overlap to others. Full stop.
+
+ * code/botlib/be_aas_move.c: see below.
+ * code/game/ai_dmq3.c: VEC_UP/DOWN, MOVEDIR_UP/DOWN now static.
+ See also game/g_utils.c for existing static duplicates.
+
+ * code/game/q_shared.h: #define stricmp strcasecmp
+ * code/unix/Makefile: no mo' -Dstricmp=strcasecmp, see q_shared.h
+ Also: no mo' -I/usr/include/glide, no FX
+ TODO: are we building against system GL headers? ../Mesa/?
+
+ * code/q3_ui/ui_atoms.c: comment on duplication
+ * code/cgame/cg_drawtools.c: use UI/CGAME_HARD_LINKED on UI duplicates
+ TODO: does this UI_ code in cg_drawtools/ui_atoms belong into ui_shared?
+
+ * code/unix/Makefile: use -DQ3_STATIC
+ * code/game/q_shared.h (*_HARD_LINKED): trigger on Q3_STATIC
+ Later: collision between UI and CGAME is still there. This fixed
+ the Com_Error, Com_Printf issues though
+
+ * code/unix/Makefile ($(B)/q3static/ai_vcmd.o): this file was
+ missing, hence undefined symbol.
+ ($(B)/baseq3/game/ai_vcmd.o): same here.
+ ($(B)/missionpack/game/ai_vcmd.o): same here.
+
+ * STATIC: cg_syscalls.c, g_syscalls.c and ui_syscalls.c alias.
+ Multiply defined symbols:
+ Com_Error, Com_Printf
+ VEC_UP, VEC_DOWN
+ MOVEDIR_UP, MOVEDIR_DOWN
+ vmMain
+ dllEntry
+ PASSFLOAT
+ trap_Error
+ trap_Milliseconds
+ trap_Argc
+ trap_Argv
+ trap_FS_FOpenFile
+ trap_FS_Read
+ trap_FS_Write
+ trap_FS_FCloseFile
+ trap_FS_GetFileList
+ trap_R_RegisterModel
+ trap_R_RegisterSkin
+ trap_R_RegisterFont
+ trap_R_RegisterShaderNoMip
+ trap_R_ClearScene
+ trap_R_AddRefEntityToScene
+ trap_R_AddPolyToScene
+ trap_R_AddLightToScene
+ trap_R_RenderScene
+ trap_R_SetColor
+ trap_R_DrawStretchPic
+ trap_R_ModelBounds
+ trap_UpdateScree
+ trap_S_StartLocalSound
+ trap_S_RegisterSound
+ trap_Key_IsDown
+ trap_Key_GetCatcher
+ trap_Key_SetCatcher
+ trap_GetGlconfig
+ trap_PC_AddGlobalDefine
+ trap_PC_LoadSource
+ trap_PC_FreeSource
+ trap_PC_FreeSource
+ trap_PC_ReadToken
+ trap_PC_SourceFileAndLine
+ trap_S_StopBackgroundTrack
+ trap_S_StartBackgroundTrack
+ trap_RealTime
+ trap_CIN_PlayCinematic
+ trap_CIN_StopCinematic
+ trap_CIN_RunCinematic
+ trap_CIN_DrawCinematic
+ trap_CIN_SetExtents
+ trap_MemoryRemaining
+ trap_SendConsoleCommand
+ trap_Cvar_Register
+ trap_Cvar_Update
+ trap_Cvar_Set
+ trap_Cvar_VariableValue
+ trap_Cvar_VariableStringBuffer
+ trap_RealTime
+ trap_SnapVector // used in game/bg_*.c, needs conditional
+ More aliasing between ui_atoms.c and cg_drawtools.c:
+ UI_DrawBannerString
+ UI_ProportionalStringWidth
+ UI_ProportionalSizeScale
+ Undefined symbol: ai_team.o: In function `FindHumanTeamLeader':
+ ai_team.c:1899: undefined reference to `BotVoiceChat_Defend'
+ Note:
+
+ * code/game/g_main.c: unused.
+ * code/game/g_arenas.c: unused.
+ * code/game/ai_team.c: init.
+ * code/game/ai_dmnet.c: /* in comment (odd).
+ Note: why do these come up now but not earlier?
+ TODO: the make dependencies might target wrong files.
+
+ * code/unix/Makefile (TARGETS): added q3static.
+ Note: this is baseq3/
+
+ * TEST: +set r_logfile 100. It seems that the addition of
+ code (add an assertion etc.) changes the behavio of the binary.
+ The intro cinematics code seems to suffer first - didn't play,
+ then played, then (another assert added) doesn't play. Watch
+ out for (missionpack):
+ UI_CIN_PlayCinematic
+ SCR_PlayCinematic( mpintro.roq )
+ trFMV::play(), playing mpintro.roq
+ Also fails to exit cleanly: break gives
+ #0 0x401919ee in __select ()
+ #1 0x400bbcb8 in __DTOR_END__ ()
+ #2 0x4004baa1 in _XSend ()
+ #3 0x452b009f in GLXRenderFlush ()
+ #4 0x804ce0c in _XRead ()
+ #5 0x40680813 in ?? ()
+ Stack is corrupted.
+ Note: ~/.q3a/gl.log
+ TODO: write per-frame files (see Heretic2)
+ TODO: add Heretic2 QGL (more detail)
+
+ * code/unix/linux_qgl.c (QGL_EnableLogging): fixed countdown
+ (i.e. propagated changes from win32/, see Fakk2).
+
+ * code/unix/linux_glimp.c: fixed QGL_EnableLogging argument
+ to avoid cast error (always qfalse).
+
+ * code/unix/Makefile (DEBUG_CFLAGS): use ZONE_DEBUG.
+
+ * code/qcommon/common.c: replaced malloc with calloc calls.
+
+ * code/q3_ui/ui_local.h: have to use ui/ui_public.h
+ * code/cgame/cg_servercmds.c: requires ../ui/menudef.h
+
+ * code/cgame/cg_consolecmds.c: ui/ui_shared.h is unique.
+ * code/q3_ui/ui_public.h: make sure this won't be compiled.
+ * code/client/client.h: we have to include ui/ui_public.h.
+ Note: id is obviously maintaing only the ui/ headers, so the
+ headers in q3_ui/ are deprecated.
+
+ * code/renderer/tr_shader.c: added assertions (see Ryan's Fakk2
+ problems with missing shaders).
+
+ * code/game/g_cmds.c: below.
+ * code/game/ai_vcmd.c: below.
+ * code/game/ai_team.c: below.
+ * code/game/ai_dmnet.c: below.
+ * code/game/ai_dmq3.c: below.
+ * code/game/ai_chat.c: below.
+ * code/game/ai_cmd.c: ../../ui/menudef.h (new Q3TA script directory).
+
+ * code/cgame/cg_newdraw.c: make sure it won't compile w/o MISSIONPACK.
+
+ * code/cgame/cg_servercmds.c: below.
+ * code/cgame/cg_event.c: below.
+ * code/cgame/cg_consolecmds.c: below.
+ * code/client/keys.h: below.
+ * code/client/client.h: below.
+ * code/q3_ui/ui_local.h: include from ../q3_ui/ not ../ui/.
+ Note: id seems to intentionally use the header from the new ui/.
+
+ * Makefile: checked -I$(UIDIR), there is no such. That means all
+ files include directly, which means all (including Q3) are using
+ the new ui/ headers.
+
+2000-12-04 Bernd Kreimeier <bk@lokigames.com>
+
+ * RC4: released as 362101115 Dec 4 11:40 TA_Q3A_RC4.zip
+
+ * TEST: the corrupted menu problem is back :-(. Looks like I am in
+ for a static link next.
+
+ * code/unix/Makefile (clean2): fixed (not all new OBJ covered).
+ * code/q3_ui/ui_teamorders.c: -Werror.
+ * code/q3_ui/ui_team.c: -Werror.
+ * code/q3_ui/ui_qmenu.c (Bitmap_Draw): -Werror.
+ * code/q3_ui/ui_mods.c (UI_Mods_LoadModsFromFile): unused. -Werror.
+ * code/q3_ui/ui_controls2.c: -Werror.
+ * code/q3_ui/ui_atoms.c: -Werror
+ * code/null/null_client.c: -Werror.
+ * code/unix/linux_joystick.c: -Werror.
+ * code/unix/linux_glimp.c: -Werror.
+ * code/unix/linux_qgl.c: -Werror.
+ * code/unix/unix_shared.c: -Werror.
+ * code/unix/unix_net.c: -Werror.
+ * code/unix/linux_local.h: added missing prototypes.
+ * code/unix/unix_main.c: -Werror. Includes linux_local.h
+ * code/jpeg-6/jdmainct.c: see below.
+ * code/jpeg-6/jcmainct.c: variables called "main" (*moan*)
+ * code/jpeg-6/jcdctmgr.c (forward_DCT): -Werror.
+ * code/botlib/l_script.c (PS_ReadLiteral): -Werror
+ * code/botlib/l_precomp.c (PC_AddBuiltinDefines): -Werror.
+ * code/botlib/be_interface.c: -Werror.
+ * code/botlib/be_aas_reach.c: -Werror
+ * code/botlib/be_aas_cluster.c: -Werror
+ * code/game/be_aas.h: -Werror.
+ Note: MrElusive accumulates a lot of code history in nested comments,
+ which gcc doesn't like at all. #if 0'ed to avoid.
+ * code/qcommon/vm_interpreted.c: -Werror.
+ * code/qcommon/unzip.c: -Werror.
+ * code/cgame/cg_servercmds.c: -Werror.
+ * code/cgame/cg_main.c: -Werror.
+ * code/cgame/cg_drawtools.c: -Werror.
+ * code/game/bg_misc.c: -Werror.
+ * code/game/be_ai_move.h (bot_avoidspot_s): added.
+ * code/botlib/be_ai_move.c: removed typedef struct bot_avoidspot_s
+ * code/client/snd_mix.c: -Werror.
+ * code/qcommon/md4.c: -Werror.
+ * code/qcommon/common.c: -Werror.
+ * code/client/cl_keys.c: -Werror.
+ * code/client/cl_cin.c: -Werror, init local variables.
+ * code/unix/Makefile: -Werror. need -O for -Wall for uninitialized
+ Note: the above is the list of files that got touched during a pass
+ with -g -O -Werror -Wall flags (in the hope of finding uninitialized
+ memory and ambiguous statements). Most of the above are simply
+ unused variables (or even code).
+
+ TEST: RC3 data files, but DLL's.
+ TODO: TA gets stuck in initial sound, doesn't play cinematics (sometimes)
+ TODO: Q3 intro movie looses sound after Sarge gets teleported
+ TODO: Q3 ingame renders world, weapon, muzzleflash, hud, can shoot,
+ TODO: but no movement, hud background is fubared.
+
+ * code/cgame/cg_main.c: cg_singlePlayerActive
+
+ * code/q3_ui/ui_login.c: doesn't seem to be used?
+ * code/game/g_rankings.c (G_RankRunFrame): doesn't seem to be used.
+ * code/q3_ui/ui.sh: disabled this.
+ * code/q3_ui/q3_ui.sh: changed include path to ../q3_ui/ (duh).
+
+ * code/game/game.sh: changed include path to ../q3_ui/ which
+ is not in the Win32 batch file.
+ * code/cgame/cg_rankings.c: this does not seem to be included.
+ * code/cgame/cgame_ta.sh: added -DCGAME. Also added cg_syscalls.c
+ to build (also missing in Win32).
+
+ * code/cgame/cgame.sh: added -DCGAME (see cgame.bat). Also
+ changed include path to ../q3_ui/ which is not in the Win32
+ batch file. Also added cg_syscalls.c to build (missing in
+ Win32).
+
+2000-12-01 Bernd Kreimeier <bk@lokigames.com>
+
+ * RC3: released as of sos001201 / Q3 1.27f
+
+ * code/unix/Makefile: more fixes with clean build. The
+ changes made fix the menu rendering for Q3 but not TA.
+ Ingame graphics still broken.
+
+ * code/game/game_ta.sh: created. Use game_ta.q3asm here.
+ * code/game/game.sh: no -DMISSIONPACK
+ * code/game/game_ta.q3asm: CR/LF, /.
+
+ * code/cgame/cgame_ta.sh: created. Use cgame_ta.q3asm here.
+ * code/cgame/cgame.sh: no -DMISSIONPACK. No cg_newdraw, ui_shared.
+ * code/cgame/cgame.q3asm: No cg_newdraw, ui_shared.
+ CR/LF, /, cg_newDraw, and the output path/name.
+
+ * code/q3_ui/q3_ui.q3asm: output to ui not q3_ui...
+
+ * code/cgame/cg_event.c: cg_singlePlayerActive used here.
+ TODO: guard by MISSIONPACK
+ * code/cgame/cg_local.h: named q3print_t enum. Cvar
+ cg_singlePlayerActive for both Q3 and TA.
+
+
+ * code/unix/Makefile: cleanly separate B/baseq3/ and
+ B/missionpack/ subtrees during build. While new and old
+ UI are in separate directories, the cgame/ and game/
+ are shared, with conditional -DMISSIONPACK compile
+ and different files includeds (cd_draw, cg_newdraw).
+ That means twice the number of targets (3 DLL's, 3 QVM's,
+ times two), and different build rules.
+ TODO: carefully check Win32 build for (other) conditionals
+ TODO: carefully check Win32 build for link lists
+
+ * CVS: ui/, code/ui, botfiles/ and subdirectories are added.
+ The code/macosx/ directory turned out to be a real pain that
+ had to be edited manually, throwing out CVS/ directories in
+ the tree that had been created by SOS as they are in id's
+ repository:
+ code/macosx/Client/CVS
+ code/macosx/Client/PBUserInfo/CVS
+ code/macosx/Client/Quake3.nib/CVS
+ code/macosx/Common/CVS
+ code/macosx/DedicatedServer/CVS
+ code/macosx/DedicatedServer/PBUserInfo/CVS
+ Now tagged
+ cvs tag id1-26y-loki001119
+ TODO: there are several new files not yet linked?
+
+ * ChangeLog: merged the Changelog from the bk00119 working
+ branch (initial Q3TA port) based on sos001119 snapshot. Also
+ merged the source tree with cvs-1.17.
+ In the ChangeLog below *** MISSIONPACK *** indicates work
+ that was done on the branch (code-sos/ prefix in files).
+ The cvs update of this will be tagged with
+ cvs tag id1-26y-loki001119
+ Use this tag to hunt for possible Linux fixes that got lost
+ (i.e. got dropped by id since id000516 and were thus not in
+ sos001119, but did not show in diff id000516 cvs1-17).
+ New directories in CVS: botfiles/, ui/.
+ Missing from SOS/Missionpack: SDK directories.
+ common, lcc, libs, q3asm, q3data, q3map, q3radiant.
+
+
+ * ssreport.txt: below.
+ Note: watch for files called "ssreport.txt", that's id ChangeLog.
+ * ui/ui_syscalls.asm: below.
+ * q3_ui/ui_syscalls.asm: below.
+ * game/g_syscalls.asm: below.
+ * cgame/cg_syscalls.asm: below.
+ * bspc/linux-i386.mak: below.
+ * bspc/lcc.mak: below.
+ * botlib/linux-i386.mak: below.
+ * botlib/lcc.mak: below.
+ * A3D/a3d_console_variables.txt: CR/LF issue (minimize diffs).
+
+ * CVS: the checked bk001119 work copy of the sos001119 initial
+ checkout (completed with everything in the SOS "Missionpack"
+ tree, i.e. botfiles/ and botfiles.* added), copied over the
+ cvs-1.17 checkout.
+ Note: in these cases, BEWARE ui -> q3_ui/ links, and different
+ ChangeLogs. Also "make clean" helps.
+
+ * unix/unix_net.c: below.
+ * unix/unix_main.c: below.
+ * unix/matha.s: below.
+ * unix/linux_qgl.c: below.
+ * unix/linux_glimp.c: see also linux_joystick.c.
+ * server/sv_client.c: below.
+ * renderer/tr_surface.c: below.
+ * renderer/qgl.h: below.
+ * qcommon/qcommon.h: below.
+ * qcommon/files.c: below.
+ * qcommon/common.c: below.
+ * q3_ui/ui_demo2.c: below.
+ * mac/mac_net.c: below.
+ * mac/mac_glimp2.c: below.
+ * game/surfaceflags.h: below.
+ * game/bg_lib.c: checked against id00516/cvs-1.17a diff.
+ * bspc/bspc.c: TH_AASToTetrahedrons call removed since id000516.
+ Note: our final compare of id000516 against cvs-1.17a, making sure
+ that all these differences are in bk001119 (initial Q3TA port).
+ If id branched the Q3TA base off before id000516 we might be screwed.
+ Note: I do not diff against bk000520, which had some minor changes
+ against id000516 (check VectorArrayNormalize, OTConfiguration), which
+ seem consistent with me taking a pre-id000516 source snapshot for that
+ working branch.
+
+2000-11-30 Bernd Kreimeier <bk@lokigames.com>
+
+ * TEST: compiled using the symbolic link ui/ -> q3_ui/.
+ Had to undo one CVS change, regarding
+ code/cgame/cg_syscalls.asm
+ code/game/g_syscalls.asm
+ code/q3_ui/ui_syscalls.asm
+ These files are neither generated by Win32 cgame.bat
+ nor cgame.sh (etc.), thus seemingly maintained by hand.
+ cvs tag pr1-17-loki001130b
+ should be used if somebody needs this 1.17 snapshot
+ (which, remember, is post-release, with additional fixes).
+ Later:
+ cvs tag pr1-17-loki001130c
+ includes the full ChangeLog (duh).
+
+ * CVS: up until cvs-1.17-001130, code/ui/ contained the
+ Q3 code for the UI QVM/DLL. In Q3TA, this code has been
+ moved to code/q3_ui/, while at the same time the new
+ (scripting driven) UI code for Q3TA was maintained in
+ code/ui/. To preserve the history of code/ui/, it has been
+ renamed to q3/ui/ in the CVSROOT.
+ Note: this will BREAK all cvs-1.17 and before checkouts.
+ To compile earlier versions, move or link q3_ui/ to ui/.
+ The code has been tagged
+ cvs tag pr1-17-loki001130
+ after the change.
+ DONE: remove code/*/vm/*.asm from CVSROOT
+ Note: this includes code/*/*.asm files (from *_syscalls.c).
+ These were originally tracked in CVS, but if we need
+ comparison of q3asm output or QVM files we can rely
+ on the Win32 and Linux SDK now. These files have been
+ physically removed from CVS now, followed by
+ cvs tag pr1-17-loki001130a
+
+2000-11-30 Bernd Kreimeier <bk@lokigames.com> *** MISSIONPACK ***
+
+ * RC2: new ZIP file (another 360M for convenience).
+
+ * SOS: new CVS module, Quake3_sos. This will be used to track
+ the unchanged SOS checkouts from id. As their repository
+ is read-only, and there is no estimate on when changes might
+ be backpropagated there, I will track their changes in a
+ separate module, and update our local Quake3 module
+ accordingly. This is effectively "tracking 3rd party"
+ w/o import and half-automated, forced mergers - in other
+ words, we now branch starting with our post-1.17 changes,
+ for the benefit of moving at all.
+ Baseline is a slightly changed PR-1.17 id000516 source dump
+ (essentially ui/ moved to q3_ui for continuity, and CR/LF etc.).
+ cvs import Quake3_sos id000516 pr1-17-win32
+ cvs import Quake3_sos sos001119 pr1-26-win32
+ cvs import Quake3_sos sos001120 pr1-26-win32-001120
+ cvs import Quake3_sos sos001121 pr1-26-win32-001121
+ cvs import Quake3_sos sos001122 pr1-26-win32-001122
+ cvs import Quake3_sos sos001122-demo pr1-26-win32-demo
+ This is about the 1.26w Team Arena Win32 demo release, give or
+ take a couple of lines. Has Q3_VERSION "Q3 Team Arena Demo 1.27b".
+ cvs import Quake3_sos sos001123 pr1-26-win32-001123
+ cvs import Quake3_sos sos001126 pr1-26-win32-001126
+ Now track id versions (see code/game/q_shared.h:Q3_VERSION)
+ cvs import Quake3_sos sos001128 pr1-27c-win32-001128
+ With 1.27d they switched from Demo to full version (RC1).
+ cvs import Quake3_sos sos001129 pr1-27d-win32-001129
+ cvs import Quake3_sos sos001130a pr1-27d-win32-001130a
+ Now switched to 1.27e. This import is done from the SOS
+ working directory.
+ cvs import Quake3_sos sos001130b pr1-27e-win32-001130b
+ Note: SoS created rwx attributes which are luckily fixed
+ automagically during import. It is also seemingly incapable
+ to compare files, and leave files that have not changed the
+ hell alone. I can't do cvs update due to the $..$ tags in
+ the original files (which CVS can't be told to ignore),
+ so I have to do import (creating a load of vendor tagged
+ branches), but at least cvsweb and cvs get the revisions
+ right.
+
+ * code-sos/unix/Makefile: added linux_joystick
+ * code-sos/unix/linux_local.h: match mac/ and win32/, for prototypes.
+
+ * code-sos/unix/linux_joystick.c: new file, code from linux_glimp.c
+ Note: decided to separate this, as (a) we might edit/extend
+ a lot, (b), it's not in the id tree, (c) it's not GL, (d)
+ there might be even more oddball devices. Anything that
+ cuts down on diffs.
+
+ * code-sos/unix/linux_glimp.c (Q_stristr): const return (cvs1.17).
+ Also (XLateKey): added more keyboard mappings (ASCII on
+ upper row digits) (cvs1.17). Added in the minimal joystick
+ hooks (cvars, function calls). Fixed joystick cvar naming
+ to match win32 (kept joystick_threshold).
+ TODO: joystick stubs for dedicated?
+
+ * CVS: I have to move up to 1.27d (data, Win32 networking).
+ With exception of linux_glimp.c (mostly joystick code),
+ all cvs1.17 changes should now be in the work snapshot
+ based on the first sos001119 we got from id. There are
+ also some additional changes in there already, thus I'll
+ move the (buggy) 1.26 snapshot into CVS before adding even
+ more differences.
+
+
+2000-11-29 Bernd Kreimeier <bk@lokigames.com> *** MISSIONPACK ***
+
+ * RC1: TeamArena_Q3A_RC1.zip. Source has moved from
+ Q3VERSION "Q3 Team Arena Demo 1.27c" to "Q3 1.27d" now.
+
+ * code-sos/qcommon/common.c: added Com_InitPushEvent(). Also
+ increased MAX_PUSHED_EVENTS to 256.
+ Note: this is another case of buffer memory not zero'ed.
+ Com_EventLoop, fixed evTime to evType in debug print.
+
+ * TEST: baseq3/
+ +set sv_pure 0 +set vm_game 0 +set in_mouse 0 +set developer 2
+ TODO: Team Arena in menu leads to RE_Shutdown(1) and locks
+ TODO: can't play game
+ TODO: shaders can't load *.tga, *.jpg files are there
+ TODO: DO_CC linking for DLL's, DO_SHLIB_CC only for export?
+ TODO: ERROR: Bad player movement angle
+ TODO: Warning: cvar "..." given initial values: "..." and "..."
+ TODO: TA demo ERROR: CL_ParseServerMessage: Illegible server message
+ TODO: WARNING: Com_PushEvent overflow
+
+ * code-sos/qcommon/files.c: add NULL filter for our Sys_ListFiles calls.
+ * unix/unix_shared.c (Sys_ListFiles): signature has changed,
+ additional Sys_ListFiles argument now.
+
+ * code-sos/unix/unix_net.c (Sys_GetPacket): see below (readcount=0).
+ * code-sos/unix/unix_main.c: see below (Mike's and my changes to DLL
+ loading, my event buffer clear fixes).
+ * code-sos/unix/linux_qgl.c (QGL_Init): see below (__FX__ guards).
+ TODO: abstract WGL/GLX and end unfortunate QGL duplication.
+ TODO: spice up QGL with Linux H2 full version.
+ * code-sos/q3_ui/ui_demo2.c: fix on demo names - no Q_strupr(demoname).
+ Note: in CVS this fix is in ui/ui_demo2.c. CVS is screwed by
+ id choosing the old name for new directory...
+ TODO: manual intervention on "ui goes q3_ui" in CVSROOT?
+ * renderer/qgl.h: see below (__FX__ guards).
+ * qcommon/files.c: migrated in the 1.17cvs changes against the
+ id000516 code dump, i.e. the (not marked - boo hiss) mkv changes.
+ Note: all the above is based on a diff of the last id code dump
+ pre-1.17 against our CVS, with those fixes now migrated into the
+ sos1.26 snapshot.
+ TODO: move in joystick code.
+ TODO: replace XAutoRepeatOn/Off with filter (focus).
+ TODO: DGA 2.0 and such.
+
+ * code-sos/game/q_shared.c: valid compare for NULL strings
+ * code-sos/unix/unix_main.c: QRTLD, and now using RTLD_NOW.
+ Note: it is a bad idea to load game DLL's that are missing symbols.
+
+ * code-sos/ui/ui_main.c: see below.
+ * code-sos/game/g_main.c: see below.
+ * code-sos/q3_ui/ui_main.c: see below.
+ * code-sos/cgame/cg_main.c: made cvarTable and cvarTableSize static. This resolved
+ a segfault related to traversing the UI table during Init.
+ Note: there is a segfault related to this variable being out of bounds.
+ Different struct size in global variables possible aliasing between the
+ DLL's.
+
+ * code-sos/unix/unix_main.c (Sys_Error): assert(0), no exit in debug.
+ * code-sos/game/q_shared.c: now aborts on NULL destination. Also DPrintf's
+ on bogus excess copies.
+ TODO: make all those string functions safe, at least assert.
+ * code-sos/server/sv_init.c: comment in SV_Init
+ // init the botlib here because we need the pre-compiler in the UI
+ Called in qcommon/common.c:Com_Init, were CL_Init is called afterwards...
+ * code-sos/server/sv_bot.c: the botlib_import is filled here.
+ * code-sos/unix/unix_main.c (Sys_GetBotLibAPI): RTLD_NOW. Which is for naught,
+ as this code is not used and has never been used. assert(0)
+
+ * code-sos/botlib/be_interface.c: botimport supposed to be set here.
+ * code-sos/botlib/l_memory.c: segfault with q3_ui/ DLL.
+ #1 0x80e23ec in GetMemory (size=35) at ..//botlib/l_memory.c:331
+ 331 ptr = botimport.GetMemory(size + sizeof(unsigned long int));
+ as botimport is completely NULL'ed.
+
+ * code-sos/q3_ui/q3_ui.sh: created from ui/ui.sh 1.17
+
+ * code-sos/q3_ui/q3_ui.q3asm: unfubared (CR/LF, / path).
+
+ * code-sos/unix/Makefile: added q3_ui/ make targets (basically
+ ui/ targets from CVS 1.17 Makefile for starters).
+
+ * code-sos/q3_ui/: this is the old UI code, which does not use
+ ../ui/menus.txt (see ui/ui_main.c). In other words,
+ the code in ui/ now has to be compiled or qvm'ed
+ for missionpack/, but to create the necessary DLL or
+ QVM modules for baseq3/ we need to use q3_ui/.
+
+
+2000-11-27 Bernd Kreimeier <bk@lokigames.com> *** MISSIONPACK ***
+
+ * code-sos/game/bg_lib.c: ld problem with a custom "tan(..)"
+ TODO: loooking forward to SIGFPE on this code base.
+
+ * code-sos/ui/ui_util.c: this file is empty.
+
+ * code-sos/ui/ui.sh: new files:
+ ui_shared.c
+ ui_util.c
+ Replaced by the /ui/*.menu files:
+ q3lcc: can't find `../ui_cdkey.c'
+ q3lcc: can't find `../ui_ingame.c'
+ etc.
+
+ * code-sos/cgame/cgame.q3asm: added cg_newdraw entry.
+ Also added ui_shared entry.
+ * cgame/cgame.sh: added cg_newdraw.c entry.
+ Also added ../ui/ui_shared.c entry.
+
+ * code-sos/cgame/cg_newdraw.c: renamed (was cg_newDraw.c mixed case).
+ Note: the infidels have taken over.
+
+ * cgame/cgame.sh: added -DMISSIONPACK.
+ Note: w/o, q3lcc complains
+ ../cg_event.c:204: undeclared identifier `cg_singlePlayerActive'
+ ../cg_event.c:204: left operand of . has incompatible type `int'
+ which indicates that this source does not compile w/o MISSIONPACK
+ anymore. The baseq3/pak4.pk3 file in the Q3TA snapshot archives
+ are dated
+ 284464 11-10-00 14:02 vm/cgame.qvm
+ 463940 11-14-00 14:47 vm/qagame.qvm
+ 271596 11-14-00 14:48 vm/ui.qvm
+ the code dump is from 11-19.
+ Note: Make does not abort on q3lcc complains
+
+ * code-sos/game/game.sh: also added ai_vcmd.c entry.
+
+ * code-sos/ui/ui.q3asm: fubared (below). In addition, this is
+ the only one to have a
+ -o "/tmp/quake3/missionpack/vm/ui"
+ line in it. Given that the other 2 QVM modules are
+ also dependend on -DMISSIONPACK, this seems a real mess.
+ For now using the same path as the other 3.
+ * code-sos/cgame/cgame.q3asm: below.
+ * code-sos/game/game.q3asm: fubared. Fixed CR/LF and \ in paths
+ again (read by q3asm called by game.sh called by make).
+ * unix/Makefile: updated fpor DLL/QVM.
+ Note: also shell scripts to use q3lcc not lcc.
+
+
+2000-11-27 Bernd Kreimeier <bk@lokigames.com>
+
+ * code/unix/Makefile: now expects a run/ directory
+ relative (between this, the Loki standards, and the
+ utility code in the same repository, it's ever so
+ slightly less dorky).
+ TODO: fix broken copyfiles target etc.pp.
+
+ * code/game/bg_lib.c: turns out the changes I
+ undid 001120 were affecting original Zoid
+ Linux port related defines, which break VM
+ compile. Mike fixed those (which I unfixed
+ when referring to the latest id code that does
+ not contain these patches). However, they
+ duplicate ANSI libc symbols, so the guards might
+ be wrong. The symbols are missing when compiling
+ for VM, so I now use the existing lcc -DQ3_VM
+ flag:
+ //#if !defined ( _MSC_VER ) && ! defined ( __linux__ )
+ #if defined ( Q3_VM )
+ This will break DLL compile on non-ANSI platforms,
+ which will have to be added to the conditional then.
+
+ * code/ui/ui.sh: below.
+ * code/game/game.sh: below.
+ * code/cgame/cgame.sh: Linux SDK installs q3lcc to
+ avoid collisions with regular lcc pre-installs. The
+ scripts fail with "lcc not found", but do not abort
+ the Makefile.
+ Note: now that VM code gets actually built, there
+ are errors:
+ g_main:648 ERROR: symbol vsprintf undefined
+ bg_pmove:1221 ERROR: symbol abs undefined
+ q_math:4309 ERROR: symbol fabs undefined
+ q_shared:2801 ERROR: symbol tolower undefined
+ q_shared:2862 ERROR: symbol toupper undefined
+ ai_dmq3:208 ERROR: symbol atoi undefined
+ ai_cmd:4951 ERROR: symbol sscanf undefined
+
+
+2000-11-20 Bernd Kreimeier <bk@lokigames.com>
+
+ * TEST: test compile of pr-1.17+cvs fixes segfaults due
+ to new baseq3/pak4.pk3
+ Note: to self ... 1.17 is not compatible with new files.
+ Checking into CVS next.
+
+ * code/: changes applied by us that are not in id's code base
+ affect q_shared.c (NULL in Q_stricmp), files.c (FIXME fs_cdpath,
+ Sys_ConcatenateFileList, ui_demo2.c (demo no tolower on linux).
+ In unix/ linux_glimp.c (joystick code), qgl.h, linux_qgl.c (__FX__),
+ unix_main.c (dlopen bug and event buffers), unix_net.c (readcount),
+ matha.s (assembly warning).
+
+ * code/server/sv_client.c (SV_WriteDownloadToClient):
+ No effective change on FS_SV_FOpenFileRead call, they reworked
+ autodownload some more seemingly.
+
+ * code/renderer/tr_surface.c: VectorArrayNormalize
+
+ * code/qcommon/qcommon.h: see below.
+ * code/qcommon/files.c: Com_ReadConfigs removed.
+ * code/qcommon/common.c: removed Com_ReadConfigs,
+ textual replacement of body in Com_Init.
+
+ * code/mac/mac_net.c: not applied (undone by id)
+ OTConfiguration *config <> OTConfigurationRef config
+
+ * code/mac/mac_glimp2.c: r_colorbits->integer > 16
+ * code/game/surfaceflags.h (CONTENTS_BOTCLIP): added.
+
+ * code/game/q_shared.h: not applied (undone by id)
+ #if defined(ppc) || defined(__ppc) || defined(__ppc__)
+ #define idppc 1
+ #else
+ #define idppc 0
+ #endif
+
+ * code/game/q_math.c: added another CPP line to guard
+ BoxOnPlaneSide, removed WIN32 guard.
+ TODO: this could be broken code guarded in all current
+ compiles...
+
+ * code/game/bg_lib.c: left Q#_VM guard for typedef cmp_t
+ Added !defined( __linux__ ) for tolower and atoi.
+ Note: the changes above relate to the very last code update
+ from id prior to the 6 month blackout, which were not in
+ CVS when Michael made his updates. Needed to establish the
+ baseline for the new patch. Source dump 1.17.00520, against
+ SOS 1.26w-001119 version.
+
+2000-11-20 Bernd Kreimeier <bk@lokigames.com> *** MISSIONPACK ***
+
+ * TEST: running against the data up to TeamArena_Q3A_001109.zip
+ Hunk_Clear: reset the hunk ok
+ Program received signal SIGBUS, Bus error.
+ "q3dm2", killBots==qtrue
+ #0 CM_ClearMap () at ..//qcommon/cm_load.c:644
+ #1 0x80884a7 in SV_Map_f () at ..//server/sv_ccmds.c:159
+ #2 0x8072579 in Cmd_ExecuteString (text=0xbffff4b0 "spmap q3dm2") at ..//qcommon/cmd.c:591
+ #3 0x8071dfe in Cbuf_Execute () at ..//qcommon/cmd.c:190
+ #4 0x80763f7 in Com_Frame () at ..//qcommon/common.c:2547
+ #5 0x8130d6b in main (argc=13, argv=0xbffff984) at ..//unix/unix_main.c:953
+ #6 0x40100cb3 in __libc_start_main (main=0x8130bc4 <main>
+ Not reproducible (screen stayed black).
+
+ * TEST: +set developer 1, same for Win32 and Linux:
+ Can't find gfx/misc/flare.tga
+ Can't find gfx/misc/sun.tga
+ Can't find gfx/misc/console02.tga
+ Can't find vm/ui.map
+ Can't find textures/sfx/logo512.tga
+ Can't find gfx/colors/black.tga
+ Can't find models/mapobjects/banner/banner5_2.md3
+ Can't find models/mapobjects/banner/banner5_1.md3
+ Can't find textures/sfx/firegorre2.tga
+ Can't find textures/sfx/bolts.tga
+ Can't find menu/art/unknownmap.tga
+
+ * Q3TA: after nearly 6 months, a code update from id. SOS access
+ even. Got it to compile, link and start, but its currently broken
+ (menu doesn't render in full, can't get into game etc.). Need
+ a baseline 1.17 to diff against. Last code dump was May 16, with
+ bspc code updated May 19. Checking working directory of bk000520
+ against CVS next (Mike's fixes never made it into id's codebase
+ or a post 1.17 release, neither did my fixes as released in the
+ point release version 1.17).
+
+2000-11-19 Bernd Kreimeier <bk@lokigames.com> *** MISSIONPACK ***
+
+ * TEST: Win32 install as tested with 1.26w. quake3.x86 (Q3A game)
+ Warning: cvar "r_uifullscreen" given initial values: "1" and "0"
+ Warning: cvar "r_inGameVideo" given initial values: "1" and "0"
+ ^3WARNING: sound/feedback/hit.wav is a 8 bit wav file
+ (on windows, sound/weapons/weapon_hover.wav is missing...)
+ Menu only partially displayed in TA and baseq3 play, menu itself
+ seems to work. Freetype?
+ WARNING: Com_PushEvent overflow
+
+ * code-sos/game/game.sh: not in SOS, moved in from CVS snapshot.
+
+ * code-sos/qcommon/common.c: conditional DEDICATED to get rid off
+ CL_ShutdownCGame/CL_ShutdownUI/CIN_CloseAllVideos.
+ Same for UI_usesUniqueCDKey: dedicated server does not
+ write CD key file.
+ TODO: check whether there is an unneeded "read CD key"
+ for dedicated server.
+
+ * code-sos/null/null_client.c (CL_ShutdownAll): added dummy.
+
+ * code-sos/unix/Makefile: server/sv_net_chan.o for dedicated server.
+
+ * code-sos/null/null_snddma.c: fixed S_RegisterSound signature.
+
+ * code-sos/client/snd_mix.c: snd_p, snd_linear_count, snd_out
+ can't be static, as used by unix/snd_mixa.s.
+
+ * code-sos/unix/Makefile: added to the executable target:
+ renderer/tr_font.c
+ client/cl_net_chan.c
+ server/sv_net_chan.c
+ Also added a lot of jc*.c files to build, to fix unresolved
+ symbol errors.
+ TODO: is there unused jpeg-6/jd*.o code linked in now?
+
+ * code-sos/ft2/smooth.c: includes ftgrays.c, ftsmooth.c
+
+ * code-sos/ft2/truetype.c: ttdriver.c, ttpload.c, ttgload.c, ttobjs.c.
+ Also (see ftoption.h) TT_CONFIG_OPTION_BYTECODE_INTERPRETER ttinterp.c
+
+ * code-sos/ft2/sfnt.c: includes ttload.c, ttcmap.c, sfobjs.c,
+ sfdriver.c. lso (see ftoption.h)
+ TT_CONFIG_OPTION_EMBEDDED_BITMAPS ttsbit.c
+ TT_CONFIG_OPTION_POSTSCRIPT_NAMES ttpost.c
+
+ * code-sos/ft2/ftbase.c: includes ftcalc.c, ftobjs.c, ftstream.c,
+ ftlist.c, ftoutln.c, ftextend.c, ftnames.c.
+
+ * code-sos/ft2/autohint.c: includes ahangles.c, ahglyph.c, ahglobal.c,
+ ahhint.c, ahmodule.c.
+
+ * code-sos/unix/Makefile: added ft2/ to client objects, took out
+ ftraster.c/ftrend1.c (see below), added -DFT_FLAT_COMPILE.
+ * ft2/ftsmooth.c: -DFT_FLAT_COMPILE required.
+ * ft2/raster1.c: -DFT_FLAT_COMPILE required.
+ Note: this includes ftraster.c/ftrend1.c.
+
+ * code-sos/qcommon/vm_x86.c: _ftol is missing, ftolPtr only defined
+ for Win32, but used in generic code. Workaround for now.
+ TODO: find good Linux ftol, or use old solution.
+
+ * SoS checkout. chown -R a+w * recode ibmpc:lat1 */*.h */*.c
+
+2000-06-30 Michael Vance <briraeos@lokigames.com>
+
+ * misc: Spoke with Leonardo about qvm mess.
+
+ * ui/ui.sh: Created to build much like the ui.bat script.
+
+ * ui/ui.q3asm: Use linux style paths.
+
+ * game/game.sh: Created to build much like the game.bat script.
+
+ * game/game.q3asm: Use linux style paths.
+
+ * cgame/cgame.sh: Created to build much like the cgame.bat script.
+
+ * cgame/cgame.q3asm: Use linux systel paths.
+
+ * unix/Makefile: Use the new .sh scripts to build the QVM files.
+
+ * lcc/etc/linux.c: Build .asm files instead of .s files.
+
+ * misc: QVMs now load properly, with minor glitches that should
+ hopefully be solvable. The new build scripts conflict with the
+ .asm files already in CVS, as the generated byte code is slightly
+ different in some cases.
+
+2000-06-29 Michael Vance <briareos@lokigames.com>
+
+ * lcc/makefile: Tweaked to automatically include the system
+ compiler's header location. Added an install directory.
+
+ * lcc/custom.mk: Added a build directory.
+
+ * lcc/etc/linux.c: Numerous small tweaks to make compiling the VM
+ code a much simpler task.
+
+ * q3asm/Makefile: Created.
+
+ * q3asm/q3asm.c: Fixed uninitialized variable in
+ HashString(). Fixed off by one in argument parsing.
+
+ * misc: Had Brian remove the Xmd.h include from glx.h so that we can
+ build Quake3 on XFree86 4.0 systems.
+
+ * wine: Attempted to build with lcc.exe and q3asm.exe using wine,
+ also did not work. This is in contrast to MikeP's .qvms, which
+ seem to work.
+
+2000-06-28 Michael Vance <briareos@lokigames.com>
+
+ * common/files.c: Fixed Mods menu behaviour.
+
+ * unix/linux_qgl.c: Guarded references to fxMesa.
+
+ * renderer/qgl.h: Guarded references to fxMesa.
+
+ * ui/ui_demo2.c: Don't convert filename to uppercase.
+
+2000-05-07 Bernd Kreimeier <bk@lokigames.com>
+
+ * common/cmdlib.c: windowism, not guarded. Added WIN32 around "ATOM a".
+
+ * q3map/Makefile: Linux Makefile.
+
+ * q3map/Makefile.irix: "makefile" in original code, Irix-only Makefile.
+ Just fixed some redundant TAB that GNU make despises about as much as I
+ despise GNU Make, and changed to a relative path.
+
+2000-05-01 Bernd Kreimeier <bk@lokigames.com>
+
+ * q3radiant/: updated with Q3Radiant198b3-src.zip.
+ Tagged (globally) as q3radiant-198b3.
+ Kept the old files
+ 3DFXCamWnd.h
+ 3DFXCamWnd.cpp
+ MainFrm2.cpp
+ New files
+ Shaders.h
+ misc/ (contributed special TGA resources, don't relly belong)
+ Removed:
+ pName
+ Changed filenames to previous case:
+ UNNAMED.MAP -> unnamed.map
+ RES/BMP0002.BMP -> RES/bmp00002.bmp
+ Changed:
+ changelog.txt -> ChangeLog
+
+2000-04-28 Bernd Kreimeier <bk@lokigames.com>
+
+ * CVS: bk000425 modified sources. This replaces the unix/ directory
+ which is not yet in id's SourceSafe. Two check-ins, due to minor
+ changes in an attempt to nail the Voodoo3 related crashes (driver
+ problems, not a Q3 issue). Undid some of the QFL changes for PI
+ and the log bug fix - put back in (TODO). Also includes:
+ * Quake3/code/botlib/be_aas_sample.c: single file update from Robert.
+
+ * CVS: id000423 code dumps (two of them). Applying Loki patches.
+ Tagged for the final version (all patches).
+
+ * CVS: id000422 code dump. This did not include the 1.16n fixes
+ used for Linux, and was the first dump for the 1.17 security fix
+ release.
+ Note: forgot to check in the ft2/ headers themselves, but they
+ are not used in the current codebase anyway. Are added in next
+ dump. Also there is use of CVS/CVS-like $Keyword$ patterns in
+ some files, and between their revisions and ours we fuck this up.
+ Also, id ZIP files create write protected sources, have to do
+ chmod -R a+w Quake3/ to work and overwrite files.
+
+ * CVS: bk000315 modified source. This version was the 1.16n release.
+ Note: the changes applied here are not in the subsequent code dumps
+ of id. If you want to compile the Linux version as released you
+ have to use bk-tagged versions until the patches are merged in by
+ Robert Duffy.
+
+ * CVS: id000314 engine code dump, same procedure as below, tag.
+ Note: this version added vm/ sudirectories with assembly files
+ for cgame, game, ui. CVS tag id000314.
+
+ * CVS: id000304 engine code dump. Now there is a problem, as CVS
+ was used in the Mac sources. Do
+ find . -name 'CVS' -exec rm -r {} \;
+ before cvs update, then tagged:
+ cvs -d /loki/cvsroot/ tag id000304 Quake3/
+
+ * CVS: checked in a source snapshot of the id00303 engine code
+ and the id0003029 tools code. The tool sources are not fully in
+ sync, and we have only partial source from earlier engine revisions.
+ The engine source marks where Loki took over from Dave Kirsch.
+ This snapshot (with all temporary and bogus files) is imported
+ and tagged using:
+ cvs -d /loki/cvsroot import Quake3 id000303 initial
+
+ Modules:
+ code: the Q3 engine code, including a jpeg-6/ copy
+ common: code shared by tools
+ libs: code shared by tools, inlcuding a jpeg6/ copy
+ q3asm: VM bytecode assembly
+ q3data: misc. Q3 data conversions
+ q3map: BSP builder
+ q3radiant: Win32 editor, as is
+ lcc: C compiler for q3asm
+
+ The sources have not been cleaned up, and binary files have not been
+ removed. The Q3Radiant code base might exhibit mixed case asmbiguities
+ in the future, and future source dumps might come from SourceForge
+ instead.
+
+2000-04-25 Bernd Kreimeier <bk@lokigames.com>
+
+ * q3code.id000425/unix/Makefile: relative path, relocatable.
+ Note: first code merge with id, finally :-).
+
+2000-04-24 Bernd Kreimeier <bk@lokigames.com>
+
+ * q3code.bk000422/unix/matha.s: in C(BoxOnPlaneSide)
+ the following line triggers assembler warning:
+ "missing prefix `*' in absolute indirect address, maybe misassembled!"
+ jmp Ljmptab(,%eax,4)
+
+
+ * q3code.bk000422/unix/Makefile (MOUNT_DIR): rember to change.
+ TODO: fix this bloody Makefile to be relocatable, damnit.
+
+ * q3code.bk000422/cgame/cg_event.c: applied JCash fix again
+ (see EV_EVENT_BITS below). Send e-mail to verify.
+
+ * q3code.bk000422/renderer/tr_image.c: "../jpeg-6/jpeglib.h" again.
+
+ * q3code.bk000422/: created from the id dump of today, lacking
+ all but one of my changes (sigh). Swapped unix/ competely, takes
+ care of 90%. Submitted all changes again to Robert...
+
+2000-04-19 Bernd Kreimeier <bk@lokigames.com>
+
+ * q3code.bk000315/unix/linux_glimp.c (GLimp_EndFrame):
+ QGL_EnableLogging( r_logFile->value ) doesn't work?
+
+ * q3code.bk000315/unix/linux_qgl.c: GLimp_LogNewFrame() is
+ obsolete. QGL_EnableLogging was out of sync with Win32 and
+ did not support the new framecounter decrement logic.
+
+2000-04-03 Bernd Kreimeier <bk@lokigames.com>
+
+ * q3code.bk000315/server/sv_snapshot.c: svs.nextSnapshotEntities
+ is a signed integer unconditionally incremented, which gets
+ negative and causes a segfaulting indexing an array. Added reset
+ to counter. Might fail if snapshot numbers are supposed to
+ monotonically increase.
+
+2000-04-02 Bernd Kreimeier <bk@lokigames.com>
+
+ * q3code.bk000315/client/cl_parse.c (CL_ParseServerMessage):
+ assert(0) on Illegible message (remember to +set in_mouse 0).
+ TODO: have to add a dump message function, it's unreadable.
+
+ * botlib/be_ai_goal.c (InitLevelItemHeap): loop counter -2
+ left -2 with uninitialized next, and -1 disconnected. Removed
+ redundant memset. There is an item alloc leak I suspect, as
+ max_levelitems 1024 merely delayed the overflow error.
+
+2000-04-01 Bernd Kreimeier <bk@lokigames.com>
+
+ * botlib/be_ai_goal.c (InitLevelItemHeap): still segfaults.
+ Not memsetting the entire item heap. As items are cleared
+ on return, that leaves only memory corruption?
+ Later: upped max_levelitems from 256 to 1024
+ Later: client dies on connect:
+ Error: CL_ParseServerMessage: Illegible server message 255
+
+
+2000-03-31 Bernd Kreimeier <bk@lokigames.com>
+
+ * botlib/be_ai_goal.c: initializing global vars.
+ Segfault in AllocLevelItem ()
+ at /home/bk/Games/Quake3/q3code/botlib/be_ai_goal.c:364
+ I suspect that the initial freelevelitems setting is at
+ the end of the list and eventually exposed.
+
+ * cgame/cg_event.c: according to Johmn Cash:
+ itemNum = (es->event & ~EV_EVENT_BITS) - EV_USE_ITEM0
+ Quote: "This causes itemNum to be invalid about half the time,
+ preventing any client side effect tied to the item from occurring."
+
+2000-03-06 Bernd Kreimeier <bk@lokigames.com>
+
+ * qcommon/common.c: set pushEvent buffer and indices
+ to zero in Com_Init().
+
+ * q3code/qcommon/qcommon.h: made SE_NONE (and for paranoia
+ also NA_BOT) explicitely set to zero.
+
+2000-02-27 Bernd Kreimeier <bk@lokigames.com>
+
+ * unix/Makefile: added dmalloc in an attempt to get on
+ the Z_Free bug. Futile. Despite stripping dmalloc debug
+ token down to essentials, I get a (seemingly bogus or
+ unrelated):
+ debug-malloc library: dumping program, fatal error
+ Error: possibly bad .c filename pointer (err 24)
+
+
+2000-02-26 Bernd Kreimeier <bk@lokigames.com>
+
+ * qcommon/common.c: various debug builts to isolate the
+ Z_Free bug. It reproducibly happens on some machines
+ with SE_PACKET, but the packets themselves look
+ thoroughly corrupted.
+
+2000-02-21 Bernd Kreimeier <bk@lokigames.com>
+
+ * qcommon/common.c (Com_EventLoop): possible problem
+ here, pointer does not get cleared.
+
+ * unix/linux_glimp.c (InitSig): no signal handler.
+ * common/common.c: dump in Com_Error for debug.
+
+2000-02-17 Bernd Kreimeier <bk@lokigames.com>
+
+ * q3code: new dump from Zoid. Repeat tr_image.c fix.
+
+ * unix/Makefile: added client/snd_adpcm.c (linkage errors).
+ Later: added entire JPDIR and rules, for tr_image.c.
+ Later: had to fix fules for game/ai_*.c files.
+ Later: removed ui/ui_quit.o (n/a)
+ Later: took out -mpentiumpro -march=pentiumpro
+
+ * renderer/tr_image.c: windowism in #include path (see below).
+ #include "..\jpeg-6\jpeglib.h"
+
+1999-12-27 Bernd Kreimeier <bk@lokigames.com>
+
+ * Alpha: tried a dedicated server compile. Segfaults in
+ ../qcommon/files.c:1682, a paksort function doing pointer
+ fiddling.
+
+ * Makefile.alpha: created.
+ Note: want to take the SDL/Setup autoconf ASAP.
+
+ * unix/unix_main.c: fixed __axp__ to __alpha__, guarded
+ _FPU_SETCW.
+
+ * qcommon/vm_alpha.c: dummy, created.
+ * qcommon/vm_null.c: dummy, created.
+
+1999-12-04 Bernd Kreimeier <bk@lokigames.com>
+
+ * renderer/tr_image.c: windowism in #include path.
+ #include "..\jpeg-6\jpeglib.h"
+
+ * Revision 1.11: from Zoid by e-mail.
+ Note: threw away my playground copy, starting with the
+ ZIP file. Zoid's using CVS now, but we can't remote
+ access it. Thus did the
+ "find . -name 'CVS' -exec rm -rf {} \;"
+ and then track it as 3rd party source by
+
+
+ * ChangeLog: created. Now starting to track Q3A source.
+
+--------- q3code log ---------------------------------------------
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..fc0f468
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,2334 @@
+#
+# ioq3 Makefile
+#
+# GNU Make required
+#
+
+COMPILE_PLATFORM=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]')
+
+COMPILE_ARCH=$(shell uname -m | sed -e s/i.86/i386/)
+
+ifeq ($(COMPILE_PLATFORM),sunos)
+ # Solaris uname and GNU uname differ
+ COMPILE_ARCH=$(shell uname -p | sed -e s/i.86/i386/)
+endif
+ifeq ($(COMPILE_PLATFORM),darwin)
+ # Apple does some things a little differently...
+ COMPILE_ARCH=$(shell uname -p | sed -e s/i.86/i386/)
+endif
+
+ifeq ($(COMPILE_PLATFORM),mingw32)
+ ifeq ($(COMPILE_ARCH),i386)
+ COMPILE_ARCH=x86
+ endif
+endif
+
+ifndef BUILD_STANDALONE
+ BUILD_STANDALONE =
+endif
+ifndef BUILD_CLIENT
+ BUILD_CLIENT =
+endif
+ifndef BUILD_CLIENT_SMP
+ BUILD_CLIENT_SMP =
+endif
+ifndef BUILD_SERVER
+ BUILD_SERVER =
+endif
+ifndef BUILD_GAME_SO
+ BUILD_GAME_SO =
+endif
+ifndef BUILD_GAME_QVM
+ BUILD_GAME_QVM =
+endif
+ifndef BUILD_MISSIONPACK
+ BUILD_MISSIONPACK=
+endif
+
+ifneq ($(PLATFORM),darwin)
+ BUILD_CLIENT_SMP = 0
+endif
+
+#############################################################################
+#
+# If you require a different configuration from the defaults below, create a
+# new file named "Makefile.local" in the same directory as this file and define
+# your parameters there. This allows you to change configuration without
+# causing problems with keeping up to date with the repository.
+#
+#############################################################################
+-include Makefile.local
+
+ifndef PLATFORM
+PLATFORM=$(COMPILE_PLATFORM)
+endif
+export PLATFORM
+
+ifeq ($(COMPILE_ARCH),powerpc)
+ COMPILE_ARCH=ppc
+endif
+ifeq ($(COMPILE_ARCH),powerpc64)
+ COMPILE_ARCH=ppc64
+endif
+
+ifndef ARCH
+ARCH=$(COMPILE_ARCH)
+endif
+export ARCH
+
+ifneq ($(PLATFORM),$(COMPILE_PLATFORM))
+ CROSS_COMPILING=1
+else
+ CROSS_COMPILING=0
+
+ ifneq ($(ARCH),$(COMPILE_ARCH))
+ CROSS_COMPILING=1
+ endif
+endif
+export CROSS_COMPILING
+
+ifndef COPYDIR
+COPYDIR="/usr/local/games/quake3"
+endif
+
+ifndef COPYBINDIR
+COPYBINDIR=$(COPYDIR)
+endif
+
+ifndef MOUNT_DIR
+MOUNT_DIR=code
+endif
+
+ifndef BUILD_DIR
+BUILD_DIR=build
+endif
+
+ifndef GENERATE_DEPENDENCIES
+GENERATE_DEPENDENCIES=1
+endif
+
+ifndef USE_OPENAL
+USE_OPENAL=1
+endif
+
+ifndef USE_OPENAL_DLOPEN
+USE_OPENAL_DLOPEN=1
+endif
+
+ifndef USE_CURL
+USE_CURL=1
+endif
+
+ifndef USE_CURL_DLOPEN
+ ifeq ($(PLATFORM),mingw32)
+ USE_CURL_DLOPEN=0
+ else
+ USE_CURL_DLOPEN=1
+ endif
+endif
+
+ifndef USE_CODEC_VORBIS
+USE_CODEC_VORBIS=0
+endif
+
+ifndef USE_MUMBLE
+USE_MUMBLE=1
+endif
+
+ifndef USE_VOIP
+USE_VOIP=1
+endif
+
+ifndef USE_INTERNAL_SPEEX
+USE_INTERNAL_SPEEX=1
+endif
+
+ifndef USE_INTERNAL_ZLIB
+USE_INTERNAL_ZLIB=1
+endif
+
+ifndef USE_LOCAL_HEADERS
+USE_LOCAL_HEADERS=1
+endif
+
+ifndef DEBUG_CFLAGS
+DEBUG_CFLAGS=-g -O0
+endif
+
+#############################################################################
+
+BD=$(BUILD_DIR)/debug-$(PLATFORM)-$(ARCH)
+BR=$(BUILD_DIR)/release-$(PLATFORM)-$(ARCH)
+CDIR=$(MOUNT_DIR)/client
+SDIR=$(MOUNT_DIR)/server
+RDIR=$(MOUNT_DIR)/renderer
+CMDIR=$(MOUNT_DIR)/qcommon
+SDLDIR=$(MOUNT_DIR)/sdl
+PNDDIR=$(MOUNT_DIR)/pnd
+ASMDIR=$(MOUNT_DIR)/asm
+SYSDIR=$(MOUNT_DIR)/sys
+GDIR=$(MOUNT_DIR)/game
+CGDIR=$(MOUNT_DIR)/cgame
+BLIBDIR=$(MOUNT_DIR)/botlib
+NDIR=$(MOUNT_DIR)/null
+UIDIR=$(MOUNT_DIR)/ui
+Q3UIDIR=$(MOUNT_DIR)/q3_ui
+JPDIR=$(MOUNT_DIR)/jpeg-6b
+SPEEXDIR=$(MOUNT_DIR)/libspeex
+ZDIR=$(MOUNT_DIR)/zlib
+Q3ASMDIR=$(MOUNT_DIR)/tools/asm
+LBURGDIR=$(MOUNT_DIR)/tools/lcc/lburg
+Q3CPPDIR=$(MOUNT_DIR)/tools/lcc/cpp
+Q3LCCETCDIR=$(MOUNT_DIR)/tools/lcc/etc
+Q3LCCSRCDIR=$(MOUNT_DIR)/tools/lcc/src
+LOKISETUPDIR=misc/setup
+NSISDIR=misc/nsis
+SDLHDIR=$(MOUNT_DIR)/SDL12
+LIBSDIR=$(MOUNT_DIR)/libs
+TEMPDIR=/tmp
+
+bin_path=$(shell which $(1) 2> /dev/null)
+
+# We won't need this if we only build the server
+ifneq ($(BUILD_CLIENT),0)
+ # set PKG_CONFIG_PATH to influence this, e.g.
+ # PKG_CONFIG_PATH=/opt/cross/i386-mingw32msvc/lib/pkgconfig
+ ifneq ($(call bin_path, pkg-config),)
+ CURL_CFLAGS=$(shell pkg-config --silence-errors --cflags libcurl)
+ CURL_LIBS=$(shell pkg-config --silence-errors --libs libcurl)
+ OPENAL_CFLAGS=$(shell pkg-config --silence-errors --cflags openal)
+ OPENAL_LIBS=$(shell pkg-config --silence-errors --libs openal)
+ SDL_CFLAGS=$(shell pkg-config --silence-errors --cflags sdl|sed 's/-Dmain=SDL_main//')
+ SDL_LIBS=$(shell pkg-config --silence-errors --libs sdl)
+ endif
+ # Use sdl-config if all else fails
+ ifeq ($(SDL_CFLAGS),)
+ ifneq ($(call bin_path, sdl-config),)
+ SDL_CFLAGS=$(shell sdl-config --cflags)
+ SDL_LIBS=$(shell sdl-config --libs)
+ endif
+ endif
+endif
+
+# version info
+VERSION=1.36
+
+USE_SVN=
+ifeq ($(wildcard .svn),.svn)
+ SVN_REV=$(shell LANG=C svnversion .)
+ ifneq ($(SVN_REV),)
+ VERSION:=$(VERSION)_SVN$(SVN_REV)
+ USE_SVN=1
+ endif
+else
+ifeq ($(wildcard .git/svn/.metadata),.git/svn/.metadata)
+ SVN_REV=$(shell LANG=C git svn info | awk '$$1 == "Revision:" {print $$2; exit 0}')
+ ifneq ($(SVN_REV),)
+ VERSION:=$(VERSION)_SVN$(SVN_REV)
+ endif
+endif
+endif
+
+
+#############################################################################
+# SETUP AND BUILD -- LINUX
+#############################################################################
+
+## Defaults
+LIB=lib
+
+INSTALL=install
+MKDIR=mkdir
+PERL=perl
+
+ifeq ($(PLATFORM),linux)
+
+ ifeq ($(ARCH),alpha)
+ ARCH=axp
+ else
+ ifeq ($(ARCH),x86_64)
+ LIB=lib64
+ else
+ ifeq ($(ARCH),ppc64)
+ LIB=lib64
+ else
+ ifeq ($(ARCH),s390x)
+ LIB=lib64
+ endif
+ endif
+ endif
+ endif
+
+ BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
+ -pipe -DUSE_ICON
+ CLIENT_CFLAGS = $(SDL_CFLAGS)
+ SERVER_CFLAGS =
+
+ ifeq ($(USE_OPENAL),1)
+ CLIENT_CFLAGS += -DUSE_OPENAL
+ ifeq ($(USE_OPENAL_DLOPEN),1)
+ CLIENT_CFLAGS += -DUSE_OPENAL_DLOPEN
+ endif
+ endif
+
+ ifeq ($(USE_CURL),1)
+ CLIENT_CFLAGS += -DUSE_CURL
+ ifeq ($(USE_CURL_DLOPEN),1)
+ CLIENT_CFLAGS += -DUSE_CURL_DLOPEN
+ endif
+ endif
+
+ ifeq ($(USE_CODEC_VORBIS),1)
+ CLIENT_CFLAGS += -DUSE_CODEC_VORBIS
+ endif
+
+ OPTIMIZEVM = -O3 -funroll-loops -fomit-frame-pointer
+ OPTIMIZE = $(OPTIMIZEVM) -ffast-math
+
+ ifeq ($(ARCH),x86_64)
+ OPTIMIZEVM = -O3 -fomit-frame-pointer -funroll-loops \
+ -falign-loops=2 -falign-jumps=2 -falign-functions=2 \
+ -fstrength-reduce
+ OPTIMIZE = $(OPTIMIZEVM) -ffast-math
+ HAVE_VM_COMPILED = true
+ else
+ ifeq ($(ARCH),i386)
+ OPTIMIZEVM = -O3 -march=i586 -fomit-frame-pointer \
+ -funroll-loops -falign-loops=2 -falign-jumps=2 \
+ -falign-functions=2 -fstrength-reduce
+ OPTIMIZE = $(OPTIMIZEVM) -ffast-math
+ HAVE_VM_COMPILED=true
+ else
+ ifeq ($(ARCH),ppc)
+ BASE_CFLAGS += -maltivec
+ HAVE_VM_COMPILED=true
+ endif
+ ifeq ($(ARCH),ppc64)
+ BASE_CFLAGS += -maltivec
+ HAVE_VM_COMPILED=true
+ endif
+ ifeq ($(ARCH),sparc)
+ OPTIMIZE += -mtune=ultrasparc3 -mv8plus
+ OPTIMIZEVM += -mtune=ultrasparc3 -mv8plus
+ HAVE_VM_COMPILED=true
+ endif
+ ifeq ($(ARCH),arm)
+ BASE_CFLAGS += -DPANDORA -I$(PNDSDK)/usr/include
+ OPTIMIZE += -O3 -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp \
+ -mfpu=neon -ftree-vectorize -ffast-math -fomit-frame-pointer -fno-strict-aliasing -fsingle-precision-constant
+ SDL_CFLAGS=`$(PNDSDK)/usr/bin/sdl-config --cflags`
+ SDL_LIBS=`$(PNDSDK)/usr/bin/sdl-config --libs`
+ BASE_CFLAGS += -I$(PNDSDK)/usr/include/EGL/ -I$(PNDSDK)/usr/include/GLES/
+ OPTIMIZEVM = -O3 -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp \
+ -mfpu=neon -ftree-vectorize -ffast-math -fomit-frame-pointer -fno-strict-aliasing -fsingle-precision-constant
+ endif
+ endif
+ endif
+
+ ifneq ($(HAVE_VM_COMPILED),true)
+ BASE_CFLAGS += -DNO_VM_COMPILED
+ endif
+
+ SHLIBEXT=so
+ SHLIBCFLAGS=-fPIC -fvisibility=hidden
+ SHLIBLDFLAGS=-shared $(LDFLAGS)
+
+ THREAD_LIBS=-lpthread
+ LIBS=-ldl -lm
+
+ CLIENT_LIBS=$(SDL_LIBS) -lGL
+
+ ifeq ($(ARCH),arm)
+ CLIENT_LIBS = $(SDL_LIBS) -lGLES_CM -lX11
+ endif
+
+ ifeq ($(USE_OPENAL),1)
+ ifneq ($(USE_OPENAL_DLOPEN),1)
+ CLIENT_LIBS += -lopenal
+ endif
+ endif
+
+ ifeq ($(USE_CURL),1)
+ ifneq ($(USE_CURL_DLOPEN),1)
+ CLIENT_LIBS += -lcurl
+ endif
+ endif
+
+ ifeq ($(USE_CODEC_VORBIS),1)
+ CLIENT_LIBS += -lvorbisfile -lvorbis -logg
+ endif
+
+ ifeq ($(USE_MUMBLE),1)
+ CLIENT_LIBS += -lrt
+ endif
+
+ ifeq ($(USE_LOCAL_HEADERS),1)
+ CLIENT_CFLAGS += -I$(SDLHDIR)/include
+ endif
+
+ ifeq ($(ARCH),i386)
+ # linux32 make ...
+ BASE_CFLAGS += -m32
+ else
+ ifeq ($(ARCH),ppc64)
+ BASE_CFLAGS += -m64
+ endif
+ endif
+else # ifeq Linux
+
+#############################################################################
+# SETUP AND BUILD -- MAC OS X
+#############################################################################
+
+ifeq ($(PLATFORM),darwin)
+ HAVE_VM_COMPILED=true
+ CLIENT_LIBS=
+ OPTIMIZEVM=
+
+ BASE_CFLAGS = -Wall -Wimplicit -Wstrict-prototypes
+ CLIENT_CFLAGS =
+ SERVER_CFLAGS =
+
+ ifeq ($(ARCH),ppc)
+ BASE_CFLAGS += -faltivec
+ OPTIMIZEVM += -O3
+ endif
+ ifeq ($(ARCH),ppc64)
+ BASE_CFLAGS += -faltivec
+ endif
+ ifeq ($(ARCH),i386)
+ OPTIMIZEVM += -march=prescott -mfpmath=sse
+ # x86 vm will crash without -mstackrealign since MMX instructions will be
+ # used no matter what and they corrupt the frame pointer in VM calls
+ BASE_CFLAGS += -mstackrealign
+ endif
+
+ BASE_CFLAGS += -fno-strict-aliasing -DMACOS_X -fno-common -pipe
+
+ ifeq ($(USE_OPENAL),1)
+ BASE_CFLAGS += -DUSE_OPENAL
+ ifneq ($(USE_OPENAL_DLOPEN),1)
+ CLIENT_LIBS += -framework OpenAL
+ else
+ CLIENT_CFLAGS += -DUSE_OPENAL_DLOPEN
+ endif
+ endif
+
+ ifeq ($(USE_CURL),1)
+ CLIENT_CFLAGS += -DUSE_CURL
+ ifneq ($(USE_CURL_DLOPEN),1)
+ CLIENT_LIBS += -lcurl
+ else
+ CLIENT_CFLAGS += -DUSE_CURL_DLOPEN
+ endif
+ endif
+
+ ifeq ($(USE_CODEC_VORBIS),1)
+ CLIENT_CFLAGS += -DUSE_CODEC_VORBIS
+ CLIENT_LIBS += -lvorbisfile -lvorbis -logg
+ endif
+
+ BASE_CFLAGS += -D_THREAD_SAFE=1
+
+ ifeq ($(USE_LOCAL_HEADERS),1)
+ BASE_CFLAGS += -I$(SDLHDIR)/include
+ endif
+
+ # We copy sdlmain before ranlib'ing it so that subversion doesn't think
+ # the file has been modified by each build.
+ LIBSDLMAIN=$(B)/libSDLmain.a
+ LIBSDLMAINSRC=$(LIBSDIR)/macosx/libSDLmain.a
+ CLIENT_LIBS += -framework Cocoa -framework IOKit -framework OpenGL \
+ $(LIBSDIR)/macosx/libSDL-1.2.0.dylib
+
+ OPTIMIZEVM += -falign-loops=16
+ OPTIMIZE = $(OPTIMIZEVM) -ffast-math
+
+ ifneq ($(HAVE_VM_COMPILED),true)
+ BASE_CFLAGS += -DNO_VM_COMPILED
+ endif
+
+ SHLIBEXT=dylib
+ SHLIBCFLAGS=-fPIC -fno-common
+ SHLIBLDFLAGS=-dynamiclib $(LDFLAGS)
+
+ NOTSHLIBCFLAGS=-mdynamic-no-pic
+
+ TOOLS_CFLAGS += -DMACOS_X
+
+else # ifeq darwin
+
+
+#############################################################################
+# SETUP AND BUILD -- MINGW32
+#############################################################################
+
+ifeq ($(PLATFORM),mingw32)
+
+ # Some MinGW installations define CC to cc, but don't actually provide cc,
+ # so explicitly use gcc instead (which is the only option anyway)
+ ifeq ($(call bin_path, $(CC)),)
+ CC=gcc
+ endif
+
+ ifndef WINDRES
+ WINDRES=windres
+ endif
+
+ ARCH=x86
+
+ BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
+ -DUSE_ICON
+ CLIENT_CFLAGS =
+ SERVER_CFLAGS =
+
+ # In the absence of wspiapi.h, require Windows XP or later
+ ifeq ($(shell test -e $(CMDIR)/wspiapi.h; echo $$?),1)
+ BASE_CFLAGS += -DWINVER=0x501
+ endif
+
+ ifeq ($(USE_OPENAL),1)
+ CLIENT_CFLAGS += -DUSE_OPENAL
+ CLIENT_CFLAGS += $(OPENAL_CFLAGS)
+ ifeq ($(USE_OPENAL_DLOPEN),1)
+ CLIENT_CFLAGS += -DUSE_OPENAL_DLOPEN
+ else
+ CLIENT_LDFLAGS += $(OPENAL_LDFLAGS)
+ endif
+ endif
+
+ ifeq ($(USE_CODEC_VORBIS),1)
+ CLIENT_CFLAGS += -DUSE_CODEC_VORBIS
+ endif
+
+ OPTIMIZEVM = -O3 -march=i586 -fno-omit-frame-pointer \
+ -falign-loops=2 -funroll-loops -falign-jumps=2 -falign-functions=2 \
+ -fstrength-reduce
+ OPTIMIZE = $(OPTIMIZEVM) -ffast-math
+
+ HAVE_VM_COMPILED = true
+
+ SHLIBEXT=dll
+ SHLIBCFLAGS=
+ SHLIBLDFLAGS=-shared $(LDFLAGS)
+
+ BINEXT=.exe
+
+ LIBS= -lws2_32 -lwinmm
+ CLIENT_LDFLAGS = -mwindows
+ CLIENT_LIBS = -lgdi32 -lole32 -lopengl32
+
+ ifeq ($(USE_CURL),1)
+ CLIENT_CFLAGS += -DUSE_CURL
+ CLIENT_CFLAGS += $(CURL_CFLAGS)
+ ifneq ($(USE_CURL_DLOPEN),1)
+ ifeq ($(USE_LOCAL_HEADERS),1)
+ CLIENT_CFLAGS += -DCURL_STATICLIB
+ CLIENT_LIBS += $(LIBSDIR)/win32/libcurl.a
+ else
+ CLIENT_LIBS += $(CURL_LIBS)
+ endif
+ endif
+ endif
+
+ ifeq ($(USE_CODEC_VORBIS),1)
+ CLIENT_LIBS += -lvorbisfile -lvorbis -logg
+ endif
+
+ ifeq ($(ARCH),x86)
+ # build 32bit
+ BASE_CFLAGS += -m32
+ endif
+
+ # libmingw32 must be linked before libSDLmain
+ CLIENT_LIBS += -lmingw32
+ ifeq ($(USE_LOCAL_HEADERS),1)
+ CLIENT_CFLAGS += -I$(SDLHDIR)/include
+ CLIENT_LIBS += $(LIBSDIR)/win32/libSDLmain.a \
+ $(LIBSDIR)/win32/libSDL.dll.a
+ else
+ CLIENT_CFLAGS += $(SDL_CFLAGS)
+ CLIENT_LIBS += $(SDL_LIBS)
+ endif
+
+ BUILD_CLIENT_SMP = 0
+
+else # ifeq mingw32
+
+#############################################################################
+# SETUP AND BUILD -- FREEBSD
+#############################################################################
+
+ifeq ($(PLATFORM),freebsd)
+
+ # flags
+ BASE_CFLAGS = $(shell env MACHINE_ARCH=$(ARCH) make -f /dev/null -VCFLAGS) \
+ -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
+ -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON
+ CLIENT_CFLAGS = $(SDL_CFLAGS)
+ SERVER_CFLAGS =
+ HAVE_VM_COMPILED = true
+
+ OPTIMIZEVM = -O3 -funroll-loops -fomit-frame-pointer -ffast-math
+ OPTIMIZE = $(OPTIMIZEVM)
+
+ SHLIBEXT=so
+ SHLIBCFLAGS=-fPIC
+ SHLIBLDFLAGS=-shared $(LDFLAGS)
+
+ THREAD_LIBS=-lpthread
+ # don't need -ldl (FreeBSD)
+ LIBS=-lm
+
+ CLIENT_LIBS =
+
+ CLIENT_LIBS += $(SDL_LIBS) -lGL
+
+ # optional features/libraries
+ ifeq ($(USE_OPENAL),1)
+ CLIENT_CFLAGS += -DUSE_OPENAL
+ ifeq ($(USE_OPENAL_DLOPEN),1)
+ CLIENT_CFLAGS += -DUSE_OPENAL_DLOPEN
+ CLIENT_LIBS += $(THREAD_LIBS) -lopenal
+ endif
+ endif
+
+ ifeq ($(USE_CURL),1)
+ CLIENT_CFLAGS += -DUSE_CURL
+ ifeq ($(USE_CURL_DLOPEN),1)
+ CLIENT_CFLAGS += -DUSE_CURL_DLOPEN
+ CLIENT_LIBS += -lcurl
+ endif
+ endif
+
+ ifeq ($(USE_CODEC_VORBIS),1)
+ CLIENT_CFLAGS += -DUSE_CODEC_VORBIS
+ endif
+
+ ifeq ($(USE_CODEC_VORBIS),1)
+ CLIENT_LIBS += -lvorbisfile -lvorbis -logg
+ endif
+
+ ifeq ($(USE_MUMBLE),1)
+ CLIENT_LIBS += -lrt
+ endif
+
+ # cross-compiling tweaks
+ ifeq ($(ARCH),i386)
+ ifeq ($(CROSS_COMPILING),1)
+ BASE_CFLAGS += -m32
+ endif
+ endif
+ ifeq ($(ARCH),amd64)
+ ifeq ($(CROSS_COMPILING),1)
+ BASE_CFLAGS += -m64
+ endif
+ endif
+
+else # ifeq freebsd
+
+#############################################################################
+# SETUP AND BUILD -- OPENBSD
+#############################################################################
+
+ifeq ($(PLATFORM),openbsd)
+
+ #default to i386, no tests done on anything else
+ ARCH=i386
+
+ BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
+ -DUSE_ICON
+ CLIENT_CFLAGS = $(SDL_CFLAGS)
+ SERVER_CFLAGS =
+
+ ifeq ($(USE_OPENAL),1)
+ CLIENT_CFLAGS += -DUSE_OPENAL
+ ifeq ($(USE_OPENAL_DLOPEN),1)
+ CLIENT_CFLAGS += -DUSE_OPENAL_DLOPEN
+ endif
+ endif
+
+ ifeq ($(USE_CODEC_VORBIS),1)
+ CLIENT_CFLAGS += -DUSE_CODEC_VORBIS
+ endif
+
+ ifeq ($(USE_CURL),1)
+ CLIENT_CFLAGS += -DUSE_CURL $(CURL_CFLAGS)
+ USE_CURL_DLOPEN=0
+ endif
+
+ BASE_CFLAGS += -DNO_VM_COMPILED
+ HAVE_VM_COMPILED=false
+
+ SHLIBEXT=so
+ SHLIBNAME=.$(SHLIBEXT)
+ SHLIBCFLAGS=-fPIC
+ SHLIBLDFLAGS=-shared $(LDFLAGS)
+
+ THREAD_LIBS=-pthread
+ LIBS=-lm
+
+ CLIENT_LIBS =
+
+ CLIENT_LIBS += $(SDL_LIBS) -lGL
+
+ ifeq ($(USE_OPENAL),1)
+ ifneq ($(USE_OPENAL_DLOPEN),1)
+ CLIENT_LIBS += $(THREAD_LIBS) -lossaudio -lopenal
+ endif
+ endif
+
+ ifeq ($(USE_CODEC_VORBIS),1)
+ CLIENT_LIBS += -lvorbisfile -lvorbis -logg
+ endif
+
+ ifeq ($(USE_CURL),1)
+ ifneq ($(USE_CURL_DLOPEN),1)
+ CLIENT_LIBS += -lcurl
+ endif
+ endif
+
+else # ifeq openbsd
+
+#############################################################################
+# SETUP AND BUILD -- NETBSD
+#############################################################################
+
+ifeq ($(PLATFORM),netbsd)
+
+ ifeq ($(shell uname -m),i386)
+ ARCH=i386
+ endif
+
+ LIBS=-lm
+ SHLIBEXT=so
+ SHLIBCFLAGS=-fPIC
+ SHLIBLDFLAGS=-shared $(LDFLAGS)
+ THREAD_LIBS=-lpthread
+
+ BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes
+ CLIENT_CFLAGS =
+ SERVER_CFLAGS =
+
+ ifneq ($(ARCH),i386)
+ BASE_CFLAGS += -DNO_VM_COMPILED
+ endif
+
+ BUILD_CLIENT = 0
+ BUILD_GAME_QVM = 0
+
+else # ifeq netbsd
+
+#############################################################################
+# SETUP AND BUILD -- IRIX
+#############################################################################
+
+ifeq ($(PLATFORM),irix64)
+
+ ARCH=mips #default to MIPS
+
+ CC = c99
+ MKDIR = mkdir -p
+
+ BASE_CFLAGS=-Dstricmp=strcasecmp -Xcpluscomm -woff 1185 \
+ -I. -I$(ROOT)/usr/include -DNO_VM_COMPILED
+ CLIENT_CFLAGS = $(SDL_CFLAGS)
+ OPTIMIZE = -O3
+
+ SHLIBEXT=so
+ SHLIBCFLAGS=
+ SHLIBLDFLAGS=-shared
+
+ LIBS=-ldl -lm -lgen
+ # FIXME: The X libraries probably aren't necessary?
+ CLIENT_LIBS=-L/usr/X11/$(LIB) $(SDL_LIBS) -lGL \
+ -lX11 -lXext -lm
+
+else # ifeq IRIX
+
+#############################################################################
+# SETUP AND BUILD -- SunOS
+#############################################################################
+
+ifeq ($(PLATFORM),sunos)
+
+ CC=gcc
+ INSTALL=ginstall
+ MKDIR=gmkdir
+ COPYDIR="/usr/local/share/games/quake3"
+
+ ifneq (,$(findstring i86pc,$(shell uname -m)))
+ ARCH=i386
+ else #default to sparc
+ ARCH=sparc
+ endif
+
+ ifneq ($(ARCH),i386)
+ ifneq ($(ARCH),sparc)
+ $(error arch $(ARCH) is currently not supported)
+ endif
+ endif
+
+ BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
+ -pipe -DUSE_ICON
+ CLIENT_CFLAGS = $(SDL_CFLAGS)
+ SERVER_CFLAGS =
+
+ OPTIMIZEVM = -O3 -funroll-loops
+
+ ifeq ($(ARCH),sparc)
+ OPTIMIZEVM += -O3 \
+ -fstrength-reduce -falign-functions=2 \
+ -mtune=ultrasparc3 -mv8plus -mno-faster-structs
+ HAVE_VM_COMPILED=true
+ else
+ ifeq ($(ARCH),i386)
+ OPTIMIZEVM += -march=i586 -fomit-frame-pointer \
+ -falign-loops=2 -falign-jumps=2 \
+ -falign-functions=2 -fstrength-reduce
+ HAVE_VM_COMPILED=true
+ BASE_CFLAGS += -m32
+ CLIENT_CFLAGS += -I/usr/X11/include/NVIDIA
+ CLIENT_LDFLAGS += -L/usr/X11/lib/NVIDIA -R/usr/X11/lib/NVIDIA
+ endif
+ endif
+
+ OPTIMIZE = $(OPTIMIZEVM) -ffast-math
+
+ ifneq ($(HAVE_VM_COMPILED),true)
+ BASE_CFLAGS += -DNO_VM_COMPILED
+ endif
+
+ SHLIBEXT=so
+ SHLIBCFLAGS=-fPIC
+ SHLIBLDFLAGS=-shared $(LDFLAGS)
+
+ THREAD_LIBS=-lpthread
+ LIBS=-lsocket -lnsl -ldl -lm
+
+ BOTCFLAGS=-O0
+
+ CLIENT_LIBS +=$(SDL_LIBS) -lGL -lX11 -lXext -liconv -lm
+
+else # ifeq sunos
+
+#############################################################################
+# SETUP AND BUILD -- GENERIC
+#############################################################################
+ BASE_CFLAGS=-DNO_VM_COMPILED
+ OPTIMIZE = -O3
+
+ SHLIBEXT=so
+ SHLIBCFLAGS=-fPIC
+ SHLIBLDFLAGS=-shared
+
+endif #Linux
+endif #darwin
+endif #mingw32
+endif #FreeBSD
+endif #OpenBSD
+endif #NetBSD
+endif #IRIX
+endif #SunOS
+
+TARGETS =
+
+ifndef FULLBINEXT
+ FULLBINEXT=.$(ARCH)$(BINEXT)
+endif
+
+ifndef SHLIBNAME
+ SHLIBNAME=$(ARCH).$(SHLIBEXT)
+endif
+
+ifneq ($(BUILD_SERVER),0)
+ TARGETS += $(B)/ioq3ded$(FULLBINEXT)
+endif
+
+ifneq ($(BUILD_CLIENT),0)
+ TARGETS += $(B)/ioquake3$(FULLBINEXT)
+ ifneq ($(BUILD_CLIENT_SMP),0)
+ TARGETS += $(B)/ioquake3-smp$(FULLBINEXT)
+ endif
+endif
+
+ifneq ($(BUILD_GAME_SO),0)
+ TARGETS += \
+ $(B)/baseq3/cgame$(SHLIBNAME) \
+ $(B)/baseq3/qagame$(SHLIBNAME) \
+ $(B)/baseq3/ui$(SHLIBNAME)
+ ifneq ($(BUILD_MISSIONPACK),0)
+ TARGETS += \
+ $(B)/missionpack/cgame$(SHLIBNAME) \
+ $(B)/missionpack/qagame$(SHLIBNAME) \
+ $(B)/missionpack/ui$(SHLIBNAME)
+ endif
+endif
+
+ifneq ($(BUILD_GAME_QVM),0)
+ ifneq ($(CROSS_COMPILING),1)
+ TARGETS += \
+ $(B)/baseq3/vm/cgame.qvm \
+ $(B)/baseq3/vm/qagame.qvm \
+ $(B)/baseq3/vm/ui.qvm
+ ifneq ($(BUILD_MISSIONPACK),0)
+ TARGETS += \
+ $(B)/missionpack/vm/qagame.qvm \
+ $(B)/missionpack/vm/cgame.qvm \
+ $(B)/missionpack/vm/ui.qvm
+ endif
+ endif
+endif
+
+ifeq ($(USE_MUMBLE),1)
+ CLIENT_CFLAGS += -DUSE_MUMBLE
+endif
+
+ifeq ($(USE_VOIP),1)
+ CLIENT_CFLAGS += -DUSE_VOIP
+ SERVER_CFLAGS += -DUSE_VOIP
+ ifeq ($(USE_INTERNAL_SPEEX),1)
+ CLIENT_CFLAGS += -DFLOATING_POINT -DUSE_ALLOCA -I$(SPEEXDIR)/include
+ else
+ CLIENT_LIBS += -lspeex -lspeexdsp
+ endif
+endif
+
+ifeq ($(USE_INTERNAL_ZLIB),1)
+ BASE_CFLAGS += -DNO_GZIP
+ ifneq ($(USE_LOCAL_HEADERS),1)
+ BASE_CFLAGS += -I$(ZDIR)
+ endif
+else
+ LIBS += -lz
+endif
+
+ifdef DEFAULT_BASEDIR
+ BASE_CFLAGS += -DDEFAULT_BASEDIR=\\\"$(DEFAULT_BASEDIR)\\\"
+endif
+
+ifeq ($(USE_LOCAL_HEADERS),1)
+ BASE_CFLAGS += -DUSE_LOCAL_HEADERS
+endif
+
+ifeq ($(BUILD_STANDALONE),1)
+ BASE_CFLAGS += -DSTANDALONE
+endif
+
+ifeq ($(GENERATE_DEPENDENCIES),1)
+ DEPEND_CFLAGS = -MMD
+else
+ DEPEND_CFLAGS =
+endif
+
+ifeq ($(NO_STRIP),1)
+ STRIP_FLAG =
+else
+ STRIP_FLAG = -s
+endif
+
+BASE_CFLAGS += -DPRODUCT_VERSION=\\\"$(VERSION)\\\"
+
+ifeq ($(V),1)
+echo_cmd=@:
+Q=
+else
+echo_cmd=@echo
+Q=@
+endif
+
+define DO_CC
+$(echo_cmd) "CC $<"
+$(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(CLIENT_CFLAGS) $(OPTIMIZE) -o $@ -c $<
+endef
+
+define DO_PERL
+$(echo_cmd) "PERL $@"
+$(Q)$(PERL) $< > $@
+endef
+
+define DO_SMP_CC
+$(echo_cmd) "SMP_CC $<"
+$(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(CLIENT_CFLAGS) $(OPTIMIZE) -DSMP -o $@ -c $<
+endef
+
+define DO_BOT_CC
+$(echo_cmd) "BOT_CC $<"
+$(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(BOTCFLAGS) $(OPTIMIZE) -DBOTLIB -o $@ -c $<
+endef
+
+ifeq ($(GENERATE_DEPENDENCIES),1)
+ DO_QVM_DEP=cat $(@:%.o=%.d) | sed -e 's/\.o/\.asm/g' >> $(@:%.o=%.d)
+endif
+
+define DO_SHLIB_CC
+$(echo_cmd) "SHLIB_CC $<"
+$(Q)$(CC) $(SHLIBCFLAGS) $(CFLAGS) $(OPTIMIZEVM) -o $@ -c $<
+$(Q)$(DO_QVM_DEP)
+endef
+
+define DO_GAME_CC
+$(echo_cmd) "GAME_CC $<"
+$(Q)$(CC) -DQAGAME $(SHLIBCFLAGS) $(CFLAGS) $(OPTIMIZEVM) -o $@ -c $<
+$(Q)$(DO_QVM_DEP)
+endef
+
+define DO_CGAME_CC
+$(echo_cmd) "CGAME_CC $<"
+$(Q)$(CC) -DCGAME $(SHLIBCFLAGS) $(CFLAGS) $(OPTIMIZEVM) -o $@ -c $<
+$(Q)$(DO_QVM_DEP)
+endef
+
+define DO_UI_CC
+$(echo_cmd) "UI_CC $<"
+$(Q)$(CC) -DUI $(SHLIBCFLAGS) $(CFLAGS) $(OPTIMIZEVM) -o $@ -c $<
+$(Q)$(DO_QVM_DEP)
+endef
+
+define DO_SHLIB_CC_MISSIONPACK
+$(echo_cmd) "SHLIB_CC_MISSIONPACK $<"
+$(Q)$(CC) -DMISSIONPACK $(SHLIBCFLAGS) $(CFLAGS) $(OPTIMIZEVM) -o $@ -c $<
+$(Q)$(DO_QVM_DEP)
+endef
+
+define DO_GAME_CC_MISSIONPACK
+$(echo_cmd) "GAME_CC_MISSIONPACK $<"
+$(Q)$(CC) -DMISSIONPACK -DQAGAME $(SHLIBCFLAGS) $(CFLAGS) $(OPTIMIZEVM) -o $@ -c $<
+$(Q)$(DO_QVM_DEP)
+endef
+
+define DO_CGAME_CC_MISSIONPACK
+$(echo_cmd) "CGAME_CC_MISSIONPACK $<"
+$(Q)$(CC) -DMISSIONPACK -DCGAME $(SHLIBCFLAGS) $(CFLAGS) $(OPTIMIZEVM) -o $@ -c $<
+$(Q)$(DO_QVM_DEP)
+endef
+
+define DO_UI_CC_MISSIONPACK
+$(echo_cmd) "UI_CC_MISSIONPACK $<"
+$(Q)$(CC) -DMISSIONPACK -DUI $(SHLIBCFLAGS) $(CFLAGS) $(OPTIMIZEVM) -o $@ -c $<
+$(Q)$(DO_QVM_DEP)
+endef
+
+define DO_AS
+$(echo_cmd) "AS $<"
+$(Q)$(CC) $(CFLAGS) $(OPTIMIZE) -x assembler-with-cpp -o $@ -c $<
+endef
+
+define DO_DED_CC
+$(echo_cmd) "DED_CC $<"
+$(Q)$(CC) $(NOTSHLIBCFLAGS) -DDEDICATED $(CFLAGS) $(SERVER_CFLAGS) $(OPTIMIZE) -o $@ -c $<
+endef
+
+define DO_WINDRES
+$(echo_cmd) "WINDRES $<"
+$(Q)$(WINDRES) -i $< -o $@
+endef
+
+
+#############################################################################
+# MAIN TARGETS
+#############################################################################
+
+default: release
+all: debug release
+
+debug:
+ @$(MAKE) targets B=$(BD) CFLAGS="$(CFLAGS) $(BASE_CFLAGS) $(DEPEND_CFLAGS)" \
+ OPTIMIZE="$(DEBUG_CFLAGS)" OPTIMIZEVM="$(DEBUG_CFLAGS)" \
+ CLIENT_CFLAGS="$(CLIENT_CFLAGS)" SERVER_CFLAGS="$(SERVER_CFLAGS)" V=$(V)
+
+release:
+ @$(MAKE) targets B=$(BR) CFLAGS="$(CFLAGS) $(BASE_CFLAGS) $(DEPEND_CFLAGS)" \
+ OPTIMIZE="-DNDEBUG $(OPTIMIZE)" OPTIMIZEVM="-DNDEBUG $(OPTIMIZEVM)" \
+ CLIENT_CFLAGS="$(CLIENT_CFLAGS)" SERVER_CFLAGS="$(SERVER_CFLAGS)" V=$(V)
+
+# Create the build directories, check libraries and print out
+# an informational message, then start building
+targets: makedirs
+ @echo ""
+ @echo "Building ioquake3 in $(B):"
+ @echo " PLATFORM: $(PLATFORM)"
+ @echo " ARCH: $(ARCH)"
+ @echo " VERSION: $(VERSION)"
+ @echo " COMPILE_PLATFORM: $(COMPILE_PLATFORM)"
+ @echo " COMPILE_ARCH: $(COMPILE_ARCH)"
+ @echo " CC: $(CC)"
+ @echo ""
+ @echo " CFLAGS:"
+ -@for i in $(CFLAGS); \
+ do \
+ echo " $$i"; \
+ done
+ -@for i in $(OPTIMIZE); \
+ do \
+ echo " $$i"; \
+ done
+ @echo ""
+ @echo " CLIENT_CFLAGS:"
+ -@for i in $(CLIENT_CFLAGS); \
+ do \
+ echo " $$i"; \
+ done
+ @echo ""
+ @echo " SERVER_CFLAGS:"
+ -@for i in $(SERVER_CFLAGS); \
+ do \
+ echo " $$i"; \
+ done
+ @echo ""
+ @echo " LDFLAGS:"
+ -@for i in $(LDFLAGS); \
+ do \
+ echo " $$i"; \
+ done
+ @echo ""
+ @echo " LIBS:"
+ -@for i in $(LIBS); \
+ do \
+ echo " $$i"; \
+ done
+ @echo ""
+ @echo " CLIENT_LIBS:"
+ -@for i in $(CLIENT_LIBS); \
+ do \
+ echo " $$i"; \
+ done
+ @echo ""
+ @echo " Output:"
+ -@for i in $(TARGETS); \
+ do \
+ echo " $$i"; \
+ done
+ @echo ""
+ifneq ($(TARGETS),)
+ @$(MAKE) $(TARGETS) V=$(V)
+endif
+
+makedirs:
+ @if [ ! -d $(BUILD_DIR) ];then $(MKDIR) $(BUILD_DIR);fi
+ @if [ ! -d $(B) ];then $(MKDIR) $(B);fi
+ @if [ ! -d $(B)/client ];then $(MKDIR) $(B)/client;fi
+ @if [ ! -d $(B)/clientsmp ];then $(MKDIR) $(B)/clientsmp;fi
+ @if [ ! -d $(B)/ded ];then $(MKDIR) $(B)/ded;fi
+ @if [ ! -d $(B)/baseq3 ];then $(MKDIR) $(B)/baseq3;fi
+ @if [ ! -d $(B)/baseq3/cgame ];then $(MKDIR) $(B)/baseq3/cgame;fi
+ @if [ ! -d $(B)/baseq3/game ];then $(MKDIR) $(B)/baseq3/game;fi
+ @if [ ! -d $(B)/baseq3/ui ];then $(MKDIR) $(B)/baseq3/ui;fi
+ @if [ ! -d $(B)/baseq3/qcommon ];then $(MKDIR) $(B)/baseq3/qcommon;fi
+ @if [ ! -d $(B)/baseq3/vm ];then $(MKDIR) $(B)/baseq3/vm;fi
+ @if [ ! -d $(B)/missionpack ];then $(MKDIR) $(B)/missionpack;fi
+ @if [ ! -d $(B)/missionpack/cgame ];then $(MKDIR) $(B)/missionpack/cgame;fi
+ @if [ ! -d $(B)/missionpack/game ];then $(MKDIR) $(B)/missionpack/game;fi
+ @if [ ! -d $(B)/missionpack/ui ];then $(MKDIR) $(B)/missionpack/ui;fi
+ @if [ ! -d $(B)/missionpack/qcommon ];then $(MKDIR) $(B)/missionpack/qcommon;fi
+ @if [ ! -d $(B)/missionpack/vm ];then $(MKDIR) $(B)/missionpack/vm;fi
+ @if [ ! -d $(B)/tools ];then $(MKDIR) $(B)/tools;fi
+ @if [ ! -d $(B)/tools/asm ];then $(MKDIR) $(B)/tools/asm;fi
+ @if [ ! -d $(B)/tools/etc ];then $(MKDIR) $(B)/tools/etc;fi
+ @if [ ! -d $(B)/tools/rcc ];then $(MKDIR) $(B)/tools/rcc;fi
+ @if [ ! -d $(B)/tools/cpp ];then $(MKDIR) $(B)/tools/cpp;fi
+ @if [ ! -d $(B)/tools/lburg ];then $(MKDIR) $(B)/tools/lburg;fi
+
+#############################################################################
+# QVM BUILD TOOLS
+#############################################################################
+
+TOOLS_OPTIMIZE = -g -O2 -Wall -fno-strict-aliasing
+TOOLS_CFLAGS += $(TOOLS_OPTIMIZE) \
+ -DTEMPDIR=\"$(TEMPDIR)\" -DSYSTEM=\"\" \
+ -I$(Q3LCCSRCDIR) \
+ -I$(LBURGDIR)
+TOOLS_LIBS =
+TOOLS_LDFLAGS =
+
+ifeq ($(GENERATE_DEPENDENCIES),1)
+ TOOLS_CFLAGS += -MMD
+endif
+
+define DO_TOOLS_CC
+$(echo_cmd) "TOOLS_CC $<"
+$(Q)$(CC) $(TOOLS_CFLAGS) -o $@ -c $<
+endef
+
+define DO_TOOLS_CC_DAGCHECK
+$(echo_cmd) "TOOLS_CC_DAGCHECK $<"
+$(Q)$(CC) $(TOOLS_CFLAGS) -Wno-unused -o $@ -c $<
+endef
+
+LBURG = $(B)/tools/lburg/lburg$(BINEXT)
+DAGCHECK_C = $(B)/tools/rcc/dagcheck.c
+Q3RCC = $(B)/tools/q3rcc$(BINEXT)
+Q3CPP = $(B)/tools/q3cpp$(BINEXT)
+Q3LCC = $(B)/tools/q3lcc$(BINEXT)
+Q3ASM = $(B)/tools/q3asm$(BINEXT)
+
+LBURGOBJ= \
+ $(B)/tools/lburg/lburg.o \
+ $(B)/tools/lburg/gram.o
+
+$(B)/tools/lburg/%.o: $(LBURGDIR)/%.c
+ $(DO_TOOLS_CC)
+
+$(LBURG): $(LBURGOBJ)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(TOOLS_CFLAGS) $(TOOLS_LDFLAGS) -o $@ $^ $(TOOLS_LIBS)
+
+Q3RCCOBJ = \
+ $(B)/tools/rcc/alloc.o \
+ $(B)/tools/rcc/bind.o \
+ $(B)/tools/rcc/bytecode.o \
+ $(B)/tools/rcc/dag.o \
+ $(B)/tools/rcc/dagcheck.o \
+ $(B)/tools/rcc/decl.o \
+ $(B)/tools/rcc/enode.o \
+ $(B)/tools/rcc/error.o \
+ $(B)/tools/rcc/event.o \
+ $(B)/tools/rcc/expr.o \
+ $(B)/tools/rcc/gen.o \
+ $(B)/tools/rcc/init.o \
+ $(B)/tools/rcc/inits.o \
+ $(B)/tools/rcc/input.o \
+ $(B)/tools/rcc/lex.o \
+ $(B)/tools/rcc/list.o \
+ $(B)/tools/rcc/main.o \
+ $(B)/tools/rcc/null.o \
+ $(B)/tools/rcc/output.o \
+ $(B)/tools/rcc/prof.o \
+ $(B)/tools/rcc/profio.o \
+ $(B)/tools/rcc/simp.o \
+ $(B)/tools/rcc/stmt.o \
+ $(B)/tools/rcc/string.o \
+ $(B)/tools/rcc/sym.o \
+ $(B)/tools/rcc/symbolic.o \
+ $(B)/tools/rcc/trace.o \
+ $(B)/tools/rcc/tree.o \
+ $(B)/tools/rcc/types.o
+
+$(DAGCHECK_C): $(LBURG) $(Q3LCCSRCDIR)/dagcheck.md
+ $(echo_cmd) "LBURG $(Q3LCCSRCDIR)/dagcheck.md"
+ $(Q)$(LBURG) $(Q3LCCSRCDIR)/dagcheck.md $@
+
+$(B)/tools/rcc/dagcheck.o: $(DAGCHECK_C)
+ $(DO_TOOLS_CC_DAGCHECK)
+
+$(B)/tools/rcc/%.o: $(Q3LCCSRCDIR)/%.c
+ $(DO_TOOLS_CC)
+
+$(Q3RCC): $(Q3RCCOBJ)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(TOOLS_CFLAGS) $(TOOLS_LDFLAGS) -o $@ $^ $(TOOLS_LIBS)
+
+Q3CPPOBJ = \
+ $(B)/tools/cpp/cpp.o \
+ $(B)/tools/cpp/lex.o \
+ $(B)/tools/cpp/nlist.o \
+ $(B)/tools/cpp/tokens.o \
+ $(B)/tools/cpp/macro.o \
+ $(B)/tools/cpp/eval.o \
+ $(B)/tools/cpp/include.o \
+ $(B)/tools/cpp/hideset.o \
+ $(B)/tools/cpp/getopt.o \
+ $(B)/tools/cpp/unix.o
+
+$(B)/tools/cpp/%.o: $(Q3CPPDIR)/%.c
+ $(DO_TOOLS_CC)
+
+$(Q3CPP): $(Q3CPPOBJ)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(TOOLS_CFLAGS) $(TOOLS_LDFLAGS) -o $@ $^ $(TOOLS_LIBS)
+
+Q3LCCOBJ = \
+ $(B)/tools/etc/lcc.o \
+ $(B)/tools/etc/bytecode.o
+
+$(B)/tools/etc/%.o: $(Q3LCCETCDIR)/%.c
+ $(DO_TOOLS_CC)
+
+$(Q3LCC): $(Q3LCCOBJ) $(Q3RCC) $(Q3CPP)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(TOOLS_CFLAGS) $(TOOLS_LDFLAGS) -o $@ $(Q3LCCOBJ) $(TOOLS_LIBS)
+
+define DO_Q3LCC
+$(echo_cmd) "Q3LCC $<"
+$(Q)$(Q3LCC) -o $@ $<
+endef
+
+define DO_CGAME_Q3LCC
+$(echo_cmd) "CGAME_Q3LCC $<"
+$(Q)$(Q3LCC) -DCGAME -o $@ $<
+endef
+
+define DO_GAME_Q3LCC
+$(echo_cmd) "GAME_Q3LCC $<"
+$(Q)$(Q3LCC) -DQAGAME -o $@ $<
+endef
+
+define DO_UI_Q3LCC
+$(echo_cmd) "UI_Q3LCC $<"
+$(Q)$(Q3LCC) -DUI -o $@ $<
+endef
+
+define DO_Q3LCC_MISSIONPACK
+$(echo_cmd) "Q3LCC_MISSIONPACK $<"
+$(Q)$(Q3LCC) -DMISSIONPACK -o $@ $<
+endef
+
+define DO_CGAME_Q3LCC_MISSIONPACK
+$(echo_cmd) "CGAME_Q3LCC_MISSIONPACK $<"
+$(Q)$(Q3LCC) -DMISSIONPACK -DCGAME -o $@ $<
+endef
+
+define DO_GAME_Q3LCC_MISSIONPACK
+$(echo_cmd) "GAME_Q3LCC_MISSIONPACK $<"
+$(Q)$(Q3LCC) -DMISSIONPACK -DQAGAME -o $@ $<
+endef
+
+define DO_UI_Q3LCC_MISSIONPACK
+$(echo_cmd) "UI_Q3LCC_MISSIONPACK $<"
+$(Q)$(Q3LCC) -DMISSIONPACK -DUI -o $@ $<
+endef
+
+
+Q3ASMOBJ = \
+ $(B)/tools/asm/q3asm.o \
+ $(B)/tools/asm/cmdlib.o
+
+$(B)/tools/asm/%.o: $(Q3ASMDIR)/%.c
+ $(DO_TOOLS_CC)
+
+$(Q3ASM): $(Q3ASMOBJ)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(TOOLS_CFLAGS) $(TOOLS_LDFLAGS) -o $@ $^ $(TOOLS_LIBS)
+
+
+#############################################################################
+# CLIENT/SERVER
+#############################################################################
+
+Q3OBJ = \
+ $(B)/client/cl_cgame.o \
+ $(B)/client/cl_cin.o \
+ $(B)/client/cl_console.o \
+ $(B)/client/cl_input.o \
+ $(B)/client/cl_keys.o \
+ $(B)/client/cl_main.o \
+ $(B)/client/cl_net_chan.o \
+ $(B)/client/cl_parse.o \
+ $(B)/client/cl_scrn.o \
+ $(B)/client/cl_ui.o \
+ $(B)/client/cl_avi.o \
+ \
+ $(B)/client/cm_load.o \
+ $(B)/client/cm_patch.o \
+ $(B)/client/cm_polylib.o \
+ $(B)/client/cm_test.o \
+ $(B)/client/cm_trace.o \
+ \
+ $(B)/client/cmd.o \
+ $(B)/client/common.o \
+ $(B)/client/cvar.o \
+ $(B)/client/files.o \
+ $(B)/client/md4.o \
+ $(B)/client/md5.o \
+ $(B)/client/msg.o \
+ $(B)/client/net_chan.o \
+ $(B)/client/net_ip.o \
+ $(B)/client/huffman.o \
+ \
+ $(B)/client/snd_adpcm.o \
+ $(B)/client/snd_dma.o \
+ $(B)/client/snd_mem.o \
+ $(B)/client/snd_mix.o \
+ $(B)/client/snd_wavelet.o \
+ \
+ $(B)/client/snd_main.o \
+ $(B)/client/snd_codec.o \
+ $(B)/client/snd_codec_wav.o \
+ $(B)/client/snd_codec_ogg.o \
+ \
+ $(B)/client/qal.o \
+ $(B)/client/snd_openal.o \
+ \
+ $(B)/client/cl_curl.o \
+ \
+ $(B)/client/sv_bot.o \
+ $(B)/client/sv_ccmds.o \
+ $(B)/client/sv_client.o \
+ $(B)/client/sv_game.o \
+ $(B)/client/sv_init.o \
+ $(B)/client/sv_main.o \
+ $(B)/client/sv_net_chan.o \
+ $(B)/client/sv_snapshot.o \
+ $(B)/client/sv_world.o \
+ \
+ $(B)/client/q_math.o \
+ $(B)/client/q_shared.o \
+ \
+ $(B)/client/unzip.o \
+ $(B)/client/ioapi.o \
+ $(B)/client/puff.o \
+ $(B)/client/vm.o \
+ $(B)/client/vm_interpreted.o \
+ \
+ $(B)/client/be_aas_bspq3.o \
+ $(B)/client/be_aas_cluster.o \
+ $(B)/client/be_aas_debug.o \
+ $(B)/client/be_aas_entity.o \
+ $(B)/client/be_aas_file.o \
+ $(B)/client/be_aas_main.o \
+ $(B)/client/be_aas_move.o \
+ $(B)/client/be_aas_optimize.o \
+ $(B)/client/be_aas_reach.o \
+ $(B)/client/be_aas_route.o \
+ $(B)/client/be_aas_routealt.o \
+ $(B)/client/be_aas_sample.o \
+ $(B)/client/be_ai_char.o \
+ $(B)/client/be_ai_chat.o \
+ $(B)/client/be_ai_gen.o \
+ $(B)/client/be_ai_goal.o \
+ $(B)/client/be_ai_move.o \
+ $(B)/client/be_ai_weap.o \
+ $(B)/client/be_ai_weight.o \
+ $(B)/client/be_ea.o \
+ $(B)/client/be_interface.o \
+ $(B)/client/l_crc.o \
+ $(B)/client/l_libvar.o \
+ $(B)/client/l_log.o \
+ $(B)/client/l_memory.o \
+ $(B)/client/l_precomp.o \
+ $(B)/client/l_script.o \
+ $(B)/client/l_struct.o \
+ \
+ $(B)/client/jcapimin.o \
+ $(B)/client/jcapistd.o \
+ $(B)/client/jccoefct.o \
+ $(B)/client/jccolor.o \
+ $(B)/client/jcdctmgr.o \
+ $(B)/client/jchuff.o \
+ $(B)/client/jcinit.o \
+ $(B)/client/jcmainct.o \
+ $(B)/client/jcmarker.o \
+ $(B)/client/jcmaster.o \
+ $(B)/client/jcomapi.o \
+ $(B)/client/jcparam.o \
+ $(B)/client/jcphuff.o \
+ $(B)/client/jcprepct.o \
+ $(B)/client/jcsample.o \
+ $(B)/client/jdapimin.o \
+ $(B)/client/jdapistd.o \
+ $(B)/client/jdatasrc.o \
+ $(B)/client/jdcoefct.o \
+ $(B)/client/jdcolor.o \
+ $(B)/client/jddctmgr.o \
+ $(B)/client/jdhuff.o \
+ $(B)/client/jdinput.o \
+ $(B)/client/jdmainct.o \
+ $(B)/client/jdmarker.o \
+ $(B)/client/jdmaster.o \
+ $(B)/client/jdpostct.o \
+ $(B)/client/jdsample.o \
+ $(B)/client/jdtrans.o \
+ $(B)/client/jerror.o \
+ $(B)/client/jfdctflt.o \
+ $(B)/client/jidctflt.o \
+ $(B)/client/jmemmgr.o \
+ $(B)/client/jmemnobs.o \
+ $(B)/client/jutils.o \
+ \
+ $(B)/client/tr_animation.o \
+ $(B)/client/tr_backend.o \
+ $(B)/client/tr_bsp.o \
+ $(B)/client/tr_cmds.o \
+ $(B)/client/tr_curve.o \
+ $(B)/client/tr_flares.o \
+ $(B)/client/tr_font.o \
+ $(B)/client/tr_image.o \
+ $(B)/client/tr_image_png.o \
+ $(B)/client/tr_image_jpg.o \
+ $(B)/client/tr_image_bmp.o \
+ $(B)/client/tr_image_tga.o \
+ $(B)/client/tr_image_pcx.o \
+ $(B)/client/tr_init.o \
+ $(B)/client/tr_light.o \
+ $(B)/client/tr_main.o \
+ $(B)/client/tr_marks.o \
+ $(B)/client/tr_mesh.o \
+ $(B)/client/tr_model.o \
+ $(B)/client/tr_noise.o \
+ $(B)/client/tr_scene.o \
+ $(B)/client/tr_shade.o \
+ $(B)/client/tr_shade_calc.o \
+ $(B)/client/tr_shader.o \
+ $(B)/client/tr_shadows.o \
+ $(B)/client/tr_sky.o \
+ $(B)/client/tr_surface.o \
+ $(B)/client/tr_world.o \
+ \
+ $(B)/client/sdl_snd.o \
+ \
+ $(B)/client/con_passive.o \
+ $(B)/client/con_log.o \
+ $(B)/client/sys_main.o
+# $(B)/client/sdl_gamma.o \
+# $(B)/client/sdl_input.o \
+
+ifeq ($(ARCH),i386)
+ Q3OBJ += \
+ $(B)/client/snd_mixa.o \
+ $(B)/client/matha.o \
+ $(B)/client/ftola.o \
+ $(B)/client/snapvectora.o
+endif
+ifeq ($(ARCH),x86)
+ Q3OBJ += \
+ $(B)/client/snd_mixa.o \
+ $(B)/client/matha.o \
+ $(B)/client/ftola.o \
+ $(B)/client/snapvectora.o
+endif
+
+ifeq ($(USE_VOIP),1)
+ifeq ($(USE_INTERNAL_SPEEX),1)
+Q3OBJ += \
+ $(B)/client/bits.o \
+ $(B)/client/buffer.o \
+ $(B)/client/cb_search.o \
+ $(B)/client/exc_10_16_table.o \
+ $(B)/client/exc_10_32_table.o \
+ $(B)/client/exc_20_32_table.o \
+ $(B)/client/exc_5_256_table.o \
+ $(B)/client/exc_5_64_table.o \
+ $(B)/client/exc_8_128_table.o \
+ $(B)/client/fftwrap.o \
+ $(B)/client/filterbank.o \
+ $(B)/client/filters.o \
+ $(B)/client/gain_table.o \
+ $(B)/client/gain_table_lbr.o \
+ $(B)/client/hexc_10_32_table.o \
+ $(B)/client/hexc_table.o \
+ $(B)/client/high_lsp_tables.o \
+ $(B)/client/jitter.o \
+ $(B)/client/kiss_fft.o \
+ $(B)/client/kiss_fftr.o \
+ $(B)/client/lpc.o \
+ $(B)/client/lsp.o \
+ $(B)/client/lsp_tables_nb.o \
+ $(B)/client/ltp.o \
+ $(B)/client/mdf.o \
+ $(B)/client/modes.o \
+ $(B)/client/modes_wb.o \
+ $(B)/client/nb_celp.o \
+ $(B)/client/preprocess.o \
+ $(B)/client/quant_lsp.o \
+ $(B)/client/resample.o \
+ $(B)/client/sb_celp.o \
+ $(B)/client/smallft.o \
+ $(B)/client/speex.o \
+ $(B)/client/speex_callbacks.o \
+ $(B)/client/speex_header.o \
+ $(B)/client/stereo.o \
+ $(B)/client/vbr.o \
+ $(B)/client/vq.o \
+ $(B)/client/window.o
+endif
+endif
+
+ifeq ($(USE_INTERNAL_ZLIB),1)
+Q3OBJ += \
+ $(B)/client/adler32.o \
+ $(B)/client/crc32.o \
+ $(B)/client/inffast.o \
+ $(B)/client/inflate.o \
+ $(B)/client/inftrees.o \
+ $(B)/client/zutil.o
+endif
+
+ifeq ($(HAVE_VM_COMPILED),true)
+ ifeq ($(ARCH),i386)
+ Q3OBJ += $(B)/client/vm_x86.o
+ endif
+ ifeq ($(ARCH),x86)
+ Q3OBJ += $(B)/client/vm_x86.o
+ endif
+ ifeq ($(ARCH),x86_64)
+ Q3OBJ += $(B)/client/vm_x86_64.o $(B)/client/vm_x86_64_assembler.o
+ endif
+ ifeq ($(ARCH),amd64)
+ Q3OBJ += $(B)/client/vm_x86_64.o $(B)/client/vm_x86_64_assembler.o
+ endif
+ ifeq ($(ARCH),ppc)
+ Q3OBJ += $(B)/client/vm_powerpc.o $(B)/client/vm_powerpc_asm.o
+ endif
+ ifeq ($(ARCH),ppc64)
+ Q3OBJ += $(B)/client/vm_powerpc.o $(B)/client/vm_powerpc_asm.o
+ endif
+ ifeq ($(ARCH),sparc)
+ Q3OBJ += $(B)/client/vm_sparc.o
+ endif
+endif
+
+ifeq ($(PLATFORM),mingw32)
+ Q3OBJ += \
+ $(B)/client/win_resource.o \
+ $(B)/client/sys_win32.o
+else
+ Q3OBJ += \
+ $(B)/client/sys_unix.o
+endif
+
+ifeq ($(PLATFORM),darwin)
+ Q3OBJ += \
+ $(B)/client/sys_cocoa.o
+endif
+
+ifeq ($(USE_MUMBLE),1)
+ Q3OBJ += \
+ $(B)/client/libmumblelink.o
+endif
+
+Q3POBJ += \
+ $(B)/client/egl_glimp.o \
+ $(B)/client/egl_input.o \
+ $(B)/client/pnd_event.o
+# $(B)/client/sdl_glimp.o
+
+Q3POBJ_SMP += \
+ $(Q3POBJ)
+# $(B)/clientsmp/sdl_glimp.o
+
+$(B)/ioquake3$(FULLBINEXT): $(Q3OBJ) $(Q3POBJ) $(LIBSDLMAIN)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(CLIENT_CFLAGS) $(CFLAGS) $(CLIENT_LDFLAGS) $(LDFLAGS) \
+ -o $@ $(Q3OBJ) $(Q3POBJ) \
+ $(LIBSDLMAIN) $(CLIENT_LIBS) $(LIBS)
+
+$(B)/ioquake3-smp$(FULLBINEXT): $(Q3OBJ) $(Q3POBJ_SMP) $(LIBSDLMAIN)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(CLIENT_CFLAGS) $(CFLAGS) $(CLIENT_LDFLAGS) $(LDFLAGS) $(THREAD_LDFLAGS) \
+ -o $@ $(Q3OBJ) $(Q3POBJ_SMP) \
+ $(THREAD_LIBS) $(LIBSDLMAIN) $(CLIENT_LIBS) $(LIBS)
+
+ifneq ($(strip $(LIBSDLMAIN)),)
+ifneq ($(strip $(LIBSDLMAINSRC)),)
+$(LIBSDLMAIN) : $(LIBSDLMAINSRC)
+ cp $< $@
+ ranlib $@
+endif
+endif
+
+
+
+#############################################################################
+# DEDICATED SERVER
+#############################################################################
+
+Q3DOBJ = \
+ $(B)/ded/sv_bot.o \
+ $(B)/ded/sv_client.o \
+ $(B)/ded/sv_ccmds.o \
+ $(B)/ded/sv_game.o \
+ $(B)/ded/sv_init.o \
+ $(B)/ded/sv_main.o \
+ $(B)/ded/sv_net_chan.o \
+ $(B)/ded/sv_snapshot.o \
+ $(B)/ded/sv_world.o \
+ \
+ $(B)/ded/cm_load.o \
+ $(B)/ded/cm_patch.o \
+ $(B)/ded/cm_polylib.o \
+ $(B)/ded/cm_test.o \
+ $(B)/ded/cm_trace.o \
+ $(B)/ded/cmd.o \
+ $(B)/ded/common.o \
+ $(B)/ded/cvar.o \
+ $(B)/ded/files.o \
+ $(B)/ded/md4.o \
+ $(B)/ded/msg.o \
+ $(B)/ded/net_chan.o \
+ $(B)/ded/net_ip.o \
+ $(B)/ded/huffman.o \
+ \
+ $(B)/ded/q_math.o \
+ $(B)/ded/q_shared.o \
+ \
+ $(B)/ded/unzip.o \
+ $(B)/ded/ioapi.o \
+ $(B)/ded/vm.o \
+ $(B)/ded/vm_interpreted.o \
+ \
+ $(B)/ded/be_aas_bspq3.o \
+ $(B)/ded/be_aas_cluster.o \
+ $(B)/ded/be_aas_debug.o \
+ $(B)/ded/be_aas_entity.o \
+ $(B)/ded/be_aas_file.o \
+ $(B)/ded/be_aas_main.o \
+ $(B)/ded/be_aas_move.o \
+ $(B)/ded/be_aas_optimize.o \
+ $(B)/ded/be_aas_reach.o \
+ $(B)/ded/be_aas_route.o \
+ $(B)/ded/be_aas_routealt.o \
+ $(B)/ded/be_aas_sample.o \
+ $(B)/ded/be_ai_char.o \
+ $(B)/ded/be_ai_chat.o \
+ $(B)/ded/be_ai_gen.o \
+ $(B)/ded/be_ai_goal.o \
+ $(B)/ded/be_ai_move.o \
+ $(B)/ded/be_ai_weap.o \
+ $(B)/ded/be_ai_weight.o \
+ $(B)/ded/be_ea.o \
+ $(B)/ded/be_interface.o \
+ $(B)/ded/l_crc.o \
+ $(B)/ded/l_libvar.o \
+ $(B)/ded/l_log.o \
+ $(B)/ded/l_memory.o \
+ $(B)/ded/l_precomp.o \
+ $(B)/ded/l_script.o \
+ $(B)/ded/l_struct.o \
+ \
+ $(B)/ded/null_client.o \
+ $(B)/ded/null_input.o \
+ $(B)/ded/null_snddma.o \
+ \
+ $(B)/ded/con_log.o \
+ $(B)/ded/sys_main.o
+
+ifeq ($(ARCH),i386)
+ Q3DOBJ += \
+ $(B)/ded/ftola.o \
+ $(B)/ded/snapvectora.o \
+ $(B)/ded/matha.o
+endif
+ifeq ($(ARCH),x86)
+ Q3DOBJ += \
+ $(B)/ded/ftola.o \
+ $(B)/ded/snapvectora.o \
+ $(B)/ded/matha.o
+endif
+
+ifeq ($(USE_INTERNAL_ZLIB),1)
+Q3DOBJ += \
+ $(B)/ded/adler32.o \
+ $(B)/ded/crc32.o \
+ $(B)/ded/inffast.o \
+ $(B)/ded/inflate.o \
+ $(B)/ded/inftrees.o \
+ $(B)/ded/zutil.o
+endif
+
+ifeq ($(HAVE_VM_COMPILED),true)
+ ifeq ($(ARCH),i386)
+ Q3DOBJ += $(B)/ded/vm_x86.o
+ endif
+ ifeq ($(ARCH),x86)
+ Q3DOBJ += $(B)/ded/vm_x86.o
+ endif
+ ifeq ($(ARCH),x86_64)
+ Q3DOBJ += $(B)/ded/vm_x86_64.o $(B)/ded/vm_x86_64_assembler.o
+ endif
+ ifeq ($(ARCH),amd64)
+ Q3DOBJ += $(B)/ded/vm_x86_64.o $(B)/ded/vm_x86_64_assembler.o
+ endif
+ ifeq ($(ARCH),ppc)
+ Q3DOBJ += $(B)/ded/vm_powerpc.o $(B)/ded/vm_powerpc_asm.o
+ endif
+ ifeq ($(ARCH),ppc64)
+ Q3DOBJ += $(B)/ded/vm_powerpc.o $(B)/ded/vm_powerpc_asm.o
+ endif
+ ifeq ($(ARCH),sparc)
+ Q3DOBJ += $(B)/ded/vm_sparc.o
+ endif
+endif
+
+ifeq ($(PLATFORM),mingw32)
+ Q3DOBJ += \
+ $(B)/ded/win_resource.o \
+ $(B)/ded/sys_win32.o \
+ $(B)/ded/con_win32.o
+else
+ Q3DOBJ += \
+ $(B)/ded/sys_unix.o \
+ $(B)/ded/con_tty.o
+endif
+
+# Not currently referenced in the dedicated server.
+#ifeq ($(PLATFORM),darwin)
+# Q3DOBJ += \
+# $(B)/ded/sys_cocoa.o
+#endif
+
+$(B)/ioq3ded$(FULLBINEXT): $(Q3DOBJ)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(Q3DOBJ) $(LIBS)
+
+
+
+#############################################################################
+## BASEQ3 CGAME
+#############################################################################
+
+Q3CGOBJ_ = \
+ $(B)/baseq3/cgame/cg_main.o \
+ $(B)/baseq3/cgame/bg_misc.o \
+ $(B)/baseq3/cgame/bg_pmove.o \
+ $(B)/baseq3/cgame/bg_slidemove.o \
+ $(B)/baseq3/cgame/bg_lib.o \
+ $(B)/baseq3/cgame/cg_consolecmds.o \
+ $(B)/baseq3/cgame/cg_draw.o \
+ $(B)/baseq3/cgame/cg_drawtools.o \
+ $(B)/baseq3/cgame/cg_effects.o \
+ $(B)/baseq3/cgame/cg_ents.o \
+ $(B)/baseq3/cgame/cg_event.o \
+ $(B)/baseq3/cgame/cg_info.o \
+ $(B)/baseq3/cgame/cg_localents.o \
+ $(B)/baseq3/cgame/cg_marks.o \
+ $(B)/baseq3/cgame/cg_players.o \
+ $(B)/baseq3/cgame/cg_playerstate.o \
+ $(B)/baseq3/cgame/cg_predict.o \
+ $(B)/baseq3/cgame/cg_scoreboard.o \
+ $(B)/baseq3/cgame/cg_servercmds.o \
+ $(B)/baseq3/cgame/cg_snapshot.o \
+ $(B)/baseq3/cgame/cg_view.o \
+ $(B)/baseq3/cgame/cg_weapons.o \
+ \
+ $(B)/baseq3/qcommon/q_math.o \
+ $(B)/baseq3/qcommon/q_shared.o
+
+Q3CGOBJ = $(Q3CGOBJ_) $(B)/baseq3/cgame/cg_syscalls.o
+Q3CGVMOBJ = $(Q3CGOBJ_:%.o=%.asm)
+
+$(B)/baseq3/cgame$(SHLIBNAME): $(Q3CGOBJ)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ)
+
+$(B)/baseq3/vm/cgame.qvm: $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm $(Q3ASM)
+ $(echo_cmd) "Q3ASM $@"
+ $(Q)$(Q3ASM) -o $@ $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm
+
+#############################################################################
+## MISSIONPACK CGAME
+#############################################################################
+
+MPCGOBJ_ = \
+ $(B)/missionpack/cgame/cg_main.o \
+ $(B)/missionpack/cgame/bg_misc.o \
+ $(B)/missionpack/cgame/bg_pmove.o \
+ $(B)/missionpack/cgame/bg_slidemove.o \
+ $(B)/missionpack/cgame/bg_lib.o \
+ $(B)/missionpack/cgame/cg_consolecmds.o \
+ $(B)/missionpack/cgame/cg_newdraw.o \
+ $(B)/missionpack/cgame/cg_draw.o \
+ $(B)/missionpack/cgame/cg_drawtools.o \
+ $(B)/missionpack/cgame/cg_effects.o \
+ $(B)/missionpack/cgame/cg_ents.o \
+ $(B)/missionpack/cgame/cg_event.o \
+ $(B)/missionpack/cgame/cg_info.o \
+ $(B)/missionpack/cgame/cg_localents.o \
+ $(B)/missionpack/cgame/cg_marks.o \
+ $(B)/missionpack/cgame/cg_players.o \
+ $(B)/missionpack/cgame/cg_playerstate.o \
+ $(B)/missionpack/cgame/cg_predict.o \
+ $(B)/missionpack/cgame/cg_scoreboard.o \
+ $(B)/missionpack/cgame/cg_servercmds.o \
+ $(B)/missionpack/cgame/cg_snapshot.o \
+ $(B)/missionpack/cgame/cg_view.o \
+ $(B)/missionpack/cgame/cg_weapons.o \
+ $(B)/missionpack/ui/ui_shared.o \
+ \
+ $(B)/missionpack/qcommon/q_math.o \
+ $(B)/missionpack/qcommon/q_shared.o
+
+MPCGOBJ = $(MPCGOBJ_) $(B)/missionpack/cgame/cg_syscalls.o
+MPCGVMOBJ = $(MPCGOBJ_:%.o=%.asm)
+
+$(B)/missionpack/cgame$(SHLIBNAME): $(MPCGOBJ)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPCGOBJ)
+
+$(B)/missionpack/vm/cgame.qvm: $(MPCGVMOBJ) $(CGDIR)/cg_syscalls.asm $(Q3ASM)
+ $(echo_cmd) "Q3ASM $@"
+ $(Q)$(Q3ASM) -o $@ $(MPCGVMOBJ) $(CGDIR)/cg_syscalls.asm
+
+
+
+#############################################################################
+## BASEQ3 GAME
+#############################################################################
+
+Q3GOBJ_ = \
+ $(B)/baseq3/game/g_main.o \
+ $(B)/baseq3/game/ai_chat.o \
+ $(B)/baseq3/game/ai_cmd.o \
+ $(B)/baseq3/game/ai_dmnet.o \
+ $(B)/baseq3/game/ai_dmq3.o \
+ $(B)/baseq3/game/ai_main.o \
+ $(B)/baseq3/game/ai_team.o \
+ $(B)/baseq3/game/ai_vcmd.o \
+ $(B)/baseq3/game/bg_misc.o \
+ $(B)/baseq3/game/bg_pmove.o \
+ $(B)/baseq3/game/bg_slidemove.o \
+ $(B)/baseq3/game/bg_lib.o \
+ $(B)/baseq3/game/g_active.o \
+ $(B)/baseq3/game/g_arenas.o \
+ $(B)/baseq3/game/g_bot.o \
+ $(B)/baseq3/game/g_client.o \
+ $(B)/baseq3/game/g_cmds.o \
+ $(B)/baseq3/game/g_combat.o \
+ $(B)/baseq3/game/g_items.o \
+ $(B)/baseq3/game/g_mem.o \
+ $(B)/baseq3/game/g_misc.o \
+ $(B)/baseq3/game/g_missile.o \
+ $(B)/baseq3/game/g_mover.o \
+ $(B)/baseq3/game/g_session.o \
+ $(B)/baseq3/game/g_spawn.o \
+ $(B)/baseq3/game/g_svcmds.o \
+ $(B)/baseq3/game/g_target.o \
+ $(B)/baseq3/game/g_team.o \
+ $(B)/baseq3/game/g_trigger.o \
+ $(B)/baseq3/game/g_utils.o \
+ $(B)/baseq3/game/g_weapon.o \
+ \
+ $(B)/baseq3/qcommon/q_math.o \
+ $(B)/baseq3/qcommon/q_shared.o
+
+Q3GOBJ = $(Q3GOBJ_) $(B)/baseq3/game/g_syscalls.o
+Q3GVMOBJ = $(Q3GOBJ_:%.o=%.asm)
+
+$(B)/baseq3/qagame$(SHLIBNAME): $(Q3GOBJ)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ)
+
+$(B)/baseq3/vm/qagame.qvm: $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm $(Q3ASM)
+ $(echo_cmd) "Q3ASM $@"
+ $(Q)$(Q3ASM) -o $@ $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm
+
+#############################################################################
+## MISSIONPACK GAME
+#############################################################################
+
+MPGOBJ_ = \
+ $(B)/missionpack/game/g_main.o \
+ $(B)/missionpack/game/ai_chat.o \
+ $(B)/missionpack/game/ai_cmd.o \
+ $(B)/missionpack/game/ai_dmnet.o \
+ $(B)/missionpack/game/ai_dmq3.o \
+ $(B)/missionpack/game/ai_main.o \
+ $(B)/missionpack/game/ai_team.o \
+ $(B)/missionpack/game/ai_vcmd.o \
+ $(B)/missionpack/game/bg_misc.o \
+ $(B)/missionpack/game/bg_pmove.o \
+ $(B)/missionpack/game/bg_slidemove.o \
+ $(B)/missionpack/game/bg_lib.o \
+ $(B)/missionpack/game/g_active.o \
+ $(B)/missionpack/game/g_arenas.o \
+ $(B)/missionpack/game/g_bot.o \
+ $(B)/missionpack/game/g_client.o \
+ $(B)/missionpack/game/g_cmds.o \
+ $(B)/missionpack/game/g_combat.o \
+ $(B)/missionpack/game/g_items.o \
+ $(B)/missionpack/game/g_mem.o \
+ $(B)/missionpack/game/g_misc.o \
+ $(B)/missionpack/game/g_missile.o \
+ $(B)/missionpack/game/g_mover.o \
+ $(B)/missionpack/game/g_session.o \
+ $(B)/missionpack/game/g_spawn.o \
+ $(B)/missionpack/game/g_svcmds.o \
+ $(B)/missionpack/game/g_target.o \
+ $(B)/missionpack/game/g_team.o \
+ $(B)/missionpack/game/g_trigger.o \
+ $(B)/missionpack/game/g_utils.o \
+ $(B)/missionpack/game/g_weapon.o \
+ \
+ $(B)/missionpack/qcommon/q_math.o \
+ $(B)/missionpack/qcommon/q_shared.o
+
+MPGOBJ = $(MPGOBJ_) $(B)/missionpack/game/g_syscalls.o
+MPGVMOBJ = $(MPGOBJ_:%.o=%.asm)
+
+$(B)/missionpack/qagame$(SHLIBNAME): $(MPGOBJ)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPGOBJ)
+
+$(B)/missionpack/vm/qagame.qvm: $(MPGVMOBJ) $(GDIR)/g_syscalls.asm $(Q3ASM)
+ $(echo_cmd) "Q3ASM $@"
+ $(Q)$(Q3ASM) -o $@ $(MPGVMOBJ) $(GDIR)/g_syscalls.asm
+
+
+
+#############################################################################
+## BASEQ3 UI
+#############################################################################
+
+Q3UIOBJ_ = \
+ $(B)/baseq3/ui/ui_main.o \
+ $(B)/baseq3/ui/bg_misc.o \
+ $(B)/baseq3/ui/bg_lib.o \
+ $(B)/baseq3/ui/ui_addbots.o \
+ $(B)/baseq3/ui/ui_atoms.o \
+ $(B)/baseq3/ui/ui_cdkey.o \
+ $(B)/baseq3/ui/ui_cinematics.o \
+ $(B)/baseq3/ui/ui_confirm.o \
+ $(B)/baseq3/ui/ui_connect.o \
+ $(B)/baseq3/ui/ui_controls2.o \
+ $(B)/baseq3/ui/ui_credits.o \
+ $(B)/baseq3/ui/ui_demo2.o \
+ $(B)/baseq3/ui/ui_display.o \
+ $(B)/baseq3/ui/ui_gameinfo.o \
+ $(B)/baseq3/ui/ui_ingame.o \
+ $(B)/baseq3/ui/ui_loadconfig.o \
+ $(B)/baseq3/ui/ui_menu.o \
+ $(B)/baseq3/ui/ui_mfield.o \
+ $(B)/baseq3/ui/ui_mods.o \
+ $(B)/baseq3/ui/ui_network.o \
+ $(B)/baseq3/ui/ui_options.o \
+ $(B)/baseq3/ui/ui_playermodel.o \
+ $(B)/baseq3/ui/ui_players.o \
+ $(B)/baseq3/ui/ui_playersettings.o \
+ $(B)/baseq3/ui/ui_preferences.o \
+ $(B)/baseq3/ui/ui_qmenu.o \
+ $(B)/baseq3/ui/ui_removebots.o \
+ $(B)/baseq3/ui/ui_saveconfig.o \
+ $(B)/baseq3/ui/ui_serverinfo.o \
+ $(B)/baseq3/ui/ui_servers2.o \
+ $(B)/baseq3/ui/ui_setup.o \
+ $(B)/baseq3/ui/ui_sound.o \
+ $(B)/baseq3/ui/ui_sparena.o \
+ $(B)/baseq3/ui/ui_specifyserver.o \
+ $(B)/baseq3/ui/ui_splevel.o \
+ $(B)/baseq3/ui/ui_sppostgame.o \
+ $(B)/baseq3/ui/ui_spskill.o \
+ $(B)/baseq3/ui/ui_startserver.o \
+ $(B)/baseq3/ui/ui_team.o \
+ $(B)/baseq3/ui/ui_teamorders.o \
+ $(B)/baseq3/ui/ui_video.o \
+ \
+ $(B)/baseq3/qcommon/q_math.o \
+ $(B)/baseq3/qcommon/q_shared.o
+
+Q3UIOBJ = $(Q3UIOBJ_) $(B)/missionpack/ui/ui_syscalls.o
+Q3UIVMOBJ = $(Q3UIOBJ_:%.o=%.asm)
+
+$(B)/baseq3/ui$(SHLIBNAME): $(Q3UIOBJ)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3UIOBJ)
+
+$(B)/baseq3/vm/ui.qvm: $(Q3UIVMOBJ) $(UIDIR)/ui_syscalls.asm $(Q3ASM)
+ $(echo_cmd) "Q3ASM $@"
+ $(Q)$(Q3ASM) -o $@ $(Q3UIVMOBJ) $(UIDIR)/ui_syscalls.asm
+
+#############################################################################
+## MISSIONPACK UI
+#############################################################################
+
+MPUIOBJ_ = \
+ $(B)/missionpack/ui/ui_main.o \
+ $(B)/missionpack/ui/ui_atoms.o \
+ $(B)/missionpack/ui/ui_gameinfo.o \
+ $(B)/missionpack/ui/ui_players.o \
+ $(B)/missionpack/ui/ui_shared.o \
+ \
+ $(B)/missionpack/ui/bg_misc.o \
+ $(B)/missionpack/ui/bg_lib.o \
+ \
+ $(B)/missionpack/qcommon/q_math.o \
+ $(B)/missionpack/qcommon/q_shared.o
+
+MPUIOBJ = $(MPUIOBJ_) $(B)/missionpack/ui/ui_syscalls.o
+MPUIVMOBJ = $(MPUIOBJ_:%.o=%.asm)
+
+$(B)/missionpack/ui$(SHLIBNAME): $(MPUIOBJ)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPUIOBJ)
+
+$(B)/missionpack/vm/ui.qvm: $(MPUIVMOBJ) $(UIDIR)/ui_syscalls.asm $(Q3ASM)
+ $(echo_cmd) "Q3ASM $@"
+ $(Q)$(Q3ASM) -o $@ $(MPUIVMOBJ) $(UIDIR)/ui_syscalls.asm
+
+
+
+#############################################################################
+## CLIENT/SERVER RULES
+#############################################################################
+
+$(B)/client/%.o: $(ASMDIR)/%.s
+ $(DO_AS)
+
+$(B)/client/%.o: $(CDIR)/%.c
+ $(DO_CC)
+
+$(B)/client/%.o: $(SDIR)/%.c
+ $(DO_CC)
+
+$(B)/client/%.o: $(CMDIR)/%.c
+ $(DO_CC)
+
+$(B)/client/%.o: $(BLIBDIR)/%.c
+ $(DO_BOT_CC)
+
+$(B)/client/%.o: $(JPDIR)/%.c $(PNDDIR)/qgl.h
+ $(DO_CC)
+
+$(B)/client/%.o: $(SPEEXDIR)/%.c
+ $(DO_CC)
+
+$(B)/client/%.o: $(ZDIR)/%.c
+ $(DO_CC)
+
+$(B)/client/%.o: $(RDIR)/%.c $(PNDDIR)/qgl.h
+ $(DO_CC)
+
+$(B)/client/%.o: $(SDLDIR)/%.c
+ $(DO_CC)
+
+$(B)/clientsmp/%.o: $(SDLDIR)/%.c
+ $(DO_SMP_CC)
+
+$(B)/client/%.o: $(PNDDIR)/%.c
+ $(DO_CC)
+
+$(B)/clientsmp/%.o: $(PNDDIR)/%.c
+ $(DO_SMP_CC)
+
+$(B)/client/%.o: $(SYSDIR)/%.c
+ $(DO_CC)
+
+$(B)/client/%.o: $(SYSDIR)/%.m
+ $(DO_CC)
+
+$(B)/client/%.o: $(SYSDIR)/%.rc
+ $(DO_WINDRES)
+
+
+$(B)/ded/%.o: $(ASMDIR)/%.s
+ $(DO_AS)
+
+$(B)/ded/%.o: $(SDIR)/%.c
+ $(DO_DED_CC)
+
+$(B)/ded/%.o: $(CMDIR)/%.c
+ $(DO_DED_CC)
+
+$(B)/ded/%.o: $(ZDIR)/%.c
+ $(DO_DED_CC)
+
+$(B)/ded/%.o: $(BLIBDIR)/%.c
+ $(DO_BOT_CC)
+
+$(B)/ded/%.o: $(SYSDIR)/%.c
+ $(DO_DED_CC)
+
+$(B)/ded/%.o: $(SYSDIR)/%.m
+ $(DO_DED_CC)
+
+$(B)/ded/%.o: $(SYSDIR)/%.rc
+ $(DO_WINDRES)
+
+$(B)/ded/%.o: $(NDIR)/%.c
+ $(DO_DED_CC)
+
+# Extra dependencies to ensure the SVN version is incorporated
+ifeq ($(USE_SVN),1)
+ $(B)/client/cl_console.o : .svn/entries
+ $(B)/client/common.o : .svn/entries
+ $(B)/ded/common.o : .svn/entries
+endif
+
+$(PNDDIR)/qgl.h: $(PNDDIR)/GenerateQGL.pl
+ $(DO_PERL)
+
+$(B)/client/%.o: $(PNDDIR)/%.c
+ $(DO_CC)
+
+#############################################################################
+## GAME MODULE RULES
+#############################################################################
+
+$(B)/baseq3/cgame/bg_%.o: $(GDIR)/bg_%.c
+ $(DO_CGAME_CC)
+
+$(B)/baseq3/cgame/%.o: $(CGDIR)/%.c
+ $(DO_CGAME_CC)
+
+$(B)/baseq3/cgame/bg_%.asm: $(GDIR)/bg_%.c $(Q3LCC)
+ $(DO_CGAME_Q3LCC)
+
+$(B)/baseq3/cgame/%.asm: $(CGDIR)/%.c $(Q3LCC)
+ $(DO_CGAME_Q3LCC)
+
+$(B)/missionpack/cgame/bg_%.o: $(GDIR)/bg_%.c
+ $(DO_CGAME_CC_MISSIONPACK)
+
+$(B)/missionpack/cgame/%.o: $(CGDIR)/%.c
+ $(DO_CGAME_CC_MISSIONPACK)
+
+$(B)/missionpack/cgame/bg_%.asm: $(GDIR)/bg_%.c $(Q3LCC)
+ $(DO_CGAME_Q3LCC_MISSIONPACK)
+
+$(B)/missionpack/cgame/%.asm: $(CGDIR)/%.c $(Q3LCC)
+ $(DO_CGAME_Q3LCC_MISSIONPACK)
+
+
+$(B)/baseq3/game/%.o: $(GDIR)/%.c
+ $(DO_GAME_CC)
+
+$(B)/baseq3/game/%.asm: $(GDIR)/%.c $(Q3LCC)
+ $(DO_GAME_Q3LCC)
+
+$(B)/missionpack/game/%.o: $(GDIR)/%.c
+ $(DO_GAME_CC_MISSIONPACK)
+
+$(B)/missionpack/game/%.asm: $(GDIR)/%.c $(Q3LCC)
+ $(DO_GAME_Q3LCC_MISSIONPACK)
+
+
+$(B)/baseq3/ui/bg_%.o: $(GDIR)/bg_%.c
+ $(DO_UI_CC)
+
+$(B)/baseq3/ui/%.o: $(Q3UIDIR)/%.c
+ $(DO_UI_CC)
+
+$(B)/baseq3/ui/bg_%.asm: $(GDIR)/bg_%.c $(Q3LCC)
+ $(DO_UI_Q3LCC)
+
+$(B)/baseq3/ui/%.asm: $(Q3UIDIR)/%.c $(Q3LCC)
+ $(DO_UI_Q3LCC)
+
+$(B)/missionpack/ui/bg_%.o: $(GDIR)/bg_%.c
+ $(DO_UI_CC_MISSIONPACK)
+
+$(B)/missionpack/ui/%.o: $(UIDIR)/%.c
+ $(DO_UI_CC_MISSIONPACK)
+
+$(B)/missionpack/ui/bg_%.asm: $(GDIR)/bg_%.c $(Q3LCC)
+ $(DO_UI_Q3LCC_MISSIONPACK)
+
+$(B)/missionpack/ui/%.asm: $(UIDIR)/%.c $(Q3LCC)
+ $(DO_UI_Q3LCC_MISSIONPACK)
+
+
+$(B)/baseq3/qcommon/%.o: $(CMDIR)/%.c
+ $(DO_SHLIB_CC)
+
+$(B)/baseq3/qcommon/%.asm: $(CMDIR)/%.c $(Q3LCC)
+ $(DO_Q3LCC)
+
+$(B)/missionpack/qcommon/%.o: $(CMDIR)/%.c
+ $(DO_SHLIB_CC_MISSIONPACK)
+
+$(B)/missionpack/qcommon/%.asm: $(CMDIR)/%.c $(Q3LCC)
+ $(DO_Q3LCC_MISSIONPACK)
+
+
+#############################################################################
+# MISC
+#############################################################################
+
+OBJ = $(Q3OBJ) $(Q3POBJ) $(Q3POBJ_SMP) $(Q3DOBJ) \
+ $(MPGOBJ) $(Q3GOBJ) $(Q3CGOBJ) $(MPCGOBJ) $(Q3UIOBJ) $(MPUIOBJ) \
+ $(MPGVMOBJ) $(Q3GVMOBJ) $(Q3CGVMOBJ) $(MPCGVMOBJ) $(Q3UIVMOBJ) $(MPUIVMOBJ)
+TOOLSOBJ = $(LBURGOBJ) $(Q3CPPOBJ) $(Q3RCCOBJ) $(Q3LCCOBJ) $(Q3ASMOBJ)
+
+
+copyfiles: release
+ @if [ ! -d $(COPYDIR)/baseq3 ]; then echo "You need to set COPYDIR to where your Quake3 data is!"; fi
+ -$(MKDIR) -p -m 0755 $(COPYDIR)/baseq3
+ -$(MKDIR) -p -m 0755 $(COPYDIR)/missionpack
+
+ifneq ($(BUILD_CLIENT),0)
+ $(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/ioquake3$(FULLBINEXT) $(COPYBINDIR)/ioquake3$(FULLBINEXT)
+endif
+
+# Don't copy the SMP until it's working together with SDL.
+#ifneq ($(BUILD_CLIENT_SMP),0)
+# $(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/ioquake3-smp$(FULLBINEXT) $(COPYBINDIR)/ioquake3-smp$(FULLBINEXT)
+#endif
+
+ifneq ($(BUILD_SERVER),0)
+ @if [ -f $(BR)/ioq3ded$(FULLBINEXT) ]; then \
+ $(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/ioq3ded$(FULLBINEXT) $(COPYBINDIR)/ioq3ded$(FULLBINEXT); \
+ fi
+endif
+
+ifneq ($(BUILD_GAME_SO),0)
+ $(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/baseq3/cgame$(SHLIBNAME) \
+ $(COPYDIR)/baseq3/.
+ $(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/baseq3/qagame$(SHLIBNAME) \
+ $(COPYDIR)/baseq3/.
+ $(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/baseq3/ui$(SHLIBNAME) \
+ $(COPYDIR)/baseq3/.
+ ifneq ($(BUILD_MISSIONPACK),0)
+ -$(MKDIR) -p -m 0755 $(COPYDIR)/missionpack
+ $(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/missionpack/cgame$(SHLIBNAME) \
+ $(COPYDIR)/missionpack/.
+ $(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/missionpack/qagame$(SHLIBNAME) \
+ $(COPYDIR)/missionpack/.
+ $(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/missionpack/ui$(SHLIBNAME) \
+ $(COPYDIR)/missionpack/.
+ endif
+endif
+
+clean: clean-debug clean-release
+ifeq ($(PLATFORM),mingw32)
+ @$(MAKE) -C $(NSISDIR) clean
+else
+ @$(MAKE) -C $(LOKISETUPDIR) clean
+endif
+
+clean-debug:
+ @$(MAKE) clean2 B=$(BD)
+ find . -name "*~*" -exec rm {} \; -print
+
+clean-release:
+ @$(MAKE) clean2 B=$(BR)
+ find . -name "*~*" -exec rm {} \; -print
+
+clean2:
+ @echo "CLEAN $(B)"
+ @rm -f $(OBJ)
+ @rm -f $(OBJ_D_FILES)
+ @rm -f $(TARGETS)
+
+toolsclean: toolsclean-debug toolsclean-release
+
+toolsclean-debug:
+ @$(MAKE) toolsclean2 B=$(BD)
+
+toolsclean-release:
+ @$(MAKE) toolsclean2 B=$(BR)
+
+toolsclean2:
+ @echo "TOOLS_CLEAN $(B)"
+ @rm -f $(TOOLSOBJ)
+ @rm -f $(TOOLSOBJ_D_FILES)
+ @rm -f $(LBURG) $(DAGCHECK_C) $(Q3RCC) $(Q3CPP) $(Q3LCC) $(Q3ASM)
+
+distclean: clean toolsclean
+ @rm -rf $(BUILD_DIR)
+
+installer: release
+ifeq ($(PLATFORM),mingw32)
+ @$(MAKE) VERSION=$(VERSION) -C $(NSISDIR) V=$(V)
+else
+ @$(MAKE) VERSION=$(VERSION) -C $(LOKISETUPDIR) V=$(V)
+endif
+
+dist:
+ rm -rf ioquake3-$(VERSION)
+ svn export . ioquake3-$(VERSION)
+ tar --owner=root --group=root --force-local -cjf ioquake3-$(VERSION).tar.bz2 ioquake3-$(VERSION)
+ rm -rf ioquake3-$(VERSION)
+
+#############################################################################
+# DEPENDENCIES
+#############################################################################
+
+ifneq ($(B),)
+ OBJ_D_FILES=$(filter %.d,$(OBJ:%.o=%.d))
+ TOOLSOBJ_D_FILES=$(filter %.d,$(TOOLSOBJ:%.o=%.d))
+ -include $(OBJ_D_FILES) $(TOOLSOBJ_D_FILES)
+endif
+
+.PHONY: all clean clean2 clean-debug clean-release copyfiles \
+ debug default dist distclean installer makedirs \
+ release targets \
+ toolsclean toolsclean2 toolsclean-debug toolsclean-release \
+ $(OBJ_D_FILES) $(TOOLSOBJ_D_FILES)
diff --git a/Makefile.local b/Makefile.local
new file mode 100644
index 0000000..b5e3216
--- /dev/null
+++ b/Makefile.local
@@ -0,0 +1,23 @@
+GCC=arm-none-linux-gnueabi-gcc
+CC=arm-none-linux-gnueabi-gcc
+
+ARCH=arm
+
+BUILD_CLIENT=1
+BUILD_CLIENT_SMP=0
+BUILD_GAME_QVM=0
+BUILD_GAME_SO=1
+BUILD_MISSIONPACK=0
+BUILD_SERVER=0
+BUILD_STANDALONE=0
+GENERATE_DEPENDENCIES=0
+USE_CODEC_VORBIS=0
+USE_CURL=0
+USE_CURL_DLOPEN=0
+USE_INTERNAL_SPEEX=0
+USE_LOCAL_HEADERS=0
+USE_MUMBLE=0
+USE_OPENAL=0
+USE_OPENAL_DLOPEN=0
+USE_SVN=0
+USE_VOIP=0
diff --git a/NOTTODO b/NOTTODO
new file mode 100644
index 0000000..0db1547
--- /dev/null
+++ b/NOTTODO
@@ -0,0 +1 @@
+http://wiki.ioquake3.org/NotToDo
diff --git a/README b/README
new file mode 100644
index 0000000..d776efc
--- /dev/null
+++ b/README
@@ -0,0 +1,575 @@
+ ,---------------------------------------.
+ | _ _ ____ |
+ | (_)___ __ _ _ _ __ _| |_____|__ / |
+ | | / _ \/ _` | || / _` | / / -_)|_ \ |
+ | |_\___/\__, |\_,_\__,_|_\_\___|___/ |
+ | |_| |
+ | |
+ `---------- http://ioquake3.org --------'
+
+The intent of this project is to provide a baseline Quake 3 which may be used
+for further development and baseq3 fun.
+Some of the major features currently implemented are:
+
+ * SDL backend
+ * OpenAL sound API support (multiple speaker support and better sound
+ quality)
+ * Full x86_64 support on Linux
+ * VoIP support, both in-game and external support through Mumble.
+ * MinGW compilation support on Windows and cross compilation support on Linux
+ * AVI video capture of demos
+ * Much improved console autocompletion
+ * Persistent console history
+ * Colorized terminal output
+ * Optional Ogg Vorbis support
+ * Much improved QVM tools
+ * Support for various esoteric operating systems
+ * cl_guid support
+ * HTTP/FTP download redirection (using cURL)
+ * Multiuser support on Windows systems (user specific game data
+ is stored in "%APPDATA%\Quake3")
+ * PNG support
+ * Many, many bug fixes
+
+The map editor and associated compiling tools are not included. We suggest you
+use a modern copy from http://www.qeradiant.com/.
+
+The original id software readme that accompanied the Q3 source release has been
+renamed to id-readme.txt so as to prevent confusion. Please refer to the
+web-site for updated status.
+
+
+--------------------------------------------- Compilation and installation -----
+
+For *nix
+ 1. Change to the directory containing this readme.
+ 2. Run 'make'.
+
+For Windows,
+ 1. Please refer to the excellent instructions here:
+ http://wiki.ioquake3.org/Building_ioquake3
+
+For Mac OS X, building a Universal Binary
+ 1. Install MacOSX SDK packages from XCode. For maximum compatibility,
+ install MacOSX10.4u.sdk and MacOSX10.3.9.sdk, and MacOSX10.2.8.sdk.
+ 2. Change to the directory containing this README file.
+ 3. Run './make-macosx-ub.sh'
+ 4. Copy the resulting ioquake3.app in /build/release-darwin-ub to your
+ /Applications/ioquake3 folder.
+
+Installation, for *nix
+ 1. Set the COPYDIR variable in the shell to be where you installed Quake 3
+ to. By default it will be /usr/local/games/quake3 if you haven't set it.
+ This is the path as used by the original Linux Q3 installer and subsequent
+ point releases.
+ 2. Run 'make copyfiles'.
+
+It is also possible to cross compile for Windows under *nix using MinGW. A
+script is available to build a cross compilation environment from
+http://www.libsdl.org/extras/win32/cross/build-cross.sh. The gcc/binutils
+version numbers that the script downloads may need to be altered.
+Alternatively, your distribution may have mingw32 packages available. On
+debian/Ubuntu, these are mingw32, mingw32-runtime and mingw32-binutils. Cross
+compiling is simply a case of using './cross-make-mingw.sh' in place of 'make',
+though you may find you need to change the value of the variables in this
+script to match your environment.
+
+The following variables may be set, either on the command line or in
+Makefile.local:
+
+ CFLAGS - use this for custom CFLAGS
+ V - set to show cc command line when building
+ DEFAULT_BASEDIR - extra path to search for baseq3 and such
+ BUILD_SERVER - build the 'ioq3ded' server binary
+ BUILD_CLIENT - build the 'ioquake3' client binary
+ BUILD_CLIENT_SMP - build the 'ioquake3-smp' client binary
+ BUILD_GAME_SO - build the game shared libraries
+ BUILD_GAME_QVM - build the game qvms
+ BUILD_STANDALONE - build binaries suited for stand-alone games
+ USE_OPENAL - use OpenAL where available
+ USE_OPENAL_DLOPEN - link with OpenAL at runtime
+ USE_CURL - use libcurl for http/ftp download support
+ USE_CURL_DLOPEN - link with libcurl at runtime
+ USE_CODEC_VORBIS - enable Ogg Vorbis support
+ USE_LOCAL_HEADERS - use headers local to ioq3 instead of system ones
+ COPYDIR - the target installation directory
+
+The defaults for these variables differ depending on the target platform.
+
+
+------------------------------------------------------------------ Console -----
+
+New cvars
+ cl_autoRecordDemo - record a new demo on each map change
+ cl_aviFrameRate - the framerate to use when capturing video
+ cl_aviMotionJpeg - use the mjpeg codec when capturing video
+ cl_guidServerUniq - makes cl_guid unique for each server
+ cl_cURLLib - filename of cURL library to load
+ cl_consoleKeys - space delimited list of key names or
+ characters that toggle the console
+ cl_mouseAccelStyle - Set to 1 for QuakeLive mouse acceleration
+ behaviour, 0 for standard q3
+ cl_mouseAccelOffset - Tuning the acceleration curve, see below
+
+ s_useOpenAL - use the OpenAL sound backend if available
+ s_alPrecache - cache OpenAL sounds before use
+ s_alGain - the value of AL_GAIN for each source
+ s_alSources - the total number of sources (memory) to
+ allocate
+ s_alDopplerFactor - the value passed to alDopplerFactor
+ s_alDopplerSpeed - the value passed to alDopplerVelocity
+ s_alMinDistance - the value of AL_REFERENCE_DISTANCE for
+ each source
+ s_alMaxDistance - the maximum distance before sounds start
+ to become inaudible.
+ s_alRolloff - the value of AL_ROLLOFF_FACTOR for each
+ source
+ s_alGraceDistance - after having passed MaxDistance, length
+ until sounds are completely inaudible
+ s_alDriver - which OpenAL library to use
+ s_alDevice - which OpenAL device to use
+ s_alAvailableDevices - list of available OpenAL devices
+ s_sdlBits - SDL bit resolution
+ s_sdlSpeed - SDL sample rate
+ s_sdlChannels - SDL number of channels
+ s_sdlDevSamps - SDL DMA buffer size override
+ s_sdlMixSamps - SDL mix buffer size override
+ s_backend - read only, indicates the current sound
+ backend
+ s_muteWhenMinimized - mute sound when minimized
+ s_muteWhenUnfocused - mute sound when window is unfocused
+
+ com_ansiColor - enable use of ANSI escape codes in the tty
+ com_altivec - enable use of altivec on PowerPC systems
+ com_standalone - Run in standalone mode
+ com_maxfpsUnfocused - Maximum frames per second when unfocused
+ com_maxfpsMinimized - Maximum frames per second when minimized
+
+ in_joystickNo - select which joystick to use
+ in_keyboardDebug - print keyboard debug info
+
+ sv_dlURL - the base of the HTTP or FTP site that
+ holds custom pk3 files for your server
+ sv_banFile - Name of the file that is used for storing
+ the server bans.
+
+ net_ip6 - IPv6 address to bind to
+ net_port6 - port to bind to using the ipv6 address
+ net_enabled - enable networking, bitmask. Add up
+ number for option to enable it:
+ enable ipv4 networking: 1
+ enable ipv6 networking: 2
+ prioritise ipv6 over ipv4: 4
+ disable multicast support: 8
+ net_mcast6addr - multicast address to use for scanning for
+ ipv6 servers on the local network
+ net_mcastiface - outgoing interface to use for scan
+
+ r_allowResize - make window resizable (SDL only)
+ r_ext_texture_filter_anisotropic - anisotropic texture filtering
+ r_zProj - distance of observer camera to projection
+ plane in quake3 standard units
+ r_greyscale - render black and white images
+ r_stereoEnabled - enable stereo rendering for techniques
+ like shutter glasses (untested)
+ r_anaglyphMode - Enable rendering of anaglyph images
+ red-cyan glasses: 1
+ red-blue: 2
+ red-green: 3
+ To swap the colors for left and right eye
+ just add 3 to the value for the wanted
+ color combination. For red-blue and
+ red-green you probably want to enable
+ r_greyscale
+ r_stereoSeparation - Control eye separation. Resulting
+ separation is r_zProj divided by this
+ value in quake3 standard units.
+ See also
+ http://wiki.ioquake3.org/Stereo_Rendering
+ for more information
+ r_marksOnTriangleMeshes - Support impact marks on md3 models, MOD
+ developers should increase the mark
+ triangle limits in cg_marks.c if they
+ intend to use this.
+ r_sdlDriver - read only, indicates the SDL driver
+ backend being used
+ r_noborder - Remove window decoration from window
+ managers, like borders and titlebar.
+
+New commands
+ video [filename] - start video capture (use with demo command)
+ stopvideo - stop video capture
+ stopmusic - stop background music
+
+ print - print out the contents of a cvar
+ unset - unset a user created cvar
+
+ banaddr <range> - ban an ip address range from joining a game on this
+ server, valid <range> is either playernum or CIDR
+ notation address range.
+ exceptaddr <range> - exempt an ip address range from a ban.
+ bandel <range> - delete ban (either range or ban number)
+ exceptdel <range> - delete exception (either range or exception number)
+ listbans - list all currently active bans and exceptions
+ rehashbans - reload the banlist from serverbans.dat
+ flushbans - delete all bans
+
+ net_restart - restart network subsystem to change latched settings
+ game_restart <fs_game> - Switch to another mod
+
+------------------------------------------------------------ Miscellaneous -----
+
+Using shared libraries instead of qvm
+ To force Q3 to use shared libraries instead of qvms run it with the following
+ parameters: +set sv_pure 0 +set vm_cgame 0 +set vm_game 0 +set vm_ui 0
+
+Using Demo Data Files
+ Copy demoq3/pak0.pk3 from the demo installer to your baseq3 directory. The
+ qvm files in this pak0.pk3 will not work, so you have to use the native
+ shared libraries or qvms from this project. To use the new qvms, they must be
+ put into a pk3 file. A pk3 file is just a zip file, so any compression tool
+ that can create such files will work. The shared libraries should already be
+ in the correct place. Use the instructions above to use them.
+
+ Please bear in mind that you will not be able to play online using the demo
+ data, nor is it something that we like to spend much time maintaining or
+ supporting.
+
+QuakeLive mouse acceleration (patch and this text written by TTimo from id)
+ I've been using an experimental mouse acceleration code for a while, and
+ decided to make it available to everyone. Don't be too worried if you don't
+ understand the explanations below, this is mostly intended for advanced
+ players:
+ To enable it, set cl_mouseAccelStyle 1 (0 is the default/legacy behavior)
+
+ New style is controlled with 3 cvars:
+
+ sensitivity
+ cl_mouseAccel
+ cl_mouseAccelOffset
+
+ The old code (cl_mouseAccelStyle 0) can be difficult to calibrate because if
+ you have a base sensitivity setup, as soon as you set a non zero acceleration
+ your base sensitivity at low speeds will change as well. The other problem
+ with style 0 is that you are stuck on a square (power of two) acceleration
+ curve.
+
+ The new code tries to solve both problems:
+
+ Once you setup your sensitivity to feel comfortable and accurate enough for
+ low mouse deltas with no acceleration (cl_mouseAccel 0), you can start
+ increasing cl_mouseAccel and tweaking cl_mouseAccelOffset to get the
+ amplification you want for high deltas with little effect on low mouse deltas.
+
+ cl_mouseAccel is a power value. Should be >= 1, 2 will be the same power curve
+ as style 0. The higher the value, the faster the amplification grows with the
+ mouse delta.
+
+ cl_mouseAccelOffset sets how much base mouse delta will be doubled by
+ acceleration. The closer to zero you bring it, the more acceleration will
+ happen at low speeds. This is also very useful if you are changing to a new
+ mouse with higher dpi, if you go from 500 to 1000 dpi, you can divide your
+ cl_mouseAccelOffset by two to keep the same overall 'feel' (you will likely
+ gain in precision when you do that, but that is not related to mouse
+ acceleration).
+
+ Mouse acceleration is tricky to configure, and when you do you'll have to
+ re-learn your aiming. But you will find that it's very much forth it in the
+ long run.
+
+ If you try the new acceleration code and start using it, I'd be very
+ interested by your feedback.
+
+64bit mods
+ If you wish to compile external mods as shared libraries on a 64bit platform,
+ and the mod source is derived from the id Q3 SDK, you will need to modify the
+ interface code a little. Open the files ending in _syscalls.c and change
+ every instance of int to intptr_t in the declaration of the syscall function
+ pointer and the dllEntry function. Also find the vmMain function for each
+ module (usually in cg_main.c g_main.c etc.) and similarly replace the return
+ value in the prototype with intptr_t (arg0, arg1, ...stay int).
+
+ Add the following code snippet to q_shared.h:
+
+ #ifdef Q3_VM
+ typedef int intptr_t;
+ #else
+ #include <stdint.h>
+ #endif
+
+ Note if you simply wish to run mods on a 64bit platform you do not need to
+ recompile anything since by default Q3 uses a virtual machine system.
+
+Creating mods compatible with Q3 1.32b
+ If you're using this package to create mods for the last official release of
+ Q3, it is necessary to pass the commandline option '-vq3' to your invocation
+ of q3asm. This is because by default q3asm outputs an updated qvm format that
+ is necessary to fix a bug involving the optimizing pass of the x86 vm JIT
+ compiler.
+
+Creating standalone games
+ Have you finished the daunting task of removing all dependencies on the Q3
+ game data? You probably now want to give your users the opportunity to play
+ the game without owning a copy of Q3, which consequently means removing cd-key
+ and authentication server checks. In addition to being a straightforward Q3
+ client, ioquake3 also purports to be a reliable and stable code base on which
+ to base your game project.
+
+ However, before you start compiling your own version of ioquake3, you have to
+ ask yourself: Have we changed or will we need to change anything of importance
+ in the engine?
+
+ If your answer to this question is "no", it probably makes no sense to build
+ your own binaries. Instead, you can just use the pre-built binaries on the
+ website. Just make sure the game is called with:
+
+ +set com_standalone 1 +set fs_game <yourgamedir>
+
+ in any links/scripts you install for your users to start the game. Note that
+ the com_standalone setting is rendered ineffective, if the binary detects pk3
+ files in the directory "baseq3", so you cannot use that one as game dir.
+
+ If you really changed parts that would make vanilla ioquake3 incompatible with
+ your mod, we have included another way to conveniently build a stand-alone
+ binary. Just run make with the option BUILD_STANDALONE=1. Don't forget to edit
+ the PRODUCT_NAME and subsequent #defines in qcommon/q_shared.h with
+ information appropriate for your project.
+
+ While a lot of work has been put into ioquake3 that you can benefit from free
+ of charge, it does not mean that you have no obligations to fulfil. Please be
+ aware that as soon as you start distributing your game with an engine based on
+ our sources we expect you to fully comply with the requirements as stated in
+ the GPL. That includes making sources and modifications you made to the
+ ioquake3 engine as well as the game-code used to compile the .qvm files for
+ the game logic freely available to everyone. Furthermore, note that the "QIIIA
+ Game Source License" prohibits distribution of mods that are intended to
+ operate on a version of Q3 not sanctioned by id software:
+
+ "with this Agreement, ID grants to you the non-exclusive and limited right
+ to distribute copies of the Software ... for operation only with the full
+ version of the software game QUAKE III ARENA"
+
+ This means that if you're creating a standalone game, you cannot use said
+ license on any portion of the product. As the only other license this code has
+ been released under is the GPL, this is the only option.
+
+ This does NOT mean that you cannot market this game commercially. The GPL does
+ not prohibit commercial exploitation and all assets (e.g. textures, sounds,
+ maps) created by yourself are your property and can be sold like every other
+ game you find in stores.
+
+cl_guid Support
+ cl_guid is a cvar which is part of the client's USERINFO string. Its value
+ is a 32 character string made up of [a-f] and [0-9] characters. This
+ value is pseudo-unique for every player. Id's Quake 3 Arena client also
+ sets cl_guid, but only if Punkbuster is enabled on the client.
+
+ If cl_guidServerUniq is non-zero (the default), then this value is also
+ pseudo-unique for each server a client connects to (based on IP:PORT of
+ the server).
+
+ The purpose of cl_guid is to add an identifier for each player on
+ a server. This value can be reset by the client at any time so it's not
+ useful for blocking access. However, it can have at least two uses in
+ your mod's game code:
+ 1) improve logging to allow statistical tools to index players by more
+ than just name
+ 2) granting some weak admin rights to players without requiring passwords
+
+Using HTTP/FTP Download Support (Server)
+ You can enable redirected downloads on your server even if it's not
+ an ioquake3 server. You simply need to use the 'sets' command to put
+ the sv_dlURL cvar into your SERVERINFO string and ensure sv_allowDownloads
+ is set to 1
+
+ sv_dlURL is the base of the URL that contains your custom .pk3 files
+ the client will append both fs_game and the filename to the end of
+ this value. For example, if you have sv_dlURL set to
+ "http://ioquake3.org", fs_game is "baseq3", and the client is
+ missing "test.pk3", it will attempt to download from the URL
+ "http://ioquake3.org/baseq3/test.pk3"
+
+ sv_allowDownload's value is now a bitmask made up of the following
+ flags:
+ 1 - ENABLE
+ 4 - do not use UDP downloads
+ 8 - do not ask the client to disconnect when using HTTP/FTP
+
+ Server operators who are concerned about potential "leeching" from their
+ HTTP servers from other ioquake3 servers can make use of the HTTP_REFERER
+ that ioquake3 sets which is "ioQ3://{SERVER_IP}:{SERVER_PORT}". For,
+ example, Apache's mod_rewrite can restrict access based on HTTP_REFERER.
+
+Using HTTP/FTP Download Support (Client)
+ Simply setting cl_allowDownload to 1 will enable HTTP/FTP downloads
+ assuming ioquake3 was compiled with USE_CURL=1 (the default).
+ like sv_allowDownload, cl_allowDownload also uses a bitmask value
+ supporting the following flags:
+ 1 - ENABLE
+ 2 - do not use HTTP/FTP downloads
+ 4 - do not use UDP downloads
+
+ When ioquake3 is built with USE_CURL_DLOPEN=1 (default on some platforms),
+ it will use the value of the cvar cl_cURLLib as the filename of the cURL
+ library to dynamically load.
+
+Multiuser Support on Windows systems
+ On Windows, all user specific files such as autogenerated configuration,
+ demos, videos, screenshots, and autodownloaded pk3s are now saved in a
+ directory specific to the user who is running ioquake3.
+
+ On NT-based such as Windows XP, this is usually a directory named:
+ "C:\Documents and Settings\%USERNAME%\Application Data\Quake3\"
+
+ Windows 95, Windows 98, and Windows ME will use a directory like:
+ "C:\Windows\Application Data\Quake3"
+ in single-user mode, or:
+ "C:\Windows\Profiles\%USERNAME%\Application Data\Quake3"
+ if multiple logins have been enabled.
+
+ In order to access this directory more easily, the installer may create a
+ Shortcut which has its target set to:
+ "%APPDATA%\Quake3\"
+ This Shortcut would work for all users on the system regardless of the
+ locale settings. Unfortunately, this environment variable is only
+ present on Windows NT based systems.
+
+ You can revert to the old single-user behaviour by setting the fs_homepath
+ cvar to the directory where ioquake3 is installed. For example:
+ ioquake3.exe +set fs_homepath "c:\ioquake3"
+ Note that this cvar MUST be set as a command line parameter.
+
+SDL Keyboard Differences
+ ioquake3 clients have different keyboard behaviour compared to the original
+ Quake3 clients.
+
+ * "Caps Lock" and "Num Lock" can not be used as normal binds since they
+ do not send a KEYUP event until the key is pressed again.
+
+ * SDL > 1.2.9 does not support disabling dead key recognition. In order to
+ send dead key characters (e.g. ~, ', `, and ^), you must key a Space (or
+ sometimes the same character again) after the character to send it on
+ many international keyboard layouts.
+
+ * The SDL client supports many more keys than the original Quake3 client.
+ For example the keys: "Windows", "SysReq", "ScrollLock", and "Break".
+ For non-US keyboards, all of the so called "World" keys are now supported
+ as well as F13, F14, F15, and the country-specific mode/meta keys.
+
+ On many international layouts the default console toggle keys are also dead
+ keys, meaning that dropping the console potentially results in
+ unintentionally initiating the keying of a dead key. Futhermore SDL 1.2's
+ dead key support is broken by design and Q3 doesn't support non-ASCII text
+ entry, so the chances are you won't get the correct character anyway.
+
+ If you use such a keyboard layout, you can set the cvar cl_consoleKeys. This
+ is a space delimited list of key names that will toggle the console. The key
+ names are the usual Q3 names e.g. "~", "`", "c", "BACKSPACE", "PAUSE",
+ "WINDOWS" etc. It's also possible to use ASCII characters, by hexadecimal
+ number. Some example values for cl_consoleKeys:
+
+ "~ ` 0x7e 0x60" Toggle on ~ or ` (the default)
+ "WINDOWS" Toggle on the Windows key
+ "c" Toggle on the c key
+ "0x43" Toggle on the C character (Shift-c)
+ "PAUSE F1 PGUP" Toggle on the Pause, F1 or Page Up keys
+
+ Note that when you elect a set of console keys or characters, they cannot
+ then be used for binding, nor will they generate characters when entering
+ text. Also, in addition to the nominated console keys, Shift-ESC is hard
+ coded to always toggle the console.
+
+PNG support
+ ioquake3 supports the use of PNG (Portable Network Graphic) images as
+ textures. It should be noted that the use of such images in a map will
+ result in missing placeholder textures where the map is used with the id
+ Quake 3 client or earlier versions of ioquake3.
+
+ Recent versions of GtkRadiant and q3map2 support PNG images without
+ modification. However GtkRadiant is not aware that PNG textures are supported
+ by ioquake3. To change this behaviour open the file 'q3.game' in the 'games'
+ directory of the GtkRadiant base directory with an editor and change the
+ line:
+
+ texturetypes="tga jpg"
+
+ to
+
+ texturetypes="tga jpg png"
+
+ Restart GtkRadiant and PNG textures are now available.
+
+Building with MinGW for pre Windows XP
+ IPv6 support requires a header named "wspiapi.h" to abstract away from
+ differences in earlier versions of Windows' IPv6 stack. There is no MinGW
+ equivalent of this header and the Microsoft version is obviously not
+ redistributable, so in its absence we're forced to require Windows XP.
+ However if this header is acquired separately and placed in the qcommon/
+ directory, this restriction is lifted.
+
+
+------------------------------------------------------------- Contributing -----
+
+Please send all patches to bugzilla (https://bugzilla.icculus.org), or join the
+mailing list (quake3-subscribe@icculus.org) and submit your patch there. The
+best case scenario is that you submit your patch to bugzilla, and then post the
+URL to the mailing list.
+
+The focus for ioq3 is to develop a stable base suitable for further development
+and provide players with the same Quake 3 experience they've had for years. As
+such ioq3 does not have any significant graphical enhancements and none are
+planned at this time. However, improved graphics and sound patches will be
+accepted as long as they are entirely optional, do not require new media and
+are off by default.
+
+
+--------------------------------------------- Building Official Installers -----
+
+We need help getting automated installers on all the platforms that ioquake3
+supports. We don't neccesarily care about all the installers being identical,
+but we have some general guidelines:
+
+ * Please include the id patch pk3s in your installer, which are available
+ from http://ioquake3.org/patch-data/ subject to agreement to the id
+ EULA. Your installer shall also ask the user to agree to this EULA (which
+ is in the /web/include directory for your convenience) and subsequently
+ refuse to continue the installation of the patch pk3s and pak0.pk3 if they
+ do not.
+
+ * Please don't require pak0.pk3, since not everyone using the engine
+ plans on playing Quake 3 Arena on it. It's fine to (optionally) assist the
+ user in copying the file or tell them how.
+
+ * It is fine to just install the binaries without requiring id EULA agreement,
+ providing pak0.pk3 and the patch pk3s are not refered to or included in the
+ installer.
+
+ * Please include at least an SDL so/dylib/dll on every platform.
+
+ * Please include an OpenAL so/dylib/dll, since every platform should be using
+ it by now.
+
+ * Please contact the mailing list when you've made your installer.
+
+ * Please be prepared to alter your installer on the whim of the maintainers.
+
+ * Your installer will be mirrored to an "official" directory, thus making it
+ a done deal.
+
+------------------------------------------------------------------ Credits -----
+
+Maintainers
+ Ludwig Nussel <ludwig.nussel@suse.de>
+ Thilo Schulz <arny@ats.s.bawue.de>
+ Tim Angus <tim@ngus.net>
+ Tony J. White <tjw@tjw.org>
+ Zachary J. Slater <zachary@ioquake.org>
+
+Significant contributions from
+ Ryan C. Gordon <icculus@icculus.org>
+ Andreas Kohn <andreas@syndrom23.de>
+ Joerg Dietrich <Dietrich_Joerg@t-online.de>
+ Stuart Dalton <badcdev@gmail.com>
+ Vincent S. Cojot <vincent at cojot dot name>
+ optical <alex@rigbo.se>
+ Aaron Gyes <floam@aaron.gy>
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..5a3b545
--- /dev/null
+++ b/TODO
@@ -0,0 +1 @@
+http://wiki.ioquake3.org/Ioquake3_Road_Map
diff --git a/code/AL/VERSION b/code/AL/VERSION
new file mode 100644
index 0000000..1af4e3f
--- /dev/null
+++ b/code/AL/VERSION
@@ -0,0 +1,16 @@
+This file identifies the version of the AL headers in this directory. If you
+change or update the AL headers in any way, please make sure you also update
+this file.
+
+SVN revision >= 402
+-------------------
+Headers are from OpenAL CVS 6th August 2005:
+$ cvs -d:pserver:guest@opensource.creative.com:/usr/local/cvs-repository
+login
+(use password "guest")
+$ cvs -d:pserver:guest@opensource.creative.com:/usr/local/cvs-repository
+co -D "6 Aug 2005" openal
+
+SVN revision >= 374
+-------------------
+Standard OpenAL 1.0 headers
diff --git a/code/AL/al.h b/code/AL/al.h
new file mode 100644
index 0000000..fd9a537
--- /dev/null
+++ b/code/AL/al.h
@@ -0,0 +1,506 @@
+#ifndef __al_h_
+#define __al_h_
+
+/**
+ * OpenAL cross platform audio library
+ * Copyright (C) 1999-2000 by authors.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ * Or go to http://www.gnu.org/copyleft/lgpl.html
+ */
+#include "altypes.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* WIN32, not Xbox */
+#ifdef _WIN32
+#ifndef _XBOX
+#ifdef _OPENAL32LIB
+#define ALAPI __declspec(dllexport)
+#else
+#define ALAPI __declspec(dllimport)
+#endif
+#define ALAPIENTRY __cdecl
+#define AL_CALLBACK
+#endif
+#endif
+
+#ifdef TARGET_OS_MAC
+#if TARGET_OS_MAC
+#pragma export on
+#endif
+#endif
+
+#ifndef ALAPI
+#define ALAPI
+#endif
+
+#ifndef ALAPIENTRY
+#define ALAPIENTRY
+#endif
+
+#ifndef CALLBACK
+#define AL_CALLBACK
+#endif
+
+#define OPENAL
+
+#ifndef AL_NO_PROTOTYPES
+
+/*
+ * Renderer State management
+ */
+ALAPI void ALAPIENTRY alEnable( ALenum capability );
+
+ALAPI void ALAPIENTRY alDisable( ALenum capability );
+
+ALAPI ALboolean ALAPIENTRY alIsEnabled( ALenum capability );
+
+
+/*
+ * State retrieval
+ */
+ALAPI const ALchar* ALAPIENTRY alGetString( ALenum param );
+
+ALAPI void ALAPIENTRY alGetBooleanv( ALenum param, ALboolean* data );
+
+ALAPI void ALAPIENTRY alGetIntegerv( ALenum param, ALint* data );
+
+ALAPI void ALAPIENTRY alGetFloatv( ALenum param, ALfloat* data );
+
+ALAPI void ALAPIENTRY alGetDoublev( ALenum param, ALdouble* data );
+
+ALAPI ALboolean ALAPIENTRY alGetBoolean( ALenum param );
+
+ALAPI ALint ALAPIENTRY alGetInteger( ALenum param );
+
+ALAPI ALfloat ALAPIENTRY alGetFloat( ALenum param );
+
+ALAPI ALdouble ALAPIENTRY alGetDouble( ALenum param );
+
+
+/*
+ * Error support.
+ * Obtain the most recent error generated in the AL state machine.
+ */
+ALAPI ALenum ALAPIENTRY alGetError( ALvoid );
+
+
+/*
+ * Extension support.
+ * Query for the presence of an extension, and obtain any appropriate
+ * function pointers and enum values.
+ */
+ALAPI ALboolean ALAPIENTRY alIsExtensionPresent( const ALchar* extname );
+
+ALAPI void* ALAPIENTRY alGetProcAddress( const ALchar* fname );
+
+ALAPI ALenum ALAPIENTRY alGetEnumValue( const ALchar* ename );
+
+
+/*
+ * LISTENER
+ * Listener represents the location and orientation of the
+ * 'user' in 3D-space.
+ *
+ * Properties include: -
+ *
+ * Gain AL_GAIN ALfloat
+ * Position AL_POSITION ALfloat[3]
+ * Velocity AL_VELOCITY ALfloat[3]
+ * Orientation AL_ORIENTATION ALfloat[6] (Forward then Up vectors)
+*/
+
+/*
+ * Set Listener parameters
+ */
+ALAPI void ALAPIENTRY alListenerf( ALenum param, ALfloat value );
+
+ALAPI void ALAPIENTRY alListener3f( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
+
+ALAPI void ALAPIENTRY alListenerfv( ALenum param, const ALfloat* values );
+
+ALAPI void ALAPIENTRY alListeneri( ALenum param, ALint value );
+
+ALAPI void ALAPIENTRY alListener3i( ALenum param, ALint value1, ALint value2, ALint value3 );
+
+ALAPI void ALAPIENTRY alListeneriv( ALenum param, const ALint* values );
+
+/*
+ * Get Listener parameters
+ */
+ALAPI void ALAPIENTRY alGetListenerf( ALenum param, ALfloat* value );
+
+ALAPI void ALAPIENTRY alGetListener3f( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 );
+
+ALAPI void ALAPIENTRY alGetListenerfv( ALenum param, ALfloat* values );
+
+ALAPI void ALAPIENTRY alGetListeneri( ALenum param, ALint* value );
+
+ALAPI void ALAPIENTRY alGetListener3i( ALenum param, ALint *value1, ALint *value2, ALint *value3 );
+
+ALAPI void ALAPIENTRY alGetListeneriv( ALenum param, ALint* values );
+
+
+/**
+ * SOURCE
+ * Sources represent individual sound objects in 3D-space.
+ * Sources take the PCM data provided in the specified Buffer,
+ * apply Source-specific modifications, and then
+ * submit them to be mixed according to spatial arrangement etc.
+ *
+ * Properties include: -
+ *
+ * Gain AL_GAIN ALfloat
+ * Min Gain AL_MIN_GAIN ALfloat
+ * Max Gain AL_MAX_GAIN ALfloat
+ * Position AL_POSITION ALfloat[3]
+ * Velocity AL_VELOCITY ALfloat[3]
+ * Direction AL_DIRECTION ALfloat[3]
+ * Head Relative Mode AL_SOURCE_RELATIVE ALint (AL_TRUE or AL_FALSE)
+ * Reference Distance AL_REFERENCE_DISTANCE ALfloat
+ * Max Distance AL_MAX_DISTANCE ALfloat
+ * RollOff Factor AL_ROLLOFF_FACTOR ALfloat
+ * Inner Angle AL_CONE_INNER_ANGLE ALint or ALfloat
+ * Outer Angle AL_CONE_OUTER_ANGLE ALint or ALfloat
+ * Cone Outer Gain AL_CONE_OUTER_GAIN ALint or ALfloat
+ * Pitch AL_PITCH ALfloat
+ * Looping AL_LOOPING ALint (AL_TRUE or AL_FALSE)
+ * MS Offset AL_MSEC_OFFSET ALint or ALfloat
+ * Byte Offset AL_BYTE_OFFSET ALint or ALfloat
+ * Sample Offset AL_SAMPLE_OFFSET ALint or ALfloat
+ * Attached Buffer AL_BUFFER ALint
+ * State (Query only) AL_SOURCE_STATE ALint
+ * Buffers Queued (Query only) AL_BUFFERS_QUEUED ALint
+ * Buffers Processed (Query only) AL_BUFFERS_PROCESSED ALint
+ */
+
+/* Create Source objects */
+ALAPI void ALAPIENTRY alGenSources( ALsizei n, ALuint* sources );
+
+/* Delete Source objects */
+ALAPI void ALAPIENTRY alDeleteSources( ALsizei n, const ALuint* sources );
+
+/* Verify a handle is a valid Source */
+ALAPI ALboolean ALAPIENTRY alIsSource( ALuint sid );
+
+/*
+ * Set Source parameters
+ */
+ALAPI void ALAPIENTRY alSourcef( ALuint sid, ALenum param, ALfloat value );
+
+ALAPI void ALAPIENTRY alSource3f( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
+
+ALAPI void ALAPIENTRY alSourcefv( ALuint sid, ALenum param, const ALfloat* values );
+
+ALAPI void ALAPIENTRY alSourcei( ALuint sid, ALenum param, ALint value );
+
+ALAPI void ALAPIENTRY alSource3i( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 );
+
+ALAPI void ALAPIENTRY alSourceiv( ALuint sid, ALenum param, const ALint* values );
+
+/*
+ * Get Source parameters
+ */
+ALAPI void ALAPIENTRY alGetSourcef( ALuint sid, ALenum param, ALfloat* value );
+
+ALAPI void ALAPIENTRY alGetSource3f( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
+
+ALAPI void ALAPIENTRY alGetSourcefv( ALuint sid, ALenum param, ALfloat* values );
+
+ALAPI void ALAPIENTRY alGetSourcei( ALuint sid, ALenum param, ALint* value );
+
+ALAPI void ALAPIENTRY alGetSource3i( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
+
+ALAPI void ALAPIENTRY alGetSourceiv( ALuint sid, ALenum param, ALint* values );
+
+
+/*
+ * Source vector based playback calls
+ */
+
+/* Play, replay, or resume (if paused) a list of Sources */
+ALAPI void ALAPIENTRY alSourcePlayv( ALsizei ns, const ALuint *sids );
+
+/* Stop a list of Sources */
+ALAPI void ALAPIENTRY alSourceStopv( ALsizei ns, const ALuint *sids );
+
+/* Rewind a list of Sources */
+ALAPI void ALAPIENTRY alSourceRewindv( ALsizei ns, const ALuint *sids );
+
+/* Pause a list of Sources */
+ALAPI void ALAPIENTRY alSourcePausev( ALsizei ns, const ALuint *sids );
+
+/*
+ * Source based playback calls
+ */
+
+/* Play, replay, or resume a Source */
+ALAPI void ALAPIENTRY alSourcePlay( ALuint sid );
+
+/* Stop a Source */
+ALAPI void ALAPIENTRY alSourceStop( ALuint sid );
+
+/* Rewind a Source (set playback postiton to beginning) */
+ALAPI void ALAPIENTRY alSourceRewind( ALuint sid );
+
+/* Pause a Source */
+ALAPI void ALAPIENTRY alSourcePause( ALuint sid );
+
+/*
+ * Source Queuing
+ */
+ALAPI void ALAPIENTRY alSourceQueueBuffers( ALuint sid, ALsizei numEntries, const ALuint *bids );
+
+ALAPI void ALAPIENTRY alSourceUnqueueBuffers( ALuint sid, ALsizei numEntries, ALuint *bids );
+
+
+/**
+ * BUFFER
+ * Buffer objects are storage space for sample data.
+ * Buffers are referred to by Sources. One Buffer can be used
+ * by multiple Sources.
+ *
+ * Properties include: -
+ *
+ * Frequency (Query only) AL_FREQUENCY ALint
+ * Size (Query only) AL_SIZE ALint
+ * Bits (Query only) AL_BITS ALint
+ * Channels (Query only) AL_CHANNELS ALint
+ */
+
+/* Create Buffer objects */
+ALAPI void ALAPIENTRY alGenBuffers( ALsizei n, ALuint* buffers );
+
+/* Delete Buffer objects */
+ALAPI void ALAPIENTRY alDeleteBuffers( ALsizei n, const ALuint* buffers );
+
+/* Verify a handle is a valid Buffer */
+ALAPI ALboolean ALAPIENTRY alIsBuffer( ALuint bid );
+
+/* Specify the data to be copied into a buffer */
+ALAPI void ALAPIENTRY alBufferData( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq );
+
+/*
+ * Set Buffer parameters
+ */
+ALAPI void ALAPIENTRY alBufferf( ALuint bid, ALenum param, ALfloat value );
+
+ALAPI void ALAPIENTRY alBuffer3f( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
+
+ALAPI void ALAPIENTRY alBufferfv( ALuint bid, ALenum param, const ALfloat* values );
+
+ALAPI void ALAPIENTRY alBufferi( ALuint bid, ALenum param, ALint value );
+
+ALAPI void ALAPIENTRY alBuffer3i( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 );
+
+ALAPI void ALAPIENTRY alBufferiv( ALuint bid, ALenum param, const ALint* values );
+
+/*
+ * Get Buffer parameters
+ */
+ALAPI void ALAPIENTRY alGetBufferf( ALuint bid, ALenum param, ALfloat* value );
+
+ALAPI void ALAPIENTRY alGetBuffer3f( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
+
+ALAPI void ALAPIENTRY alGetBufferfv( ALuint bid, ALenum param, ALfloat* values );
+
+ALAPI void ALAPIENTRY alGetBufferi( ALuint bid, ALenum param, ALint* value );
+
+ALAPI void ALAPIENTRY alGetBuffer3i( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
+
+ALAPI void ALAPIENTRY alGetBufferiv( ALuint bid, ALenum param, ALint* values );
+
+
+/*
+ * Global Parameters
+ */
+ALAPI void ALAPIENTRY alDopplerFactor( ALfloat value );
+
+ALAPI void ALAPIENTRY alDopplerVelocity( ALfloat value );
+
+ALAPI void ALAPIENTRY alSpeedOfSound( ALfloat value );
+
+ALAPI void ALAPIENTRY alDistanceModel( ALenum distanceModel );
+
+#else /* AL_NO_PROTOTYPES */
+
+/*
+void (ALAPIENTRY *alEnable)( ALenum capability );
+void (ALAPIENTRY *alDisable)( ALenum capability );
+ALboolean (ALAPIENTRY *alIsEnabled)( ALenum capability );
+const ALchar* (ALAPIENTRY *alGetString)( ALenum param );
+void (ALAPIENTRY *alGetBooleanv)( ALenum param, ALboolean* data );
+void (ALAPIENTRY *alGetIntegerv)( ALenum param, ALint* data );
+void (ALAPIENTRY *alGetFloatv)( ALenum param, ALfloat* data );
+void (ALAPIENTRY *alGetDoublev)( ALenum param, ALdouble* data );
+ALboolean (ALAPIENTRY *alGetBoolean)( ALenum param );
+ALint (ALAPIENTRY *alGetInteger)( ALenum param );
+ALfloat (ALAPIENTRY *alGetFloat)( ALenum param );
+ALdouble (ALAPIENTRY *alGetDouble)( ALenum param );
+ALenum (ALAPIENTRY *alGetError)( ALvoid );
+ALboolean (ALAPIENTRY *alIsExtensionPresent)(const ALchar* extname );
+void* (ALAPIENTRY *alGetProcAddress)( const ALchar* fname );
+ALenum (ALAPIENTRY *alGetEnumValue)( const ALchar* ename );
+void (ALAPIENTRY *alListenerf)( ALenum param, ALfloat value );
+void (ALAPIENTRY *alListener3f)( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
+void (ALAPIENTRY *alListenerfv)( ALenum param, const ALfloat* values );
+void (ALAPIENTRY *alListeneri)( ALenum param, ALint value );
+void (ALAPIENTRY *alListener3i)( ALenum param, ALint value1, ALint value2, ALint value3 );
+void (ALAPIENTRY *alListeneriv)( ALenum param, const ALint* values );
+void (ALAPIENTRY *alGetListenerf)( ALenum param, ALfloat* value );
+void (ALAPIENTRY *alGetListener3f)( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 );
+void (ALAPIENTRY *alGetListenerfv)( ALenum param, ALfloat* values );
+void (ALAPIENTRY *alGetListeneri)( ALenum param, ALint* value );
+void (ALAPIENTRY *alGetListener3i)( ALenum param, ALint *value1, ALint *value2, ALint *value3 );
+void (ALAPIENTRY *alGetListeneriv)( ALenum param, ALint* values );
+void (ALAPIENTRY *alGenSources)( ALsizei n, ALuint* sources );
+void (ALAPIENTRY *alDeleteSources)( ALsizei n, const ALuint* sources );
+ALboolean (ALAPIENTRY *alIsSource)( ALuint sid );
+void (ALAPIENTRY *alSourcef)( ALuint sid, ALenum param, ALfloat value);
+void (ALAPIENTRY *alSource3f)( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
+void (ALAPIENTRY *alSourcefv)( ALuint sid, ALenum param, const ALfloat* values );
+void (ALAPIENTRY *alSourcei)( ALuint sid, ALenum param, ALint value);
+void (ALAPIENTRY *alSource3i)( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 );
+void (ALAPIENTRY *alSourceiv)( ALuint sid, ALenum param, const ALint* values );
+void (ALAPIENTRY *alGetSourcef)( ALuint sid, ALenum param, ALfloat* value );
+void (ALAPIENTRY *alGetSource3f)( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
+void (ALAPIENTRY *alGetSourcefv)( ALuint sid, ALenum param, ALfloat* values );
+void (ALAPIENTRY *alGetSourcei)( ALuint sid, ALenum param, ALint* value );
+void (ALAPIENTRY *alGetSource3i)( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
+void (ALAPIENTRY *alGetSourceiv)( ALuint sid, ALenum param, ALint* values );
+void (ALAPIENTRY *alSourcePlayv)( ALsizei ns, const ALuint *sids );
+void (ALAPIENTRY *alSourceStopv)( ALsizei ns, const ALuint *sids );
+void (ALAPIENTRY *alSourceRewindv)( ALsizei ns, const ALuint *sids );
+void (ALAPIENTRY *alSourcePausev)( ALsizei ns, const ALuint *sids );
+void (ALAPIENTRY *alSourcePlay)( ALuint sid );
+void (ALAPIENTRY *alSourceStop)( ALuint sid );
+void (ALAPIENTRY *alSourceRewind)( ALuint sid );
+void (ALAPIENTRY *alSourcePause)( ALuint sid );
+void (ALAPIENTRY *alSourceQueueBuffers)( ALuint sid, ALsizei numEntries, const ALuint *bids );
+void (ALAPIENTRY *alSourceUnqueueBuffers)( ALuint sid, ALsizei numEntries, ALuint *bids );
+void (ALAPIENTRY *alGenBuffers)( ALsizei n, ALuint* buffers );
+void (ALAPIENTRY *alDeleteBuffers)( ALsizei n, const ALuint* buffers );
+ALboolean (ALAPIENTRY *alIsBuffer)( ALuint bid );
+void (ALAPIENTRY *alBufferData)( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq );
+void (ALAPIENTRY *alBufferf)( ALuint bid, ALenum param, ALfloat value);
+void (ALAPIENTRY *alBuffer3f)( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
+void (ALAPIENTRY *alBufferfv)( ALuint bid, ALenum param, const ALfloat* values );
+void (ALAPIENTRY *alBufferi)( ALuint bid, ALenum param, ALint value);
+void (ALAPIENTRY *alBuffer3i)( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 );
+void (ALAPIENTRY *alBufferiv)( ALuint bid, ALenum param, const ALint* values );
+void (ALAPIENTRY *alGetBufferf)( ALuint bid, ALenum param, ALfloat* value );
+void (ALAPIENTRY *alGetBuffer3f)( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
+void (ALAPIENTRY *alGetBufferfv)( ALuint bid, ALenum param, ALfloat* values );
+void (ALAPIENTRY *alGetBufferi)( ALuint bid, ALenum param, ALint* value );
+void (ALAPIENTRY *alGetBuffer3i)( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
+void (ALAPIENTRY *alGetBufferiv)( ALuint bid, ALenum param, ALint* values );
+void (ALAPIENTRY *alDopplerFactor)( ALfloat value );
+void (ALAPIENTRY *alDopplerVelocity)( ALfloat value );
+void (ALAPIENTRY *alSpeedOfSound)( ALfloat value );
+void (ALAPIENTRY *alDistanceModel)( ALenum distanceModel );
+*/
+/* Type Definitions */
+
+typedef void (ALAPIENTRY *LPALENABLE)( ALenum capability );
+typedef void (ALAPIENTRY *LPALDISABLE)( ALenum capability );
+typedef ALboolean (ALAPIENTRY *LPALISENABLED)( ALenum capability );
+typedef const ALchar* (ALAPIENTRY *LPALGETSTRING)( ALenum param );
+typedef void (ALAPIENTRY *LPALGETBOOLEANV)( ALenum param, ALboolean* data );
+typedef void (ALAPIENTRY *LPALGETINTEGERV)( ALenum param, ALint* data );
+typedef void (ALAPIENTRY *LPALGETFLOATV)( ALenum param, ALfloat* data );
+typedef void (ALAPIENTRY *LPALGETDOUBLEV)( ALenum param, ALdouble* data );
+typedef ALboolean (ALAPIENTRY *LPALGETBOOLEAN)( ALenum param );
+typedef ALint (ALAPIENTRY *LPALGETINTEGER)( ALenum param );
+typedef ALfloat (ALAPIENTRY *LPALGETFLOAT)( ALenum param );
+typedef ALdouble (ALAPIENTRY *LPALGETDOUBLE)( ALenum param );
+typedef ALenum (ALAPIENTRY *LPALGETERROR)( ALvoid );
+typedef ALboolean (ALAPIENTRY *LPALISEXTENSIONPRESENT)(const ALchar* extname );
+typedef void* (ALAPIENTRY *LPALGETPROCADDRESS)( const ALchar* fname );
+typedef ALenum (ALAPIENTRY *LPALGETENUMVALUE)( const ALchar* ename );
+typedef void (ALAPIENTRY *LPALLISTENERF)( ALenum param, ALfloat value );
+typedef void (ALAPIENTRY *LPALLISTENER3F)( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
+typedef void (ALAPIENTRY *LPALLISTENERFV)( ALenum param, const ALfloat* values );
+typedef void (ALAPIENTRY *LPALLISTENERI)( ALenum param, ALint value );
+typedef void (ALAPIENTRY *LPALLISTENER3I)( ALenum param, ALint value1, ALint value2, ALint value3 );
+typedef void (ALAPIENTRY *LPALLISTENERIV)( ALenum param, const ALint* values );
+typedef void (ALAPIENTRY *LPALGETLISTENERF)( ALenum param, ALfloat* value );
+typedef void (ALAPIENTRY *LPALGETLISTENER3F)( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 );
+typedef void (ALAPIENTRY *LPALGETLISTENERFV)( ALenum param, ALfloat* values );
+typedef void (ALAPIENTRY *LPALGETLISTENERI)( ALenum param, ALint* value );
+typedef void (ALAPIENTRY *LPALGETLISTENER3I)( ALenum param, ALint *value1, ALint *value2, ALint *value3 );
+typedef void (ALAPIENTRY *LPALGETLISTENERIV)( ALenum param, ALint* values );
+typedef void (ALAPIENTRY *LPALGENSOURCES)( ALsizei n, ALuint* sources );
+typedef void (ALAPIENTRY *LPALDELETESOURCES)( ALsizei n, const ALuint* sources );
+typedef ALboolean (ALAPIENTRY *LPALISSOURCE)( ALuint sid );
+typedef void (ALAPIENTRY *LPALSOURCEF)( ALuint sid, ALenum param, ALfloat value);
+typedef void (ALAPIENTRY *LPALSOURCE3F)( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
+typedef void (ALAPIENTRY *LPALSOURCEFV)( ALuint sid, ALenum param, const ALfloat* values );
+typedef void (ALAPIENTRY *LPALSOURCEI)( ALuint sid, ALenum param, ALint value);
+typedef void (ALAPIENTRY *LPALSOURCE3I)( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 );
+typedef void (ALAPIENTRY *LPALSOURCEIV)( ALuint sid, ALenum param, const ALint* values );
+typedef void (ALAPIENTRY *LPALGETSOURCEF)( ALuint sid, ALenum param, ALfloat* value );
+typedef void (ALAPIENTRY *LPALGETSOURCE3F)( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
+typedef void (ALAPIENTRY *LPALGETSOURCEFV)( ALuint sid, ALenum param, ALfloat* values );
+typedef void (ALAPIENTRY *LPALGETSOURCEI)( ALuint sid, ALenum param, ALint* value );
+typedef void (ALAPIENTRY *LPALGETSOURCE3I)( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
+typedef void (ALAPIENTRY *LPALGETSOURCEIV)( ALuint sid, ALenum param, ALint* values );
+typedef void (ALAPIENTRY *LPALSOURCEPLAYV)( ALsizei ns, const ALuint *sids );
+typedef void (ALAPIENTRY *LPALSOURCESTOPV)( ALsizei ns, const ALuint *sids );
+typedef void (ALAPIENTRY *LPALSOURCEREWINDV)( ALsizei ns, const ALuint *sids );
+typedef void (ALAPIENTRY *LPALSOURCEPAUSEV)( ALsizei ns, const ALuint *sids );
+typedef void (ALAPIENTRY *LPALSOURCEPLAY)( ALuint sid );
+typedef void (ALAPIENTRY *LPALSOURCESTOP)( ALuint sid );
+typedef void (ALAPIENTRY *LPALSOURCEREWIND)( ALuint sid );
+typedef void (ALAPIENTRY *LPALSOURCEPAUSE)( ALuint sid );
+typedef void (ALAPIENTRY *LPALSOURCEQUEUEBUFFERS)(ALuint sid, ALsizei numEntries, const ALuint *bids );
+typedef void (ALAPIENTRY *LPALSOURCEUNQUEUEBUFFERS)(ALuint sid, ALsizei numEntries, ALuint *bids );
+typedef void (ALAPIENTRY *LPALGENBUFFERS)( ALsizei n, ALuint* buffers );
+typedef void (ALAPIENTRY *LPALDELETEBUFFERS)( ALsizei n, const ALuint* buffers );
+typedef ALboolean (ALAPIENTRY *LPALISBUFFER)( ALuint bid );
+typedef void (ALAPIENTRY *LPALBUFFERDATA)( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq );
+typedef void (ALAPIENTRY *LPALBUFFERF)( ALuint bid, ALenum param, ALfloat value);
+typedef void (ALAPIENTRY *LPALBUFFER3F)( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
+typedef void (ALAPIENTRY *LPALBUFFERFV)( ALuint bid, ALenum param, const ALfloat* values );
+typedef void (ALAPIENTRY *LPALBUFFERI)( ALuint bid, ALenum param, ALint value);
+typedef void (ALAPIENTRY *LPALBUFFER3I)( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 );
+typedef void (ALAPIENTRY *LPALBUFFERIV)( ALuint bid, ALenum param, const ALint* values );
+typedef void (ALAPIENTRY *LPALGETBUFFERF)( ALuint bid, ALenum param, ALfloat* value );
+typedef void (ALAPIENTRY *LPALGETBUFFER3F)( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
+typedef void (ALAPIENTRY *LPALGETBUFFERFV)( ALuint bid, ALenum param, ALfloat* values );
+typedef void (ALAPIENTRY *LPALGETBUFFERI)( ALuint bid, ALenum param, ALint* value );
+typedef void (ALAPIENTRY *LPALGETBUFFER3I)( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
+typedef void (ALAPIENTRY *LPALGETBUFFERIV)( ALuint bid, ALenum param, ALint* values );
+typedef void (ALAPIENTRY *LPALDOPPLERFACTOR)( ALfloat value );
+typedef void (ALAPIENTRY *LPALDOPPLERVELOCITY)( ALfloat value );
+typedef void (ALAPIENTRY *LPALSPEEDOFSOUND)( ALfloat value );
+typedef void (ALAPIENTRY *LPALDISTANCEMODEL)( ALenum distanceModel );
+
+#endif /* AL_NO_PROTOTYPES */
+
+#ifdef TARGET_OS_MAC
+#if TARGET_OS_MAC
+#pragma export off
+#endif /* TARGET_OS_MAC */
+#endif /* TARGET_OS_MAC */
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __al_h_ */
diff --git a/code/AL/alc.h b/code/AL/alc.h
new file mode 100644
index 0000000..f3a41bc
--- /dev/null
+++ b/code/AL/alc.h
@@ -0,0 +1,166 @@
+#ifndef ALC_CONTEXT_H_
+#define ALC_CONTEXT_H_
+
+#include "altypes.h"
+#include "alctypes.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ALC_VERSION_0_1 1
+
+#ifdef _WIN32
+ typedef struct ALCdevice_struct ALCdevice;
+ typedef struct ALCcontext_struct ALCcontext;
+ #ifndef _XBOX
+ #ifdef _OPENAL32LIB
+ #define ALCAPI __declspec(dllexport)
+ #else
+ #define ALCAPI __declspec(dllimport)
+ #endif
+ #define ALCAPIENTRY __cdecl
+ #endif
+#endif
+
+#ifdef TARGET_OS_MAC
+ #if TARGET_OS_MAC
+ #pragma export on
+ #endif
+#endif
+
+#ifndef ALCAPI
+ #define ALCAPI
+#endif
+
+#ifndef ALCAPIENTRY
+ #define ALCAPIENTRY
+#endif
+
+
+#ifndef ALC_NO_PROTOTYPES
+
+/*
+ * Context Management
+ */
+ALCAPI ALCcontext * ALCAPIENTRY alcCreateContext( ALCdevice *device, const ALCint* attrlist );
+
+ALCAPI ALCboolean ALCAPIENTRY alcMakeContextCurrent( ALCcontext *context );
+
+ALCAPI void ALCAPIENTRY alcProcessContext( ALCcontext *context );
+
+ALCAPI void ALCAPIENTRY alcSuspendContext( ALCcontext *context );
+
+ALCAPI void ALCAPIENTRY alcDestroyContext( ALCcontext *context );
+
+ALCAPI ALCcontext * ALCAPIENTRY alcGetCurrentContext( ALCvoid );
+
+ALCAPI ALCdevice* ALCAPIENTRY alcGetContextsDevice( ALCcontext *context );
+
+
+/*
+ * Device Management
+ */
+ALCAPI ALCdevice * ALCAPIENTRY alcOpenDevice( const ALchar *devicename );
+
+ALCAPI ALCboolean ALCAPIENTRY alcCloseDevice( ALCdevice *device );
+
+
+/*
+ * Error support.
+ * Obtain the most recent Context error
+ */
+ALCAPI ALCenum ALCAPIENTRY alcGetError( ALCdevice *device );
+
+
+/*
+ * Extension support.
+ * Query for the presence of an extension, and obtain any appropriate
+ * function pointers and enum values.
+ */
+ALCAPI ALCboolean ALCAPIENTRY alcIsExtensionPresent( ALCdevice *device, const ALCchar *extname );
+
+ALCAPI void * ALCAPIENTRY alcGetProcAddress( ALCdevice *device, const ALCchar *funcname );
+
+ALCAPI ALCenum ALCAPIENTRY alcGetEnumValue( ALCdevice *device, const ALCchar *enumname );
+
+
+/*
+ * Query functions
+ */
+ALCAPI const ALCchar * ALCAPIENTRY alcGetString( ALCdevice *device, ALCenum param );
+
+ALCAPI void ALCAPIENTRY alcGetIntegerv( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *data );
+
+
+/*
+ * Capture functions
+ */
+ALCAPI ALCdevice* ALCAPIENTRY alcCaptureOpenDevice( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize );
+
+ALCAPI ALCboolean ALCAPIENTRY alcCaptureCloseDevice( ALCdevice *device );
+
+ALCAPI void ALCAPIENTRY alcCaptureStart( ALCdevice *device );
+
+ALCAPI void ALCAPIENTRY alcCaptureStop( ALCdevice *device );
+
+ALCAPI void ALCAPIENTRY alcCaptureSamples( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
+
+#else /* ALC_NO_PROTOTYPES */
+/*
+ALCAPI ALCcontext * (ALCAPIENTRY *alcCreateContext)( ALCdevice *device, const ALCint* attrlist );
+ALCAPI ALCboolean (ALCAPIENTRY *alcMakeContextCurrent)( ALCcontext *context );
+ALCAPI void (ALCAPIENTRY *alcProcessContext)( ALCcontext *context );
+ALCAPI void (ALCAPIENTRY *alcSuspendContext)( ALCcontext *context );
+ALCAPI void (ALCAPIENTRY *alcDestroyContext)( ALCcontext *context );
+ALCAPI ALCcontext * (ALCAPIENTRY *alcGetCurrentContext)( ALCvoid );
+ALCAPI ALCdevice * (ALCAPIENTRY *alcGetContextsDevice)( ALCcontext *context );
+ALCAPI ALCdevice * (ALCAPIENTRY *alcOpenDevice)( const ALCchar *devicename );
+ALCAPI ALCboolean (ALCAPIENTRY *alcCloseDevice)( ALCdevice *device );
+ALCAPI ALCenum (ALCAPIENTRY *alcGetError)( ALCdevice *device );
+ALCAPI ALCboolean (ALCAPIENTRY *alcIsExtensionPresent)( ALCdevice *device, const ALCchar *extname );
+ALCAPI void * (ALCAPIENTRY *alcGetProcAddress)( ALCdevice *device, const ALCchar *funcname );
+ALCAPI ALCenum (ALCAPIENTRY *alcGetEnumValue)( ALCdevice *device, const ALCchar *enumname );
+ALCAPI const ALCchar* (ALCAPIENTRY *alcGetString)( ALCdevice *device, ALCenum param );
+ALCAPI void (ALCAPIENTRY *alcGetIntegerv)( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *dest );
+ALCAPI ALCdevice * (ALCAPIENTRY *alcCaptureOpenDevice)( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize );
+ALCAPI ALCboolean (ALCAPIENTRY *alcCaptureCloseDevice)( ALCdevice *device );
+ALCAPI void (ALCAPIENTRY *alcCaptureStart)( ALCdevice *device );
+ALCAPI void (ALCAPIENTRY *alcCaptureStop)( ALCdevice *device );
+ALCAPI void (ALCAPIENTRY *alcCaptureSamples)( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
+*/
+/* Type definitions */
+typedef ALCcontext * (ALCAPIENTRY *LPALCCREATECONTEXT) (ALCdevice *device, const ALCint *attrlist);
+typedef ALCboolean (ALCAPIENTRY *LPALCMAKECONTEXTCURRENT)( ALCcontext *context );
+typedef void (ALCAPIENTRY *LPALCPROCESSCONTEXT)( ALCcontext *context );
+typedef void (ALCAPIENTRY *LPALCSUSPENDCONTEXT)( ALCcontext *context );
+typedef void (ALCAPIENTRY *LPALCDESTROYCONTEXT)( ALCcontext *context );
+typedef ALCcontext * (ALCAPIENTRY *LPALCGETCURRENTCONTEXT)( ALCvoid );
+typedef ALCdevice * (ALCAPIENTRY *LPALCGETCONTEXTSDEVICE)( ALCcontext *context );
+typedef ALCdevice * (ALCAPIENTRY *LPALCOPENDEVICE)( const ALCchar *devicename );
+typedef ALCboolean (ALCAPIENTRY *LPALCCLOSEDEVICE)( ALCdevice *device );
+typedef ALCenum (ALCAPIENTRY *LPALCGETERROR)( ALCdevice *device );
+typedef ALCboolean (ALCAPIENTRY *LPALCISEXTENSIONPRESENT)( ALCdevice *device, const ALCchar *extname );
+typedef void * (ALCAPIENTRY *LPALCGETPROCADDRESS)(ALCdevice *device, const ALCchar *funcname );
+typedef ALCenum (ALCAPIENTRY *LPALCGETENUMVALUE)(ALCdevice *device, const ALCchar *enumname );
+typedef const ALCchar* (ALCAPIENTRY *LPALCGETSTRING)( ALCdevice *device, ALCenum param );
+typedef void (ALCAPIENTRY *LPALCGETINTEGERV)( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *dest );
+typedef ALCdevice * (ALCAPIENTRY *LPALCCAPTUREOPENDEVICE)( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize );
+typedef ALCboolean (ALCAPIENTRY *LPALCCAPTURECLOSEDEVICE)( ALCdevice *device );
+typedef void (ALCAPIENTRY *LPALCCAPTURESTART)( ALCdevice *device );
+typedef void (ALCAPIENTRY *LPALCCAPTURESTOP)( ALCdevice *device );
+typedef void (ALCAPIENTRY *LPALCCAPTURESAMPLES)( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
+
+#endif /* ALC_NO_PROTOTYPES */
+
+#ifdef TARGET_OS_MAC
+#if TARGET_OS_MAC
+#pragma export off
+#endif /* TARGET_OS_MAC */
+#endif /* TARGET_OS_MAC */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ALC_CONTEXT_H_ */
diff --git a/code/AL/alctypes.h b/code/AL/alctypes.h
new file mode 100644
index 0000000..181384b
--- /dev/null
+++ b/code/AL/alctypes.h
@@ -0,0 +1,142 @@
+#ifndef _ALCTYPES_H_
+#define _ALCTYPES_H_
+
+#if !defined(_WIN32)
+struct _AL_device;
+typedef struct _AL_device ALCdevice;
+
+typedef void ALCcontext;
+#endif /* _WIN32 */
+
+typedef int ALCenum;
+
+/** ALC boolean type. */
+typedef char ALCboolean;
+
+/** ALC 8bit signed byte. */
+typedef char ALCbyte;
+
+/** ALC 8bit unsigned byte. */
+typedef unsigned char ALCubyte;
+
+/** OpenAL 8bit char */
+typedef char ALCchar;
+
+/** ALC 16bit signed short integer type. */
+typedef short ALCshort;
+
+/** ALC 16bit unsigned short integer type. */
+typedef unsigned short ALCushort;
+
+/** ALC 32bit unsigned integer type. */
+typedef unsigned ALCuint;
+
+/** ALC 32bit signed integer type. */
+typedef int ALCint;
+
+/** ALC 32bit floating point type. */
+typedef float ALCfloat;
+
+/** ALC 64bit double point type. */
+typedef double ALCdouble;
+
+/** ALC 32bit type. */
+typedef int ALCsizei;
+
+/** ALC void type */
+typedef void ALCvoid;
+
+/* Enumerant values begin at column 50. No tabs. */
+
+/* bad value */
+#define ALC_INVALID 0
+
+/* Boolean False. */
+#define ALC_FALSE 0
+
+/* Boolean True. */
+#define ALC_TRUE 1
+
+/**
+ * followed by <int> Hz
+ */
+#define ALC_FREQUENCY 0x1007
+
+/**
+ * followed by <int> Hz
+ */
+#define ALC_REFRESH 0x1008
+
+/**
+ * followed by AL_TRUE, AL_FALSE
+ */
+#define ALC_SYNC 0x1009
+
+/**
+ * followed by <int> Num of requested Mono (3D) Sources
+ */
+#define ALC_MONO_SOURCES 0x1010
+
+/**
+ * followed by <int> Num of requested Stereo Sources
+ */
+#define ALC_STEREO_SOURCES 0x1011
+
+/**
+ * errors
+ */
+
+/**
+ * No error
+ */
+#define ALC_NO_ERROR ALC_FALSE
+
+/**
+ * No device
+ */
+#define ALC_INVALID_DEVICE 0xA001
+
+/**
+ * invalid context ID
+ */
+#define ALC_INVALID_CONTEXT 0xA002
+
+/**
+ * bad enum
+ */
+#define ALC_INVALID_ENUM 0xA003
+
+/**
+ * bad value
+ */
+#define ALC_INVALID_VALUE 0xA004
+
+/**
+ * Out of memory.
+ */
+#define ALC_OUT_OF_MEMORY 0xA005
+
+
+
+/**
+ * The Specifier string for default device
+ */
+#define ALC_DEFAULT_DEVICE_SPECIFIER 0x1004
+#define ALC_DEVICE_SPECIFIER 0x1005
+#define ALC_EXTENSIONS 0x1006
+
+#define ALC_MAJOR_VERSION 0x1000
+#define ALC_MINOR_VERSION 0x1001
+
+#define ALC_ATTRIBUTES_SIZE 0x1002
+#define ALC_ALL_ATTRIBUTES 0x1003
+
+/**
+ * Capture extension
+ */
+#define ALC_CAPTURE_DEVICE_SPECIFIER 0x310
+#define ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER 0x311
+#define ALC_CAPTURE_SAMPLES 0x312
+
+
+#endif /* _ALCTYPES_H */
diff --git a/code/AL/altypes.h b/code/AL/altypes.h
new file mode 100644
index 0000000..3ec959f
--- /dev/null
+++ b/code/AL/altypes.h
@@ -0,0 +1,352 @@
+#ifndef _AL_TYPES_H_
+#define _AL_TYPES_H_
+
+/* define platform type */
+#if !defined(MACINTOSH_AL) && !defined(LINUX_AL) && !defined(WINDOWS_AL)
+ #ifdef __APPLE__
+ #define MACINTOSH_AL
+ #else
+ #ifdef _WIN32
+ #define WINDOWS_AL
+ #else
+ #define LINUX_AL
+ #endif
+ #endif
+#endif
+
+/** OpenAL bool type. */
+typedef char ALboolean;
+
+/** OpenAL 8bit signed byte. */
+typedef char ALbyte;
+
+/** OpenAL 8bit unsigned byte. */
+typedef unsigned char ALubyte;
+
+/** OpenAL 8bit char */
+typedef char ALchar;
+
+/** OpenAL 16bit signed short integer type. */
+typedef short ALshort;
+
+/** OpenAL 16bit unsigned short integer type. */
+typedef unsigned short ALushort;
+
+/** OpenAL 32bit unsigned integer type. */
+typedef unsigned int ALuint;
+
+/** OpenAL 32bit signed integer type. */
+typedef int ALint;
+
+/** OpenAL 32bit floating point type. */
+typedef float ALfloat;
+
+/** OpenAL 64bit double point type. */
+typedef double ALdouble;
+
+/** OpenAL 32bit type. */
+typedef int ALsizei;
+
+/** OpenAL void type (for params, not returns). */
+typedef void ALvoid;
+
+/** OpenAL enumerations. */
+typedef int ALenum;
+
+/** OpenAL bitfields. */
+typedef unsigned int ALbitfield;
+
+/** OpenAL clamped float. */
+typedef ALfloat ALclampf;
+
+/** Openal clamped double. */
+typedef ALdouble ALclampd;
+
+/* Enumerant values begin at column 50. No tabs. */
+
+/* bad value */
+#define AL_INVALID -1
+
+#define AL_NONE 0
+
+/* Boolean False. */
+#define AL_FALSE 0
+
+/** Boolean True. */
+#define AL_TRUE 1
+
+/** Indicate Source has relative coordinates. */
+#define AL_SOURCE_RELATIVE 0x202
+
+
+
+/**
+ * Directional source, inner cone angle, in degrees.
+ * Range: [0-360]
+ * Default: 360
+ */
+#define AL_CONE_INNER_ANGLE 0x1001
+
+/**
+ * Directional source, outer cone angle, in degrees.
+ * Range: [0-360]
+ * Default: 360
+ */
+#define AL_CONE_OUTER_ANGLE 0x1002
+
+/**
+ * Specify the pitch to be applied, either at source,
+ * or on mixer results, at listener.
+ * Range: [0.5-2.0]
+ * Default: 1.0
+ */
+#define AL_PITCH 0x1003
+
+/**
+ * Specify the current location in three dimensional space.
+ * OpenAL, like OpenGL, uses a right handed coordinate system,
+ * where in a frontal default view X (thumb) points right,
+ * Y points up (index finger), and Z points towards the
+ * viewer/camera (middle finger).
+ * To switch from a left handed coordinate system, flip the
+ * sign on the Z coordinate.
+ * Listener position is always in the world coordinate system.
+ */
+#define AL_POSITION 0x1004
+
+/** Specify the current direction. */
+#define AL_DIRECTION 0x1005
+
+/** Specify the current velocity in three dimensional space. */
+#define AL_VELOCITY 0x1006
+
+/**
+ * Indicate whether source is looping.
+ * Type: ALboolean?
+ * Range: [AL_TRUE, AL_FALSE]
+ * Default: FALSE.
+ */
+#define AL_LOOPING 0x1007
+
+/**
+ * Indicate the buffer to provide sound samples.
+ * Type: ALuint.
+ * Range: any valid Buffer id.
+ */
+#define AL_BUFFER 0x1009
+
+/**
+ * Indicate the gain (volume amplification) applied.
+ * Type: ALfloat.
+ * Range: ]0.0- ]
+ * A value of 1.0 means un-attenuated/unchanged.
+ * Each division by 2 equals an attenuation of -6dB.
+ * Each multiplicaton with 2 equals an amplification of +6dB.
+ * A value of 0.0 is meaningless with respect to a logarithmic
+ * scale; it is interpreted as zero volume - the channel
+ * is effectively disabled.
+ */
+#define AL_GAIN 0x100A
+
+/*
+ * Indicate minimum source attenuation
+ * Type: ALfloat
+ * Range: [0.0 - 1.0]
+ *
+ * Logarthmic
+ */
+#define AL_MIN_GAIN 0x100D
+
+/**
+ * Indicate maximum source attenuation
+ * Type: ALfloat
+ * Range: [0.0 - 1.0]
+ *
+ * Logarthmic
+ */
+#define AL_MAX_GAIN 0x100E
+
+/**
+ * Indicate listener orientation.
+ *
+ * at/up
+ */
+#define AL_ORIENTATION 0x100F
+
+/**
+ * Specify the channel mask. (Creative)
+ * Type: ALuint
+ * Range: [0 - 255]
+ */
+#define AL_CHANNEL_MASK 0x3000
+
+
+/**
+ * Source state information.
+ */
+#define AL_SOURCE_STATE 0x1010
+#define AL_INITIAL 0x1011
+#define AL_PLAYING 0x1012
+#define AL_PAUSED 0x1013
+#define AL_STOPPED 0x1014
+
+/**
+ * Buffer Queue params
+ */
+#define AL_BUFFERS_QUEUED 0x1015
+#define AL_BUFFERS_PROCESSED 0x1016
+
+/**
+ * Source buffer position information
+ */
+#define AL_SEC_OFFSET 0x1024
+#define AL_SAMPLE_OFFSET 0x1025
+#define AL_BYTE_OFFSET 0x1026
+
+/*
+ * Source type (Static, Streaming or undetermined)
+ * Source is Static if a Buffer has been attached using AL_BUFFER
+ * Source is Streaming if one or more Buffers have been attached using alSourceQueueBuffers
+ * Source is undetermined when it has the NULL buffer attached
+ */
+#define AL_SOURCE_TYPE 0x1027
+#define AL_STATIC 0x1028
+#define AL_STREAMING 0x1029
+#define AL_UNDETERMINED 0x1030
+
+/** Sound samples: format specifier. */
+#define AL_FORMAT_MONO8 0x1100
+#define AL_FORMAT_MONO16 0x1101
+#define AL_FORMAT_STEREO8 0x1102
+#define AL_FORMAT_STEREO16 0x1103
+
+/**
+ * source specific reference distance
+ * Type: ALfloat
+ * Range: 0.0 - +inf
+ *
+ * At 0.0, no distance attenuation occurs. Default is
+ * 1.0.
+ */
+#define AL_REFERENCE_DISTANCE 0x1020
+
+/**
+ * source specific rolloff factor
+ * Type: ALfloat
+ * Range: 0.0 - +inf
+ *
+ */
+#define AL_ROLLOFF_FACTOR 0x1021
+
+/**
+ * Directional source, outer cone gain.
+ *
+ * Default: 0.0
+ * Range: [0.0 - 1.0]
+ * Logarithmic
+ */
+#define AL_CONE_OUTER_GAIN 0x1022
+
+/**
+ * Indicate distance above which sources are not
+ * attenuated using the inverse clamped distance model.
+ *
+ * Default: +inf
+ * Type: ALfloat
+ * Range: 0.0 - +inf
+ */
+#define AL_MAX_DISTANCE 0x1023
+
+/**
+ * Sound samples: frequency, in units of Hertz [Hz].
+ * This is the number of samples per second. Half of the
+ * sample frequency marks the maximum significant
+ * frequency component.
+ */
+#define AL_FREQUENCY 0x2001
+#define AL_BITS 0x2002
+#define AL_CHANNELS 0x2003
+#define AL_SIZE 0x2004
+#define AL_DATA 0x2005
+
+/**
+ * Buffer state.
+ *
+ * Not supported for public use (yet).
+ */
+#define AL_UNUSED 0x2010
+#define AL_PENDING 0x2011
+#define AL_PROCESSED 0x2012
+
+
+/** Errors: No Error. */
+#define AL_NO_ERROR AL_FALSE
+
+/**
+ * Invalid Name paramater passed to AL call.
+ */
+#define AL_INVALID_NAME 0xA001
+
+/**
+ * Invalid parameter passed to AL call.
+ */
+#define AL_ILLEGAL_ENUM 0xA002
+#define AL_INVALID_ENUM 0xA002
+
+/**
+ * Invalid enum parameter value.
+ */
+#define AL_INVALID_VALUE 0xA003
+
+/**
+ * Illegal call.
+ */
+#define AL_ILLEGAL_COMMAND 0xA004
+#define AL_INVALID_OPERATION 0xA004
+
+
+/**
+ * No mojo.
+ */
+#define AL_OUT_OF_MEMORY 0xA005
+
+
+/** Context strings: Vendor Name. */
+#define AL_VENDOR 0xB001
+#define AL_VERSION 0xB002
+#define AL_RENDERER 0xB003
+#define AL_EXTENSIONS 0xB004
+
+/** Global tweakage. */
+
+/**
+ * Doppler scale. Default 1.0
+ */
+#define AL_DOPPLER_FACTOR 0xC000
+
+/**
+ * Tweaks speed of propagation.
+ */
+#define AL_DOPPLER_VELOCITY 0xC001
+
+/**
+ * Speed of Sound in units per second
+ */
+#define AL_SPEED_OF_SOUND 0xC003
+
+/**
+ * Distance models
+ *
+ * used in conjunction with DistanceModel
+ *
+ * implicit: NONE, which disances distance attenuation.
+ */
+#define AL_DISTANCE_MODEL 0xD000
+#define AL_INVERSE_DISTANCE 0xD001
+#define AL_INVERSE_DISTANCE_CLAMPED 0xD002
+#define AL_LINEAR_DISTANCE 0xD003
+#define AL_LINEAR_DISTANCE_CLAMPED 0xD004
+#define AL_EXPONENT_DISTANCE 0xD005
+#define AL_EXPONENT_DISTANCE_CLAMPED 0xD006
+
+#endif
diff --git a/code/AL/alut.h b/code/AL/alut.h
new file mode 100644
index 0000000..e29ae58
--- /dev/null
+++ b/code/AL/alut.h
@@ -0,0 +1,90 @@
+#ifndef _ALUT_H_
+#define _ALUT_H_
+
+/* define platform type */
+#if !defined(MACINTOSH_AL) && !defined(LINUX_AL) && !defined(WINDOWS_AL)
+ #ifdef __APPLE__
+ #define MACINTOSH_AL
+ #else
+ #ifdef _WIN32
+ #define WINDOWS_AL
+ #else
+ #define LINUX_AL
+ #endif
+ #endif
+#endif
+
+#include "altypes.h"
+
+#ifdef _WIN32
+#define ALUTAPI
+#define ALUTAPIENTRY __cdecl
+#define AL_CALLBACK
+#else /* _WIN32 */
+
+#ifdef TARGET_OS_MAC
+#if TARGET_OS_MAC
+#pragma export on
+#endif /* TARGET_OS_MAC */
+#endif /* TARGET_OS_MAC */
+
+#ifndef ALUTAPI
+#define ALUTAPI
+#endif
+
+#ifndef ALUTAPIENTRY
+#define ALUTAPIENTRY
+#endif
+
+#ifndef AL_CALLBACK
+#define AL_CALLBACK
+#endif
+
+#endif /* _WIN32 */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef ALUT_NO_PROTOTYPES
+
+ALUTAPI void ALUTAPIENTRY alutInit(int *argc, char *argv[]);
+ALUTAPI void ALUTAPIENTRY alutExit(ALvoid);
+
+#ifndef MACINTOSH_AL
+/* Windows and Linux versions have a loop parameter, Macintosh doesn't */
+ALUTAPI void ALUTAPIENTRY alutLoadWAVFile(ALbyte *file, ALenum *format, ALvoid **data, ALsizei *size, ALsizei *freq, ALboolean *loop);
+ALUTAPI void ALUTAPIENTRY alutLoadWAVMemory(ALbyte *memory, ALenum *format, ALvoid **data, ALsizei *size, ALsizei *freq, ALboolean *loop);
+#else
+ALUTAPI void ALUTAPIENTRY alutLoadWAVFile(ALbyte *file, ALenum *format, ALvoid **data, ALsizei *size, ALsizei *freq);
+ALUTAPI void ALUTAPIENTRY alutLoadWAVMemory(ALbyte *memory, ALenum *format, ALvoid **data, ALsizei *size, ALsizei *freq);
+#endif
+
+ALUTAPI void ALUTAPIENTRY alutUnloadWAV(ALenum format, ALvoid *data, ALsizei size, ALsizei freq);
+
+#else /* ALUT_NO_PROTOTYPES */
+
+ void (ALUTAPIENTRY *alutInit)( int *argc, char *argv[] );
+ void (ALUTAPIENTRY *alutExit)( ALvoid );
+#ifndef MACINTOSH_AL
+ void (ALUTAPIENTRY *alutLoadWAVFile)( ALbyte *file,ALenum *format,ALvoid **data,ALsizei *size,ALsizei *freq,ALboolean *loop );
+ void (ALUTAPIENTRY *alutLoadWAVMemory)( ALbyte *memory,ALenum *format,ALvoid **data,ALsizei *size,ALsizei *freq,ALboolean *loop );
+#else
+ void (ALUTAPIENTRY *alutLoadWAVFile( ALbyte *file,ALenum *format,ALvoid **data,ALsizei *size,ALsizei *freq );
+ void (ALUTAPIENTRY *alutLoadWAVMemory)( ALbyte *memory,ALenum *format,ALvoid **data,ALsizei *size,ALsizei *freq );
+#endif
+ void (ALUTAPIENTRY *alutUnloadWAV)( ALenum format,ALvoid *data,ALsizei size,ALsizei freq );
+
+#endif /* ALUT_NO_PROTOTYPES */
+
+#ifdef TARGET_OS_MAC
+#if TARGET_OS_MAC
+#pragma export off
+#endif /* TARGET_OS_MAC */
+#endif /* TARGET_OS_MAC */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/code/SDL12/include/SDL.h b/code/SDL12/include/SDL.h
new file mode 100644
index 0000000..119ed7f
--- /dev/null
+++ b/code/SDL12/include/SDL.h
@@ -0,0 +1,101 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/** @file SDL.h
+ * Main include header for the SDL library
+ */
+
+#ifndef _SDL_H
+#define _SDL_H
+
+#include "SDL_main.h"
+#include "SDL_stdinc.h"
+#include "SDL_audio.h"
+#include "SDL_cdrom.h"
+#include "SDL_cpuinfo.h"
+#include "SDL_endian.h"
+#include "SDL_error.h"
+#include "SDL_events.h"
+#include "SDL_loadso.h"
+#include "SDL_mutex.h"
+#include "SDL_rwops.h"
+#include "SDL_thread.h"
+#include "SDL_timer.h"
+#include "SDL_video.h"
+#include "SDL_version.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @file SDL.h
+ * @note As of version 0.5, SDL is loaded dynamically into the application
+ */
+
+/** @name SDL_INIT Flags
+ * These are the flags which may be passed to SDL_Init() -- you should
+ * specify the subsystems which you will be using in your application.
+ */
+/*@{*/
+#define SDL_INIT_TIMER 0x00000001
+#define SDL_INIT_AUDIO 0x00000010
+#define SDL_INIT_VIDEO 0x00000020
+#define SDL_INIT_CDROM 0x00000100
+#define SDL_INIT_JOYSTICK 0x00000200
+#define SDL_INIT_NOPARACHUTE 0x00100000 /**< Don't catch fatal signals */
+#define SDL_INIT_EVENTTHREAD 0x01000000 /**< Not supported on all OS's */
+#define SDL_INIT_EVERYTHING 0x0000FFFF
+/*@}*/
+
+/** This function loads the SDL dynamically linked library and initializes
+ * the subsystems specified by 'flags' (and those satisfying dependencies)
+ * Unless the SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
+ * signal handlers for some commonly ignored fatal signals (like SIGSEGV)
+ */
+extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
+
+/** This function initializes specific SDL subsystems */
+extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
+
+/** This function cleans up specific SDL subsystems */
+extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
+
+/** This function returns mask of the specified subsystems which have
+ * been initialized.
+ * If 'flags' is 0, it returns a mask of all initialized subsystems.
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
+
+/** This function cleans up all initialized subsystems and unloads the
+ * dynamically linked library. You should call it upon all exit conditions.
+ */
+extern DECLSPEC void SDLCALL SDL_Quit(void);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_H */
diff --git a/code/SDL12/include/SDL_active.h b/code/SDL12/include/SDL_active.h
new file mode 100644
index 0000000..0ae92f2
--- /dev/null
+++ b/code/SDL12/include/SDL_active.h
@@ -0,0 +1,63 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/**
+ * @file SDL_active.h
+ * Include file for SDL application focus event handling
+ */
+
+#ifndef _SDL_active_h
+#define _SDL_active_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @name The available application states */
+/*@{*/
+#define SDL_APPMOUSEFOCUS 0x01 /**< The app has mouse coverage */
+#define SDL_APPINPUTFOCUS 0x02 /**< The app has input focus */
+#define SDL_APPACTIVE 0x04 /**< The application is active */
+/*@}*/
+
+/* Function prototypes */
+/**
+ * This function returns the current state of the application, which is a
+ * bitwise combination of SDL_APPMOUSEFOCUS, SDL_APPINPUTFOCUS, and
+ * SDL_APPACTIVE. If SDL_APPACTIVE is set, then the user is able to
+ * see your application, otherwise it has been iconified or disabled.
+ */
+extern DECLSPEC Uint8 SDLCALL SDL_GetAppState(void);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_active_h */
diff --git a/code/SDL12/include/SDL_audio.h b/code/SDL12/include/SDL_audio.h
new file mode 100644
index 0000000..3a8e7fa
--- /dev/null
+++ b/code/SDL12/include/SDL_audio.h
@@ -0,0 +1,284 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/**
+ * @file SDL_audio.h
+ * Access to the raw audio mixing buffer for the SDL library
+ */
+
+#ifndef _SDL_audio_h
+#define _SDL_audio_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+#include "SDL_endian.h"
+#include "SDL_mutex.h"
+#include "SDL_thread.h"
+#include "SDL_rwops.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * When filling in the desired audio spec structure,
+ * - 'desired->freq' should be the desired audio frequency in samples-per-second.
+ * - 'desired->format' should be the desired audio format.
+ * - 'desired->samples' is the desired size of the audio buffer, in samples.
+ * This number should be a power of two, and may be adjusted by the audio
+ * driver to a value more suitable for the hardware. Good values seem to
+ * range between 512 and 8096 inclusive, depending on the application and
+ * CPU speed. Smaller values yield faster response time, but can lead
+ * to underflow if the application is doing heavy processing and cannot
+ * fill the audio buffer in time. A stereo sample consists of both right
+ * and left channels in LR ordering.
+ * Note that the number of samples is directly related to time by the
+ * following formula: ms = (samples*1000)/freq
+ * - 'desired->size' is the size in bytes of the audio buffer, and is
+ * calculated by SDL_OpenAudio().
+ * - 'desired->silence' is the value used to set the buffer to silence,
+ * and is calculated by SDL_OpenAudio().
+ * - 'desired->callback' should be set to a function that will be called
+ * when the audio device is ready for more data. It is passed a pointer
+ * to the audio buffer, and the length in bytes of the audio buffer.
+ * This function usually runs in a separate thread, and so you should
+ * protect data structures that it accesses by calling SDL_LockAudio()
+ * and SDL_UnlockAudio() in your code.
+ * - 'desired->userdata' is passed as the first parameter to your callback
+ * function.
+ *
+ * @note The calculated values in this structure are calculated by SDL_OpenAudio()
+ *
+ */
+typedef struct SDL_AudioSpec {
+ int freq; /**< DSP frequency -- samples per second */
+ Uint16 format; /**< Audio data format */
+ Uint8 channels; /**< Number of channels: 1 mono, 2 stereo */
+ Uint8 silence; /**< Audio buffer silence value (calculated) */
+ Uint16 samples; /**< Audio buffer size in samples (power of 2) */
+ Uint16 padding; /**< Necessary for some compile environments */
+ Uint32 size; /**< Audio buffer size in bytes (calculated) */
+ /**
+ * This function is called when the audio device needs more data.
+ *
+ * @param[out] stream A pointer to the audio data buffer
+ * @param[in] len The length of the audio buffer in bytes.
+ *
+ * Once the callback returns, the buffer will no longer be valid.
+ * Stereo samples are stored in a LRLRLR ordering.
+ */
+ void (SDLCALL *callback)(void *userdata, Uint8 *stream, int len);
+ void *userdata;
+} SDL_AudioSpec;
+
+/**
+ * @name Audio format flags
+ * defaults to LSB byte order
+ */
+/*@{*/
+#define AUDIO_U8 0x0008 /**< Unsigned 8-bit samples */
+#define AUDIO_S8 0x8008 /**< Signed 8-bit samples */
+#define AUDIO_U16LSB 0x0010 /**< Unsigned 16-bit samples */
+#define AUDIO_S16LSB 0x8010 /**< Signed 16-bit samples */
+#define AUDIO_U16MSB 0x1010 /**< As above, but big-endian byte order */
+#define AUDIO_S16MSB 0x9010 /**< As above, but big-endian byte order */
+#define AUDIO_U16 AUDIO_U16LSB
+#define AUDIO_S16 AUDIO_S16LSB
+
+/**
+ * @name Native audio byte ordering
+ */
+/*@{*/
+#if SDL_BYTEORDER == SDL_LIL_ENDIAN
+#define AUDIO_U16SYS AUDIO_U16LSB
+#define AUDIO_S16SYS AUDIO_S16LSB
+#else
+#define AUDIO_U16SYS AUDIO_U16MSB
+#define AUDIO_S16SYS AUDIO_S16MSB
+#endif
+/*@}*/
+
+/*@}*/
+
+
+/** A structure to hold a set of audio conversion filters and buffers */
+typedef struct SDL_AudioCVT {
+ int needed; /**< Set to 1 if conversion possible */
+ Uint16 src_format; /**< Source audio format */
+ Uint16 dst_format; /**< Target audio format */
+ double rate_incr; /**< Rate conversion increment */
+ Uint8 *buf; /**< Buffer to hold entire audio data */
+ int len; /**< Length of original audio buffer */
+ int len_cvt; /**< Length of converted audio buffer */
+ int len_mult; /**< buffer must be len*len_mult big */
+ double len_ratio; /**< Given len, final size is len*len_ratio */
+ void (SDLCALL *filters[10])(struct SDL_AudioCVT *cvt, Uint16 format);
+ int filter_index; /**< Current audio conversion function */
+} SDL_AudioCVT;
+
+
+/* Function prototypes */
+
+/**
+ * @name Audio Init and Quit
+ * These functions are used internally, and should not be used unless you
+ * have a specific need to specify the audio driver you want to use.
+ * You should normally use SDL_Init() or SDL_InitSubSystem().
+ */
+/*@{*/
+extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name);
+extern DECLSPEC void SDLCALL SDL_AudioQuit(void);
+/*@}*/
+
+/**
+ * This function fills the given character buffer with the name of the
+ * current audio driver, and returns a pointer to it if the audio driver has
+ * been initialized. It returns NULL if no driver has been initialized.
+ */
+extern DECLSPEC char * SDLCALL SDL_AudioDriverName(char *namebuf, int maxlen);
+
+/**
+ * This function opens the audio device with the desired parameters, and
+ * returns 0 if successful, placing the actual hardware parameters in the
+ * structure pointed to by 'obtained'. If 'obtained' is NULL, the audio
+ * data passed to the callback function will be guaranteed to be in the
+ * requested format, and will be automatically converted to the hardware
+ * audio format if necessary. This function returns -1 if it failed
+ * to open the audio device, or couldn't set up the audio thread.
+ *
+ * The audio device starts out playing silence when it's opened, and should
+ * be enabled for playing by calling SDL_PauseAudio(0) when you are ready
+ * for your audio callback function to be called. Since the audio driver
+ * may modify the requested size of the audio buffer, you should allocate
+ * any local mixing buffers after you open the audio device.
+ *
+ * @sa SDL_AudioSpec
+ */
+extern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained);
+
+typedef enum {
+ SDL_AUDIO_STOPPED = 0,
+ SDL_AUDIO_PLAYING,
+ SDL_AUDIO_PAUSED
+} SDL_audiostatus;
+
+/** Get the current audio state */
+extern DECLSPEC SDL_audiostatus SDLCALL SDL_GetAudioStatus(void);
+
+/**
+ * This function pauses and unpauses the audio callback processing.
+ * It should be called with a parameter of 0 after opening the audio
+ * device to start playing sound. This is so you can safely initialize
+ * data for your callback function after opening the audio device.
+ * Silence will be written to the audio device during the pause.
+ */
+extern DECLSPEC void SDLCALL SDL_PauseAudio(int pause_on);
+
+/**
+ * This function loads a WAVE from the data source, automatically freeing
+ * that source if 'freesrc' is non-zero. For example, to load a WAVE file,
+ * you could do:
+ * @code SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...); @endcode
+ *
+ * If this function succeeds, it returns the given SDL_AudioSpec,
+ * filled with the audio data format of the wave data, and sets
+ * 'audio_buf' to a malloc()'d buffer containing the audio data,
+ * and sets 'audio_len' to the length of that audio buffer, in bytes.
+ * You need to free the audio buffer with SDL_FreeWAV() when you are
+ * done with it.
+ *
+ * This function returns NULL and sets the SDL error message if the
+ * wave file cannot be opened, uses an unknown data format, or is
+ * corrupt. Currently raw and MS-ADPCM WAVE files are supported.
+ */
+extern DECLSPEC SDL_AudioSpec * SDLCALL SDL_LoadWAV_RW(SDL_RWops *src, int freesrc, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len);
+
+/** Compatibility convenience function -- loads a WAV from a file */
+#define SDL_LoadWAV(file, spec, audio_buf, audio_len) \
+ SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len)
+
+/**
+ * This function frees data previously allocated with SDL_LoadWAV_RW()
+ */
+extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 *audio_buf);
+
+/**
+ * This function takes a source format and rate and a destination format
+ * and rate, and initializes the 'cvt' structure with information needed
+ * by SDL_ConvertAudio() to convert a buffer of audio data from one format
+ * to the other.
+ *
+ * @return This function returns 0, or -1 if there was an error.
+ */
+extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT *cvt,
+ Uint16 src_format, Uint8 src_channels, int src_rate,
+ Uint16 dst_format, Uint8 dst_channels, int dst_rate);
+
+/**
+ * Once you have initialized the 'cvt' structure using SDL_BuildAudioCVT(),
+ * created an audio buffer cvt->buf, and filled it with cvt->len bytes of
+ * audio data in the source format, this function will convert it in-place
+ * to the desired format.
+ * The data conversion may expand the size of the audio data, so the buffer
+ * cvt->buf should be allocated after the cvt structure is initialized by
+ * SDL_BuildAudioCVT(), and should be cvt->len*cvt->len_mult bytes long.
+ */
+extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT *cvt);
+
+
+#define SDL_MIX_MAXVOLUME 128
+/**
+ * This takes two audio buffers of the playing audio format and mixes
+ * them, performing addition, volume adjustment, and overflow clipping.
+ * The volume ranges from 0 - 128, and should be set to SDL_MIX_MAXVOLUME
+ * for full audio volume. Note this does not change hardware volume.
+ * This is provided for convenience -- you can mix your own audio data.
+ */
+extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 *dst, const Uint8 *src, Uint32 len, int volume);
+
+/**
+ * @name Audio Locks
+ * The lock manipulated by these functions protects the callback function.
+ * During a LockAudio/UnlockAudio pair, you can be guaranteed that the
+ * callback function is not running. Do not call these from the callback
+ * function or you will cause deadlock.
+ */
+/*@{*/
+extern DECLSPEC void SDLCALL SDL_LockAudio(void);
+extern DECLSPEC void SDLCALL SDL_UnlockAudio(void);
+/*@}*/
+
+/**
+ * This function shuts down audio processing and closes the audio device.
+ */
+extern DECLSPEC void SDLCALL SDL_CloseAudio(void);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_audio_h */
diff --git a/code/SDL12/include/SDL_byteorder.h b/code/SDL12/include/SDL_byteorder.h
new file mode 100644
index 0000000..9b93cd6
--- /dev/null
+++ b/code/SDL12/include/SDL_byteorder.h
@@ -0,0 +1,29 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/**
+ * @file SDL_byteorder.h
+ * @deprecated Use SDL_endian.h instead
+ */
+
+/* DEPRECATED */
+#include "SDL_endian.h"
diff --git a/code/SDL12/include/SDL_cdrom.h b/code/SDL12/include/SDL_cdrom.h
new file mode 100644
index 0000000..fff5cfa
--- /dev/null
+++ b/code/SDL12/include/SDL_cdrom.h
@@ -0,0 +1,202 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/**
+ * @file SDL_cdrom.h
+ * This is the CD-audio control API for Simple DirectMedia Layer
+ */
+
+#ifndef _SDL_cdrom_h
+#define _SDL_cdrom_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @file SDL_cdrom.h
+ * In order to use these functions, SDL_Init() must have been called
+ * with the SDL_INIT_CDROM flag. This causes SDL to scan the system
+ * for CD-ROM drives, and load appropriate drivers.
+ */
+
+/** The maximum number of CD-ROM tracks on a disk */
+#define SDL_MAX_TRACKS 99
+
+/** @name Track Types
+ * The types of CD-ROM track possible
+ */
+/*@{*/
+#define SDL_AUDIO_TRACK 0x00
+#define SDL_DATA_TRACK 0x04
+/*@}*/
+
+/** The possible states which a CD-ROM drive can be in. */
+typedef enum {
+ CD_TRAYEMPTY,
+ CD_STOPPED,
+ CD_PLAYING,
+ CD_PAUSED,
+ CD_ERROR = -1
+} CDstatus;
+
+/** Given a status, returns true if there's a disk in the drive */
+#define CD_INDRIVE(status) ((int)(status) > 0)
+
+typedef struct SDL_CDtrack {
+ Uint8 id; /**< Track number */
+ Uint8 type; /**< Data or audio track */
+ Uint16 unused;
+ Uint32 length; /**< Length, in frames, of this track */
+ Uint32 offset; /**< Offset, in frames, from start of disk */
+} SDL_CDtrack;
+
+/** This structure is only current as of the last call to SDL_CDStatus() */
+typedef struct SDL_CD {
+ int id; /**< Private drive identifier */
+ CDstatus status; /**< Current drive status */
+
+ /** The rest of this structure is only valid if there's a CD in drive */
+ /*@{*/
+ int numtracks; /**< Number of tracks on disk */
+ int cur_track; /**< Current track position */
+ int cur_frame; /**< Current frame offset within current track */
+ SDL_CDtrack track[SDL_MAX_TRACKS+1];
+ /*@}*/
+} SDL_CD;
+
+/** @name Frames / MSF Conversion Functions
+ * Conversion functions from frames to Minute/Second/Frames and vice versa
+ */
+/*@{*/
+#define CD_FPS 75
+#define FRAMES_TO_MSF(f, M,S,F) { \
+ int value = f; \
+ *(F) = value%CD_FPS; \
+ value /= CD_FPS; \
+ *(S) = value%60; \
+ value /= 60; \
+ *(M) = value; \
+}
+#define MSF_TO_FRAMES(M, S, F) ((M)*60*CD_FPS+(S)*CD_FPS+(F))
+/*@}*/
+
+/* CD-audio API functions: */
+
+/**
+ * Returns the number of CD-ROM drives on the system, or -1 if
+ * SDL_Init() has not been called with the SDL_INIT_CDROM flag.
+ */
+extern DECLSPEC int SDLCALL SDL_CDNumDrives(void);
+
+/**
+ * Returns a human-readable, system-dependent identifier for the CD-ROM.
+ * Example:
+ * - "/dev/cdrom"
+ * - "E:"
+ * - "/dev/disk/ide/1/master"
+ */
+extern DECLSPEC const char * SDLCALL SDL_CDName(int drive);
+
+/**
+ * Opens a CD-ROM drive for access. It returns a drive handle on success,
+ * or NULL if the drive was invalid or busy. This newly opened CD-ROM
+ * becomes the default CD used when other CD functions are passed a NULL
+ * CD-ROM handle.
+ * Drives are numbered starting with 0. Drive 0 is the system default CD-ROM.
+ */
+extern DECLSPEC SDL_CD * SDLCALL SDL_CDOpen(int drive);
+
+/**
+ * This function returns the current status of the given drive.
+ * If the drive has a CD in it, the table of contents of the CD and current
+ * play position of the CD will be stored in the SDL_CD structure.
+ */
+extern DECLSPEC CDstatus SDLCALL SDL_CDStatus(SDL_CD *cdrom);
+
+/**
+ * Play the given CD starting at 'start_track' and 'start_frame' for 'ntracks'
+ * tracks and 'nframes' frames. If both 'ntrack' and 'nframe' are 0, play
+ * until the end of the CD. This function will skip data tracks.
+ * This function should only be called after calling SDL_CDStatus() to
+ * get track information about the CD.
+ * For example:
+ * @code
+ * // Play entire CD:
+ * if ( CD_INDRIVE(SDL_CDStatus(cdrom)) )
+ * SDL_CDPlayTracks(cdrom, 0, 0, 0, 0);
+ * // Play last track:
+ * if ( CD_INDRIVE(SDL_CDStatus(cdrom)) ) {
+ * SDL_CDPlayTracks(cdrom, cdrom->numtracks-1, 0, 0, 0);
+ * }
+ * // Play first and second track and 10 seconds of third track:
+ * if ( CD_INDRIVE(SDL_CDStatus(cdrom)) )
+ * SDL_CDPlayTracks(cdrom, 0, 0, 2, 10);
+ * @endcode
+ *
+ * @return This function returns 0, or -1 if there was an error.
+ */
+extern DECLSPEC int SDLCALL SDL_CDPlayTracks(SDL_CD *cdrom,
+ int start_track, int start_frame, int ntracks, int nframes);
+
+/**
+ * Play the given CD starting at 'start' frame for 'length' frames.
+ * @return It returns 0, or -1 if there was an error.
+ */
+extern DECLSPEC int SDLCALL SDL_CDPlay(SDL_CD *cdrom, int start, int length);
+
+/** Pause play
+ * @return returns 0, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_CDPause(SDL_CD *cdrom);
+
+/** Resume play
+ * @return returns 0, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_CDResume(SDL_CD *cdrom);
+
+/** Stop play
+ * @return returns 0, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_CDStop(SDL_CD *cdrom);
+
+/** Eject CD-ROM
+ * @return returns 0, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_CDEject(SDL_CD *cdrom);
+
+/** Closes the handle for the CD-ROM drive */
+extern DECLSPEC void SDLCALL SDL_CDClose(SDL_CD *cdrom);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_video_h */
diff --git a/code/SDL12/include/SDL_config.h b/code/SDL12/include/SDL_config.h
new file mode 100644
index 0000000..a508101
--- /dev/null
+++ b/code/SDL12/include/SDL_config.h
@@ -0,0 +1,45 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_config_h
+#define _SDL_config_h
+
+#include "SDL_platform.h"
+
+/* Add any platform that doesn't build using the configure system */
+#if defined(__DREAMCAST__)
+#include "SDL_config_dreamcast.h"
+#elif defined(__MACOS__)
+#include "SDL_config_macos.h"
+#elif defined(__MACOSX__)
+#include "SDL_config_macosx.h"
+#elif defined(__SYMBIAN32__)
+#include "SDL_config_symbian.h" /* must be before win32! */
+#elif defined(__WIN32__)
+#include "SDL_config_win32.h"
+#elif defined(__OS2__)
+#include "SDL_config_os2.h"
+#else
+#include "SDL_config_minimal.h"
+#endif /* platform config */
+
+#endif /* _SDL_config_h */
diff --git a/code/SDL12/include/SDL_config_amiga.h b/code/SDL12/include/SDL_config_amiga.h
new file mode 100644
index 0000000..23e0861
--- /dev/null
+++ b/code/SDL12/include/SDL_config_amiga.h
@@ -0,0 +1,80 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2006 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_config_amiga_h
+#define _SDL_config_amiga_h
+
+#include "SDL_platform.h"
+
+/* This is a set of defines to configure the SDL features */
+
+#define SDL_HAS_64BIT_TYPE 1
+
+/* Useful headers */
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_STDIO_H 1
+#define STDC_HEADERS 1
+#define HAVE_STRING_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_SIGNAL_H 1
+
+/* C library functions */
+#define HAVE_MALLOC 1
+#define HAVE_CALLOC 1
+#define HAVE_REALLOC 1
+#define HAVE_FREE 1
+#define HAVE_ALLOCA 1
+#define HAVE_GETENV 1
+#define HAVE_PUTENV 1
+#define HAVE_MEMSET 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMCMP 1
+
+/* Enable various audio drivers */
+#define SDL_AUDIO_DRIVER_AHI 1
+#define SDL_AUDIO_DRIVER_DISK 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
+
+/* Enable various cdrom drivers */
+#define SDL_CDROM_DUMMY 1
+
+/* Enable various input drivers */
+#define SDL_JOYSTICK_AMIGA 1
+
+/* Enable various shared object loading systems */
+#define SDL_LOADSO_DUMMY 1
+
+/* Enable various threading systems */
+#define SDL_THREAD_AMIGA 1
+
+/* Enable various timer systems */
+#define SDL_TIMER_AMIGA 1
+
+/* Enable various video drivers */
+#define SDL_VIDEO_DRIVER_CYBERGRAPHICS 1
+#define SDL_VIDEO_DRIVER_DUMMY 1
+
+/* Enable OpenGL support */
+#define SDL_VIDEO_OPENGL 1
+
+#endif /* _SDL_config_amiga_h */
diff --git a/code/SDL12/include/SDL_config_dreamcast.h b/code/SDL12/include/SDL_config_dreamcast.h
new file mode 100644
index 0000000..07c2f08
--- /dev/null
+++ b/code/SDL12/include/SDL_config_dreamcast.h
@@ -0,0 +1,106 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_config_dreamcast_h
+#define _SDL_config_dreamcast_h
+
+#include "SDL_platform.h"
+
+/* This is a set of defines to configure the SDL features */
+
+typedef signed char int8_t;
+typedef unsigned char uint8_t;
+typedef signed short int16_t;
+typedef unsigned short uint16_t;
+typedef signed int int32_t;
+typedef unsigned int uint32_t;
+typedef signed long long int64_t;
+typedef unsigned long long uint64_t;
+typedef unsigned long uintptr_t;
+#define SDL_HAS_64BIT_TYPE 1
+
+/* Useful headers */
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_STDIO_H 1
+#define STDC_HEADERS 1
+#define HAVE_STRING_H 1
+#define HAVE_CTYPE_H 1
+
+/* C library functions */
+#define HAVE_MALLOC 1
+#define HAVE_CALLOC 1
+#define HAVE_REALLOC 1
+#define HAVE_FREE 1
+#define HAVE_ALLOCA 1
+#define HAVE_GETENV 1
+#define HAVE_PUTENV 1
+#define HAVE_QSORT 1
+#define HAVE_ABS 1
+#define HAVE_BCOPY 1
+#define HAVE_MEMSET 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMCMP 1
+#define HAVE_STRLEN 1
+#define HAVE_STRDUP 1
+#define HAVE_INDEX 1
+#define HAVE_RINDEX 1
+#define HAVE_STRCHR 1
+#define HAVE_STRRCHR 1
+#define HAVE_STRSTR 1
+#define HAVE_STRTOL 1
+#define HAVE_STRTOD 1
+#define HAVE_ATOI 1
+#define HAVE_ATOF 1
+#define HAVE_STRCMP 1
+#define HAVE_STRNCMP 1
+#define HAVE_STRICMP 1
+#define HAVE_STRCASECMP 1
+#define HAVE_SSCANF 1
+#define HAVE_SNPRINTF 1
+#define HAVE_VSNPRINTF 1
+
+/* Enable various audio drivers */
+#define SDL_AUDIO_DRIVER_DC 1
+#define SDL_AUDIO_DRIVER_DISK 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
+
+/* Enable various cdrom drivers */
+#define SDL_CDROM_DC 1
+
+/* Enable various input drivers */
+#define SDL_JOYSTICK_DC 1
+
+/* Enable various shared object loading systems */
+#define SDL_LOADSO_DUMMY 1
+
+/* Enable various threading systems */
+#define SDL_THREAD_DC 1
+
+/* Enable various timer systems */
+#define SDL_TIMER_DC 1
+
+/* Enable various video drivers */
+#define SDL_VIDEO_DRIVER_DC 1
+#define SDL_VIDEO_DRIVER_DUMMY 1
+
+#endif /* _SDL_config_dreamcast_h */
diff --git a/code/SDL12/include/SDL_config_macos.h b/code/SDL12/include/SDL_config_macos.h
new file mode 100644
index 0000000..4ba5c22
--- /dev/null
+++ b/code/SDL12/include/SDL_config_macos.h
@@ -0,0 +1,112 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_config_macos_h
+#define _SDL_config_macos_h
+
+#include "SDL_platform.h"
+
+/* This is a set of defines to configure the SDL features */
+
+#include <MacTypes.h>
+
+typedef SInt8 int8_t;
+typedef UInt8 uint8_t;
+typedef SInt16 int16_t;
+typedef UInt16 uint16_t;
+typedef SInt32 int32_t;
+typedef UInt32 uint32_t;
+typedef SInt64 int64_t;
+typedef UInt64 uint64_t;
+typedef unsigned long uintptr_t;
+
+#define SDL_HAS_64BIT_TYPE 1
+
+/* Useful headers */
+#define HAVE_STDIO_H 1
+#define STDC_HEADERS 1
+#define HAVE_STRING_H 1
+#define HAVE_CTYPE_H 1
+#define HAVE_MATH_H 1
+#define HAVE_SIGNAL_H 1
+
+/* C library functions */
+#define HAVE_MALLOC 1
+#define HAVE_CALLOC 1
+#define HAVE_REALLOC 1
+#define HAVE_FREE 1
+#define HAVE_ALLOCA 1
+#define HAVE_ABS 1
+#define HAVE_MEMSET 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMCMP 1
+#define HAVE_STRLEN 1
+#define HAVE_STRCHR 1
+#define HAVE_STRRCHR 1
+#define HAVE_STRSTR 1
+#define HAVE_ITOA 1
+#define HAVE_STRTOL 1
+#define HAVE_STRTOD 1
+#define HAVE_ATOI 1
+#define HAVE_ATOF 1
+#define HAVE_STRCMP 1
+#define HAVE_STRNCMP 1
+#define HAVE_SSCANF 1
+
+/* Enable various audio drivers */
+#define SDL_AUDIO_DRIVER_SNDMGR 1
+#define SDL_AUDIO_DRIVER_DISK 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
+
+/* Enable various cdrom drivers */
+#if TARGET_API_MAC_CARBON
+#define SDL_CDROM_DUMMY 1
+#else
+#define SDL_CDROM_MACOS 1
+#endif
+
+/* Enable various input drivers */
+#if TARGET_API_MAC_CARBON
+#define SDL_JOYSTICK_DUMMY 1
+#else
+#define SDL_JOYSTICK_MACOS 1
+#endif
+
+/* Enable various shared object loading systems */
+#define SDL_LOADSO_MACOS 1
+
+/* Enable various threading systems */
+#define SDL_THREADS_DISABLED 1
+
+/* Enable various timer systems */
+#define SDL_TIMER_MACOS 1
+
+/* Enable various video drivers */
+#define SDL_VIDEO_DRIVER_DUMMY 1
+#define SDL_VIDEO_DRIVER_DRAWSPROCKET 1
+#define SDL_VIDEO_DRIVER_TOOLBOX 1
+
+/* Enable OpenGL support */
+#define SDL_VIDEO_OPENGL 1
+
+#endif /* _SDL_config_macos_h */
diff --git a/code/SDL12/include/SDL_config_macosx.h b/code/SDL12/include/SDL_config_macosx.h
new file mode 100644
index 0000000..295b872
--- /dev/null
+++ b/code/SDL12/include/SDL_config_macosx.h
@@ -0,0 +1,150 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_config_macosx_h
+#define _SDL_config_macosx_h
+
+#include "SDL_platform.h"
+
+/* This gets us MAC_OS_X_VERSION_MIN_REQUIRED... */
+#include <AvailabilityMacros.h>
+
+/* This is a set of defines to configure the SDL features */
+
+#define SDL_HAS_64BIT_TYPE 1
+
+/* Useful headers */
+/* If we specified an SDK or have a post-PowerPC chip, then alloca.h exists. */
+#if ( (MAC_OS_X_VERSION_MIN_REQUIRED >= 1030) || (!defined(__POWERPC__)) )
+#define HAVE_ALLOCA_H 1
+#endif
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_STDIO_H 1
+#define STDC_HEADERS 1
+#define HAVE_STRING_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_CTYPE_H 1
+#define HAVE_MATH_H 1
+#define HAVE_SIGNAL_H 1
+
+/* C library functions */
+#define HAVE_MALLOC 1
+#define HAVE_CALLOC 1
+#define HAVE_REALLOC 1
+#define HAVE_FREE 1
+#define HAVE_ALLOCA 1
+#define HAVE_GETENV 1
+#define HAVE_PUTENV 1
+#define HAVE_UNSETENV 1
+#define HAVE_QSORT 1
+#define HAVE_ABS 1
+#define HAVE_BCOPY 1
+#define HAVE_MEMSET 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMCMP 1
+#define HAVE_STRLEN 1
+#define HAVE_STRLCPY 1
+#define HAVE_STRLCAT 1
+#define HAVE_STRDUP 1
+#define HAVE_STRCHR 1
+#define HAVE_STRRCHR 1
+#define HAVE_STRSTR 1
+#define HAVE_STRTOL 1
+#define HAVE_STRTOUL 1
+#define HAVE_STRTOLL 1
+#define HAVE_STRTOULL 1
+#define HAVE_STRTOD 1
+#define HAVE_ATOI 1
+#define HAVE_ATOF 1
+#define HAVE_STRCMP 1
+#define HAVE_STRNCMP 1
+#define HAVE_STRCASECMP 1
+#define HAVE_STRNCASECMP 1
+#define HAVE_SSCANF 1
+#define HAVE_SNPRINTF 1
+#define HAVE_VSNPRINTF 1
+#define HAVE_SIGACTION 1
+#define HAVE_SETJMP 1
+#define HAVE_NANOSLEEP 1
+
+/* Enable various audio drivers */
+#define SDL_AUDIO_DRIVER_COREAUDIO 1
+#define SDL_AUDIO_DRIVER_DISK 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
+
+/* Enable various cdrom drivers */
+#define SDL_CDROM_MACOSX 1
+
+/* Enable various input drivers */
+#define SDL_JOYSTICK_IOKIT 1
+
+/* Enable various shared object loading systems */
+#ifdef __ppc__
+/* For Mac OS X 10.2 compatibility */
+#define SDL_LOADSO_DLCOMPAT 1
+#else
+#define SDL_LOADSO_DLOPEN 1
+#endif
+
+/* Enable various threading systems */
+#define SDL_THREAD_PTHREAD 1
+#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
+
+/* Enable various timer systems */
+#define SDL_TIMER_UNIX 1
+
+/* Enable various video drivers */
+#define SDL_VIDEO_DRIVER_DUMMY 1
+#if ((defined TARGET_API_MAC_CARBON) && (TARGET_API_MAC_CARBON))
+#define SDL_VIDEO_DRIVER_TOOLBOX 1
+#else
+#define SDL_VIDEO_DRIVER_QUARTZ 1
+#endif
+#define SDL_VIDEO_DRIVER_DGA 1
+#define SDL_VIDEO_DRIVER_X11 1
+#define SDL_VIDEO_DRIVER_X11_DGAMOUSE 1
+#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib"
+#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib"
+#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
+#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER "/usr/X11R6/lib/libXrender.1.dylib"
+#define SDL_VIDEO_DRIVER_X11_VIDMODE 1
+#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
+#define SDL_VIDEO_DRIVER_X11_XME 1
+#define SDL_VIDEO_DRIVER_X11_XRANDR 1
+#define SDL_VIDEO_DRIVER_X11_XV 1
+
+/* Enable OpenGL support */
+#define SDL_VIDEO_OPENGL 1
+#define SDL_VIDEO_OPENGL_GLX 1
+
+/* Disable screensaver */
+#define SDL_VIDEO_DISABLE_SCREENSAVER 1
+
+/* Enable assembly routines */
+#define SDL_ASSEMBLY_ROUTINES 1
+#ifdef __ppc__
+#define SDL_ALTIVEC_BLITTERS 1
+#endif
+
+#endif /* _SDL_config_macosx_h */
diff --git a/code/SDL12/include/SDL_config_minimal.h b/code/SDL12/include/SDL_config_minimal.h
new file mode 100644
index 0000000..002c56e
--- /dev/null
+++ b/code/SDL12/include/SDL_config_minimal.h
@@ -0,0 +1,62 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_config_minimal_h
+#define _SDL_config_minimal_h
+
+#include "SDL_platform.h"
+
+/* This is the minimal configuration that can be used to build SDL */
+
+#include <stdarg.h>
+
+typedef signed char int8_t;
+typedef unsigned char uint8_t;
+typedef signed short int16_t;
+typedef unsigned short uint16_t;
+typedef signed int int32_t;
+typedef unsigned int uint32_t;
+typedef unsigned int size_t;
+typedef unsigned long uintptr_t;
+
+/* Enable the dummy audio driver (src/audio/dummy/\*.c) */
+#define SDL_AUDIO_DRIVER_DUMMY 1
+
+/* Enable the stub cdrom driver (src/cdrom/dummy/\*.c) */
+#define SDL_CDROM_DISABLED 1
+
+/* Enable the stub joystick driver (src/joystick/dummy/\*.c) */
+#define SDL_JOYSTICK_DISABLED 1
+
+/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
+#define SDL_LOADSO_DISABLED 1
+
+/* Enable the stub thread support (src/thread/generic/\*.c) */
+#define SDL_THREADS_DISABLED 1
+
+/* Enable the stub timer support (src/timer/dummy/\*.c) */
+#define SDL_TIMERS_DISABLED 1
+
+/* Enable the dummy video driver (src/video/dummy/\*.c) */
+#define SDL_VIDEO_DRIVER_DUMMY 1
+
+#endif /* _SDL_config_minimal_h */
diff --git a/code/SDL12/include/SDL_config_nds.h b/code/SDL12/include/SDL_config_nds.h
new file mode 100644
index 0000000..4ac60a5
--- /dev/null
+++ b/code/SDL12/include/SDL_config_nds.h
@@ -0,0 +1,115 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_config_nds_h
+#define _SDL_config_nds_h
+
+#include "SDL_platform.h"
+
+/* This is a set of defines to configure the SDL features */
+
+/* General platform specific identifiers */
+#include "SDL_platform.h"
+
+/* C datatypes */
+#define SDL_HAS_64BIT_TYPE 1
+
+/* Endianness */
+#define SDL_BYTEORDER 1234
+
+/* Useful headers */
+#define HAVE_ALLOCA_H 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_STDIO_H 1
+#define STDC_HEADERS 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STDARG_H 1
+#define HAVE_MALLOC_H 1
+#define HAVE_STRING_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_CTYPE_H 1
+#define HAVE_MATH_H 1
+#define HAVE_ICONV_H 1
+#define HAVE_SIGNAL_H 1
+
+/* C library functions */
+#define HAVE_MALLOC 1
+#define HAVE_CALLOC 1
+#define HAVE_REALLOC 1
+#define HAVE_FREE 1
+#define HAVE_ALLOCA 1
+#define HAVE_GETENV 1
+#define HAVE_PUTENV 1
+#define HAVE_UNSETENV 1
+#define HAVE_QSORT 1
+#define HAVE_ABS 1
+#define HAVE_BCOPY 1
+#define HAVE_MEMSET 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_STRLEN 1
+#define HAVE_STRLCPY 1
+#define HAVE_STRLCAT 1
+#define HAVE_STRDUP 1
+#define HAVE_STRCHR 1
+#define HAVE_STRRCHR 1
+#define HAVE_STRSTR 1
+#define HAVE_STRTOL 1
+#define HAVE_STRTOUL 1
+#define HAVE_STRTOLL 1
+#define HAVE_STRTOULL 1
+#define HAVE_ATOI 1
+#define HAVE_ATOF 1
+#define HAVE_STRCMP 1
+#define HAVE_STRNCMP 1
+#define HAVE_STRCASECMP 1
+#define HAVE_STRNCASECMP 1
+#define HAVE_SSCANF 1
+#define HAVE_SNPRINTF 1
+#define HAVE_VSNPRINTF 1
+#define HAVE_SETJMP 1
+
+/* Enable various audio drivers */
+#define SDL_AUDIO_DRIVER_NDS 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
+
+/* Enable the stub cdrom driver (src/cdrom/dummy/\*.c) */
+#define SDL_CDROM_DISABLED 1
+
+/* Enable various input drivers */
+#define SDL_JOYSTICK_NDS 1
+
+/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
+#define SDL_LOADSO_DISABLED 1
+
+/* Enable the stub thread support (src/thread/generic/\*.c) */
+#define SDL_THREADS_DISABLED 1
+
+/* Enable various timer systems */
+#define SDL_TIMER_NDS 1
+
+/* Enable various video drivers */
+#define SDL_VIDEO_DRIVER_NDS 1
+#define SDL_VIDEO_DRIVER_DUMMY 1
+
+#endif /* _SDL_config_nds_h */
diff --git a/code/SDL12/include/SDL_config_os2.h b/code/SDL12/include/SDL_config_os2.h
new file mode 100644
index 0000000..bb40df0
--- /dev/null
+++ b/code/SDL12/include/SDL_config_os2.h
@@ -0,0 +1,141 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_config_os2_h
+#define _SDL_config_os2_h
+
+#include "SDL_platform.h"
+
+/* This is a set of defines to configure the SDL features */
+
+typedef signed char int8_t;
+typedef unsigned char uint8_t;
+typedef signed short int16_t;
+typedef unsigned short uint16_t;
+typedef signed int int32_t;
+typedef unsigned int uint32_t;
+typedef unsigned int size_t;
+typedef unsigned long uintptr_t;
+typedef signed long long int64_t;
+typedef unsigned long long uint64_t;
+
+#define SDL_HAS_64BIT_TYPE 1
+
+/* Use Watcom's LIBC */
+#define HAVE_LIBC 1
+
+/* Useful headers */
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_STDIO_H 1
+#define STDC_HEADERS 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STDARG_H 1
+#define HAVE_MALLOC_H 1
+#define HAVE_MEMORY_H 1
+#define HAVE_STRING_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_CTYPE_H 1
+#define HAVE_MATH_H 1
+#define HAVE_SIGNAL_H 1
+
+/* C library functions */
+#define HAVE_MALLOC 1
+#define HAVE_CALLOC 1
+#define HAVE_REALLOC 1
+#define HAVE_FREE 1
+#define HAVE_ALLOCA 1
+#define HAVE_GETENV 1
+#define HAVE_PUTENV 1
+#define HAVE_UNSETENV 1
+#define HAVE_QSORT 1
+#define HAVE_ABS 1
+#define HAVE_BCOPY 1
+#define HAVE_MEMSET 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMCMP 1
+#define HAVE_STRLEN 1
+#define HAVE_STRLCPY 1
+#define HAVE_STRLCAT 1
+#define HAVE_STRDUP 1
+#define HAVE__STRREV 1
+#define HAVE__STRUPR 1
+#define HAVE__STRLWR 1
+#define HAVE_INDEX 1
+#define HAVE_RINDEX 1
+#define HAVE_STRCHR 1
+#define HAVE_STRRCHR 1
+#define HAVE_STRSTR 1
+#define HAVE_ITOA 1
+#define HAVE__LTOA 1
+#define HAVE__UITOA 1
+#define HAVE__ULTOA 1
+#define HAVE_STRTOL 1
+#define HAVE__I64TOA 1
+#define HAVE__UI64TOA 1
+#define HAVE_STRTOLL 1
+#define HAVE_STRTOD 1
+#define HAVE_ATOI 1
+#define HAVE_ATOF 1
+#define HAVE_STRCMP 1
+#define HAVE_STRNCMP 1
+#define HAVE_STRICMP 1
+#define HAVE_STRCASECMP 1
+#define HAVE_SSCANF 1
+#define HAVE_SNPRINTF 1
+#define HAVE_VSNPRINTF 1
+#define HAVE_SETJMP 1
+#define HAVE_CLOCK_GETTIME 1
+
+/* Enable various audio drivers */
+#define SDL_AUDIO_DRIVER_DART 1
+#define SDL_AUDIO_DRIVER_DISK 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
+
+/* Enable various cdrom drivers */
+#define SDL_CDROM_OS2 1
+
+/* Enable various input drivers */
+#define SDL_JOYSTICK_OS2 1
+
+/* Enable various shared object loading systems */
+#define SDL_LOADSO_OS2 1
+
+/* Enable various threading systems */
+#define SDL_THREAD_OS2 1
+
+/* Enable various timer systems */
+#define SDL_TIMER_OS2 1
+
+/* Enable various video drivers */
+#define SDL_VIDEO_DRIVER_DUMMY 1
+#define SDL_VIDEO_DRIVER_OS2FS 1
+
+/* Enable OpenGL support */
+/* Nothing here yet for OS/2... :( */
+
+/* Enable assembly routines where available */
+#define SDL_ASSEMBLY_ROUTINES 1
+
+#endif /* _SDL_config_os2_h */
diff --git a/code/SDL12/include/SDL_config_symbian.h b/code/SDL12/include/SDL_config_symbian.h
new file mode 100644
index 0000000..53527b2
--- /dev/null
+++ b/code/SDL12/include/SDL_config_symbian.h
@@ -0,0 +1,146 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/*
+
+Symbian version Markus Mertama
+
+*/
+
+
+#ifndef _SDL_CONFIG_SYMBIAN_H
+#define _SDL_CONFIG_SYMBIAN_H
+
+#include "SDL_platform.h"
+
+/* This is the minimal configuration that can be used to build SDL */
+
+
+#include <stdarg.h>
+#include <stddef.h>
+
+
+#ifdef __GCCE__
+#define SYMBIAN32_GCCE
+#endif
+
+#ifndef _SIZE_T_DEFINED
+typedef unsigned int size_t;
+#endif
+
+#ifndef _INTPTR_T_DECLARED
+typedef unsigned int uintptr_t;
+#endif
+
+#ifndef _INT8_T_DECLARED
+typedef signed char int8_t;
+#endif
+
+#ifndef _UINT8_T_DECLARED
+typedef unsigned char uint8_t;
+#endif
+
+#ifndef _INT16_T_DECLARED
+typedef signed short int16_t;
+#endif
+
+#ifndef _UINT16_T_DECLARED
+typedef unsigned short uint16_t;
+#endif
+
+#ifndef _INT32_T_DECLARED
+typedef signed int int32_t;
+#endif
+
+#ifndef _UINT32_T_DECLARED
+typedef unsigned int uint32_t;
+#endif
+
+#ifndef _INT64_T_DECLARED
+typedef signed long long int64_t;
+#endif
+
+#ifndef _UINT64_T_DECLARED
+typedef unsigned long long uint64_t;
+#endif
+
+#define SDL_AUDIO_DRIVER_EPOCAUDIO 1
+
+
+/* Enable the stub cdrom driver (src/cdrom/dummy/\*.c) */
+#define SDL_CDROM_DISABLED 1
+
+/* Enable the stub joystick driver (src/joystick/dummy/\*.c) */
+#define SDL_JOYSTICK_DISABLED 1
+
+/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
+#define SDL_LOADSO_DISABLED 1
+
+#define SDL_THREAD_SYMBIAN 1
+
+#define SDL_VIDEO_DRIVER_EPOC 1
+
+#define SDL_VIDEO_OPENGL 0
+
+#define SDL_HAS_64BIT_TYPE 1
+
+#define HAVE_LIBC 1
+#define HAVE_STDIO_H 1
+#define STDC_HEADERS 1
+#define HAVE_STRING_H 1
+#define HAVE_CTYPE_H 1
+#define HAVE_MATH_H 1
+
+#define HAVE_MALLOC 1
+#define HAVE_CALLOC 1
+#define HAVE_REALLOC 1
+#define HAVE_FREE 1
+/*#define HAVE_ALLOCA 1*/
+#define HAVE_QSORT 1
+#define HAVE_ABS 1
+#define HAVE_MEMSET 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMCMP 1
+#define HAVE_STRLEN 1
+#define HAVE__STRUPR 1
+#define HAVE_STRCHR 1
+#define HAVE_STRRCHR 1
+#define HAVE_STRSTR 1
+#define HAVE_ITOA 1
+#define HAVE_STRTOL 1
+#define HAVE_STRTOUL 1
+#define HAVE_STRTOLL 1
+#define HAVE_STRTOD 1
+#define HAVE_ATOI 1
+#define HAVE_ATOF 1
+#define HAVE_STRCMP 1
+#define HAVE_STRNCMP 1
+/*#define HAVE__STRICMP 1*/
+#define HAVE__STRNICMP 1
+#define HAVE_SSCANF 1
+#define HAVE_STDARG_H 1
+#define HAVE_STDDEF_H 1
+
+
+
+#endif /* _SDL_CONFIG_SYMBIAN_H */
diff --git a/code/SDL12/include/SDL_config_win32.h b/code/SDL12/include/SDL_config_win32.h
new file mode 100644
index 0000000..6d019a8
--- /dev/null
+++ b/code/SDL12/include/SDL_config_win32.h
@@ -0,0 +1,183 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_config_win32_h
+#define _SDL_config_win32_h
+
+#include "SDL_platform.h"
+
+/* This is a set of defines to configure the SDL features */
+
+#if defined(__GNUC__) || defined(__DMC__)
+#define HAVE_STDINT_H 1
+#elif defined(_MSC_VER)
+typedef signed __int8 int8_t;
+typedef unsigned __int8 uint8_t;
+typedef signed __int16 int16_t;
+typedef unsigned __int16 uint16_t;
+typedef signed __int32 int32_t;
+typedef unsigned __int32 uint32_t;
+typedef signed __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#ifndef _UINTPTR_T_DEFINED
+#ifdef _WIN64
+typedef unsigned __int64 uintptr_t;
+#else
+typedef unsigned int uintptr_t;
+#endif
+#define _UINTPTR_T_DEFINED
+#endif
+/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
+#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
+#define DWORD_PTR DWORD
+#endif
+#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
+#define LONG_PTR LONG
+#endif
+#else /* !__GNUC__ && !_MSC_VER */
+typedef signed char int8_t;
+typedef unsigned char uint8_t;
+typedef signed short int16_t;
+typedef unsigned short uint16_t;
+typedef signed int int32_t;
+typedef unsigned int uint32_t;
+typedef signed long long int64_t;
+typedef unsigned long long uint64_t;
+#ifndef _SIZE_T_DEFINED_
+#define _SIZE_T_DEFINED_
+typedef unsigned int size_t;
+#endif
+typedef unsigned int uintptr_t;
+#endif /* __GNUC__ || _MSC_VER */
+#define SDL_HAS_64BIT_TYPE 1
+
+/* Enabled for SDL 1.2 (binary compatibility) */
+#define HAVE_LIBC 1
+#ifdef HAVE_LIBC
+/* Useful headers */
+#define HAVE_STDIO_H 1
+#define STDC_HEADERS 1
+#define HAVE_STRING_H 1
+#define HAVE_CTYPE_H 1
+#define HAVE_MATH_H 1
+#ifndef _WIN32_WCE
+#define HAVE_SIGNAL_H 1
+#endif
+
+/* C library functions */
+#define HAVE_MALLOC 1
+#define HAVE_CALLOC 1
+#define HAVE_REALLOC 1
+#define HAVE_FREE 1
+#define HAVE_ALLOCA 1
+#define HAVE_QSORT 1
+#define HAVE_ABS 1
+#define HAVE_MEMSET 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMCMP 1
+#define HAVE_STRLEN 1
+#define HAVE__STRREV 1
+#define HAVE__STRUPR 1
+#define HAVE__STRLWR 1
+#define HAVE_STRCHR 1
+#define HAVE_STRRCHR 1
+#define HAVE_STRSTR 1
+#define HAVE_ITOA 1
+#define HAVE__LTOA 1
+#define HAVE__ULTOA 1
+#define HAVE_STRTOL 1
+#define HAVE_STRTOUL 1
+#define HAVE_STRTOLL 1
+#define HAVE_STRTOD 1
+#define HAVE_ATOI 1
+#define HAVE_ATOF 1
+#define HAVE_STRCMP 1
+#define HAVE_STRNCMP 1
+#define HAVE__STRICMP 1
+#define HAVE__STRNICMP 1
+#define HAVE_SSCANF 1
+#else
+#define HAVE_STDARG_H 1
+#define HAVE_STDDEF_H 1
+#endif
+
+/* Enable various audio drivers */
+#ifndef _WIN32_WCE
+#define SDL_AUDIO_DRIVER_DSOUND 1
+#endif
+#define SDL_AUDIO_DRIVER_WAVEOUT 1
+#define SDL_AUDIO_DRIVER_DISK 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
+
+/* Enable various cdrom drivers */
+#ifdef _WIN32_WCE
+#define SDL_CDROM_DISABLED 1
+#else
+#define SDL_CDROM_WIN32 1
+#endif
+
+/* Enable various input drivers */
+#ifdef _WIN32_WCE
+#define SDL_JOYSTICK_DISABLED 1
+#else
+#define SDL_JOYSTICK_WINMM 1
+#endif
+
+/* Enable various shared object loading systems */
+#define SDL_LOADSO_WIN32 1
+
+/* Enable various threading systems */
+#define SDL_THREAD_WIN32 1
+
+/* Enable various timer systems */
+#ifdef _WIN32_WCE
+#define SDL_TIMER_WINCE 1
+#else
+#define SDL_TIMER_WIN32 1
+#endif
+
+/* Enable various video drivers */
+#ifdef _WIN32_WCE
+#define SDL_VIDEO_DRIVER_GAPI 1
+#endif
+#ifndef _WIN32_WCE
+#define SDL_VIDEO_DRIVER_DDRAW 1
+#endif
+#define SDL_VIDEO_DRIVER_DUMMY 1
+#define SDL_VIDEO_DRIVER_WINDIB 1
+
+/* Enable OpenGL support */
+#ifndef _WIN32_WCE
+#define SDL_VIDEO_OPENGL 1
+#define SDL_VIDEO_OPENGL_WGL 1
+#endif
+
+/* Disable screensaver */
+#define SDL_VIDEO_DISABLE_SCREENSAVER 1
+
+/* Enable assembly routines (Win64 doesn't have inline asm) */
+#ifndef _WIN64
+#define SDL_ASSEMBLY_ROUTINES 1
+#endif
+
+#endif /* _SDL_config_win32_h */
diff --git a/code/SDL12/include/SDL_copying.h b/code/SDL12/include/SDL_copying.h
new file mode 100644
index 0000000..1bd6b84
--- /dev/null
+++ b/code/SDL12/include/SDL_copying.h
@@ -0,0 +1,22 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
diff --git a/code/SDL12/include/SDL_cpuinfo.h b/code/SDL12/include/SDL_cpuinfo.h
new file mode 100644
index 0000000..f4be8e0
--- /dev/null
+++ b/code/SDL12/include/SDL_cpuinfo.h
@@ -0,0 +1,69 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/**
+ * @file SDL_cpuinfo.h
+ * CPU feature detection for SDL
+ */
+
+#ifndef _SDL_cpuinfo_h
+#define _SDL_cpuinfo_h
+
+#include "SDL_stdinc.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** This function returns true if the CPU has the RDTSC instruction */
+extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
+
+/** This function returns true if the CPU has MMX features */
+extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
+
+/** This function returns true if the CPU has MMX Ext. features */
+extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt(void);
+
+/** This function returns true if the CPU has 3DNow features */
+extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
+
+/** This function returns true if the CPU has 3DNow! Ext. features */
+extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt(void);
+
+/** This function returns true if the CPU has SSE features */
+extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
+
+/** This function returns true if the CPU has SSE2 features */
+extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
+
+/** This function returns true if the CPU has AltiVec features */
+extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_cpuinfo_h */
diff --git a/code/SDL12/include/SDL_endian.h b/code/SDL12/include/SDL_endian.h
new file mode 100644
index 0000000..f7a2e2f
--- /dev/null
+++ b/code/SDL12/include/SDL_endian.h
@@ -0,0 +1,209 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/**
+ * @file SDL_endian.h
+ * Functions for reading and writing endian-specific values
+ */
+
+#ifndef _SDL_endian_h
+#define _SDL_endian_h
+
+#include "SDL_stdinc.h"
+
+/** @name SDL_ENDIANs
+ * The two types of endianness
+ */
+/*@{*/
+#define SDL_LIL_ENDIAN 1234
+#define SDL_BIG_ENDIAN 4321
+/*@}*/
+
+#ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */
+#if defined(__hppa__) || \
+ defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
+ (defined(__MIPS__) && defined(__MISPEB__)) || \
+ defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
+ defined(__sparc__)
+#define SDL_BYTEORDER SDL_BIG_ENDIAN
+#else
+#define SDL_BYTEORDER SDL_LIL_ENDIAN
+#endif
+#endif /* !SDL_BYTEORDER */
+
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @name SDL_Swap Functions
+ * Use inline functions for compilers that support them, and static
+ * functions for those that do not. Because these functions become
+ * static for compilers that do not support inline functions, this
+ * header should only be included in files that actually use them.
+ */
+/*@{*/
+#if defined(__GNUC__) && defined(__i386__) && \
+ !(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */)
+static __inline__ Uint16 SDL_Swap16(Uint16 x)
+{
+ __asm__("xchgb %b0,%h0" : "=q" (x) : "0" (x));
+ return x;
+}
+#elif defined(__GNUC__) && defined(__x86_64__)
+static __inline__ Uint16 SDL_Swap16(Uint16 x)
+{
+ __asm__("xchgb %b0,%h0" : "=Q" (x) : "0" (x));
+ return x;
+}
+#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
+static __inline__ Uint16 SDL_Swap16(Uint16 x)
+{
+ Uint16 result;
+
+ __asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (x >> 8), "r" (x));
+ return result;
+}
+#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__))
+static __inline__ Uint16 SDL_Swap16(Uint16 x)
+{
+ __asm__("rorw #8,%0" : "=d" (x) : "0" (x) : "cc");
+ return x;
+}
+#else
+static __inline__ Uint16 SDL_Swap16(Uint16 x) {
+ return((x<<8)|(x>>8));
+}
+#endif
+
+#if defined(__GNUC__) && defined(__i386__) && \
+ !(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */)
+static __inline__ Uint32 SDL_Swap32(Uint32 x)
+{
+ __asm__("bswap %0" : "=r" (x) : "0" (x));
+ return x;
+}
+#elif defined(__GNUC__) && defined(__x86_64__)
+static __inline__ Uint32 SDL_Swap32(Uint32 x)
+{
+ __asm__("bswapl %0" : "=r" (x) : "0" (x));
+ return x;
+}
+#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
+static __inline__ Uint32 SDL_Swap32(Uint32 x)
+{
+ Uint32 result;
+
+ __asm__("rlwimi %0,%2,24,16,23" : "=&r" (result) : "0" (x>>24), "r" (x));
+ __asm__("rlwimi %0,%2,8,8,15" : "=&r" (result) : "0" (result), "r" (x));
+ __asm__("rlwimi %0,%2,24,0,7" : "=&r" (result) : "0" (result), "r" (x));
+ return result;
+}
+#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__))
+static __inline__ Uint32 SDL_Swap32(Uint32 x)
+{
+ __asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0" : "=d" (x) : "0" (x) : "cc");
+ return x;
+}
+#else
+static __inline__ Uint32 SDL_Swap32(Uint32 x) {
+ return((x<<24)|((x<<8)&0x00FF0000)|((x>>8)&0x0000FF00)|(x>>24));
+}
+#endif
+
+#ifdef SDL_HAS_64BIT_TYPE
+#if defined(__GNUC__) && defined(__i386__) && \
+ !(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */)
+static __inline__ Uint64 SDL_Swap64(Uint64 x)
+{
+ union {
+ struct { Uint32 a,b; } s;
+ Uint64 u;
+ } v;
+ v.u = x;
+ __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
+ : "=r" (v.s.a), "=r" (v.s.b)
+ : "0" (v.s.a), "1" (v.s.b));
+ return v.u;
+}
+#elif defined(__GNUC__) && defined(__x86_64__)
+static __inline__ Uint64 SDL_Swap64(Uint64 x)
+{
+ __asm__("bswapq %0" : "=r" (x) : "0" (x));
+ return x;
+}
+#else
+static __inline__ Uint64 SDL_Swap64(Uint64 x)
+{
+ Uint32 hi, lo;
+
+ /* Separate into high and low 32-bit values and swap them */
+ lo = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
+ x >>= 32;
+ hi = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
+ x = SDL_Swap32(lo);
+ x <<= 32;
+ x |= SDL_Swap32(hi);
+ return(x);
+}
+#endif
+#else
+/* This is mainly to keep compilers from complaining in SDL code.
+ * If there is no real 64-bit datatype, then compilers will complain about
+ * the fake 64-bit datatype that SDL provides when it compiles user code.
+ */
+#define SDL_Swap64(X) (X)
+#endif /* SDL_HAS_64BIT_TYPE */
+/*@}*/
+
+/**
+ * @name SDL_SwapLE and SDL_SwapBE Functions
+ * Byteswap item from the specified endianness to the native endianness
+ */
+/*@{*/
+#if SDL_BYTEORDER == SDL_LIL_ENDIAN
+#define SDL_SwapLE16(X) (X)
+#define SDL_SwapLE32(X) (X)
+#define SDL_SwapLE64(X) (X)
+#define SDL_SwapBE16(X) SDL_Swap16(X)
+#define SDL_SwapBE32(X) SDL_Swap32(X)
+#define SDL_SwapBE64(X) SDL_Swap64(X)
+#else
+#define SDL_SwapLE16(X) SDL_Swap16(X)
+#define SDL_SwapLE32(X) SDL_Swap32(X)
+#define SDL_SwapLE64(X) SDL_Swap64(X)
+#define SDL_SwapBE16(X) (X)
+#define SDL_SwapBE32(X) (X)
+#define SDL_SwapBE64(X) (X)
+#endif
+/*@}*/
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_endian_h */
diff --git a/code/SDL12/include/SDL_error.h b/code/SDL12/include/SDL_error.h
new file mode 100644
index 0000000..b103703
--- /dev/null
+++ b/code/SDL12/include/SDL_error.h
@@ -0,0 +1,72 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/**
+ * @file SDL_error.h
+ * Simple error message routines for SDL
+ */
+
+#ifndef _SDL_error_h
+#define _SDL_error_h
+
+#include "SDL_stdinc.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @name Public functions
+ */
+/*@{*/
+extern DECLSPEC void SDLCALL SDL_SetError(const char *fmt, ...);
+extern DECLSPEC char * SDLCALL SDL_GetError(void);
+extern DECLSPEC void SDLCALL SDL_ClearError(void);
+/*@}*/
+
+/**
+ * @name Private functions
+ * @internal Private error message function - used internally
+ */
+/*@{*/
+#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM)
+#define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED)
+typedef enum {
+ SDL_ENOMEM,
+ SDL_EFREAD,
+ SDL_EFWRITE,
+ SDL_EFSEEK,
+ SDL_UNSUPPORTED,
+ SDL_LASTERROR
+} SDL_errorcode;
+extern DECLSPEC void SDLCALL SDL_Error(SDL_errorcode code);
+/*@}*/
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_error_h */
diff --git a/code/SDL12/include/SDL_events.h b/code/SDL12/include/SDL_events.h
new file mode 100644
index 0000000..c94a30c
--- /dev/null
+++ b/code/SDL12/include/SDL_events.h
@@ -0,0 +1,356 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/**
+ * @file SDL_events.h
+ * Include file for SDL event handling
+ */
+
+#ifndef _SDL_events_h
+#define _SDL_events_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+#include "SDL_active.h"
+#include "SDL_keyboard.h"
+#include "SDL_mouse.h"
+#include "SDL_joystick.h"
+#include "SDL_quit.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @name General keyboard/mouse state definitions */
+/*@{*/
+#define SDL_RELEASED 0
+#define SDL_PRESSED 1
+/*@}*/
+
+/** Event enumerations */
+typedef enum {
+ SDL_NOEVENT = 0, /**< Unused (do not remove) */
+ SDL_ACTIVEEVENT, /**< Application loses/gains visibility */
+ SDL_KEYDOWN, /**< Keys pressed */
+ SDL_KEYUP, /**< Keys released */
+ SDL_MOUSEMOTION, /**< Mouse moved */
+ SDL_MOUSEBUTTONDOWN, /**< Mouse button pressed */
+ SDL_MOUSEBUTTONUP, /**< Mouse button released */
+ SDL_JOYAXISMOTION, /**< Joystick axis motion */
+ SDL_JOYBALLMOTION, /**< Joystick trackball motion */
+ SDL_JOYHATMOTION, /**< Joystick hat position change */
+ SDL_JOYBUTTONDOWN, /**< Joystick button pressed */
+ SDL_JOYBUTTONUP, /**< Joystick button released */
+ SDL_QUIT, /**< User-requested quit */
+ SDL_SYSWMEVENT, /**< System specific event */
+ SDL_EVENT_RESERVEDA, /**< Reserved for future use.. */
+ SDL_EVENT_RESERVEDB, /**< Reserved for future use.. */
+ SDL_VIDEORESIZE, /**< User resized video mode */
+ SDL_VIDEOEXPOSE, /**< Screen needs to be redrawn */
+ SDL_EVENT_RESERVED2, /**< Reserved for future use.. */
+ SDL_EVENT_RESERVED3, /**< Reserved for future use.. */
+ SDL_EVENT_RESERVED4, /**< Reserved for future use.. */
+ SDL_EVENT_RESERVED5, /**< Reserved for future use.. */
+ SDL_EVENT_RESERVED6, /**< Reserved for future use.. */
+ SDL_EVENT_RESERVED7, /**< Reserved for future use.. */
+ /** Events SDL_USEREVENT through SDL_MAXEVENTS-1 are for your use */
+ SDL_USEREVENT = 24,
+ /** This last event is only for bounding internal arrays
+ * It is the number of bits in the event mask datatype -- Uint32
+ */
+ SDL_NUMEVENTS = 32
+} SDL_EventType;
+
+/** @name Predefined event masks */
+/*@{*/
+#define SDL_EVENTMASK(X) (1<<(X))
+typedef enum {
+ SDL_ACTIVEEVENTMASK = SDL_EVENTMASK(SDL_ACTIVEEVENT),
+ SDL_KEYDOWNMASK = SDL_EVENTMASK(SDL_KEYDOWN),
+ SDL_KEYUPMASK = SDL_EVENTMASK(SDL_KEYUP),
+ SDL_KEYEVENTMASK = SDL_EVENTMASK(SDL_KEYDOWN)|
+ SDL_EVENTMASK(SDL_KEYUP),
+ SDL_MOUSEMOTIONMASK = SDL_EVENTMASK(SDL_MOUSEMOTION),
+ SDL_MOUSEBUTTONDOWNMASK = SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN),
+ SDL_MOUSEBUTTONUPMASK = SDL_EVENTMASK(SDL_MOUSEBUTTONUP),
+ SDL_MOUSEEVENTMASK = SDL_EVENTMASK(SDL_MOUSEMOTION)|
+ SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN)|
+ SDL_EVENTMASK(SDL_MOUSEBUTTONUP),
+ SDL_JOYAXISMOTIONMASK = SDL_EVENTMASK(SDL_JOYAXISMOTION),
+ SDL_JOYBALLMOTIONMASK = SDL_EVENTMASK(SDL_JOYBALLMOTION),
+ SDL_JOYHATMOTIONMASK = SDL_EVENTMASK(SDL_JOYHATMOTION),
+ SDL_JOYBUTTONDOWNMASK = SDL_EVENTMASK(SDL_JOYBUTTONDOWN),
+ SDL_JOYBUTTONUPMASK = SDL_EVENTMASK(SDL_JOYBUTTONUP),
+ SDL_JOYEVENTMASK = SDL_EVENTMASK(SDL_JOYAXISMOTION)|
+ SDL_EVENTMASK(SDL_JOYBALLMOTION)|
+ SDL_EVENTMASK(SDL_JOYHATMOTION)|
+ SDL_EVENTMASK(SDL_JOYBUTTONDOWN)|
+ SDL_EVENTMASK(SDL_JOYBUTTONUP),
+ SDL_VIDEORESIZEMASK = SDL_EVENTMASK(SDL_VIDEORESIZE),
+ SDL_VIDEOEXPOSEMASK = SDL_EVENTMASK(SDL_VIDEOEXPOSE),
+ SDL_QUITMASK = SDL_EVENTMASK(SDL_QUIT),
+ SDL_SYSWMEVENTMASK = SDL_EVENTMASK(SDL_SYSWMEVENT)
+} SDL_EventMask ;
+#define SDL_ALLEVENTS 0xFFFFFFFF
+/*@}*/
+
+/** Application visibility event structure */
+typedef struct SDL_ActiveEvent {
+ Uint8 type; /**< SDL_ACTIVEEVENT */
+ Uint8 gain; /**< Whether given states were gained or lost (1/0) */
+ Uint8 state; /**< A mask of the focus states */
+} SDL_ActiveEvent;
+
+/** Keyboard event structure */
+typedef struct SDL_KeyboardEvent {
+ Uint8 type; /**< SDL_KEYDOWN or SDL_KEYUP */
+ Uint8 which; /**< The keyboard device index */
+ Uint8 state; /**< SDL_PRESSED or SDL_RELEASED */
+ SDL_keysym keysym;
+} SDL_KeyboardEvent;
+
+/** Mouse motion event structure */
+typedef struct SDL_MouseMotionEvent {
+ Uint8 type; /**< SDL_MOUSEMOTION */
+ Uint8 which; /**< The mouse device index */
+ Uint8 state; /**< The current button state */
+ Uint16 x, y; /**< The X/Y coordinates of the mouse */
+ Sint16 xrel; /**< The relative motion in the X direction */
+ Sint16 yrel; /**< The relative motion in the Y direction */
+} SDL_MouseMotionEvent;
+
+/** Mouse button event structure */
+typedef struct SDL_MouseButtonEvent {
+ Uint8 type; /**< SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP */
+ Uint8 which; /**< The mouse device index */
+ Uint8 button; /**< The mouse button index */
+ Uint8 state; /**< SDL_PRESSED or SDL_RELEASED */
+ Uint16 x, y; /**< The X/Y coordinates of the mouse at press time */
+} SDL_MouseButtonEvent;
+
+/** Joystick axis motion event structure */
+typedef struct SDL_JoyAxisEvent {
+ Uint8 type; /**< SDL_JOYAXISMOTION */
+ Uint8 which; /**< The joystick device index */
+ Uint8 axis; /**< The joystick axis index */
+ Sint16 value; /**< The axis value (range: -32768 to 32767) */
+} SDL_JoyAxisEvent;
+
+/** Joystick trackball motion event structure */
+typedef struct SDL_JoyBallEvent {
+ Uint8 type; /**< SDL_JOYBALLMOTION */
+ Uint8 which; /**< The joystick device index */
+ Uint8 ball; /**< The joystick trackball index */
+ Sint16 xrel; /**< The relative motion in the X direction */
+ Sint16 yrel; /**< The relative motion in the Y direction */
+} SDL_JoyBallEvent;
+
+/** Joystick hat position change event structure */
+typedef struct SDL_JoyHatEvent {
+ Uint8 type; /**< SDL_JOYHATMOTION */
+ Uint8 which; /**< The joystick device index */
+ Uint8 hat; /**< The joystick hat index */
+ Uint8 value; /**< The hat position value:
+ * SDL_HAT_LEFTUP SDL_HAT_UP SDL_HAT_RIGHTUP
+ * SDL_HAT_LEFT SDL_HAT_CENTERED SDL_HAT_RIGHT
+ * SDL_HAT_LEFTDOWN SDL_HAT_DOWN SDL_HAT_RIGHTDOWN
+ * Note that zero means the POV is centered.
+ */
+} SDL_JoyHatEvent;
+
+/** Joystick button event structure */
+typedef struct SDL_JoyButtonEvent {
+ Uint8 type; /**< SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP */
+ Uint8 which; /**< The joystick device index */
+ Uint8 button; /**< The joystick button index */
+ Uint8 state; /**< SDL_PRESSED or SDL_RELEASED */
+} SDL_JoyButtonEvent;
+
+/** The "window resized" event
+ * When you get this event, you are responsible for setting a new video
+ * mode with the new width and height.
+ */
+typedef struct SDL_ResizeEvent {
+ Uint8 type; /**< SDL_VIDEORESIZE */
+ int w; /**< New width */
+ int h; /**< New height */
+} SDL_ResizeEvent;
+
+/** The "screen redraw" event */
+typedef struct SDL_ExposeEvent {
+ Uint8 type; /**< SDL_VIDEOEXPOSE */
+} SDL_ExposeEvent;
+
+/** The "quit requested" event */
+typedef struct SDL_QuitEvent {
+ Uint8 type; /**< SDL_QUIT */
+} SDL_QuitEvent;
+
+/** A user-defined event type */
+typedef struct SDL_UserEvent {
+ Uint8 type; /**< SDL_USEREVENT through SDL_NUMEVENTS-1 */
+ int code; /**< User defined event code */
+ void *data1; /**< User defined data pointer */
+ void *data2; /**< User defined data pointer */
+} SDL_UserEvent;
+
+/** If you want to use this event, you should include SDL_syswm.h */
+struct SDL_SysWMmsg;
+typedef struct SDL_SysWMmsg SDL_SysWMmsg;
+typedef struct SDL_SysWMEvent {
+ Uint8 type;
+ SDL_SysWMmsg *msg;
+} SDL_SysWMEvent;
+
+/** General event structure */
+typedef union SDL_Event {
+ Uint8 type;
+ SDL_ActiveEvent active;
+ SDL_KeyboardEvent key;
+ SDL_MouseMotionEvent motion;
+ SDL_MouseButtonEvent button;
+ SDL_JoyAxisEvent jaxis;
+ SDL_JoyBallEvent jball;
+ SDL_JoyHatEvent jhat;
+ SDL_JoyButtonEvent jbutton;
+ SDL_ResizeEvent resize;
+ SDL_ExposeEvent expose;
+ SDL_QuitEvent quit;
+ SDL_UserEvent user;
+ SDL_SysWMEvent syswm;
+} SDL_Event;
+
+
+/* Function prototypes */
+
+/** Pumps the event loop, gathering events from the input devices.
+ * This function updates the event queue and internal input device state.
+ * This should only be run in the thread that sets the video mode.
+ */
+extern DECLSPEC void SDLCALL SDL_PumpEvents(void);
+
+typedef enum {
+ SDL_ADDEVENT,
+ SDL_PEEKEVENT,
+ SDL_GETEVENT
+} SDL_eventaction;
+
+/**
+ * Checks the event queue for messages and optionally returns them.
+ *
+ * If 'action' is SDL_ADDEVENT, up to 'numevents' events will be added to
+ * the back of the event queue.
+ * If 'action' is SDL_PEEKEVENT, up to 'numevents' events at the front
+ * of the event queue, matching 'mask', will be returned and will not
+ * be removed from the queue.
+ * If 'action' is SDL_GETEVENT, up to 'numevents' events at the front
+ * of the event queue, matching 'mask', will be returned and will be
+ * removed from the queue.
+ *
+ * @return
+ * This function returns the number of events actually stored, or -1
+ * if there was an error.
+ *
+ * This function is thread-safe.
+ */
+extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event *events, int numevents,
+ SDL_eventaction action, Uint32 mask);
+
+/** Polls for currently pending events, and returns 1 if there are any pending
+ * events, or 0 if there are none available. If 'event' is not NULL, the next
+ * event is removed from the queue and stored in that area.
+ */
+extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event *event);
+
+/** Waits indefinitely for the next available event, returning 1, or 0 if there
+ * was an error while waiting for events. If 'event' is not NULL, the next
+ * event is removed from the queue and stored in that area.
+ */
+extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event *event);
+
+/** Add an event to the event queue.
+ * This function returns 0 on success, or -1 if the event queue was full
+ * or there was some other error.
+ */
+extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event *event);
+
+/** @name Event Filtering */
+/*@{*/
+typedef int (SDLCALL *SDL_EventFilter)(const SDL_Event *event);
+/**
+ * This function sets up a filter to process all events before they
+ * change internal state and are posted to the internal event queue.
+ *
+ * The filter is protypted as:
+ * @code typedef int (SDLCALL *SDL_EventFilter)(const SDL_Event *event); @endcode
+ *
+ * If the filter returns 1, then the event will be added to the internal queue.
+ * If it returns 0, then the event will be dropped from the queue, but the
+ * internal state will still be updated. This allows selective filtering of
+ * dynamically arriving events.
+ *
+ * @warning Be very careful of what you do in the event filter function, as
+ * it may run in a different thread!
+ *
+ * There is one caveat when dealing with the SDL_QUITEVENT event type. The
+ * event filter is only called when the window manager desires to close the
+ * application window. If the event filter returns 1, then the window will
+ * be closed, otherwise the window will remain open if possible.
+ * If the quit event is generated by an interrupt signal, it will bypass the
+ * internal queue and be delivered to the application at the next event poll.
+ */
+extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter);
+
+/**
+ * Return the current event filter - can be used to "chain" filters.
+ * If there is no event filter set, this function returns NULL.
+ */
+extern DECLSPEC SDL_EventFilter SDLCALL SDL_GetEventFilter(void);
+/*@}*/
+
+/** @name Event State */
+/*@{*/
+#define SDL_QUERY -1
+#define SDL_IGNORE 0
+#define SDL_DISABLE 0
+#define SDL_ENABLE 1
+/*@}*/
+
+/**
+* This function allows you to set the state of processing certain events.
+* If 'state' is set to SDL_IGNORE, that event will be automatically dropped
+* from the event queue and will not event be filtered.
+* If 'state' is set to SDL_ENABLE, that event will be processed normally.
+* If 'state' is set to SDL_QUERY, SDL_EventState() will return the
+* current processing state of the specified event.
+*/
+extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint8 type, int state);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_events_h */
diff --git a/code/SDL12/include/SDL_getenv.h b/code/SDL12/include/SDL_getenv.h
new file mode 100644
index 0000000..253ad88
--- /dev/null
+++ b/code/SDL12/include/SDL_getenv.h
@@ -0,0 +1,28 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/** @file SDL_getenv.h
+ * @deprecated Use SDL_stdinc.h instead
+ */
+
+/* DEPRECATED */
+#include "SDL_stdinc.h"
diff --git a/code/SDL12/include/SDL_joystick.h b/code/SDL12/include/SDL_joystick.h
new file mode 100644
index 0000000..d5135c3
--- /dev/null
+++ b/code/SDL12/include/SDL_joystick.h
@@ -0,0 +1,187 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/** @file SDL_joystick.h
+ * Include file for SDL joystick event handling
+ */
+
+#ifndef _SDL_joystick_h
+#define _SDL_joystick_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @file SDL_joystick.h
+ * @note In order to use these functions, SDL_Init() must have been called
+ * with the SDL_INIT_JOYSTICK flag. This causes SDL to scan the system
+ * for joysticks, and load appropriate drivers.
+ */
+
+/** The joystick structure used to identify an SDL joystick */
+struct _SDL_Joystick;
+typedef struct _SDL_Joystick SDL_Joystick;
+
+/* Function prototypes */
+/**
+ * Count the number of joysticks attached to the system
+ */
+extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
+
+/**
+ * Get the implementation dependent name of a joystick.
+ *
+ * This can be called before any joysticks are opened.
+ * If no name can be found, this function returns NULL.
+ */
+extern DECLSPEC const char * SDLCALL SDL_JoystickName(int device_index);
+
+/**
+ * Open a joystick for use.
+ *
+ * @param[in] device_index
+ * The index passed as an argument refers to
+ * the N'th joystick on the system. This index is the value which will
+ * identify this joystick in future joystick events.
+ *
+ * @return This function returns a joystick identifier, or NULL if an error occurred.
+ */
+extern DECLSPEC SDL_Joystick * SDLCALL SDL_JoystickOpen(int device_index);
+
+/**
+ * Returns 1 if the joystick has been opened, or 0 if it has not.
+ */
+extern DECLSPEC int SDLCALL SDL_JoystickOpened(int device_index);
+
+/**
+ * Get the device index of an opened joystick.
+ */
+extern DECLSPEC int SDLCALL SDL_JoystickIndex(SDL_Joystick *joystick);
+
+/**
+ * Get the number of general axis controls on a joystick
+ */
+extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick *joystick);
+
+/**
+ * Get the number of trackballs on a joystick
+ *
+ * Joystick trackballs have only relative motion events associated
+ * with them and their state cannot be polled.
+ */
+extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick *joystick);
+
+/**
+ * Get the number of POV hats on a joystick
+ */
+extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick *joystick);
+
+/**
+ * Get the number of buttons on a joystick
+ */
+extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick *joystick);
+
+/**
+ * Update the current state of the open joysticks.
+ *
+ * This is called automatically by the event loop if any joystick
+ * events are enabled.
+ */
+extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
+
+/**
+ * Enable/disable joystick event polling.
+ *
+ * If joystick events are disabled, you must call SDL_JoystickUpdate()
+ * yourself and check the state of the joystick when you want joystick
+ * information.
+ *
+ * @param[in] state The state can be one of SDL_QUERY, SDL_ENABLE or SDL_IGNORE.
+ */
+extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
+
+/**
+ * Get the current state of an axis control on a joystick
+ *
+ * @param[in] axis The axis indices start at index 0.
+ *
+ * @return The state is a value ranging from -32768 to 32767.
+ */
+extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis);
+
+/**
+ * @name Hat Positions
+ * The return value of SDL_JoystickGetHat() is one of the following positions:
+ */
+/*@{*/
+#define SDL_HAT_CENTERED 0x00
+#define SDL_HAT_UP 0x01
+#define SDL_HAT_RIGHT 0x02
+#define SDL_HAT_DOWN 0x04
+#define SDL_HAT_LEFT 0x08
+#define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP)
+#define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN)
+#define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP)
+#define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN)
+/*@}*/
+
+/**
+ * Get the current state of a POV hat on a joystick
+ *
+ * @param[in] hat The hat indices start at index 0.
+ */
+extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick, int hat);
+
+/**
+ * Get the ball axis change since the last poll
+ *
+ * @param[in] ball The ball indices start at index 0.
+ *
+ * @return This returns 0, or -1 if you passed it invalid parameters.
+ */
+extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy);
+
+/**
+ * Get the current state of a button on a joystick
+ *
+ * @param[in] button The button indices start at index 0.
+ */
+extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick *joystick, int button);
+
+/**
+ * Close a joystick previously opened with SDL_JoystickOpen()
+ */
+extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick *joystick);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_joystick_h */
diff --git a/code/SDL12/include/SDL_keyboard.h b/code/SDL12/include/SDL_keyboard.h
new file mode 100644
index 0000000..7b59d24
--- /dev/null
+++ b/code/SDL12/include/SDL_keyboard.h
@@ -0,0 +1,135 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/** @file SDL_keyboard.h
+ * Include file for SDL keyboard event handling
+ */
+
+#ifndef _SDL_keyboard_h
+#define _SDL_keyboard_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+#include "SDL_keysym.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Keysym structure
+ *
+ * - The scancode is hardware dependent, and should not be used by general
+ * applications. If no hardware scancode is available, it will be 0.
+ *
+ * - The 'unicode' translated character is only available when character
+ * translation is enabled by the SDL_EnableUNICODE() API. If non-zero,
+ * this is a UNICODE character corresponding to the keypress. If the
+ * high 9 bits of the character are 0, then this maps to the equivalent
+ * ASCII character:
+ * @code
+ * char ch;
+ * if ( (keysym.unicode & 0xFF80) == 0 ) {
+ * ch = keysym.unicode & 0x7F;
+ * } else {
+ * An international character..
+ * }
+ * @endcode
+ */
+typedef struct SDL_keysym {
+ Uint8 scancode; /**< hardware specific scancode */
+ SDLKey sym; /**< SDL virtual keysym */
+ SDLMod mod; /**< current key modifiers */
+ Uint16 unicode; /**< translated character */
+} SDL_keysym;
+
+/** This is the mask which refers to all hotkey bindings */
+#define SDL_ALL_HOTKEYS 0xFFFFFFFF
+
+/* Function prototypes */
+/**
+ * Enable/Disable UNICODE translation of keyboard input.
+ *
+ * This translation has some overhead, so translation defaults off.
+ *
+ * @param[in] enable
+ * If 'enable' is 1, translation is enabled.
+ * If 'enable' is 0, translation is disabled.
+ * If 'enable' is -1, the translation state is not changed.
+ *
+ * @return It returns the previous state of keyboard translation.
+ */
+extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable);
+
+#define SDL_DEFAULT_REPEAT_DELAY 500
+#define SDL_DEFAULT_REPEAT_INTERVAL 30
+/**
+ * Enable/Disable keyboard repeat. Keyboard repeat defaults to off.
+ *
+ * @param[in] delay
+ * 'delay' is the initial delay in ms between the time when a key is
+ * pressed, and keyboard repeat begins.
+ *
+ * @param[in] interval
+ * 'interval' is the time in ms between keyboard repeat events.
+ *
+ * If 'delay' is set to 0, keyboard repeat is disabled.
+ */
+extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
+extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval);
+
+/**
+ * Get a snapshot of the current state of the keyboard.
+ * Returns an array of keystates, indexed by the SDLK_* syms.
+ * Usage:
+ * @code
+ * Uint8 *keystate = SDL_GetKeyState(NULL);
+ * if ( keystate[SDLK_RETURN] ) //... \<RETURN> is pressed.
+ * @endcode
+ */
+extern DECLSPEC Uint8 * SDLCALL SDL_GetKeyState(int *numkeys);
+
+/**
+ * Get the current key modifier state
+ */
+extern DECLSPEC SDLMod SDLCALL SDL_GetModState(void);
+
+/**
+ * Set the current key modifier state.
+ * This does not change the keyboard state, only the key modifier flags.
+ */
+extern DECLSPEC void SDLCALL SDL_SetModState(SDLMod modstate);
+
+/**
+ * Get the name of an SDL virtual keysym
+ */
+extern DECLSPEC char * SDLCALL SDL_GetKeyName(SDLKey key);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_keyboard_h */
diff --git a/code/SDL12/include/SDL_keysym.h b/code/SDL12/include/SDL_keysym.h
new file mode 100644
index 0000000..9010128
--- /dev/null
+++ b/code/SDL12/include/SDL_keysym.h
@@ -0,0 +1,326 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_keysym_h
+#define _SDL_keysym_h
+
+/** What we really want is a mapping of every raw key on the keyboard.
+ * To support international keyboards, we use the range 0xA1 - 0xFF
+ * as international virtual keycodes. We'll follow in the footsteps of X11...
+ * @brief The names of the keys
+ */
+typedef enum {
+ /** @name ASCII mapped keysyms
+ * The keyboard syms have been cleverly chosen to map to ASCII
+ */
+ /*@{*/
+ SDLK_UNKNOWN = 0,
+ SDLK_FIRST = 0,
+ SDLK_BACKSPACE = 8,
+ SDLK_TAB = 9,
+ SDLK_CLEAR = 12,
+ SDLK_RETURN = 13,
+ SDLK_PAUSE = 19,
+ SDLK_ESCAPE = 27,
+ SDLK_SPACE = 32,
+ SDLK_EXCLAIM = 33,
+ SDLK_QUOTEDBL = 34,
+ SDLK_HASH = 35,
+ SDLK_DOLLAR = 36,
+ SDLK_AMPERSAND = 38,
+ SDLK_QUOTE = 39,
+ SDLK_LEFTPAREN = 40,
+ SDLK_RIGHTPAREN = 41,
+ SDLK_ASTERISK = 42,
+ SDLK_PLUS = 43,
+ SDLK_COMMA = 44,
+ SDLK_MINUS = 45,
+ SDLK_PERIOD = 46,
+ SDLK_SLASH = 47,
+ SDLK_0 = 48,
+ SDLK_1 = 49,
+ SDLK_2 = 50,
+ SDLK_3 = 51,
+ SDLK_4 = 52,
+ SDLK_5 = 53,
+ SDLK_6 = 54,
+ SDLK_7 = 55,
+ SDLK_8 = 56,
+ SDLK_9 = 57,
+ SDLK_COLON = 58,
+ SDLK_SEMICOLON = 59,
+ SDLK_LESS = 60,
+ SDLK_EQUALS = 61,
+ SDLK_GREATER = 62,
+ SDLK_QUESTION = 63,
+ SDLK_AT = 64,
+ /*
+ Skip uppercase letters
+ */
+ SDLK_LEFTBRACKET = 91,
+ SDLK_BACKSLASH = 92,
+ SDLK_RIGHTBRACKET = 93,
+ SDLK_CARET = 94,
+ SDLK_UNDERSCORE = 95,
+ SDLK_BACKQUOTE = 96,
+ SDLK_a = 97,
+ SDLK_b = 98,
+ SDLK_c = 99,
+ SDLK_d = 100,
+ SDLK_e = 101,
+ SDLK_f = 102,
+ SDLK_g = 103,
+ SDLK_h = 104,
+ SDLK_i = 105,
+ SDLK_j = 106,
+ SDLK_k = 107,
+ SDLK_l = 108,
+ SDLK_m = 109,
+ SDLK_n = 110,
+ SDLK_o = 111,
+ SDLK_p = 112,
+ SDLK_q = 113,
+ SDLK_r = 114,
+ SDLK_s = 115,
+ SDLK_t = 116,
+ SDLK_u = 117,
+ SDLK_v = 118,
+ SDLK_w = 119,
+ SDLK_x = 120,
+ SDLK_y = 121,
+ SDLK_z = 122,
+ SDLK_DELETE = 127,
+ /* End of ASCII mapped keysyms */
+ /*@}*/
+
+ /** @name International keyboard syms */
+ /*@{*/
+ SDLK_WORLD_0 = 160, /* 0xA0 */
+ SDLK_WORLD_1 = 161,
+ SDLK_WORLD_2 = 162,
+ SDLK_WORLD_3 = 163,
+ SDLK_WORLD_4 = 164,
+ SDLK_WORLD_5 = 165,
+ SDLK_WORLD_6 = 166,
+ SDLK_WORLD_7 = 167,
+ SDLK_WORLD_8 = 168,
+ SDLK_WORLD_9 = 169,
+ SDLK_WORLD_10 = 170,
+ SDLK_WORLD_11 = 171,
+ SDLK_WORLD_12 = 172,
+ SDLK_WORLD_13 = 173,
+ SDLK_WORLD_14 = 174,
+ SDLK_WORLD_15 = 175,
+ SDLK_WORLD_16 = 176,
+ SDLK_WORLD_17 = 177,
+ SDLK_WORLD_18 = 178,
+ SDLK_WORLD_19 = 179,
+ SDLK_WORLD_20 = 180,
+ SDLK_WORLD_21 = 181,
+ SDLK_WORLD_22 = 182,
+ SDLK_WORLD_23 = 183,
+ SDLK_WORLD_24 = 184,
+ SDLK_WORLD_25 = 185,
+ SDLK_WORLD_26 = 186,
+ SDLK_WORLD_27 = 187,
+ SDLK_WORLD_28 = 188,
+ SDLK_WORLD_29 = 189,
+ SDLK_WORLD_30 = 190,
+ SDLK_WORLD_31 = 191,
+ SDLK_WORLD_32 = 192,
+ SDLK_WORLD_33 = 193,
+ SDLK_WORLD_34 = 194,
+ SDLK_WORLD_35 = 195,
+ SDLK_WORLD_36 = 196,
+ SDLK_WORLD_37 = 197,
+ SDLK_WORLD_38 = 198,
+ SDLK_WORLD_39 = 199,
+ SDLK_WORLD_40 = 200,
+ SDLK_WORLD_41 = 201,
+ SDLK_WORLD_42 = 202,
+ SDLK_WORLD_43 = 203,
+ SDLK_WORLD_44 = 204,
+ SDLK_WORLD_45 = 205,
+ SDLK_WORLD_46 = 206,
+ SDLK_WORLD_47 = 207,
+ SDLK_WORLD_48 = 208,
+ SDLK_WORLD_49 = 209,
+ SDLK_WORLD_50 = 210,
+ SDLK_WORLD_51 = 211,
+ SDLK_WORLD_52 = 212,
+ SDLK_WORLD_53 = 213,
+ SDLK_WORLD_54 = 214,
+ SDLK_WORLD_55 = 215,
+ SDLK_WORLD_56 = 216,
+ SDLK_WORLD_57 = 217,
+ SDLK_WORLD_58 = 218,
+ SDLK_WORLD_59 = 219,
+ SDLK_WORLD_60 = 220,
+ SDLK_WORLD_61 = 221,
+ SDLK_WORLD_62 = 222,
+ SDLK_WORLD_63 = 223,
+ SDLK_WORLD_64 = 224,
+ SDLK_WORLD_65 = 225,
+ SDLK_WORLD_66 = 226,
+ SDLK_WORLD_67 = 227,
+ SDLK_WORLD_68 = 228,
+ SDLK_WORLD_69 = 229,
+ SDLK_WORLD_70 = 230,
+ SDLK_WORLD_71 = 231,
+ SDLK_WORLD_72 = 232,
+ SDLK_WORLD_73 = 233,
+ SDLK_WORLD_74 = 234,
+ SDLK_WORLD_75 = 235,
+ SDLK_WORLD_76 = 236,
+ SDLK_WORLD_77 = 237,
+ SDLK_WORLD_78 = 238,
+ SDLK_WORLD_79 = 239,
+ SDLK_WORLD_80 = 240,
+ SDLK_WORLD_81 = 241,
+ SDLK_WORLD_82 = 242,
+ SDLK_WORLD_83 = 243,
+ SDLK_WORLD_84 = 244,
+ SDLK_WORLD_85 = 245,
+ SDLK_WORLD_86 = 246,
+ SDLK_WORLD_87 = 247,
+ SDLK_WORLD_88 = 248,
+ SDLK_WORLD_89 = 249,
+ SDLK_WORLD_90 = 250,
+ SDLK_WORLD_91 = 251,
+ SDLK_WORLD_92 = 252,
+ SDLK_WORLD_93 = 253,
+ SDLK_WORLD_94 = 254,
+ SDLK_WORLD_95 = 255, /* 0xFF */
+ /*@}*/
+
+ /** @name Numeric keypad */
+ /*@{*/
+ SDLK_KP0 = 256,
+ SDLK_KP1 = 257,
+ SDLK_KP2 = 258,
+ SDLK_KP3 = 259,
+ SDLK_KP4 = 260,
+ SDLK_KP5 = 261,
+ SDLK_KP6 = 262,
+ SDLK_KP7 = 263,
+ SDLK_KP8 = 264,
+ SDLK_KP9 = 265,
+ SDLK_KP_PERIOD = 266,
+ SDLK_KP_DIVIDE = 267,
+ SDLK_KP_MULTIPLY = 268,
+ SDLK_KP_MINUS = 269,
+ SDLK_KP_PLUS = 270,
+ SDLK_KP_ENTER = 271,
+ SDLK_KP_EQUALS = 272,
+ /*@}*/
+
+ /** @name Arrows + Home/End pad */
+ /*@{*/
+ SDLK_UP = 273,
+ SDLK_DOWN = 274,
+ SDLK_RIGHT = 275,
+ SDLK_LEFT = 276,
+ SDLK_INSERT = 277,
+ SDLK_HOME = 278,
+ SDLK_END = 279,
+ SDLK_PAGEUP = 280,
+ SDLK_PAGEDOWN = 281,
+ /*@}*/
+
+ /** @name Function keys */
+ /*@{*/
+ SDLK_F1 = 282,
+ SDLK_F2 = 283,
+ SDLK_F3 = 284,
+ SDLK_F4 = 285,
+ SDLK_F5 = 286,
+ SDLK_F6 = 287,
+ SDLK_F7 = 288,
+ SDLK_F8 = 289,
+ SDLK_F9 = 290,
+ SDLK_F10 = 291,
+ SDLK_F11 = 292,
+ SDLK_F12 = 293,
+ SDLK_F13 = 294,
+ SDLK_F14 = 295,
+ SDLK_F15 = 296,
+ /*@}*/
+
+ /** @name Key state modifier keys */
+ /*@{*/
+ SDLK_NUMLOCK = 300,
+ SDLK_CAPSLOCK = 301,
+ SDLK_SCROLLOCK = 302,
+ SDLK_RSHIFT = 303,
+ SDLK_LSHIFT = 304,
+ SDLK_RCTRL = 305,
+ SDLK_LCTRL = 306,
+ SDLK_RALT = 307,
+ SDLK_LALT = 308,
+ SDLK_RMETA = 309,
+ SDLK_LMETA = 310,
+ SDLK_LSUPER = 311, /**< Left "Windows" key */
+ SDLK_RSUPER = 312, /**< Right "Windows" key */
+ SDLK_MODE = 313, /**< "Alt Gr" key */
+ SDLK_COMPOSE = 314, /**< Multi-key compose key */
+ /*@}*/
+
+ /** @name Miscellaneous function keys */
+ /*@{*/
+ SDLK_HELP = 315,
+ SDLK_PRINT = 316,
+ SDLK_SYSREQ = 317,
+ SDLK_BREAK = 318,
+ SDLK_MENU = 319,
+ SDLK_POWER = 320, /**< Power Macintosh power key */
+ SDLK_EURO = 321, /**< Some european keyboards */
+ SDLK_UNDO = 322, /**< Atari keyboard has Undo */
+ /*@}*/
+
+ /* Add any other keys here */
+
+ SDLK_LAST
+} SDLKey;
+
+/** Enumeration of valid key mods (possibly OR'd together) */
+typedef enum {
+ KMOD_NONE = 0x0000,
+ KMOD_LSHIFT= 0x0001,
+ KMOD_RSHIFT= 0x0002,
+ KMOD_LCTRL = 0x0040,
+ KMOD_RCTRL = 0x0080,
+ KMOD_LALT = 0x0100,
+ KMOD_RALT = 0x0200,
+ KMOD_LMETA = 0x0400,
+ KMOD_RMETA = 0x0800,
+ KMOD_NUM = 0x1000,
+ KMOD_CAPS = 0x2000,
+ KMOD_MODE = 0x4000,
+ KMOD_RESERVED = 0x8000
+} SDLMod;
+
+#define KMOD_CTRL (KMOD_LCTRL|KMOD_RCTRL)
+#define KMOD_SHIFT (KMOD_LSHIFT|KMOD_RSHIFT)
+#define KMOD_ALT (KMOD_LALT|KMOD_RALT)
+#define KMOD_META (KMOD_LMETA|KMOD_RMETA)
+
+#endif /* _SDL_keysym_h */
diff --git a/code/SDL12/include/SDL_loadso.h b/code/SDL12/include/SDL_loadso.h
new file mode 100644
index 0000000..45a17f9
--- /dev/null
+++ b/code/SDL12/include/SDL_loadso.h
@@ -0,0 +1,78 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/** @file SDL_loadso.h
+ * System dependent library loading routines
+ */
+
+/** @file SDL_loadso.h
+ * Some things to keep in mind:
+ * - These functions only work on C function names. Other languages may
+ * have name mangling and intrinsic language support that varies from
+ * compiler to compiler.
+ * - Make sure you declare your function pointers with the same calling
+ * convention as the actual library function. Your code will crash
+ * mysteriously if you do not do this.
+ * - Avoid namespace collisions. If you load a symbol from the library,
+ * it is not defined whether or not it goes into the global symbol
+ * namespace for the application. If it does and it conflicts with
+ * symbols in your code or other shared libraries, you will not get
+ * the results you expect. :)
+ */
+
+
+#ifndef _SDL_loadso_h
+#define _SDL_loadso_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * This function dynamically loads a shared object and returns a pointer
+ * to the object handle (or NULL if there was an error).
+ * The 'sofile' parameter is a system dependent name of the object file.
+ */
+extern DECLSPEC void * SDLCALL SDL_LoadObject(const char *sofile);
+
+/**
+ * Given an object handle, this function looks up the address of the
+ * named function in the shared object and returns it. This address
+ * is no longer valid after calling SDL_UnloadObject().
+ */
+extern DECLSPEC void * SDLCALL SDL_LoadFunction(void *handle, const char *name);
+
+/** Unload a shared object from memory */
+extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_loadso_h */
diff --git a/code/SDL12/include/SDL_main.h b/code/SDL12/include/SDL_main.h
new file mode 100644
index 0000000..b7f6b2c
--- /dev/null
+++ b/code/SDL12/include/SDL_main.h
@@ -0,0 +1,106 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_main_h
+#define _SDL_main_h
+
+#include "SDL_stdinc.h"
+
+/** @file SDL_main.h
+ * Redefine main() on Win32 and MacOS so that it is called by winmain.c
+ */
+
+#if defined(__WIN32__) || \
+ (defined(__MWERKS__) && !defined(__BEOS__)) || \
+ defined(__MACOS__) || defined(__MACOSX__) || \
+ defined(__SYMBIAN32__) || defined(QWS)
+
+#ifdef __cplusplus
+#define C_LINKAGE "C"
+#else
+#define C_LINKAGE
+#endif /* __cplusplus */
+
+/** The application's main() function must be called with C linkage,
+ * and should be declared like this:
+ * @code
+ * #ifdef __cplusplus
+ * extern "C"
+ * #endif
+ * int main(int argc, char *argv[])
+ * {
+ * }
+ * @endcode
+ */
+#define main SDL_main
+
+/** The prototype for the application's main() function */
+extern C_LINKAGE int SDL_main(int argc, char *argv[]);
+
+
+/** @name From the SDL library code -- needed for registering the app on Win32 */
+/*@{*/
+#ifdef __WIN32__
+
+#include "begin_code.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** This should be called from your WinMain() function, if any */
+extern DECLSPEC void SDLCALL SDL_SetModuleHandle(void *hInst);
+/** This can also be called, but is no longer necessary */
+extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, void *hInst);
+/** This can also be called, but is no longer necessary (SDL_Quit calls it) */
+extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+#endif
+/*@}*/
+
+/** @name From the SDL library code -- needed for registering QuickDraw on MacOS */
+/*@{*/
+#if defined(__MACOS__)
+
+#include "begin_code.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Forward declaration so we don't need to include QuickDraw.h */
+struct QDGlobals;
+
+/** This should be called from your main() function, if any */
+extern DECLSPEC void SDLCALL SDL_InitQuickDraw(struct QDGlobals *the_qd);
+
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+#endif
+/*@}*/
+
+#endif /* Need to redefine main()? */
+
+#endif /* _SDL_main_h */
diff --git a/code/SDL12/include/SDL_mouse.h b/code/SDL12/include/SDL_mouse.h
new file mode 100644
index 0000000..a573f04
--- /dev/null
+++ b/code/SDL12/include/SDL_mouse.h
@@ -0,0 +1,143 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/** @file SDL_mouse.h
+ * Include file for SDL mouse event handling
+ */
+
+#ifndef _SDL_mouse_h
+#define _SDL_mouse_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+#include "SDL_video.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct WMcursor WMcursor; /**< Implementation dependent */
+typedef struct SDL_Cursor {
+ SDL_Rect area; /**< The area of the mouse cursor */
+ Sint16 hot_x, hot_y; /**< The "tip" of the cursor */
+ Uint8 *data; /**< B/W cursor data */
+ Uint8 *mask; /**< B/W cursor mask */
+ Uint8 *save[2]; /**< Place to save cursor area */
+ WMcursor *wm_cursor; /**< Window-manager cursor */
+} SDL_Cursor;
+
+/* Function prototypes */
+/**
+ * Retrieve the current state of the mouse.
+ * The current button state is returned as a button bitmask, which can
+ * be tested using the SDL_BUTTON(X) macros, and x and y are set to the
+ * current mouse cursor position. You can pass NULL for either x or y.
+ */
+extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int *x, int *y);
+
+/**
+ * Retrieve the current state of the mouse.
+ * The current button state is returned as a button bitmask, which can
+ * be tested using the SDL_BUTTON(X) macros, and x and y are set to the
+ * mouse deltas since the last call to SDL_GetRelativeMouseState().
+ */
+extern DECLSPEC Uint8 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
+
+/**
+ * Set the position of the mouse cursor (generates a mouse motion event)
+ */
+extern DECLSPEC void SDLCALL SDL_WarpMouse(Uint16 x, Uint16 y);
+
+/**
+ * Create a cursor using the specified data and mask (in MSB format).
+ * The cursor width must be a multiple of 8 bits.
+ *
+ * The cursor is created in black and white according to the following:
+ * data mask resulting pixel on screen
+ * 0 1 White
+ * 1 1 Black
+ * 0 0 Transparent
+ * 1 0 Inverted color if possible, black if not.
+ *
+ * Cursors created with this function must be freed with SDL_FreeCursor().
+ */
+extern DECLSPEC SDL_Cursor * SDLCALL SDL_CreateCursor
+ (Uint8 *data, Uint8 *mask, int w, int h, int hot_x, int hot_y);
+
+/**
+ * Set the currently active cursor to the specified one.
+ * If the cursor is currently visible, the change will be immediately
+ * represented on the display.
+ */
+extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor *cursor);
+
+/**
+ * Returns the currently active cursor.
+ */
+extern DECLSPEC SDL_Cursor * SDLCALL SDL_GetCursor(void);
+
+/**
+ * Deallocates a cursor created with SDL_CreateCursor().
+ */
+extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor *cursor);
+
+/**
+ * Toggle whether or not the cursor is shown on the screen.
+ * The cursor start off displayed, but can be turned off.
+ * SDL_ShowCursor() returns 1 if the cursor was being displayed
+ * before the call, or 0 if it was not. You can query the current
+ * state by passing a 'toggle' value of -1.
+ */
+extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
+
+/*@{*/
+/** Used as a mask when testing buttons in buttonstate
+ * Button 1: Left mouse button
+ * Button 2: Middle mouse button
+ * Button 3: Right mouse button
+ * Button 4: Mouse wheel up (may also be a real button)
+ * Button 5: Mouse wheel down (may also be a real button)
+ */
+#define SDL_BUTTON(X) (1 << ((X)-1))
+#define SDL_BUTTON_LEFT 1
+#define SDL_BUTTON_MIDDLE 2
+#define SDL_BUTTON_RIGHT 3
+#define SDL_BUTTON_WHEELUP 4
+#define SDL_BUTTON_WHEELDOWN 5
+#define SDL_BUTTON_X1 6
+#define SDL_BUTTON_X2 7
+#define SDL_BUTTON_LMASK SDL_BUTTON(SDL_BUTTON_LEFT)
+#define SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE)
+#define SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT)
+#define SDL_BUTTON_X1MASK SDL_BUTTON(SDL_BUTTON_X1)
+#define SDL_BUTTON_X2MASK SDL_BUTTON(SDL_BUTTON_X2)
+/*@}*/
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_mouse_h */
diff --git a/code/SDL12/include/SDL_mutex.h b/code/SDL12/include/SDL_mutex.h
new file mode 100644
index 0000000..920971d
--- /dev/null
+++ b/code/SDL12/include/SDL_mutex.h
@@ -0,0 +1,177 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_mutex_h
+#define _SDL_mutex_h
+
+/** @file SDL_mutex.h
+ * Functions to provide thread synchronization primitives
+ *
+ * @note These are independent of the other SDL routines.
+ */
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Synchronization functions which can time out return this value
+ * if they time out.
+ */
+#define SDL_MUTEX_TIMEDOUT 1
+
+/** This is the timeout value which corresponds to never time out */
+#define SDL_MUTEX_MAXWAIT (~(Uint32)0)
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/** @name Mutex functions */ /*@{*/
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/** The SDL mutex structure, defined in SDL_mutex.c */
+struct SDL_mutex;
+typedef struct SDL_mutex SDL_mutex;
+
+/** Create a mutex, initialized unlocked */
+extern DECLSPEC SDL_mutex * SDLCALL SDL_CreateMutex(void);
+
+#define SDL_LockMutex(m) SDL_mutexP(m)
+/** Lock the mutex
+ * @return 0, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_mutexP(SDL_mutex *mutex);
+
+#define SDL_UnlockMutex(m) SDL_mutexV(m)
+/** Unlock the mutex
+ * @return 0, or -1 on error
+ *
+ * It is an error to unlock a mutex that has not been locked by
+ * the current thread, and doing so results in undefined behavior.
+ */
+extern DECLSPEC int SDLCALL SDL_mutexV(SDL_mutex *mutex);
+
+/** Destroy a mutex */
+extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex *mutex);
+
+/*@}*/
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/** @name Semaphore functions */ /*@{*/
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/** The SDL semaphore structure, defined in SDL_sem.c */
+struct SDL_semaphore;
+typedef struct SDL_semaphore SDL_sem;
+
+/** Create a semaphore, initialized with value, returns NULL on failure. */
+extern DECLSPEC SDL_sem * SDLCALL SDL_CreateSemaphore(Uint32 initial_value);
+
+/** Destroy a semaphore */
+extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem *sem);
+
+/**
+ * This function suspends the calling thread until the semaphore pointed
+ * to by sem has a positive count. It then atomically decreases the semaphore
+ * count.
+ */
+extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem *sem);
+
+/** Non-blocking variant of SDL_SemWait().
+ * @return 0 if the wait succeeds,
+ * SDL_MUTEX_TIMEDOUT if the wait would block, and -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem *sem);
+
+/** Variant of SDL_SemWait() with a timeout in milliseconds, returns 0 if
+ * the wait succeeds, SDL_MUTEX_TIMEDOUT if the wait does not succeed in
+ * the allotted time, and -1 on error.
+ *
+ * On some platforms this function is implemented by looping with a delay
+ * of 1 ms, and so should be avoided if possible.
+ */
+extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem *sem, Uint32 ms);
+
+/** Atomically increases the semaphore's count (not blocking).
+ * @return 0, or -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem *sem);
+
+/** Returns the current count of the semaphore */
+extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem *sem);
+
+/*@}*/
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/** @name Condition_variable_functions */ /*@{*/
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*@{*/
+/** The SDL condition variable structure, defined in SDL_cond.c */
+struct SDL_cond;
+typedef struct SDL_cond SDL_cond;
+/*@}*/
+
+/** Create a condition variable */
+extern DECLSPEC SDL_cond * SDLCALL SDL_CreateCond(void);
+
+/** Destroy a condition variable */
+extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond *cond);
+
+/** Restart one of the threads that are waiting on the condition variable,
+ * @return 0 or -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond *cond);
+
+/** Restart all threads that are waiting on the condition variable,
+ * @return 0 or -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond *cond);
+
+/** Wait on the condition variable, unlocking the provided mutex.
+ * The mutex must be locked before entering this function!
+ * The mutex is re-locked once the condition variable is signaled.
+ * @return 0 when it is signaled, or -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond *cond, SDL_mutex *mut);
+
+/** Waits for at most 'ms' milliseconds, and returns 0 if the condition
+ * variable is signaled, SDL_MUTEX_TIMEDOUT if the condition is not
+ * signaled in the allotted time, and -1 on error.
+ * On some platforms this function is implemented by looping with a delay
+ * of 1 ms, and so should be avoided if possible.
+ */
+extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms);
+
+/*@}*/
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_mutex_h */
+
diff --git a/code/SDL12/include/SDL_name.h b/code/SDL12/include/SDL_name.h
new file mode 100644
index 0000000..511619a
--- /dev/null
+++ b/code/SDL12/include/SDL_name.h
@@ -0,0 +1,11 @@
+
+#ifndef _SDLname_h_
+#define _SDLname_h_
+
+#if defined(__STDC__) || defined(__cplusplus)
+#define NeedFunctionPrototypes 1
+#endif
+
+#define SDL_NAME(X) SDL_##X
+
+#endif /* _SDLname_h_ */
diff --git a/code/SDL12/include/SDL_opengl.h b/code/SDL12/include/SDL_opengl.h
new file mode 100644
index 0000000..c479a3a
--- /dev/null
+++ b/code/SDL12/include/SDL_opengl.h
@@ -0,0 +1,6556 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/** @file SDL_opengl.h
+ * This is a simple file to encapsulate the OpenGL API headers
+ */
+
+#include "SDL_config.h"
+
+#ifdef __WIN32__
+#define WIN32_LEAN_AND_MEAN
+#ifndef NOMINMAX
+#define NOMINMAX /* Don't defined min() and max() */
+#endif
+#include <windows.h>
+#endif
+#ifndef NO_SDL_GLEXT
+#define __glext_h_ /* Don't let gl.h include glext.h */
+#endif
+#if defined(__MACOSX__)
+#include <OpenGL/gl.h> /* Header File For The OpenGL Library */
+#include <OpenGL/glu.h> /* Header File For The GLU Library */
+#elif defined(__MACOS__)
+#include <gl.h> /* Header File For The OpenGL Library */
+#include <glu.h> /* Header File For The GLU Library */
+#else
+#include <GL/gl.h> /* Header File For The OpenGL Library */
+#include <GL/glu.h> /* Header File For The GLU Library */
+#endif
+#ifndef NO_SDL_GLEXT
+#undef __glext_h_
+#endif
+
+/** @name GLext.h
+ * This file taken from "GLext.h" from the Jeff Molofee OpenGL tutorials.
+ * It is included here because glext.h is not available on some systems.
+ * If you don't want this version included, simply define "NO_SDL_GLEXT"
+ */
+/*@{*/
+#ifndef NO_SDL_GLEXT
+#if !defined(__glext_h_) && !defined(GL_GLEXT_LEGACY)
+#define __glext_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** License Applicability. Except to the extent portions of this file are
+** made subject to an alternative license as permitted in the SGI Free
+** Software License B, Version 1.1 (the "License"), the contents of this
+** file are subject only to the provisions of the License. You may not use
+** this file except in compliance with the License. You may obtain a copy
+** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
+** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
+**
+** http://oss.sgi.com/projects/FreeB
+**
+** Note that, as provided in the License, the Software is distributed on an
+** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
+** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
+** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
+** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
+**
+** Original Code. The Original Code is: OpenGL Sample Implementation,
+** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
+** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc.
+** Copyright in any portions created by third parties is as indicated
+** elsewhere herein. All Rights Reserved.
+**
+** Additional Notice Provisions: This software was created using the
+** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
+** not been independently verified as being compliant with the OpenGL(R)
+** version 1.2.1 Specification.
+*/
+
+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
+#define WIN32_LEAN_AND_MEAN 1
+#include <windows.h>
+#endif
+
+#ifndef APIENTRY
+#define APIENTRY
+#endif
+#ifndef APIENTRYP
+#define APIENTRYP APIENTRY *
+#endif
+#ifndef GLAPI
+#define GLAPI extern
+#endif
+
+/*************************************************************/
+
+/* Header file version number, required by OpenGL ABI for Linux */
+/* glext.h last updated 2005/06/20 */
+/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
+#define GL_GLEXT_VERSION 29
+
+#ifndef GL_VERSION_1_2
+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
+#define GL_RESCALE_NORMAL 0x803A
+#define GL_TEXTURE_BINDING_3D 0x806A
+#define GL_PACK_SKIP_IMAGES 0x806B
+#define GL_PACK_IMAGE_HEIGHT 0x806C
+#define GL_UNPACK_SKIP_IMAGES 0x806D
+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
+#define GL_TEXTURE_3D 0x806F
+#define GL_PROXY_TEXTURE_3D 0x8070
+#define GL_TEXTURE_DEPTH 0x8071
+#define GL_TEXTURE_WRAP_R 0x8072
+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
+#define GL_BGR 0x80E0
+#define GL_BGRA 0x80E1
+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
+#define GL_MAX_ELEMENTS_INDICES 0x80E9
+#define GL_CLAMP_TO_EDGE 0x812F
+#define GL_TEXTURE_MIN_LOD 0x813A
+#define GL_TEXTURE_MAX_LOD 0x813B
+#define GL_TEXTURE_BASE_LEVEL 0x813C
+#define GL_TEXTURE_MAX_LEVEL 0x813D
+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
+#define GL_SINGLE_COLOR 0x81F9
+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
+#endif
+
+#ifndef GL_ARB_imaging
+#define GL_CONSTANT_COLOR 0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
+#define GL_CONSTANT_ALPHA 0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
+#define GL_BLEND_COLOR 0x8005
+#define GL_FUNC_ADD 0x8006
+#define GL_MIN 0x8007
+#define GL_MAX 0x8008
+#define GL_BLEND_EQUATION 0x8009
+#define GL_FUNC_SUBTRACT 0x800A
+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
+#define GL_CONVOLUTION_1D 0x8010
+#define GL_CONVOLUTION_2D 0x8011
+#define GL_SEPARABLE_2D 0x8012
+#define GL_CONVOLUTION_BORDER_MODE 0x8013
+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
+#define GL_REDUCE 0x8016
+#define GL_CONVOLUTION_FORMAT 0x8017
+#define GL_CONVOLUTION_WIDTH 0x8018
+#define GL_CONVOLUTION_HEIGHT 0x8019
+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
+#define GL_HISTOGRAM 0x8024
+#define GL_PROXY_HISTOGRAM 0x8025
+#define GL_HISTOGRAM_WIDTH 0x8026
+#define GL_HISTOGRAM_FORMAT 0x8027
+#define GL_HISTOGRAM_RED_SIZE 0x8028
+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
+#define GL_HISTOGRAM_SINK 0x802D
+#define GL_MINMAX 0x802E
+#define GL_MINMAX_FORMAT 0x802F
+#define GL_MINMAX_SINK 0x8030
+#define GL_TABLE_TOO_LARGE 0x8031
+#define GL_COLOR_MATRIX 0x80B1
+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
+#define GL_COLOR_TABLE 0x80D0
+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
+#define GL_PROXY_COLOR_TABLE 0x80D3
+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
+#define GL_COLOR_TABLE_SCALE 0x80D6
+#define GL_COLOR_TABLE_BIAS 0x80D7
+#define GL_COLOR_TABLE_FORMAT 0x80D8
+#define GL_COLOR_TABLE_WIDTH 0x80D9
+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
+#define GL_CONSTANT_BORDER 0x8151
+#define GL_REPLICATE_BORDER 0x8153
+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
+#endif
+
+#ifndef GL_VERSION_1_3
+#define GL_TEXTURE0 0x84C0
+#define GL_TEXTURE1 0x84C1
+#define GL_TEXTURE2 0x84C2
+#define GL_TEXTURE3 0x84C3
+#define GL_TEXTURE4 0x84C4
+#define GL_TEXTURE5 0x84C5
+#define GL_TEXTURE6 0x84C6
+#define GL_TEXTURE7 0x84C7
+#define GL_TEXTURE8 0x84C8
+#define GL_TEXTURE9 0x84C9
+#define GL_TEXTURE10 0x84CA
+#define GL_TEXTURE11 0x84CB
+#define GL_TEXTURE12 0x84CC
+#define GL_TEXTURE13 0x84CD
+#define GL_TEXTURE14 0x84CE
+#define GL_TEXTURE15 0x84CF
+#define GL_TEXTURE16 0x84D0
+#define GL_TEXTURE17 0x84D1
+#define GL_TEXTURE18 0x84D2
+#define GL_TEXTURE19 0x84D3
+#define GL_TEXTURE20 0x84D4
+#define GL_TEXTURE21 0x84D5
+#define GL_TEXTURE22 0x84D6
+#define GL_TEXTURE23 0x84D7
+#define GL_TEXTURE24 0x84D8
+#define GL_TEXTURE25 0x84D9
+#define GL_TEXTURE26 0x84DA
+#define GL_TEXTURE27 0x84DB
+#define GL_TEXTURE28 0x84DC
+#define GL_TEXTURE29 0x84DD
+#define GL_TEXTURE30 0x84DE
+#define GL_TEXTURE31 0x84DF
+#define GL_ACTIVE_TEXTURE 0x84E0
+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
+#define GL_MAX_TEXTURE_UNITS 0x84E2
+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
+#define GL_MULTISAMPLE 0x809D
+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
+#define GL_SAMPLE_COVERAGE 0x80A0
+#define GL_SAMPLE_BUFFERS 0x80A8
+#define GL_SAMPLES 0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
+#define GL_MULTISAMPLE_BIT 0x20000000
+#define GL_NORMAL_MAP 0x8511
+#define GL_REFLECTION_MAP 0x8512
+#define GL_TEXTURE_CUBE_MAP 0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
+#define GL_COMPRESSED_ALPHA 0x84E9
+#define GL_COMPRESSED_LUMINANCE 0x84EA
+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
+#define GL_COMPRESSED_INTENSITY 0x84EC
+#define GL_COMPRESSED_RGB 0x84ED
+#define GL_COMPRESSED_RGBA 0x84EE
+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
+#define GL_TEXTURE_COMPRESSED 0x86A1
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
+#define GL_CLAMP_TO_BORDER 0x812D
+#define GL_COMBINE 0x8570
+#define GL_COMBINE_RGB 0x8571
+#define GL_COMBINE_ALPHA 0x8572
+#define GL_SOURCE0_RGB 0x8580
+#define GL_SOURCE1_RGB 0x8581
+#define GL_SOURCE2_RGB 0x8582
+#define GL_SOURCE0_ALPHA 0x8588
+#define GL_SOURCE1_ALPHA 0x8589
+#define GL_SOURCE2_ALPHA 0x858A
+#define GL_OPERAND0_RGB 0x8590
+#define GL_OPERAND1_RGB 0x8591
+#define GL_OPERAND2_RGB 0x8592
+#define GL_OPERAND0_ALPHA 0x8598
+#define GL_OPERAND1_ALPHA 0x8599
+#define GL_OPERAND2_ALPHA 0x859A
+#define GL_RGB_SCALE 0x8573
+#define GL_ADD_SIGNED 0x8574
+#define GL_INTERPOLATE 0x8575
+#define GL_SUBTRACT 0x84E7
+#define GL_CONSTANT 0x8576
+#define GL_PRIMARY_COLOR 0x8577
+#define GL_PREVIOUS 0x8578
+#define GL_DOT3_RGB 0x86AE
+#define GL_DOT3_RGBA 0x86AF
+#endif
+
+#ifndef GL_VERSION_1_4
+#define GL_BLEND_DST_RGB 0x80C8
+#define GL_BLEND_SRC_RGB 0x80C9
+#define GL_BLEND_DST_ALPHA 0x80CA
+#define GL_BLEND_SRC_ALPHA 0x80CB
+#define GL_POINT_SIZE_MIN 0x8126
+#define GL_POINT_SIZE_MAX 0x8127
+#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
+#define GL_POINT_DISTANCE_ATTENUATION 0x8129
+#define GL_GENERATE_MIPMAP 0x8191
+#define GL_GENERATE_MIPMAP_HINT 0x8192
+#define GL_DEPTH_COMPONENT16 0x81A5
+#define GL_DEPTH_COMPONENT24 0x81A6
+#define GL_DEPTH_COMPONENT32 0x81A7
+#define GL_MIRRORED_REPEAT 0x8370
+#define GL_FOG_COORDINATE_SOURCE 0x8450
+#define GL_FOG_COORDINATE 0x8451
+#define GL_FRAGMENT_DEPTH 0x8452
+#define GL_CURRENT_FOG_COORDINATE 0x8453
+#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
+#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
+#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
+#define GL_FOG_COORDINATE_ARRAY 0x8457
+#define GL_COLOR_SUM 0x8458
+#define GL_CURRENT_SECONDARY_COLOR 0x8459
+#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
+#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
+#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
+#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
+#define GL_SECONDARY_COLOR_ARRAY 0x845E
+#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
+#define GL_TEXTURE_FILTER_CONTROL 0x8500
+#define GL_TEXTURE_LOD_BIAS 0x8501
+#define GL_INCR_WRAP 0x8507
+#define GL_DECR_WRAP 0x8508
+#define GL_TEXTURE_DEPTH_SIZE 0x884A
+#define GL_DEPTH_TEXTURE_MODE 0x884B
+#define GL_TEXTURE_COMPARE_MODE 0x884C
+#define GL_TEXTURE_COMPARE_FUNC 0x884D
+#define GL_COMPARE_R_TO_TEXTURE 0x884E
+#endif
+
+#ifndef GL_VERSION_1_5
+#define GL_BUFFER_SIZE 0x8764
+#define GL_BUFFER_USAGE 0x8765
+#define GL_QUERY_COUNTER_BITS 0x8864
+#define GL_CURRENT_QUERY 0x8865
+#define GL_QUERY_RESULT 0x8866
+#define GL_QUERY_RESULT_AVAILABLE 0x8867
+#define GL_ARRAY_BUFFER 0x8892
+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
+#define GL_ARRAY_BUFFER_BINDING 0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
+#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
+#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
+#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
+#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
+#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
+#define GL_READ_ONLY 0x88B8
+#define GL_WRITE_ONLY 0x88B9
+#define GL_READ_WRITE 0x88BA
+#define GL_BUFFER_ACCESS 0x88BB
+#define GL_BUFFER_MAPPED 0x88BC
+#define GL_BUFFER_MAP_POINTER 0x88BD
+#define GL_STREAM_DRAW 0x88E0
+#define GL_STREAM_READ 0x88E1
+#define GL_STREAM_COPY 0x88E2
+#define GL_STATIC_DRAW 0x88E4
+#define GL_STATIC_READ 0x88E5
+#define GL_STATIC_COPY 0x88E6
+#define GL_DYNAMIC_DRAW 0x88E8
+#define GL_DYNAMIC_READ 0x88E9
+#define GL_DYNAMIC_COPY 0x88EA
+#define GL_SAMPLES_PASSED 0x8914
+#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE
+#define GL_FOG_COORD GL_FOG_COORDINATE
+#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE
+#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE
+#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE
+#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER
+#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY
+#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING
+#define GL_SRC0_RGB GL_SOURCE0_RGB
+#define GL_SRC1_RGB GL_SOURCE1_RGB
+#define GL_SRC2_RGB GL_SOURCE2_RGB
+#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA
+#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA
+#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA
+#endif
+
+#ifndef GL_VERSION_2_0
+#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
+#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
+#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
+#define GL_STENCIL_BACK_FUNC 0x8800
+#define GL_STENCIL_BACK_FAIL 0x8801
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
+#define GL_MAX_DRAW_BUFFERS 0x8824
+#define GL_DRAW_BUFFER0 0x8825
+#define GL_DRAW_BUFFER1 0x8826
+#define GL_DRAW_BUFFER2 0x8827
+#define GL_DRAW_BUFFER3 0x8828
+#define GL_DRAW_BUFFER4 0x8829
+#define GL_DRAW_BUFFER5 0x882A
+#define GL_DRAW_BUFFER6 0x882B
+#define GL_DRAW_BUFFER7 0x882C
+#define GL_DRAW_BUFFER8 0x882D
+#define GL_DRAW_BUFFER9 0x882E
+#define GL_DRAW_BUFFER10 0x882F
+#define GL_DRAW_BUFFER11 0x8830
+#define GL_DRAW_BUFFER12 0x8831
+#define GL_DRAW_BUFFER13 0x8832
+#define GL_DRAW_BUFFER14 0x8833
+#define GL_DRAW_BUFFER15 0x8834
+#define GL_BLEND_EQUATION_ALPHA 0x883D
+#define GL_POINT_SPRITE 0x8861
+#define GL_COORD_REPLACE 0x8862
+#define GL_MAX_VERTEX_ATTRIBS 0x8869
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
+#define GL_MAX_TEXTURE_COORDS 0x8871
+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
+#define GL_FRAGMENT_SHADER 0x8B30
+#define GL_VERTEX_SHADER 0x8B31
+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
+#define GL_MAX_VARYING_FLOATS 0x8B4B
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
+#define GL_SHADER_TYPE 0x8B4F
+#define GL_FLOAT_VEC2 0x8B50
+#define GL_FLOAT_VEC3 0x8B51
+#define GL_FLOAT_VEC4 0x8B52
+#define GL_INT_VEC2 0x8B53
+#define GL_INT_VEC3 0x8B54
+#define GL_INT_VEC4 0x8B55
+#define GL_BOOL 0x8B56
+#define GL_BOOL_VEC2 0x8B57
+#define GL_BOOL_VEC3 0x8B58
+#define GL_BOOL_VEC4 0x8B59
+#define GL_FLOAT_MAT2 0x8B5A
+#define GL_FLOAT_MAT3 0x8B5B
+#define GL_FLOAT_MAT4 0x8B5C
+#define GL_SAMPLER_1D 0x8B5D
+#define GL_SAMPLER_2D 0x8B5E
+#define GL_SAMPLER_3D 0x8B5F
+#define GL_SAMPLER_CUBE 0x8B60
+#define GL_SAMPLER_1D_SHADOW 0x8B61
+#define GL_SAMPLER_2D_SHADOW 0x8B62
+#define GL_DELETE_STATUS 0x8B80
+#define GL_COMPILE_STATUS 0x8B81
+#define GL_LINK_STATUS 0x8B82
+#define GL_VALIDATE_STATUS 0x8B83
+#define GL_INFO_LOG_LENGTH 0x8B84
+#define GL_ATTACHED_SHADERS 0x8B85
+#define GL_ACTIVE_UNIFORMS 0x8B86
+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
+#define GL_SHADER_SOURCE_LENGTH 0x8B88
+#define GL_ACTIVE_ATTRIBUTES 0x8B89
+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
+#define GL_CURRENT_PROGRAM 0x8B8D
+#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
+#define GL_LOWER_LEFT 0x8CA1
+#define GL_UPPER_LEFT 0x8CA2
+#define GL_STENCIL_BACK_REF 0x8CA3
+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
+#endif
+
+#ifndef GL_ARB_multitexture
+#define GL_TEXTURE0_ARB 0x84C0
+#define GL_TEXTURE1_ARB 0x84C1
+#define GL_TEXTURE2_ARB 0x84C2
+#define GL_TEXTURE3_ARB 0x84C3
+#define GL_TEXTURE4_ARB 0x84C4
+#define GL_TEXTURE5_ARB 0x84C5
+#define GL_TEXTURE6_ARB 0x84C6
+#define GL_TEXTURE7_ARB 0x84C7
+#define GL_TEXTURE8_ARB 0x84C8
+#define GL_TEXTURE9_ARB 0x84C9
+#define GL_TEXTURE10_ARB 0x84CA
+#define GL_TEXTURE11_ARB 0x84CB
+#define GL_TEXTURE12_ARB 0x84CC
+#define GL_TEXTURE13_ARB 0x84CD
+#define GL_TEXTURE14_ARB 0x84CE
+#define GL_TEXTURE15_ARB 0x84CF
+#define GL_TEXTURE16_ARB 0x84D0
+#define GL_TEXTURE17_ARB 0x84D1
+#define GL_TEXTURE18_ARB 0x84D2
+#define GL_TEXTURE19_ARB 0x84D3
+#define GL_TEXTURE20_ARB 0x84D4
+#define GL_TEXTURE21_ARB 0x84D5
+#define GL_TEXTURE22_ARB 0x84D6
+#define GL_TEXTURE23_ARB 0x84D7
+#define GL_TEXTURE24_ARB 0x84D8
+#define GL_TEXTURE25_ARB 0x84D9
+#define GL_TEXTURE26_ARB 0x84DA
+#define GL_TEXTURE27_ARB 0x84DB
+#define GL_TEXTURE28_ARB 0x84DC
+#define GL_TEXTURE29_ARB 0x84DD
+#define GL_TEXTURE30_ARB 0x84DE
+#define GL_TEXTURE31_ARB 0x84DF
+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
+#endif
+
+#ifndef GL_ARB_transpose_matrix
+#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
+#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
+#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
+#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
+#endif
+
+#ifndef GL_ARB_multisample
+#define GL_MULTISAMPLE_ARB 0x809D
+#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
+#define GL_SAMPLE_COVERAGE_ARB 0x80A0
+#define GL_SAMPLE_BUFFERS_ARB 0x80A8
+#define GL_SAMPLES_ARB 0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
+#define GL_MULTISAMPLE_BIT_ARB 0x20000000
+#endif
+
+#ifndef GL_ARB_texture_env_add
+#endif
+
+#ifndef GL_ARB_texture_cube_map
+#define GL_NORMAL_MAP_ARB 0x8511
+#define GL_REFLECTION_MAP_ARB 0x8512
+#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
+#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
+#endif