diff options
author | Kent Mein <mein@cs.umn.edu> | 2002-11-29 20:07:58 +0300 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2002-11-29 20:07:58 +0300 |
commit | 651fa32eaa054e27d3d4ba8afd0f3ce56ad02f07 (patch) | |
tree | 87885b68d7d01ca0e5808a3668ca48daf3db42b8 | |
parent | 3fe6959360784bcf753f357d5aa82b331c5acf0f (diff) |
Bunch of small fixes emailed to me from phaethon
Kent
--
mein@cs.umn.edu
-rw-r--r-- | intern/python/freeze/makemakefile.py | 7 | ||||
-rw-r--r-- | source/blender/bpython/intern/api.h | 2 | ||||
-rw-r--r-- | source/blender/src/cre/license_key.c | 7 | ||||
-rw-r--r-- | source/blender/src/editsound.c | 26 | ||||
-rw-r--r-- | source/blender/src/space.c | 4 |
5 files changed, 39 insertions, 7 deletions
diff --git a/intern/python/freeze/makemakefile.py b/intern/python/freeze/makemakefile.py index 64a98992ae8..ab57b08d01e 100644 --- a/intern/python/freeze/makemakefile.py +++ b/intern/python/freeze/makemakefile.py @@ -25,7 +25,7 @@ def makemakefile(outfp, makevars, files, target): for key in keys: outfp.write("%s=%s\n" % (key, makevars[key])) - outfp.write("\n\ninclude nan_definitions.mk\n") +# outfp.write("\n\ninclude nan_definitions.mk\n") outfp.write("\nall: %s\n\n" % libtarget) deps = [] @@ -50,8 +50,9 @@ def makemakefile(outfp, makevars, files, target): # libfiles.remove('M___main__.o') # don't link with __main__ outfp.write("\n%s: $(OBJS)\n" % (libtarget)) - outfp.write("\t$(AR) ruv %s%s $(OBJS)\n" % - ("$(OCGDIR)/blender/bpython/$(DEBUG_DIR)", targetlib)) +# outfp.write("\t$(AR) ruv %s%s $(OBJS)\n" % +# ("$(OCGDIR)/blender/bpython/$(DEBUG_DIR)", targetlib)) + outfp.write("\t$(AR) ruv %s $(OBJS)\n" % targetlib) outfp.write("\n%s: %s $(OBJS)\n" % (target, mainfile)) outfp.write("\t$(CC) %s %s -o %s $(LDLAST)\n" % diff --git a/source/blender/bpython/intern/api.h b/source/blender/bpython/intern/api.h index 2efcc7f0c0f..8c2489c6f07 100644 --- a/source/blender/bpython/intern/api.h +++ b/source/blender/bpython/intern/api.h @@ -76,9 +76,11 @@ MODNAME(BLENDERMODULE) -> "_Blender" #define MODNAME(x) _MODNAME(x) // module configuration -- TODO: this should be set later from the Makefile... +/* commented out by mein@cs.umn.edu default is non static now :) #if defined(__FreeBSD__) || defined(__linux__) || defined (__sgi) || defined(__sparc) || defined(__sparc__) #define STATIC_TEXTTOOLS 1 #endif +*/ #define USE_NMESH 1 // still use NMesh structure for <mesh object>.data diff --git a/source/blender/src/cre/license_key.c b/source/blender/src/cre/license_key.c index 5d066f4edc1..f6a56d0f14e 100644 --- a/source/blender/src/cre/license_key.c +++ b/source/blender/src/cre/license_key.c @@ -45,8 +45,8 @@ #include <config.h> #endif -int LICENSE_KEY_VALID = FALSE; -int I_AM_PUBLISHER = FALSE; +int LICENSE_KEY_VALID = TRUE; +int I_AM_PUBLISHER = TRUE; static UserStruct User; @@ -57,6 +57,8 @@ static UserStruct User; #include "compile.h" /* to give us PyCodeObject */ #include "eval.h" /* prototype for PyEval_EvalCode */ +#include "BPY_extern.h" +#include "IMB_imbuf.h" Fptr g_functab[PYKEY_TABLEN]; Fptr g_ptrtab[PYKEY_TABLEN]; @@ -188,6 +190,7 @@ void create_key_name(char * keyname) void checkhome() { initprot(); // initialize module and function tables + IMB_fp_png_encode = IMB_png_encode; } void SHOW_LICENSE_KEY(void) diff --git a/source/blender/src/editsound.c b/source/blender/src/editsound.c index 710800deaa7..219c52010c4 100644 --- a/source/blender/src/editsound.c +++ b/source/blender/src/editsound.c @@ -174,6 +174,7 @@ void winqreadsoundspace(unsigned short event, short val, char ascii) void sound_initialize_sounds(void) { +#if GAMEBLENDER == 1 bSound* sound; /* clear the soundscene */ @@ -187,6 +188,7 @@ void sound_initialize_sounds(void) sound_sample_is_null(sound); sound = (bSound *) sound->id.next; } +#endif } @@ -194,6 +196,7 @@ void sound_initialize_sounds(void) bSound* sound_make_copy(bSound* originalsound) { bSound* sound = NULL; +#if GAMEBLENDER == 1 char name[160]; int len; @@ -236,6 +239,7 @@ bSound* sound_make_copy(bSound* originalsound) sound->flags &= ~SOUND_FLAGS_3D; } +#endif return sound; } @@ -429,6 +433,7 @@ void sound_read_wav_data(bSound* sound, PackedFile* pf) int sound_get_filetype_from_header(bSound* sound, PackedFile* pf) { int i, filetype = SAMPLE_INVALID; +#if GAMEBLENDER == 1 char buffer[25]; short shortbuf; @@ -507,6 +512,7 @@ int sound_get_filetype_from_header(bSound* sound, PackedFile* pf) if (G.f & G_DEBUG) printf("Unsupported sound format: %s\n", sound->name); } +#endif return filetype; } @@ -571,6 +577,7 @@ int check_filetype(bSound* sound, PackedFile* pf) int sound_load_sample(bSound* sound) { int result = FALSE; +#if GAMEBLENDER == 1 PackedFile* pf; int freePF = FALSE; int buffer = -1; @@ -648,6 +655,8 @@ int sound_load_sample(bSound* sound) result = TRUE; } +#endif + return result; } @@ -656,6 +665,7 @@ int sound_load_sample(bSound* sound) bSound* sound_new_sound(char* name) { bSound *sound = NULL; +#if GAMEBLENDER == 1 int len, file; char str[FILE_MAXDIR+FILE_MAXFILE]; @@ -700,6 +710,7 @@ bSound* sound_new_sound(char* name) } } +#endif return (sound); } @@ -708,7 +719,7 @@ bSound* sound_new_sound(char* name) int sound_set_sample(bSound *sound, bSample *sample) { int result = TRUE; - +#if GAMEBLENDER == 1 /* decrease the usernumber for this sample */ if (sound->sample) sound->sample->id.us--; @@ -744,6 +755,9 @@ int sound_set_sample(bSound *sound, bSample *sample) } } } + +#endif + return result; } @@ -847,22 +861,27 @@ int sound_sample_is_null(bSound* sound) void sound_stop_all_sounds(void) { +#if GAMEBLENDER == 1 SND_StopAllSounds(ghSoundScene); SND_Proceed(ghAudioDeviceInterface, ghSoundScene); +#endif } void sound_end_all_sounds(void) { +#if GAMEBLENDER == 1 sound_stop_all_sounds(); SND_RemoveAllSounds(ghSoundScene); +#endif } void sound_play_sound(bSound* sound) { +#if GAMEBLENDER == 1 /* first check if we want sound or not */ SND_IsPlaybackWanted(ghSoundScene); @@ -947,6 +966,7 @@ void sound_play_sound(bSound* sound) } } } +#endif } @@ -982,6 +1002,7 @@ static void sound_init_listener(void) void sound_init_audio(void) { +#if GAMEBLENDER == 1 int noaudio; SYS_SystemHandle hSystem = NULL; ghAudioDeviceInterface = NULL; @@ -996,6 +1017,7 @@ void sound_init_audio(void) ghSoundScene = SND_CreateScene(ghAudioDeviceInterface); sound_init_listener(); +#endif } @@ -1016,7 +1038,9 @@ static void sound_exit_listener(void) void sound_exit_audio(void) { +#if GAMEBLENDER == 1 SND_DeleteScene(ghSoundScene); SND_ReleaseDevice(); sound_exit_listener(); +#endif } diff --git a/source/blender/src/space.c b/source/blender/src/space.c index c52dca1e70b..64c79f0924c 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -134,7 +134,7 @@ #include "TPT_DependKludge.h" #ifdef NAN_TPT #include "BSE_trans_types.h" -#include "../img/IMG_Api.h" +#include "IMG_Api.h" #endif /* NAN_TPT */ #include "SYS_System.h" /* for the user def menu ... should move elsewhere. */ @@ -321,6 +321,7 @@ static void restore_all_scene_cfra(LinkNode *storelist) { void start_game(void) { +#if GAMEBLENDER == 1 Scene *sc, *startscene = G.scene; LinkNode *scene_cfra_store; @@ -378,6 +379,7 @@ void start_game(void) allqueue(REDRAWACTION, 0); allspace(REMAKEIPO, 0); allqueue(REDRAWIPO, 0); +#endif } void changeview3d() |