Bunch of small fixes emailed to me from phaethon
Kent -- mein@cs.umn.edu
This commit is contained in:
parent
3fe6959360
commit
651fa32eaa
|
@ -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" %
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue