repo_name
stringlengths 5
122
| path
stringlengths 3
232
| text
stringlengths 6
1.05M
|
|---|---|---|
Nikhil-Xavier-DS/Self_Driving_Car----Sensor-Fusion-Localization---Control
|
Self_Driving_Car----PID-Controller/src/PID.h
|
#ifndef PID_H
#define PID_H
// Program by <NAME>
// Program written on 14th February 2018
class PID
{
public:
double p_error;
double i_error;
double d_error;
double Kp;
double Ki;
double Kd;
PID();
virtual ~PID();
void Init(double Kp, double Ki, double Kd);
void UpdateError(double cte);
double TotalError();
};
#endif
|
JinmingDev/ScreenRecordTest
|
lupingdashi/app/src/main/cpp/include/config.h
|
<reponame>JinmingDev/ScreenRecordTest
//
// Created by Administrator on 2016/11/1.
//
#ifndef EASYPLAYER_CONFIG_H
#define EASYPLAYER_CONFIG_H
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
#define FFMPEG_CONFIGURATION "--enable-gpl"
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define ARCH_ALPHA 0
#define ARCH_ARM 0
#define ARCH_AVR32 0
#define ARCH_AVR32_AP 0
#define ARCH_AVR32_UC 0
#define ARCH_BFIN 0
#define ARCH_IA64 0
#define ARCH_M68K 0
#define ARCH_MIPS 0
#define ARCH_MIPS64 0
#define ARCH_PARISC 0
#define ARCH_PPC 0
#define ARCH_PPC64 0
#define ARCH_S390 0
#define ARCH_SH4 0
#define ARCH_SPARC 0
#define ARCH_SPARC64 0
#define ARCH_X86 1
#define ARCH_X86_32 1
#define ARCH_X86_64 0
#define HAVE_ALTIVEC 0
#define HAVE_AMD3DNOW 1
#define HAVE_AMD3DNOWEXT 1
#define HAVE_ARMV5TE 0
#define HAVE_ARMV6 0
#define HAVE_ARMV6T2 0
#define HAVE_ARMVFP 0
#define HAVE_IWMMXT 0
#define HAVE_MMI 0
#define HAVE_MMX 1
#define HAVE_MMX2 1
#define HAVE_NEON 0
#define HAVE_PPC4XX 0
#define HAVE_SSE 1
#define HAVE_SSSE3 1
#define HAVE_VIS 0
#define HAVE_BEOSTHREADS 0
#define HAVE_OS2THREADS 0
#define HAVE_PTHREADS 0
#define HAVE_W32THREADS 0
#define HAVE_ALSA_ASOUNDLIB_H 0
#define HAVE_ALTIVEC_H 0
//#define HAVE_ARPA_INET_H 1
#define HAVE_ATTRIBUTE_PACKED 1
#define HAVE_BIGENDIAN 0
#define HAVE_BSWAP 1
#define HAVE_CLOSESOCKET 0
#define HAVE_CMOV 0
#define HAVE_CONIO_H 0
#define HAVE_DCBZL 0
#define HAVE_DEV_BKTR_IOCTL_BT848_H 0
#define HAVE_DEV_BKTR_IOCTL_METEOR_H 0
#define HAVE_DEV_IC_BT8XX_H 0
#define HAVE_DEV_VIDEO_METEOR_IOCTL_METEOR_H 0
#define HAVE_DEV_VIDEO_BKTR_IOCTL_BT848_H 0
#define HAVE_DLFCN_H 1
#define HAVE_DLOPEN 1
#define HAVE_DOS_PATHS 0
#define HAVE_EBP_AVAILABLE 1
#define HAVE_EBX_AVAILABLE 1
#define HAVE_FAST_64BIT 0
#define HAVE_FAST_CMOV 0
#define HAVE_FAST_UNALIGNED 1
#define HAVE_FORK 1
#define HAVE_GETHRTIME 0
#define HAVE_GETPROCESSTIMES 0
//#define HAVE_GETRUSAGE 1
#define HAVE_INET_ATON 1
#define HAVE_INLINE_ASM 1
#define HAVE_ISATTY 1
#define HAVE_LDBRX 0
#define HAVE_LIBDC1394_1 0
#define HAVE_LIBDC1394_2 0
#define HAVE_LLRINT 1
#define HAVE_LOG2 1
#define HAVE_LOONGSON 0
#define HAVE_LRINT 1
#define HAVE_LRINTF 1
#define HAVE_LZO1X_999_COMPRESS 0
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
#define HAVE_MALLOC_H 1
#define HAVE_MEMALIGN 1
#define HAVE_MKSTEMP 1
#define HAVE_PLD 0
#define HAVE_POSIX_MEMALIGN 1
#define HAVE_ROUND 1
#define HAVE_ROUNDF 1
#define HAVE_SDL 0
#define HAVE_SDL_VIDEO_SIZE 1
#define HAVE_SETMODE 0
#define HAVE_SOCKLEN_T 1
#define HAVE_SOUNDCARD_H 0
//#define HAVE_POLL_H 1
#define HAVE_SYS_MMAN_H 1
//#define HAVE_SYS_RESOURCE_H 1
//#define HAVE_SYS_SELECT_H 1
#define HAVE_SYS_SOUNDCARD_H 1
#define HAVE_SYS_VIDEOIO_H 0
#define HAVE_TEN_OPERANDS 1
//#define HAVE_TERMIOS_H 1
#define HAVE_THREADS 0
#define HAVE_TRUNCF 1
#define HAVE_VFP_ARGS 0
#define HAVE_VIRTUALALLOC 0
#define HAVE_WINSOCK2_H 1
#define HAVE_XFORM_ASM 0
#define HAVE_YASM 1
#define CONFIG_BSFS 1
#define CONFIG_DECODERS 1
#define CONFIG_DEMUXERS 1
#define CONFIG_ENCODERS 1
#define CONFIG_FILTERS 1
#define CONFIG_HWACCELS 1
#define CONFIG_INDEVS 1
#define CONFIG_MUXERS 1
#define CONFIG_OUTDEVS 1
#define CONFIG_PARSERS 0
#define CONFIG_PROTOCOLS 1
#define CONFIG_AANDCT 1
#define CONFIG_AVFILTER 0
#define CONFIG_AVFILTER_LAVF 0
#define CONFIG_AVISYNTH 0
#define CONFIG_BEOS_NETSERVER 0
#define CONFIG_BZLIB 0
#define CONFIG_FASTDIV 1
#define CONFIG_FFMPEG 1
#define CONFIG_FFPLAY 0
#define CONFIG_FFSERVER 1
#define CONFIG_FFT 1
#define CONFIG_GOLOMB 1
#define CONFIG_GPL 1
#define CONFIG_GPROF 0
#define CONFIG_GRAY 0
#define CONFIG_HARDCODED_TABLES 0
#define CONFIG_IPV6 1
#define CONFIG_LIBDC1394 0
#define CONFIG_LIBDIRAC 0
#define CONFIG_LIBFAAC 0
#define CONFIG_LIBFAAD 0
#define CONFIG_LIBFAADBIN 0
#define CONFIG_LIBGSM 0
#define CONFIG_LIBMP3LAME 0
#define CONFIG_LIBNUT 0
#define CONFIG_LIBOPENCORE_AMRNB 0
#define CONFIG_LIBOPENCORE_AMRWB 0
#define CONFIG_LIBOPENJPEG 0
#define CONFIG_LIBSCHROEDINGER 0
#define CONFIG_LIBSPEEX 0
#define CONFIG_LIBTHEORA 0
#define CONFIG_LIBVORBIS 0
#define CONFIG_LIBX264 0
#define CONFIG_LIBXVID 0
#define CONFIG_MDCT 1
#define CONFIG_MEMALIGN_HACK 0
#define CONFIG_MLIB 0
#define CONFIG_MPEGAUDIO_HP 1
#define CONFIG_NETWORK 1
#define CONFIG_NONFREE 0
#define CONFIG_PIC 0
#define CONFIG_POSTPROC 0
#define CONFIG_POWERPC_PERF 0
#define CONFIG_RDFT 1
#define CONFIG_RUNTIME_CPUDETECT 0
#define CONFIG_SHARED 0
#define CONFIG_SMALL 0
#define CONFIG_STATIC 1
#define CONFIG_SWSCALE_ALPHA 1
#define CONFIG_VAAPI 0
#define CONFIG_VDPAU 0
#define CONFIG_VERSION3 0
#define CONFIG_X11GRAB 0
#define CONFIG_ZLIB 1
#define CONFIG_GPLV3 0
#define CONFIG_LGPLV3 0
#define CONFIG_AASC_DECODER 1
#define CONFIG_AMV_DECODER 1
#define CONFIG_ASV1_DECODER 1
#define CONFIG_ASV2_DECODER 1
#define CONFIG_AVS_DECODER 1
#define CONFIG_BETHSOFTVID_DECODER 1
#define CONFIG_BFI_DECODER 1
#define CONFIG_BMP_DECODER 1
#define CONFIG_C93_DECODER 1
#define CONFIG_CAVS_DECODER 1
#define CONFIG_CINEPAK_DECODER 1
#define CONFIG_CLJR_DECODER 1
#define CONFIG_CSCD_DECODER 1
#define CONFIG_CYUV_DECODER 1
#define CONFIG_DNXHD_DECODER 1
#define CONFIG_DPX_DECODER 1
#define CONFIG_DSICINVIDEO_DECODER 1
#define CONFIG_DVVIDEO_DECODER 1
#define CONFIG_DXA_DECODER 1
#define CONFIG_EACMV_DECODER 1
#define CONFIG_EAMAD_DECODER 1
#define CONFIG_EATGQ_DECODER 1
#define CONFIG_EATGV_DECODER 1
#define CONFIG_EATQI_DECODER 1
#define CONFIG_EIGHTBPS_DECODER 1
#define CONFIG_EIGHTSVX_EXP_DECODER 1
#define CONFIG_EIGHTSVX_FIB_DECODER 1
#define CONFIG_ESCAPE124_DECODER 1
#define CONFIG_FFV1_DECODER 1
#define CONFIG_FFVHUFF_DECODER 1
#define CONFIG_FLASHSV_DECODER 1
#define CONFIG_FLIC_DECODER 1
#define CONFIG_FLV_DECODER 1
#define CONFIG_FOURXM_DECODER 1
#define CONFIG_FRAPS_DECODER 1
#define CONFIG_GIF_DECODER 1
#define CONFIG_H261_DECODER 1
#define CONFIG_H263_DECODER 1
#define CONFIG_H263I_DECODER 1
#define CONFIG_H264_DECODER 1
#define CONFIG_H264_VDPAU_DECODER 0
#define CONFIG_HUFFYUV_DECODER 1
#define CONFIG_IDCIN_DECODER 1
#define CONFIG_INDEO2_DECODER 1
#define CONFIG_INDEO3_DECODER 1
#define CONFIG_INTERPLAY_VIDEO_DECODER 1
#define CONFIG_JPEGLS_DECODER 1
#define CONFIG_KMVC_DECODER 1
#define CONFIG_LOCO_DECODER 1
#define CONFIG_MDEC_DECODER 1
#define CONFIG_MIMIC_DECODER 1
#define CONFIG_MJPEG_DECODER 1
#define CONFIG_MJPEGB_DECODER 1
#define CONFIG_MMVIDEO_DECODER 1
#define CONFIG_MOTIONPIXELS_DECODER 1
#define CONFIG_MPEG_XVMC_DECODER 0
#define CONFIG_MPEG1VIDEO_DECODER 1
#define CONFIG_MPEG2VIDEO_DECODER 1
#define CONFIG_MPEG4_DECODER 1
#define CONFIG_MPEGVIDEO_DECODER 1
#define CONFIG_MPEG_VDPAU_DECODER 0
#define CONFIG_MPEG1_VDPAU_DECODER 0
#define CONFIG_MSMPEG4V1_DECODER 1
#define CONFIG_MSMPEG4V2_DECODER 1
#define CONFIG_MSMPEG4V3_DECODER 1
#define CONFIG_MSRLE_DECODER 1
#define CONFIG_MSVIDEO1_DECODER 1
#define CONFIG_MSZH_DECODER 1
#define CONFIG_NUV_DECODER 1
#define CONFIG_PAM_DECODER 1
#define CONFIG_PBM_DECODER 1
#define CONFIG_PCX_DECODER 1
#define CONFIG_PGM_DECODER 1
#define CONFIG_PGMYUV_DECODER 1
#define CONFIG_PNG_DECODER 1
#define CONFIG_PPM_DECODER 1
#define CONFIG_PTX_DECODER 1
#define CONFIG_QDRAW_DECODER 1
#define CONFIG_QPEG_DECODER 1
#define CONFIG_QTRLE_DECODER 1
#define CONFIG_RAWVIDEO_DECODER 1
#define CONFIG_RL2_DECODER 1
#define CONFIG_ROQ_DECODER 1
#define CONFIG_RPZA_DECODER 1
#define CONFIG_RV10_DECODER 1
#define CONFIG_RV20_DECODER 1
#define CONFIG_RV30_DECODER 1
#define CONFIG_RV40_DECODER 1
#define CONFIG_SGI_DECODER 1
#define CONFIG_SMACKER_DECODER 1
#define CONFIG_SMC_DECODER 1
#define CONFIG_SNOW_DECODER 1
#define CONFIG_SP5X_DECODER 1
#define CONFIG_SUNRAST_DECODER 1
#define CONFIG_SVQ1_DECODER 1
#define CONFIG_SVQ3_DECODER 1
#define CONFIG_TARGA_DECODER 1
#define CONFIG_THEORA_DECODER 1
#define CONFIG_THP_DECODER 1
#define CONFIG_TIERTEXSEQVIDEO_DECODER 1
#define CONFIG_TIFF_DECODER 1
#define CONFIG_TMV_DECODER 1
#define CONFIG_TRUEMOTION1_DECODER 1
#define CONFIG_TRUEMOTION2_DECODER 1
#define CONFIG_TSCC_DECODER 1
#define CONFIG_TXD_DECODER 1
#define CONFIG_ULTI_DECODER 1
#define CONFIG_V210_DECODER 1
#define CONFIG_V210X_DECODER 1
#define CONFIG_VB_DECODER 1
#define CONFIG_VC1_DECODER 1
#define CONFIG_VC1_VDPAU_DECODER 0
#define CONFIG_VCR1_DECODER 1
#define CONFIG_VMDVIDEO_DECODER 1
#define CONFIG_VMNC_DECODER 1
#define CONFIG_VP3_DECODER 1
#define CONFIG_VP5_DECODER 1
#define CONFIG_VP6_DECODER 1
#define CONFIG_VP6A_DECODER 1
#define CONFIG_VP6F_DECODER 1
#define CONFIG_VQA_DECODER 1
#define CONFIG_WMV1_DECODER 1
#define CONFIG_WMV2_DECODER 1
#define CONFIG_WMV3_DECODER 1
#define CONFIG_WMV3_VDPAU_DECODER 0
#define CONFIG_WNV1_DECODER 1
#define CONFIG_XAN_WC3_DECODER 1
#define CONFIG_XL_DECODER 1
#define CONFIG_ZLIB_DECODER 1
#define CONFIG_ZMBV_DECODER 1
#define CONFIG_AAC_DECODER 1
#define CONFIG_AC3_DECODER 1
#define CONFIG_ALAC_DECODER 1
#define CONFIG_APE_DECODER 1
#define CONFIG_ATRAC3_DECODER 1
#define CONFIG_COOK_DECODER 1
#define CONFIG_DCA_DECODER 1
#define CONFIG_DSICINAUDIO_DECODER 1
#define CONFIG_EAC3_DECODER 1
#define CONFIG_FLAC_DECODER 1
#define CONFIG_IMC_DECODER 1
#define CONFIG_MACE3_DECODER 1
#define CONFIG_MACE6_DECODER 1
#define CONFIG_MLP_DECODER 1
#define CONFIG_MP1_DECODER 1
#define CONFIG_MP2_DECODER 1
#define CONFIG_MP3_DECODER 1
#define CONFIG_MP3ADU_DECODER 1
#define CONFIG_MP3ON4_DECODER 1
#define CONFIG_MPC7_DECODER 1
#define CONFIG_MPC8_DECODER 1
#define CONFIG_NELLYMOSER_DECODER 1
#define CONFIG_QCELP_DECODER 1
#define CONFIG_QDM2_DECODER 1
#define CONFIG_RA_144_DECODER 1
#define CONFIG_RA_288_DECODER 1
#define CONFIG_SHORTEN_DECODER 1
#define CONFIG_SMACKAUD_DECODER 1
#define CONFIG_SONIC_DECODER 1
#define CONFIG_TRUEHD_DECODER 1
#define CONFIG_TRUESPEECH_DECODER 1
#define CONFIG_TTA_DECODER 1
#define CONFIG_TWINVQ_DECODER 1
#define CONFIG_VMDAUDIO_DECODER 1
#define CONFIG_VORBIS_DECODER 1
#define CONFIG_WAVPACK_DECODER 1
#define CONFIG_WMAPRO_DECODER 1
#define CONFIG_WMAV1_DECODER 1
#define CONFIG_WMAV2_DECODER 1
#define CONFIG_WS_SND1_DECODER 1
#define CONFIG_PCM_ALAW_DECODER 1
#define CONFIG_PCM_BLURAY_DECODER 1
#define CONFIG_PCM_DVD_DECODER 1
#define CONFIG_PCM_F32BE_DECODER 1
#define CONFIG_PCM_F32LE_DECODER 1
#define CONFIG_PCM_F64BE_DECODER 1
#define CONFIG_PCM_F64LE_DECODER 1
#define CONFIG_PCM_MULAW_DECODER 1
#define CONFIG_PCM_S8_DECODER 1
#define CONFIG_PCM_S16BE_DECODER 1
#define CONFIG_PCM_S16LE_DECODER 1
#define CONFIG_PCM_S16LE_PLANAR_DECODER 1
#define CONFIG_PCM_S24BE_DECODER 1
#define CONFIG_PCM_S24DAUD_DECODER 1
#define CONFIG_PCM_S24LE_DECODER 1
#define CONFIG_PCM_S32BE_DECODER 1
#define CONFIG_PCM_S32LE_DECODER 1
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 1
#define CONFIG_PCM_U16LE_DECODER 1
#define CONFIG_PCM_U24BE_DECODER 1
#define CONFIG_PCM_U24LE_DECODER 1
#define CONFIG_PCM_U32BE_DECODER 1
#define CONFIG_PCM_U32LE_DECODER 1
#define CONFIG_PCM_ZORK_DECODER 1
#define CONFIG_INTERPLAY_DPCM_DECODER 1
#define CONFIG_ROQ_DPCM_DECODER 1
#define CONFIG_SOL_DPCM_DECODER 1
#define CONFIG_XAN_DPCM_DECODER 1
#define CONFIG_ADPCM_4XM_DECODER 1
#define CONFIG_ADPCM_ADX_DECODER 1
#define CONFIG_ADPCM_CT_DECODER 1
#define CONFIG_ADPCM_EA_DECODER 1
#define CONFIG_ADPCM_EA_MAXIS_XA_DECODER 1
#define CONFIG_ADPCM_EA_R1_DECODER 1
#define CONFIG_ADPCM_EA_R2_DECODER 1
#define CONFIG_ADPCM_EA_R3_DECODER 1
#define CONFIG_ADPCM_EA_XAS_DECODER 1
#define CONFIG_ADPCM_G726_DECODER 1
#define CONFIG_ADPCM_IMA_AMV_DECODER 1
#define CONFIG_ADPCM_IMA_DK3_DECODER 1
#define CONFIG_ADPCM_IMA_DK4_DECODER 1
#define CONFIG_ADPCM_IMA_EA_EACS_DECODER 1
#define CONFIG_ADPCM_IMA_EA_SEAD_DECODER 1
#define CONFIG_ADPCM_IMA_ISS_DECODER 1
#define CONFIG_ADPCM_IMA_QT_DECODER 1
#define CONFIG_ADPCM_IMA_SMJPEG_DECODER 1
#define CONFIG_ADPCM_IMA_WAV_DECODER 1
#define CONFIG_ADPCM_IMA_WS_DECODER 1
#define CONFIG_ADPCM_MS_DECODER 1
#define CONFIG_ADPCM_SBPRO_2_DECODER 1
#define CONFIG_ADPCM_SBPRO_3_DECODER 1
#define CONFIG_ADPCM_SBPRO_4_DECODER 1
#define CONFIG_ADPCM_SWF_DECODER 1
#define CONFIG_ADPCM_THP_DECODER 1
#define CONFIG_ADPCM_XA_DECODER 1
#define CONFIG_ADPCM_YAMAHA_DECODER 1
#define CONFIG_DVBSUB_DECODER 1
#define CONFIG_DVDSUB_DECODER 1
#define CONFIG_PGSSUB_DECODER 1
#define CONFIG_XSUB_DECODER 1
#define CONFIG_LIBDIRAC_DECODER 0
#define CONFIG_LIBFAAD_DECODER 0
#define CONFIG_LIBGSM_DECODER 0
#define CONFIG_LIBGSM_MS_DECODER 0
#define CONFIG_LIBOPENCORE_AMRNB_DECODER 0
#define CONFIG_LIBOPENCORE_AMRWB_DECODER 0
#define CONFIG_LIBOPENJPEG_DECODER 0
#define CONFIG_LIBSCHROEDINGER_DECODER 0
#define CONFIG_LIBSPEEX_DECODER 0
#define CONFIG_ASV1_ENCODER 1
#define CONFIG_ASV2_ENCODER 1
#define CONFIG_BMP_ENCODER 1
#define CONFIG_DNXHD_ENCODER 1
#define CONFIG_DVVIDEO_ENCODER 1
#define CONFIG_FFV1_ENCODER 1
#define CONFIG_FFVHUFF_ENCODER 1
#define CONFIG_FLASHSV_ENCODER 1
#define CONFIG_FLV_ENCODER 1
#define CONFIG_GIF_ENCODER 1
#define CONFIG_H261_ENCODER 1
#define CONFIG_H263_ENCODER 1
#define CONFIG_H263P_ENCODER 1
#define CONFIG_HUFFYUV_ENCODER 1
#define CONFIG_JPEGLS_ENCODER 1
#define CONFIG_LJPEG_ENCODER 1
#define CONFIG_MJPEG_ENCODER 1
#define CONFIG_MPEG1VIDEO_ENCODER 1
#define CONFIG_MPEG2VIDEO_ENCODER 1
#define CONFIG_MPEG4_ENCODER 1
#define CONFIG_MSMPEG4V1_ENCODER 1
#define CONFIG_MSMPEG4V2_ENCODER 1
#define CONFIG_MSMPEG4V3_ENCODER 1
#define CONFIG_PAM_ENCODER 1
#define CONFIG_PBM_ENCODER 1
#define CONFIG_PCX_ENCODER 1
#define CONFIG_PGM_ENCODER 1
#define CONFIG_PGMYUV_ENCODER 1
#define CONFIG_PNG_ENCODER 1
#define CONFIG_PPM_ENCODER 1
#define CONFIG_QTRLE_ENCODER 1
#define CONFIG_RAWVIDEO_ENCODER 1
#define CONFIG_ROQ_ENCODER 1
#define CONFIG_RV10_ENCODER 1
#define CONFIG_RV20_ENCODER 1
#define CONFIG_SGI_ENCODER 1
#define CONFIG_SNOW_ENCODER 1
#define CONFIG_SVQ1_ENCODER 1
#define CONFIG_TARGA_ENCODER 1
#define CONFIG_TIFF_ENCODER 1
#define CONFIG_V210_ENCODER 1
#define CONFIG_WMV1_ENCODER 1
#define CONFIG_WMV2_ENCODER 1
#define CONFIG_ZLIB_ENCODER 1
#define CONFIG_ZMBV_ENCODER 1
#define CONFIG_AAC_ENCODER 1
#define CONFIG_AC3_ENCODER 1
#define CONFIG_ALAC_ENCODER 1
#define CONFIG_FLAC_ENCODER 1
#define CONFIG_MP2_ENCODER 1
#define CONFIG_NELLYMOSER_ENCODER 1
#define CONFIG_SONIC_ENCODER 1
#define CONFIG_SONIC_LS_ENCODER 1
#define CONFIG_VORBIS_ENCODER 1
#define CONFIG_WMAV1_ENCODER 1
#define CONFIG_WMAV2_ENCODER 1
#define CONFIG_PCM_ALAW_ENCODER 1
#define CONFIG_PCM_F32BE_ENCODER 1
#define CONFIG_PCM_F32LE_ENCODER 1
#define CONFIG_PCM_F64BE_ENCODER 1
#define CONFIG_PCM_F64LE_ENCODER 1
#define CONFIG_PCM_MULAW_ENCODER 1
#define CONFIG_PCM_S8_ENCODER 1
#define CONFIG_PCM_S16BE_ENCODER 1
#define CONFIG_PCM_S16LE_ENCODER 1
#define CONFIG_PCM_S24BE_ENCODER 1
#define CONFIG_PCM_S24DAUD_ENCODER 1
#define CONFIG_PCM_S24LE_ENCODER 1
#define CONFIG_PCM_S32BE_ENCODER 1
#define CONFIG_PCM_S32LE_ENCODER 1
#define CONFIG_PCM_U8_ENCODER 1
#define CONFIG_PCM_U16BE_ENCODER 1
#define CONFIG_PCM_U16LE_ENCODER 1
#define CONFIG_PCM_U24BE_ENCODER 1
#define CONFIG_PCM_U24LE_ENCODER 1
#define CONFIG_PCM_U32BE_ENCODER 1
#define CONFIG_PCM_U32LE_ENCODER 1
#define CONFIG_PCM_ZORK_ENCODER 1
#define CONFIG_ROQ_DPCM_ENCODER 1
#define CONFIG_ADPCM_ADX_ENCODER 1
#define CONFIG_ADPCM_G726_ENCODER 1
#define CONFIG_ADPCM_IMA_QT_ENCODER 1
#define CONFIG_ADPCM_IMA_WAV_ENCODER 1
#define CONFIG_ADPCM_MS_ENCODER 1
#define CONFIG_ADPCM_SWF_ENCODER 1
#define CONFIG_ADPCM_YAMAHA_ENCODER 1
#define CONFIG_DVBSUB_ENCODER 1
#define CONFIG_DVDSUB_ENCODER 1
#define CONFIG_XSUB_ENCODER 1
#define CONFIG_LIBDIRAC_ENCODER 0
#define CONFIG_LIBFAAC_ENCODER 0
#define CONFIG_LIBGSM_ENCODER 0
#define CONFIG_LIBGSM_MS_ENCODER 0
#define CONFIG_LIBMP3LAME_ENCODER 0
#define CONFIG_LIBOPENCORE_AMRNB_ENCODER 0
#define CONFIG_LIBSCHROEDINGER_ENCODER 0
#define CONFIG_LIBTHEORA_ENCODER 0
#define CONFIG_LIBVORBIS_ENCODER 0
#define CONFIG_LIBX264_ENCODER 0
#define CONFIG_LIBXVID_ENCODER 0
#define CONFIG_H263_VAAPI_HWACCEL 0
#define CONFIG_MPEG2_VAAPI_HWACCEL 0
#define CONFIG_MPEG4_VAAPI_HWACCEL 0
#define CONFIG_VC1_VAAPI_HWACCEL 0
#define CONFIG_WMV3_VAAPI_HWACCEL 0
#define CONFIG_AAC_PARSER 1
#define CONFIG_AC3_PARSER 1
#define CONFIG_CAVSVIDEO_PARSER 1
#define CONFIG_DCA_PARSER 1
#define CONFIG_DIRAC_PARSER 1
#define CONFIG_DNXHD_PARSER 1
#define CONFIG_DVBSUB_PARSER 1
#define CONFIG_DVDSUB_PARSER 1
#define CONFIG_H261_PARSER 1
#define CONFIG_H263_PARSER 1
#define CONFIG_H264_PARSER 1
#define CONFIG_MJPEG_PARSER 1
#define CONFIG_MLP_PARSER 1
#define CONFIG_MPEG4VIDEO_PARSER 1
#define CONFIG_MPEGAUDIO_PARSER 1
#define CONFIG_MPEGVIDEO_PARSER 1
#define CONFIG_PNM_PARSER 1
#define CONFIG_VC1_PARSER 1
#define CONFIG_VP3_PARSER 1
#define CONFIG_AAC_ADTSTOASC_BSF 1
#define CONFIG_DUMP_EXTRADATA_BSF 1
#define CONFIG_H264_MP4TOANNEXB_BSF 1
#define CONFIG_IMX_DUMP_HEADER_BSF 1
#define CONFIG_MJPEGA_DUMP_HEADER_BSF 1
#define CONFIG_MP3_HEADER_COMPRESS_BSF 1
#define CONFIG_MP3_HEADER_DECOMPRESS_BSF 1
#define CONFIG_MOV2TEXTSUB_BSF 1
#define CONFIG_NOISE_BSF 1
#define CONFIG_REMOVE_EXTRADATA_BSF 1
#define CONFIG_TEXT2MOVSUB_BSF 1
#define CONFIG_AAC_DEMUXER 1
#define CONFIG_AC3_DEMUXER 1
#define CONFIG_AIFF_DEMUXER 1
#define CONFIG_AMR_DEMUXER 1
#define CONFIG_APC_DEMUXER 1
#define CONFIG_APE_DEMUXER 1
#define CONFIG_ASF_DEMUXER 1
#define CONFIG_ASS_DEMUXER 1
#define CONFIG_AU_DEMUXER 1
#define CONFIG_AVI_DEMUXER 1
#define CONFIG_AVISYNTH_DEMUXER 0
#define CONFIG_AVS_DEMUXER 1
#define CONFIG_BETHSOFTVID_DEMUXER 1
#define CONFIG_BFI_DEMUXER 1
#define CONFIG_C93_DEMUXER 1
#define CONFIG_CAF_DEMUXER 1
#define CONFIG_CAVSVIDEO_DEMUXER 1
#define CONFIG_DAUD_DEMUXER 1
#define CONFIG_DIRAC_DEMUXER 1
#define CONFIG_DNXHD_DEMUXER 1
#define CONFIG_DSICIN_DEMUXER 1
#define CONFIG_DTS_DEMUXER 1
#define CONFIG_DV_DEMUXER 1
#define CONFIG_DXA_DEMUXER 1
#define CONFIG_EA_DEMUXER 1
#define CONFIG_EA_CDATA_DEMUXER 1
#define CONFIG_EAC3_DEMUXER 1
#define CONFIG_FFM_DEMUXER 1
#define CONFIG_FLAC_DEMUXER 1
#define CONFIG_FLIC_DEMUXER 1
#define CONFIG_FLV_DEMUXER 1
#define CONFIG_FOURXM_DEMUXER 1
#define CONFIG_GSM_DEMUXER 1
#define CONFIG_GXF_DEMUXER 1
#define CONFIG_H261_DEMUXER 1
#define CONFIG_H263_DEMUXER 1
#define CONFIG_H264_DEMUXER 1
#define CONFIG_IDCIN_DEMUXER 1
#define CONFIG_IFF_DEMUXER 1
#define CONFIG_IMAGE2_DEMUXER 1
#define CONFIG_IMAGE2PIPE_DEMUXER 1
#define CONFIG_INGENIENT_DEMUXER 1
#define CONFIG_IPMOVIE_DEMUXER 1
#define CONFIG_ISS_DEMUXER 1
#define CONFIG_LMLM4_DEMUXER 1
#define CONFIG_M4V_DEMUXER 1
#define CONFIG_MATROSKA_DEMUXER 1
#define CONFIG_MJPEG_DEMUXER 1
#define CONFIG_MLP_DEMUXER 1
#define CONFIG_MM_DEMUXER 1
#define CONFIG_MMF_DEMUXER 1
#define CONFIG_MOV_DEMUXER 1
#define CONFIG_MP3_DEMUXER 1
#define CONFIG_MPC_DEMUXER 1
#define CONFIG_MPC8_DEMUXER 1
#define CONFIG_MPEGPS_DEMUXER 1
#define CONFIG_MPEGTS_DEMUXER 1
#define CONFIG_MPEGTSRAW_DEMUXER 1
#define CONFIG_MPEGVIDEO_DEMUXER 1
#define CONFIG_MSNWC_TCP_DEMUXER 1
#define CONFIG_MTV_DEMUXER 1
#define CONFIG_MVI_DEMUXER 1
#define CONFIG_MXF_DEMUXER 1
#define CONFIG_NC_DEMUXER 1
#define CONFIG_NSV_DEMUXER 1
#define CONFIG_NUT_DEMUXER 1
#define CONFIG_NUV_DEMUXER 1
#define CONFIG_OGG_DEMUXER 1
#define CONFIG_OMA_DEMUXER 1
#define CONFIG_PCM_ALAW_DEMUXER 1
#define CONFIG_PCM_MULAW_DEMUXER 1
#define CONFIG_PCM_F64BE_DEMUXER 1
#define CONFIG_PCM_F64LE_DEMUXER 1
#define CONFIG_PCM_F32BE_DEMUXER 1
#define CONFIG_PCM_F32LE_DEMUXER 1
#define CONFIG_PCM_S32BE_DEMUXER 1
#define CONFIG_PCM_S32LE_DEMUXER 1
#define CONFIG_PCM_S24BE_DEMUXER 1
#define CONFIG_PCM_S24LE_DEMUXER 1
#define CONFIG_PCM_S16BE_DEMUXER 1
#define CONFIG_PCM_S16LE_DEMUXER 1
#define CONFIG_PCM_S8_DEMUXER 1
#define CONFIG_PCM_U32BE_DEMUXER 1
#define CONFIG_PCM_U32LE_DEMUXER 1
#define CONFIG_PCM_U24BE_DEMUXER 1
#define CONFIG_PCM_U24LE_DEMUXER 1
#define CONFIG_PCM_U16BE_DEMUXER 1
#define CONFIG_PCM_U16LE_DEMUXER 1
#define CONFIG_PCM_U8_DEMUXER 1
#define CONFIG_PVA_DEMUXER 1
#define CONFIG_QCP_DEMUXER 1
#define CONFIG_R3D_DEMUXER 1
#define CONFIG_RAWVIDEO_DEMUXER 1
#define CONFIG_REDIR_DEMUXER 1
#define CONFIG_RL2_DEMUXER 1
#define CONFIG_RM_DEMUXER 1
#define CONFIG_ROQ_DEMUXER 1
#define CONFIG_RPL_DEMUXER 1
#define CONFIG_RTSP_DEMUXER 1
#define CONFIG_SDP_DEMUXER 1
#define CONFIG_SEGAFILM_DEMUXER 1
#define CONFIG_SHORTEN_DEMUXER 1
#define CONFIG_SIFF_DEMUXER 1
#define CONFIG_SMACKER_DEMUXER 1
#define CONFIG_SOL_DEMUXER 1
#define CONFIG_SOX_DEMUXER 1
#define CONFIG_STR_DEMUXER 1
#define CONFIG_SWF_DEMUXER 1
#define CONFIG_THP_DEMUXER 1
#define CONFIG_TIERTEXSEQ_DEMUXER 1
#define CONFIG_TMV_DEMUXER 1
#define CONFIG_TRUEHD_DEMUXER 1
#define CONFIG_TTA_DEMUXER 1
#define CONFIG_TXD_DEMUXER 1
#define CONFIG_VC1_DEMUXER 1
#define CONFIG_VC1T_DEMUXER 1
#define CONFIG_VMD_DEMUXER 1
#define CONFIG_VOC_DEMUXER 1
#define CONFIG_VQF_DEMUXER 1
#define CONFIG_W64_DEMUXER 1
#define CONFIG_WAV_DEMUXER 1
#define CONFIG_WC3_DEMUXER 1
#define CONFIG_WSAUD_DEMUXER 1
#define CONFIG_WSVQA_DEMUXER 1
#define CONFIG_WV_DEMUXER 1
#define CONFIG_XA_DEMUXER 1
#define CONFIG_YUV4MPEGPIPE_DEMUXER 1
#define CONFIG_LIBNUT_DEMUXER 0
#define CONFIG_AC3_MUXER 1
#define CONFIG_ADTS_MUXER 1
#define CONFIG_AIFF_MUXER 1
#define CONFIG_AMR_MUXER 1
#define CONFIG_ASF_MUXER 1
#define CONFIG_ASS_MUXER 1
#define CONFIG_ASF_STREAM_MUXER 1
#define CONFIG_AU_MUXER 1
#define CONFIG_AVI_MUXER 1
#define CONFIG_AVM2_MUXER 1
#define CONFIG_CRC_MUXER 1
#define CONFIG_DAUD_MUXER 1
#define CONFIG_DIRAC_MUXER 1
#define CONFIG_DNXHD_MUXER 1
#define CONFIG_DTS_MUXER 1
#define CONFIG_DV_MUXER 1
#define CONFIG_EAC3_MUXER 1
#define CONFIG_FFM_MUXER 1
#define CONFIG_FLAC_MUXER 1
#define CONFIG_FLV_MUXER 1
#define CONFIG_FRAMECRC_MUXER 1
#define CONFIG_GIF_MUXER 1
#define CONFIG_GXF_MUXER 1
#define CONFIG_H261_MUXER 1
#define CONFIG_H263_MUXER 1
#define CONFIG_H264_MUXER 1
#define CONFIG_IMAGE2_MUXER 1
#define CONFIG_IMAGE2PIPE_MUXER 1
#define CONFIG_IPOD_MUXER 1
#define CONFIG_M4V_MUXER 1
#define CONFIG_MATROSKA_MUXER 1
#define CONFIG_MATROSKA_AUDIO_MUXER 1
#define CONFIG_MJPEG_MUXER 1
#define CONFIG_MLP_MUXER 1
#define CONFIG_MMF_MUXER 1
#define CONFIG_MOV_MUXER 1
#define CONFIG_MP2_MUXER 1
#define CONFIG_MP3_MUXER 1
#define CONFIG_MP4_MUXER 1
#define CONFIG_MPEG1SYSTEM_MUXER 1
#define CONFIG_MPEG1VCD_MUXER 1
#define CONFIG_MPEG1VIDEO_MUXER 1
#define CONFIG_MPEG2DVD_MUXER 1
#define CONFIG_MPEG2SVCD_MUXER 1
#define CONFIG_MPEG2VIDEO_MUXER 1
#define CONFIG_MPEG2VOB_MUXER 1
#define CONFIG_MPEGTS_MUXER 1
#define CONFIG_MPJPEG_MUXER 1
#define CONFIG_MXF_MUXER 1
#define CONFIG_MXF_D10_MUXER 1
#define CONFIG_NULL_MUXER 1
#define CONFIG_NUT_MUXER 1
#define CONFIG_OGG_MUXER 1
#define CONFIG_PCM_ALAW_MUXER 1
#define CONFIG_PCM_MULAW_MUXER 1
#define CONFIG_PCM_F64BE_MUXER 1
#define CONFIG_PCM_F64LE_MUXER 1
#define CONFIG_PCM_F32BE_MUXER 1
#define CONFIG_PCM_F32LE_MUXER 1
#define CONFIG_PCM_S32BE_MUXER 1
#define CONFIG_PCM_S32LE_MUXER 1
#define CONFIG_PCM_S24BE_MUXER 1
#define CONFIG_PCM_S24LE_MUXER 1
#define CONFIG_PCM_S16BE_MUXER 1
#define CONFIG_PCM_S16LE_MUXER 1
#define CONFIG_PCM_S8_MUXER 1
#define CONFIG_PCM_U32BE_MUXER 1
#define CONFIG_PCM_U32LE_MUXER 1
#define CONFIG_PCM_U24BE_MUXER 1
#define CONFIG_PCM_U24LE_MUXER 1
#define CONFIG_PCM_U16BE_MUXER 1
#define CONFIG_PCM_U16LE_MUXER 1
#define CONFIG_PCM_U8_MUXER 1
#define CONFIG_PSP_MUXER 1
#define CONFIG_RAWVIDEO_MUXER 1
#define CONFIG_RM_MUXER 1
#define CONFIG_ROQ_MUXER 1
#define CONFIG_RTP_MUXER 1
#define CONFIG_SOX_MUXER 1
#define CONFIG_SPDIF_MUXER 1
#define CONFIG_SWF_MUXER 1
#define CONFIG_TG2_MUXER 1
#define CONFIG_TGP_MUXER 1
#define CONFIG_TRUEHD_MUXER 1
#define CONFIG_VC1T_MUXER 1
#define CONFIG_VOC_MUXER 1
#define CONFIG_WAV_MUXER 1
#define CONFIG_YUV4MPEGPIPE_MUXER 1
#define CONFIG_LIBNUT_MUXER 0
#define CONFIG_CROP_FILTER 1
#define CONFIG_FILE_PROTOCOL 1
#define CONFIG_GOPHER_PROTOCOL 1
#define CONFIG_HTTP_PROTOCOL 1
#define CONFIG_PIPE_PROTOCOL 1
#define CONFIG_RTMP_PROTOCOL 1
#define CONFIG_RTP_PROTOCOL 1
#define CONFIG_TCP_PROTOCOL 1
#define CONFIG_UDP_PROTOCOL 1
#define CONFIG_ALSA_INDEV 0
#define CONFIG_AUDIO_BEOS_INDEV 0
#define CONFIG_BKTR_INDEV 0
#define CONFIG_DV1394_INDEV 1
#define CONFIG_JACK_INDEV 0
#define CONFIG_OSS_INDEV 1
#define CONFIG_V4L2_INDEV 1
#define CONFIG_V4L_INDEV 1
#define CONFIG_VFWCAP_INDEV 0
#define CONFIG_X11_GRAB_DEVICE_INDEV 0
#define CONFIG_LIBDC1394_INDEV 0
#define CONFIG_ALSA_OUTDEV 0
#define CONFIG_AUDIO_BEOS_OUTDEV 0
#define CONFIG_OSS_OUTDEV 1
#define restrict restrict
#define ASMALIGN(ZEROBITS) ".align 1 << " #ZEROBITS "\n\t"
#define EXTERN_PREFIX ""
#define PRIu64 "I64u"
#define PRId64 "I64d"
#define PRIx64 "I64x"
#define PRIX64 "I64X"
#define AVCONV_DATADIR "c:/ffmpeg1010/"
#define snprintf _snprintf
#define lrint(f) (f>=0?(int32_t)(f+(double)0.5):(int32_t)(f-(double)0.4))
#define lrintf(f) (f>=0?(int32_t)(f+(float)0.5):(int32_t)(f-(float)0.4))
#define llrintf(f) (f>=0?(int64_t)(f+(double)0.5):(int64_t)(f-(double)0.4))
#define llrint(f) (f>=0?(int64_t)(f+(float)0.5):(int64_t)(f-(float)0.4))
#define log2(x) (log(x) * 1.44269504088896340736)
#endif //EASYPLAYER_CONFIG_H
|
JinmingDev/ScreenRecordTest
|
lupingdashi/app/src/main/cpp/include/clock.h
|
////
//// Created by Administrator on 2016/10/28.
////
//
//#ifndef EASYPLAYER_CLOCK_H
//#define EASYPLAYER_CLOCK_H
//
//#include <time.h>
//#include <mutex>
//
//class Clock {
//public:
// void start() {
// if (playing) return;
// struct timespec now;
// clock_gettime(CLOCK_MONOTONIC, &now);
// startTime = (long long) now.tv_sec*NANO_SECOND + now.tv_nsec;;
// playing = true;
// }
// void stop() {
// if (!playing) return;
// struct timespec now;
// clock_gettime(CLOCK_MONOTONIC, &now);
// long long endTime = (long long) now.tv_sec*NANO_SECOND + now.tv_nsec;
// timePassed += endTime - startTime;
// playing = false;
// }
// double getTimePassed() {
// if (!playing) {
// return (double)timePassed/NANO_SECOND;
// }else {
// struct timespec now;
// clock_gettime(CLOCK_MONOTONIC, &now);
// long long endTime = (long long) now.tv_sec*NANO_SECOND + now.tv_nsec;
// long long currPassed = endTime - startTime;
// return (double)(timePassed + currPassed)/NANO_SECOND;
// }
// }
//private:
// long long timePassed = 0;
// long long startTime = 0;
// bool playing = false;
// const long long NANO_SECOND = 1000000000LL;
//};
//
//
//#endif //EASYPLAYER_CLOCK_H
|
JinmingDev/ScreenRecordTest
|
lupingdashi/app/src/main/cpp/include/opensles.h
|
//
// Created by Administrator on 2016/10/26.
//
#ifndef EASYPLAYER_OPENSLES_H
#define EASYPLAYER_OPENSLES_H
#include <SLES/OpenSLES.h>
#include <SLES/OpenSLES_Android.h>
#include <jni.h>
#include <pthread.h>
#include <assert.h>
void createAudioEngine();
void createBufferQueueAudioPlayer(int sampleRate, int channel);
void audioStart();
void bqPlayerCallback(SLAndroidSimpleBufferQueueItf bq, void *context);
void releaseResampleBuf(void);
#endif //EASYPLAYER_OPENSLES_H
|
JinmingDev/ScreenRecordTest
|
lupingdashi/app/src/main/cpp/include/Logger.h
|
<filename>lupingdashi/app/src/main/cpp/include/Logger.h
/**************************************************************************
* 作 者: hxk
* 版 本: 1.0
* 生成日期: 2017-9-15
* 功能描述: jni 中 log打印
* LOGD("mBlockAlign: %u\n ",mBlockAlign);
* LOGE("%s", "获取视频信息失败");
* 其 他:
* 历 史:
**************************************************************************/
#ifndef LOCALFFMPEGPLAYER_LOGGER_H
#define LOCALFFMPEGPLAYER_LOGGER_H
#ifdef ANDROID
#include<android/log.h>
#define TAG "LPDS"
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,TAG ,__VA_ARGS__)
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,TAG ,__VA_ARGS__)
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN,TAG ,__VA_ARGS__)
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,TAG ,__VA_ARGS__)
#define LOGF(...) __android_log_print(ANDROID_LOG_FATAL,TAG ,__VA_ARGS__)
#elif defined(WIN32)
#include "stdio.h"
#define LOGD printf
#define LOGE printf
#endif
#endif //LOCALFFMPEGPLAYER_LOGGER_H
|
ezalenski/Pre-Fix-Boolean-Evaluator
|
src/boolean-eval.c
|
#include <stdio.h>
#include <stdlib.h>
int evalandprint() {
int a, b;
char c = getchar();
switch(c) {
case 't':
printf(" t ");
return 1;
case 'f':
printf(" f ");
return 0;
case '|':
printf(" ( ");
a = evalandprint();
printf(" | ");
b = evalandprint();
printf(" ) ");
return (a || b);
case '&':
printf(" ( ");
a = evalandprint();
printf(" & ");
b = evalandprint();
printf(" ) ");
return (a && b);
case '!':
printf(" !");
a = evalandprint();
return (!a);
default:
puts("bad input - goodbye!");
exit(-1);
}
}
main () {
if(evalandprint())
puts("evaluated to: TRUE");
else
puts("evaluated to: FALSE");
}
|
nilsalex/tensor-algebra
|
include/Generator.h
|
<gh_stars>0
#pragma once
#include <functional>
#include <memory>
#include "Expression.h"
#include "Indices.h"
#include "Tensor.h"
class Generator {
private:
size_t rank;
Indices indices;
Tensor eta;
Tensor epsilon;
std::vector<std::pair<Indices, bool>> symmetries;
std::vector<std::function<void (Expression &)>> functions;
public:
Generator() = delete;
Generator(Indices const & indices_set, std::initializer_list<std::pair<Indices, bool>> const & symmetries_set);
Generator(Indices const & indices_set, std::initializer_list<std::pair<Indices, bool>> const & symmetries_set, std::initializer_list<std::function<void (Expression &)>> const & fun_set);
Expression Generate();
~Generator() = default;
};
|
nilsalex/tensor-algebra
|
include/Expression.h
|
#pragma once
#include <algorithm>
#include <memory>
#include <set>
#include <string>
#include <vector>
#include <boost/serialization/unique_ptr.hpp>
#include <boost/serialization/utility.hpp>
#include <boost/serialization/vector.hpp>
#include "MonomialExpression.h"
#include "Rational.h"
#include "Scalar.h"
#include "ScalarSum.h"
typedef std::pair<std::unique_ptr<MonomialExpression>, std::unique_ptr<ScalarSum>> Summand;
typedef std::vector<std::pair<std::unique_ptr<MonomialExpression>, std::unique_ptr<ScalarSum>>> Sum;
bool operator< (Summand const & lop, Summand const & rop);
class Expression {
private:
unsigned int dimension;
std::unique_ptr<Sum> summands;
friend class boost::serialization::access;
template <typename Archive>
void serialize(Archive & ar, unsigned int const version);
public:
Expression();
Expression(Expression const & other);
Expression(Expression && other) = delete;
Expression & operator=(Expression const & other);
Expression & operator=(Expression && other) = delete;
void set_dimension(unsigned int const dimension);
unsigned int get_dimension(void) const;
void AddSummand (MonomialExpression const & monomial_expression);
void AddSummand (MonomialExpression const & monomial_expression, Rational const & rational);
void AddSummand (MonomialExpression const & monomial_expression, size_t variable);
void AddSummand (MonomialExpression const & monomial_expression, Rational const & rational, size_t variable);
void AddSummand (MonomialExpression const & monomial_expression, Scalar const & scalar);
void AddSummand (MonomialExpression const & monomial_expression, ScalarSum const & scalar_sum);
std::set<size_t> GetVariableSet () const;
std::map<size_t, size_t> GetCoefficientMap () const;
std::vector<std::vector<Rational>> GetPrefactorMatrix () const;
void ApplyMonomialSymmetries();
void ApplyMonomialSymmetriesToContractions();
void CanonicalisePrefactors();
void CollectPrefactors();
void EliminateVariable(size_t const variable);
void SubstituteIndices(Indices const & indices_old, Indices const & indices_new);
void SubstituteFreeIndices(Indices const & indices_old, Indices const & indices_new);
void SubstituteVariable(size_t const variable_old, ScalarSum const & scalar_sum_new);
void SubstituteVariables(std::map<size_t, ScalarSum> substitution_map);
void SubstituteVariables(std::map<size_t, size_t> substitution_map);
void EliminateDelta();
void EliminateEpsilon();
void EliminateEpsilonEpsilonI();
void EliminateEpsilonI();
void EliminateGamma();
void EliminateGammaGamma();
void EliminateEtaEta();
void EliminateEtaPartial();
void EliminateEtaRankOne();
void EliminateTracefree();
void EliminateZeros();
void RedefineScalars();
void RenameDummies();
void SortMonomials();
void SortSummands();
void SortSummandsByPrefactors();
void SortSummandsByLastFactors();
void MultiplyCoefficient(Rational const & q);
void ThreePlusOne(std::vector<Index> indices_to_zero);
Expression ApplyGaugeSymmetry (Expression const & delta) const;
Expression NumericSimplify (Indices const & indices, bool print_matrix = false) const;
void AddOther (Expression const & other);
void MultiplyOther (Expression const & other);
void ExchangeSymmetrise(Indices const & indices_1, Indices const & indices_2, bool anti = false);
bool ContainsMonomial (MonomialExpression const & monexpr) const;
bool IsZero() const;
ScalarSum EvaluateIndices(Indices const & indices, std::vector<size_t> const & numbers) const;
void SaveToFile(std::string const & filename) const;
void LoadFromFile(std::string const & filename);
std::string const GetLatexString(std::string base_name = "e_", bool upper = true) const;
~Expression() = default;
};
|
nilsalex/tensor-algebra
|
include/MyPermutation.h
|
<filename>include/MyPermutation.h
#pragma once
#include <string>
#include <vector>
#include "NextCombination.h"
constexpr size_t LARGE_ENOUGH_N = 1024;
class IndexPair {
private:
size_t a;
size_t b;
public:
IndexPair(size_t a, size_t b);
size_t first() const;
size_t second() const;
void Sort();
bool operator== (IndexPair const & other) const;
bool operator< (IndexPair const & other) const;
bool operator> (IndexPair const & other) const;
bool Next(size_t N);
};
namespace std {
template <>
struct hash<IndexPair>
{
size_t operator()(IndexPair const & pair) const noexcept {
return pair.first() + LARGE_ENOUGH_N * pair.second();
}
};
}
class MyPermutation {
private:
std::vector<IndexPair> perm;
size_t N;
size_t num = (N * (N - 1)) / 2;
size_t n_half = N / 2;
public:
MyPermutation(size_t N);
MyPermutation(MyPermutation const & other) = delete;
MyPermutation(MyPermutation && other) = delete;
std::vector<size_t> GetPermutation() const;
bool NextCombination();
bool NextIndexPermutation();
bool IsIndexPermutation() const;
std::string ToString() const;
~MyPermutation() = default;
};
|
nilsalex/tensor-algebra
|
include/TensorMonomial.h
|
#pragma once
#include <memory>
#include <utility>
#include <vector>
#include <boost/serialization/base_object.hpp>
#include <boost/serialization/unique_ptr.hpp>
#include <boost/serialization/vector.hpp>
#include "Indices.h"
#include "Tensor.h"
class TensorMonomial : public Tensor {
private:
std::vector<std::unique_ptr<Tensor>> factors;
friend class boost::serialization::access;
template <typename Archive>
void serialize(Archive & ar, unsigned int const version);
public:
TensorMonomial ();
TensorMonomial (std::initializer_list<Tensor> list);
void AddFactorRight (Tensor const & factor);
virtual std::vector<std::pair<std::unique_ptr<Indices>, std::unique_ptr<Tensor>>> GetIndexMapping (Indices const & indices) const;
virtual ~TensorMonomial() = default;
};
|
nilsalex/tensor-algebra
|
include/MonomialExpression.h
|
#pragma once
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include <boost/serialization/unique_ptr.hpp>
#include <boost/serialization/utility.hpp>
#include <boost/serialization/vector.hpp>
#include "Indices.h"
#include "Rational.h"
#include "Tensor.h"
enum Status {ERROR, NO_ACTION, ETA_ETA_TO_DELTA, ETA_ETA_TO_TRACE, ETA_CONTRACTION, ETA_PARTIAL_CONTRACTION, DELTA_OK, DELTA_TO_TRACE, EPSILON_TO_ZERO, EPSILON_EPSILONI, EPSILONI, SYM_EVEN, SYM_ODD, ZERO_ZERO, ZERO_POSITIVE, ZERO_NEGATIVE, GAMMA_GAMMA_TO_DELTA, GAMMA_GAMMA_TO_TRACE, TRACE_TO_ZERO};
typedef std::pair<std::unique_ptr<Indices>, std::unique_ptr<Tensor>> IndexMappingEntry;
typedef std::vector<std::pair<std::unique_ptr<Indices>, std::unique_ptr<Tensor>>> IndexMapping;
bool operator== (IndexMappingEntry const & A, IndexMappingEntry const & B);
bool operator< (IndexMappingEntry const & A, IndexMappingEntry const & B);
class MonomialExpression {
private:
std::unique_ptr<IndexMapping> index_mapping;
friend class boost::serialization::access;
template <typename Archive>
void serialize(Archive & ar, unsigned int const version);
std::pair<std::vector<Index>, std::vector<Index>> GetFreeAndDummyIndices() const;
public:
MonomialExpression();
MonomialExpression(Tensor const & tensor_set, Indices const & indices_set);
MonomialExpression(MonomialExpression const & other);
bool IsZero() const;
bool ApplySymmetries();
void Sort();
void AddFactorRight(MonomialExpression const & other);
void ExchangeIndices(Indices const & indices1, Indices const & indices2);
void ExchangeFreeIndices(Indices const & indices1, Indices const & indices2);
std::vector<Index> GetFreeIndices() const;
std::vector<Index> GetNonFreeIndices() const;
std::vector<Index> GetDummyIndices() const;
std::vector<Index> GetUnusedIndices() const;
Status ApplySymmetriesToContractions();
Status EliminateGammaGamma();
Status EliminateEtaEta();
Status EliminateMetricMetric(unsigned int const dimension);
Status EliminateEtaPartial();
Status EliminateEtaRankOne();
Status EliminateEpsilon(unsigned int const dimension);
Status EliminateEpsilonI();
std::pair<Indices, Indices> EliminateEpsilonEpsilonI(unsigned int const dimension);
Status EliminateGamma();
Status EliminateDelta(std::string const & delta_name = "delta");
Status EliminateTracefree();
Status ThreePlusOne(std::vector<Index> indices_to_zero);
void RenameDummies();
Rational EvaluateIndices(std::map<Index, size_t> const & evaluation_map) const;
MonomialExpression MultiplyOther(MonomialExpression const & other) const;
bool operator== (MonomialExpression const & other) const;
bool operator!= (MonomialExpression const & other) const;
bool operator< (MonomialExpression const & other) const;
std::string GetLatexString(bool upper = true) const;
static bool CompareReversed (MonomialExpression const & lop, MonomialExpression const & rop);
~MonomialExpression() = default;
};
|
nilsalex/tensor-algebra
|
include/Scalar.h
|
<gh_stars>0
#pragma once
#include <algorithm>
#include <cassert>
#include <map>
#include <set>
#include <string>
#include <boost/serialization/set.hpp>
#include "Rational.h"
class Scalar {
private:
std::multiset<size_t> variables;
Rational coefficient;
friend class boost::serialization::access;
template <typename Archive>
void serialize(Archive & ar, unsigned int const version);
public:
Scalar();
Scalar(Scalar const & other);
Scalar(Rational const & coefficient_set);
Scalar(size_t variable_set);
Scalar(Rational coefficient_set, size_t variable_set);
Rational get_coefficient() const;
std::multiset<size_t> get_variables() const;
size_t Order() const;
size_t VariableNumber() const;
bool ContainsVariable(size_t const variable) const;
size_t RemoveVariable(size_t const variable);
void AddOther(Scalar const & other);
bool CompareVariables(Scalar const & other) const;
bool IsZero() const;
void MultiplyCoefficient(Rational const & coeff);
void DivideCoefficient(Rational const & coeff);
void SubstituteVariables (std::map<size_t, size_t> const & substitution_map);
Scalar MultiplyOther(Scalar const & other) const;
std::string ToString(std::string base_name = "e_", bool plus_sign = false) const;
void DivideByTwo();
void Negate();
bool operator== (Scalar const & other) const;
bool operator< (Scalar const & other) const;
~Scalar() = default;
};
|
nilsalex/tensor-algebra
|
include/Tensor.h
|
<filename>include/Tensor.h
#pragma once
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include <boost/serialization/string.hpp>
#include "Indices.h"
class Tensor {
private:
bool symmetric;
bool antisymmetric;
bool tracefree;
int sort_index;
friend class boost::serialization::access;
template <typename Archive>
void serialize(Archive & ar, unsigned int const version);
protected:
size_t rank;
std::string name;
public:
Tensor ();
Tensor (Tensor const & other);
Tensor (int rank_set, std::string const & name_set = "", int sort_index_set = 0);
std::string get_name () const;
size_t get_rank() const;
void SetSymmetric();
void SetAntisymmetric();
void SetTracefree();
virtual std::vector<std::pair<std::unique_ptr<Indices>, std::unique_ptr<Tensor>>> GetIndexMapping (Indices const & indices) const;
bool IsSymmetric() const;
bool IsAntisymmetric() const;
bool IsTracefree() const;
virtual bool operator< (Tensor const & other) const;
virtual bool operator== (Tensor const & other) const;
virtual bool operator!= (Tensor const & other) const;
virtual ~Tensor() = default;
};
|
nilsalex/tensor-algebra
|
include/ScalarSum.h
|
<gh_stars>0
#pragma once
#include <map>
#include <memory>
#include <set>
#include <string>
#include <vector>
#include <boost/serialization/unique_ptr.hpp>
#include <boost/serialization/vector.hpp>
#include "Scalar.h"
class ScalarSum {
private:
std::unique_ptr<std::vector<std::unique_ptr<Scalar>>> scalars;
friend class boost::serialization::access;
template <typename Archive>
void serialize(Archive & ar, unsigned int const version);
public:
ScalarSum();
ScalarSum(ScalarSum const & other);
ScalarSum(Scalar const & scalar);
bool IsZero() const;
std::string ToString(std::string base_name = "e_", bool plus_sign = false) const;
void Negate();
void DivideByTwo();
void DivideCoefficient(Rational const & coeff);
void MultiplyCoefficient(Rational const & coeff);
Rational Ratio(ScalarSum const & other) const;
void AddScalar(Scalar const & other);
void EliminateVariable(size_t const variable);
void SubstituteVariable(size_t const variable, ScalarSum const & scalar_sum_new);
void SubstituteVariables(std::map<size_t, ScalarSum> substitution_map);
void SubstituteVariables(std::map<size_t, size_t> const & substitution_map);
void MergeWithOther(ScalarSum const & other);
void Sort();
void Collect();
ScalarSum MultiplyOther (ScalarSum const & other) const;
std::set<size_t> CoefficientSet() const;
std::vector<Rational> CoefficientVector(std::map<size_t, size_t> const & coefficient_map) const;
ScalarSum & operator=(ScalarSum const & other);
bool operator== (ScalarSum const & other) const;
bool operator!= (ScalarSum const & other) const;
bool operator< (ScalarSum const & other) const;
~ScalarSum() = default;
};
|
nilsalex/tensor-algebra
|
include/Indices.h
|
#pragma once
#include <map>
#include <set>
#include <string>
#include <vector>
#include <boost/serialization/vector.hpp>
const char alphabet[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
enum class Index {a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z};
class Indices {
private:
std::vector<Index> indices;
friend class boost::serialization::access;
template <typename Archive>
void serialize(Archive & ar, unsigned int const version);
public:
static bool SortIndexVector(std::vector<Index> & vec);
Indices() = default;
Indices(std::initializer_list<Index> list);
Indices(std::initializer_list<char> list);
Indices(std::vector<Index> vec);
Indices(std::set<Index> set);
Indices(Indices const & other);
Indices(Indices const & other, std::map<Index, Index> const & exchange_map);
std::vector<Index> get_vector() const;
void SortAndMakeUnique();
std::string const ToString() const;
size_t size() const;
Index at(size_t pos) const;
bool Sort();
Indices Permutation(std::vector<size_t> const & permutation) const;
Indices SubIndices(size_t start, size_t len) const;
void Replace(Index const i_old, Index const i_new);
Indices Overlap(Indices const & other) const;
bool operator== (Indices const & other) const;
bool operator!= (Indices const & other) const;
bool operator< (Indices const & other) const;
~Indices() = default;
};
|
nilsalex/tensor-algebra
|
include/Rational.h
|
<reponame>nilsalex/tensor-algebra<gh_stars>0
#pragma once
#include <utility>
#include <string>
#include <gmpxx.h>
#include <boost/serialization/utility.hpp>
typedef std::pair<int, unsigned int> Fraction;
class Rational {
private:
Fraction fraction;
friend class boost::serialization::access;
template <typename Archive>
void serialize(Archive & ar, unsigned int const version);
public:
Rational();
Rational(Fraction const & fraction);
Rational(int numerator, unsigned int denominator);
Rational(mpq_class q);
Fraction get_fraction() const;
Rational AddOther (Rational const & other) const;
Rational SubtractOther (Rational const & other) const;
Rational DivideOther (Rational const & other) const;
Rational MultiplyOther (Rational const & other) const;
void DivideByTwo();
void Negate();
bool IsPositive() const;
bool IsNegative() const;
bool IsZero() const;
static unsigned int GreatestCommonDivisor(Fraction const & fraction);
static unsigned int LeastCommonMultiple(Fraction const & fraction);
static Fraction Cancel(Fraction const & fraction);
std::string const ToString(bool plus_sign = false) const;
bool operator== (Rational const & other) const;
bool operator!= (Rational const & other) const;
bool operator< (Rational const & other) const;
bool operator> (Rational const & other) const;
bool operator<= (Rational const & other) const;
bool operator>= (Rational const & other) const;
};
|
dniklaus/wiring-app-debug
|
AppDebug.h
|
<filename>AppDebug.h
/*
* AppDebug.h
*
* Created on: 24.03.2017
* Author: nid
*/
#ifndef LIB_APP_DEBUG_APPDEBUG_H_
#define LIB_APP_DEBUG_APPDEBUG_H_
void setupDebugEnv();
void dbgCliExecute();
void sayHello();
void unrecognized(const char *command);
#endif /* LIB_APP_DEBUG_APPDEBUG_H_ */
|
Ancool/headers
|
MobileTimer/WorldClockViewController.h
|
<gh_stars>1-10
// app
@interface WorldClockViewController : UITableViewController
@end
|
Ancool/headers
|
SpringBoard/SpringBoard.h
|
<gh_stars>1-10
@interface SpringBoard : UIApplication
- (void)applicationOpenURL:(NSURL *)url publicURLsOnly:(BOOL)publicOnly;
- (void)_relaunchSpringBoardNow;
@property (nonatomic, retain) UIWindow *window;
@end
|
Ancool/headers
|
Velox/VeloxFolderViewProtocol.h
|
@protocol VeloxFolderViewProtocol
+ (int)folderHeight;
- (id)initWithFrame:(CGRect)frame;
@optional
- (void)unregisterFromStuff;
@end
|
Ancool/headers
|
SpringBoard/SBBulletinListCell.h
|
<filename>SpringBoard/SBBulletinListCell.h
typedef enum {
SBBulletinListCellAccessoryStyleNone = 0,
SBBulletinListCellAccessoryStyleDot = 1
} SBBulletinListCellAccessoryStyle;
@interface SBBulletinListCell : UITableViewCell
@property SBBulletinListCellAccessoryStyle bulletinAccessoryStyle;
- (id)initWithLinenView:(id)linenView reuseIdentifier:(NSString *)reuseIdentifier;
@end
|
Ancool/headers
|
UIKit/UITableViewHeaderFooterView.h
|
@interface UITableViewHeaderFooterView : UITableViewCell
@end
|
Ancool/headers
|
MobilePhone/RecentsTableViewCell.h
|
#import "RecentCall.h"
@interface RecentsTableViewCell : UITableViewCell
-(RecentCall *)call;
@end
|
Ancool/headers
|
Preferences/PSViewController.h
|
<filename>Preferences/PSViewController.h<gh_stars>1-10
@interface PSViewController : UIViewController
- (id)initForContentSize:(CGSize)contentSize;
@end
|
Ancool/headers
|
SpringBoard/SBHUDController.h
|
#import "SBHUDView.h"
@interface SBHUDController : NSObject
+ (SBHUDController *)sharedHUDController;
- (void)presentHUDView:(SBHUDView *)hud autoDismissWithDelay:(double)delay;
@end
|
Ancool/headers
|
Tweetbot/PTHViewController.h
|
<reponame>Ancool/headers
@interface PTHViewController : UIViewController
@end
|
Ancool/headers
|
UIKit/UIImage+Private.h
|
<reponame>Ancool/headers
@interface UIImage (Private)
+ (UIImage *)kitImageNamed:(NSString *)name;
@end
|
Ancool/headers
|
UIKit/UIStatusBar.h
|
#import "UIStatusBarForegroundView.h"
@interface UIStatusBar : UIView {
UIStatusBarForegroundView *_foregroundView;
}
+ (int)defaultStatusBarStyle;
@end
|
Ancool/headers
|
SpringBoard/SBRotationLockHUDView.h
|
#import "SBHUDView.h"
@interface SBRotationLockHUDView : SBHUDView
@end
|
Ancool/headers
|
SpringBoard/SBApplicationIcon.h
|
#import "SBApplication.h"
typedef enum {
SBApplicationIconFormatSmall, // 29x29
SBApplicationIconFormatSpotlight, // 29x29 / 50x50
SBApplicationIconFormatDefault, // 59x62 / 74x78
SBApplicationIconFormatGameCenter, // 44x45 / 74x78
SBApplicationIconFormatDefaultGrayscale, // 59x62 / 74x78
SBApplicationIconFormatDocumentFull, // 31x37 / 64x64
SBApplicationIconFormatDocumentSmall, // 31x37 / 64x64
SBApplicationIconFormatSquareBig, // 104x104 / 145x148
SBApplicationIconFormatSquareSmall, // 71x71 / 92x94
SBApplicationIconFormatTiny, // 20x20
SBApplicationIconFormatDocument, // 31x37 / 320x320
SBApplicationIconFormatDocumentLarge, // 31x37 / 320x320
} SBApplicationIconFormat;
@interface SBApplicationIcon : NSObject
- (id)initWithApplication:(SBApplication *)application;
- (UIImage *)getIconImage:(SBApplicationIconFormat)image;
@end
|
Ancool/headers
|
SpringBoard/SBBulletinBannerView.h
|
<reponame>Ancool/headers
// 6.0+ only
#import "SBBannerView.h"
@interface SBBulletinBannerView : SBBannerView
@end
|
Ancool/headers
|
SpringBoard/SBBrightnessController.h
|
@interface SBBrightnessController : NSObject
+ (SBBrightnessController *)sharedBrightnessController;
- (void)adjustBacklightLevel:(BOOL)upOrDown;
@end
|
Ancool/headers
|
MobileTimer/WorldClockTableViewCell.h
|
// app
#import "WorldClockCity.h"
@interface WorldClockTableViewCell : UITableViewCell
@property (nonatomic, retain) WorldClockCity *city;
@end
|
Ancool/headers
|
MobileTimer/WorldClockPadViewController.h
|
// app
@interface WorldClockPadViewController : UIViewController
@end
|
Ancool/headers
|
Preferences/PSListController.h
|
#import "PSViewController.h"
@interface PSListController : PSViewController {
NSArray *_specifiers;
}
- (NSArray *)loadSpecifiersFromPlistName:(NSString *)name target:(id)target;
@end
|
Ancool/headers
|
MapKit/MKMapItem.h
|
#import "MKPlacemark.h"
@interface MKMapItem : NSObject
@property(retain) MKPlacemark *placemark;
@property BOOL isCurrentLocation;
+ (NSArray *)mapItemsFromURL:(NSURL *)url options:(id *)options;
@end
|
Ancool/headers
|
SpringBoard/SBHUDView.h
|
@interface SBHUDView : UIView
@property (nonatomic, retain) UIImage *image;
@end
|
Ancool/headers
|
ChatKit/CKMadridEntity.h
|
<gh_stars>1-10
#import "CKIMEntity.h"
// 5.x
@interface CKMadridEntity : CKIMEntity
@end
|
Ancool/headers
|
version.h
|
/**
* CoreFoundation Version Header
*
* by <NAME> <http://hbang.ws>
* WTFPL <http://wtfpl.net>
*
* 2.0 478.23
* 2.1 478.26
* 2.2 478.29
* 3.0 478.47
* 3.1 478.52
* 3.2 478.61
* 4.0 550.32
* 4.1 550.38
* 4.2 550.52
* 4.3 550.58
* 5.0 675.00
* 5.1 690.10
* 6.x 793.00
*/
/**
* iOS 2.0 - 4.2 are defined in CoreFoundation/CFBase.h.
* The format prior to 4.0 is kCFCoreFoundationVersionNumber_iPhoneOS_X_Y
* 4.0 and newer have the format kCFCoreFoundationVersionNumber_iOS_X_Y
*/
#import <CoreFoundation/CFBase.h>
/**
* The weird thing about those #defines is that some newer ones don't
* exist in newer SDKs. Let's define version numbers all the way up to
* the latest.
*/
#ifndef kCFCoreFoundationVersionNumber_iOS_4_3
#define kCFCoreFoundationVersionNumber_iOS_4_3 550.58
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_5_0
#define kCFCoreFoundationVersionNumber_iOS_5_0 675.00
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_5_1
#define kCFCoreFoundationVersionNumber_iOS_5_1 690.10
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_6_0
#define kCFCoreFoundationVersionNumber_iOS_6_0 793.00
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_6_1
#define kCFCoreFoundationVersionNumber_iOS_6_1 793.00
#endif
/**
* Let's also define some useful functions to check which firmware
* the user is on. (Note that feature detection is highly
* recommended where possible)
*
* First up are some general checks of the major version, then
* separate quick macros for checking particular minor versions.
*/
#define IS_IOS_2 (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iPhoneOS_2_0 && kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iPhoneOS_3_0)
#define IS_IOS_3 (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iPhoneOS_3_0 && kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_4_0)
#define IS_IOS_4 (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_4_0 && kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_5_0)
#define IS_IOS_5 (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_5_0 && kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_6_0)
#define IS_IOS_6 (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_6_0)
#define IS_IOS_2_0 (kCFCoreFoundationVersionNumber == kCFCoreFoundationVersionNumber_iPhoneOS_2_0)
#define IS_IOS_2_1 (kCFCoreFoundationVersionNumber == kCFCoreFoundationVersionNumber_iPhoneOS_2_1)
#define IS_IOS_2_2 (kCFCoreFoundationVersionNumber == kCFCoreFoundationVersionNumber_iPhoneOS_2_2)
#define IS_IOS_3_0 (kCFCoreFoundationVersionNumber == kCFCoreFoundationVersionNumber_iPhoneOS_3_0)
#define IS_IOS_3_1 (kCFCoreFoundationVersionNumber == kCFCoreFoundationVersionNumber_iPhoneOS_3_1)
#define IS_IOS_3_2 (kCFCoreFoundationVersionNumber == kCFCoreFoundationVersionNumber_iPhoneOS_3_2)
#define IS_IOS_4_0 (kCFCoreFoundationVersionNumber == kCFCoreFoundationVersionNumber_iOS_4_0)
#define IS_IOS_4_1 (kCFCoreFoundationVersionNumber == kCFCoreFoundationVersionNumber_iOS_4_1)
#define IS_IOS_4_2 (kCFCoreFoundationVersionNumber == kCFCoreFoundationVersionNumber_iOS_4_2)
#define IS_IOS_4_3 (kCFCoreFoundationVersionNumber == kCFCoreFoundationVersionNumber_iOS_4_3)
#define IS_IOS_5_0 (kCFCoreFoundationVersionNumber == kCFCoreFoundationVersionNumber_iOS_5_0)
#define IS_IOS_5_1 (kCFCoreFoundationVersionNumber == kCFCoreFoundationVersionNumber_iOS_5_1)
#define IS_IOS_6_0 (kCFCoreFoundationVersionNumber == kCFCoreFoundationVersionNumber_iOS_6_0)
#define IS_IOS_6_1 (kCFCoreFoundationVersionNumber == kCFCoreFoundationVersionNumber_iOS_6_1)
/**
* Sometimes those functions aren't all that helpful, so
* here's some more that check if the device is on a firmware
* that's older or newer than a version or between two
* specified versions.
*/
#define IS_IOS_OR_OLDER(version) (kCFCoreFoundationVersionNumber <= kCFCoreFoundationVersionNumber_##version)
#define IS_IOS_OR_NEWER(version) (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_##version)
#define IS_IOS_BETWEEN(start, end) (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_##start && kCFCoreFoundationVersionNumber <= kCFCoreFoundationVersionNumber_##end)
|
Ancool/headers
|
SpringBoard/VolumeControl.h
|
@interface VolumeControl : NSObject
- (void)increaseVolume;
- (void)decreaseVolume;
@end
|
Ancool/headers
|
Preferences/PSTableCell.h
|
<reponame>Ancool/headers
#import "PSSpecifier.h"
@interface PSTableCell : UITableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier specifier:(PSSpecifier *)specifier;
@property (nonatomic, retain) id target;
@property SEL action;
@end
|
Ancool/headers
|
Preferences/PSSliderTableCell.h
|
#import "PSControlTableCell.h"
@interface PSSliderTableCell : PSControlTableCell
@end
|
Ancool/headers
|
BulletinBoard/BBBulletin.h
|
@interface BBBulletin : NSObject
@property (retain) NSDictionary *context;
@property (copy) NSString *sectionID;
@property (copy) NSString *message;
@end
|
Ancool/headers
|
SpringBoard/SBApplication.h
|
@interface SBApplication : NSObject
@property (nonatomic, retain) NSString *bundleIdentifier;
@property (nonatomic, retain) NSString *sandboxPath;
@end
|
Ancool/headers
|
UIKit/UIWindow+Private.h
|
@interface UIWindow (Private)
+ (UIWindow *)keyWindow;
@end
|
Ancool/headers
|
ChatKit/CKIMEntity.h
|
<reponame>Ancool/headers<filename>ChatKit/CKIMEntity.h<gh_stars>1-10
#import "CKEntity.h"
@interface CKIMEntity : CKEntity
+ (id)copyEntityForAddressString:(NSString *)address;
@end
|
Ancool/headers
|
MobileTimer/WorldClockCollectionCell.h
|
// app
#import "WorldClockView.h"
#import <UIkit/UICollectionViewCell.h>
@interface WorldClockCollectionCell : UICollectionViewCell
@property (retain, nonatomic) WorldClockView *clockView;
@end
|
Ancool/headers
|
SpringBoard/SBBulletinBannerItem.h
|
<reponame>Ancool/headers<gh_stars>1-10
@interface SBBulletinBannerItem : NSObject
- (BBBulletin *)seedBulletin;
@end
|
Ancool/headers
|
Preferences/Preferences.h
|
<reponame>Ancool/headers
#import "PSListController.h"
|
Ancool/headers
|
AppSupport/CPDistributedMessagingCenter.h
|
@interface CPDistributedMessagingCenter : NSObject
+ (CPDistributedMessagingCenter *)centerNamed:(NSString *)name;
- (void)runServerOnCurrentThread;
- (void)registerForMessageName:(NSString *)messageName target:(id)target selector:(SEL)selector;
- (id)sendMessageAndReceiveReplyName:(NSString *)messageName userInfo:(id)userInfo;
@end
|
Ancool/headers
|
ChatKit/CKMadridService.h
|
#import "CKMadridEntity.h"
// 5.x
@interface CKMadridService : NSObject
- (CKMadridEntity *)copyEntityForAddressString:(NSString *)addressString;
@end
|
Ancool/headers
|
Preferences/PSSpecifier.h
|
@interface PSSpecifier : NSObject
- (id)properties;
@end
|
Ancool/headers
|
UIKit/UICollectionView.h
|
#ifndef __IPHONE_6_0
#import "UICollectionViewCell.h"
@interface UICollectionView : UIView
- (NSIndexPath *)indexPathForCell:(UICollectionViewCell *)cell;
@end
#endif
|
Ancool/headers
|
MobileTimer/WorldClockCity.h
|
// framework
@interface WorldClockCity : NSObject
@property (readonly) NSString *name;
@end
|
Ancool/headers
|
SpringBoard/SBBulletinBannerController.h
|
<reponame>Ancool/headers
@interface SBBulletinBannerController : NSObject
+ (instancetype)sharedInstance;
- (void)showTestBanner;
@end
|
Ancool/headers
|
SpringBoard/SBApplicationController.h
|
#import "SBApplication.h"
@interface SBApplicationController : NSObject
+ (SBApplicationController *)sharedInstance;
- (SBApplication *)applicationWithDisplayIdentifier:(NSString *)bundleIdentifier;
@end
|
Ancool/headers
|
IMFoundation/FZMessage.h
|
<gh_stars>1-10
@interface FZMessage : NSObject
@property unsigned long long flags;
@property (nonatomic, retain) NSString *handle;
@property (nonatomic, retain) NSString *sender;
@property (nonatomic, retain) NSDate *timeRead;
@end
|
Ancool/headers
|
ChatKit/CKEntity.h
|
@interface CKEntity : NSObject
@property (nonatomic, retain) NSString *name;
@end
|
Ancool/headers
|
MobileTimer/WorldClockPadContentView.h
|
// app
#import "WorldClockCollectionView.h"
@interface WorldClockPadContentView : UIView
@property (readonly, assign, nonatomic) WorldClockCollectionView *clocksView;
@end
|
Ancool/headers
|
SpringBoard/SBUserAgent.h
|
<filename>SpringBoard/SBUserAgent.h
@interface SBUserAgent : NSObject
+ (instancetype)sharedUserAgent;
- (NSString *)foregroundApplicationDisplayID;
@end
|
Ancool/headers
|
MobilePhone/RecentCall.h
|
@interface RecentCall : NSObject
- (int)type;
@end
|
Ancool/headers
|
SpringBoard/SBBannerView.h
|
<gh_stars>1-10
// 5.x only
@interface SBBannerView : UIView
@end
|
Ancool/headers
|
Preferences/PSControlTableCell.h
|
<filename>Preferences/PSControlTableCell.h
#import "PSTableCell.h"
@interface PSControlTableCell : PSTableCell
@property (nonatomic, retain) UIControl *control;
@end
|
Ancool/headers
|
UIKit/UIViewController+Private.h
|
@interface UIViewController (Private)
@property (readwrite) UIInterfaceOrientation interfaceOrientation;
@end
|
Ancool/headers
|
SpringBoard/SBStatusBarDataManager.h
|
<filename>SpringBoard/SBStatusBarDataManager.h
typedef struct {
char timeString[64];
} SBStatusBarData;
@interface SBStatusBarDataManager : NSObject
+ (instancetype)sharedDataManager;
- (void)_updateTimeString;
- (void)_dataChanged;
@end
|
Ancool/headers
|
SpringBoard/SBMediaController.h
|
#import "SBApplication.h"
@interface SBMediaController : NSObject
+ (instancetype)sharedInstance;
- (NSDictionary *)_nowPlayingInfo;
- (SBApplication *)nowPlayingApplication;
- (NSString *)nowPlayingTitle;
- (NSString *)nowPlayingArtist;
- (NSString *)nowPlayingAlbum;
@end
|
Ancool/headers
|
MapKit/MKPlacemark.h
|
#import <CoreLocation/CLPlacemark.h>
@interface MKPlacemark : CLPlacemark
@end
|
Ancool/headers
|
UIKit/UIActivityViewController.h
|
#ifndef __IPHONE_6_0
@interface UIActivityViewController : UIViewController
- (id)initWithActivityItems:(NSArray *)items applicationActivities:(NSArray *)applicationActivities;
@end
#endif
|
Ancool/headers
|
CoreLocation/CLPlacemark.h
|
<reponame>Ancool/headers
@interface CLPlacemark : NSObject
@property (readonly) NSDictionary *addressDictionary;
@end
|
Ancool/headers
|
UIKit/UIColor+Private.h
|
<filename>UIKit/UIColor+Private.h
@interface UIColor (Private)
+ (UIColor *)tableCellValue1BlueColor;
@end
|
Ancool/headers
|
UIKit/UIStatusBarForegroundView.h
|
<filename>UIKit/UIStatusBarForegroundView.h
@interface UIStatusBarForegroundView : UIView
@end
|
Ancool/headers
|
MobileTimer/WorldClockView.h
|
<filename>MobileTimer/WorldClockView.h
// app
#import "WorldClockCity.h"
@interface WorldClockView : UIView
@property (readonly, assign, nonatomic) UILabel *nameLabel;
@property (nonatomic, retain) WorldClockCity *city;
@end
|
Ancool/headers
|
UIKit/UICollectionViewCell.h
|
<reponame>Ancool/headers
#ifndef __IPHONE_6_0
@interface UICollectionViewCell : UIView
@end
#endif
|
Ancool/headers
|
UIKit/UIApplication+Private.h
|
<reponame>Ancool/headers<filename>UIKit/UIApplication+Private.h
#import "UIStatusBar.h"
@interface UIApplication (Private)
@property (nonatomic, retain) UIStatusBar *statusBar;
@end
|
Ancool/headers
|
MobileTimer/WorldClockCollectionView.h
|
<filename>MobileTimer/WorldClockCollectionView.h
// app
#import <UIKit/UICollectionView.h>
@interface WorldClockCollectionView : UICollectionView
@end
|
Ancool/headers
|
MobilePhone/RecentsTableViewCellContentView.h
|
<filename>MobilePhone/RecentsTableViewCellContentView.h
@interface RecentsTableViewCellContentView : UIView
@end
|
Ancool/headers
|
Tweetbot/PTHTweetbotStatus.h
|
<reponame>Ancool/headers
@interface PTHTweetbotStatus : NSObject
- (void)retweet:(id)sender;
@end
|
vsemionov/solar-space
|
src/VideoBase.h
|
<filename>src/VideoBase.h<gh_stars>0
/*
* Copyright (C) 2003-2011 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the copyright holder nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef VIDEOBASE_H
#define VIDEOBASE_H
#include "Defs.h"
#define MAX_ANISOTROPY 4.0f
class CVideoBase
{
public:
CVideoBase();
virtual ~CVideoBase();
static void Init();
static bool InitGL();
static void ShutDown();
static bool GetExtBGRA() { return ext_bgra; }
static bool GetExtPointParams() { return ext_point_params; }
static bool GetExtAnisotropic() { return ext_anisotropic; }
static float GetOptGeoDetail() { return opt_geodetail; }
static bool GetOptLinear() { return opt_linear; }
static bool GetOptMipmaps() { return opt_mipmaps; }
static bool GetOptShadows() { return opt_shadows; }
static bool GetOptBumpMaps() { return opt_bumpmaps; }
static bool GetOptLensFlares() { return opt_lensflares; }
static bool GetOptStarTwinkle() { return opt_startwinkle; }
static bool GetOptAntialiasing() { return opt_antialiasing; }
static bool GetOptAnisotropic() { return opt_anisotropic; }
static void EnableMultisample();
static void DisableMultisample();
private:
static bool IsExtensionSupported(const char *string, const char *search);
static void GetVersion(int *major, int *minor, int *patch);
static void GetExtensions();
static void SetOptions();
static bool ext_bgra;
static bool ext_point_params;
static bool ext_anisotropic;
static float opt_geodetail;
static bool opt_linear;
static bool opt_mipmaps;
static bool opt_shadows;
static bool opt_bumpmaps;
static bool opt_lensflares;
static bool opt_startwinkle;
static bool opt_antialiasing;
static bool opt_anisotropic;
};
#endif
|
vsemionov/solar-space
|
src/Text.h
|
<reponame>vsemionov/solar-space
/*
* Copyright (C) 2003-2011 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the copyright holder nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef TEXT_H
#define TEXT_H
#include <ft2build.h>
#include <freetype/freetype.h>
#include <freetype/ftglyph.h>
#include <freetype/ftoutln.h>
#include <freetype/fttrigon.h>
#include "Defs.h"
#define NUM_CHARS 128
typedef FT_Error (*ptr_FT_Init_FreeType)(FT_Library *);
typedef FT_Error (*ptr_FT_Done_FreeType)(FT_Library);
typedef FT_Error (*ptr_FT_New_Face)(FT_Library, const char *, FT_Long, FT_Face *);
typedef FT_Error (*ptr_FT_Done_Face)(FT_Face);
typedef FT_Error (*ptr_FT_Set_Char_Size)(FT_Face, FT_F26Dot6, FT_F26Dot6, FT_UInt, FT_UInt);
typedef FT_UInt (*ptr_FT_Get_Char_Index)(FT_Face, FT_ULong);
typedef FT_Error (*ptr_FT_Load_Glyph)(FT_Face, FT_UInt, FT_Int32);
typedef void (*ptr_FT_Done_Glyph)(FT_Glyph);
typedef FT_Error (*ptr_FT_Get_Glyph)(FT_GlyphSlot, FT_Glyph *);
typedef FT_Error (*ptr_FT_Glyph_To_Bitmap)(FT_Glyph *, FT_Render_Mode, FT_Vector *, FT_Bool);
class CText
{
public:
CText();
virtual ~CText();
bool BuildOutlineFont(const char *name, int size, bool bold, bool italic, bool underline, bool strikeout, float thickness);
static bool Init();
static void Shutdown();
void Free();
bool BuildFTFont(const char *name, int size);
void Print(const char *fmt, ...);
bool GetTextSize(const char *text, float *width, float *height);
private:
void Construct();
static bool MakeFTChar(FT_Face face, char ch, int list_base, int textures[NUM_CHARS], float charsizes[NUM_CHARS][2], bool mipmaps);
static int next_p2 (int a);
bool UseFT;
bool loaded;
int listbase;
float charsize[NUM_CHARS][2];
float charheight;
int FT_tex[NUM_CHARS];
float sizescale;
// FreeType functions:
static bool FreeType_loaded;
static HMODULE FreeType;
static ptr_FT_Init_FreeType pFT_Init_FreeType;
static ptr_FT_Done_FreeType pFT_Done_FreeType;
static ptr_FT_New_Face pFT_New_Face;
static ptr_FT_Done_Face pFT_Done_Face;
static ptr_FT_Set_Char_Size pFT_Set_Char_Size;
static ptr_FT_Get_Char_Index pFT_Get_Char_Index;
static ptr_FT_Load_Glyph pFT_Load_Glyph;
static ptr_FT_Done_Glyph pFT_Done_Glyph;
static ptr_FT_Get_Glyph pFT_Get_Glyph;
static ptr_FT_Glyph_To_Bitmap pFT_Glyph_To_Bitmap;
};
#endif
|
vsemionov/solar-space
|
src/res/resource.h
|
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by Solar Space.rc
//
#define IDS_DESC 1
#define IDD_PREVIEW 101
#define IDD_CONFIG 102
#define IDD_SHOWLOG 103
#define IDI_SOLSPACE 111
#define IDI_SETTINGS 112
#define IDB_PREVIEW 121
#define IDC_R640 1000
#define IDC_R800 1001
#define IDC_R1024 1002
#define IDC_RLOW 1010
#define IDC_RMED 1011
#define IDC_RHIGH 1012
#define IDC_CKDEFRES 1020
#define IDC_CKINFO 1021
#define IDC_CKCLOCK 1022
#define IDC_CMBSYSTEMS 1030
#define IDC_WEBSITE 1050
#define IDC_ABOUT 1060
#define IDC_BLOG 1100
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 120
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1070
#define _APS_NEXT_SYMED_VALUE 201
#endif
#endif
|
vsemionov/solar-space
|
src/Settings.h
|
/*
* Copyright (C) 2003-2011 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the copyright holder nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SETTINGS_H
#define SETTINGS_H
#include "Defs.h"
#include "Body.h"
class CSettings
{
public:
CSettings();
virtual ~CSettings();
static HWND hwnd;
static DWORD PasswordDelay;
static DWORD MouseThreshold;
static BOOL MuteSound;
static POINT InitCursorPos;
static DWORD InitTime;
static BOOL IsDialogActive;
static BOOL ReallyClose;
static BOOL PasswordOK;
//user settings:
static int Resolution;
static int Graphics;
static BOOL DesktopRes;
static BOOL ShowInfo;
static BOOL ShowClock;
static char DataDir[MAX_PATH];
static char DataFile[MAX_PATH];
static BOOL RandomDataFile;
/////
static void Init();
static void Free();
static void ReadGeneralRegistry();
static void ReadCommonRegistry();
static void ReadConfigRegistry();
static void WriteConfigRegistry();
static void CloseSaverWindow();
static void StartDialog();
static void EndDialog();
static bool BuildFileList();
static void RandomizeDataFile();
//////
struct stardrs_s
{
char filename[MAX_PATH];
char systemname[SYSTEM_NAME_SIZE];
stardrs_s *prev;
stardrs_s *next;
};
static stardrs_s filechain;
static int numfiles;
};
#endif
|
vsemionov/solar-space
|
src/Defs.h
|
/*
* Copyright (C) 2003-2011 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the copyright holder nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef DEFS_H
#define DEFS_H
#ifndef __cplusplus
typedef enum{false,true} bool;
#endif
#define TEAM_NAME "vsemionov"
#define APP_NAME "Solar Space"
#define APP_VERSION "1.2b1"
#define APP_DESCRIPTION "A three-dimensional, animated screen saver for Windows, showing a view of the Solar System"
#define WEBSITE_URL "http://www.vsemionov.org/solar-space/"
#define CLAMP(val,valmin,valmax) { val=max(min(val,valmax),valmin); }
#ifdef _DEBUG
#define DEBUG TRUE
//#define USE_ZLOG
#else
#define DEBUG FALSE
#endif
#ifdef USE_ZLOG
#include <zlog.h>
#pragma comment(lib,"zlog.lib")
#endif
#ifdef _MSC_VER
#pragma warning(disable: 4996)
#endif
#endif
|
vsemionov/solar-space
|
src/StarMap.h
|
/*
* Copyright (C) 2003-2011 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the copyright holder nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STARMAP_H
#define STARMAP_H
#include "Defs.h"
class CStarMap
{
public:
CStarMap();
virtual ~CStarMap();
bool Load();
void Free();
void Draw();
private:
typedef struct
{
double Dec;
double RA;
float mag;
float pos[3];
float size;
float color[3];
} stardata_s;
void Init();
bool LoadStars();
bool GenStars();
void PrepColor();
void PrepData();
void InitGL();
void DrawStars();
int object;
int num_stars;
bool twinkle;
stardata_s *stars;
float point_size;
};
#endif
|
vsemionov/solar-space
|
src/Clock.h
|
<reponame>vsemionov/solar-space<filename>src/Clock.h
/*
* Copyright (C) 2003-2011 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the copyright holder nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CLOCK_H
#define CLOCK_H
#include "Defs.h"
class CClock
{
public:
CClock();
virtual ~CClock();
bool Load();
void Free();
void Update();
void Draw();
private:
void Init();
bool ParseSpecsFile(CLoader *loader);
int textures[12];
int cur_tex[6];
int scrwidth,scrheight;
int digit_tex_max;
int digit_w, digit_h;
float digit_s, digit_t;
float color_r, color_g, color_b, color_a;
char tex_names[12][16];
};
#endif
|
vsemionov/solar-space
|
src/GamePlay.h
|
/*
* Copyright (C) 2003-2011 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the copyright holder nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef GAMEPLAY_H
#define GAMEPLAY_H
#include "Defs.h"
#include "Body.h"
#include "Camera.h"
#include "StarMap.h"
#include "Clock.h"
#include "Text.h"
#include "Info.h"
#include "LensFlare.h"
class CGamePlay
{
public:
CGamePlay();
virtual ~CGamePlay();
static bool Init();
static void ShutDown();
static void Frame();
static void UpdateSplash(const char *subtext);
static bool UserAbortedLoad();
static void OnUserAbortLoad();
private:
struct splash_rect
{
int x1;
int x2;
int y1;
int y2;
};
static void InitTimer();
static void ShutdownTimer();
static void CalcSplashRect();
static bool LoadSplash();
static void FreeSplash();
static void RenderSplashInner(const char *text);
static void DrawSplash(const char *text);
static void SetSplashText(const char *text);
static bool FadeOutSplash();
static void InitLight();
static bool InitScene();
static void DestroyScene();
static void UpdateScene();
static void DrawScene();
static void Prepare2D(int width, int height);
static void Restore3D();
static int splash_tex;
static char load_text[256];
static splash_rect splash_pos;
static CBody mainbody;
static CCamera camera;
static CStarMap starmap;
static CClock clock;
static CLensFlare lensflare;
static CText splashtext;
static CInfo info;
static bool have_flares;
static bool have_info;
static bool have_clock;
static UINT timer_res;
};
#endif
|
vsemionov/solar-space
|
src/Loader.h
|
<reponame>vsemionov/solar-space<gh_stars>0
/*
* Copyright (C) 2003-2011 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the copyright holder nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LOADER_H
#define LOADER_H
#include "Defs.h"
#include "Resource.h"
class CLoader : public CResource
{
public:
typedef struct vertex_s
{
float point[3];
float normal[3];
float tex_coords[2];
} vertex_t;
typedef struct face_s
{
int vertexnum[3];
float normal[3];
} face_t;
typedef struct object_s
{
int numvertices;
int numfaces;
vertex_t *vertices;
face_t *faces;
} object_t;
CLoader();
virtual ~CLoader();
bool Init();
void ShutDown();
bool WithResource(const char *filename);
void End();
int LoadRaw(const char *entryname, void **buffer);
#ifndef LOADER_NO_GFX
int LoadImage(const char *entryname, int *width, int *height, void **buffer, bool convert_bgr_rgb=true);
int LoadTexture(const char *imagemap, const char *alphamap, bool mipmaps, bool linear, bool anisotropic);
#endif // LOADER_NO_GFX
bool ExtractFile(const char *entryname, const char *destfile);
bool LoadText(const char *entryname, char ***lines, int *numlines);
object_t *LoadObject(const char *entryname);
private:
#ifndef LOADER_NO_GFX
static bool ResizeImage(void **pImage, int *width, int *height);
#endif // LOADER_NO_GFX
};
#endif
|
vsemionov/solar-space
|
src/Resource.h
|
/*
* Copyright (C) 2003-2011 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the copyright holder nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef RESOURCE_H
#define RESOURCE_H
#include <windows.h>
#include "Defs.h"
#include <stdio.h>
#include <stdint.h>
#include "NameTree.h"
#define NUM_RES_ENTRIES 512
class CResource
{
public:
CResource();
virtual ~CResource();
bool OpenResource(const char *filename);
void CloseResource();
int FindEntry(const char *entryname);
bool ReadEntry(void *buffer, int entrynum);
bool ReadEntryEx(void *buffer, int entrynum, int offset, int size);
const char *GetEntryName(int entrynum);
int GetEntrySize(int entrynum);
protected:
FILE *drs;
private:
bool Init();
void ShutDown();
typedef struct
{
char fname[13];
uint32_t foffset;
uint32_t fsize;
} drstableentry_t;
typedef drstableentry_t drstable_t[NUM_RES_ENTRIES];
drstable_t drstable;
CNameTree nametree;
char path[MAX_PATH];
void DestroyNameTree();
bool BuildNameTree();
int SearchNameTree(const char *name);
int FindEntryBrutal(const char *entryname);
};
#endif
|
vsemionov/solar-space
|
src/Info.h
|
<reponame>vsemionov/solar-space
/*
* Copyright (C) 2003-2011 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the copyright holder nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef INFO_H
#define INFO_H
#include "Defs.h"
#include "Text.h"
class CInfo
{
public:
CInfo();
virtual ~CInfo();
bool Load();
void Free();
void Start(float seconds, float duration, char *targetname, CBody *targetbody);
void Update(float seconds);
void Restart();
void Draw();
private:
void Init();
void MakeWindow(int list);
void GetNameCoords(const char *text, int *x, int *y);
void GetInfoCoords(int linenum, int *x, int *y);
void MakeInfoLine(int linenum, char *line);
void MakeName(int list, char *targetname);
void MakeInfo(int list, CBody *targetbody);
bool loaded;
CText nametext;
CText infotext;
int scrwidth;
int scrheight;
int winlist;
int namelist;
int infolist;
float starttime;
float endtime;
float fadetime;
float time;
float alpha;
};
#endif
|
vsemionov/solar-space
|
src/Camera.h
|
/*
* Copyright (C) 2003-2011 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the copyright holder nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CAMERA_H
#define CAMERA_H
#include "Defs.h"
#include "Info.h"
#define CAMERA_INIT_TIME 3.0f
#define CAMERA_INIT_FADE_TIME 2.0f // must be greater than RESTART_TIME (in CGamePlay.cpp)
class CCamera
{
public:
CCamera();
virtual ~CCamera();
void Init(CBody *refbody, CInfo *info, int scrwidth, int scrheight);
void Update(float seconds);
void Set(float x, float y, float z, float yaw, float pitch);
void Move(float forward, float right, float up, float yaw, float pitch);
void ApplyRotation();
void ApplyTranslation();
void Apply();
void DrawFade();
void Get(float *x, float *y, float *z, float *yaw, float *pitch);
void ApplyFOV();
double GetFOV() { return fov; };
void Restart(float seconds);
bool fade;
private:
void GenWideCam(float *len, float *pitch, float yaw);
void ChangeCam();
void Angles(float x, float y, float z, float *yaw, float *pitch);
CBody *mainbody;
CInfo *planetinfo;
double aspect;
int scrwidth,scrheight;
float cx,cy,cz;
float cyaw,cpitch;
double fov;
typedef enum {shooting=0, zoomingout, moving, pointing, zoomingin} action_e;
typedef struct {bool chaseor,chasepos; bool children;} type_s;
action_e action;
type_s type;
float ex,ey,ez;
float nx,ny,nz;
int target;
float targetsize;
float starttime,endtime;
float fadealpha;
};
#endif
|
vsemionov/solar-space
|
src/LensFlare.h
|
<reponame>vsemionov/solar-space
/*
* Copyright (C) 2003-2011 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the copyright holder nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LENSFLARE_H
#define LENSFLARE_H
#include "Defs.h"
#include "Tensor.h"
class CBody;
class CLensFlare
{
public:
CLensFlare();
virtual ~CLensFlare();
bool Load(CBody *star);
void Free();
void Draw();
void UpdateTime(float seconds);
void UpdatePos();
void Restart();
private:
void Init();
bool ComputePoints(CBody *star);
bool IsPointVisible(const Vector *p);
bool ParseSpecsFile(CLoader *loader);
int FindPrevTex(int current);
Vector *points;
double modelview[16];
double projection[16];
int viewport[4];
int vispts;
float flareX, flareY, flareZ;
float time, lasttime, starttime, endtime;
float alpha, lastalpha, startalpha, endalpha;
float DaDt;
typedef struct { float pos; float size; float color[3]; } flaredata_s;
flaredata_s *flaredata;
float sizefactor;
int num_flares;
int *textures;
char **tex_names;
};
#endif
|
vsemionov/solar-space
|
src/Body.h
|
<reponame>vsemionov/solar-space
/*
* Copyright (C) 2003-2011 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the copyright holder nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef BODY_H
#define BODY_H
#include <gl/glu.h>
#include "Defs.h"
#include "Loader.h"
#include "LensFlare.h"
#define SYSTEM_NAME_SIZE 32
class CBody
{
friend class CCamera;
friend class CLensFlare;
friend class CInfo;
public:
CBody();
virtual ~CBody();
bool Load();
void Destroy();
void Update(float seconds);
void Restart();
void Draw(CLensFlare *flare);
bool Reload();
void Predict(int bodyid, bool now, float seconds, float *x, float *y, float *z);
float GetRadius(int bodyid, bool withchildren);
static bool LoadSystemData(char *resource=NULL, int *format_version=&CBody::system_format_version, char *buffer=CBody::systemname,bool quiet=false);
private:
static int numbodies;
void Init();
void UpdateOrbit(float seconds);
void TransformPosition();
void TransformClouds();
void DrawSortedNonSolids();
static bool LoadMultipliers();
bool LoadPhys();
bool LoadInfo();
bool LoadTextures();
void RenderDisk();
void MakeStar(GLUquadricObj *quadric);
void MakePlanetoid(GLUquadricObj *quadric);
void MakeRings();
void MakeAsteroid();
bool LoadGFX();
bool CheckGFX();
void FreeGFX();
void DrawGFX();
float maxchilddist;
static CLoader loader;
typedef enum {star=0, planetoid=1, rings=2, asteroid=3} bodytype_e;
static char **textlines;
static int numlines;
static int lineindex;
bool mainbody;
int id;
//system data:
static int system_format_version;
static char systemname[SYSTEM_NAME_SIZE];
//body phys data:
char name[32];
char tex_names[4][2][16];
char obj_name[16];
char info_name[16];
//base&calculations data:
bodytype_e type;
float distance;
float radius;
float shape;
float orbit_period;
float own_period;
float own_rot_start, orbit_rot_start;
float clouds_period, clouds_rot_start;
static float distmult;
static float radmult;
static float orbtimemult;
static float owntimemult;
//drawing data:
float orb_incl[4];
float orb_pos[2];
float own_incl[4];
float own_rot, orbit_rot;
float clouds_offset;
//GL stuff:
int objects[4];
int textures[4];
//subbodies:
int numsubbodies;
CBody *subbodies;
static CBody **bodycache;
//rings z-order chain:
CBody *nextring, *prevring;
static CBody ringchain;
float objectmatrix[16];
float objecteyez;
void SortNonSolidObject();
void CalcMaxChildDist();
struct
{
int numlines;
char **textlines;
} info;
};
#endif
|
vsemionov/solar-space
|
src/Log.h
|
<reponame>vsemionov/solar-space
/*
* Copyright (C) 2003-2011 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the copyright holder nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LOG_H
#define LOG_H
#include "Defs.h"
#define MESSAGE_MAXLEN 256
#define LOG_INFO 0
#define LOG_WARN (LOG_INFO+1)
#define LOG_ERROR (LOG_WARN+1)
#define LOG_FATAL (LOG_ERROR+1)
class CLog
{
public:
CLog();
virtual ~CLog();
static void Init();
static void Clear();
static void Log(int level, const char *message);
static int GetCount() { return numentries; }
static bool ProblemsOccured() { return (numproblems!=0); }
static void Rewind();
static bool GetNextEntry(int *level, char *message, int maxlen=MESSAGE_MAXLEN);
static void Pause() { logging=false; }
static void Continue() { logging=true; }
private:
static void CopyString(char *dest, const char *src, int maxlen=MESSAGE_MAXLEN);
struct entry_s
{
int level;
char message[256];
entry_s *prev;
entry_s *next;
};
static entry_s entrychain;
static entry_s *logmarker;
static int numentries;
static int numproblems;
static bool logging;
};
#endif
|
vsemionov/solar-space
|
src/Window.h
|
<reponame>vsemionov/solar-space
/*
* Copyright (C) 2003-2011 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the copyright holder nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef WINDOW_H
#define WINDOW_H
#include "Defs.h"
class CWindow
{
public:
CWindow();
virtual ~CWindow();
static int prev_p2(int a);
static void CenterWindow(HWND hwnd, bool relative, bool snap);
static bool Create(HWND hParent);
static void Destroy();
static int GetWidth() { return winwidth; };
static int GetHeight() { return winheight; };
static int IsMultisampleActive() { return multisample; };
protected:
static LRESULT CALLBACK WindowProc(HWND hwnd, UINT umsg, WPARAM wparam, LPARAM lparam);
static DWORD WINAPI PasswordThread(LPVOID lpParameter);
private:
static bool ChangeVideoMode(int width, int height);
static bool RestoreVideoMode();
static bool isWGLExtensionSupported(const char *extension);
static bool InitMultisample(HDC hDC, int zbits, GLuint *pixel_format);
static bool CreateSaverWindow(HWND hParent, DWORD dwStyle, DWORD dwExStyle, int width, int height, const GLuint *pixel_format);
static void DestroySaverWindow();
static HWND hwnd;
static HDC hDC;
static HGLRC hRC;
static int winwidth;
static int winheight;
static bool multisample;
};
#endif
|
vsemionov/solar-space
|
src/NameTree.h
|
<gh_stars>0
/*
* Copyright (C) 2003-2011 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the copyright holder nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef NAMETREE_H
#define NAMETREE_H
#include "Defs.h"
class CNameTree
{
public:
CNameTree();
virtual ~CNameTree();
bool AddLeaf(const char *name, int id);
void Destroy();
int FindLeaf(const char *name);
private:
void Init();
struct node_s
{
char ch;
int id;
node_s *sub;
node_s *prev, *next;
};
bool AddBranch(node_s *chain, const char *string, int id);
int SearchBranch(node_s *chain, const char *string);
bool NewBranch(node_s *node);
void InsertNode(node_s *node, node_s *before);
node_s *NewNode(char ch, int id);
node_s *FindNode(node_s *chain, char ch);
void RemoveNode(node_s *node);
void FreeNode(node_s *node);
void FreeList(node_s *chain);
node_s nodechain;
};
#endif
|
kiding/DSCapture.framework
|
DSCapture/DSCapture/DSCaptureFullController.h
|
#import <Foundation/Foundation.h>
@interface DSCaptureFullController : NSObject
{
id callbackTarget;
SEL callbackSelector;
}
- (id) init;
- (void) captureWithTarget: (id) target
selector: (SEL) selector
useCG: (BOOL) cg;
@end
|
kiding/DSCapture.framework
|
DSCapture/DSCapture/DSCaptureSelectionController.h
|
#import "DSCaptureData.h"
@interface DSCaptureSelectionController : NSObject <NSWindowDelegate>
{
id callbackTarget;
SEL callbackSelector;
// for CoreGraphics
NSMutableArray *selectionWindowArray;
}
- (id) init;
- (void) captureWithTarget: (id) target
selector: (SEL) selector
useCG: (BOOL) cg;
@end
|
kiding/DSCapture.framework
|
DSCapture/DSCapture/DSCaptureSelectionWindow.h
|
#import "DSCaptureSelectionView.h"
@interface DSCaptureSelectionWindow : NSWindow
{
CGDirectDisplayID displayID;
NSRect displayRect;
NSPoint originPoint;
NSRect viewRect;
BOOL isSelectionDone;
CGRect selectionRect;
NSTrackingArea *trackingArea;
DSCaptureSelectionView *selectionView;
}
@property (readonly) CGDirectDisplayID displayID;
@property (readonly) NSRect displayRect;
@property (readonly) BOOL isSelectionDone;
@property (readonly) CGRect selectionRect;
- (BOOL)canBecomeKeyWindow;
- (BOOL)acceptsFirstResponder;
- (BOOL)acceptsMouseMovedEvents;
- (id) initWithScreen: (NSScreen *) screen;
- (void)display;
- (void)mouseEntered:(NSEvent *)theEvent;
- (void)mouseMoved:(NSEvent *)theEvent;
- (void)mouseDown:(NSEvent *)theEvent;
- (void)mouseDragged:(NSEvent *)theEvent;
- (void)mouseUp:(NSEvent *)theEvent;
- (void)keyDown:(NSEvent *)theEvent;
- (void)close;
@end
|
kiding/DSCapture.framework
|
DSCapture/DSCapture/DSCaptureData.h
|
#import <Foundation/Foundation.h>
@interface DSCaptureData : NSObject
{
NSMutableArray *data;
NSMutableArray *image;
}
+ (id) data;
- (id) init;
- (void) addCaptureData: (NSData *) newData;
- (NSUInteger) count;
- (NSData *) dataAtIndex: (NSUInteger) index;
- (NSImage *) imageAtIndex: (NSUInteger) index;
@end
|
kiding/DSCapture.framework
|
DSCapture/DSCapture/DSCapture.h
|
<gh_stars>10-100
#import "DSCaptureData.h"
#import "DSCaptureFullController.h"
#import "DSCaptureSelectionController.h"
@interface DSCapture : NSObject
{
DSCaptureFullController *full;
DSCaptureSelectionController *selection;
}
+ (DSCapture *) sharedCapture;
- (DSCaptureFullController *) full;
- (DSCaptureSelectionController *) selection;
@end
|
kiding/DSCapture.framework
|
DSCapture/DSCapture/DSCaptureSelectionView.h
|
#import <Cocoa/Cocoa.h>
@interface DSCaptureSelectionView : NSView
- (void)drawRect:(NSRect)dirtyRect;
@end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.