diff -Nru pcsxr-unstable-1.9.94+svn97809/debian/changelog pcsxr-unstable-1.9.94+svn98108/debian/changelog --- pcsxr-unstable-1.9.94+svn97809/debian/changelog 2015-10-30 10:55:04.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/debian/changelog 2016-06-30 17:24:38.000000000 +0000 @@ -1,3 +1,10 @@ +pcsxr-unstable (1.9.94+svn98108-1~ppa+wily0) wily; urgency=low + + * Update release. + * Make dh_auto_test work (09-make_check_po.patch). + + -- Thanh Tung Nguyen Thu, 30 Jun 2016 18:59:57 +0100 + pcsxr-unstable (1.9.94+svn97809-1~ppa+wily1) wily; urgency=low * Initial release. diff -Nru pcsxr-unstable-1.9.94+svn97809/debian/copyright pcsxr-unstable-1.9.94+svn98108/debian/copyright --- pcsxr-unstable-1.9.94+svn97809/debian/copyright 2015-01-31 16:29:24.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/debian/copyright 2016-06-30 17:04:28.000000000 +0000 @@ -3,11 +3,11 @@ Source: https://pcsxr.codeplex.com/SourceControl/changeset/*# Files: * -Copyright: 2007-2015 PCSX-Reloaded Team +Copyright: 2007-2016 PCSX-Reloaded Team License: GPL-3.0+ Files: debian/* -Copyright: 2013-2015 Nguyen Thanh Tung +Copyright: 2013-2016 Nguyen Thanh Tung License: GPL-3.0+ License: GPL-3.0+ diff -Nru pcsxr-unstable-1.9.94+svn97809/debian/patches/09-make_check_po.patch pcsxr-unstable-1.9.94+svn98108/debian/patches/09-make_check_po.patch --- pcsxr-unstable-1.9.94+svn97809/debian/patches/09-make_check_po.patch 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/debian/patches/09-make_check_po.patch 2016-06-30 17:18:54.000000000 +0000 @@ -0,0 +1,5 @@ +--- /dev/null ++++ b/po/POTFILES.skip +@@ -0,0 +1,2 @@ ++macosx/Source/Plugin.c ++macosx/plugins/DFInput/macsrc/cfg.c diff -Nru pcsxr-unstable-1.9.94+svn97809/debian/patches/series pcsxr-unstable-1.9.94+svn98108/debian/patches/series --- pcsxr-unstable-1.9.94+svn97809/debian/patches/series 2014-10-10 13:35:03.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/debian/patches/series 2016-06-30 17:12:34.000000000 +0000 @@ -6,3 +6,4 @@ 06-ac_build_multiple_sound_plugins.patch 07-stdafx_oss4.patch 08-subdirs_objects_automake.patch +09-make_check_po.patch diff -Nru pcsxr-unstable-1.9.94+svn97809/debian/rules pcsxr-unstable-1.9.94+svn98108/debian/rules --- pcsxr-unstable-1.9.94+svn97809/debian/rules 2015-09-27 15:09:52.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/debian/rules 2016-06-30 17:18:03.000000000 +0000 @@ -5,7 +5,6 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+all export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed -export DEB_BUILD_OPTIONS=parallel=$(shell grep processor /proc/cpuinfo | wc -l) PREFIXDIR=/usr BUILDDIR=build @@ -19,13 +18,12 @@ override_dh_auto_clean: dh_auto_clean --parallel - rm -f config.log po/POTFILES + rm -f config.log + cd po && rm -f missing override_dh_auto_configure: CC=clang CXX=clang++ dh_auto_configure --parallel -- $(CONFIG) -override_dh_auto_test : - override_dh_auto_install: dh_auto_install --parallel --destdir=$(CURDIR)/$(INSTALLDIR) diff -Nru pcsxr-unstable-1.9.94+svn97809/libpcsxcore/cdriso.c pcsxr-unstable-1.9.94+svn98108/libpcsxcore/cdriso.c --- pcsxr-unstable-1.9.94+svn97809/libpcsxcore/cdriso.c 2015-09-27 14:56:12.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/libpcsxcore/cdriso.c 2016-06-30 16:53:15.000000000 +0000 @@ -336,7 +336,7 @@ // this function tries to get the .toc file of the given .bin // the necessary data is put into the ti (trackinformation)-array static int parsetoc(const char *isofile) { - char tocname[MAXPATHLEN]; + char tocname[MAXPATHLEN], filename[MAXPATHLEN], *ptr; FILE *fi; char linebuf[256], tmp[256], name[256]; char *token; @@ -375,6 +375,14 @@ } } + strcpy(filename, tocname); + if ((ptr = strrchr(filename, '/')) == NULL) + ptr = strrchr(filename, '\\'); + if (ptr == NULL) + *ptr = 0; + else + *(ptr + 1) = 0; + memset(&ti, 0, sizeof(ti)); cddaBigEndian = TRUE; // cdrdao uses big-endian for CD Audio @@ -425,6 +433,8 @@ else { sscanf(linebuf, "DATAFILE \"%[^\"]\" %8s", name, time); tok2msf((char *)&time, (char *)&ti[numtracks].length); + strcat(filename, name); + ti[numtracks].handle = fopen(filename, "rb"); } } else if (!strcmp(token, "FILE")) { @@ -464,6 +474,8 @@ } } } + if (numtracks > 0) + cdHandle = fopen(filename, "rb"); fclose(fi); diff -Nru pcsxr-unstable-1.9.94+svn97809/libpcsxcore/psxbios.c pcsxr-unstable-1.9.94+svn98108/libpcsxcore/psxbios.c --- pcsxr-unstable-1.9.94+svn97809/libpcsxcore/psxbios.c 2015-09-27 14:56:13.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/libpcsxcore/psxbios.c 2016-06-30 16:53:16.000000000 +0000 @@ -615,14 +615,14 @@ void psxBios_bcopy() { // 0x27 char *p1 = (char *)Ra1, *p2 = (char *)Ra0; - while (a2-- > 0) *p1++ = *p2++; + while ((s32)a2-- > 0) *p1++ = *p2++; pc0 = ra; } void psxBios_bzero() { // 0x28 char *p = (char *)Ra0; - while (a1-- > 0) *p++ = '\0'; + while ((s32)a1-- > 0) *p++ = '\0'; pc0 = ra; } @@ -632,7 +632,7 @@ if (a0 == 0 || a1 == 0) { v0 = 0; pc0 = ra; return; } - while (a2-- > 0) { + while ((s32)a2-- > 0) { if (*p1++ != *p2++) { v0 = *p1 - *p2; // BUG: compare the NEXT byte pc0 = ra; @@ -645,7 +645,7 @@ void psxBios_memcpy() { // 0x2a char *p1 = (char *)Ra0, *p2 = (char *)Ra1; - while (a2-- > 0) *p1++ = *p2++; + while ((s32)a2-- > 0) *p1++ = *p2++; v0 = a0; pc0 = ra; } @@ -679,9 +679,9 @@ a2++; // BUG: copy one more byte here p1 += a2; p2 += a2; - while (a2-- > 0) *--p1 = *--p2; + while ((s32)a2-- > 0) *--p1 = *--p2; } else { - while (a2-- > 0) *p1++ = *p2++; + while ((s32)a2-- > 0) *p1++ = *p2++; } v0 = a0; pc0 = ra; @@ -694,7 +694,7 @@ void psxBios_memchr() { // 0x2e char *p = (char *)Ra0; - while (a2-- > 0) { + while ((s32)a2-- > 0) { if (*p++ != (s8)a1) continue; v0 = a0 + (p - (char *)Ra0 - 1); pc0 = ra; diff -Nru pcsxr-unstable-1.9.94+svn97809/libpcsxcore/psxinterpreter.c pcsxr-unstable-1.9.94+svn98108/libpcsxcore/psxinterpreter.c --- pcsxr-unstable-1.9.94+svn97809/libpcsxcore/psxinterpreter.c 2015-09-27 14:56:14.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/libpcsxcore/psxinterpreter.c 2016-06-30 16:53:17.000000000 +0000 @@ -504,14 +504,24 @@ * Format: OP rs, rt * *********************************************************/ void psxDIV() { - if (_i32(_rRt_) != 0) { - _i32(_rLo_) = _i32(_rRs_) / _i32(_rRt_); - _i32(_rHi_) = _i32(_rRs_) % _i32(_rRt_); + if (!_i32(_rRt_)) { + if (_i32(_rRs_) & 0x80000000) { + _i32(_rLo_) = 1; + } + else { + _i32(_rLo_) = 0xFFFFFFFF; + _i32(_rHi_) = _i32(_rRs_); + } } + else if (_i32(_rRs_) == 0x80000000 && _i32(_rRt_) == 0xFFFFFFFF) { + _i32(_rLo_) = 0x80000000; + _i32(_rHi_) = 0; + } else { - _i32(_rLo_) = 0xffffffff; - _i32(_rHi_) = _i32(_rRs_); + _i32(_rLo_) = _i32(_rRs_) / _i32(_rRt_); + _i32(_rHi_) = _i32(_rRs_) % _i32(_rRt_); } + } void psxDIVU() { diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Info.plist pcsxr-unstable-1.9.94+svn98108/macosx/Info.plist --- pcsxr-unstable-1.9.94+svn97809/macosx/Info.plist 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Info.plist 2016-06-30 16:53:16.000000000 +0000 @@ -0,0 +1,357 @@ + + + + + CFBundleAllowMixedLocalizations + + CFBundleDevelopmentRegion + en_US + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + psxplugin + + CFBundleTypeIconFile + psxplugin + CFBundleTypeName + Playstation Emulator Plug-in + CFBundleTypeOSTypes + + PsxP + + CFBundleTypeRole + Viewer + LSItemContentTypes + + com.codeplex.pcsxr.plugin + + LSTypeIsPackage + + + + CFBundleTypeExtensions + + bin + + CFBundleTypeIconFile + psxbios + CFBundleTypeName + Playstation BIOS Image + CFBundleTypeOSTypes + + PsxB + + CFBundleTypeRole + Viewer + LSTypeIsPackage + + + + CFBundleTypeExtensions + + mcr + mc + mem + vgs + mcd + gme + ddf + + CFBundleTypeIconFile + pcsxrmemcard + CFBundleTypeName + PCSXR Memory Card + CFBundleTypeOSTypes + + Pmcr + + CFBundleTypeRole + Editor + LSItemContentTypes + + com.codeplex.pcsxr.memcard + + LSTypeIsPackage + + + + CFBundleTypeExtensions + + pcsxrstate + + CFBundleTypeIconFile + pcsxrfreeze + CFBundleTypeName + PCSXR Freeze State + CFBundleTypeOSTypes + + Pfrz + + CFBundleTypeRole + Viewer + LSItemContentTypes + + com.codeplex.pcsxr.freeze + + LSTypeIsPackage + + + + CFBundleTypeExtensions + + iso + bin + cue + mdf + img + + CFBundleTypeName + PlayStation Disc + CFBundleTypeRole + Viewer + LSItemContentTypes + + com.sony.psp.firmware + com.codeplex.pcsxr.compressed-bin-image + com.alcohol-soft.mdfdisc + com.apple.disk-image-ndif + com.goldenhawk.cdrwin-cuesheet + public.iso-image + com.apple.macbinary-​archive + com.coppertino.vox.cue + + LSTypeIsPackage + + + + CFBundleTypeExtensions + + cht + + CFBundleTypeName + Playstation Cheat + CFBundleTypeRole + Editor + LSItemContentTypes + + com.codeplex.pcsxr.cheat + + LSTypeIsPackage + + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + PCSXR + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.9.95 + CFBundleSignature + Pcsx + CFBundleVersion + SVNREVISION + LSApplicationCategoryType + public.app-category.games + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSMainNibFile + PCSXR + NSPrincipalClass + NSApplication + UTExportedTypeDeclarations + + + UTTypeConformsTo + + com.apple.package + com.apple.bundle + + UTTypeDescription + Playstation Emulator Plug-in + UTTypeIconFile + psxplugin + UTTypeIdentifier + com.codeplex.pcsxr.plugin + UTTypeReferenceURL + http://pcsxr.codeplex.com/ + UTTypeTagSpecification + + com.apple.ostype + + PsxP + + public.filename-extension + + psxplugin + + + + + UTTypeConformsTo + + public.data + public.content + + UTTypeDescription + PCSXR Memory Card + UTTypeIconFile + pcsxrmemcard + UTTypeIdentifier + com.codeplex.pcsxr.memcard + UTTypeReferenceURL + http://pcsxr.codeplex.com/ + UTTypeTagSpecification + + com.apple.ostype + + Pmcr + + public.filename-extension + + mcr + mc + mem + vgs + mcd + gme + ddf + + + + + UTTypeConformsTo + + public.data + public.content + + UTTypeDescription + PCSXR Freeze State + UTTypeIconFile + pcsxrfreeze + UTTypeIdentifier + com.codeplex.pcsxr.freeze + UTTypeReferenceURL + http://pcsxr.codeplex.com/ + UTTypeTagSpecification + + com.apple.ostype + + Pfrz + + public.filename-extension + + pcsxrstate + + + + + UTTypeConformsTo + + public.text + public.data + + UTTypeDescription + PCSXR Cheat + UTTypeIdentifier + com.codeplex.pcsxr.cheat + UTTypeTagSpecification + + public.filename-extension + + cht + + + + + UTImportedTypeDeclarations + + + UTTypeConformsTo + + public.plain-text + public.disk-image + + UTTypeDescription + bin/cue Disc Image + UTTypeIdentifier + com.goldenhawk.cdrwin-cuesheet + UTTypeTagSpecification + + public.filename-extension + + cue + inst + + public.mime-type + application/x-cue + + + + UTTypeConformsTo + + public.disk-image + public.data + + UTTypeDescription + Alcohol Disc Image + UTTypeIdentifier + com.alcohol-soft.mdfdisc + UTTypeReferenceURL + http://www.alcohol-soft.com + UTTypeTagSpecification + + public.filename-extension + + mdf + + + + + UTTypeConformsTo + + public.disk-image + public.data + + UTTypeDescription + PSP firmware dump + UTTypeIdentifier + com.sony.psp.firmware + UTTypeTagSpecification + + public.filename-extension + + pbp + + + + + UTTypeConformsTo + + public.disk-image + public.data + public.archive + + UTTypeDescription + Compressed bin Disc Image + UTTypeIdentifier + com.codeplex.pcsxr.compressed-bin-image + UTTypeTagSpecification + + public.filename-extension + + cbin + cbn + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/pcsxr.pch pcsxr-unstable-1.9.94+svn98108/macosx/pcsxr.pch --- pcsxr-unstable-1.9.94+svn97809/macosx/pcsxr.pch 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/pcsxr.pch 2016-06-30 16:53:16.000000000 +0000 @@ -0,0 +1,42 @@ +// +// pcsxr.pch +// Pcsxr +// +// Created by C.W. Betts on 1/25/14. +// +// + +#ifndef Pcsxr_pcsxr_pch +#define Pcsxr_pcsxr_pch + +// Apple deprecated __private_extern__ in Xcode 4.6. +// This is a convenience declaration to retain the old behavior. +#ifndef __private_extern +#define __private_extern __attribute__((visibility("hidden"))) +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#ifdef __OBJC__ + #import +#endif + +#ifndef NS_DESIGNATED_INITIALIZER +#define NS_DESIGNATED_INITIALIZER +#endif + +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/en.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/en.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/en.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/en.lproj/InfoPlist.strings 2016-06-30 16:53:16.000000000 +0000 @@ -0,0 +1,4 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "Copyright © 2014 Pcsx Reloaded team"; +CFBundleShortVersionString = "1.0"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/GeneratePreviewForURL.m pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/GeneratePreviewForURL.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/GeneratePreviewForURL.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/GeneratePreviewForURL.m 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,156 @@ +#include +#include +#include +#include "MyQuickLook.h" +//#include +#import +//#include "nopic.h" +#import "PSXMemEnumerator.h" + +/* ----------------------------------------------------------------------------- + Generate a preview for file + + This function's job is to create preview for designated file + ----------------------------------------------------------------------------- */ + +static OSStatus GeneratePreviewForFreeze(void *thisInterface, QLPreviewRequestRef preview, NSURL *url, NSDictionary *options); +static OSStatus GeneratePreviewForMemCard(void *thisInterface, QLPreviewRequestRef preview, NSURL *url, NSDictionary *options); + +OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options) +{ + OSStatus theStatus = noErr; + @autoreleasepool { + NSWorkspace *workspace = [NSWorkspace sharedWorkspace]; + NSURL *urlNS = (__bridge NSURL*)url; + NSString *uti = (__bridge NSString*)contentTypeUTI; + NSDictionary *optionsNS = (__bridge NSDictionary*)options; + if ([workspace type:uti conformsToType:@"com.codeplex.pcsxr.freeze"]) { + theStatus = GeneratePreviewForFreeze(thisInterface, preview, urlNS, optionsNS); + } else if ([workspace type:uti conformsToType:@"com.codeplex.pcsxr.memcard"]) { + theStatus = GeneratePreviewForMemCard(thisInterface, preview, urlNS, optionsNS); + } + } + return theStatus; +} + +void CancelPreviewGeneration(void *thisInterface, QLPreviewRequestRef preview) +{ + // Implement only if supported +} + +OSStatus GeneratePreviewForFreeze(void *thisInterface, QLPreviewRequestRef preview, NSURL *url, NSDictionary *options) +{ +#if 0 + NSData *data; + gzFile f; + const char* state_filename; + if ([url respondsToSelector:@selector(fileSystemRepresentation)]) { + state_filename = [url fileSystemRepresentation]; + } else { + state_filename = [[url path] fileSystemRepresentation]; + } + + if (!state_filename) { + return fnfErr; + } + + unsigned char *pMem = (unsigned char *) malloc(128*96*3); + if (pMem == NULL) + return mFulErr; + + f = gzopen(state_filename, "rb"); + if (f != NULL) { + gzseek(f, 32, SEEK_SET); // skip header + gzseek(f, sizeof(uint32_t), SEEK_CUR); + gzseek(f, sizeof(uint8_t), SEEK_CUR); + gzread(f, pMem, 128*96*3); + gzclose(f); + } else { + memcpy(pMem, NoPic_Image.pixel_data, 128*96*3); + } + + NSBitmapImageRep *imRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:&pMem pixelsWide:NoPic_Image.width pixelsHigh:NoPic_Image.height bitsPerSample:8 samplesPerPixel:3 hasAlpha:NO isPlanar:NO colorSpaceName:NSCalibratedRGBColorSpace bitmapFormat:0 bytesPerRow:NoPic_Image.width * NoPic_Image.bytes_per_pixel bitsPerPixel:24]; + if (imRep) { + data = [imRep TIFFRepresentation]; + QLPreviewRequestSetDataRepresentation(preview, (__bridge CFDataRef)(data), kUTTypeImage, NULL); + } + free(pMem); + return noErr; +#else + return noErr; +#endif +} + +static OSStatus GeneratePreviewForMemCard(void *thisInterface, QLPreviewRequestRef preview, NSURL *url, NSDictionary *options) +{ + NSArray *memCards = CreateArrayByEnumeratingMemoryCardAtURL(url); + + if (!memCards) { + return noErr; + } + + NSMutableString *htmlStr = [[NSMutableString alloc] initWithCapacity:memCards.count * 200]; + NSMutableDictionary *htmlDict = [[NSMutableDictionary alloc] initWithCapacity:memCards.count]; + NSBundle *Bundle; + { + CFBundleRef cfbundle = QLPreviewRequestGetGeneratorBundle(preview); + NSURL *bundURL = CFBridgingRelease(CFBundleCopyBundleURL(cfbundle)); + Bundle = [[NSBundle alloc] initWithURL:bundURL]; + } + int i = 0; + + NSDictionary *gifPrep = @{(NSString *) kCGImagePropertyGIFDictionary: @{(NSString *) kCGImagePropertyGIFDelayTime: @0.30f}}; + + for (PcsxrMemoryObject *obj in memCards) { + if (!obj.hasImages || obj.iconCount == 1) { + NSMutableData *pngData = [[NSMutableData alloc] init]; + { + CGImageDestinationRef dst = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)pngData, kUTTypePNG, 1, NULL); + NSImage *theImage = [obj firstImage]; + + CGImageRef imageRef = [theImage CGImageForProposedRect:NULL context:nil hints:nil]; + CGImageDestinationAddImage(dst, imageRef, NULL); + + CGImageDestinationFinalize(dst); + CFRelease(dst); + } + + NSDictionary *imgProps = @{(NSString *)kQLPreviewPropertyAttachmentDataKey: pngData, + (NSString *)kQLPreviewPropertyMIMETypeKey: @"image/png"}; + NSString *imgName = [[@(i++) stringValue] stringByAppendingPathExtension:@"png"]; + [htmlStr appendFormat:@"\t\t\t %@ %i\n", imgName, obj.title, obj.blockSize]; + htmlDict[imgName] = imgProps; + continue; + } + NSMutableData *gifData = [[NSMutableData alloc] init]; + + CGImageDestinationRef dst = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)gifData, kUTTypeGIF, obj.iconCount, NULL); + for (NSImage *theImage in obj.imageArray) { + CGImageRef imageRef = [theImage CGImageForProposedRect:NULL context:nil hints:nil]; + CGImageDestinationAddImage(dst, imageRef, (__bridge CFDictionaryRef)(gifPrep)); + } + CGImageDestinationFinalize(dst); + CFRelease(dst); + + NSDictionary *imgProps = @{(NSString *)kQLPreviewPropertyAttachmentDataKey: gifData, + (NSString *)kQLPreviewPropertyMIMETypeKey: @"image/gif"}; + NSString *imgName = [[@(i++) stringValue] stringByAppendingPathExtension:@"gif"]; + [htmlStr appendFormat:@"\t\t\t %@ %i\n", imgName, obj.title, obj.blockSize]; + htmlDict[imgName] = imgProps; + } + + NSURL *cssURL = [Bundle URLForResource:@"template" withExtension:@"html"]; + + NSMutableString *attributeStr = [[NSMutableString alloc] initWithContentsOfURL:cssURL encoding:NSUTF8StringEncoding error:NULL]; + [attributeStr replaceOccurrencesOfString:@"(TABLECONTENT)" withString:htmlStr options:NSLiteralSearch range:NSMakeRange(0, [attributeStr length])]; + + NSData *data = [attributeStr dataUsingEncoding:NSUTF8StringEncoding]; + NSDictionary *previewDict = + @{(NSString *)kQLPreviewPropertyAttachmentsKey: htmlDict, + (NSString *)kQLPreviewPropertyDisplayNameKey: [url lastPathComponent], + (NSString *)kQLPreviewPropertyWidthKey: @600}; + + QLPreviewRequestSetDataRepresentation(preview, (__bridge CFDataRef)(data), kUTTypeHTML, (__bridge CFDictionaryRef)(previewDict)); + + return noErr; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/GenerateThumbnailForURL.m pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/GenerateThumbnailForURL.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/GenerateThumbnailForURL.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/GenerateThumbnailForURL.m 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,162 @@ +#include +#include +#include +#include "MyQuickLook.h" +//#include +#import +//#include "nopic.h" +#import "PSXMemEnumerator.h" + +/* ----------------------------------------------------------------------------- + Generate a thumbnail for file + + This function's job is to create thumbnail for designated file as fast as possible + ----------------------------------------------------------------------------- */ + +#define ImageDivider 32 + +static OSStatus GenerateThumbnailForFreeze(void *thisInterface, QLThumbnailRequestRef preview, NSURL *url, NSDictionary *options, CGSize maxSize); +static OSStatus GenerateThumbnailForMemCard(void *thisInterface, QLThumbnailRequestRef preview, NSURL *url, NSDictionary *options, CGSize maxSize); + +OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maxSize) +{ + OSStatus theErr = noErr; + @autoreleasepool { + NSURL *urlNS = (__bridge NSURL*)url; + NSString *UTI = (__bridge NSString*)contentTypeUTI; + NSDictionary *optionsNS = (__bridge NSDictionary*)options; + NSWorkspace *workspace = [NSWorkspace sharedWorkspace]; + if ([workspace type:UTI conformsToType:@"com.codeplex.pcsxr.freeze"]) { + theErr = GenerateThumbnailForFreeze(thisInterface, thumbnail, urlNS, optionsNS, maxSize); + } else if ([workspace type:UTI conformsToType:@"com.codeplex.pcsxr.memcard"]) { + theErr = GenerateThumbnailForMemCard(thisInterface, thumbnail, urlNS, optionsNS, maxSize); + } + + } + return theErr; +} + +void CancelThumbnailGeneration(void *thisInterface, QLThumbnailRequestRef thumbnail) +{ + // Implement only if supported +} + +OSStatus GenerateThumbnailForFreeze(void *thisInterface, QLThumbnailRequestRef thumbnail, NSURL *url, NSDictionary *options, CGSize maxSize) +{ +#if 0 + gzFile f; + const char* state_filename = NULL; + NSBitmapImageRep *imageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL pixelsWide:96 pixelsHigh:128 bitsPerSample:8 samplesPerPixel:3 hasAlpha:NO isPlanar:NO colorSpaceName:NSCalibratedRGBColorSpace bytesPerRow:0 bitsPerPixel:0]; + + if ([url respondsToSelector:@selector(fileSystemRepresentation)]) { + state_filename = [url fileSystemRepresentation]; + } else { + state_filename = [[url path] fileSystemRepresentation]; + } + if (!state_filename) { + return fnfErr; + } + + unsigned char pMem[128*96*3] = {0}; + f = gzopen(state_filename, "rb"); + if (f != NULL) { + gzseek(f, 32, SEEK_SET); // skip header + gzseek(f, sizeof(uint32_t), SEEK_CUR); + gzseek(f, sizeof(uint8_t), SEEK_CUR); + gzread(f, pMem, 128*96*3); + gzclose(f); + } else { + memcpy(pMem, NoPic_Image.pixel_data, 128*96*3); + } + + @autoreleasepool { + unsigned char *ppMem = pMem; + int x, y; + for (y = 0; y < 96; y++) { + for (x = 0; x < 128; x++) { + [imageRep setColor:[NSColor colorWithCalibratedRed:*(ppMem+2)/255.0 green:*(ppMem+1)/255.0 blue:*(ppMem+0)/255.0 alpha:1.0] atX:x y:y]; + ppMem+=3; + } + } + } + + NSImage *theImage = [[NSImage alloc] init]; + [theImage addRepresentation:imageRep]; + [theImage setSize:NSMakeSize(NoPic_Image.width, NoPic_Image.height)]; + + if (theImage) { + NSData *data = [theImage TIFFRepresentation]; + QLThumbnailRequestSetImageWithData(thumbnail, (__bridge CFDataRef)(data), NULL); + } + return noErr; +#else + return noErr; +#endif +} + +static NSImage *MemoryImageAtIndex(NSArray *memArray, NSInteger my) +{ + NSInteger i = 0; + for (PcsxrMemoryObject *obj in memArray) { + NSIndexSet *idxSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(i, obj.blockSize)]; + if ([idxSet containsIndex:my]) { + return obj.firstImage; + } + i += obj.blockSize; + } + + return nil; +} + +OSStatus GenerateThumbnailForMemCard(void *thisInterface, QLThumbnailRequestRef thumbnail, NSURL *url, NSDictionary *options, CGSize maxSize) +{ + NSArray *memCards = CreateArrayByEnumeratingMemoryCardAtURL(url); + if (!memCards) { + return noErr; + } + + NSBundle *Bundle; + { + CFBundleRef cfbundle = QLThumbnailRequestGetGeneratorBundle(thumbnail); + NSURL *bundURL = CFBridgingRelease(CFBundleCopyBundleURL(cfbundle)); + Bundle = [[NSBundle alloc] initWithURL:bundURL]; + } + + NSRect imageRect = NSMakeRect(0, 0, ImageDivider, ImageDivider); + NSImage *blankImage = [[NSImage alloc] initWithSize:imageRect.size]; + [blankImage lockFocus]; + [[NSColor blackColor] set]; + [NSBezierPath fillRect:imageRect]; + [blankImage unlockFocus]; + + NSImage *memImages = [[NSImage alloc] initWithSize:NSMakeSize((4 * ImageDivider), (4 * ImageDivider))]; + + NSInteger allMems = 0; + for (PcsxrMemoryObject *obj in memCards) { + allMems += obj.blockSize; + } + [memImages lockFocus]; + [[NSColor clearColor] set]; + [NSBezierPath fillRect:NSMakeRect(0, 0, (4 * ImageDivider), (4 * ImageDivider))]; + for (int i = 1; i < 16; i++) { + NSInteger x = (i % 4) * ImageDivider, y = (3 * ImageDivider) - ((i / 4) * ImageDivider); + NSImage *curImage; + if (i < allMems) { + curImage = MemoryImageAtIndex(memCards, i - 1); + } else { + curImage = blankImage; + } + [curImage drawInRect:NSMakeRect(x, y, ImageDivider, ImageDivider) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0]; + } + NSURL *psxMemURL = [Bundle URLForResource:@"pcsxrmemcard" withExtension:@"icns"]; + NSImage *psxMemIcon = [[NSImage alloc] initByReferencingURL:psxMemURL]; + psxMemIcon.size = NSMakeSize(ImageDivider, ImageDivider); + [psxMemIcon drawInRect:NSMakeRect(0, 3 * ImageDivider, ImageDivider, ImageDivider) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0]; + + [memImages unlockFocus]; + + NSData *data = [memImages TIFFRepresentation]; + QLThumbnailRequestSetImageWithData(thumbnail, (__bridge CFDataRef)(data), NULL); + + return noErr; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/main.c pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/main.c --- pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/main.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/main.c 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,202 @@ +//============================================================================== +// +// DO NO MODIFY THE CONTENT OF THIS FILE +// +// This file contains the generic CFPlug-in code necessary for your generator +// To complete your generator implement the function in GenerateThumbnailForURL/GeneratePreviewForURL.c +// +//============================================================================== + +#include +#include +#include +#include +#include "MyQuickLook.h" + +// ----------------------------------------------------------------------------- +// constants +// ----------------------------------------------------------------------------- + +// Don't modify this line +#define PLUGIN_ID "8C4B8FFE-72CC-436C-8D8A-034152616D03" + +// +// Below is the generic glue code for all plug-ins. +// +// You should not have to modify this code aside from changing +// names if you decide to change the names defined in the Info.plist +// + +// ----------------------------------------------------------------------------- +// typedefs +// ----------------------------------------------------------------------------- + +// The layout for an instance of QuickLookGeneratorPlugIn +typedef struct __QuickLookGeneratorPluginType +{ + void *conduitInterface; + CFUUIDRef factoryID; + UInt32 refCount; +} PcsxrQLPlug; + +// ----------------------------------------------------------------------------- +// prototypes +// ----------------------------------------------------------------------------- +// Forward declaration for the IUnknown implementation. +// + +static PcsxrQLPlug *AllocQuickLookGeneratorPluginType(CFUUIDRef inFactoryID); +static void DeallocQuickLookGeneratorPluginType(PcsxrQLPlug *thisInstance); +static HRESULT QuickLookGeneratorQueryInterface(void *thisInstance,REFIID iid,LPVOID *ppv); +extern void *QuickLookGeneratorPluginFactory(CFAllocatorRef allocator,CFUUIDRef typeID); +static ULONG QuickLookGeneratorPluginAddRef(void *thisInstance); +static ULONG QuickLookGeneratorPluginRelease(void *thisInstance); + +// ----------------------------------------------------------------------------- +// myInterfaceFtbl definition +// ----------------------------------------------------------------------------- +// The QLGeneratorInterfaceStruct function table. +// +static QLGeneratorInterfaceStruct myInterfaceFtbl = { + NULL, + QuickLookGeneratorQueryInterface, + QuickLookGeneratorPluginAddRef, + QuickLookGeneratorPluginRelease, + NULL, + NULL, + NULL, + NULL +}; + + +// ----------------------------------------------------------------------------- +// AllocQuickLookGeneratorPluginType +// ----------------------------------------------------------------------------- +// Utility function that allocates a new instance. +// You can do some initial setup for the generator here if you wish +// like allocating globals etc... +// +PcsxrQLPlug *AllocQuickLookGeneratorPluginType(CFUUIDRef inFactoryID) +{ + PcsxrQLPlug *theNewInstance; + + theNewInstance = (PcsxrQLPlug *)calloc(sizeof(PcsxrQLPlug), 1); + + /* Point to the function table Malloc enough to store the stuff and copy the filler from myInterfaceFtbl over */ + theNewInstance->conduitInterface = malloc(sizeof(QLGeneratorInterfaceStruct)); + memcpy(theNewInstance->conduitInterface, &myInterfaceFtbl, sizeof(QLGeneratorInterfaceStruct)); + + /* Retain and keep an open instance refcount for each factory. */ + theNewInstance->factoryID = CFRetain(inFactoryID); + CFPlugInAddInstanceForFactory(inFactoryID); + + /* This function returns the IUnknown interface so set the refCount to one. */ + theNewInstance->refCount = 1; + return theNewInstance; +} + +// ----------------------------------------------------------------------------- +// DeallocQuickLookGeneratorPluginType +// ----------------------------------------------------------------------------- +// Utility function that deallocates the instance when +// the refCount goes to zero. +// In the current implementation generator interfaces are never deallocated +// but implement this as this might change in the future +// +void DeallocQuickLookGeneratorPluginType(PcsxrQLPlug *thisInstance) +{ + CFUUIDRef theFactoryID; + + theFactoryID = thisInstance->factoryID; + /* Free the conduitInterface table up */ + free(thisInstance->conduitInterface); + + /* Free the instance structure */ + free(thisInstance); + if (theFactoryID){ + CFPlugInRemoveInstanceForFactory(theFactoryID); + CFRelease(theFactoryID); + } +} + +// ----------------------------------------------------------------------------- +// QuickLookGeneratorQueryInterface +// ----------------------------------------------------------------------------- +// Implementation of the IUnknown QueryInterface function. +// +HRESULT QuickLookGeneratorQueryInterface(void *thisInstance,REFIID iid,LPVOID *ppv) +{ + CFUUIDRef interfaceID = CFUUIDCreateFromUUIDBytes(kCFAllocatorDefault,iid); + + if (CFEqual(interfaceID,kQLGeneratorCallbacksInterfaceID)){ + /* If the Right interface was requested, bump the ref count, + * set the ppv parameter equal to the instance, and + * return good status. + */ + ((QLGeneratorInterfaceStruct *)((PcsxrQLPlug *)thisInstance)->conduitInterface)->GenerateThumbnailForURL = GenerateThumbnailForURL; + ((QLGeneratorInterfaceStruct *)((PcsxrQLPlug *)thisInstance)->conduitInterface)->CancelThumbnailGeneration = CancelThumbnailGeneration; + ((QLGeneratorInterfaceStruct *)((PcsxrQLPlug *)thisInstance)->conduitInterface)->GeneratePreviewForURL = GeneratePreviewForURL; + ((QLGeneratorInterfaceStruct *)((PcsxrQLPlug *)thisInstance)->conduitInterface)->CancelPreviewGeneration = CancelPreviewGeneration; + ((QLGeneratorInterfaceStruct *)((PcsxrQLPlug*)thisInstance)->conduitInterface)->AddRef(thisInstance); + *ppv = thisInstance; + CFRelease(interfaceID); + return S_OK; + } else { + /* Requested interface unknown, bail with error. */ + *ppv = NULL; + CFRelease(interfaceID); + return E_NOINTERFACE; + } +} + +// ----------------------------------------------------------------------------- +// QuickLookGeneratorPluginAddRef +// ----------------------------------------------------------------------------- +// Implementation of reference counting for this type. Whenever an interface +// is requested, bump the refCount for the instance. NOTE: returning the +// refcount is a convention but is not required so don't rely on it. +// +ULONG QuickLookGeneratorPluginAddRef(void *thisInstance) +{ + ((PcsxrQLPlug *)thisInstance )->refCount += 1; + return ((PcsxrQLPlug*) thisInstance)->refCount; +} + +// ----------------------------------------------------------------------------- +// QuickLookGeneratorPluginRelease +// ----------------------------------------------------------------------------- +// When an interface is released, decrement the refCount. +// If the refCount goes to zero, deallocate the instance. +// +ULONG QuickLookGeneratorPluginRelease(void *thisInstance) +{ + ((PcsxrQLPlug*)thisInstance)->refCount -= 1; + if (((PcsxrQLPlug*)thisInstance)->refCount == 0) { + DeallocQuickLookGeneratorPluginType((PcsxrQLPlug*)thisInstance); + return 0; + } else { + return ((PcsxrQLPlug*) thisInstance )->refCount; + } +} + +// ----------------------------------------------------------------------------- +// QuickLookGeneratorPluginFactory +// ----------------------------------------------------------------------------- +void *QuickLookGeneratorPluginFactory(CFAllocatorRef allocator,CFUUIDRef typeID) +{ + PcsxrQLPlug *result; + CFUUIDRef uuid; + + /* If correct type is being requested, allocate an + * instance of kQLGeneratorTypeID and return the IUnknown interface. + */ + if (CFEqual(typeID, kQLGeneratorTypeID)){ + uuid = CFUUIDCreateFromString(kCFAllocatorDefault, CFSTR(PLUGIN_ID)); + result = AllocQuickLookGeneratorPluginType(uuid); + CFRelease(uuid); + return result; + } + /* If the requested type is incorrect, return NULL. */ + return NULL; +} + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/MyQuickLook.h pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/MyQuickLook.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/MyQuickLook.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/MyQuickLook.h 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,29 @@ +// +// MyQuickLook.h +// Pcsxr +// +// Created by C.W. Betts on 3/28/14. +// +// + +#ifndef Pcsxr_MyQuickLook_h +#define Pcsxr_MyQuickLook_h + +#include +#include +#include +#include + +// Apple deprecated __private_extern__ in Xcode 4.6. +// This is a convenience declaration to retain the old behavior. +#define __private_extern __attribute__((visibility("hidden"))) + +// The thumbnail generation function to be implemented in GenerateThumbnailForURL.c +__private_extern OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maxSize); +__private_extern void CancelThumbnailGeneration(void* thisInterface, QLThumbnailRequestRef thumbnail); + +// The preview generation function to be implemented in GeneratePreviewForURL.c +__private_extern OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options); +__private_extern void CancelPreviewGeneration(void *thisInterface, QLPreviewRequestRef preview); + +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/nopic.h pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/nopic.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/nopic.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/nopic.h 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,1345 @@ +//////////////////////////////////////////////////////////////////////// +// following code taken from the gpuPeopsSoft +//////////////////////////////////////////////////////////////////////// + +// font 0-9, 24x20 pixels, 1 byte = 4 dots +// 00 = black +// 01 = white +// 10 = red +// 11 = transparent + +static unsigned char const cFont[10][120]= +{ +// 0 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 1 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x05,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x05,0x55,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 2 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x01,0x40,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 3 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 4 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x54,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x05,0x14,0x00,0x00, + 0x80,0x00,0x14,0x14,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x55,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 5 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x15,0x54,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 6 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x15,0x54,0x00,0x00, + 0x80,0x00,0x15,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 7 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x01,0x40,0x00,0x00, + 0x80,0x00,0x01,0x40,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 8 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 9 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x15,0x00,0x00, + 0x80,0x00,0x05,0x55,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x05,0x50,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +} +}; + +//////////////////////////////////////////////////////////////////////// + +static inline void PaintPicDot(unsigned char * p,unsigned char c) +{ + + if(c==0) {*p++=0x00;*p++=0x00;*p=0x00;return;} // black + if(c==1) {*p++=0xff;*p++=0xff;*p=0xff;return;} // white + if(c==2) {*p++=0x00;*p++=0x00;*p=0xff;return;} // red + // transparent +} + + ///////////////////////////////////////////////////////////////////// + // generic number/border painter + +static inline void DrawNumBorPic(unsigned char *pMem, int lSelectedSlot) +{ + unsigned char *pf; + int x,y; + int c,v; + + pf=pMem+(103*3); // offset to number rect + + for(y=0;y<20;y++) // loop the number rect pixel + { + for(x=0;x<6;x++) + { + c=cFont[lSelectedSlot][x+y*6]; // get 4 char dot infos at once (number depends on selected slot) + v=(c&0xc0)>>6; + PaintPicDot(pf,(unsigned char)v);pf+=3; // paint the dots into the rect + v=(c&0x30)>>4; + PaintPicDot(pf,(unsigned char)v);pf+=3; + v=(c&0x0c)>>2; + PaintPicDot(pf,(unsigned char)v);pf+=3; + v=c&0x03; + PaintPicDot(pf,(unsigned char)v);pf+=3; + } + pf+=104*3; // next rect y line + } + + pf=pMem; // ptr to first pos in 128x96 pic + for(x=0;x<128;x++) // loop top/bottom line + { + *(pf+(95*128*3))=0x00;*pf++=0x00; + *(pf+(95*128*3))=0x00;*pf++=0x00; // paint it red + *(pf+(95*128*3))=0xff;*pf++=0xff; + } + pf=pMem; // ptr to first pos + for(y=0;y<96;y++) // loop left/right line + { + *(pf+(127*3))=0x00;*pf++=0x00; + *(pf+(127*3))=0x00;*pf++=0x00; // paint it red + *(pf+(127*3))=0xff;*pf++=0xff; + pf+=127*3; // offset to next line + } +} + +//////////////////////////////////////////////////////////////////////// + + +/* GIMP RGB C-Source image dump (NoPic.h) */ + +static const struct { + unsigned int width; + unsigned int height; + unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ + unsigned char pixel_data[128 * 96 * 3 + 1]; +} NoPic_Image = { + 128, 96, 3, + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0U\0\0U\0\0U\0\0""8\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0U\0\0U\0\0U\0\0" + "U\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\341\0\0\34\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0" + "\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8" + "\0\0\305\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\251" + "\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\251\0" + "\0q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376" + "\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\305" + "\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\341\0\0\214\0\0\34\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\305\0\0\376\0\0\376\0\0\376\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\305\0\0\34\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376" + "\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\341\0\0""8\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\341\0\0U\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\376\0\0\305\0\0q\0\0U\0\0U\0" + "\0U\0\0\214\0\0\341\0\0\376\0\0\376\0\0\376\0\0\341\0\0\34\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0U\0\0\376\0\0\376\0\0\341\0\0\251\0\0\251\0\0\251\0\0\251\0\0\251" + "\0\0\251\0\0\251\0\0\341\0\0\376\0\0\376\0\0\376\0\0\341\0\0\34\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\376\0\0\251\0\0U\0\0U\0\0" + "U\0\0q\0\0\251\0\0\376\0\0\376\0\0\376\0\0\376\0\0\34\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376" + "\0\0\376\0\0\341\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0" + "\0\376\0\0\376\0\0\341\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0U\0\0\341\0\0\376\0\0\376\0\0\341\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\341\0\0" + "\376\0\0\376\0\0\214\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376" + "\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\305" + "\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376" + "\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0U\0\0\376\0\0\376\0\0\341\0\0\376\0\0\376\0\0\214\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\305\0\0\376\0\0\376\0\0\341\0\0\34\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\251" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214" + "\0\0\376\0\0\376\0\0\341\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0U\0\0\376\0\0\376" + "\0\0\376\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0" + "\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0\376\0\0\376\0\0\376\0\0\34" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34" + "\0\0\376\0\0\376\0\0\376\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\341\0\0\376\0\0" + "\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0\376\0\0\34\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\251\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0" + "\376\0\0\0\0\0\251\0\0\376\0\0\376\0\0\341\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\305\0" + "\0\376\0\0\376\0\0q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376" + "\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376" + "\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\251\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376" + "\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\214\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\376\0\0\376\0\0\376\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0" + "\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\305\0\0" + "\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0U\0\0U\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\376\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U" + "\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\305" + "\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0\376\0\0""8\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\376\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0" + "\0\0\0\305\0\0\376\0\0\376\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\214\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0" + "\376\0\0\341\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0" + "\0\0\0\0\0\0\0\0\0\0""8\0\0\376\0\0\376\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0" + "\0\376\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0\376\0\0q\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376" + "\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0" + "\0\376\0\0\305\0\0U\0\0U\0\0U\0\0U\0\0U\0\0U\0\0U\0\0\214\0\0\341\0\0\376" + "\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376" + "\0\0U\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0" + "\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\376\0\0\34" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\251\0" + "\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0" + "\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0" + "\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\305\0\0\376\0\0\376\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0" + "\0U\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0" + "\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\341\0\0U\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0" + "\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0\376\0\0q\0\0\0\0\0" + "\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0" + "\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0" + "\305\0\0U\0\0U\0\0U\0\0U\0\0U\0\0U\0\0U\0\0U\0\0\34\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0" + "\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\341\0\0\34\0\0\0" + "\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\251" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0q\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0" + "\0\0\0\0\0\0\0""8\0\0\376\0\0\376\0\0\341\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\305\0\0\376\0\0\376\0\0\251" + "\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\305\0\0\376\0\0\376\0\0""8\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0" + "\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376" + "\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376" + "\0\0\376\0\0\214\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0" + "\376\0\0\376\0\0\376\0\0U\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\376\0\0\376\0\0\376\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0\376\0\0\376\0\0\376\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\305\0\0\376\0\0\376" + "\0\0q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\305\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\341\0\0\34\0\0\376\0\0\376\0\0U\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0" + "\376\0\0\376\0\0\214\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0q\0\0\376\0\0\376\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0\376\0\0\34\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\341\0\0\376\0\0\376\0\0\251" + "\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0" + "\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\305" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376" + "\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0" + "\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\214\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\214\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0" + "\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376" + "\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\376" + "\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\376\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0\376\0\0\214\0\0\34\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\251\0\0\376\0\0\376\0\0\376\0\0\251\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\305\0\0\376\0\0\376\0\0\376\0\0\214\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0q\0\0\376\0\0\376\0\0\376\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\341\0\0\376\0\0\376\0" + "\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\251\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\305\0\0\251\0\0\251\0\0\251\0\0\341\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0" + "U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0" + "\376\0\0\376\0\0\251\0\0\251\0\0\251\0\0\251\0\0\376\0\0\376\0\0\376\0\0" + "\376\0\0\341\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\376\0\0\376" + "\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\341\0\0q\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\34\0\0\251\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0\251\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0U\0\0U\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0U\0" + "\0U\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0q\0\0\251\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\251\0\0q\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0U\0\0U\0\0""8\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0U\0\0U\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0\214\0\0\305\0\0\376\0\0\376\0\0\376" + "\0\0\376\0\0\341\0\0\214\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0", +}; + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/Pcsxr-QL-Info.plist pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/Pcsxr-QL-Info.plist --- pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/Pcsxr-QL-Info.plist 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/Pcsxr-QL-Info.plist 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,138 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDocumentTypes + + + CFBundleTypeRole + QLGenerator + LSItemContentTypes + + com.codeplex.pcsxr.memcard + + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundleShortVersionString + 1 + CFBundleVersion + 1.0 + CFPlugInDynamicRegisterFunction + + CFPlugInDynamicRegistration + NO + CFPlugInFactories + + 8C4B8FFE-72CC-436C-8D8A-034152616D03 + QuickLookGeneratorPluginFactory + + CFPlugInTypes + + 5E2D9680-5022-40FA-B806-43349622E5B9 + + 8C4B8FFE-72CC-436C-8D8A-034152616D03 + + + CFPlugInUnloadFunction + + QLNeedsToBeRunInMainThread + + QLPreviewHeight + 600 + QLPreviewWidth + 600 + QLSupportsConcurrentRequests + + QLThumbnailMinimumSize + 17 + UTImportedTypeDeclarations + + + UTTypeConformsTo + + public.data + public.content + + UTTypeDescription + PCSXR Memory Card + UTTypeIconFile + pcsxrmemcard + UTTypeIdentifier + com.codeplex.pcsxr.memcard + UTTypeReferenceURL + http://pcsxr.codeplex.com/ + UTTypeTagSpecification + + com.apple.ostype + + Pmcr + + public.filename-extension + + mcr + mc + mem + vgs + mcd + gme + ddf + + + + + UTTypeConformsTo + + public.data + public.content + + UTTypeDescription + PCSXR Freeze State + UTTypeIconFile + pcsxrfreeze + UTTypeIdentifier + com.codeplex.pcsxr.freeze + UTTypeReferenceURL + http://pcsxr.codeplex.com/ + UTTypeTagSpecification + + com.apple.ostype + + Pfrz + + public.filename-extension + + pcsxrstate + + + + + UTTypeConformsTo + + public.text + public.data + + UTTypeDescription + PCSXR Cheat + UTTypeIdentifier + com.codeplex.pcsxr.cheat + UTTypeTagSpecification + + public.filename-extension + + cht + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/Pcsxr-QL-Prefix.pch pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/Pcsxr-QL-Prefix.pch --- pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/Pcsxr-QL-Prefix.pch 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/Pcsxr-QL-Prefix.pch 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,16 @@ +// +// Prefix header +// +// The contents of this file are implicitly included at the beginning of every source file. +// + +#include "MyQuickLook.h" + +#ifdef __OBJC__ + #import + #import "PcsxrMemoryObject.h" +#endif + +#ifndef NS_DESIGNATED_INITIALIZER +#define NS_DESIGNATED_INITIALIZER +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/PSXMemEnumerator.h pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/PSXMemEnumerator.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/PSXMemEnumerator.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/PSXMemEnumerator.h 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,13 @@ +// +// PSXMemEnumerator.h +// Pcsxr +// +// Created by C.W. Betts on 7/20/14. +// +// + +#import +#import "PcsxrMemoryObject.h" +#include "MyQuickLook.h" + +__private_extern NSArray *CreateArrayByEnumeratingMemoryCardAtURL(NSURL *location) NS_RETURNS_RETAINED; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/PSXMemEnumerator.m pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/PSXMemEnumerator.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/PSXMemEnumerator.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/PSXMemEnumerator.m 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,180 @@ +// +// PSXMemEnumerator.c +// Pcsxr +// +// Created by C.W. Betts on 7/20/14. +// +// + +#include +#import "PSXMemEnumerator.h" + +#define MAX_MEMCARD_BLOCKS 15 + +static void GetSoloBlockInfo(unsigned char *data, int block, McdBlock *Info) +{ + unsigned char *ptr = data + block * 8192 + 2; + unsigned char *str = Info->Title; + unsigned short clut[16]; + unsigned char * sstr = Info->sTitle; + unsigned short c; + int i, x = 0; + + memset(Info, 0, sizeof(McdBlock)); + Info->IconCount = *ptr & 0x3; + ptr += 2; + + for (i = 0; i < 48; i++) { + c = *(ptr) << 8; + c |= *(ptr + 1); + if (!c) + break; + + // Convert ASCII characters to half-width + if (c >= 0x8281 && c <= 0x829A) { + c = (c - 0x8281) + 'a'; + } else if (c >= 0x824F && c <= 0x827A) { + c = (c - 0x824F) + '0'; + } else if (c == 0x8140) { + c = ' '; + } else if (c == 0x8143) { + c = ','; + } else if (c == 0x8144) { + c = '.'; + } else if (c == 0x8146) { + c = ':'; + } else if (c == 0x8147) { + c = ';'; + } else if (c == 0x8148) { + c = '?'; + } else if (c == 0x8149) { + c = '!'; + } else if (c == 0x815E) { + c = '/'; + } else if (c == 0x8168) { + c = '"'; + } else if (c == 0x8169) { + c = '('; + } else if (c == 0x816A) { + c = ')'; + } else if (c == 0x816D) { + c = '['; + } else if (c == 0x816E) { + c = ']'; + } else if (c == 0x817C) { + c = '-'; + } else { + str[i] = ' '; + sstr[x++] = *ptr++; + sstr[x++] = *ptr++; + continue; + } + + str[i] = sstr[x++] = c; + ptr += 2; + } + + ptr = data + block * 8192 + 0x60; // icon palette data + + for (i = 0; i < 16; i++) { + clut[i] = *((unsigned short *)ptr); + ptr += 2; + } + + for (i = 0; i < Info->IconCount; i++) { + short *icon = &Info->Icon[i * 16 * 16]; + + ptr = data + block * 8192 + 128 + 128 * i; // icon data + + for (x = 0; x < 16 * 16; x++) { + icon[x++] = clut[*ptr & 0xf]; + icon[x] = clut[*ptr >> 4]; + ptr++; + } + } + + ptr = data + block * 128; + + Info->Flags = *ptr; + + ptr += 0xa; + strlcpy(Info->ID, ptr, 13); + ptr += 12; + strlcpy(Info->Name, ptr, 17); +} + +static inline PCSXRMemFlag MemBlockFlag(unsigned char blockFlags) +{ + if ((blockFlags & 0xF0) == 0xA0) { + if ((blockFlags & 0xF) >= 1 && (blockFlags & 0xF) <= 3) + return PCSXRMemFlagDeleted; + else + return PCSXRMemFlagFree; + } else if ((blockFlags & 0xF0) == 0x50) { + if ((blockFlags & 0xF) == 0x1) + return PCSXRMemFlagUsed; + else if ((blockFlags & 0xF) == 0x2) + return PCSXRMemFlagLink; + else if ((blockFlags & 0xF) == 0x3) + return PCSXRMemFlagEndLink; + } else + return PCSXRMemFlagFree; + + //Xcode complains unless we do this... + //NSLog(@"Unknown flag %x", blockFlags); + return PCSXRMemFlagFree; +} + + +NSArray *CreateArrayByEnumeratingMemoryCardAtURL(NSURL *location) +{ + NSMutableArray *memArray = [[NSMutableArray alloc] initWithCapacity:MAX_MEMCARD_BLOCKS]; + if (!location) { + return nil; + } + NSData *fileData = [[NSData alloc] initWithContentsOfURL:location options:NSDataReadingMappedIfSafe error:NULL]; + if (!fileData) { + return nil; + } + + const unsigned char *memPtr = [fileData bytes]; + if ([fileData length] == MCD_SIZE + 64) + memPtr += 64; + else if([fileData length] == MCD_SIZE + 3904) + memPtr += 3904; + else if ([fileData length] != MCD_SIZE) + return nil; + + int i = 0, x; + while (i < MAX_MEMCARD_BLOCKS) { + x = 1; + McdBlock memBlock; + GetSoloBlockInfo((unsigned char *)memPtr, i + 1, &memBlock); + + if (MemBlockFlag(memBlock.Flags) == PCSXRMemFlagFree) { + //Free space: ignore + i++; + continue; + } + while (i + x < MAX_MEMCARD_BLOCKS) { + McdBlock tmpBlock; + GetSoloBlockInfo((unsigned char *)memPtr, i + x + 1, &tmpBlock); + if ((tmpBlock.Flags & 0x3) == 0x3) { + x++; + break; + } else if ((tmpBlock.Flags & 0x2) == 0x2) { + x++; + } else { + break; + } + }; + PcsxrMemoryObject *obj = [[PcsxrMemoryObject alloc] initWithMcdBlock:&memBlock startingIndex:i size:x]; + i += x; + if (MemBlockFlag(memBlock.Flags) == PCSXRMemFlagDeleted) { + continue; + } + [memArray addObject:obj]; + } + + return [[NSArray alloc] initWithArray:memArray]; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/template.html pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/template.html --- pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr-QL/template.html 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr-QL/template.html 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,20 @@ + + + + + + +
+ + +(TABLECONTENT) +
Image Name Count
+
+ + \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr.xcodeproj/contents.xcworkspacedata pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr.xcodeproj/contents.xcworkspacedata --- pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr.xcodeproj/contents.xcworkspacedata 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr.xcodeproj/contents.xcworkspacedata 2016-06-30 16:53:16.000000000 +0000 @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr.xcodeproj/project.pbxproj pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr.xcodeproj/project.pbxproj --- pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr.xcodeproj/project.pbxproj 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr.xcodeproj/project.pbxproj 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,4047 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 02717968167884C9004AED62 /* hotkeys.m in Sources */ = {isa = PBXBuildFile; fileRef = 02717967167884C9004AED62 /* hotkeys.m */; }; + 0280B7AD16764CC5007B8001 /* HotkeyController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0280B7AC16764CC3007B8001 /* HotkeyController.m */; }; + 2B4DE99205FF9307003EFEF0 /* PluginController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B4DE98E05FF9307003EFEF0 /* PluginController.m */; }; + 2BB3D6BE05427FE200831ACB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BA178A505148D9D0026D74D /* main.m */; }; + 2BB3D6BF05427FE200831ACB /* PcsxrController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B75FD3D051C56D200D12034 /* PcsxrController.m */; }; + 2BB3D6C005427FE200831ACB /* ConfigurationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B75FD4B051C8A7400D12034 /* ConfigurationController.m */; }; + 2BB3D6C105427FE200831ACB /* PluginList.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BBB1127051DC00500B84448 /* PluginList.m */; }; + 2BB3D6C205427FE200831ACB /* EmuThread.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BBB1792051E113B00B84448 /* EmuThread.m */; }; + 2BB3D6C305427FE200831ACB /* Plugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 2BBB17DA051E4D0F00B84448 /* Plugin.c */; }; + 2BB3D6C405427FE200831ACB /* PcsxrPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BA44361052DB2EA00E21DDD /* PcsxrPlugin.m */; }; + 550128951A11817800468D09 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 550128911A11817800468D09 /* InfoPlist.strings */; }; + 550128961A11817800468D09 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 550128931A11817800468D09 /* Localizable.strings */; }; + 550128991A1181A000468D09 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 550128971A1181A000468D09 /* InfoPlist.strings */; }; + 5501289D1A1181CF00468D09 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5501289B1A1181CF00468D09 /* InfoPlist.strings */; }; + 550128A51A11823900468D09 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 550128A31A11823900468D09 /* InfoPlist.strings */; }; + 550128AA1A11827F00468D09 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 550128A81A11827F00468D09 /* InfoPlist.strings */; }; + 550128AF1A1182D700468D09 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 550128AD1A1182D700468D09 /* InfoPlist.strings */; }; + 550128B21A1182E500468D09 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 550128B01A1182E500468D09 /* InfoPlist.strings */; }; + 550E343918E6293D00A1AD21 /* QuickLook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 550E343818E6293D00A1AD21 /* QuickLook.framework */; }; + 550E343A18E6293D00A1AD21 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76AE178693D60052D185 /* ApplicationServices.framework */; }; + 550E343B18E6293D00A1AD21 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76AF178693D60052D185 /* CoreServices.framework */; }; + 550E343C18E6293D00A1AD21 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76B2178693EA0052D185 /* CoreFoundation.framework */; }; + 550E344218E6293D00A1AD21 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 550E344018E6293D00A1AD21 /* InfoPlist.strings */; }; + 550E344418E6293D00A1AD21 /* GenerateThumbnailForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 550E344318E6293D00A1AD21 /* GenerateThumbnailForURL.m */; }; + 550E344618E6293D00A1AD21 /* GeneratePreviewForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 550E344518E6293D00A1AD21 /* GeneratePreviewForURL.m */; }; + 550E344818E6293D00A1AD21 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 550E344718E6293D00A1AD21 /* main.c */; }; + 550E344F18E6332F00A1AD21 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76D8178696810052D185 /* libz.dylib */; }; + 550E345318E63DB700A1AD21 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A749E17868B110052D185 /* Cocoa.framework */; }; + 550F023D17BFFD97002594DF /* PcsxrHexadecimalFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 550F023C17BFFD97002594DF /* PcsxrHexadecimalFormatter.m */; }; + 550FFAEF17CEE37D0003A2F3 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76B2178693EA0052D185 /* CoreFoundation.framework */; }; + 550FFAF117CEEECA0003A2F3 /* cfgHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 550FFAF017CEEEC90003A2F3 /* cfgHelper.m */; }; + 551A75C917868C4E0052D185 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A749E17868B110052D185 /* Cocoa.framework */; }; + 551A75CF17868C860052D185 /* Bladesio1PluginConfig.xib in Resources */ = {isa = PBXBuildFile; fileRef = 551A74B417868BEA0052D185 /* Bladesio1PluginConfig.xib */; }; + 551A75D017868C860052D185 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 551A74B617868BEA0052D185 /* Credits.rtf */; }; + 551A75D317868D0C0052D185 /* cfg.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A74BF17868BEA0052D185 /* cfg.c */; }; + 551A75D417868D1A0052D185 /* PluginConfigController.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A74C117868BEA0052D185 /* PluginConfigController.m */; }; + 551A75D517868D390052D185 /* connection.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A75BC17868C400052D185 /* connection.c */; }; + 551A75D617868D390052D185 /* fifo.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A75BE17868C400052D185 /* fifo.c */; }; + 551A75D717868D390052D185 /* sio1.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A75C217868C400052D185 /* sio1.c */; }; + 551A7675178690500052D185 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A749E17868B110052D185 /* Cocoa.framework */; }; + 551A767B178690AD0052D185 /* cdr-macosx.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A751317868BEB0052D185 /* cdr-macosx.c */; }; + 551A767C178690AD0052D185 /* cfg.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A751417868BEB0052D185 /* cfg.c */; }; + 551A767D178690AD0052D185 /* PluginConfigController.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A751617868BEB0052D185 /* PluginConfigController.m */; }; + 551A767E178690B80052D185 /* cdr.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A75F417868E640052D185 /* cdr.c */; }; + 551A767F178690B80052D185 /* util.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A75FB17868E640052D185 /* util.c */; }; + 551A7680178690EE0052D185 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 551A750917868BEB0052D185 /* Credits.rtf */; }; + 551A7681178690EE0052D185 /* DFCdromPluginConfig.xib in Resources */ = {isa = PBXBuildFile; fileRef = 551A750B17868BEB0052D185 /* DFCdromPluginConfig.xib */; }; + 551A7683178690EE0052D185 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 551A750F17868BEB0052D185 /* Localizable.strings */; }; + 551A7685178691170052D185 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A7684178691170052D185 /* IOKit.framework */; }; + 551A76891786919F0052D185 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A749E17868B110052D185 /* Cocoa.framework */; }; + 551A76921786922A0052D185 /* sdljoy.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A766D1786901F0052D185 /* sdljoy.c */; }; + 551A7693178692330052D185 /* analog.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A76661786901F0052D185 /* analog.c */; }; + 551A7694178692330052D185 /* pad.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A766B1786901F0052D185 /* pad.c */; }; + 551A76951786923E0052D185 /* cfg.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A752717868BEB0052D185 /* cfg.c */; }; + 551A76961786923E0052D185 /* ControllerList.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A752A17868BEB0052D185 /* ControllerList.m */; }; + 551A76971786923E0052D185 /* MappingCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A752C17868BEB0052D185 /* MappingCell.m */; }; + 551A76981786923E0052D185 /* PadController.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A752E17868BEB0052D185 /* PadController.m */; }; + 551A76991786923E0052D185 /* PadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A753017868BEB0052D185 /* PadView.m */; }; + 551A769A1786923E0052D185 /* xkb.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A753117868BEB0052D185 /* xkb.c */; }; + 551A769B178692470052D185 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 551A751D17868BEB0052D185 /* Credits.rtf */; }; + 551A769D178692470052D185 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 551A752117868BEB0052D185 /* Localizable.strings */; }; + 551A769E178692470052D185 /* NetPcsxrHIDInputPluginMain.xib in Resources */ = {isa = PBXBuildFile; fileRef = 551A752317868BEB0052D185 /* NetPcsxrHIDInputPluginMain.xib */; }; + 551A76B7178693FF0052D185 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A749E17868B110052D185 /* Cocoa.framework */; }; + 551A76BD1786953B0052D185 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 551A756817868BEC0052D185 /* Credits.rtf */; }; + 551A76BF1786953B0052D185 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 551A756C17868BEC0052D185 /* Localizable.strings */; }; + 551A76C01786953B0052D185 /* NetSfPeopsSoftGPUConfig.xib in Resources */ = {isa = PBXBuildFile; fileRef = 551A756E17868BEC0052D185 /* NetSfPeopsSoftGPUConfig.xib */; }; + 551A76C11786953F0052D185 /* gpuPeteOGL2.slf in Resources */ = {isa = PBXBuildFile; fileRef = 551A757017868BEC0052D185 /* gpuPeteOGL2.slf */; }; + 551A76C21786953F0052D185 /* gpuPeteOGL2.slv in Resources */ = {isa = PBXBuildFile; fileRef = 551A757117868BEC0052D185 /* gpuPeteOGL2.slv */; }; + 551A76C31786953F0052D185 /* NetSfPeopsSoftGPUInterface.xib in Resources */ = {isa = PBXBuildFile; fileRef = 551A757F17868BED0052D185 /* NetSfPeopsSoftGPUInterface.xib */; }; + 551A76C41786954B0052D185 /* drawgl.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A757417868BEC0052D185 /* drawgl.m */; }; + 551A76C51786954B0052D185 /* PluginConfigController.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A757717868BEC0052D185 /* PluginConfigController.m */; }; + 551A76C61786954B0052D185 /* PluginGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A757917868BEC0052D185 /* PluginGLView.m */; }; + 551A76C71786954B0052D185 /* PluginWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A757B17868BEC0052D185 /* PluginWindow.m */; }; + 551A76C81786954B0052D185 /* PluginWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A757D17868BEC0052D185 /* PluginWindowController.m */; }; + 551A76CA178695840052D185 /* fps.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A763017868F270052D185 /* fps.c */; }; + 551A76CB178695840052D185 /* gpu.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A763217868F270052D185 /* gpu.c */; }; + 551A76CC178695840052D185 /* key.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A763B17868F280052D185 /* key.c */; }; + 551A76CD178695840052D185 /* menu.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A763F17868F280052D185 /* menu.c */; }; + 551A76CE178695840052D185 /* prim.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A764117868F280052D185 /* prim.c */; }; + 551A76CF178695840052D185 /* soft.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A764317868F280052D185 /* soft.c */; }; + 551A76D0178695840052D185 /* zn.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A764617868F280052D185 /* zn.c */; }; + 551A76D3178695D10052D185 /* GLUT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76D1178695BD0052D185 /* GLUT.framework */; }; + 551A76D4178695D20052D185 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76D2178695C70052D185 /* OpenGL.framework */; }; + 551A76D61786960C0052D185 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A749E17868B110052D185 /* Cocoa.framework */; }; + 551A76D7178696110052D185 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A7684178691170052D185 /* IOKit.framework */; }; + 551A76D9178696810052D185 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76D8178696810052D185 /* libz.dylib */; }; + 551A76DD178696BD0052D185 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A749E17868B110052D185 /* Cocoa.framework */; }; + 551A76E81786971B0052D185 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A749E17868B110052D185 /* Cocoa.framework */; }; + 551A76F2178697A50052D185 /* NamedSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A755017868BEC0052D185 /* NamedSlider.m */; }; + 551A76F3178697A50052D185 /* SPUPluginController.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A755417868BEC0052D185 /* SPUPluginController.m */; }; + 551A76F6178697D70052D185 /* libSPUSharedCode.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76E71786971B0052D185 /* libSPUSharedCode.dylib */; }; + 551A76F7178697E70052D185 /* PluginController.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A755217868BEC0052D185 /* PluginController.m */; }; + 551A76F8178698130052D185 /* sdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A762117868EF00052D185 /* sdl.c */; }; + 551A76F9178698130052D185 /* spu.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A762217868EF00052D185 /* spu.c */; }; + 551A76FA178698130052D185 /* xa.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A762817868EF00052D185 /* xa.c */; }; + 551A76FB178698160052D185 /* reverb.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A761F17868EF00052D185 /* reverb.c */; }; + 551A76FC1786981A0052D185 /* registers.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A761C17868EF00052D185 /* registers.c */; }; + 551A76FD178698230052D185 /* freeze.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A761417868EF00052D185 /* freeze.c */; }; + 551A76FF178698390052D185 /* dma.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A760F17868EF00052D185 /* dma.c */; }; + 551A77001786983C0052D185 /* adsr.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A760A17868EF00052D185 /* adsr.c */; }; + 551A7701178698600052D185 /* externals.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A761217868EF00052D185 /* externals.c */; }; + 551A7703178698980052D185 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 551A756017868BEC0052D185 /* Credits.rtf */; }; + 551A7704178698980052D185 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 551A756217868BEC0052D185 /* Localizable.strings */; }; + 551A7705178698980052D185 /* NetSfPeopsSpuPluginMain.xib in Resources */ = {isa = PBXBuildFile; fileRef = 551A756417868BEC0052D185 /* NetSfPeopsSpuPluginMain.xib */; }; + 551A770A178698C60052D185 /* PluginController.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A755217868BEC0052D185 /* PluginController.m */; }; + 551A770C178698C60052D185 /* spu.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A762217868EF00052D185 /* spu.c */; }; + 551A770D178698C60052D185 /* xa.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A762817868EF00052D185 /* xa.c */; }; + 551A770E178698C60052D185 /* reverb.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A761F17868EF00052D185 /* reverb.c */; }; + 551A770F178698C60052D185 /* registers.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A761C17868EF00052D185 /* registers.c */; }; + 551A7710178698C60052D185 /* freeze.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A761417868EF00052D185 /* freeze.c */; }; + 551A7711178698C60052D185 /* dma.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A760F17868EF00052D185 /* dma.c */; }; + 551A7712178698C60052D185 /* adsr.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A760A17868EF00052D185 /* adsr.c */; }; + 551A7713178698C60052D185 /* externals.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A761217868EF00052D185 /* externals.c */; }; + 551A7715178698C60052D185 /* libSPUSharedCode.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76E71786971B0052D185 /* libSPUSharedCode.dylib */; }; + 551A7716178698C60052D185 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A749E17868B110052D185 /* Cocoa.framework */; }; + 551A7719178698C60052D185 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 551A756017868BEC0052D185 /* Credits.rtf */; }; + 551A771A178698C60052D185 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 551A756217868BEC0052D185 /* Localizable.strings */; }; + 551A771B178698C60052D185 /* NetSfPeopsSpuPluginMain.xib in Resources */ = {isa = PBXBuildFile; fileRef = 551A756417868BEC0052D185 /* NetSfPeopsSpuPluginMain.xib */; }; + 551A77221786990E0052D185 /* openal.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A761817868EF00052D185 /* openal.c */; }; + 551A7724178699250052D185 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A7723178699250052D185 /* OpenAL.framework */; }; + 551A774A17869C280052D185 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A749E17868B110052D185 /* Cocoa.framework */; }; + 551A775017869C3C0052D185 /* GLUT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76D1178695BD0052D185 /* GLUT.framework */; }; + 551A775117869C3C0052D185 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76D2178695C70052D185 /* OpenGL.framework */; }; + 551A775217869C8B0052D185 /* draw.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A764B17868F570052D185 /* draw.c */; }; + 551A775317869C8D0052D185 /* fps.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A764E17868F570052D185 /* fps.c */; }; + 551A775417869C900052D185 /* gpu.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A765117868F570052D185 /* gpu.c */; }; + 551A775517869C950052D185 /* gte_accuracy.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A765617868F570052D185 /* gte_accuracy.c */; }; + 551A775617869C970052D185 /* key.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A765817868F570052D185 /* key.c */; }; + 551A775717869C9A0052D185 /* menu.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A765B17868F570052D185 /* menu.c */; }; + 551A775817869C9C0052D185 /* prim.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A765D17868F570052D185 /* prim.c */; }; + 551A775917869C9F0052D185 /* soft.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A765F17868F570052D185 /* soft.c */; }; + 551A775A17869CA10052D185 /* texture.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A766217868F570052D185 /* texture.c */; }; + 551A775B17869CA50052D185 /* drawgl.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A759017868BED0052D185 /* drawgl.m */; }; + 551A775C17869CA80052D185 /* NetSfPeopsOpenGLPluginConfigController.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A759317868BED0052D185 /* NetSfPeopsOpenGLPluginConfigController.m */; }; + 551A775D17869CAB0052D185 /* PluginGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A759517868BED0052D185 /* PluginGLView.m */; }; + 551A775E17869CAE0052D185 /* PluginWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A759717868BED0052D185 /* PluginWindow.m */; }; + 551A775F17869CB10052D185 /* PluginWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A759917868BED0052D185 /* PluginWindowController.m */; }; + 551A776017869CBE0052D185 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 551A758517868BED0052D185 /* Credits.rtf */; }; + 551A776217869CBE0052D185 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 551A758917868BED0052D185 /* Localizable.strings */; }; + 551A776317869CBE0052D185 /* NetSfPeopsOpenGLConfig.xib in Resources */ = {isa = PBXBuildFile; fileRef = 551A758B17868BED0052D185 /* NetSfPeopsOpenGLConfig.xib */; }; + 551A776417869CC20052D185 /* NetSfPeopsOpenGLGPUInterface.xib in Resources */ = {isa = PBXBuildFile; fileRef = 551A759A17868BED0052D185 /* NetSfPeopsOpenGLGPUInterface.xib */; }; + 551A776817869E430052D185 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A749E17868B110052D185 /* Cocoa.framework */; }; + 551A776E17869E640052D185 /* cfg.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A754317868BEC0052D185 /* cfg.c */; }; + 551A776F17869E640052D185 /* PluginConfigController.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A754517868BEC0052D185 /* PluginConfigController.m */; }; + 551A777017869E640052D185 /* SockDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = 551A754717868BEC0052D185 /* SockDialog.m */; }; + 551A777A17869E830052D185 /* dfnet.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A777317869E830052D185 /* dfnet.c */; }; + 551A777E17869E830052D185 /* unix.c in Sources */ = {isa = PBXBuildFile; fileRef = 551A777817869E830052D185 /* unix.c */; }; + 551A777F17869EAE0052D185 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 551A753617868BEB0052D185 /* Credits.rtf */; }; + 551A778017869EAE0052D185 /* DFNet.xib in Resources */ = {isa = PBXBuildFile; fileRef = 551A753817868BEB0052D185 /* DFNet.xib */; }; + 551A778117869EAE0052D185 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 551A753A17868BEB0052D185 /* InfoPlist.strings */; }; + 551A778217869EAE0052D185 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 551A753C17868BEB0052D185 /* Localizable.strings */; }; + 551A778317869EAE0052D185 /* SockDialog.xib in Resources */ = {isa = PBXBuildFile; fileRef = 551A753E17868BEB0052D185 /* SockDialog.xib */; }; + 551A779417869F610052D185 /* Bladesio1.psxplugin in Copy Plug-Ins */ = {isa = PBXBuildFile; fileRef = 551A75CE17868C4E0052D185 /* Bladesio1.psxplugin */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 551A779517869F610052D185 /* DFCdrom.psxplugin in Copy Plug-Ins */ = {isa = PBXBuildFile; fileRef = 551A767A178690500052D185 /* DFCdrom.psxplugin */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 551A779617869F610052D185 /* DFInput.psxplugin in Copy Plug-Ins */ = {isa = PBXBuildFile; fileRef = 551A768E1786919F0052D185 /* DFInput.psxplugin */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 551A779717869F610052D185 /* PeopsSoftGPU.psxplugin in Copy Plug-Ins */ = {isa = PBXBuildFile; fileRef = 551A76BC178693FF0052D185 /* PeopsSoftGPU.psxplugin */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 551A779817869F610052D185 /* PeopsSpuSDL.psxplugin in Copy Plug-Ins */ = {isa = PBXBuildFile; fileRef = 551A76E2178696BD0052D185 /* PeopsSpuSDL.psxplugin */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 551A779917869F610052D185 /* PeopsSpuAL.psxplugin in Copy Plug-Ins */ = {isa = PBXBuildFile; fileRef = 551A771F178698C60052D185 /* PeopsSpuAL.psxplugin */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 551A779A17869F610052D185 /* PeopsXGL.psxplugin in Copy Plug-Ins */ = {isa = PBXBuildFile; fileRef = 551A774F17869C280052D185 /* PeopsXGL.psxplugin */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 551A779B17869F610052D185 /* DFNet.psxplugin in Copy Plug-Ins */ = {isa = PBXBuildFile; fileRef = 551A776D17869E430052D185 /* DFNet.psxplugin */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 551A77E71786A4DD0052D185 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76AC178693C60052D185 /* Carbon.framework */; }; + 5525BC5E19421A760018AF2F /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76AF178693D60052D185 /* CoreServices.framework */; }; + 5525BC5F19421A760018AF2F /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76B2178693EA0052D185 /* CoreFoundation.framework */; }; + 5525BC6119421A760018AF2F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A74A317868B110052D185 /* Foundation.framework */; }; + 5525BC6719421A760018AF2F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5525BC6519421A760018AF2F /* InfoPlist.strings */; }; + 5525BC6919421A760018AF2F /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 5525BC6819421A760018AF2F /* main.c */; }; + 5525BC6B19421A760018AF2F /* GetMetadataForFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 5525BC6A19421A760018AF2F /* GetMetadataForFile.m */; }; + 5525BC7819421D4F0018AF2F /* schema.xml in Resources */ = {isa = PBXBuildFile; fileRef = 5525BC7719421D4F0018AF2F /* schema.xml */; }; + 5525BC7C194221EC0018AF2F /* schema.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5525BC7E194221EC0018AF2F /* schema.strings */; }; + 5525BC8119423FA90018AF2F /* Psx-Memcard.mdimporter in Copy Spotlight Plug-Ins */ = {isa = PBXBuildFile; fileRef = 5525BC5D19421A750018AF2F /* Psx-Memcard.mdimporter */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 55268A5A1876244E00A82269 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A74A317868B110052D185 /* Foundation.framework */; }; + 5529EA11169CBE3400BAA2A5 /* RecentItemsMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 5550D2721683C923006C56B5 /* RecentItemsMenu.m */; }; + 553FECEE18DF5A8300C7B007 /* AddPluginSheet.xib in Resources */ = {isa = PBXBuildFile; fileRef = 553FECB818DF5A8300C7B007 /* AddPluginSheet.xib */; }; + 553FECF018DF5A8300C7B007 /* Configuration.xib in Resources */ = {isa = PBXBuildFile; fileRef = 553FECBC18DF5A8300C7B007 /* Configuration.xib */; }; + 553FECF118DF5A8300C7B007 /* PCSXR.xib in Resources */ = {isa = PBXBuildFile; fileRef = 553FECBE18DF5A8300C7B007 /* PCSXR.xib */; }; + 553FECF618DF5A8300C7B007 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 553FECC818DF5A8300C7B007 /* Credits.rtf */; }; + 553FECF718DF5A8300C7B007 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 553FECCA18DF5A8300C7B007 /* InfoPlist.strings */; }; + 553FECF818DF5A8300C7B007 /* KeyNames.plist in Resources */ = {isa = PBXBuildFile; fileRef = 553FECCC18DF5A8300C7B007 /* KeyNames.plist */; }; + 553FECF918DF5A8300C7B007 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 553FECCE18DF5A8300C7B007 /* Localizable.strings */; }; + 554FD70917C6A13E0056CF66 /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 554FD70817C6A13E0056CF66 /* SDL2.framework */; }; + 554FD70C17C6A1F10056CF66 /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 554FD70817C6A13E0056CF66 /* SDL2.framework */; }; + 55534AF518183BFB006D6BCB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 55534AF418183BFB006D6BCB /* main.m */; }; + 5557769A17EBE7D60019D008 /* Media.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5557769917EBE7D60019D008 /* Media.xcassets */; }; + 556C37A9197C815C001A4265 /* PSXMemEnumerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 556C37A8197C815C001A4265 /* PSXMemEnumerator.m */; }; + 556C37AB197C9C59001A4265 /* PcsxrMemoryObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 55A90228147D89380037E18F /* PcsxrMemoryObject.m */; }; + 556C37AD197D94C8001A4265 /* SDL2.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 554FD70817C6A13E0056CF66 /* SDL2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 556C37AE197D94D6001A4265 /* libSPUSharedCode.dylib in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76E71786971B0052D185 /* libSPUSharedCode.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 556C37B2197DBFD1001A4265 /* template.html in Resources */ = {isa = PBXBuildFile; fileRef = 556C37B1197DBFD1001A4265 /* template.html */; }; + 5581463917AABCD100862DBF /* PcsxrCheatHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 5581463817AABCD100862DBF /* PcsxrCheatHandler.m */; }; + 559366CA12B694DF004ACC1E /* iR3000A-64.c in Sources */ = {isa = PBXBuildFile; fileRef = 559366C112B694DF004ACC1E /* iR3000A-64.c */; }; + 559366CB12B694DF004ACC1E /* ix86-64.c in Sources */ = {isa = PBXBuildFile; fileRef = 559366C212B694DF004ACC1E /* ix86-64.c */; }; + 559366CD12B694DF004ACC1E /* ix86_cpudetect.c in Sources */ = {isa = PBXBuildFile; fileRef = 559366C512B694DF004ACC1E /* ix86_cpudetect.c */; }; + 559366CE12B694DF004ACC1E /* ix86_fpu.c in Sources */ = {isa = PBXBuildFile; fileRef = 559366C612B694DF004ACC1E /* ix86_fpu.c */; }; + 559366CF12B694DF004ACC1E /* ix86_mmx.c in Sources */ = {isa = PBXBuildFile; fileRef = 559366C712B694DF004ACC1E /* ix86_mmx.c */; }; + 559366D012B694DF004ACC1E /* ix86_sse.c in Sources */ = {isa = PBXBuildFile; fileRef = 559366C812B694DF004ACC1E /* ix86_sse.c */; }; + 55A90220147D7C380037E18F /* PcsxrMemCardController.m in Sources */ = {isa = PBXBuildFile; fileRef = 55A9021F147D7C380037E18F /* PcsxrMemCardController.m */; }; + 55A90229147D89380037E18F /* PcsxrMemoryObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 55A90228147D89380037E18F /* PcsxrMemoryObject.m */; }; + 55AF2A69197DF6A700EB2560 /* Media.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5557769917EBE7D60019D008 /* Media.xcassets */; }; + 55B13FBD18C4F9CC00ACD9AC /* SPUPluginController.h in Headers */ = {isa = PBXBuildFile; fileRef = 551A755317868BEC0052D185 /* SPUPluginController.h */; }; + 55B13FBE18C4F9D800ACD9AC /* NamedSlider.h in Headers */ = {isa = PBXBuildFile; fileRef = 551A754F17868BEC0052D185 /* NamedSlider.h */; }; + 55BBA693149455E1003B2CEC /* PcsxrMemCardHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 55BBA692149455E1003B2CEC /* PcsxrMemCardHandler.m */; }; + 55BBA69614945628003B2CEC /* PcsxrPluginHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 55BBA69514945628003B2CEC /* PcsxrPluginHandler.m */; }; + 55BBA69914953887003B2CEC /* PcsxrDiscHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 55BBA69814953887003B2CEC /* PcsxrDiscHandler.m */; }; + 55BBA69C1495839A003B2CEC /* PcsxrFreezeStateHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 55BBA69B1495839A003B2CEC /* PcsxrFreezeStateHandler.m */; }; + 55C7A214148B2B3800C22ABC /* PcsxrMemCard.xib in Resources */ = {isa = PBXBuildFile; fileRef = 55C7A216148B2B3800C22ABC /* PcsxrMemCard.xib */; }; + 55CA586B17E799E6007424D5 /* DiskArbitration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55CA586A17E799E6007424D5 /* DiskArbitration.framework */; }; + 55DA3723189440C800B44951 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 551A76B2178693EA0052D185 /* CoreFoundation.framework */; }; + 55DFBAAF197B8CCD00620084 /* Pcsxr-QL.qlgenerator in Copy QuickLook Plug-In */ = {isa = PBXBuildFile; fileRef = 550E343718E6293D00A1AD21 /* Pcsxr-QL.qlgenerator */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 55E0ACE0178B69620005C945 /* LaunchArg.m in Sources */ = {isa = PBXBuildFile; fileRef = 55E0ACDF178B69600005C945 /* LaunchArg.m */; }; + 55EC05FB1788B1230053AC23 /* PcsxrMemCardArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 55EC05FA1788B1230053AC23 /* PcsxrMemCardArray.m */; }; + 55EC05FE178916E80053AC23 /* MemBadgeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 55EC05FD178916E70053AC23 /* MemBadgeView.m */; }; + 712FD1E81093096F00575A92 /* debug.c in Sources */ = {isa = PBXBuildFile; fileRef = 712FD1E51093096F00575A92 /* debug.c */; }; + 712FD1E91093096F00575A92 /* socket.c in Sources */ = {isa = PBXBuildFile; fileRef = 712FD1E61093096F00575A92 /* socket.c */; }; + 713B530E110B75650002F164 /* ppf.c in Sources */ = {isa = PBXBuildFile; fileRef = 713B530C110B75650002F164 /* ppf.c */; }; + 7192F42A129C412E0042D946 /* gpu.c in Sources */ = {isa = PBXBuildFile; fileRef = 7192F428129C412E0042D946 /* gpu.c */; }; + 719594B211AEFE8C004AD686 /* psxcommon.c in Sources */ = {isa = PBXBuildFile; fileRef = 719594B011AEFE8C004AD686 /* psxcommon.c */; }; + 71F4C5890FDED12800529849 /* cdriso.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5600FDED12800529849 /* cdriso.c */; }; + 71F4C58B0FDED12800529849 /* cdrom.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5620FDED12800529849 /* cdrom.c */; }; + 71F4C58D0FDED12800529849 /* cheat.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5640FDED12800529849 /* cheat.c */; }; + 71F4C5910FDED12800529849 /* decode_xa.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5680FDED12800529849 /* decode_xa.c */; }; + 71F4C5930FDED12800529849 /* disr3000a.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C56A0FDED12800529849 /* disr3000a.c */; }; + 71F4C5940FDED12800529849 /* gte.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C56B0FDED12800529849 /* gte.c */; }; + 71F4C5960FDED12800529849 /* mdec.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C56D0FDED12800529849 /* mdec.c */; }; + 71F4C5980FDED12800529849 /* misc.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C56F0FDED12800529849 /* misc.c */; }; + 71F4C59A0FDED12800529849 /* plugins.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5710FDED12800529849 /* plugins.c */; }; + 71F4C59D0FDED12800529849 /* psxbios.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5740FDED12800529849 /* psxbios.c */; }; + 71F4C5A00FDED12800529849 /* psxcounters.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5770FDED12800529849 /* psxcounters.c */; }; + 71F4C5A20FDED12800529849 /* psxdma.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5790FDED12800529849 /* psxdma.c */; }; + 71F4C5A40FDED12800529849 /* psxhle.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C57B0FDED12800529849 /* psxhle.c */; }; + 71F4C5A60FDED12800529849 /* psxhw.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C57D0FDED12800529849 /* psxhw.c */; }; + 71F4C5A80FDED12800529849 /* psxinterpreter.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C57F0FDED12800529849 /* psxinterpreter.c */; }; + 71F4C5A90FDED12800529849 /* psxmem.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5800FDED12800529849 /* psxmem.c */; }; + 71F4C5AB0FDED12800529849 /* r3000a.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5820FDED12800529849 /* r3000a.c */; }; + 71F4C5AD0FDED12800529849 /* sio.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5840FDED12800529849 /* sio.c */; }; + 71F4C5AF0FDED12800529849 /* spu.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5860FDED12800529849 /* spu.c */; }; + D422E66E16DC48D000526DCF /* CheatWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = D422E66C16DC48D000526DCF /* CheatWindow.xib */; }; + D422E67A16DC495800526DCF /* CheatController.m in Sources */ = {isa = PBXBuildFile; fileRef = D422E67916DC495800526DCF /* CheatController.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXBuildRule section */ + 2BB3D6D005427FE200831ACB /* PBXBuildRule */ = { + isa = PBXBuildRule; + compilerSpec = com.apple.compilers.gcc; + fileType = sourcecode.c; + isEditable = 1; + outputFiles = ( + ); + }; + 2BD707B705559AE300CB5D9B /* PBXBuildRule */ = { + isa = PBXBuildRule; + compilerSpec = com.apple.compilers.gcc; + filePatterns = pasm.s; + fileType = sourcecode.asm; + isEditable = 1; + outputFiles = ( + "$(DERIVED_FILES_DIR)/$(INPUT_FILE_BASE).o", + ); + script = "as -o $(DERIVED_FILES_DIR)/$(INPUT_FILE_BASE).o $(INPUT_FILE_PATH)"; + }; +/* End PBXBuildRule section */ + +/* Begin PBXContainerItemProxy section */ + 550E347818E65D8B00A1AD21 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 550E343618E6293D00A1AD21; + remoteInfo = "Pcsxr-QL"; + }; + 551A76F4178697CF0052D185 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 551A76E61786971B0052D185; + remoteInfo = SPUSharedCode; + }; + 551A7708178698C60052D185 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 551A76E61786971B0052D185; + remoteInfo = SPUSharedCode; + }; + 551A778417869F4B0052D185 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 551A75C617868C4E0052D185; + remoteInfo = Bladesio1; + }; + 551A778617869F4B0052D185 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 551A7672178690500052D185; + remoteInfo = DFCdrom; + }; + 551A778817869F4B0052D185 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 551A76861786919F0052D185; + remoteInfo = DFInput; + }; + 551A778A17869F4B0052D185 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 551A76B4178693FF0052D185; + remoteInfo = DFXVideo; + }; + 551A778C17869F4B0052D185 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 551A76DA178696BD0052D185; + remoteInfo = PeopsSpuSDL; + }; + 551A778E17869F4B0052D185 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 551A7706178698C60052D185; + remoteInfo = PeopsSpuAL; + }; + 551A779017869F4B0052D185 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 551A774717869C280052D185; + remoteInfo = PeopsXgl; + }; + 551A779217869F4B0052D185 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 551A776517869E430052D185; + remoteInfo = DFNet; + }; + 5525BC7519421A810018AF2F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 5525BC5C19421A750018AF2F; + remoteInfo = "Psx-Memcard"; + }; + 55534AFF18183E5B006D6BCB /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 55534AEF18183BFA006D6BCB; + remoteInfo = updateInfoPlist; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 55202EBA18E73E3E00C631AA /* Copy QuickLook Plug-In */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = Contents/Library/QuickLook; + dstSubfolderSpec = 1; + files = ( + 55DFBAAF197B8CCD00620084 /* Pcsxr-QL.qlgenerator in Copy QuickLook Plug-In */, + ); + name = "Copy QuickLook Plug-In"; + runOnlyForDeploymentPostprocessing = 0; + }; + 5525BC58194219B80018AF2F /* Copy Spotlight Plug-Ins */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = Contents/Library/Spotlight; + dstSubfolderSpec = 1; + files = ( + 5525BC8119423FA90018AF2F /* Psx-Memcard.mdimporter in Copy Spotlight Plug-Ins */, + ); + name = "Copy Spotlight Plug-Ins"; + runOnlyForDeploymentPostprocessing = 0; + }; + 556C37AC197D94AF001A4265 /* Copy Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 556C37AE197D94D6001A4265 /* libSPUSharedCode.dylib in Copy Frameworks */, + 556C37AD197D94C8001A4265 /* SDL2.framework in Copy Frameworks */, + ); + name = "Copy Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + 71AD2DF010C3573400365243 /* Copy Plug-Ins */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 551A779417869F610052D185 /* Bladesio1.psxplugin in Copy Plug-Ins */, + 551A779517869F610052D185 /* DFCdrom.psxplugin in Copy Plug-Ins */, + 551A779617869F610052D185 /* DFInput.psxplugin in Copy Plug-Ins */, + 551A779717869F610052D185 /* PeopsSoftGPU.psxplugin in Copy Plug-Ins */, + 551A779817869F610052D185 /* PeopsSpuSDL.psxplugin in Copy Plug-Ins */, + 551A779917869F610052D185 /* PeopsSpuAL.psxplugin in Copy Plug-Ins */, + 551A779A17869F610052D185 /* PeopsXGL.psxplugin in Copy Plug-Ins */, + 551A779B17869F610052D185 /* DFNet.psxplugin in Copy Plug-Ins */, + ); + name = "Copy Plug-Ins"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 02717967167884C9004AED62 /* hotkeys.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = hotkeys.m; sourceTree = ""; usesTabs = 1; }; + 02717969167884DF004AED62 /* hotkeys.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = hotkeys.h; sourceTree = ""; }; + 0280B7AB16764CC3007B8001 /* HotkeyController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HotkeyController.h; sourceTree = ""; }; + 0280B7AC16764CC3007B8001 /* HotkeyController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HotkeyController.m; sourceTree = ""; usesTabs = 1; }; + 2B4DE98D05FF9307003EFEF0 /* PluginController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginController.h; sourceTree = ""; }; + 2B4DE98E05FF9307003EFEF0 /* PluginController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PluginController.m; sourceTree = ""; usesTabs = 1; }; + 2B75FD3C051C56D200D12034 /* PcsxrController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PcsxrController.h; sourceTree = ""; }; + 2B75FD3D051C56D200D12034 /* PcsxrController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PcsxrController.m; sourceTree = ""; usesTabs = 1; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 2B75FD4A051C8A7400D12034 /* ConfigurationController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ConfigurationController.h; sourceTree = ""; }; + 2B75FD4B051C8A7400D12034 /* ConfigurationController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ConfigurationController.m; sourceTree = ""; usesTabs = 1; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 2B976C00074C14B4007C050A /* Kernel.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kernel.framework; path = /System/Library/Frameworks/Kernel.framework; sourceTree = ""; }; + 2BA178A505148D9D0026D74D /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = main.m; sourceTree = ""; usesTabs = 1; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 2BA44360052DB2EA00E21DDD /* PcsxrPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = PcsxrPlugin.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 2BA44361052DB2EA00E21DDD /* PcsxrPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PcsxrPlugin.m; sourceTree = ""; tabWidth = 4; usesTabs = 1; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 2BB3D6CF05427FE200831ACB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = ../Info.plist; sourceTree = ""; }; + 2BB3D6D105427FE200831ACB /* PCSXR.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PCSXR.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2BBB1126051DC00500B84448 /* PluginList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginList.h; sourceTree = ""; }; + 2BBB1127051DC00500B84448 /* PluginList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PluginList.m; sourceTree = ""; usesTabs = 1; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 2BBB1791051E113B00B84448 /* EmuThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmuThread.h; sourceTree = ""; }; + 2BBB1792051E113B00B84448 /* EmuThread.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = EmuThread.m; sourceTree = ""; usesTabs = 1; }; + 2BBB17DA051E4D0F00B84448 /* Plugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Plugin.c; sourceTree = ""; usesTabs = 1; }; + 5501288E1A1180C800468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; + 5501288F1A1180E500468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; + 550128901A11811600468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 550128921A11817800468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 550128941A11817800468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 550128981A1181A000468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 5501289A1A1181AF00468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; + 5501289C1A1181CF00468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 5501289E1A1181E500468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; + 5501289F1A1181F000468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 550128A01A1181FC00468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 550128A11A11820C00468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; + 550128A21A11821800468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 550128A41A11823900468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 550128A61A11824800468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; + 550128A71A11824F00468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 550128A91A11827F00468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 550128AB1A11829B00468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; + 550128AC1A1182A600468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 550128AE1A1182D700468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 550128B11A1182E500468D09 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 550E343718E6293D00A1AD21 /* Pcsxr-QL.qlgenerator */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Pcsxr-QL.qlgenerator"; sourceTree = BUILT_PRODUCTS_DIR; }; + 550E343818E6293D00A1AD21 /* QuickLook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickLook.framework; path = System/Library/Frameworks/QuickLook.framework; sourceTree = SDKROOT; }; + 550E343F18E6293D00A1AD21 /* Pcsxr-QL-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Pcsxr-QL-Info.plist"; sourceTree = ""; }; + 550E344118E6293D00A1AD21 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 550E344318E6293D00A1AD21 /* GenerateThumbnailForURL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GenerateThumbnailForURL.m; sourceTree = ""; }; + 550E344518E6293D00A1AD21 /* GeneratePreviewForURL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GeneratePreviewForURL.m; sourceTree = ""; }; + 550E344718E6293D00A1AD21 /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; + 550E344918E6293D00A1AD21 /* Pcsxr-QL-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Pcsxr-QL-Prefix.pch"; sourceTree = ""; }; + 550E344E18E629A300A1AD21 /* MyQuickLook.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyQuickLook.h; sourceTree = ""; }; + 550E345118E6362300A1AD21 /* nopic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = nopic.h; sourceTree = ""; }; + 550F023B17BFFD97002594DF /* PcsxrHexadecimalFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PcsxrHexadecimalFormatter.h; sourceTree = ""; }; + 550F023C17BFFD97002594DF /* PcsxrHexadecimalFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PcsxrHexadecimalFormatter.m; sourceTree = ""; }; + 550FFAEE17CEB8780003A2F3 /* DFSound.exp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.exports; path = DFSound.exp; sourceTree = ""; }; + 550FFAF017CEEEC90003A2F3 /* cfgHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = cfgHelper.m; sourceTree = ""; }; + 551A749E17868B110052D185 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + 551A74A117868B110052D185 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 551A74A217868B110052D185 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; + 551A74A317868B110052D185 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 551A74BC17868BEA0052D185 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 551A74BF17868BEA0052D185 /* cfg.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cfg.c; sourceTree = ""; }; + 551A74C017868BEA0052D185 /* PluginConfigController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PluginConfigController.h; sourceTree = ""; }; + 551A74C117868BEA0052D185 /* PluginConfigController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PluginConfigController.m; sourceTree = ""; }; + 551A751117868BEB0052D185 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 551A751317868BEB0052D185 /* cdr-macosx.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "cdr-macosx.c"; sourceTree = ""; }; + 551A751417868BEB0052D185 /* cfg.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cfg.c; sourceTree = ""; }; + 551A751517868BEB0052D185 /* PluginConfigController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PluginConfigController.h; sourceTree = ""; }; + 551A751617868BEB0052D185 /* PluginConfigController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PluginConfigController.m; sourceTree = ""; }; + 551A751717868BEB0052D185 /* version.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = version.plist; sourceTree = ""; }; + 551A752517868BEB0052D185 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 551A752717868BEB0052D185 /* cfg.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cfg.c; sourceTree = ""; }; + 551A752817868BEB0052D185 /* cfg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cfg.h; sourceTree = ""; }; + 551A752917868BEB0052D185 /* ControllerList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ControllerList.h; sourceTree = ""; }; + 551A752A17868BEB0052D185 /* ControllerList.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ControllerList.m; sourceTree = ""; }; + 551A752B17868BEB0052D185 /* MappingCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MappingCell.h; sourceTree = ""; }; + 551A752C17868BEB0052D185 /* MappingCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MappingCell.m; sourceTree = ""; }; + 551A752D17868BEB0052D185 /* PadController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PadController.h; sourceTree = ""; }; + 551A752E17868BEB0052D185 /* PadController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PadController.m; sourceTree = ""; }; + 551A752F17868BEB0052D185 /* PadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PadView.h; sourceTree = ""; }; + 551A753017868BEB0052D185 /* PadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PadView.m; sourceTree = ""; }; + 551A753117868BEB0052D185 /* xkb.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = xkb.c; sourceTree = ""; }; + 551A754017868BEC0052D185 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 551A754317868BEC0052D185 /* cfg.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cfg.c; sourceTree = ""; }; + 551A754417868BEC0052D185 /* PluginConfigController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PluginConfigController.h; sourceTree = ""; }; + 551A754517868BEC0052D185 /* PluginConfigController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PluginConfigController.m; sourceTree = ""; }; + 551A754617868BEC0052D185 /* SockDialog.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SockDialog.h; sourceTree = ""; }; + 551A754717868BEC0052D185 /* SockDialog.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SockDialog.m; sourceTree = ""; }; + 551A754817868BEC0052D185 /* version.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = version.plist; sourceTree = ""; }; + 551A754A17868BEC0052D185 /* Info-AL.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-AL.plist"; sourceTree = ""; }; + 551A754B17868BEC0052D185 /* Info-SDL.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-SDL.plist"; sourceTree = ""; }; + 551A754E17868BEC0052D185 /* maccfg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = maccfg.h; sourceTree = ""; }; + 551A754F17868BEC0052D185 /* NamedSlider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = NamedSlider.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 551A755017868BEC0052D185 /* NamedSlider.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NamedSlider.m; sourceTree = ""; }; + 551A755117868BEC0052D185 /* PluginController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PluginController.h; sourceTree = ""; }; + 551A755217868BEC0052D185 /* PluginController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PluginController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 551A755317868BEC0052D185 /* SPUPluginController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SPUPluginController.h; sourceTree = ""; }; + 551A755417868BEC0052D185 /* SPUPluginController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SPUPluginController.m; sourceTree = ""; }; + 551A757017868BEC0052D185 /* gpuPeteOGL2.slf */ = {isa = PBXFileReference; lastKnownFileType = text; path = gpuPeteOGL2.slf; sourceTree = ""; }; + 551A757117868BEC0052D185 /* gpuPeteOGL2.slv */ = {isa = PBXFileReference; lastKnownFileType = text; path = gpuPeteOGL2.slv; sourceTree = ""; }; + 551A757217868BEC0052D185 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 551A757417868BEC0052D185 /* drawgl.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = drawgl.m; sourceTree = ""; }; + 551A757517868BEC0052D185 /* ExtendedKeys.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExtendedKeys.h; sourceTree = ""; }; + 551A757617868BEC0052D185 /* PluginConfigController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PluginConfigController.h; sourceTree = ""; }; + 551A757717868BEC0052D185 /* PluginConfigController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PluginConfigController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 551A757817868BEC0052D185 /* PluginGLView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PluginGLView.h; sourceTree = ""; }; + 551A757917868BEC0052D185 /* PluginGLView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PluginGLView.m; sourceTree = ""; }; + 551A757A17868BEC0052D185 /* PluginWindow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PluginWindow.h; sourceTree = ""; }; + 551A757B17868BEC0052D185 /* PluginWindow.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PluginWindow.m; sourceTree = ""; }; + 551A757C17868BEC0052D185 /* PluginWindowController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PluginWindowController.h; sourceTree = ""; }; + 551A757D17868BEC0052D185 /* PluginWindowController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PluginWindowController.m; sourceTree = ""; }; + 551A757E17868BEC0052D185 /* SGPUPreferences.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SGPUPreferences.h; sourceTree = ""; }; + 551A757F17868BED0052D185 /* NetSfPeopsSoftGPUInterface.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NetSfPeopsSoftGPUInterface.xib; sourceTree = ""; }; + 551A758D17868BED0052D185 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 551A758F17868BED0052D185 /* drawgl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = drawgl.h; sourceTree = ""; }; + 551A759017868BED0052D185 /* drawgl.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = drawgl.m; sourceTree = ""; }; + 551A759117868BED0052D185 /* ExtendedKeys.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExtendedKeys.h; sourceTree = ""; }; + 551A759217868BED0052D185 /* NetSfPeopsOpenGLPluginConfigController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NetSfPeopsOpenGLPluginConfigController.h; sourceTree = ""; }; + 551A759317868BED0052D185 /* NetSfPeopsOpenGLPluginConfigController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = NetSfPeopsOpenGLPluginConfigController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 551A759417868BED0052D185 /* PluginGLView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PluginGLView.h; sourceTree = ""; }; + 551A759517868BED0052D185 /* PluginGLView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PluginGLView.m; sourceTree = ""; }; + 551A759617868BED0052D185 /* PluginWindow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PluginWindow.h; sourceTree = ""; }; + 551A759717868BED0052D185 /* PluginWindow.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PluginWindow.m; sourceTree = ""; }; + 551A759817868BED0052D185 /* PluginWindowController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PluginWindowController.h; sourceTree = ""; }; + 551A759917868BED0052D185 /* PluginWindowController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PluginWindowController.m; sourceTree = ""; }; + 551A759A17868BED0052D185 /* NetSfPeopsOpenGLGPUInterface.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NetSfPeopsOpenGLGPUInterface.xib; sourceTree = ""; }; + 551A75BC17868C400052D185 /* connection.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = connection.c; sourceTree = ""; }; + 551A75BD17868C400052D185 /* connection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = connection.h; sourceTree = ""; }; + 551A75BE17868C400052D185 /* fifo.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = fifo.c; sourceTree = ""; }; + 551A75BF17868C400052D185 /* fifo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = fifo.h; sourceTree = ""; }; + 551A75C217868C400052D185 /* sio1.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = sio1.c; sourceTree = ""; }; + 551A75C317868C400052D185 /* sio1.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = sio1.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 551A75C517868C400052D185 /* typedefs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = typedefs.h; sourceTree = ""; }; + 551A75CE17868C4E0052D185 /* Bladesio1.psxplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Bladesio1.psxplugin; sourceTree = BUILT_PRODUCTS_DIR; }; + 551A75F417868E640052D185 /* cdr.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cdr.c; sourceTree = ""; }; + 551A75F517868E640052D185 /* cdr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = cdr.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 551A75FB17868E640052D185 /* util.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = util.c; sourceTree = ""; }; + 551A760A17868EF00052D185 /* adsr.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = adsr.c; sourceTree = ""; }; + 551A760B17868EF00052D185 /* adsr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = adsr.h; sourceTree = ""; }; + 551A760F17868EF00052D185 /* dma.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = dma.c; sourceTree = ""; }; + 551A761017868EF00052D185 /* dma.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = dma.h; sourceTree = ""; }; + 551A761117868EF00052D185 /* dsoundoss.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = dsoundoss.h; sourceTree = ""; }; + 551A761217868EF00052D185 /* externals.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = externals.c; sourceTree = ""; }; + 551A761317868EF00052D185 /* externals.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = externals.h; sourceTree = ""; }; + 551A761417868EF00052D185 /* freeze.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = freeze.c; sourceTree = ""; }; + 551A761517868EF00052D185 /* gauss_i.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = gauss_i.h; sourceTree = ""; }; + 551A761817868EF00052D185 /* openal.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = openal.c; sourceTree = ""; }; + 551A761A17868EF00052D185 /* psemuxa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = psemuxa.h; sourceTree = ""; }; + 551A761C17868EF00052D185 /* registers.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = registers.c; sourceTree = ""; }; + 551A761D17868EF00052D185 /* registers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = registers.h; sourceTree = ""; }; + 551A761E17868EF00052D185 /* regs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = regs.h; sourceTree = ""; }; + 551A761F17868EF00052D185 /* reverb.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = reverb.c; sourceTree = ""; }; + 551A762017868EF00052D185 /* reverb.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = reverb.h; sourceTree = ""; }; + 551A762117868EF00052D185 /* sdl.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = sdl.c; sourceTree = ""; }; + 551A762217868EF00052D185 /* spu.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; lineEnding = 0; path = spu.c; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.c; }; + 551A762317868EF00052D185 /* spu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = spu.h; sourceTree = ""; }; + 551A762717868EF00052D185 /* stdafx.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = stdafx.h; sourceTree = ""; }; + 551A762817868EF00052D185 /* xa.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = xa.c; sourceTree = ""; }; + 551A762917868EF00052D185 /* xa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = xa.h; sourceTree = ""; }; + 551A762B17868F270052D185 /* cfg.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cfg.c; sourceTree = ""; }; + 551A762C17868F270052D185 /* cfg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cfg.h; sourceTree = ""; }; + 551A762D17868F270052D185 /* draw.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = draw.c; sourceTree = ""; }; + 551A762E17868F270052D185 /* draw.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = draw.h; sourceTree = ""; }; + 551A762F17868F270052D185 /* externals.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = externals.h; sourceTree = ""; }; + 551A763017868F270052D185 /* fps.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = fps.c; sourceTree = ""; }; + 551A763117868F270052D185 /* fps.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = fps.h; sourceTree = ""; }; + 551A763217868F270052D185 /* gpu.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; lineEnding = 0; path = gpu.c; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.c; }; + 551A763317868F270052D185 /* gpu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = gpu.h; sourceTree = ""; }; + 551A763717868F270052D185 /* hq2x.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = hq2x.h; sourceTree = ""; }; + 551A763817868F270052D185 /* hq3x.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = hq3x.h; sourceTree = ""; }; + 551A763A17868F280052D185 /* interp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = interp.h; sourceTree = ""; }; + 551A763B17868F280052D185 /* key.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = key.c; sourceTree = ""; }; + 551A763C17868F280052D185 /* key.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = key.h; sourceTree = ""; }; + 551A763F17868F280052D185 /* menu.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = menu.c; sourceTree = ""; }; + 551A764017868F280052D185 /* menu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = menu.h; sourceTree = ""; }; + 551A764117868F280052D185 /* prim.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = prim.c; sourceTree = ""; }; + 551A764217868F280052D185 /* prim.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = prim.h; sourceTree = ""; }; + 551A764317868F280052D185 /* soft.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = soft.c; sourceTree = ""; }; + 551A764417868F280052D185 /* soft.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = soft.h; sourceTree = ""; }; + 551A764517868F280052D185 /* swap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = swap.h; sourceTree = ""; }; + 551A764617868F280052D185 /* zn.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = zn.c; sourceTree = ""; }; + 551A764B17868F570052D185 /* draw.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = draw.c; sourceTree = ""; }; + 551A764C17868F570052D185 /* draw.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = draw.h; sourceTree = ""; }; + 551A764D17868F570052D185 /* externals.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = externals.h; sourceTree = ""; }; + 551A764E17868F570052D185 /* fps.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = fps.c; sourceTree = ""; }; + 551A764F17868F570052D185 /* fps.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = fps.h; sourceTree = ""; }; + 551A765017868F570052D185 /* gl_ext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = gl_ext.h; sourceTree = ""; }; + 551A765117868F570052D185 /* gpu.c */ = {isa = PBXFileReference; indentWidth = 1; lastKnownFileType = sourcecode.c.c; lineEnding = 0; path = gpu.c; sourceTree = ""; usesTabs = 0; xcLanguageSpecificationIdentifier = xcode.lang.c; }; + 551A765217868F570052D185 /* gpu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = gpu.h; sourceTree = ""; }; + 551A765617868F570052D185 /* gte_accuracy.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = gte_accuracy.c; sourceTree = ""; }; + 551A765717868F570052D185 /* gte_accuracy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = gte_accuracy.h; sourceTree = ""; }; + 551A765817868F570052D185 /* key.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = key.c; sourceTree = ""; }; + 551A765917868F570052D185 /* key.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = key.h; sourceTree = ""; }; + 551A765B17868F570052D185 /* menu.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = menu.c; sourceTree = ""; }; + 551A765C17868F570052D185 /* menu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = menu.h; sourceTree = ""; }; + 551A765D17868F570052D185 /* prim.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = prim.c; sourceTree = ""; }; + 551A765E17868F570052D185 /* prim.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = prim.h; sourceTree = ""; }; + 551A765F17868F570052D185 /* soft.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = soft.c; sourceTree = ""; }; + 551A766017868F570052D185 /* soft.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = soft.h; sourceTree = ""; }; + 551A766117868F570052D185 /* stdafx.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = stdafx.h; sourceTree = ""; }; + 551A766217868F570052D185 /* texture.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = texture.c; sourceTree = ""; }; + 551A766317868F570052D185 /* texture.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = texture.h; sourceTree = ""; }; + 551A76661786901F0052D185 /* analog.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = analog.c; sourceTree = ""; }; + 551A766B1786901F0052D185 /* pad.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = pad.c; sourceTree = ""; }; + 551A766C1786901F0052D185 /* pad.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = pad.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 551A766D1786901F0052D185 /* sdljoy.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = sdljoy.c; sourceTree = ""; }; + 551A767A178690500052D185 /* DFCdrom.psxplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DFCdrom.psxplugin; sourceTree = BUILT_PRODUCTS_DIR; }; + 551A7684178691170052D185 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; + 551A768E1786919F0052D185 /* DFInput.psxplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DFInput.psxplugin; sourceTree = BUILT_PRODUCTS_DIR; }; + 551A76AC178693C60052D185 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; }; + 551A76AE178693D60052D185 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = System/Library/Frameworks/ApplicationServices.framework; sourceTree = SDKROOT; }; + 551A76AF178693D60052D185 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; }; + 551A76B2178693EA0052D185 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; + 551A76BC178693FF0052D185 /* PeopsSoftGPU.psxplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PeopsSoftGPU.psxplugin; sourceTree = BUILT_PRODUCTS_DIR; }; + 551A76D1178695BD0052D185 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = System/Library/Frameworks/GLUT.framework; sourceTree = SDKROOT; }; + 551A76D2178695C70052D185 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; + 551A76D8178696810052D185 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; + 551A76E2178696BD0052D185 /* PeopsSpuSDL.psxplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PeopsSpuSDL.psxplugin; sourceTree = BUILT_PRODUCTS_DIR; }; + 551A76E71786971B0052D185 /* libSPUSharedCode.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSPUSharedCode.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; + 551A771F178698C60052D185 /* PeopsSpuAL.psxplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PeopsSpuAL.psxplugin; sourceTree = BUILT_PRODUCTS_DIR; }; + 551A7723178699250052D185 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; + 551A774F17869C280052D185 /* PeopsXGL.psxplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PeopsXGL.psxplugin; sourceTree = BUILT_PRODUCTS_DIR; }; + 551A776D17869E430052D185 /* DFNet.psxplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DFNet.psxplugin; sourceTree = BUILT_PRODUCTS_DIR; }; + 551A777317869E830052D185 /* dfnet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dfnet.c; sourceTree = ""; }; + 551A777417869E830052D185 /* dfnet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = dfnet.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 551A777817869E830052D185 /* unix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unix.c; sourceTree = ""; }; + 5525BC5D19421A750018AF2F /* Psx-Memcard.mdimporter */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Psx-Memcard.mdimporter"; sourceTree = BUILT_PRODUCTS_DIR; }; + 5525BC6419421A760018AF2F /* Psx-Memcard-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Psx-Memcard-Info.plist"; sourceTree = ""; }; + 5525BC6619421A760018AF2F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 5525BC6819421A760018AF2F /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; + 5525BC6A19421A760018AF2F /* GetMetadataForFile.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GetMetadataForFile.m; sourceTree = ""; }; + 5525BC7019421A760018AF2F /* Psx-Memcard-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Psx-Memcard-Prefix.pch"; sourceTree = ""; }; + 5525BC7719421D4F0018AF2F /* schema.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = schema.xml; sourceTree = ""; }; + 5525BC7B19421DDC0018AF2F /* GetMetadataForFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GetMetadataForFile.h; sourceTree = ""; }; + 5525BC7D194221EC0018AF2F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/schema.strings; sourceTree = ""; }; + 5539965D178BB1B100859644 /* OSXPlugLocalization.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSXPlugLocalization.h; sourceTree = ""; }; + 553FECB918DF5A8300C7B007 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/AddPluginSheet.xib; sourceTree = ""; }; + 553FECBD18DF5A8300C7B007 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/Configuration.xib; sourceTree = ""; }; + 553FECBF18DF5A8300C7B007 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/PCSXR.xib; sourceTree = ""; }; + 553FECC918DF5A8300C7B007 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; + 553FECCB18DF5A8300C7B007 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 553FECCD18DF5A8300C7B007 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = en; path = en.lproj/KeyNames.plist; sourceTree = ""; }; + 553FECCF18DF5A8300C7B007 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 553FECD718DF5A8300C7B007 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = ""; }; + 553FECD818DF5A8300C7B007 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; + 553FECDC18DF5A8300C7B007 /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/InfoPlist.strings; sourceTree = ""; }; + 553FECDD18DF5A8300C7B007 /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/Localizable.strings; sourceTree = ""; }; + 553FECE018DF5A8300C7B007 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/InfoPlist.strings; sourceTree = ""; }; + 553FECE118DF5A8300C7B007 /* ko-KR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "ko-KR"; path = "ko-KR.lproj/InfoPlist.strings"; sourceTree = ""; }; + 553FECE318DF5A8300C7B007 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/InfoPlist.strings"; sourceTree = ""; }; + 553FECE418DF5A8300C7B007 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/InfoPlist.strings; sourceTree = ""; }; + 553FECE818DF5A8300C7B007 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = "zh-Hans"; path = "zh-Hans.lproj/Credits.rtf"; sourceTree = ""; }; + 553FECE918DF5A8300C7B007 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = ""; }; + 553FECEA18DF5A8300C7B007 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; + 553FECED18DF5A8300C7B007 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/InfoPlist.strings"; sourceTree = ""; }; + 553FECFD18DF5ABA00C7B007 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/AddPluginSheet.strings; sourceTree = ""; }; + 553FECFE18DF5ABD00C7B007 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/AddPluginSheet.strings"; sourceTree = ""; }; + 553FECFF18DF5AC200C7B007 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/AddPluginSheet.strings; sourceTree = ""; }; + 553FED0018DF5ADD00C7B007 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Configuration.strings; sourceTree = ""; }; + 553FED0118DF5AE100C7B007 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Configuration.strings"; sourceTree = ""; }; + 553FED0218DF5AE600C7B007 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Configuration.strings; sourceTree = ""; }; + 553FED0318DF5AED00C7B007 /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/Configuration.strings; sourceTree = ""; }; + 553FED0418DF5AFD00C7B007 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/PCSXR.strings; sourceTree = ""; }; + 553FED0518DF5B0000C7B007 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/PCSXR.strings"; sourceTree = ""; }; + 553FED0618DF5B0200C7B007 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/PCSXR.strings; sourceTree = ""; }; + 553FED0718DF5B0500C7B007 /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/PCSXR.strings; sourceTree = ""; }; + 554572F217CBC69600FB7D19 /* SPUShared-info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "SPUShared-info.plist"; sourceTree = ""; }; + 554B391418EB4C66000ADF68 /* DFInput.exp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.exports; name = DFInput.exp; path = Resources/DFInput.exp; sourceTree = ""; }; + 554FD70817C6A13E0056CF66 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = /Library/Frameworks/SDL2.framework; sourceTree = ""; }; + 5550D2711683C923006C56B5 /* RecentItemsMenu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RecentItemsMenu.h; sourceTree = ""; }; + 5550D2721683C923006C56B5 /* RecentItemsMenu.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RecentItemsMenu.m; sourceTree = ""; usesTabs = 1; }; + 55534AF018183BFA006D6BCB /* updateInfoPlist */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = updateInfoPlist; sourceTree = BUILT_PRODUCTS_DIR; }; + 55534AF418183BFB006D6BCB /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 55534AF718183BFB006D6BCB /* updateInfoPlist-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "updateInfoPlist-Prefix.pch"; sourceTree = ""; }; + 5557769917EBE7D60019D008 /* Media.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Media.xcassets; sourceTree = ""; }; + 5569B09D182F0B3D00991C9C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/PcsxrMemCard.xib; sourceTree = ""; }; + 5569B09E182F0B3E00991C9C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/CheatWindow.xib; sourceTree = ""; }; + 5569B09F182F0B3F00991C9C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/Bladesio1PluginConfig.xib; sourceTree = ""; }; + 5569B0A0182F0B4000991C9C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/DFCdromPluginConfig.xib; sourceTree = ""; }; + 5569B0A1182F0B4100991C9C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/NetPcsxrHIDInputPluginMain.xib; sourceTree = ""; }; + 5569B0A2182F0B4200991C9C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/DFNet.xib; sourceTree = ""; }; + 5569B0A3182F0B4800991C9C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/SockDialog.xib; sourceTree = ""; }; + 5569B0A4182F0B4900991C9C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/NetSfPeopsSpuPluginMain.xib; sourceTree = ""; }; + 5569B0A5182F0B4A00991C9C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/NetSfPeopsSoftGPUConfig.xib; sourceTree = ""; }; + 5569B0A6182F0B4B00991C9C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/NetSfPeopsOpenGLConfig.xib; sourceTree = ""; }; + 5569B0AF182F0B7900991C9C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/PcsxrMemCard.strings; sourceTree = ""; }; + 5569B0B1182F0B8100991C9C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/CheatWindow.strings; sourceTree = ""; }; + 5569B0B3182F0B8B00991C9C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Bladesio1PluginConfig.strings; sourceTree = ""; }; + 5569B0B5182F0B9800991C9C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/DFCdromPluginConfig.strings; sourceTree = ""; }; + 5569B0B7182F0BA700991C9C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/NetSfPeopsOpenGLConfig.strings; sourceTree = ""; }; + 5569B0B9182F0BB100991C9C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/NetSfPeopsSoftGPUConfig.strings; sourceTree = ""; }; + 5569B0BB182F0BC000991C9C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/NetSfPeopsSpuPluginMain.strings; sourceTree = ""; }; + 5569B0BD182F0BCE00991C9C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/DFNet.strings; sourceTree = ""; }; + 5569B0BF182F0BD500991C9C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/SockDialog.strings; sourceTree = ""; }; + 5569B0C1182F0BE100991C9C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/NetPcsxrHIDInputPluginMain.strings; sourceTree = ""; }; + 556C37A8197C815C001A4265 /* PSXMemEnumerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSXMemEnumerator.m; sourceTree = ""; }; + 556C37AA197C81F9001A4265 /* PSXMemEnumerator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PSXMemEnumerator.h; sourceTree = ""; }; + 556C37B1197DBFD1001A4265 /* template.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = template.html; sourceTree = ""; }; + 55707E8E18123579007CC5D0 /* hu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/Localizable.strings; sourceTree = ""; }; + 55707E901812357B007CC5D0 /* hu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/Localizable.strings; sourceTree = ""; }; + 55707E921812357D007CC5D0 /* hu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/Localizable.strings; sourceTree = ""; }; + 55707E9518123580007CC5D0 /* hu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/Localizable.strings; sourceTree = ""; }; + 55707E9718123582007CC5D0 /* hu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/Localizable.strings; sourceTree = ""; }; + 55707E9918123584007CC5D0 /* hu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/Localizable.strings; sourceTree = ""; }; + 5581463717AABCD100862DBF /* PcsxrCheatHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PcsxrCheatHandler.h; sourceTree = ""; }; + 5581463817AABCD100862DBF /* PcsxrCheatHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PcsxrCheatHandler.m; sourceTree = ""; }; + 558328C5184F227500DFACE4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/PcsxrMemCard.strings"; sourceTree = ""; }; + 558328C7184F227E00DFACE4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/CheatWindow.strings"; sourceTree = ""; }; + 558328CA184F237000DFACE4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Bladesio1PluginConfig.strings"; sourceTree = ""; }; + 558328CB184F238F00DFACE4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = "zh-Hans"; path = "zh-Hans.lproj/Credits.rtf"; sourceTree = ""; }; + 558328CD184F23DF00DFACE4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/DFCdromPluginConfig.strings"; sourceTree = ""; }; + 558328CE184F23EC00DFACE4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = "zh-Hans"; path = "zh-Hans.lproj/Credits.rtf"; sourceTree = ""; }; + 558328D2184F246500DFACE4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/NetPcsxrHIDInputPluginMain.strings"; sourceTree = ""; }; + 558328D3184F246B00DFACE4 /* zh-Hans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; + 558328D4184F24A300DFACE4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = "zh-Hans"; path = "zh-Hans.lproj/Credits.rtf"; sourceTree = ""; }; + 558328D6184F253300DFACE4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/DFNet.strings"; sourceTree = ""; }; + 558328D8184F253D00DFACE4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/SockDialog.strings"; sourceTree = ""; }; + 558328D9184F254500DFACE4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = ""; }; + 558328DB184F25AB00DFACE4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/NetSfPeopsSoftGPUConfig.strings"; sourceTree = ""; }; + 558328DC184F25B300DFACE4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = "zh-Hans"; path = "zh-Hans.lproj/Credits.rtf"; sourceTree = ""; }; + 558328DE184F263F00DFACE4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/NetSfPeopsOpenGLConfig.strings"; sourceTree = ""; }; + 558328DF184F264800DFACE4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = "zh-Hans"; path = "zh-Hans.lproj/Credits.rtf"; sourceTree = ""; }; + 558328E1184F268300DFACE4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/NetSfPeopsSpuPluginMain.strings"; sourceTree = ""; }; + 558328E2184F268C00DFACE4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = "zh-Hans"; path = "zh-Hans.lproj/Credits.rtf"; sourceTree = ""; }; + 558328E4184F272C00DFACE4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = "zh-Hans"; path = "zh-Hans.lproj/Credits.rtf"; sourceTree = ""; }; + 5590BB8D1A87D5F10027F61B /* DFXVideo.exp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.exports; path = DFXVideo.exp; sourceTree = ""; }; + 5590BB8E1A87D8EC0027F61B /* PeopsXgl.exp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.exports; path = PeopsXgl.exp; sourceTree = ""; }; + 5590BB8F1A87DA0B0027F61B /* DFNet.exp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.exports; path = DFNet.exp; sourceTree = ""; }; + 5590BB901A87DA510027F61B /* DFCdrom.exp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.exports; path = DFCdrom.exp; sourceTree = ""; }; + 5590BB911A87DAA30027F61B /* Bladesio1.exp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.exports; path = Bladesio1.exp; sourceTree = ""; }; + 559366C012B694DF004ACC1E /* iGte.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iGte.h; sourceTree = ""; }; + 559366C112B694DF004ACC1E /* iR3000A-64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "iR3000A-64.c"; sourceTree = ""; }; + 559366C212B694DF004ACC1E /* ix86-64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "ix86-64.c"; sourceTree = ""; }; + 559366C312B694DF004ACC1E /* ix86-64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ix86-64.h"; sourceTree = ""; }; + 559366C412B694DF004ACC1E /* ix86_3dnow.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ix86_3dnow.c; sourceTree = ""; }; + 559366C512B694DF004ACC1E /* ix86_cpudetect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ix86_cpudetect.c; sourceTree = ""; }; + 559366C612B694DF004ACC1E /* ix86_fpu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ix86_fpu.c; sourceTree = ""; }; + 559366C712B694DF004ACC1E /* ix86_mmx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ix86_mmx.c; sourceTree = ""; }; + 559366C812B694DF004ACC1E /* ix86_sse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ix86_sse.c; sourceTree = ""; }; + 5593804E18F38C060022C282 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 5598AAF017D2D5450024F71D /* fr */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; + 5598AAF217D2D5470024F71D /* fr */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; + 5598AAF517D2D54A0024F71D /* fr */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; + 5598AAF717D2D54C0024F71D /* fr */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; + 5598AAF917D2D54E0024F71D /* fr */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; + 5598AAFB17D2E9E90024F71D /* fr */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; + 55A9021E147D7C380037E18F /* PcsxrMemCardController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PcsxrMemCardController.h; sourceTree = ""; }; + 55A9021F147D7C380037E18F /* PcsxrMemCardController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PcsxrMemCardController.m; sourceTree = ""; usesTabs = 1; }; + 55A90227147D89380037E18F /* PcsxrMemoryObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = PcsxrMemoryObject.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 55A90228147D89380037E18F /* PcsxrMemoryObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PcsxrMemoryObject.m; sourceTree = ""; usesTabs = 1; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 55B13FBF18C4FAC600ACD9AC /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; + 55BBA690149454DE003B2CEC /* PcsxrFileHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PcsxrFileHandle.h; sourceTree = ""; }; + 55BBA691149455E1003B2CEC /* PcsxrMemCardHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PcsxrMemCardHandler.h; sourceTree = ""; }; + 55BBA692149455E1003B2CEC /* PcsxrMemCardHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PcsxrMemCardHandler.m; sourceTree = ""; usesTabs = 1; }; + 55BBA69414945628003B2CEC /* PcsxrPluginHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PcsxrPluginHandler.h; sourceTree = ""; }; + 55BBA69514945628003B2CEC /* PcsxrPluginHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PcsxrPluginHandler.m; sourceTree = ""; usesTabs = 1; }; + 55BBA69714953887003B2CEC /* PcsxrDiscHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PcsxrDiscHandler.h; sourceTree = ""; }; + 55BBA69814953887003B2CEC /* PcsxrDiscHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PcsxrDiscHandler.m; sourceTree = ""; usesTabs = 1; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 55BBA69A14958399003B2CEC /* PcsxrFreezeStateHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PcsxrFreezeStateHandler.h; sourceTree = ""; }; + 55BBA69B1495839A003B2CEC /* PcsxrFreezeStateHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PcsxrFreezeStateHandler.m; sourceTree = ""; usesTabs = 1; }; + 55CA586A17E799E6007424D5 /* DiskArbitration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiskArbitration.framework; path = System/Library/Frameworks/DiskArbitration.framework; sourceTree = SDKROOT; }; + 55DA37241894419000B44951 /* pcsxr.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = pcsxr.pch; sourceTree = SOURCE_ROOT; }; + 55E0ACDE178B695F0005C945 /* LaunchArg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LaunchArg.h; sourceTree = ""; }; + 55E0ACDF178B69600005C945 /* LaunchArg.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LaunchArg.m; sourceTree = ""; usesTabs = 1; }; + 55E1598C18455C60007983CB /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/CheatWindow.strings; sourceTree = ""; }; + 55E1598E18455C78007983CB /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/PcsxrMemCard.strings; sourceTree = ""; }; + 55E15993184564D4007983CB /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; }; + 55E159A31845BA55007983CB /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Bladesio1PluginConfig.strings; sourceTree = ""; }; + 55E159A51845BA57007983CB /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/Bladesio1PluginConfig.strings; sourceTree = ""; }; + 55E159A71845BA63007983CB /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/DFCdromPluginConfig.strings; sourceTree = ""; }; + 55E159A91845BA66007983CB /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/DFCdromPluginConfig.strings; sourceTree = ""; }; + 55E159AB1845BA78007983CB /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/NetPcsxrHIDInputPluginMain.strings; sourceTree = ""; }; + 55E159AD1845BA7B007983CB /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/NetPcsxrHIDInputPluginMain.strings; sourceTree = ""; }; + 55E159AF1845BA88007983CB /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/SockDialog.strings; sourceTree = ""; }; + 55E159B11845BA8A007983CB /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/SockDialog.strings; sourceTree = ""; }; + 55E159B31845BABA007983CB /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/DFNet.strings; sourceTree = ""; }; + 55E159B51845BABC007983CB /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/DFNet.strings; sourceTree = ""; }; + 55E159B71845BACC007983CB /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/NetSfPeopsSpuPluginMain.strings; sourceTree = ""; }; + 55E159B91845BACF007983CB /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/NetSfPeopsSpuPluginMain.strings; sourceTree = ""; }; + 55E159BB1845BAEB007983CB /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/NetSfPeopsSoftGPUConfig.strings; sourceTree = ""; }; + 55E159BD1845BAED007983CB /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/NetSfPeopsSoftGPUConfig.strings; sourceTree = ""; }; + 55E159BF1845BB4C007983CB /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/NetSfPeopsOpenGLConfig.strings; sourceTree = ""; }; + 55E159C11845BB4F007983CB /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/NetSfPeopsOpenGLConfig.strings; sourceTree = ""; }; + 55EC05F91788B1230053AC23 /* PcsxrMemCardArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PcsxrMemCardArray.h; sourceTree = ""; }; + 55EC05FA1788B1230053AC23 /* PcsxrMemCardArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PcsxrMemCardArray.m; sourceTree = ""; usesTabs = 1; }; + 55EC05FC178916E70053AC23 /* MemBadgeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemBadgeView.h; sourceTree = ""; }; + 55EC05FD178916E70053AC23 /* MemBadgeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MemBadgeView.m; sourceTree = ""; usesTabs = 1; }; + 55EE2D9017E2323400FED42A /* ecm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ecm.h; sourceTree = ""; }; + 55F41A2017EF774500605DF8 /* version.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = version.sh; sourceTree = ""; }; + 55F41A2117EF7A3300605DF8 /* Info.plistvers.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plistvers.plist; path = ../Info.plistvers.plist; sourceTree = ""; }; + 712FD1E51093096F00575A92 /* debug.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; path = debug.c; sourceTree = ""; }; + 712FD1E61093096F00575A92 /* socket.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; path = socket.c; sourceTree = ""; }; + 712FD1E71093096F00575A92 /* socket.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = socket.h; sourceTree = ""; }; + 713B530C110B75650002F164 /* ppf.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; path = ppf.c; sourceTree = ""; }; + 713B530D110B75650002F164 /* ppf.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = ppf.h; sourceTree = ""; }; + 7161C2810FDED6D000225F97 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = ""; }; + 7161C2970FDED75300225F97 /* ExtendedKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtendedKeys.h; sourceTree = ""; }; + 7192F428129C412E0042D946 /* gpu.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; path = gpu.c; sourceTree = ""; }; + 7192F429129C412E0042D946 /* gpu.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = gpu.h; sourceTree = ""; }; + 719594B011AEFE8C004AD686 /* psxcommon.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; path = psxcommon.c; sourceTree = ""; }; + 71F4C5600FDED12800529849 /* cdriso.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 2; path = cdriso.c; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.c; }; + 71F4C5610FDED12800529849 /* cdriso.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cdriso.h; sourceTree = ""; }; + 71F4C5620FDED12800529849 /* cdrom.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 2; path = cdrom.c; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.c; }; + 71F4C5630FDED12800529849 /* cdrom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cdrom.h; sourceTree = ""; }; + 71F4C5640FDED12800529849 /* cheat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cheat.c; sourceTree = ""; }; + 71F4C5650FDED12800529849 /* cheat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cheat.h; sourceTree = ""; }; + 71F4C5660FDED12800529849 /* coff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = coff.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 71F4C5670FDED12800529849 /* debug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = debug.h; sourceTree = ""; }; + 71F4C5680FDED12800529849 /* decode_xa.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = decode_xa.c; sourceTree = ""; }; + 71F4C5690FDED12800529849 /* decode_xa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = decode_xa.h; sourceTree = ""; }; + 71F4C56A0FDED12800529849 /* disr3000a.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = disr3000a.c; sourceTree = ""; }; + 71F4C56B0FDED12800529849 /* gte.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gte.c; sourceTree = ""; }; + 71F4C56C0FDED12800529849 /* gte.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gte.h; sourceTree = ""; }; + 71F4C56D0FDED12800529849 /* mdec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mdec.c; sourceTree = ""; }; + 71F4C56E0FDED12800529849 /* mdec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mdec.h; sourceTree = ""; }; + 71F4C56F0FDED12800529849 /* misc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = misc.c; sourceTree = ""; }; + 71F4C5700FDED12800529849 /* misc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = misc.h; sourceTree = ""; }; + 71F4C5710FDED12800529849 /* plugins.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = plugins.c; sourceTree = ""; }; + 71F4C5720FDED12800529849 /* plugins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = plugins.h; sourceTree = ""; }; + 71F4C5730FDED12800529849 /* psemu_plugin_defs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = psemu_plugin_defs.h; sourceTree = ""; }; + 71F4C5740FDED12800529849 /* psxbios.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = psxbios.c; sourceTree = ""; }; + 71F4C5750FDED12800529849 /* psxbios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = psxbios.h; sourceTree = ""; }; + 71F4C5760FDED12800529849 /* psxcommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = psxcommon.h; sourceTree = ""; }; + 71F4C5770FDED12800529849 /* psxcounters.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = psxcounters.c; sourceTree = ""; }; + 71F4C5780FDED12800529849 /* psxcounters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = psxcounters.h; sourceTree = ""; }; + 71F4C5790FDED12800529849 /* psxdma.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = psxdma.c; sourceTree = ""; }; + 71F4C57A0FDED12800529849 /* psxdma.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = psxdma.h; sourceTree = ""; }; + 71F4C57B0FDED12800529849 /* psxhle.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = psxhle.c; sourceTree = ""; }; + 71F4C57C0FDED12800529849 /* psxhle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = psxhle.h; sourceTree = ""; }; + 71F4C57D0FDED12800529849 /* psxhw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = psxhw.c; sourceTree = ""; }; + 71F4C57E0FDED12800529849 /* psxhw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = psxhw.h; sourceTree = ""; }; + 71F4C57F0FDED12800529849 /* psxinterpreter.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = psxinterpreter.c; sourceTree = ""; }; + 71F4C5800FDED12800529849 /* psxmem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = psxmem.c; sourceTree = ""; }; + 71F4C5810FDED12800529849 /* psxmem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = psxmem.h; sourceTree = ""; }; + 71F4C5820FDED12800529849 /* r3000a.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = r3000a.c; sourceTree = ""; }; + 71F4C5830FDED12800529849 /* r3000a.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = r3000a.h; sourceTree = ""; }; + 71F4C5840FDED12800529849 /* sio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sio.c; sourceTree = ""; }; + 71F4C5850FDED12800529849 /* sio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sio.h; sourceTree = ""; }; + 71F4C5860FDED12800529849 /* spu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = spu.c; sourceTree = ""; }; + 71F4C5870FDED12800529849 /* spu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = spu.h; sourceTree = ""; }; + 71F4C5880FDED12800529849 /* system.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = system.h; sourceTree = ""; }; + 71F703A611B3A673007DD5C5 /* sjisfont.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = sjisfont.h; sourceTree = ""; }; + D422E67816DC495800526DCF /* CheatController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CheatController.h; sourceTree = ""; }; + D422E67916DC495800526DCF /* CheatController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CheatController.m; sourceTree = ""; usesTabs = 1; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2BB3D6C505427FE200831ACB /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A76D9178696810052D185 /* libz.dylib in Frameworks */, + 55DA3723189440C800B44951 /* CoreFoundation.framework in Frameworks */, + 551A76D7178696110052D185 /* IOKit.framework in Frameworks */, + 55CA586B17E799E6007424D5 /* DiskArbitration.framework in Frameworks */, + 551A76D61786960C0052D185 /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 550E343218E6293D00A1AD21 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 550E344F18E6332F00A1AD21 /* libz.dylib in Frameworks */, + 550E343B18E6293D00A1AD21 /* CoreServices.framework in Frameworks */, + 550E343C18E6293D00A1AD21 /* CoreFoundation.framework in Frameworks */, + 550E343A18E6293D00A1AD21 /* ApplicationServices.framework in Frameworks */, + 550E343918E6293D00A1AD21 /* QuickLook.framework in Frameworks */, + 550E345318E63DB700A1AD21 /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A75C817868C4E0052D185 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A75C917868C4E0052D185 /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A7674178690500052D185 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A7685178691170052D185 /* IOKit.framework in Frameworks */, + 551A7675178690500052D185 /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A76881786919F0052D185 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 550FFAEF17CEE37D0003A2F3 /* CoreFoundation.framework in Frameworks */, + 551A77E71786A4DD0052D185 /* Carbon.framework in Frameworks */, + 551A76891786919F0052D185 /* Cocoa.framework in Frameworks */, + 554FD70C17C6A1F10056CF66 /* SDL2.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A76B6178693FF0052D185 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A76D4178695D20052D185 /* OpenGL.framework in Frameworks */, + 551A76B7178693FF0052D185 /* Cocoa.framework in Frameworks */, + 551A76D3178695D10052D185 /* GLUT.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A76DC178696BD0052D185 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A76DD178696BD0052D185 /* Cocoa.framework in Frameworks */, + 551A76F6178697D70052D185 /* libSPUSharedCode.dylib in Frameworks */, + 554FD70917C6A13E0056CF66 /* SDL2.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A76E41786971B0052D185 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A76E81786971B0052D185 /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A7714178698C60052D185 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A7724178699250052D185 /* OpenAL.framework in Frameworks */, + 551A7716178698C60052D185 /* Cocoa.framework in Frameworks */, + 551A7715178698C60052D185 /* libSPUSharedCode.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A774917869C280052D185 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A775117869C3C0052D185 /* OpenGL.framework in Frameworks */, + 551A774A17869C280052D185 /* Cocoa.framework in Frameworks */, + 551A775017869C3C0052D185 /* GLUT.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A776717869E430052D185 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A776817869E430052D185 /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5525BC5A19421A750018AF2F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 5525BC5F19421A760018AF2F /* CoreFoundation.framework in Frameworks */, + 5525BC5E19421A760018AF2F /* CoreServices.framework in Frameworks */, + 5525BC6119421A760018AF2F /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 55534AED18183BFA006D6BCB /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 55268A5A1876244E00A82269 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* Pcsxr */ = { + isa = PBXGroup; + children = ( + 55F41A2017EF774500605DF8 /* version.sh */, + 08FB7795FE84155DC02AAC07 /* PCSXR */, + 551A74AF17868BE90052D185 /* plugins */, + 55534AF318183BFA006D6BCB /* updateInfoPlist */, + 550E343D18E6293D00A1AD21 /* Pcsxr-QL */, + 5525BC6219421A760018AF2F /* Psx-Memcard */, + 551A749D17868B110052D185 /* Frameworks */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + ); + name = Pcsxr; + sourceTree = ""; + }; + 08FB7795FE84155DC02AAC07 /* PCSXR */ = { + isa = PBXGroup; + children = ( + 2BCE23B204C6B52C007C2DA3 /* libpcsxcore */, + 2BC4787804C7FDBD00CAB520 /* MacOSX */, + 2BA178AD0514CE260026D74D /* Resources */, + ); + name = PCSXR; + sourceTree = ""; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 2BBD6C1D04C893F500A83E33 /* PlugIns */, + 2BB3D6D105427FE200831ACB /* PCSXR.app */, + 551A75CE17868C4E0052D185 /* Bladesio1.psxplugin */, + 551A767A178690500052D185 /* DFCdrom.psxplugin */, + 551A768E1786919F0052D185 /* DFInput.psxplugin */, + 551A76BC178693FF0052D185 /* PeopsSoftGPU.psxplugin */, + 551A76E2178696BD0052D185 /* PeopsSpuSDL.psxplugin */, + 551A76E71786971B0052D185 /* libSPUSharedCode.dylib */, + 551A771F178698C60052D185 /* PeopsSpuAL.psxplugin */, + 551A774F17869C280052D185 /* PeopsXGL.psxplugin */, + 551A776D17869E430052D185 /* DFNet.psxplugin */, + 55534AF018183BFA006D6BCB /* updateInfoPlist */, + 550E343718E6293D00A1AD21 /* Pcsxr-QL.qlgenerator */, + 5525BC5D19421A750018AF2F /* Psx-Memcard.mdimporter */, + ); + name = Products; + sourceTree = ""; + }; + 2BA178AD0514CE260026D74D /* Resources */ = { + isa = PBXGroup; + children = ( + 5557769917EBE7D60019D008 /* Media.xcassets */, + 2BB3D6CF05427FE200831ACB /* Info.plist */, + 55F41A2117EF7A3300605DF8 /* Info.plistvers.plist */, + 553FECCC18DF5A8300C7B007 /* KeyNames.plist */, + 553FECC818DF5A8300C7B007 /* Credits.rtf */, + 553FECBC18DF5A8300C7B007 /* Configuration.xib */, + 553FECBE18DF5A8300C7B007 /* PCSXR.xib */, + 553FECB818DF5A8300C7B007 /* AddPluginSheet.xib */, + 55C7A216148B2B3800C22ABC /* PcsxrMemCard.xib */, + D422E66C16DC48D000526DCF /* CheatWindow.xib */, + 553FECCA18DF5A8300C7B007 /* InfoPlist.strings */, + 553FECCE18DF5A8300C7B007 /* Localizable.strings */, + ); + path = Resources; + sourceTree = ""; + }; + 2BBD6C1D04C893F500A83E33 /* PlugIns */ = { + isa = PBXGroup; + children = ( + ); + name = PlugIns; + sourceTree = ""; + }; + 2BC4787804C7FDBD00CAB520 /* MacOSX */ = { + isa = PBXGroup; + children = ( + 557649B61786AF6F007C4457 /* File Handlers */, + 557649B71786AF92007C4457 /* Plug-in handling */, + 557649B81786AFB7007C4457 /* Controllers */, + 55E0ACE1178B850B0005C945 /* Helper Classes */, + 7161C2810FDED6D000225F97 /* config.h */, + 2BA178A505148D9D0026D74D /* main.m */, + 2BBB17DA051E4D0F00B84448 /* Plugin.c */, + 7161C2970FDED75300225F97 /* ExtendedKeys.h */, + 02717969167884DF004AED62 /* hotkeys.h */, + 02717967167884C9004AED62 /* hotkeys.m */, + 5539965D178BB1B100859644 /* OSXPlugLocalization.h */, + 55DA37241894419000B44951 /* pcsxr.pch */, + ); + name = MacOSX; + path = Source; + sourceTree = ""; + }; + 2BCE23B204C6B52C007C2DA3 /* libpcsxcore */ = { + isa = PBXGroup; + children = ( + 559366BF12B694DF004ACC1E /* ix86_64 */, + 71F4C5600FDED12800529849 /* cdriso.c */, + 71F4C5610FDED12800529849 /* cdriso.h */, + 71F4C5620FDED12800529849 /* cdrom.c */, + 71F4C5630FDED12800529849 /* cdrom.h */, + 71F4C5640FDED12800529849 /* cheat.c */, + 71F4C5650FDED12800529849 /* cheat.h */, + 71F4C5660FDED12800529849 /* coff.h */, + 712FD1E51093096F00575A92 /* debug.c */, + 71F4C5670FDED12800529849 /* debug.h */, + 71F4C5680FDED12800529849 /* decode_xa.c */, + 71F4C5690FDED12800529849 /* decode_xa.h */, + 71F4C56A0FDED12800529849 /* disr3000a.c */, + 55EE2D9017E2323400FED42A /* ecm.h */, + 7192F428129C412E0042D946 /* gpu.c */, + 7192F429129C412E0042D946 /* gpu.h */, + 71F4C56B0FDED12800529849 /* gte.c */, + 71F4C56C0FDED12800529849 /* gte.h */, + 71F4C56D0FDED12800529849 /* mdec.c */, + 71F4C56E0FDED12800529849 /* mdec.h */, + 71F4C56F0FDED12800529849 /* misc.c */, + 71F4C5700FDED12800529849 /* misc.h */, + 71F4C5710FDED12800529849 /* plugins.c */, + 71F4C5720FDED12800529849 /* plugins.h */, + 713B530C110B75650002F164 /* ppf.c */, + 713B530D110B75650002F164 /* ppf.h */, + 71F4C5730FDED12800529849 /* psemu_plugin_defs.h */, + 71F4C5740FDED12800529849 /* psxbios.c */, + 71F4C5750FDED12800529849 /* psxbios.h */, + 719594B011AEFE8C004AD686 /* psxcommon.c */, + 71F4C5760FDED12800529849 /* psxcommon.h */, + 71F4C5770FDED12800529849 /* psxcounters.c */, + 71F4C5780FDED12800529849 /* psxcounters.h */, + 71F4C5790FDED12800529849 /* psxdma.c */, + 71F4C57A0FDED12800529849 /* psxdma.h */, + 71F4C57B0FDED12800529849 /* psxhle.c */, + 71F4C57C0FDED12800529849 /* psxhle.h */, + 71F4C57D0FDED12800529849 /* psxhw.c */, + 71F4C57E0FDED12800529849 /* psxhw.h */, + 71F4C57F0FDED12800529849 /* psxinterpreter.c */, + 71F4C5800FDED12800529849 /* psxmem.c */, + 71F4C5810FDED12800529849 /* psxmem.h */, + 71F4C5820FDED12800529849 /* r3000a.c */, + 71F4C5830FDED12800529849 /* r3000a.h */, + 71F4C5840FDED12800529849 /* sio.c */, + 71F4C5850FDED12800529849 /* sio.h */, + 71F703A611B3A673007DD5C5 /* sjisfont.h */, + 712FD1E61093096F00575A92 /* socket.c */, + 712FD1E71093096F00575A92 /* socket.h */, + 71F4C5860FDED12800529849 /* spu.c */, + 71F4C5870FDED12800529849 /* spu.h */, + 71F4C5880FDED12800529849 /* system.h */, + ); + name = libpcsxcore; + path = ../libpcsxcore; + sourceTree = ""; + }; + 550E343D18E6293D00A1AD21 /* Pcsxr-QL */ = { + isa = PBXGroup; + children = ( + 550E345118E6362300A1AD21 /* nopic.h */, + 550E344E18E629A300A1AD21 /* MyQuickLook.h */, + 550E344318E6293D00A1AD21 /* GenerateThumbnailForURL.m */, + 550E344518E6293D00A1AD21 /* GeneratePreviewForURL.m */, + 550E344718E6293D00A1AD21 /* main.c */, + 556C37AA197C81F9001A4265 /* PSXMemEnumerator.h */, + 556C37A8197C815C001A4265 /* PSXMemEnumerator.m */, + 550E343E18E6293D00A1AD21 /* Supporting Files */, + ); + path = "Pcsxr-QL"; + sourceTree = ""; + }; + 550E343E18E6293D00A1AD21 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 556C37B1197DBFD1001A4265 /* template.html */, + 550E344018E6293D00A1AD21 /* InfoPlist.strings */, + 550E343F18E6293D00A1AD21 /* Pcsxr-QL-Info.plist */, + 550E344918E6293D00A1AD21 /* Pcsxr-QL-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 551A749D17868B110052D185 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 55E15993184564D4007983CB /* GLKit.framework */, + 554FD70817C6A13E0056CF66 /* SDL2.framework */, + 55CA586A17E799E6007424D5 /* DiskArbitration.framework */, + 551A7723178699250052D185 /* OpenAL.framework */, + 551A76D1178695BD0052D185 /* GLUT.framework */, + 551A76D2178695C70052D185 /* OpenGL.framework */, + 2B976C00074C14B4007C050A /* Kernel.framework */, + 551A76AC178693C60052D185 /* Carbon.framework */, + 551A749E17868B110052D185 /* Cocoa.framework */, + 551A7684178691170052D185 /* IOKit.framework */, + 551A76B2178693EA0052D185 /* CoreFoundation.framework */, + 551A76AE178693D60052D185 /* ApplicationServices.framework */, + 551A76AF178693D60052D185 /* CoreServices.framework */, + 551A74A117868B110052D185 /* AppKit.framework */, + 551A74A217868B110052D185 /* CoreData.framework */, + 551A74A317868B110052D185 /* Foundation.framework */, + 551A76D8178696810052D185 /* libz.dylib */, + 550E343818E6293D00A1AD21 /* QuickLook.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 551A74AF17868BE90052D185 /* plugins */ = { + isa = PBXGroup; + children = ( + 551A74B017868BE90052D185 /* Bladesio1 */, + 551A750417868BEA0052D185 /* DFCdrom */, + 551A751817868BEB0052D185 /* DFInput */, + 551A753217868BEB0052D185 /* DFNet */, + 551A754917868BEC0052D185 /* DFSound */, + 551A756617868BEC0052D185 /* DFXVideo */, + 551A758317868BED0052D185 /* PeopsXgl */, + ); + path = plugins; + sourceTree = ""; + }; + 551A74B017868BE90052D185 /* Bladesio1 */ = { + isa = PBXGroup; + children = ( + 551A75BA17868C400052D185 /* src */, + 551A74BD17868BEA0052D185 /* macsrc */, + 551A75B917868C200052D185 /* Resources */, + ); + path = Bladesio1; + sourceTree = ""; + }; + 551A74BD17868BEA0052D185 /* macsrc */ = { + isa = PBXGroup; + children = ( + 551A74BF17868BEA0052D185 /* cfg.c */, + 551A74C017868BEA0052D185 /* PluginConfigController.h */, + 551A74C117868BEA0052D185 /* PluginConfigController.m */, + ); + path = macsrc; + sourceTree = ""; + }; + 551A750417868BEA0052D185 /* DFCdrom */ = { + isa = PBXGroup; + children = ( + 551A75F017868E640052D185 /* src */, + 551A751217868BEB0052D185 /* macsrc */, + 551A75D817868E180052D185 /* Resources */, + ); + path = DFCdrom; + sourceTree = ""; + }; + 551A751217868BEB0052D185 /* macsrc */ = { + isa = PBXGroup; + children = ( + 551A751317868BEB0052D185 /* cdr-macosx.c */, + 551A751417868BEB0052D185 /* cfg.c */, + 551A751517868BEB0052D185 /* PluginConfigController.h */, + 551A751617868BEB0052D185 /* PluginConfigController.m */, + ); + path = macsrc; + sourceTree = ""; + }; + 551A751817868BEB0052D185 /* DFInput */ = { + isa = PBXGroup; + children = ( + 551A76651786901F0052D185 /* src */, + 551A752617868BEB0052D185 /* macsrc */, + 551A7671178690280052D185 /* Resources */, + ); + path = DFInput; + sourceTree = ""; + }; + 551A752617868BEB0052D185 /* macsrc */ = { + isa = PBXGroup; + children = ( + 550FFAF017CEEEC90003A2F3 /* cfgHelper.m */, + 551A752717868BEB0052D185 /* cfg.c */, + 551A752817868BEB0052D185 /* cfg.h */, + 551A752917868BEB0052D185 /* ControllerList.h */, + 551A752A17868BEB0052D185 /* ControllerList.m */, + 551A752B17868BEB0052D185 /* MappingCell.h */, + 551A752C17868BEB0052D185 /* MappingCell.m */, + 551A752D17868BEB0052D185 /* PadController.h */, + 551A752E17868BEB0052D185 /* PadController.m */, + 551A752F17868BEB0052D185 /* PadView.h */, + 551A753017868BEB0052D185 /* PadView.m */, + 551A753117868BEB0052D185 /* xkb.c */, + ); + path = macsrc; + sourceTree = ""; + }; + 551A753217868BEB0052D185 /* DFNet */ = { + isa = PBXGroup; + children = ( + 551A777117869E830052D185 /* src */, + 551A754117868BEC0052D185 /* macsrc */, + 551A760817868EC10052D185 /* Resoruces */, + ); + path = DFNet; + sourceTree = ""; + }; + 551A754117868BEC0052D185 /* macsrc */ = { + isa = PBXGroup; + children = ( + 551A754317868BEC0052D185 /* cfg.c */, + 551A754417868BEC0052D185 /* PluginConfigController.h */, + 551A754517868BEC0052D185 /* PluginConfigController.m */, + 551A754617868BEC0052D185 /* SockDialog.h */, + 551A754717868BEC0052D185 /* SockDialog.m */, + ); + path = macsrc; + sourceTree = ""; + }; + 551A754917868BEC0052D185 /* DFSound */ = { + isa = PBXGroup; + children = ( + 551A760917868EF00052D185 /* src */, + 551A754C17868BEC0052D185 /* macsrc */, + 551A755817868BEC0052D185 /* Resorces */, + ); + path = DFSound; + sourceTree = ""; + }; + 551A754C17868BEC0052D185 /* macsrc */ = { + isa = PBXGroup; + children = ( + 551A754E17868BEC0052D185 /* maccfg.h */, + 551A754F17868BEC0052D185 /* NamedSlider.h */, + 551A755017868BEC0052D185 /* NamedSlider.m */, + 551A755117868BEC0052D185 /* PluginController.h */, + 551A755217868BEC0052D185 /* PluginController.m */, + 551A755317868BEC0052D185 /* SPUPluginController.h */, + 551A755417868BEC0052D185 /* SPUPluginController.m */, + ); + path = macsrc; + sourceTree = ""; + }; + 551A755817868BEC0052D185 /* Resorces */ = { + isa = PBXGroup; + children = ( + 551A755917868BEC0052D185 /* OpenAL */, + 551A755C17868BEC0052D185 /* SDL */, + 551A755F17868BEC0052D185 /* Shared */, + ); + path = Resorces; + sourceTree = ""; + }; + 551A755917868BEC0052D185 /* OpenAL */ = { + isa = PBXGroup; + children = ( + 551A754A17868BEC0052D185 /* Info-AL.plist */, + 550128AD1A1182D700468D09 /* InfoPlist.strings */, + ); + path = OpenAL; + sourceTree = ""; + }; + 551A755C17868BEC0052D185 /* SDL */ = { + isa = PBXGroup; + children = ( + 550128B01A1182E500468D09 /* InfoPlist.strings */, + 551A754B17868BEC0052D185 /* Info-SDL.plist */, + ); + path = SDL; + sourceTree = ""; + }; + 551A755F17868BEC0052D185 /* Shared */ = { + isa = PBXGroup; + children = ( + 550FFAEE17CEB8780003A2F3 /* DFSound.exp */, + 554572F217CBC69600FB7D19 /* SPUShared-info.plist */, + 551A756017868BEC0052D185 /* Credits.rtf */, + 551A756217868BEC0052D185 /* Localizable.strings */, + 551A756417868BEC0052D185 /* NetSfPeopsSpuPluginMain.xib */, + ); + path = Shared; + sourceTree = ""; + }; + 551A756617868BEC0052D185 /* DFXVideo */ = { + isa = PBXGroup; + children = ( + 551A762A17868F270052D185 /* src */, + 551A757317868BEC0052D185 /* macsrc */, + 551A764717868F3D0052D185 /* Resources */, + ); + path = DFXVideo; + sourceTree = ""; + }; + 551A757317868BEC0052D185 /* macsrc */ = { + isa = PBXGroup; + children = ( + 551A757417868BEC0052D185 /* drawgl.m */, + 551A757517868BEC0052D185 /* ExtendedKeys.h */, + 551A757617868BEC0052D185 /* PluginConfigController.h */, + 551A757717868BEC0052D185 /* PluginConfigController.m */, + 551A757817868BEC0052D185 /* PluginGLView.h */, + 551A757917868BEC0052D185 /* PluginGLView.m */, + 551A757A17868BEC0052D185 /* PluginWindow.h */, + 551A757B17868BEC0052D185 /* PluginWindow.m */, + 551A757C17868BEC0052D185 /* PluginWindowController.h */, + 551A757D17868BEC0052D185 /* PluginWindowController.m */, + 551A757E17868BEC0052D185 /* SGPUPreferences.h */, + ); + path = macsrc; + sourceTree = ""; + }; + 551A758317868BED0052D185 /* PeopsXgl */ = { + isa = PBXGroup; + children = ( + 551A764817868F570052D185 /* src */, + 551A758E17868BED0052D185 /* macsrc */, + 551A766417868F870052D185 /* Resources */, + ); + path = PeopsXgl; + sourceTree = ""; + }; + 551A758E17868BED0052D185 /* macsrc */ = { + isa = PBXGroup; + children = ( + 551A758F17868BED0052D185 /* drawgl.h */, + 551A759017868BED0052D185 /* drawgl.m */, + 551A759117868BED0052D185 /* ExtendedKeys.h */, + 551A759217868BED0052D185 /* NetSfPeopsOpenGLPluginConfigController.h */, + 551A759317868BED0052D185 /* NetSfPeopsOpenGLPluginConfigController.m */, + 551A759417868BED0052D185 /* PluginGLView.h */, + 551A759517868BED0052D185 /* PluginGLView.m */, + 551A759617868BED0052D185 /* PluginWindow.h */, + 551A759717868BED0052D185 /* PluginWindow.m */, + 551A759817868BED0052D185 /* PluginWindowController.h */, + 551A759917868BED0052D185 /* PluginWindowController.m */, + ); + path = macsrc; + sourceTree = ""; + }; + 551A75B917868C200052D185 /* Resources */ = { + isa = PBXGroup; + children = ( + 5590BB911A87DAA30027F61B /* Bladesio1.exp */, + 551A74B417868BEA0052D185 /* Bladesio1PluginConfig.xib */, + 550128911A11817800468D09 /* InfoPlist.strings */, + 550128931A11817800468D09 /* Localizable.strings */, + 551A74B617868BEA0052D185 /* Credits.rtf */, + 551A74BC17868BEA0052D185 /* Info.plist */, + ); + name = Resources; + sourceTree = ""; + }; + 551A75BA17868C400052D185 /* src */ = { + isa = PBXGroup; + children = ( + 551A75BC17868C400052D185 /* connection.c */, + 551A75BD17868C400052D185 /* connection.h */, + 551A75BE17868C400052D185 /* fifo.c */, + 551A75BF17868C400052D185 /* fifo.h */, + 551A75C217868C400052D185 /* sio1.c */, + 551A75C317868C400052D185 /* sio1.h */, + 551A75C517868C400052D185 /* typedefs.h */, + ); + name = src; + path = ../../../plugins/bladesio1; + sourceTree = ""; + }; + 551A75D817868E180052D185 /* Resources */ = { + isa = PBXGroup; + children = ( + 5590BB901A87DA510027F61B /* DFCdrom.exp */, + 551A750917868BEB0052D185 /* Credits.rtf */, + 551A750B17868BEB0052D185 /* DFCdromPluginConfig.xib */, + 550128971A1181A000468D09 /* InfoPlist.strings */, + 551A750F17868BEB0052D185 /* Localizable.strings */, + 551A751117868BEB0052D185 /* Info.plist */, + 551A751717868BEB0052D185 /* version.plist */, + ); + name = Resources; + sourceTree = ""; + }; + 551A75F017868E640052D185 /* src */ = { + isa = PBXGroup; + children = ( + 551A75F417868E640052D185 /* cdr.c */, + 551A75F517868E640052D185 /* cdr.h */, + 551A75FB17868E640052D185 /* util.c */, + ); + name = src; + path = ../../../plugins/dfcdrom; + sourceTree = ""; + }; + 551A760817868EC10052D185 /* Resoruces */ = { + isa = PBXGroup; + children = ( + 5590BB8F1A87DA0B0027F61B /* DFNet.exp */, + 551A753617868BEB0052D185 /* Credits.rtf */, + 551A753817868BEB0052D185 /* DFNet.xib */, + 551A753E17868BEB0052D185 /* SockDialog.xib */, + 551A753A17868BEB0052D185 /* InfoPlist.strings */, + 551A753C17868BEB0052D185 /* Localizable.strings */, + 551A754017868BEC0052D185 /* Info.plist */, + 551A754817868BEC0052D185 /* version.plist */, + ); + name = Resoruces; + sourceTree = ""; + }; + 551A760917868EF00052D185 /* src */ = { + isa = PBXGroup; + children = ( + 551A760A17868EF00052D185 /* adsr.c */, + 551A760B17868EF00052D185 /* adsr.h */, + 551A760F17868EF00052D185 /* dma.c */, + 551A761017868EF00052D185 /* dma.h */, + 551A761117868EF00052D185 /* dsoundoss.h */, + 551A761217868EF00052D185 /* externals.c */, + 551A761317868EF00052D185 /* externals.h */, + 551A761417868EF00052D185 /* freeze.c */, + 551A761517868EF00052D185 /* gauss_i.h */, + 551A761817868EF00052D185 /* openal.c */, + 551A761A17868EF00052D185 /* psemuxa.h */, + 551A761C17868EF00052D185 /* registers.c */, + 551A761D17868EF00052D185 /* registers.h */, + 551A761E17868EF00052D185 /* regs.h */, + 551A761F17868EF00052D185 /* reverb.c */, + 551A762017868EF00052D185 /* reverb.h */, + 551A762117868EF00052D185 /* sdl.c */, + 551A762217868EF00052D185 /* spu.c */, + 551A762317868EF00052D185 /* spu.h */, + 551A762717868EF00052D185 /* stdafx.h */, + 551A762817868EF00052D185 /* xa.c */, + 551A762917868EF00052D185 /* xa.h */, + ); + name = src; + path = ../../../plugins/dfsound; + sourceTree = ""; + }; + 551A762A17868F270052D185 /* src */ = { + isa = PBXGroup; + children = ( + 551A762B17868F270052D185 /* cfg.c */, + 551A762C17868F270052D185 /* cfg.h */, + 551A762D17868F270052D185 /* draw.c */, + 551A762E17868F270052D185 /* draw.h */, + 551A762F17868F270052D185 /* externals.h */, + 551A763017868F270052D185 /* fps.c */, + 551A763117868F270052D185 /* fps.h */, + 551A763217868F270052D185 /* gpu.c */, + 551A763317868F270052D185 /* gpu.h */, + 551A763717868F270052D185 /* hq2x.h */, + 551A763817868F270052D185 /* hq3x.h */, + 551A763A17868F280052D185 /* interp.h */, + 551A763B17868F280052D185 /* key.c */, + 551A763C17868F280052D185 /* key.h */, + 551A763F17868F280052D185 /* menu.c */, + 551A764017868F280052D185 /* menu.h */, + 551A764117868F280052D185 /* prim.c */, + 551A764217868F280052D185 /* prim.h */, + 551A764317868F280052D185 /* soft.c */, + 551A764417868F280052D185 /* soft.h */, + 551A764517868F280052D185 /* swap.h */, + 551A764617868F280052D185 /* zn.c */, + ); + name = src; + path = ../../../plugins/dfxvideo; + sourceTree = ""; + }; + 551A764717868F3D0052D185 /* Resources */ = { + isa = PBXGroup; + children = ( + 5590BB8D1A87D5F10027F61B /* DFXVideo.exp */, + 551A756817868BEC0052D185 /* Credits.rtf */, + 551A756C17868BEC0052D185 /* Localizable.strings */, + 550128A81A11827F00468D09 /* InfoPlist.strings */, + 551A756E17868BEC0052D185 /* NetSfPeopsSoftGPUConfig.xib */, + 551A757F17868BED0052D185 /* NetSfPeopsSoftGPUInterface.xib */, + 551A757017868BEC0052D185 /* gpuPeteOGL2.slf */, + 551A757117868BEC0052D185 /* gpuPeteOGL2.slv */, + 551A757217868BEC0052D185 /* Info.plist */, + ); + name = Resources; + sourceTree = ""; + }; + 551A764817868F570052D185 /* src */ = { + isa = PBXGroup; + children = ( + 551A764B17868F570052D185 /* draw.c */, + 551A764C17868F570052D185 /* draw.h */, + 551A764D17868F570052D185 /* externals.h */, + 551A764E17868F570052D185 /* fps.c */, + 551A764F17868F570052D185 /* fps.h */, + 551A765017868F570052D185 /* gl_ext.h */, + 551A765117868F570052D185 /* gpu.c */, + 551A765217868F570052D185 /* gpu.h */, + 551A765617868F570052D185 /* gte_accuracy.c */, + 551A765717868F570052D185 /* gte_accuracy.h */, + 551A765817868F570052D185 /* key.c */, + 551A765917868F570052D185 /* key.h */, + 551A765B17868F570052D185 /* menu.c */, + 551A765C17868F570052D185 /* menu.h */, + 551A765D17868F570052D185 /* prim.c */, + 551A765E17868F570052D185 /* prim.h */, + 551A765F17868F570052D185 /* soft.c */, + 551A766017868F570052D185 /* soft.h */, + 551A766117868F570052D185 /* stdafx.h */, + 551A766217868F570052D185 /* texture.c */, + 551A766317868F570052D185 /* texture.h */, + ); + indentWidth = 1; + name = src; + path = ../../../plugins/peopsxgl; + sourceTree = ""; + usesTabs = 0; + }; + 551A766417868F870052D185 /* Resources */ = { + isa = PBXGroup; + children = ( + 5590BB8E1A87D8EC0027F61B /* PeopsXgl.exp */, + 551A758517868BED0052D185 /* Credits.rtf */, + 551A758B17868BED0052D185 /* NetSfPeopsOpenGLConfig.xib */, + 551A759A17868BED0052D185 /* NetSfPeopsOpenGLGPUInterface.xib */, + 550128A31A11823900468D09 /* InfoPlist.strings */, + 551A758917868BED0052D185 /* Localizable.strings */, + 551A758D17868BED0052D185 /* Info.plist */, + ); + name = Resources; + sourceTree = ""; + }; + 551A76651786901F0052D185 /* src */ = { + isa = PBXGroup; + children = ( + 551A76661786901F0052D185 /* analog.c */, + 551A766B1786901F0052D185 /* pad.c */, + 551A766C1786901F0052D185 /* pad.h */, + 551A766D1786901F0052D185 /* sdljoy.c */, + ); + name = src; + path = ../../../plugins/dfinput; + sourceTree = ""; + }; + 551A7671178690280052D185 /* Resources */ = { + isa = PBXGroup; + children = ( + 554B391418EB4C66000ADF68 /* DFInput.exp */, + 551A751D17868BEB0052D185 /* Credits.rtf */, + 5501289B1A1181CF00468D09 /* InfoPlist.strings */, + 551A752117868BEB0052D185 /* Localizable.strings */, + 551A752317868BEB0052D185 /* NetPcsxrHIDInputPluginMain.xib */, + 551A752517868BEB0052D185 /* Info.plist */, + ); + name = Resources; + sourceTree = ""; + }; + 551A777117869E830052D185 /* src */ = { + isa = PBXGroup; + children = ( + 551A777317869E830052D185 /* dfnet.c */, + 551A777417869E830052D185 /* dfnet.h */, + 551A777817869E830052D185 /* unix.c */, + ); + name = src; + path = ../../../plugins/dfnet; + sourceTree = ""; + }; + 5525BC6219421A760018AF2F /* Psx-Memcard */ = { + isa = PBXGroup; + children = ( + 5525BC7B19421DDC0018AF2F /* GetMetadataForFile.h */, + 5525BC6A19421A760018AF2F /* GetMetadataForFile.m */, + 5525BC6319421A760018AF2F /* Supporting Files */, + ); + path = "Psx-Memcard"; + sourceTree = ""; + }; + 5525BC6319421A760018AF2F /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 5525BC7E194221EC0018AF2F /* schema.strings */, + 5525BC7719421D4F0018AF2F /* schema.xml */, + 5525BC6419421A760018AF2F /* Psx-Memcard-Info.plist */, + 5525BC6519421A760018AF2F /* InfoPlist.strings */, + 5525BC6819421A760018AF2F /* main.c */, + 5525BC7019421A760018AF2F /* Psx-Memcard-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 55534AF318183BFA006D6BCB /* updateInfoPlist */ = { + isa = PBXGroup; + children = ( + 55534AF418183BFB006D6BCB /* main.m */, + 55534AF618183BFB006D6BCB /* Supporting Files */, + ); + path = updateInfoPlist; + sourceTree = ""; + }; + 55534AF618183BFB006D6BCB /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 55534AF718183BFB006D6BCB /* updateInfoPlist-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 557649B61786AF6F007C4457 /* File Handlers */ = { + isa = PBXGroup; + children = ( + 55BBA690149454DE003B2CEC /* PcsxrFileHandle.h */, + 55BBA691149455E1003B2CEC /* PcsxrMemCardHandler.h */, + 55BBA692149455E1003B2CEC /* PcsxrMemCardHandler.m */, + 55BBA69414945628003B2CEC /* PcsxrPluginHandler.h */, + 55BBA69514945628003B2CEC /* PcsxrPluginHandler.m */, + 55BBA69714953887003B2CEC /* PcsxrDiscHandler.h */, + 55BBA69814953887003B2CEC /* PcsxrDiscHandler.m */, + 55BBA69A14958399003B2CEC /* PcsxrFreezeStateHandler.h */, + 55BBA69B1495839A003B2CEC /* PcsxrFreezeStateHandler.m */, + 5581463717AABCD100862DBF /* PcsxrCheatHandler.h */, + 5581463817AABCD100862DBF /* PcsxrCheatHandler.m */, + ); + name = "File Handlers"; + sourceTree = ""; + }; + 557649B71786AF92007C4457 /* Plug-in handling */ = { + isa = PBXGroup; + children = ( + 2BBB1126051DC00500B84448 /* PluginList.h */, + 2BBB1127051DC00500B84448 /* PluginList.m */, + 2BA44360052DB2EA00E21DDD /* PcsxrPlugin.h */, + 2BA44361052DB2EA00E21DDD /* PcsxrPlugin.m */, + ); + name = "Plug-in handling"; + sourceTree = ""; + }; + 557649B81786AFB7007C4457 /* Controllers */ = { + isa = PBXGroup; + children = ( + 2B75FD3C051C56D200D12034 /* PcsxrController.h */, + 2B75FD3D051C56D200D12034 /* PcsxrController.m */, + 2B4DE98D05FF9307003EFEF0 /* PluginController.h */, + 2B4DE98E05FF9307003EFEF0 /* PluginController.m */, + 2B75FD4A051C8A7400D12034 /* ConfigurationController.h */, + 2B75FD4B051C8A7400D12034 /* ConfigurationController.m */, + 55A9021E147D7C380037E18F /* PcsxrMemCardController.h */, + 55A9021F147D7C380037E18F /* PcsxrMemCardController.m */, + D422E67816DC495800526DCF /* CheatController.h */, + D422E67916DC495800526DCF /* CheatController.m */, + 0280B7AB16764CC3007B8001 /* HotkeyController.h */, + 0280B7AC16764CC3007B8001 /* HotkeyController.m */, + ); + name = Controllers; + sourceTree = ""; + }; + 559366BF12B694DF004ACC1E /* ix86_64 */ = { + isa = PBXGroup; + children = ( + 559366C012B694DF004ACC1E /* iGte.h */, + 559366C112B694DF004ACC1E /* iR3000A-64.c */, + 559366C212B694DF004ACC1E /* ix86-64.c */, + 559366C312B694DF004ACC1E /* ix86-64.h */, + 559366C412B694DF004ACC1E /* ix86_3dnow.c */, + 559366C512B694DF004ACC1E /* ix86_cpudetect.c */, + 559366C612B694DF004ACC1E /* ix86_fpu.c */, + 559366C712B694DF004ACC1E /* ix86_mmx.c */, + 559366C812B694DF004ACC1E /* ix86_sse.c */, + ); + path = ix86_64; + sourceTree = ""; + }; + 55E0ACE1178B850B0005C945 /* Helper Classes */ = { + isa = PBXGroup; + children = ( + 2BBB1791051E113B00B84448 /* EmuThread.h */, + 2BBB1792051E113B00B84448 /* EmuThread.m */, + 55A90227147D89380037E18F /* PcsxrMemoryObject.h */, + 55A90228147D89380037E18F /* PcsxrMemoryObject.m */, + 55EC05F91788B1230053AC23 /* PcsxrMemCardArray.h */, + 55EC05FA1788B1230053AC23 /* PcsxrMemCardArray.m */, + 55E0ACDE178B695F0005C945 /* LaunchArg.h */, + 55E0ACDF178B69600005C945 /* LaunchArg.m */, + 55EC05FC178916E70053AC23 /* MemBadgeView.h */, + 55EC05FD178916E70053AC23 /* MemBadgeView.m */, + 5550D2711683C923006C56B5 /* RecentItemsMenu.h */, + 5550D2721683C923006C56B5 /* RecentItemsMenu.m */, + 550F023B17BFFD97002594DF /* PcsxrHexadecimalFormatter.h */, + 550F023C17BFFD97002594DF /* PcsxrHexadecimalFormatter.m */, + ); + name = "Helper Classes"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 550E343318E6293D00A1AD21 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A76E51786971B0052D185 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 55B13FBD18C4F9CC00ACD9AC /* SPUPluginController.h in Headers */, + 55B13FBE18C4F9D800ACD9AC /* NamedSlider.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 2BB3D68205427FE200831ACB /* PCSXR */ = { + isa = PBXNativeTarget; + buildConfigurationList = 71F353F30FD98DFE00CBEC28 /* Build configuration list for PBXNativeTarget "PCSXR" */; + buildPhases = ( + 2BB3D6A205427FE200831ACB /* Resources */, + 2BB3D6A805427FE200831ACB /* Sources */, + 2BB3D6C505427FE200831ACB /* Frameworks */, + 71AD2DF010C3573400365243 /* Copy Plug-Ins */, + 55202EBA18E73E3E00C631AA /* Copy QuickLook Plug-In */, + 5525BC58194219B80018AF2F /* Copy Spotlight Plug-Ins */, + 556C37AC197D94AF001A4265 /* Copy Frameworks */, + ); + buildRules = ( + 2BD707B705559AE300CB5D9B /* PBXBuildRule */, + 2BB3D6D005427FE200831ACB /* PBXBuildRule */, + ); + dependencies = ( + 5525BC7619421A810018AF2F /* PBXTargetDependency */, + 55534B0018183E5B006D6BCB /* PBXTargetDependency */, + 551A778517869F4B0052D185 /* PBXTargetDependency */, + 551A778717869F4B0052D185 /* PBXTargetDependency */, + 551A778917869F4B0052D185 /* PBXTargetDependency */, + 551A778B17869F4B0052D185 /* PBXTargetDependency */, + 551A778D17869F4B0052D185 /* PBXTargetDependency */, + 551A778F17869F4B0052D185 /* PBXTargetDependency */, + 551A779117869F4B0052D185 /* PBXTargetDependency */, + 551A779317869F4B0052D185 /* PBXTargetDependency */, + 550E347918E65D8B00A1AD21 /* PBXTargetDependency */, + ); + name = PCSXR; + productInstallPath = "$(USER_APPS_DIR)"; + productName = "Pcsxr-MacOSX"; + productReference = 2BB3D6D105427FE200831ACB /* PCSXR.app */; + productType = "com.apple.product-type.application"; + }; + 550E343618E6293D00A1AD21 /* Pcsxr-QL */ = { + isa = PBXNativeTarget; + buildConfigurationList = 550E344D18E6293D00A1AD21 /* Build configuration list for PBXNativeTarget "Pcsxr-QL" */; + buildPhases = ( + 550E343118E6293D00A1AD21 /* Sources */, + 550E343218E6293D00A1AD21 /* Frameworks */, + 550E343318E6293D00A1AD21 /* Headers */, + 550E343418E6293D00A1AD21 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Pcsxr-QL"; + productName = "Pcsxr-QL"; + productReference = 550E343718E6293D00A1AD21 /* Pcsxr-QL.qlgenerator */; + productType = "com.apple.product-type.bundle"; + }; + 551A75C617868C4E0052D185 /* Bladesio1 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 551A75CB17868C4E0052D185 /* Build configuration list for PBXNativeTarget "Bladesio1" */; + buildPhases = ( + 551A75C717868C4E0052D185 /* Sources */, + 551A75C817868C4E0052D185 /* Frameworks */, + 551A75CA17868C4E0052D185 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Bladesio1; + productName = BasePlugin; + productReference = 551A75CE17868C4E0052D185 /* Bladesio1.psxplugin */; + productType = "com.apple.product-type.bundle"; + }; + 551A7672178690500052D185 /* DFCdrom */ = { + isa = PBXNativeTarget; + buildConfigurationList = 551A7677178690500052D185 /* Build configuration list for PBXNativeTarget "DFCdrom" */; + buildPhases = ( + 551A7673178690500052D185 /* Sources */, + 551A7674178690500052D185 /* Frameworks */, + 551A7676178690500052D185 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = DFCdrom; + productName = BasePlugin; + productReference = 551A767A178690500052D185 /* DFCdrom.psxplugin */; + productType = "com.apple.product-type.bundle"; + }; + 551A76861786919F0052D185 /* DFInput */ = { + isa = PBXNativeTarget; + buildConfigurationList = 551A768B1786919F0052D185 /* Build configuration list for PBXNativeTarget "DFInput" */; + buildPhases = ( + 551A76871786919F0052D185 /* Sources */, + 551A76881786919F0052D185 /* Frameworks */, + 551A768A1786919F0052D185 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = DFInput; + productName = BasePlugin; + productReference = 551A768E1786919F0052D185 /* DFInput.psxplugin */; + productType = "com.apple.product-type.bundle"; + }; + 551A76B4178693FF0052D185 /* DFXVideo */ = { + isa = PBXNativeTarget; + buildConfigurationList = 551A76B9178693FF0052D185 /* Build configuration list for PBXNativeTarget "DFXVideo" */; + buildPhases = ( + 551A76B5178693FF0052D185 /* Sources */, + 551A76B6178693FF0052D185 /* Frameworks */, + 551A76B8178693FF0052D185 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = DFXVideo; + productName = BasePlugin; + productReference = 551A76BC178693FF0052D185 /* PeopsSoftGPU.psxplugin */; + productType = "com.apple.product-type.bundle"; + }; + 551A76DA178696BD0052D185 /* PeopsSpuSDL */ = { + isa = PBXNativeTarget; + buildConfigurationList = 551A76DF178696BD0052D185 /* Build configuration list for PBXNativeTarget "PeopsSpuSDL" */; + buildPhases = ( + 551A76DB178696BD0052D185 /* Sources */, + 551A76DC178696BD0052D185 /* Frameworks */, + 551A76DE178696BD0052D185 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 551A76F5178697CF0052D185 /* PBXTargetDependency */, + ); + name = PeopsSpuSDL; + productName = BasePlugin; + productReference = 551A76E2178696BD0052D185 /* PeopsSpuSDL.psxplugin */; + productType = "com.apple.product-type.bundle"; + }; + 551A76E61786971B0052D185 /* SPUSharedCode */ = { + isa = PBXNativeTarget; + buildConfigurationList = 551A76EF1786971B0052D185 /* Build configuration list for PBXNativeTarget "SPUSharedCode" */; + buildPhases = ( + 551A76E31786971B0052D185 /* Sources */, + 551A76E41786971B0052D185 /* Frameworks */, + 551A76E51786971B0052D185 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SPUSharedCode; + productName = SPUSharedCode; + productReference = 551A76E71786971B0052D185 /* libSPUSharedCode.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; + 551A7706178698C60052D185 /* PeopsSpuAL */ = { + isa = PBXNativeTarget; + buildConfigurationList = 551A771C178698C60052D185 /* Build configuration list for PBXNativeTarget "PeopsSpuAL" */; + buildPhases = ( + 551A7709178698C60052D185 /* Sources */, + 551A7714178698C60052D185 /* Frameworks */, + 551A7717178698C60052D185 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 551A7707178698C60052D185 /* PBXTargetDependency */, + ); + name = PeopsSpuAL; + productName = BasePlugin; + productReference = 551A771F178698C60052D185 /* PeopsSpuAL.psxplugin */; + productType = "com.apple.product-type.bundle"; + }; + 551A774717869C280052D185 /* PeopsXgl */ = { + isa = PBXNativeTarget; + buildConfigurationList = 551A774C17869C280052D185 /* Build configuration list for PBXNativeTarget "PeopsXgl" */; + buildPhases = ( + 551A774817869C280052D185 /* Sources */, + 551A774917869C280052D185 /* Frameworks */, + 551A774B17869C280052D185 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PeopsXgl; + productName = BasePlugin; + productReference = 551A774F17869C280052D185 /* PeopsXGL.psxplugin */; + productType = "com.apple.product-type.bundle"; + }; + 551A776517869E430052D185 /* DFNet */ = { + isa = PBXNativeTarget; + buildConfigurationList = 551A776A17869E430052D185 /* Build configuration list for PBXNativeTarget "DFNet" */; + buildPhases = ( + 551A776617869E430052D185 /* Sources */, + 551A776717869E430052D185 /* Frameworks */, + 551A776917869E430052D185 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = DFNet; + productName = BasePlugin; + productReference = 551A776D17869E430052D185 /* DFNet.psxplugin */; + productType = "com.apple.product-type.bundle"; + }; + 5525BC5C19421A750018AF2F /* Psx-Memcard */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5525BC7119421A760018AF2F /* Build configuration list for PBXNativeTarget "Psx-Memcard" */; + buildPhases = ( + 5525BC5919421A750018AF2F /* Sources */, + 5525BC5A19421A750018AF2F /* Frameworks */, + 5525BC5B19421A750018AF2F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Psx-Memcard"; + productName = "Psx-Memcard"; + productReference = 5525BC5D19421A750018AF2F /* Psx-Memcard.mdimporter */; + productType = "com.apple.product-type.bundle"; + }; + 55534AEF18183BFA006D6BCB /* updateInfoPlist */ = { + isa = PBXNativeTarget; + buildConfigurationList = 55534AFD18183BFB006D6BCB /* Build configuration list for PBXNativeTarget "updateInfoPlist" */; + buildPhases = ( + 55534AEC18183BFA006D6BCB /* Sources */, + 55534AED18183BFA006D6BCB /* Frameworks */, + 55534AFE18183D86006D6BCB /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = updateInfoPlist; + productName = updateInfoPlist; + productReference = 55534AF018183BFA006D6BCB /* updateInfoPlist */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0730; + }; + buildConfigurationList = 71F353F80FD98DFE00CBEC28 /* Build configuration list for PBXProject "Pcsxr" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + en, + es, + fr, + "pt-BR", + "zh-Hant-TW", + ru, + it, + hu, + "zh-Hans", + "zh-Hant", + Base, + "ko-KR", + ); + mainGroup = 08FB7794FE84155DC02AAC07 /* Pcsxr */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2BB3D68205427FE200831ACB /* PCSXR */, + 551A76E61786971B0052D185 /* SPUSharedCode */, + 551A7672178690500052D185 /* DFCdrom */, + 551A76861786919F0052D185 /* DFInput */, + 551A76B4178693FF0052D185 /* DFXVideo */, + 551A774717869C280052D185 /* PeopsXgl */, + 551A76DA178696BD0052D185 /* PeopsSpuSDL */, + 551A7706178698C60052D185 /* PeopsSpuAL */, + 551A776517869E430052D185 /* DFNet */, + 551A75C617868C4E0052D185 /* Bladesio1 */, + 550E343618E6293D00A1AD21 /* Pcsxr-QL */, + 5525BC5C19421A750018AF2F /* Psx-Memcard */, + 55534AEF18183BFA006D6BCB /* updateInfoPlist */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2BB3D6A205427FE200831ACB /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 553FECF718DF5A8300C7B007 /* InfoPlist.strings in Resources */, + 553FECF618DF5A8300C7B007 /* Credits.rtf in Resources */, + 553FECF018DF5A8300C7B007 /* Configuration.xib in Resources */, + 553FECF118DF5A8300C7B007 /* PCSXR.xib in Resources */, + 553FECEE18DF5A8300C7B007 /* AddPluginSheet.xib in Resources */, + 5557769A17EBE7D60019D008 /* Media.xcassets in Resources */, + 553FECF918DF5A8300C7B007 /* Localizable.strings in Resources */, + 55C7A214148B2B3800C22ABC /* PcsxrMemCard.xib in Resources */, + 553FECF818DF5A8300C7B007 /* KeyNames.plist in Resources */, + D422E66E16DC48D000526DCF /* CheatWindow.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 550E343418E6293D00A1AD21 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 550E344218E6293D00A1AD21 /* InfoPlist.strings in Resources */, + 55AF2A69197DF6A700EB2560 /* Media.xcassets in Resources */, + 556C37B2197DBFD1001A4265 /* template.html in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A75CA17868C4E0052D185 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A75CF17868C860052D185 /* Bladesio1PluginConfig.xib in Resources */, + 550128961A11817800468D09 /* Localizable.strings in Resources */, + 550128951A11817800468D09 /* InfoPlist.strings in Resources */, + 551A75D017868C860052D185 /* Credits.rtf in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A7676178690500052D185 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A7680178690EE0052D185 /* Credits.rtf in Resources */, + 550128991A1181A000468D09 /* InfoPlist.strings in Resources */, + 551A7681178690EE0052D185 /* DFCdromPluginConfig.xib in Resources */, + 551A7683178690EE0052D185 /* Localizable.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A768A1786919F0052D185 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A769B178692470052D185 /* Credits.rtf in Resources */, + 5501289D1A1181CF00468D09 /* InfoPlist.strings in Resources */, + 551A769D178692470052D185 /* Localizable.strings in Resources */, + 551A769E178692470052D185 /* NetPcsxrHIDInputPluginMain.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A76B8178693FF0052D185 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A76BD1786953B0052D185 /* Credits.rtf in Resources */, + 550128AA1A11827F00468D09 /* InfoPlist.strings in Resources */, + 551A76BF1786953B0052D185 /* Localizable.strings in Resources */, + 551A76C01786953B0052D185 /* NetSfPeopsSoftGPUConfig.xib in Resources */, + 551A76C11786953F0052D185 /* gpuPeteOGL2.slf in Resources */, + 551A76C21786953F0052D185 /* gpuPeteOGL2.slv in Resources */, + 551A76C31786953F0052D185 /* NetSfPeopsSoftGPUInterface.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A76DE178696BD0052D185 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A7703178698980052D185 /* Credits.rtf in Resources */, + 550128B21A1182E500468D09 /* InfoPlist.strings in Resources */, + 551A7704178698980052D185 /* Localizable.strings in Resources */, + 551A7705178698980052D185 /* NetSfPeopsSpuPluginMain.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A7717178698C60052D185 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A7719178698C60052D185 /* Credits.rtf in Resources */, + 550128AF1A1182D700468D09 /* InfoPlist.strings in Resources */, + 551A771A178698C60052D185 /* Localizable.strings in Resources */, + 551A771B178698C60052D185 /* NetSfPeopsSpuPluginMain.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A774B17869C280052D185 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A776017869CBE0052D185 /* Credits.rtf in Resources */, + 551A776217869CBE0052D185 /* Localizable.strings in Resources */, + 551A776317869CBE0052D185 /* NetSfPeopsOpenGLConfig.xib in Resources */, + 551A776417869CC20052D185 /* NetSfPeopsOpenGLGPUInterface.xib in Resources */, + 550128A51A11823900468D09 /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A776917869E430052D185 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A777F17869EAE0052D185 /* Credits.rtf in Resources */, + 551A778017869EAE0052D185 /* DFNet.xib in Resources */, + 551A778117869EAE0052D185 /* InfoPlist.strings in Resources */, + 551A778217869EAE0052D185 /* Localizable.strings in Resources */, + 551A778317869EAE0052D185 /* SockDialog.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5525BC5B19421A750018AF2F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5525BC7819421D4F0018AF2F /* schema.xml in Resources */, + 5525BC7C194221EC0018AF2F /* schema.strings in Resources */, + 5525BC6719421A760018AF2F /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 55534AFE18183D86006D6BCB /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/../.svn/dir-wcprops", + "$(SRCROOT)/Info.plist", + ); + outputPaths = ( + Info.plistvers.plist, + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "#Some code taken from the MPlayerX people.\nexport PATH=\"/usr/bin:/bin:/usr/sbin:/sbin\"\ncd $SRCROOT\n$TARGET_BUILD_DIR/$PRODUCT_NAME Info.plist\ntouch -amfc Info.plistvers.plist\n\nexit 0\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2BB3D6A805427FE200831ACB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2BB3D6BE05427FE200831ACB /* main.m in Sources */, + 2BB3D6BF05427FE200831ACB /* PcsxrController.m in Sources */, + 2BB3D6C005427FE200831ACB /* ConfigurationController.m in Sources */, + 2BB3D6C105427FE200831ACB /* PluginList.m in Sources */, + 2BB3D6C205427FE200831ACB /* EmuThread.m in Sources */, + 2BB3D6C305427FE200831ACB /* Plugin.c in Sources */, + 2BB3D6C405427FE200831ACB /* PcsxrPlugin.m in Sources */, + 2B4DE99205FF9307003EFEF0 /* PluginController.m in Sources */, + 71F4C5890FDED12800529849 /* cdriso.c in Sources */, + 71F4C58B0FDED12800529849 /* cdrom.c in Sources */, + 71F4C58D0FDED12800529849 /* cheat.c in Sources */, + 71F4C5910FDED12800529849 /* decode_xa.c in Sources */, + 71F4C5930FDED12800529849 /* disr3000a.c in Sources */, + 71F4C5940FDED12800529849 /* gte.c in Sources */, + 71F4C5960FDED12800529849 /* mdec.c in Sources */, + 71F4C5980FDED12800529849 /* misc.c in Sources */, + 71F4C59A0FDED12800529849 /* plugins.c in Sources */, + 71F4C59D0FDED12800529849 /* psxbios.c in Sources */, + 71F4C5A00FDED12800529849 /* psxcounters.c in Sources */, + 71F4C5A20FDED12800529849 /* psxdma.c in Sources */, + 71F4C5A40FDED12800529849 /* psxhle.c in Sources */, + 71F4C5A60FDED12800529849 /* psxhw.c in Sources */, + 71F4C5A80FDED12800529849 /* psxinterpreter.c in Sources */, + 71F4C5A90FDED12800529849 /* psxmem.c in Sources */, + 71F4C5AB0FDED12800529849 /* r3000a.c in Sources */, + 71F4C5AD0FDED12800529849 /* sio.c in Sources */, + 71F4C5AF0FDED12800529849 /* spu.c in Sources */, + 712FD1E81093096F00575A92 /* debug.c in Sources */, + 712FD1E91093096F00575A92 /* socket.c in Sources */, + 713B530E110B75650002F164 /* ppf.c in Sources */, + 719594B211AEFE8C004AD686 /* psxcommon.c in Sources */, + 7192F42A129C412E0042D946 /* gpu.c in Sources */, + 559366CA12B694DF004ACC1E /* iR3000A-64.c in Sources */, + 559366CB12B694DF004ACC1E /* ix86-64.c in Sources */, + 559366CD12B694DF004ACC1E /* ix86_cpudetect.c in Sources */, + 559366CE12B694DF004ACC1E /* ix86_fpu.c in Sources */, + 559366CF12B694DF004ACC1E /* ix86_mmx.c in Sources */, + 559366D012B694DF004ACC1E /* ix86_sse.c in Sources */, + 55A90220147D7C380037E18F /* PcsxrMemCardController.m in Sources */, + 55A90229147D89380037E18F /* PcsxrMemoryObject.m in Sources */, + 55BBA693149455E1003B2CEC /* PcsxrMemCardHandler.m in Sources */, + 55BBA69614945628003B2CEC /* PcsxrPluginHandler.m in Sources */, + 55BBA69914953887003B2CEC /* PcsxrDiscHandler.m in Sources */, + 55BBA69C1495839A003B2CEC /* PcsxrFreezeStateHandler.m in Sources */, + 0280B7AD16764CC5007B8001 /* HotkeyController.m in Sources */, + 02717968167884C9004AED62 /* hotkeys.m in Sources */, + 5529EA11169CBE3400BAA2A5 /* RecentItemsMenu.m in Sources */, + D422E67A16DC495800526DCF /* CheatController.m in Sources */, + 55EC05FB1788B1230053AC23 /* PcsxrMemCardArray.m in Sources */, + 55EC05FE178916E80053AC23 /* MemBadgeView.m in Sources */, + 55E0ACE0178B69620005C945 /* LaunchArg.m in Sources */, + 5581463917AABCD100862DBF /* PcsxrCheatHandler.m in Sources */, + 550F023D17BFFD97002594DF /* PcsxrHexadecimalFormatter.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 550E343118E6293D00A1AD21 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 550E344418E6293D00A1AD21 /* GenerateThumbnailForURL.m in Sources */, + 550E344618E6293D00A1AD21 /* GeneratePreviewForURL.m in Sources */, + 556C37AB197C9C59001A4265 /* PcsxrMemoryObject.m in Sources */, + 550E344818E6293D00A1AD21 /* main.c in Sources */, + 556C37A9197C815C001A4265 /* PSXMemEnumerator.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A75C717868C4E0052D185 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A75D317868D0C0052D185 /* cfg.c in Sources */, + 551A75D417868D1A0052D185 /* PluginConfigController.m in Sources */, + 551A75D517868D390052D185 /* connection.c in Sources */, + 551A75D617868D390052D185 /* fifo.c in Sources */, + 551A75D717868D390052D185 /* sio1.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A7673178690500052D185 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A767B178690AD0052D185 /* cdr-macosx.c in Sources */, + 551A767C178690AD0052D185 /* cfg.c in Sources */, + 551A767D178690AD0052D185 /* PluginConfigController.m in Sources */, + 551A767E178690B80052D185 /* cdr.c in Sources */, + 551A767F178690B80052D185 /* util.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A76871786919F0052D185 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A76921786922A0052D185 /* sdljoy.c in Sources */, + 551A7693178692330052D185 /* analog.c in Sources */, + 551A7694178692330052D185 /* pad.c in Sources */, + 551A76951786923E0052D185 /* cfg.c in Sources */, + 551A76961786923E0052D185 /* ControllerList.m in Sources */, + 551A76971786923E0052D185 /* MappingCell.m in Sources */, + 551A76981786923E0052D185 /* PadController.m in Sources */, + 551A76991786923E0052D185 /* PadView.m in Sources */, + 551A769A1786923E0052D185 /* xkb.c in Sources */, + 550FFAF117CEEECA0003A2F3 /* cfgHelper.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A76B5178693FF0052D185 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A76C41786954B0052D185 /* drawgl.m in Sources */, + 551A76C51786954B0052D185 /* PluginConfigController.m in Sources */, + 551A76C61786954B0052D185 /* PluginGLView.m in Sources */, + 551A76C71786954B0052D185 /* PluginWindow.m in Sources */, + 551A76C81786954B0052D185 /* PluginWindowController.m in Sources */, + 551A76CA178695840052D185 /* fps.c in Sources */, + 551A76CB178695840052D185 /* gpu.c in Sources */, + 551A76CC178695840052D185 /* key.c in Sources */, + 551A76CD178695840052D185 /* menu.c in Sources */, + 551A76CE178695840052D185 /* prim.c in Sources */, + 551A76CF178695840052D185 /* soft.c in Sources */, + 551A76D0178695840052D185 /* zn.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A76DB178696BD0052D185 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A76F7178697E70052D185 /* PluginController.m in Sources */, + 551A76F8178698130052D185 /* sdl.c in Sources */, + 551A76F9178698130052D185 /* spu.c in Sources */, + 551A76FA178698130052D185 /* xa.c in Sources */, + 551A76FB178698160052D185 /* reverb.c in Sources */, + 551A76FC1786981A0052D185 /* registers.c in Sources */, + 551A76FD178698230052D185 /* freeze.c in Sources */, + 551A76FF178698390052D185 /* dma.c in Sources */, + 551A77001786983C0052D185 /* adsr.c in Sources */, + 551A7701178698600052D185 /* externals.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A76E31786971B0052D185 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A76F2178697A50052D185 /* NamedSlider.m in Sources */, + 551A76F3178697A50052D185 /* SPUPluginController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A7709178698C60052D185 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A770A178698C60052D185 /* PluginController.m in Sources */, + 551A770C178698C60052D185 /* spu.c in Sources */, + 551A770D178698C60052D185 /* xa.c in Sources */, + 551A770E178698C60052D185 /* reverb.c in Sources */, + 551A770F178698C60052D185 /* registers.c in Sources */, + 551A7710178698C60052D185 /* freeze.c in Sources */, + 551A7711178698C60052D185 /* dma.c in Sources */, + 551A7712178698C60052D185 /* adsr.c in Sources */, + 551A7713178698C60052D185 /* externals.c in Sources */, + 551A77221786990E0052D185 /* openal.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A774817869C280052D185 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A775217869C8B0052D185 /* draw.c in Sources */, + 551A775317869C8D0052D185 /* fps.c in Sources */, + 551A775417869C900052D185 /* gpu.c in Sources */, + 551A775517869C950052D185 /* gte_accuracy.c in Sources */, + 551A775617869C970052D185 /* key.c in Sources */, + 551A775717869C9A0052D185 /* menu.c in Sources */, + 551A775817869C9C0052D185 /* prim.c in Sources */, + 551A775917869C9F0052D185 /* soft.c in Sources */, + 551A775A17869CA10052D185 /* texture.c in Sources */, + 551A775B17869CA50052D185 /* drawgl.m in Sources */, + 551A775C17869CA80052D185 /* NetSfPeopsOpenGLPluginConfigController.m in Sources */, + 551A775D17869CAB0052D185 /* PluginGLView.m in Sources */, + 551A775E17869CAE0052D185 /* PluginWindow.m in Sources */, + 551A775F17869CB10052D185 /* PluginWindowController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 551A776617869E430052D185 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 551A776E17869E640052D185 /* cfg.c in Sources */, + 551A776F17869E640052D185 /* PluginConfigController.m in Sources */, + 551A777017869E640052D185 /* SockDialog.m in Sources */, + 551A777A17869E830052D185 /* dfnet.c in Sources */, + 551A777E17869E830052D185 /* unix.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5525BC5919421A750018AF2F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5525BC6919421A760018AF2F /* main.c in Sources */, + 5525BC6B19421A760018AF2F /* GetMetadataForFile.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 55534AEC18183BFA006D6BCB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 55534AF518183BFB006D6BCB /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 550E347918E65D8B00A1AD21 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 550E343618E6293D00A1AD21 /* Pcsxr-QL */; + targetProxy = 550E347818E65D8B00A1AD21 /* PBXContainerItemProxy */; + }; + 551A76F5178697CF0052D185 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 551A76E61786971B0052D185 /* SPUSharedCode */; + targetProxy = 551A76F4178697CF0052D185 /* PBXContainerItemProxy */; + }; + 551A7707178698C60052D185 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 551A76E61786971B0052D185 /* SPUSharedCode */; + targetProxy = 551A7708178698C60052D185 /* PBXContainerItemProxy */; + }; + 551A778517869F4B0052D185 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 551A75C617868C4E0052D185 /* Bladesio1 */; + targetProxy = 551A778417869F4B0052D185 /* PBXContainerItemProxy */; + }; + 551A778717869F4B0052D185 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 551A7672178690500052D185 /* DFCdrom */; + targetProxy = 551A778617869F4B0052D185 /* PBXContainerItemProxy */; + }; + 551A778917869F4B0052D185 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 551A76861786919F0052D185 /* DFInput */; + targetProxy = 551A778817869F4B0052D185 /* PBXContainerItemProxy */; + }; + 551A778B17869F4B0052D185 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 551A76B4178693FF0052D185 /* DFXVideo */; + targetProxy = 551A778A17869F4B0052D185 /* PBXContainerItemProxy */; + }; + 551A778D17869F4B0052D185 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 551A76DA178696BD0052D185 /* PeopsSpuSDL */; + targetProxy = 551A778C17869F4B0052D185 /* PBXContainerItemProxy */; + }; + 551A778F17869F4B0052D185 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 551A7706178698C60052D185 /* PeopsSpuAL */; + targetProxy = 551A778E17869F4B0052D185 /* PBXContainerItemProxy */; + }; + 551A779117869F4B0052D185 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 551A774717869C280052D185 /* PeopsXgl */; + targetProxy = 551A779017869F4B0052D185 /* PBXContainerItemProxy */; + }; + 551A779317869F4B0052D185 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 551A776517869E430052D185 /* DFNet */; + targetProxy = 551A779217869F4B0052D185 /* PBXContainerItemProxy */; + }; + 5525BC7619421A810018AF2F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 5525BC5C19421A750018AF2F /* Psx-Memcard */; + targetProxy = 5525BC7519421A810018AF2F /* PBXContainerItemProxy */; + }; + 55534B0018183E5B006D6BCB /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 55534AEF18183BFA006D6BCB /* updateInfoPlist */; + targetProxy = 55534AFF18183E5B006D6BCB /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 550128911A11817800468D09 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 550128921A11817800468D09 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 550128931A11817800468D09 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 550128941A11817800468D09 /* en */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + 550128971A1181A000468D09 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 550128981A1181A000468D09 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 5501289B1A1181CF00468D09 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 5501289C1A1181CF00468D09 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 550128A31A11823900468D09 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 550128A41A11823900468D09 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 550128A81A11827F00468D09 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 550128A91A11827F00468D09 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 550128AD1A1182D700468D09 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 550128AE1A1182D700468D09 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 550128B01A1182E500468D09 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 550128B11A1182E500468D09 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 550E344018E6293D00A1AD21 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 550E344118E6293D00A1AD21 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 551A74B417868BEA0052D185 /* Bladesio1PluginConfig.xib */ = { + isa = PBXVariantGroup; + children = ( + 5569B09F182F0B3F00991C9C /* Base */, + 5569B0B3182F0B8B00991C9C /* en */, + 55E159A31845BA55007983CB /* fr */, + 55E159A51845BA57007983CB /* hu */, + 558328CA184F237000DFACE4 /* zh-Hans */, + ); + name = Bladesio1PluginConfig.xib; + sourceTree = ""; + }; + 551A74B617868BEA0052D185 /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + 558328CB184F238F00DFACE4 /* zh-Hans */, + 5501288E1A1180C800468D09 /* en */, + ); + name = Credits.rtf; + sourceTree = ""; + }; + 551A750917868BEB0052D185 /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + 558328CE184F23EC00DFACE4 /* zh-Hans */, + 5501288F1A1180E500468D09 /* en */, + ); + name = Credits.rtf; + sourceTree = ""; + }; + 551A750B17868BEB0052D185 /* DFCdromPluginConfig.xib */ = { + isa = PBXVariantGroup; + children = ( + 5569B0A0182F0B4000991C9C /* Base */, + 5569B0B5182F0B9800991C9C /* en */, + 55E159A71845BA63007983CB /* fr */, + 55E159A91845BA66007983CB /* hu */, + 558328CD184F23DF00DFACE4 /* zh-Hans */, + ); + name = DFCdromPluginConfig.xib; + sourceTree = ""; + }; + 551A750F17868BEB0052D185 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 5598AAF017D2D5450024F71D /* fr */, + 55707E8E18123579007CC5D0 /* hu */, + 550128901A11811600468D09 /* en */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + 551A751D17868BEB0052D185 /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + 558328D4184F24A300DFACE4 /* zh-Hans */, + 5501289A1A1181AF00468D09 /* en */, + ); + name = Credits.rtf; + sourceTree = ""; + }; + 551A752117868BEB0052D185 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 5593804E18F38C060022C282 /* en */, + 5598AAFB17D2E9E90024F71D /* fr */, + 55707E901812357B007CC5D0 /* hu */, + 558328D3184F246B00DFACE4 /* zh-Hans */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + 551A752317868BEB0052D185 /* NetPcsxrHIDInputPluginMain.xib */ = { + isa = PBXVariantGroup; + children = ( + 5569B0A1182F0B4100991C9C /* Base */, + 5569B0C1182F0BE100991C9C /* en */, + 55E159AB1845BA78007983CB /* fr */, + 55E159AD1845BA7B007983CB /* hu */, + 558328D2184F246500DFACE4 /* zh-Hans */, + ); + name = NetPcsxrHIDInputPluginMain.xib; + sourceTree = ""; + }; + 551A753617868BEB0052D185 /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + 558328E4184F272C00DFACE4 /* zh-Hans */, + 5501289E1A1181E500468D09 /* en */, + ); + name = Credits.rtf; + sourceTree = ""; + }; + 551A753817868BEB0052D185 /* DFNet.xib */ = { + isa = PBXVariantGroup; + children = ( + 5569B0A2182F0B4200991C9C /* Base */, + 5569B0BD182F0BCE00991C9C /* en */, + 55E159B31845BABA007983CB /* fr */, + 55E159B51845BABC007983CB /* hu */, + 558328D6184F253300DFACE4 /* zh-Hans */, + ); + name = DFNet.xib; + sourceTree = ""; + }; + 551A753A17868BEB0052D185 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 558328D9184F254500DFACE4 /* zh-Hans */, + 5501289F1A1181F000468D09 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 551A753C17868BEB0052D185 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 5598AAF217D2D5470024F71D /* fr */, + 55707E921812357D007CC5D0 /* hu */, + 550128A01A1181FC00468D09 /* en */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + 551A753E17868BEB0052D185 /* SockDialog.xib */ = { + isa = PBXVariantGroup; + children = ( + 5569B0A3182F0B4800991C9C /* Base */, + 5569B0BF182F0BD500991C9C /* en */, + 55E159AF1845BA88007983CB /* fr */, + 55E159B11845BA8A007983CB /* hu */, + 558328D8184F253D00DFACE4 /* zh-Hans */, + ); + name = SockDialog.xib; + sourceTree = ""; + }; + 551A756017868BEC0052D185 /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + 558328E2184F268C00DFACE4 /* zh-Hans */, + 550128AB1A11829B00468D09 /* en */, + ); + name = Credits.rtf; + sourceTree = ""; + }; + 551A756217868BEC0052D185 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 5598AAF517D2D54A0024F71D /* fr */, + 55707E9518123580007CC5D0 /* hu */, + 55B13FBF18C4FAC600ACD9AC /* zh-Hans */, + 550128AC1A1182A600468D09 /* en */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + 551A756417868BEC0052D185 /* NetSfPeopsSpuPluginMain.xib */ = { + isa = PBXVariantGroup; + children = ( + 5569B0A4182F0B4900991C9C /* Base */, + 5569B0BB182F0BC000991C9C /* en */, + 55E159B71845BACC007983CB /* fr */, + 55E159B91845BACF007983CB /* hu */, + 558328E1184F268300DFACE4 /* zh-Hans */, + ); + name = NetSfPeopsSpuPluginMain.xib; + sourceTree = ""; + }; + 551A756817868BEC0052D185 /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + 558328DC184F25B300DFACE4 /* zh-Hans */, + 550128A61A11824800468D09 /* en */, + ); + name = Credits.rtf; + sourceTree = ""; + }; + 551A756C17868BEC0052D185 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 5598AAF717D2D54C0024F71D /* fr */, + 55707E9718123582007CC5D0 /* hu */, + 550128A71A11824F00468D09 /* en */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + 551A756E17868BEC0052D185 /* NetSfPeopsSoftGPUConfig.xib */ = { + isa = PBXVariantGroup; + children = ( + 5569B0A5182F0B4A00991C9C /* Base */, + 5569B0B9182F0BB100991C9C /* en */, + 55E159BB1845BAEB007983CB /* fr */, + 55E159BD1845BAED007983CB /* hu */, + 558328DB184F25AB00DFACE4 /* zh-Hans */, + ); + name = NetSfPeopsSoftGPUConfig.xib; + sourceTree = ""; + }; + 551A758517868BED0052D185 /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + 558328DF184F264800DFACE4 /* zh-Hans */, + 550128A11A11820C00468D09 /* en */, + ); + name = Credits.rtf; + sourceTree = ""; + }; + 551A758917868BED0052D185 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 5598AAF917D2D54E0024F71D /* fr */, + 55707E9918123584007CC5D0 /* hu */, + 550128A21A11821800468D09 /* en */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + 551A758B17868BED0052D185 /* NetSfPeopsOpenGLConfig.xib */ = { + isa = PBXVariantGroup; + children = ( + 5569B0A6182F0B4B00991C9C /* Base */, + 5569B0B7182F0BA700991C9C /* en */, + 55E159BF1845BB4C007983CB /* fr */, + 55E159C11845BB4F007983CB /* hu */, + 558328DE184F263F00DFACE4 /* zh-Hans */, + ); + name = NetSfPeopsOpenGLConfig.xib; + sourceTree = ""; + }; + 5525BC6519421A760018AF2F /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 5525BC6619421A760018AF2F /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 5525BC7E194221EC0018AF2F /* schema.strings */ = { + isa = PBXVariantGroup; + children = ( + 5525BC7D194221EC0018AF2F /* en */, + ); + name = schema.strings; + sourceTree = ""; + }; + 553FECB818DF5A8300C7B007 /* AddPluginSheet.xib */ = { + isa = PBXVariantGroup; + children = ( + 553FECB918DF5A8300C7B007 /* Base */, + 553FECFD18DF5ABA00C7B007 /* en */, + 553FECFE18DF5ABD00C7B007 /* zh-Hans */, + 553FECFF18DF5AC200C7B007 /* fr */, + ); + name = AddPluginSheet.xib; + sourceTree = ""; + }; + 553FECBC18DF5A8300C7B007 /* Configuration.xib */ = { + isa = PBXVariantGroup; + children = ( + 553FECBD18DF5A8300C7B007 /* Base */, + 553FED0018DF5ADD00C7B007 /* en */, + 553FED0118DF5AE100C7B007 /* zh-Hans */, + 553FED0218DF5AE600C7B007 /* fr */, + 553FED0318DF5AED00C7B007 /* hu */, + ); + name = Configuration.xib; + sourceTree = ""; + }; + 553FECBE18DF5A8300C7B007 /* PCSXR.xib */ = { + isa = PBXVariantGroup; + children = ( + 553FECBF18DF5A8300C7B007 /* Base */, + 553FED0418DF5AFD00C7B007 /* en */, + 553FED0518DF5B0000C7B007 /* zh-Hans */, + 553FED0618DF5B0200C7B007 /* fr */, + 553FED0718DF5B0500C7B007 /* hu */, + ); + name = PCSXR.xib; + sourceTree = ""; + }; + 553FECC818DF5A8300C7B007 /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + 553FECC918DF5A8300C7B007 /* en */, + 553FECE818DF5A8300C7B007 /* zh-Hans */, + ); + name = Credits.rtf; + sourceTree = ""; + }; + 553FECCA18DF5A8300C7B007 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 553FECCB18DF5A8300C7B007 /* en */, + 553FECD718DF5A8300C7B007 /* fr */, + 553FECDC18DF5A8300C7B007 /* hu */, + 553FECE018DF5A8300C7B007 /* it */, + 553FECE118DF5A8300C7B007 /* ko-KR */, + 553FECE318DF5A8300C7B007 /* pt-BR */, + 553FECE418DF5A8300C7B007 /* ru */, + 553FECE918DF5A8300C7B007 /* zh-Hans */, + 553FECED18DF5A8300C7B007 /* zh-Hant */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 553FECCC18DF5A8300C7B007 /* KeyNames.plist */ = { + isa = PBXVariantGroup; + children = ( + 553FECCD18DF5A8300C7B007 /* en */, + ); + name = KeyNames.plist; + sourceTree = ""; + }; + 553FECCE18DF5A8300C7B007 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 553FECCF18DF5A8300C7B007 /* en */, + 553FECD818DF5A8300C7B007 /* fr */, + 553FECDD18DF5A8300C7B007 /* hu */, + 553FECEA18DF5A8300C7B007 /* zh-Hans */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + 55C7A216148B2B3800C22ABC /* PcsxrMemCard.xib */ = { + isa = PBXVariantGroup; + children = ( + 5569B09D182F0B3D00991C9C /* Base */, + 5569B0AF182F0B7900991C9C /* en */, + 55E1598E18455C78007983CB /* fr */, + 558328C5184F227500DFACE4 /* zh-Hans */, + ); + name = PcsxrMemCard.xib; + sourceTree = ""; + }; + D422E66C16DC48D000526DCF /* CheatWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 5569B09E182F0B3E00991C9C /* Base */, + 5569B0B1182F0B8100991C9C /* en */, + 55E1598C18455C60007983CB /* fr */, + 558328C7184F227E00DFACE4 /* zh-Hans */, + ); + name = CheatWindow.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 550E344A18E6293D00A1AD21 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COMBINE_HIDPI_IMAGES = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "Pcsxr-QL/Pcsxr-QL-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=PsxQL"; + INFOPLIST_FILE = "Pcsxr-QL/Pcsxr-QL-Info.plist"; + INSTALL_PATH = /Library/QuickLook; + PRODUCT_BUNDLE_IDENTIFIER = "net.pcsxr.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRINGS_FILE_OUTPUT_ENCODING = "UTF-16"; + WRAPPER_EXTENSION = qlgenerator; + }; + name = Debug; + }; + 550E344B18E6293D00A1AD21 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COMBINE_HIDPI_IMAGES = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "Pcsxr-QL/Pcsxr-QL-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=PsxQL"; + INFOPLIST_FILE = "Pcsxr-QL/Pcsxr-QL-Info.plist"; + INSTALL_PATH = /Library/QuickLook; + PRODUCT_BUNDLE_IDENTIFIER = "net.pcsxr.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRINGS_FILE_OUTPUT_ENCODING = "UTF-16"; + WRAPPER_EXTENSION = qlgenerator; + }; + name = Release; + }; + 550E344C18E6293D00A1AD21 /* Instrument */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COMBINE_HIDPI_IMAGES = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "Pcsxr-QL/Pcsxr-QL-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=PsxQL"; + INFOPLIST_FILE = "Pcsxr-QL/Pcsxr-QL-Info.plist"; + INSTALL_PATH = /Library/QuickLook; + PRODUCT_BUNDLE_IDENTIFIER = "net.pcsxr.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRINGS_FILE_OUTPUT_ENCODING = "UTF-16"; + WRAPPER_EXTENSION = qlgenerator; + }; + name = Instrument; + }; + 551A75CC17868C4E0052D185 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/Bladesio1/Bladesio1.exp; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=Bladesio1"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + PRODUCT_BUNDLE_IDENTIFIER = net.pcsxr.Bladesio1; + WRAPPER_EXTENSION = psxplugin; + }; + name = Debug; + }; + 551A75CD17868C4E0052D185 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/Bladesio1/Bladesio1.exp; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=Bladesio1"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + PRODUCT_BUNDLE_IDENTIFIER = net.pcsxr.Bladesio1; + WRAPPER_EXTENSION = psxplugin; + }; + name = Release; + }; + 551A7678178690500052D185 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/DFCdrom/DFCdrom.exp; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=DFCdrom"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + PRODUCT_BUNDLE_IDENTIFIER = net.pcsxr.DFCdrom; + WRAPPER_EXTENSION = psxplugin; + }; + name = Debug; + }; + 551A7679178690500052D185 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/DFCdrom/DFCdrom.exp; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=DFCdrom"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + PRODUCT_BUNDLE_IDENTIFIER = net.pcsxr.DFCdrom; + WRAPPER_EXTENSION = psxplugin; + }; + name = Release; + }; + 551A768C1786919F0052D185 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/DFInput/Resources/DFInput.exp; + FRAMEWORK_SEARCH_PATHS = /Library/Frameworks; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=DFInput"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + HEADER_SEARCH_PATHS = ( + /Library/Frameworks/SDL2.framework/Headers, + "$(inherited)", + ); + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.pcsxr.DFInputPlugin; + WRAPPER_EXTENSION = psxplugin; + }; + name = Debug; + }; + 551A768D1786919F0052D185 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/DFInput/Resources/DFInput.exp; + FRAMEWORK_SEARCH_PATHS = /Library/Frameworks; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=DFInput"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + HEADER_SEARCH_PATHS = ( + /Library/Frameworks/SDL2.framework/Headers, + "$(inherited)", + ); + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.pcsxr.DFInputPlugin; + WRAPPER_EXTENSION = psxplugin; + }; + name = Release; + }; + 551A76BA178693FF0052D185 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/DFXVideo/DFXVideo.exp; + GCC_PREPROCESSOR_DEFINITIONS = ( + _MACGL, + _DARWIN, + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=SoftGL"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + OTHER_CFLAGS = "$(OPTIMIZATION_CFLAGS)"; + PRODUCT_BUNDLE_IDENTIFIER = net.sf.peops.SoftGpuGLPlugin; + PRODUCT_NAME = PeopsSoftGPU; + WRAPPER_EXTENSION = psxplugin; + }; + name = Debug; + }; + 551A76BB178693FF0052D185 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/DFXVideo/DFXVideo.exp; + GCC_PREPROCESSOR_DEFINITIONS = ( + _MACGL, + _DARWIN, + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=SoftGL"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + OTHER_CFLAGS = "$(OPTIMIZATION_CFLAGS)"; + PRODUCT_BUNDLE_IDENTIFIER = net.sf.peops.SoftGpuGLPlugin; + PRODUCT_NAME = PeopsSoftGPU; + WRAPPER_EXTENSION = psxplugin; + }; + name = Release; + }; + 551A76E0178696BD0052D185 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/DFSound/Resorces/Shared/DFSound.exp; + FRAMEWORK_SEARCH_PATHS = /Library/Frameworks; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = ( + "PCSXRPLUG=SDLSound", + USESDL, + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + HEADER_SEARCH_PATHS = ( + /Library/Frameworks/SDL2.framework/Headers, + "$(inherited)", + ); + INFOPLIST_FILE = "plugins/DFSound/Resorces/SDL/Info-SDL.plist"; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.sf.peops.SPUSDLPlugin; + WRAPPER_EXTENSION = psxplugin; + }; + name = Debug; + }; + 551A76E1178696BD0052D185 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/DFSound/Resorces/Shared/DFSound.exp; + FRAMEWORK_SEARCH_PATHS = /Library/Frameworks; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = ( + "PCSXRPLUG=SDLSound", + USESDL, + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + HEADER_SEARCH_PATHS = ( + /Library/Frameworks/SDL2.framework/Headers, + "$(inherited)", + ); + INFOPLIST_FILE = "plugins/DFSound/Resorces/SDL/Info-SDL.plist"; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.sf.peops.SPUSDLPlugin; + WRAPPER_EXTENSION = psxplugin; + }; + name = Release; + }; + 551A76F01786971B0052D185 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_EMPTY_BODY = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + EXECUTABLE_PREFIX = lib; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GENERATE_PKGINFO_FILE = NO; + INFOPLIST_FILE = "plugins/DFSound/Resorces/Shared/SPUShared-info.plist"; + INSTALL_PATH = "@rpath"; + OTHER_LDFLAGS = ( + "-sectcreate", + __TEXT, + __info_plist, + "plugins/DFSound/Resorces/Shared/SPUShared-info.plist", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.codeplex.pcsxr.spusharedcode; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 551A76F11786971B0052D185 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_EMPTY_BODY = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + EXECUTABLE_PREFIX = lib; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GENERATE_PKGINFO_FILE = NO; + INFOPLIST_FILE = "plugins/DFSound/Resorces/Shared/SPUShared-info.plist"; + INSTALL_PATH = "@rpath"; + OTHER_LDFLAGS = ( + "-sectcreate", + __TEXT, + __info_plist, + "plugins/DFSound/Resorces/Shared/SPUShared-info.plist", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.codeplex.pcsxr.spusharedcode; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 551A771D178698C60052D185 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/DFSound/Resorces/Shared/DFSound.exp; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = ( + "PCSXRPLUG=ALSound", + USEOPENAL, + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INFOPLIST_FILE = "plugins/DFSound/Resorces/OpenAL/Info-AL.plist"; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.sf.peops.SPUALPlugin; + WRAPPER_EXTENSION = psxplugin; + }; + name = Debug; + }; + 551A771E178698C60052D185 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/DFSound/Resorces/Shared/DFSound.exp; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = ( + "PCSXRPLUG=ALSound", + USEOPENAL, + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INFOPLIST_FILE = "plugins/DFSound/Resorces/OpenAL/Info-AL.plist"; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.sf.peops.SPUALPlugin; + WRAPPER_EXTENSION = psxplugin; + }; + name = Release; + }; + 551A774D17869C280052D185 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/PeopsXgl/PeopsXgl.exp; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PREPROCESSOR_DEFINITIONS = ( + _MACGL, + _DARWIN, + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=PeopsXGL"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + OTHER_CFLAGS = "$(OPTIMIZATION_CFLAGS)"; + PRODUCT_BUNDLE_IDENTIFIER = net.sf.peops.GpuOpenGLPlugin; + PRODUCT_NAME = PeopsXGL; + WRAPPER_EXTENSION = psxplugin; + }; + name = Debug; + }; + 551A774E17869C280052D185 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/PeopsXgl/PeopsXgl.exp; + GCC_PREPROCESSOR_DEFINITIONS = ( + _MACGL, + _DARWIN, + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=PeopsXGL"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + OTHER_CFLAGS = "$(OPTIMIZATION_CFLAGS)"; + PRODUCT_BUNDLE_IDENTIFIER = net.sf.peops.GpuOpenGLPlugin; + PRODUCT_NAME = PeopsXGL; + WRAPPER_EXTENSION = psxplugin; + }; + name = Release; + }; + 551A776B17869E430052D185 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/DFNet/DFNet.exp; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=DFNet"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + PRODUCT_BUNDLE_IDENTIFIER = net.codeplex.pcsxr.DFNet; + WRAPPER_EXTENSION = psxplugin; + }; + name = Debug; + }; + 551A776C17869E430052D185 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/DFNet/DFNet.exp; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=DFNet"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + PRODUCT_BUNDLE_IDENTIFIER = net.codeplex.pcsxr.DFNet; + WRAPPER_EXTENSION = psxplugin; + }; + name = Release; + }; + 5525BC7219421A760018AF2F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COMBINE_HIDPI_IMAGES = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = "Psx-Memcard/Psx-Memcard-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=MDPsx"; + INFOPLIST_FILE = "Psx-Memcard/Psx-Memcard-Info.plist"; + INSTALL_PATH = "@executable_path/../Contents/Library/Spotlight"; + PRODUCT_BUNDLE_IDENTIFIER = "net.pcsxr.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRINGS_FILE_OUTPUT_ENCODING = "UTF-16"; + WRAPPER_EXTENSION = mdimporter; + }; + name = Debug; + }; + 5525BC7319421A760018AF2F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COMBINE_HIDPI_IMAGES = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = "Psx-Memcard/Psx-Memcard-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=MDPsx"; + INFOPLIST_FILE = "Psx-Memcard/Psx-Memcard-Info.plist"; + INSTALL_PATH = "@executable_path/../Contents/Library/Spotlight"; + PRODUCT_BUNDLE_IDENTIFIER = "net.pcsxr.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRINGS_FILE_OUTPUT_ENCODING = "UTF-16"; + WRAPPER_EXTENSION = mdimporter; + }; + name = Release; + }; + 5525BC7419421A760018AF2F /* Instrument */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COMBINE_HIDPI_IMAGES = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = "Psx-Memcard/Psx-Memcard-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=MDPsx"; + INFOPLIST_FILE = "Psx-Memcard/Psx-Memcard-Info.plist"; + INSTALL_PATH = "@executable_path/../Contents/Library/Spotlight"; + PRODUCT_BUNDLE_IDENTIFIER = "net.pcsxr.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRINGS_FILE_OUTPUT_ENCODING = "UTF-16"; + WRAPPER_EXTENSION = mdimporter; + }; + name = Instrument; + }; + 55534AFA18183BFB006D6BCB /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "updateInfoPlist/updateInfoPlist-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_UNROLL_LOOPS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GENERATE_PKGINFO_FILE = NO; + LLVM_VECTORIZE_LOOPS = YES; + MACOSX_DEPLOYMENT_TARGET = ""; + ONLY_ACTIVE_ARCH = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 55534AFB18183BFB006D6BCB /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CODE_SIGN_IDENTITY = ""; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "updateInfoPlist/updateInfoPlist-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GENERATE_PKGINFO_FILE = NO; + LLVM_VECTORIZE_LOOPS = YES; + MACOSX_DEPLOYMENT_TARGET = ""; + ONLY_ACTIVE_ARCH = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 55534AFC18183BFB006D6BCB /* Instrument */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "updateInfoPlist/updateInfoPlist-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GENERATE_PKGINFO_FILE = NO; + LLVM_VECTORIZE_LOOPS = YES; + MACOSX_DEPLOYMENT_TARGET = ""; + ONLY_ACTIVE_ARCH = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Instrument; + }; + 557649B91786B09E007C4457 /* Instrument */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEBUG_PREPROCESSOR_DEFINITIONS = ""; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu89; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = pcsxr.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + "_MACOSX=1", + "$(DEBUG_PREPROCESSOR_DEFINITIONS)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + GENERATE_PKGINFO_FILE = YES; + HEADER_SEARCH_PATHS = ( + ../include, + ../libpcsxcore, + ../macosx, + ); + INFOPLIST_FILE = "plugins/$(TARGET_NAME)/Info.plist"; + MACOSX_DEPLOYMENT_TARGET = 10.8; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + STRINGS_FILE_OUTPUT_ENCODING = binary; + WARNING_CFLAGS = ( + "-Wno-comment", + "-Wobjc-interface-ivars", + ); + }; + name = Instrument; + }; + 557649BA1786B09E007C4457 /* Instrument */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = PCSXR; + CLANG_ENABLE_MODULES = NO; + GCC_ENABLE_CPP_EXCEPTIONS = NO; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_PREPROCESSOR_DEFINITIONS = ( + "PCSXRCORE=1", + "PCSXR_VERSION=\\\"1.9\\\"", + "XA_HACK=1", + "__MACOSX__=1", + "ENABLE_SIO1API=1", + "$(inherited)", + ); + GCC_WARN_UNKNOWN_PRAGMAS = NO; + INFOPLIST_FILE = Info.plistvers.plist; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks"; + OTHER_CFLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = com.codeplex.pcsxr; + PRODUCT_NAME = PCSXR; + SKIP_INSTALL = NO; + WRAPPER_EXTENSION = app; + }; + name = Instrument; + }; + 557649BB1786B09E007C4457 /* Instrument */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_EMPTY_BODY = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + EXECUTABLE_PREFIX = lib; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GENERATE_PKGINFO_FILE = NO; + INFOPLIST_FILE = "plugins/DFSound/Resorces/Shared/SPUShared-info.plist"; + INSTALL_PATH = "@rpath"; + OTHER_LDFLAGS = ( + "-sectcreate", + __TEXT, + __info_plist, + "plugins/DFSound/Resorces/Shared/SPUShared-info.plist", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.codeplex.pcsxr.spusharedcode; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Instrument; + }; + 557649BD1786B09E007C4457 /* Instrument */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/DFCdrom/DFCdrom.exp; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=DFCdrom"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + PRODUCT_BUNDLE_IDENTIFIER = net.pcsxr.DFCdrom; + WRAPPER_EXTENSION = psxplugin; + }; + name = Instrument; + }; + 557649BE1786B09E007C4457 /* Instrument */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/DFInput/Resources/DFInput.exp; + FRAMEWORK_SEARCH_PATHS = /Library/Frameworks; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=DFInput"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + HEADER_SEARCH_PATHS = ( + /Library/Frameworks/SDL2.framework/Headers, + "$(inherited)", + ); + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.pcsxr.DFInputPlugin; + WRAPPER_EXTENSION = psxplugin; + }; + name = Instrument; + }; + 557649BF1786B09E007C4457 /* Instrument */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/DFXVideo/DFXVideo.exp; + GCC_PREPROCESSOR_DEFINITIONS = ( + _MACGL, + _DARWIN, + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=SoftGL"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + OTHER_CFLAGS = "$(OPTIMIZATION_CFLAGS)"; + PRODUCT_BUNDLE_IDENTIFIER = net.sf.peops.SoftGpuGLPlugin; + PRODUCT_NAME = PeopsSoftGPU; + WRAPPER_EXTENSION = psxplugin; + }; + name = Instrument; + }; + 557649C01786B09E007C4457 /* Instrument */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/PeopsXgl/PeopsXgl.exp; + GCC_PREPROCESSOR_DEFINITIONS = ( + _MACGL, + _DARWIN, + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=PeopsXGL"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + OTHER_CFLAGS = "$(OPTIMIZATION_CFLAGS)"; + PRODUCT_BUNDLE_IDENTIFIER = net.sf.peops.GpuOpenGLPlugin; + PRODUCT_NAME = PeopsXGL; + WRAPPER_EXTENSION = psxplugin; + }; + name = Instrument; + }; + 557649C11786B09E007C4457 /* Instrument */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/DFSound/Resorces/Shared/DFSound.exp; + FRAMEWORK_SEARCH_PATHS = /Library/Frameworks; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = ( + "PCSXRPLUG=SDLSound", + USESDL, + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + HEADER_SEARCH_PATHS = ( + /Library/Frameworks/SDL2.framework/Headers, + "$(inherited)", + ); + INFOPLIST_FILE = "plugins/DFSound/Resorces/SDL/Info-SDL.plist"; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.sf.peops.SPUSDLPlugin; + WRAPPER_EXTENSION = psxplugin; + }; + name = Instrument; + }; + 557649C21786B09E007C4457 /* Instrument */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/DFSound/Resorces/Shared/DFSound.exp; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = ( + "PCSXRPLUG=ALSound", + USEOPENAL, + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INFOPLIST_FILE = "plugins/DFSound/Resorces/OpenAL/Info-AL.plist"; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.sf.peops.SPUALPlugin; + WRAPPER_EXTENSION = psxplugin; + }; + name = Instrument; + }; + 557649C31786B09E007C4457 /* Instrument */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/DFNet/DFNet.exp; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=DFNet"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + PRODUCT_BUNDLE_IDENTIFIER = net.codeplex.pcsxr.DFNet; + WRAPPER_EXTENSION = psxplugin; + }; + name = Instrument; + }; + 557649C41786B09E007C4457 /* Instrument */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_EMPTY_BODY = YES; + EXPORTED_SYMBOLS_FILE = plugins/Bladesio1/Bladesio1.exp; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "PCSXRPLUG=Bladesio1"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + PRODUCT_BUNDLE_IDENTIFIER = net.pcsxr.Bladesio1; + WRAPPER_EXTENSION = psxplugin; + }; + name = Instrument; + }; + 71F353F40FD98DFE00CBEC28 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = PCSXR; + CLANG_ENABLE_MODULES = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_PREPROCESSOR_DEFINITIONS = "$(inherited) EMU_LOG=__Log"; + GCC_ENABLE_CPP_EXCEPTIONS = NO; + GCC_PREPROCESSOR_DEFINITIONS = ( + "PCSXRCORE=1", + "PCSXR_VERSION=\\\"1.9\\\"", + "XA_HACK=1", + "__MACOSX__=1", + "ENABLE_SIO1API=1", + "$(inherited)", + ); + GCC_WARN_UNKNOWN_PRAGMAS = NO; + INFOPLIST_FILE = Info.plist; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks"; + OTHER_CFLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = com.codeplex.pcsxr; + PRODUCT_NAME = PCSXR; + SKIP_INSTALL = NO; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 71F353F50FD98DFE00CBEC28 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = PCSXR; + CLANG_ENABLE_MODULES = NO; + GCC_ENABLE_CPP_EXCEPTIONS = NO; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_PREPROCESSOR_DEFINITIONS = ( + "PCSXRCORE=1", + "PCSXR_VERSION=\\\"1.9\\\"", + "XA_HACK=1", + "__MACOSX__=1", + "ENABLE_SIO1API=1", + "$(inherited)", + ); + GCC_WARN_UNKNOWN_PRAGMAS = NO; + INFOPLIST_FILE = Info.plistvers.plist; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks"; + OTHER_CFLAGS = ( + "-fomit-frame-pointer", + "$(inherited)", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.codeplex.pcsxr; + PRODUCT_NAME = PCSXR; + SKIP_INSTALL = NO; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + 71F353F90FD98DFE00CBEC28 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEBUG_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu89; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = pcsxr.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + "_MACOSX=1", + "$(DEBUG_PREPROCESSOR_DEFINITIONS)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + GENERATE_PKGINFO_FILE = YES; + HEADER_SEARCH_PATHS = ( + ../include, + ../libpcsxcore, + ../macosx, + ); + INFOPLIST_FILE = "plugins/$(TARGET_NAME)/Info.plist"; + MACOSX_DEPLOYMENT_TARGET = 10.8; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + STRINGS_FILE_OUTPUT_ENCODING = binary; + STRIP_INSTALLED_PRODUCT = NO; + WARNING_CFLAGS = ( + "-Wno-comment", + "-Wobjc-interface-ivars", + ); + }; + name = Debug; + }; + 71F353FA0FD98DFE00CBEC28 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEBUG_PREPROCESSOR_DEFINITIONS = ""; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu89; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = pcsxr.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + "_MACOSX=1", + "$(DEBUG_PREPROCESSOR_DEFINITIONS)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + GENERATE_PKGINFO_FILE = YES; + HEADER_SEARCH_PATHS = ( + ../include, + ../libpcsxcore, + ../macosx, + ); + INFOPLIST_FILE = "plugins/$(TARGET_NAME)/Info.plist"; + LLVM_LTO = YES; + MACOSX_DEPLOYMENT_TARGET = 10.8; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + STRINGS_FILE_OUTPUT_ENCODING = binary; + WARNING_CFLAGS = ( + "-Wno-comment", + "-Wobjc-interface-ivars", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 550E344D18E6293D00A1AD21 /* Build configuration list for PBXNativeTarget "Pcsxr-QL" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 550E344A18E6293D00A1AD21 /* Debug */, + 550E344B18E6293D00A1AD21 /* Release */, + 550E344C18E6293D00A1AD21 /* Instrument */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 551A75CB17868C4E0052D185 /* Build configuration list for PBXNativeTarget "Bladesio1" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 551A75CC17868C4E0052D185 /* Debug */, + 551A75CD17868C4E0052D185 /* Release */, + 557649C41786B09E007C4457 /* Instrument */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 551A7677178690500052D185 /* Build configuration list for PBXNativeTarget "DFCdrom" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 551A7678178690500052D185 /* Debug */, + 551A7679178690500052D185 /* Release */, + 557649BD1786B09E007C4457 /* Instrument */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 551A768B1786919F0052D185 /* Build configuration list for PBXNativeTarget "DFInput" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 551A768C1786919F0052D185 /* Debug */, + 551A768D1786919F0052D185 /* Release */, + 557649BE1786B09E007C4457 /* Instrument */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 551A76B9178693FF0052D185 /* Build configuration list for PBXNativeTarget "DFXVideo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 551A76BA178693FF0052D185 /* Debug */, + 551A76BB178693FF0052D185 /* Release */, + 557649BF1786B09E007C4457 /* Instrument */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 551A76DF178696BD0052D185 /* Build configuration list for PBXNativeTarget "PeopsSpuSDL" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 551A76E0178696BD0052D185 /* Debug */, + 551A76E1178696BD0052D185 /* Release */, + 557649C11786B09E007C4457 /* Instrument */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 551A76EF1786971B0052D185 /* Build configuration list for PBXNativeTarget "SPUSharedCode" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 551A76F01786971B0052D185 /* Debug */, + 551A76F11786971B0052D185 /* Release */, + 557649BB1786B09E007C4457 /* Instrument */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 551A771C178698C60052D185 /* Build configuration list for PBXNativeTarget "PeopsSpuAL" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 551A771D178698C60052D185 /* Debug */, + 551A771E178698C60052D185 /* Release */, + 557649C21786B09E007C4457 /* Instrument */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 551A774C17869C280052D185 /* Build configuration list for PBXNativeTarget "PeopsXgl" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 551A774D17869C280052D185 /* Debug */, + 551A774E17869C280052D185 /* Release */, + 557649C01786B09E007C4457 /* Instrument */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 551A776A17869E430052D185 /* Build configuration list for PBXNativeTarget "DFNet" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 551A776B17869E430052D185 /* Debug */, + 551A776C17869E430052D185 /* Release */, + 557649C31786B09E007C4457 /* Instrument */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 5525BC7119421A760018AF2F /* Build configuration list for PBXNativeTarget "Psx-Memcard" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5525BC7219421A760018AF2F /* Debug */, + 5525BC7319421A760018AF2F /* Release */, + 5525BC7419421A760018AF2F /* Instrument */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 55534AFD18183BFB006D6BCB /* Build configuration list for PBXNativeTarget "updateInfoPlist" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 55534AFA18183BFB006D6BCB /* Debug */, + 55534AFB18183BFB006D6BCB /* Release */, + 55534AFC18183BFB006D6BCB /* Instrument */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 71F353F30FD98DFE00CBEC28 /* Build configuration list for PBXNativeTarget "PCSXR" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 71F353F40FD98DFE00CBEC28 /* Debug */, + 71F353F50FD98DFE00CBEC28 /* Release */, + 557649BA1786B09E007C4457 /* Instrument */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 71F353F80FD98DFE00CBEC28 /* Build configuration list for PBXProject "Pcsxr" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 71F353F90FD98DFE00CBEC28 /* Debug */, + 71F353FA0FD98DFE00CBEC28 /* Release */, + 557649B91786B09E007C4457 /* Instrument */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr.xcodeproj/xcshareddata/xcschemes/Pcsxr-QL.xcscheme pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr.xcodeproj/xcshareddata/xcschemes/Pcsxr-QL.xcscheme --- pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr.xcodeproj/xcshareddata/xcschemes/Pcsxr-QL.xcscheme 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr.xcodeproj/xcshareddata/xcschemes/Pcsxr-QL.xcscheme 2016-06-30 16:53:16.000000000 +0000 @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr.xcodeproj/xcshareddata/xcschemes/PCSXR.xcscheme pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr.xcodeproj/xcshareddata/xcschemes/PCSXR.xcscheme --- pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr.xcodeproj/xcshareddata/xcschemes/PCSXR.xcscheme 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr.xcodeproj/xcshareddata/xcschemes/PCSXR.xcscheme 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr.xcworkspace/contents.xcworkspacedata pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr.xcworkspace/contents.xcworkspacedata --- pcsxr-unstable-1.9.94+svn97809/macosx/Pcsxr.xcworkspace/contents.xcworkspacedata 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Pcsxr.xcworkspace/contents.xcworkspacedata 2016-06-30 16:53:16.000000000 +0000 @@ -0,0 +1,7 @@ + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/Base.lproj/Bladesio1PluginConfig.xib pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/Base.lproj/Bladesio1PluginConfig.xib --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/Base.lproj/Bladesio1PluginConfig.xib 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/Base.lproj/Bladesio1PluginConfig.xib 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/Bladesio1.exp pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/Bladesio1.exp --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/Bladesio1.exp 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/Bladesio1.exp 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,49 @@ +# Bladesio1.exp +# Pcsxr +# +# Created by C.W. Betts on 2/8/15. +# + +_PSEgetLibType +_PSEgetLibName +_PSEgetLibVersion +_SIO1configure +_SIO1about +_SIO1test +_SIO1init +_SIO1shutdown +_SIO1open +_SIO1close + +_SIO1pause +_SIO1resume +_SIO1keypressed + +_SIO1writeData8 +_SIO1writeData16 +_SIO1writeData32 +_SIO1writeStat16 +_SIO1writeStat32 +_SIO1writeMode16 +_SIO1writeMode32 +_SIO1writeCtrl16 +_SIO1writeCtrl32 +_SIO1writeBaud16 +_SIO1writeBaud32 + +_SIO1readData8 +_SIO1readData16 +_SIO1readData32 +_SIO1readStat16 +_SIO1readStat32 +_SIO1readMode16 +_SIO1readMode32 +_SIO1readCtrl16 +_SIO1readCtrl32 +_SIO1readBaud16 +_SIO1readBaud32 + +_SIO1update +_SIO1registerCallback + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/en.lproj/Bladesio1PluginConfig.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/en.lproj/Bladesio1PluginConfig.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/en.lproj/Bladesio1PluginConfig.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/en.lproj/Bladesio1PluginConfig.strings 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,39 @@ + +/* Class = "NSWindow"; title = "BladeSIO1 Configuration"; ObjectID = "5"; */ +"5.title" = "BladeSIO1 Configuration"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "186"; */ +"186.title" = "Cancel"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "187"; */ +"187.title" = "OK"; + +/* Class = "NSBox"; title = "Box"; ObjectID = "193"; */ +"193.title" = "Box"; + +/* Class = "NSButtonCell"; title = "Enabled"; ObjectID = "195"; */ +"195.title" = "Enabled"; + +/* Class = "NSTextFieldCell"; title = "IP Address:"; ObjectID = "199"; */ +"199.title" = "IP Address:"; + +/* Class = "NSTextFieldCell"; title = "Player:"; ObjectID = "201"; */ +"201.title" = "Player:"; + +/* Class = "NSTextFieldCell"; title = "Port:"; ObjectID = "203"; */ +"203.title" = "Port:"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "210"; */ +"210.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Master"; ObjectID = "211"; */ +"211.title" = "Master"; + +/* Class = "NSMenuItem"; title = "Slave"; ObjectID = "212"; */ +"212.title" = "Slave"; + +/* Class = "NSMenuItem"; title = "Disabled"; ObjectID = "213"; */ +"213.title" = "Disabled"; + +/* Class = "NSButtonCell"; title = "Reset"; ObjectID = "222"; */ +"222.title" = "Reset"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/en.lproj/Credits.rtf pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/en.lproj/Credits.rtf --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/en.lproj/Credits.rtf 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/en.lproj/Credits.rtf 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,14 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural + +\f0\b\fs24 \cf0 Original coder: +\b0 \ + linuzappz\ +\ + +\b Macintosh Port: +\b0 \ + C.W. \'93Madd the Sane\'94 Betts} \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/en.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/en.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/en.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/en.lproj/InfoPlist.strings 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,6 @@ +/* Localized versions of Info.plist keys */ + +CFBundleName = "Bladesio1 sio1 plug-in"; +CFBundleShortVersionString = "1.0"; +CFBundleGetInfoString = "Based on bladesio plugin by linuzappz."; +NSHumanReadableCopyright = "Copyright © 2013 C.W. Betts."; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/en.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/en.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/en.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/en.lproj/Localizable.strings 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,9 @@ +/* + Localizable.strings + DFCdrom + + Created by C.W. Betts on 11/16/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"sio1Blade" = "Blade sio1"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/fr.lproj/Bladesio1PluginConfig.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/fr.lproj/Bladesio1PluginConfig.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/fr.lproj/Bladesio1PluginConfig.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/fr.lproj/Bladesio1PluginConfig.strings 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,39 @@ + +/* Class = "NSWindow"; title = "BladeSIO1 Configuration"; ObjectID = "5"; */ +"5.title" = "BladeSIO1 Configuration"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "186"; */ +"186.title" = "Cancel"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "187"; */ +"187.title" = "OK"; + +/* Class = "NSBox"; title = "Box"; ObjectID = "193"; */ +"193.title" = "Box"; + +/* Class = "NSButtonCell"; title = "Enabled"; ObjectID = "195"; */ +"195.title" = "Enabled"; + +/* Class = "NSTextFieldCell"; title = "IP Address:"; ObjectID = "199"; */ +"199.title" = "IP Address:"; + +/* Class = "NSTextFieldCell"; title = "Player:"; ObjectID = "201"; */ +"201.title" = "Player:"; + +/* Class = "NSTextFieldCell"; title = "Port:"; ObjectID = "203"; */ +"203.title" = "Port:"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "210"; */ +"210.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Master"; ObjectID = "211"; */ +"211.title" = "Master"; + +/* Class = "NSMenuItem"; title = "Slave"; ObjectID = "212"; */ +"212.title" = "Slave"; + +/* Class = "NSMenuItem"; title = "Disabled"; ObjectID = "213"; */ +"213.title" = "Disabled"; + +/* Class = "NSButtonCell"; title = "Reset"; ObjectID = "222"; */ +"222.title" = "Reset"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/hu.lproj/Bladesio1PluginConfig.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/hu.lproj/Bladesio1PluginConfig.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/hu.lproj/Bladesio1PluginConfig.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/hu.lproj/Bladesio1PluginConfig.strings 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,39 @@ + +/* Class = "NSWindow"; title = "BladeSIO1 Configuration"; ObjectID = "5"; */ +"5.title" = "BladeSIO1 Configuration"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "186"; */ +"186.title" = "Cancel"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "187"; */ +"187.title" = "OK"; + +/* Class = "NSBox"; title = "Box"; ObjectID = "193"; */ +"193.title" = "Box"; + +/* Class = "NSButtonCell"; title = "Enabled"; ObjectID = "195"; */ +"195.title" = "Enabled"; + +/* Class = "NSTextFieldCell"; title = "IP Address:"; ObjectID = "199"; */ +"199.title" = "IP Address:"; + +/* Class = "NSTextFieldCell"; title = "Player:"; ObjectID = "201"; */ +"201.title" = "Player:"; + +/* Class = "NSTextFieldCell"; title = "Port:"; ObjectID = "203"; */ +"203.title" = "Port:"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "210"; */ +"210.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Master"; ObjectID = "211"; */ +"211.title" = "Master"; + +/* Class = "NSMenuItem"; title = "Slave"; ObjectID = "212"; */ +"212.title" = "Slave"; + +/* Class = "NSMenuItem"; title = "Disabled"; ObjectID = "213"; */ +"213.title" = "Disabled"; + +/* Class = "NSButtonCell"; title = "Reset"; ObjectID = "222"; */ +"222.title" = "Reset"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/Info.plist pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/Info.plist --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/Info.plist 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/Info.plist 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,26 @@ + + + + + CFBundleAllowMixedLocalizations + + CFBundleDevelopmentRegion + en_US + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + PsxP + CFBundleSignature + BSio + CFBundleVersion + 1.0 + NSPrincipalClass + Bladesio1PluginConfigController + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/macsrc/cfg.c pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/macsrc/cfg.c --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/macsrc/cfg.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/macsrc/cfg.c 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: Cdrom for Psemu Pro like Emulators + * By: linuzappz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include +#include +#include "typedefs.h" +#include "sio1.h" + +void AboutDlgProc(); +void ConfDlgProc(); +void ReadConfig(); + +Settings settings; + +void settingsRead() { + settings.player = PLAYER_DISABLED; + strcpy(settings.ip, "127.0.0.1"); + settings.port = 33307; + + ReadConfig(); +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/macsrc/PluginConfigController.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/macsrc/PluginConfigController.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/macsrc/PluginConfigController.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/macsrc/PluginConfigController.h 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,21 @@ +#define PluginConfigController Bladesio1PluginConfigController + +#import + +@interface Bladesio1PluginConfigController : NSWindowController +@property (weak) IBOutlet NSButton *enabledButton; +@property (weak) IBOutlet NSTextField *ipAddressField; +@property (weak) IBOutlet NSTextField *portField; +@property (weak) IBOutlet NSPopUpButton *playerMenu; +@property (weak) IBOutlet NSBox *configBox; + +@property (strong) NSMutableDictionary *keyValues; + +- (IBAction)cancel:(id)sender; +- (IBAction)ok:(id)sender; +- (IBAction)toggleEnabled:(id)sender; +- (IBAction)resetPreferences:(id)sender; + +- (void)loadValues; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,226 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: Cdrom for Psemu Pro like Emulators + * By: linuzappz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#import "PluginConfigController.h" +#include "typedefs.h" +#include "sio1.h" + +#define APP_ID @"net.pcsxr.Bladesio1" +#define PrefsKey APP_ID @" Settings" + +static PluginConfigController *windowController; + +#define kSioEnabled @"SIO Enabled" +#define kSioPort @"Port" +#define kSioPlayer @"Player" +#define kSioIPAddress @"IP address" + +void AboutDlgProc() +{ + // Get parent application instance + NSBundle *bundle = [NSBundle bundleWithIdentifier:APP_ID]; + + // Get Credits.rtf + NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; + NSAttributedString *credits; + if (!path) { + path = [bundle pathForResource:@"Credits" ofType:@"rtfd"]; + } + if (path) { + credits = [[NSAttributedString alloc] initWithPath:path documentAttributes:NULL]; + } else { + credits = [[NSAttributedString alloc] initWithString:@""]; + } + + // Get Application Icon + NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:[bundle bundlePath]]; + [icon setSize:NSMakeSize(64, 64)]; + + NSDictionary *infoPaneDict = + @{@"ApplicationName": [bundle objectForInfoDictionaryKey:@"CFBundleName"], + @"ApplicationIcon": icon, + @"ApplicationVersion": [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], + @"Version": [bundle objectForInfoDictionaryKey:@"CFBundleVersion"], + @"Copyright": [bundle objectForInfoDictionaryKey:@"NSHumanReadableCopyright"], + @"Credits": credits}; + dispatch_async(dispatch_get_main_queue(), ^{ + [NSApp orderFrontStandardAboutPanelWithOptions:infoPaneDict]; + }); +} + +static inline void RunOnMainThreadSync(dispatch_block_t block) +{ + if ([NSThread isMainThread]) { + block(); + } else { + dispatch_sync(dispatch_get_main_queue(), block); + } +} + +void ConfDlgProc() +{ + //We need this block due to the xib's use of auto layout + RunOnMainThreadSync(^{ + NSWindow *window; + if (windowController == nil) { + windowController = [[PluginConfigController alloc] initWithWindowNibName:@"Bladesio1PluginConfig"]; + } + window = [windowController window]; + + [windowController loadValues]; + + [window center]; + [window makeKeyAndOrderFront:nil]; + }); +} + +void ReadConfig() +{ + NSDictionary *keyValues; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults registerDefaults:@{PrefsKey: @{kSioEnabled: @NO, + kSioPort: @33307, + kSioIPAddress: @"127.0.0.1", + kSioPlayer: @(PLAYER_DISABLED)}}]; + + keyValues = [defaults dictionaryForKey:PrefsKey]; + + settings.enabled = [keyValues[kSioEnabled] boolValue]; + settings.port = [keyValues[kSioPort] unsignedShortValue]; + settings.player = [keyValues[kSioPlayer] intValue]; + strlcpy(settings.ip, [keyValues[kSioIPAddress] cStringUsingEncoding:NSASCIIStringEncoding], sizeof(settings.ip)); +} + +@implementation Bladesio1PluginConfigController + +- (IBAction)cancel:(id)sender +{ + [self close]; +} + +- (IBAction)ok:(id)sender +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:self.keyValues]; + + NSString *theAddress = [self.ipAddressField stringValue]; + NSInteger asciiLen = [theAddress lengthOfBytesUsingEncoding:NSASCIIStringEncoding]; + if (asciiLen > (sizeof(settings.ip) - 1)) { + NSBeginAlertSheet(@"Address too long", nil, nil, nil, [self window], nil, NULL, NULL, NULL, @"The address is too long.\n\nTry to use only the IP address and not a host name."); + return; + } else if (asciiLen == 0) { + NSBeginAlertSheet(@"Blank address", nil, nil, nil, [self window], nil, NULL, NULL, NULL, @"The address specified is either blank, or can't be converted to ASCII.\n\nTry connecting directly using the IP address using latin numerals."); + return; + } + + writeDic[kSioEnabled] = (([self.enabledButton state] == NSOnState) ? @YES : @NO); + writeDic[kSioIPAddress] = theAddress; + writeDic[kSioPort] = @((u16)[self.portField intValue]); + + { + int player; + switch ([self.playerMenu indexOfSelectedItem]) { + default: + case 0: + player = PLAYER_DISABLED; + break; + + case 1: + player = PLAYER_MASTER; + break; + case 2: + player = PLAYER_SLAVE; + break; + } + writeDic[kSioPlayer] = @(player); + } + + // write to defaults + [defaults setObject:writeDic forKey:PrefsKey]; + [defaults synchronize]; + + // and set global values accordingly + ReadConfig(); + + [self close]; +} + +- (IBAction)toggleEnabled:(id)sender +{ + BOOL isEnabled = [self.enabledButton state] == NSOnState ? YES : NO; + + for (NSView *subView in [[self.configBox subviews][0] subviews]) { + if ([subView isKindOfClass:[NSTextField class]] && ![(NSTextField*)subView isEditable]) { + [(NSTextField*)subView setTextColor:isEnabled ? [NSColor controlTextColor] : [NSColor disabledControlTextColor]]; + } else { + if ([subView respondsToSelector:@selector(setEnabled:)]) { + [(NSControl*)subView setEnabled:isEnabled]; + } + } + } +} + +- (IBAction)resetPreferences:(id)sender +{ + [[NSUserDefaults standardUserDefaults] removeObjectForKey:PrefsKey]; + [self loadValues]; +} + +- (void)loadValues +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + ReadConfig(); + + // load from preferences + self.keyValues = [[defaults dictionaryForKey:PrefsKey] mutableCopy]; + + [self.enabledButton setState: [self.keyValues[kSioEnabled] boolValue] ? NSOnState : NSOffState]; + [self.ipAddressField setStringValue:self.keyValues[kSioIPAddress]]; + [self.portField setIntValue:[self.keyValues[kSioPort] intValue]]; + + switch ([self.keyValues[kSioPlayer] integerValue]) { + default: + case PLAYER_DISABLED: + [self.playerMenu selectItemAtIndex:0]; + break; + + case PLAYER_MASTER: + [self.playerMenu selectItemAtIndex:1]; + break; + + case PLAYER_SLAVE: + [self.playerMenu selectItemAtIndex:2]; + break; + } + + [self toggleEnabled:nil]; +} + +- (void)awakeFromNib +{ +} + +@end + +#import "OSXPlugLocalization.h" +PLUGLOCIMP([PluginConfigController class]); diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/zh-Hans.lproj/Bladesio1PluginConfig.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/zh-Hans.lproj/Bladesio1PluginConfig.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/zh-Hans.lproj/Bladesio1PluginConfig.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/zh-Hans.lproj/Bladesio1PluginConfig.strings 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,39 @@ + +/* Class = "NSWindow"; title = "BladeSIO1 配置"; ObjectID = "5"; */ +"5.title" = "BladeSIO1 配置"; + +/* Class = "NSButtonCell"; title = "取消"; ObjectID = "186"; */ +"186.title" = "取消"; + +/* Class = "NSButtonCell"; title = "确认"; ObjectID = "187"; */ +"187.title" = "确认"; + +/* Class = "NSBox"; title = "窗体"; ObjectID = "193"; */ +"193.title" = "窗体"; + +/* Class = "NSButtonCell"; title = "启用"; ObjectID = "195"; */ +"195.title" = "启用"; + +/* Class = "NSTextFieldCell"; title = "IP 地址:"; ObjectID = "199"; */ +"199.title" = "IP 地址:"; + +/* Class = "NSTextFieldCell"; title = "玩家:"; ObjectID = "201"; */ +"201.title" = "玩家:"; + +/* Class = "NSTextFieldCell"; title = "端口:"; ObjectID = "203"; */ +"203.title" = "端口:"; + +/* Class = "NSMenu"; title = "查看其他"; ObjectID = "210"; */ +"210.title" = "查看其他"; + +/* Class = "NSMenuItem"; title = "主要"; ObjectID = "211"; */ +"211.title" = "主要"; + +/* Class = "NSMenuItem"; title = "次要"; ObjectID = "212"; */ +"212.title" = "次要"; + +/* Class = "NSMenuItem"; title = "关闭"; ObjectID = "213"; */ +"213.title" = "关闭"; + +/* Class = "NSButtonCell"; title = "重置"; ObjectID = "222"; */ +"222.title" = "重置"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/zh-Hans.lproj/Credits.rtf pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/zh-Hans.lproj/Credits.rtf --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/Bladesio1/zh-Hans.lproj/Credits.rtf 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/Bladesio1/zh-Hans.lproj/Credits.rtf 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,21 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset134 STHeitiSC-Light;} +{\colortbl;\red255\green255\blue255;} +\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural + +\f0\b\fs24 \cf0 Original coder: +\b0 \ + linuzappz\ +\ + +\b Macintosh Port: +\b0 \ + C.W. \'93Madd the Sane\'94 Betts\ +\ + +\b Chinese Translation( +\f1 \'d6\'d0\'ce\'c4\'b7\'ad\'d2\'eb +\f0 ): +\b0 \ + Sdchun} \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/Base.lproj/DFCdromPluginConfig.xib pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/Base.lproj/DFCdromPluginConfig.xib --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/Base.lproj/DFCdromPluginConfig.xib 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/Base.lproj/DFCdromPluginConfig.xib 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/DFCdrom.exp pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/DFCdrom.exp --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/DFCdrom.exp 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/DFCdrom.exp 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,28 @@ +# DFCdrom.exp +# Pcsxr +# +# Created by C.W. Betts on 2/8/15. +# + +_PSEgetLibType +_PSEgetLibName +_PSEgetLibVersion + +_CDRinit +_CDRshutdown +_CDRopen +_CDRclose +_CDRgetTN +_CDRgetTD +_CDRreadTrack +_CDRgetBuffer +_CDRgetBufferSub +_CDRconfigure +_CDRtest +_CDRabout +_CDRplay +_CDRstop +_CDRgetStatus +_CDRgetDriveLetter +_CDRreadCDDA +_CDRgetTE diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/en.lproj/Credits.rtf pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/en.lproj/Credits.rtf --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/en.lproj/Credits.rtf 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/en.lproj/Credits.rtf 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,16 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural + +\f0\b\fs24 \cf0 Original coder: +\b0 \ + linuzappz\ +\ + +\b Macintosh Port: +\b0 \ + Wei Mingzhi\ + C.W. \'93Madd the Sane\'94 Betts\ +} \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/en.lproj/DFCdromPluginConfig.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/en.lproj/DFCdromPluginConfig.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/en.lproj/DFCdromPluginConfig.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/en.lproj/DFCdromPluginConfig.strings 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,48 @@ + +/* Class = "NSWindow"; title = "CDR Configuration"; ObjectID = "5"; */ +"5.title" = "CDR Configuration"; + +/* Class = "NSBox"; title = "General Settings"; ObjectID = "162"; */ +"162.title" = "General Settings"; + +/* Class = "NSBox"; title = "Misc"; ObjectID = "164"; */ +"164.title" = "Misc"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "174"; */ +"174.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "2 X"; ObjectID = "175"; */ +"175.title" = "2 X"; + +/* Class = "NSMenuItem"; title = "Default"; ObjectID = "176"; */ +"176.title" = "Default"; + +/* Class = "NSMenuItem"; title = "1 X"; ObjectID = "177"; */ +"177.title" = "1 X"; + +/* Class = "NSMenuItem"; title = "8 X"; ObjectID = "178"; */ +"178.title" = "8 X"; + +/* Class = "NSMenuItem"; title = "4 X"; ObjectID = "179"; */ +"179.title" = "4 X"; + +/* Class = "NSMenuItem"; title = "16 X"; ObjectID = "180"; */ +"180.title" = "16 X"; + +/* Class = "NSMenuItem"; title = "32 X"; ObjectID = "181"; */ +"181.title" = "32 X"; + +/* Class = "NSButtonCell"; title = "Use Cached Reading"; ObjectID = "189"; */ +"189.title" = "Use Cached Reading"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "243"; */ +"243.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "251"; */ +"251.title" = "Cancel"; + +/* Class = "NSTextFieldCell"; title = "CD-ROM Speed:"; ObjectID = "267"; */ +"267.title" = "CD-ROM Speed:"; + +/* Class = "NSTextFieldCell"; title = "Cache Size:\n"; ObjectID = "MSf-Ad-auA"; */ +"MSf-Ad-auA.title" = "Cache Size:"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/en.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/en.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/en.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/en.lproj/InfoPlist.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,6 @@ +/* Localized versions of Info.plist keys */ + +CFBundleName = "CD-ROM Drive Reader"; +CFBundleShortVersionString = "1.0"; +CFBundleGetInfoString = "Based on CDR plugin by linuzappz."; +NSHumanReadableCopyright = "Copyright © 2010 Wei Mingzhi."; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/en.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/en.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/en.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/en.lproj/Localizable.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,9 @@ +/* + Localizable.strings + DFCdrom + + Created by C.W. Betts on 11/16/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"CD-ROM Drive Reader" = "CD-ROM Drive Reader"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/fr.lproj/DFCdromPluginConfig.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/fr.lproj/DFCdromPluginConfig.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/fr.lproj/DFCdromPluginConfig.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/fr.lproj/DFCdromPluginConfig.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,48 @@ + +/* Class = "NSWindow"; title = "CDR Configuration"; ObjectID = "5"; */ +"5.title" = "CDR Configuration"; + +/* Class = "NSBox"; title = "General Settings"; ObjectID = "162"; */ +"162.title" = "General Settings"; + +/* Class = "NSBox"; title = "Misc"; ObjectID = "164"; */ +"164.title" = "Misc"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "174"; */ +"174.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "2 X"; ObjectID = "175"; */ +"175.title" = "2 X"; + +/* Class = "NSMenuItem"; title = "Default"; ObjectID = "176"; */ +"176.title" = "Default"; + +/* Class = "NSMenuItem"; title = "1 X"; ObjectID = "177"; */ +"177.title" = "1 X"; + +/* Class = "NSMenuItem"; title = "8 X"; ObjectID = "178"; */ +"178.title" = "8 X"; + +/* Class = "NSMenuItem"; title = "4 X"; ObjectID = "179"; */ +"179.title" = "4 X"; + +/* Class = "NSMenuItem"; title = "16 X"; ObjectID = "180"; */ +"180.title" = "16 X"; + +/* Class = "NSMenuItem"; title = "32 X"; ObjectID = "181"; */ +"181.title" = "32 X"; + +/* Class = "NSButtonCell"; title = "Use Cached Reading"; ObjectID = "189"; */ +"189.title" = "Use Cached Reading"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "243"; */ +"243.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "251"; */ +"251.title" = "Cancel"; + +/* Class = "NSTextFieldCell"; title = "CD-ROM Speed:"; ObjectID = "267"; */ +"267.title" = "CD-ROM Speed:"; + +/* Class = "NSTextFieldCell"; title = "Cache Size:\n"; ObjectID = "MSf-Ad-auA"; */ +"MSf-Ad-auA.title" = "Cache Size:"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/fr.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/fr.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/fr.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/fr.lproj/Localizable.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,9 @@ +/* + Localizable.strings + DFCdrom + + Created by C.W. Betts on 11/16/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"CD-ROM Drive Reader" = "Lecteur CR-ROM"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/hu.lproj/DFCdromPluginConfig.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/hu.lproj/DFCdromPluginConfig.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/hu.lproj/DFCdromPluginConfig.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/hu.lproj/DFCdromPluginConfig.strings 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,48 @@ + +/* Class = "NSWindow"; title = "CDR Configuration"; ObjectID = "5"; */ +"5.title" = "CDR Configuration"; + +/* Class = "NSBox"; title = "General Settings"; ObjectID = "162"; */ +"162.title" = "General Settings"; + +/* Class = "NSBox"; title = "Misc"; ObjectID = "164"; */ +"164.title" = "Misc"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "174"; */ +"174.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "2 X"; ObjectID = "175"; */ +"175.title" = "2 X"; + +/* Class = "NSMenuItem"; title = "Default"; ObjectID = "176"; */ +"176.title" = "Default"; + +/* Class = "NSMenuItem"; title = "1 X"; ObjectID = "177"; */ +"177.title" = "1 X"; + +/* Class = "NSMenuItem"; title = "8 X"; ObjectID = "178"; */ +"178.title" = "8 X"; + +/* Class = "NSMenuItem"; title = "4 X"; ObjectID = "179"; */ +"179.title" = "4 X"; + +/* Class = "NSMenuItem"; title = "16 X"; ObjectID = "180"; */ +"180.title" = "16 X"; + +/* Class = "NSMenuItem"; title = "32 X"; ObjectID = "181"; */ +"181.title" = "32 X"; + +/* Class = "NSButtonCell"; title = "Use Cached Reading"; ObjectID = "189"; */ +"189.title" = "Use Cached Reading"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "243"; */ +"243.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "251"; */ +"251.title" = "Cancel"; + +/* Class = "NSTextFieldCell"; title = "CD-ROM Speed:"; ObjectID = "267"; */ +"267.title" = "CD-ROM Speed:"; + +/* Class = "NSTextFieldCell"; title = "Cache Size:\n"; ObjectID = "MSf-Ad-auA"; */ +"MSf-Ad-auA.title" = "Cache Size:"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/hu.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/hu.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/hu.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/hu.lproj/Localizable.strings 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,9 @@ +/* + Localizable.strings + DFCdrom + + Created by C.W. Betts on 11/16/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"CD-ROM Drive Reader" = "CD-ROM olvasó"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/Info.plist pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/Info.plist --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/Info.plist 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/Info.plist 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,26 @@ + + + + + CFBundleAllowMixedLocalizations + + CFBundleDevelopmentRegion + en_US + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + PsxP + CFBundleSignature + CdDI + CFBundleVersion + 1.0 + NSPrincipalClass + DFCdromPluginConfigController + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/macsrc/cdr-macosx.c pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/macsrc/cdr-macosx.c --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/macsrc/cdr-macosx.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/macsrc/cdr-macosx.c 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,252 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: Cdrom for Psemu Pro like Emulators + * By: linuzappz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "cdr.h" + +#ifdef _MACOSX + +#include +#include +#include +#include +#include +#include +#include + +int cdHandle = -1; +char cdDevice[4096] = ""; + +static int IsPsxDisc(const char *dev) { + int fd; + char buf[CD_FRAMESIZE_RAW]; + dk_cd_read_t r; + + fd = open(dev, O_RDONLY, 0); + if (fd < 0) return 0; + + memset(&r, 0, sizeof(r)); + + r.offset = msf_to_lba(0, 2, 4) * CD_FRAMESIZE_RAW; + r.sectorArea = 0xF8; + r.sectorType = kCDSectorTypeUnknown; + r.bufferLength = CD_FRAMESIZE_RAW; + r.buffer = buf; + + if (ioctl(fd, DKIOCCDREAD, &r) != kIOReturnSuccess) { + close(fd); + return 0; + } + + close(fd); + + if (strncmp(buf + 56, "Sony Computer Entertainment", 27) == 0) { + return 1; + } + + return 0; +} + +static void FindCdDevice(char *dev) { + io_object_t next_media; + kern_return_t kern_result; + io_iterator_t media_iterator; + CFMutableDictionaryRef classes_to_match; + const char *name, *cd = kIOCDMediaClass, *dvd = kIODVDMediaClass; + + dev[0] = '\0'; + name = cd; + +start: + classes_to_match = IOServiceMatching(name); + if (classes_to_match == NULL) goto end; + + CFDictionarySetValue(classes_to_match, CFSTR(kIOMediaEjectableKey), + kCFBooleanTrue); + + kern_result = IOServiceGetMatchingServices(kIOMasterPortDefault, + classes_to_match, &media_iterator); + + if (kern_result != KERN_SUCCESS) goto end; + + next_media = IOIteratorNext(media_iterator); + if (next_media != 0) { + char psz_buf[0x32]; + size_t dev_path_length; + CFTypeRef str_bsd_path; + + do { + str_bsd_path = IORegistryEntryCreateCFProperty(next_media, + CFSTR(kIOBSDNameKey), kCFAllocatorDefault, 0); + + if (str_bsd_path == NULL) { + IOObjectRelease(next_media); + continue; + } + + strcpy(psz_buf, "/dev/r"); + dev_path_length = strlen(psz_buf); + + if (CFStringGetCString(str_bsd_path, (char *)&psz_buf + dev_path_length, + sizeof(psz_buf) - dev_path_length, kCFStringEncodingASCII)) + { + strcpy(dev, psz_buf); + + if (IsPsxDisc(dev)) { + CFRelease(str_bsd_path); + IOObjectRelease(next_media); + IOObjectRelease(media_iterator); + return; + } + } + + CFRelease(str_bsd_path); + IOObjectRelease(next_media); + } while ((next_media = IOIteratorNext(media_iterator)) != 0); + } + + IOObjectRelease(media_iterator); + +end: + if (dev[0] == '\0') { + if (name == cd) { + name = dvd; // Is this really necessary or correct? Dunno... + goto start; + } + } +} + +int OpenCdHandle(const char *dev) { + if (dev != NULL && dev[0] != '\0') strcpy(cdDevice, dev); + else if (cdDevice[0] == '\0') FindCdDevice(cdDevice); + + cdHandle = open(cdDevice, O_RDONLY, 0); + if (cdHandle < 0) return -1; + + if (CdrSpeed > 0) { + u_int16_t speed = kCDSpeedMin * CdrSpeed; + ioctl(cdHandle, DKIOCCDSETSPEED, &speed); + } + + return 0; +} + +void CloseCdHandle() { + if (cdHandle != -1) close(cdHandle); + cdHandle = -1; +} + +int IsCdHandleOpen() { + return (cdHandle != -1); +} + +long GetTN(unsigned char *buffer) { + if (cdHandle < 0) return -1; + + // TODO + buffer[0] = 1; + buffer[1] = 1; + + return 0; +} + +long GetTD(unsigned char track, unsigned char *buffer) { + if (cdHandle < 0) return -1; + + // TODO + memset(buffer + 1, 0, 3); + return 0; +} + +long GetTE(unsigned char track, unsigned char *m, unsigned char *s, unsigned char *f) { + return -1; // TODO +} + +long ReadSector(crdata *cr) { + int lba; + dk_cd_read_t r; + char buf[CD_FRAMESIZE_RAW]; + + if (cdHandle < 0) return -1; + + lba = msf_to_lba(cr->msf.cdmsf_min0, cr->msf.cdmsf_sec0, cr->msf.cdmsf_frame0); + + memset(&r, 0, sizeof(r)); + + r.offset = lba * CD_FRAMESIZE_RAW; + r.sectorArea = 0xF8; + r.sectorType = kCDSectorTypeUnknown; + r.bufferLength = CD_FRAMESIZE_RAW; + r.buffer = buf; // ??? Why using cr->buf directly does not work in threaded mode? + + if (ioctl(cdHandle, DKIOCCDREAD, &r) != kIOReturnSuccess) { + return -1; + } + + memcpy(cr->buf, buf, CD_FRAMESIZE_RAW); + return 0; +} + +long PlayCDDA(unsigned char *sector) { + return 0; // TODO +} + +long StopCDDA() { + return 0; // TODO +} + +long GetStatus(int playing, struct CdrStat *stat) { + memset(stat, 0, sizeof(struct CdrStat)); + stat->Type = 0x01; + + // Close and reopen the CD handle. If opening failed, + // then there is no CD in drive. + // Note that this WILL be screwed if user inserted another + // removable device such as USB stick when tray is open. + // There may be a better way, but this should do the job. + if (cdHandle >= 0) { + close(cdHandle); + cdHandle = -1; + } + + cdHandle = open(cdDevice, O_RDONLY, 0); + if (cdHandle < 0) { + // No CD in drive + stat->Type = 0xff; + stat->Status |= 0x10; + } else { + if (CdrSpeed > 0) { + u_int16_t speed = kCDSpeedMin * CdrSpeed; + ioctl(cdHandle, DKIOCCDSETSPEED, &speed); + } + } + + return 0; +} + +unsigned char *ReadSub(const unsigned char *time) { + return NULL; // TODO +} + +char *CDRgetDriveLetter(void) { + return cdDevice; +} + +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/macsrc/cfg.c pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/macsrc/cfg.c --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/macsrc/cfg.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/macsrc/cfg.c 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: Cdrom for Psemu Pro like Emulators + * By: linuzappz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "cdr.h" + +void AboutDlgProc(); +void ConfDlgProc(); +void ReadConfig(); + +char CdromDev[256]; +long ReadMode; +long UseSubQ; +long CacheSize; +long CdrSpeed; +long SpinDown; + +void LoadConf() { + strcpy(CdromDev, ""); + ReadMode = THREADED; + UseSubQ = 0; + CacheSize = 64; + CdrSpeed = 0; + SpinDown = SPINDOWN_VENDOR_SPECIFIC; + + ReadConfig(); +} + +long CDRconfigure() { + ConfDlgProc(); + return 0; +} + +void CDRabout() { + AboutDlgProc(); +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/macsrc/PluginConfigController.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/macsrc/PluginConfigController.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/macsrc/PluginConfigController.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/macsrc/PluginConfigController.h 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,16 @@ +#define PluginConfigController DFCdromPluginConfigController + +#import + +@interface PluginConfigController : NSWindowController +@property (weak) IBOutlet NSControl *Cached; +@property (weak) IBOutlet NSSlider *CacheSize; +@property (weak) IBOutlet NSPopUpButton *CdSpeed; +@property (strong) NSMutableDictionary *keyValues; + +- (IBAction)cancel:(id)sender; +- (IBAction)ok:(id)sender; + +- (void)loadValues; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,175 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: Cdrom for Psemu Pro like Emulators + * By: linuzappz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#import "PluginConfigController.h" +#include "cdr.h" + +#define APP_ID @"net.pcsxr.DFCdrom" +#define PrefsKey APP_ID @" Settings" + +static inline void RunOnMainThreadSync(dispatch_block_t block) +{ + if ([NSThread isMainThread]) { + block(); + } else { + dispatch_sync(dispatch_get_main_queue(), block); + } +} + +static PluginConfigController *windowController = nil; + +void AboutDlgProc() +{ + // Get parent application instance + NSBundle *bundle = [NSBundle bundleWithIdentifier:APP_ID]; + + // Get Credits.rtf + NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; + NSAttributedString *credits; + if (!path) { + path = [bundle pathForResource:@"Credits" ofType:@"rtfd"]; + } + if (path) { + credits = [[NSAttributedString alloc] initWithPath:path documentAttributes:NULL]; + } else { + credits = [[NSAttributedString alloc] initWithString:@""]; + } + + // Get Application Icon + NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:[bundle bundlePath]]; + NSSize size = NSMakeSize(64, 64); + [icon setSize:size]; + + NSDictionary *infoPaneDict = + @{@"ApplicationName": [bundle objectForInfoDictionaryKey:@"CFBundleName"], + @"ApplicationIcon": icon, + @"ApplicationVersion": [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], + @"Version": [bundle objectForInfoDictionaryKey:@"CFBundleVersion"], + @"Copyright": [bundle objectForInfoDictionaryKey:@"NSHumanReadableCopyright"], + @"Credits": credits}; + dispatch_async(dispatch_get_main_queue(), ^{ + [NSApp orderFrontStandardAboutPanelWithOptions:infoPaneDict]; + }); +} + +void ConfDlgProc() +{ + RunOnMainThreadSync(^{ + NSWindow *window; + + if (windowController == nil) { + windowController = [[PluginConfigController alloc] initWithWindowNibName:@"DFCdromPluginConfig"]; + } + window = [windowController window]; + + [windowController loadValues]; + + [window center]; + [window makeKeyAndOrderFront:nil]; + }); +} + +void ReadConfig() +{ + NSDictionary *keyValues; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults registerDefaults:@{PrefsKey: @{@"Threaded": @YES, + @"Cache Size": @64, + @"Speed": @0}}]; + + keyValues = [defaults dictionaryForKey:PrefsKey]; + + ReadMode = ([keyValues[@"Threaded"] boolValue] ? THREADED : NORMAL); + CacheSize = [keyValues[@"Cache Size"] intValue]; + CdrSpeed = [keyValues[@"Speed"] integerValue]; +} + +@implementation PluginConfigController +@synthesize keyValues; +@synthesize CdSpeed; + +- (IBAction)cancel:(id)sender +{ + self.keyValues = nil; + [self close]; +} + +- (IBAction)ok:(id)sender +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + NSMutableDictionary *writeDic = [self.keyValues mutableCopy]; + + writeDic[@"Threaded"] = ([self.Cached intValue] ? @YES : @NO); + writeDic[@"Cache Size"] = @([self.CacheSize integerValue]); + + switch ([self.CdSpeed indexOfSelectedItem]) { + case 1: writeDic[@"Speed"] = @1; break; + case 2: writeDic[@"Speed"] = @2; break; + case 3: writeDic[@"Speed"] = @4; break; + case 4: writeDic[@"Speed"] = @8; break; + case 5: writeDic[@"Speed"] = @16; break; + case 6: writeDic[@"Speed"] = @32; break; + default: writeDic[@"Speed"] = @0; break; + } + + // write to defaults + [defaults setObject:writeDic forKey:PrefsKey]; + [defaults synchronize]; + + // and set global values accordingly + ReadConfig(); + + self.keyValues = nil; + [self close]; +} + +- (void)loadValues +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + ReadConfig(); + + // load from preferences + self.keyValues = [[NSMutableDictionary alloc] initWithDictionary:[defaults dictionaryForKey:PrefsKey]]; + + [self.Cached setIntValue:[keyValues[@"Threaded"] intValue]]; + [self.CacheSize setIntegerValue:[keyValues[@"Cache Size"] integerValue]]; + + switch ([keyValues[@"Speed"] intValue]) { + case 1: [CdSpeed selectItemAtIndex:1]; break; + case 2: [CdSpeed selectItemAtIndex:2]; break; + case 4: [CdSpeed selectItemAtIndex:3]; break; + case 8: [CdSpeed selectItemAtIndex:4]; break; + case 16: [CdSpeed selectItemAtIndex:5]; break; + case 32: [CdSpeed selectItemAtIndex:6]; break; + default: [CdSpeed selectItemAtIndex:0]; break; + } +} + +- (void)awakeFromNib +{ +} + +@end + +#import "OSXPlugLocalization.h" +PLUGLOCIMP([PluginConfigController class]) diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/version.plist pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/version.plist --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/version.plist 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/version.plist 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,16 @@ + + + + + BuildVersion + 38 + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + ProjectName + DFCdrom + SourceVersion + 2350000 + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/zh-Hans.lproj/Credits.rtf pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/zh-Hans.lproj/Credits.rtf --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/zh-Hans.lproj/Credits.rtf 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/zh-Hans.lproj/Credits.rtf 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,22 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset134 STHeitiSC-Light;} +{\colortbl;\red255\green255\blue255;} +\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural + +\f0\b\fs24 \cf0 Original coder: +\b0 \ + linuzappz\ +\ + +\b Macintosh Port: +\b0 \ + Wei Mingzhi\ + C.W. \'93Madd the Sane\'94 Betts\ +\ + +\b Chinese Translation( +\f1 \'d6\'d0\'ce\'c4\'b7\'ad\'d2\'eb +\f0 ): +\b0 \ + Sdchun} \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/zh-Hans.lproj/DFCdromPluginConfig.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/zh-Hans.lproj/DFCdromPluginConfig.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFCdrom/zh-Hans.lproj/DFCdromPluginConfig.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFCdrom/zh-Hans.lproj/DFCdromPluginConfig.strings 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,48 @@ + +/* Class = "NSWindow"; title = "光驱配置"; ObjectID = "5"; */ +"5.title" = "光驱配置"; + +/* Class = "NSBox"; title = "常规设置"; ObjectID = "162"; */ +"162.title" = "常规设置"; + +/* Class = "NSBox"; title = "杂项"; ObjectID = "164"; */ +"164.title" = "杂项"; + +/* Class = "NSMenu"; title = "查看其他"; ObjectID = "174"; */ +"174.title" = "查看其他"; + +/* Class = "NSMenuItem"; title = "2 X"; ObjectID = "175"; */ +"175.title" = "2 X"; + +/* Class = "NSMenuItem"; title = "预设值"; ObjectID = "176"; */ +"176.title" = "预设值"; + +/* Class = "NSMenuItem"; title = "1 X"; ObjectID = "177"; */ +"177.title" = "1 X"; + +/* Class = "NSMenuItem"; title = "8 X"; ObjectID = "178"; */ +"178.title" = "8 X"; + +/* Class = "NSMenuItem"; title = "4 X"; ObjectID = "179"; */ +"179.title" = "4 X"; + +/* Class = "NSMenuItem"; title = "16 X"; ObjectID = "180"; */ +"180.title" = "16 X"; + +/* Class = "NSMenuItem"; title = "32 X"; ObjectID = "181"; */ +"181.title" = "32 X"; + +/* Class = "NSButtonCell"; title = "读取缓存"; ObjectID = "189"; */ +"189.title" = "读取缓存"; + +/* Class = "NSButtonCell"; title = "确认"; ObjectID = "243"; */ +"243.title" = "确认"; + +/* Class = "NSButtonCell"; title = "取消"; ObjectID = "251"; */ +"251.title" = "取消"; + +/* Class = "NSTextFieldCell"; title = "光驱速率:"; ObjectID = "267"; */ +"267.title" = "光驱速率:"; + +/* Class = "NSTextFieldCell"; title = "高速缓存大小:"; ObjectID = "MSf-Ad-auA"; */ +"MSf-Ad-auA.title" = "高速缓存大小:"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/Base.lproj/NetPcsxrHIDInputPluginMain.xib pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/Base.lproj/NetPcsxrHIDInputPluginMain.xib --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/Base.lproj/NetPcsxrHIDInputPluginMain.xib 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/Base.lproj/NetPcsxrHIDInputPluginMain.xib 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,290 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/en.lproj/Credits.rtf pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/en.lproj/Credits.rtf --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/en.lproj/Credits.rtf 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/en.lproj/Credits.rtf 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,17 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\vieww9000\viewh9000\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural + +\f0\b\fs24 \cf0 Macintosh Port: +\b0 \ + Wei Mingzhi\ + Gil Pedersen\ + Nicolas P\'e9pin-Perreault\ + C.W. \'93Madd the Sane\'94 Betts\ +\ + +\b Original coder: +\b0 \ + Wei Mingzhi} \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/en.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/en.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/en.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/en.lproj/InfoPlist.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,6 @@ +/* Localized versions of Info.plist keys */ + +CFBundleName = "DFInput PSX Controller Plugin"; +CFBundleShortVersionString = "DFInput version 1.5"; +CFBundleGetInfoString = "DFInput PSX Controller Plugin version 1.5, Copyright © 2009 Wei Mingzhi."; +NSHumanReadableCopyright = "Copyright © 2009 Wei Mingzhi."; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/en.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/en.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/en.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/en.lproj/Localizable.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,61 @@ +/* + Localizable.strings + DFInput + + Created by C.W. Betts on 11/16/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"Gamepad/Keyboard/Mouse Input" = "Gamepad/Keyboard/Mouse Input"; +"Joystick: Button %d" = "Joystick: Button %d"; +"Joystick: Axis %d%c" = "Joystick: Axis %d%c"; +"Joystick: Hat %d %s" = "Joystick: Hat %d %s"; +"Keyboard: %s" = "Keyboard: %s"; + +"(Keyboard only)" = "(Keyboard only)"; +"(Not Set)" = "(Not Set)"; + +"D-Pad Up" = "D-Pad Up"; +"D-Pad Down" = "D-Pad Down"; +"D-Pad Left" = "D-Pad Left"; +"D-Pad Right" = "D-Pad Right"; +"Cross" = "Cross"; +"Circle" = "Circle"; +"Square" = "Square"; +"Triangle" = "Triangle"; +"L1" = "L1"; +"R1" = "R1"; +"L2" = "L2"; +"R2" = "R2"; +"Select" = "Select"; +"Start" = "Start"; +"L3" = "L3"; +"R3" = "R3"; +"Analog" = "Analog"; +"L-Stick Right" = "L-Stick Right"; +"L-Stick Left" = "L-Stick Left"; +"L-Stick Down" = "L-Stick Down"; +"L-Stick Up" = "L-Stick Up"; +"R-Stick Right" = "R-Stick Right"; +"R-Stick Left" = "R-Stick Left"; +"R-Stick Down" = "R-Stick Down"; +"R-Stick Up" = "R-Stick Up"; + +// Game Controller names +"Left Bumper" = "Left Bumper"; +"Right Bumper" = "Right Bumper"; +"Left Trigger" = "Left Trigger"; +"Right Trigger" = "Right Trigger"; +"Guide" = "Guide"; +"Back" = "Back"; + +// Unused right now +"Centered" = "Centered"; +"Up" = "Up"; +"Right" = "Right"; +"Rightup" = "Right-up"; +"Down" = "Down"; +"Rightdown" = "Right-down"; +"Left" = "Left"; +"Leftup" = "Left-up"; +"Leftdown" = "Left-down"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/en.lproj/NetPcsxrHIDInputPluginMain.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/en.lproj/NetPcsxrHIDInputPluginMain.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/en.lproj/NetPcsxrHIDInputPluginMain.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/en.lproj/NetPcsxrHIDInputPluginMain.strings 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,54 @@ + +/* Class = "NSWindow"; title = "Input Configuration"; ObjectID = "5"; */ +"5.title" = "Input Configuration"; + +/* Class = "NSTabViewItem"; label = "Controller 2"; ObjectID = "8"; */ +"8.label" = "Controller 2"; + +/* Class = "NSTabViewItem"; label = "Controller 1"; ObjectID = "9"; */ +"9.label" = "Controller 1"; + +/* Class = "NSTableColumn"; headerCell.title = "Button"; ObjectID = "124"; */ +"124.headerCell.title" = "Button"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "127"; */ +"127.title" = "OtherViews"; + +/* Class = "NSTableColumn"; headerCell.title = "Key"; ObjectID = "128"; */ +"128.headerCell.title" = "Key"; + +/* Class = "NSMenuItem"; title = "Digital Pad"; ObjectID = "130"; */ +"130.title" = "Digital Pad"; + +/* Class = "NSTextFieldCell"; placeholderString = "Double-Click to Set"; ObjectID = "166"; */ +"166.placeholderString" = "Double-Click to Set"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "190"; */ +"190.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "(Keyboard only)"; ObjectID = "192"; */ +"192.title" = "(Keyboard only)"; + +/* Class = "NSMenuItem"; title = "Analog Pad"; ObjectID = "198"; */ +"198.title" = "Analog Pad"; + +/* Class = "NSTextFieldCell"; title = "Type:"; ObjectID = "205"; */ +"205.title" = "Type:"; + +/* Class = "NSTextFieldCell"; title = "To reset an entry: Select it and press the delete '←' key"; ObjectID = "206"; */ +"206.title" = "To reset an entry: Select it and press the delete '←' key"; + +/* Class = "NSTextFieldCell"; title = "Device:"; ObjectID = "208"; */ +"208.title" = "Device:"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "257"; */ +"257.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "262"; */ +"262.title" = "Cancel"; + +/* Class = "NSButtonCell"; title = "Use Game Controller API"; ObjectID = "XyD-IN-gbq"; */ +"XyD-IN-gbq.title" = "Use Game Controller API"; + +/* Class = "NSButton"; ibShadowedToolTip = "Uses the SDL2 Game Controller API to automatically map buttons"; ObjectID = "e1h-QZ-6Ge"; */ +"e1h-QZ-6Ge.ibShadowedToolTip" = "Uses the SDL2 Game Controller API to automatically map buttons"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/fr.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/fr.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/fr.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/fr.lproj/Localizable.strings 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,61 @@ +/* + Localizable.strings + DFInput + + Created by C.W. Betts on 11/16/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"Gamepad/Keyboard/Mouse Input" = "Entrées clavier/manette"; +"Joystick: Button %d" = "Joystick : Bouton %d"; +"Joystick: Axis %d%c" = "Joystick: Axe %d%c"; +"Joystick: Hat %d %s" = "Joystick: Tête %d %s"; +"Keyboard: %s" = "Clavier : %s"; + +"(Keyboard only)" = "(Keyboard only)"; +"(Not Set)" = "(Non défini)"; + +"D-Pad Up" = "Pavé directionnel Haut"; +"D-Pad Down" = "Pavé directionnel Bas"; +"D-Pad Left" = "Pavé directionnel Gauche"; +"D-Pad Right" = "Pavé directionnel Droite"; +"Cross" = "Croix"; +"Circle" = "Rond"; +"Square" = "Carré"; +"Triangle" = "Triangle"; +"L1" = "L1"; +"R1" = "R1"; +"L2" = "L2"; +"R2" = "R2"; +"Select" = "Select"; +"Start" = "Start"; +"L3" = "L3"; +"R3" = "R3"; +//"Analog" = "Analog"; // Not translated +"L-Stick Right" = "L-Stick Droite"; +"L-Stick Left" = "L-Stick Gauche"; +"L-Stick Down" = "L-Stick Bas"; +"L-Stick Up" = "L-Stick Haut"; +"R-Stick Right" = "R-Stick Droite"; +"R-Stick Left" = "R-Stick Gauche"; +"R-Stick Down" = "R-Stick Bas"; +"R-Stick Up" = "R-Stick Haut"; + +// Game Controller names +//"Left Bumper" = "Left Bumper"; +//"Right Bumper" = "Right Bumper"; +//"Left Trigger" = "Left Trigger"; +//"Right Trigger" = "Right Trigger"; +//"Guide" = "Guide"; +//"Back" = "Back"; + +// Unused right now +"Centered" = "Centré"; +"Up" = "Haut"; +"Right" = "Droite"; +"Rightup" = "Droite-haut"; +"Down" = "Bas"; +"Rightdown" = "Droite-bas"; +"Left" = "Gauche"; +"Leftup" = "Gauche-haut"; +"Leftdown" = "Gauche-bas"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/fr.lproj/NetPcsxrHIDInputPluginMain.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/fr.lproj/NetPcsxrHIDInputPluginMain.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/fr.lproj/NetPcsxrHIDInputPluginMain.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/fr.lproj/NetPcsxrHIDInputPluginMain.strings 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,54 @@ + +/* Class = "NSWindow"; title = "Input Configuration"; ObjectID = "5"; */ +"5.title" = "Input Configuration"; + +/* Class = "NSTabViewItem"; label = "Controller 2"; ObjectID = "8"; */ +"8.label" = "Controller 2"; + +/* Class = "NSTabViewItem"; label = "Controller 1"; ObjectID = "9"; */ +"9.label" = "Controller 1"; + +/* Class = "NSTableColumn"; headerCell.title = "Button"; ObjectID = "124"; */ +"124.headerCell.title" = "Button"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "127"; */ +"127.title" = "OtherViews"; + +/* Class = "NSTableColumn"; headerCell.title = "Key"; ObjectID = "128"; */ +"128.headerCell.title" = "Key"; + +/* Class = "NSMenuItem"; title = "Digital Pad"; ObjectID = "130"; */ +"130.title" = "Digital Pad"; + +/* Class = "NSTextFieldCell"; placeholderString = "Double-Click to Set"; ObjectID = "166"; */ +"166.placeholderString" = "Double-Click to Set"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "190"; */ +"190.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "(Keyboard only)"; ObjectID = "192"; */ +"192.title" = "(Keyboard only)"; + +/* Class = "NSMenuItem"; title = "Analog Pad"; ObjectID = "198"; */ +"198.title" = "Analog Pad"; + +/* Class = "NSTextFieldCell"; title = "Type:"; ObjectID = "205"; */ +"205.title" = "Type:"; + +/* Class = "NSTextFieldCell"; title = "To reset an entry: Select it and press the delete '←' key"; ObjectID = "206"; */ +"206.title" = "To reset an entry: Select it and press the delete '←' key"; + +/* Class = "NSTextFieldCell"; title = "Device:"; ObjectID = "208"; */ +"208.title" = "Device:"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "257"; */ +"257.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "262"; */ +"262.title" = "Cancel"; + +/* Class = "NSButtonCell"; title = "Use Game Controller API"; ObjectID = "XyD-IN-gbq"; */ +//"XyD-IN-gbq.title" = "Use Game Controller API"; + +/* Class = "NSButton"; ibShadowedToolTip = "Uses the SDL2 Game Controller API to automatically map buttons"; ObjectID = "e1h-QZ-6Ge"; */ +//"e1h-QZ-6Ge.ibShadowedToolTip" = "Uses the SDL2 Game Controller API to automatically map buttons"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/hu.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/hu.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/hu.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/hu.lproj/Localizable.strings 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,63 @@ +/* + Localizable.strings + DFInput + + Created by C.W. Betts on 11/16/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"Gamepad/Keyboard/Mouse Input" = "Játékirányító/Billentyűzet bemenet"; +"Joystick: Button %d" = "Joystick: %d gomb"; +"Joystick: Axis %d%c" = "Joystick: %d%c irány"; +"Joystick: Hat %d %s" = "Joystick: %d %s hat"; +"Keyboard: %s" = "Billentyűzet: %s"; + +//"(Keyboard only)" = "(Keyboard only)"; +"(Not Set)" = "(Nincs beállítva)"; + +"D-Pad Up" = "Digitális FEL"; +"D-Pad Down" = "Digitális LE"; +"D-Pad Left" = "Digitális BALRA"; +"D-Pad Right" = "Digitális JOBBRA"; +"Cross" = "KERESZT"; +"Circle" = "KÖR"; +"Square" = "NÉGYSZÖG"; +"Triangle" = "HÁROMSZÖG"; +"L1" = "L1"; +"R1" = "R1"; +"L2" = "L2"; +"R2" = "R2"; +"Select" = "Select"; +"Start" = "Start"; +"L3" = "L3"; +"R3" = "R3"; +"Analog" = "Analóg irányító"; +"L-Stick Right" = "Bal kar jobbra"; +"L-Stick Left" = "Bal kar balra"; +"L-Stick Down" = "Bal kar le"; +"L-Stick Up" = "Bal kar fel"; +"R-Stick Right" = "Jobb kar jobbra"; +"R-Stick Left" = "Jobb kar balra"; +"R-Stick Down" = "Jobb kar le"; +"R-Stick Up" = "Jobb kar fel"; + +// Game Controller names +//"Left Bumper" = "Left Bumper"; +//"Right Bumper" = "Right Bumper"; +//"Left Trigger" = "Left Trigger"; +//"Right Trigger" = "Right Trigger"; +//"Guide" = "Guide"; +//"Back" = "Back"; + +// Unused right now +"Centered" = "Középen"; +"Up" = "Fel"; +"Right" = "Jobbra"; +"Rightup" = "Jobbra fel"; +"Down" = "Le"; +"Rightdown" = "Jobbra le"; +"Left" = "Balra"; +"Leftup" = "Balra fel"; +"Leftdown" = "Balra le"; + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/hu.lproj/NetPcsxrHIDInputPluginMain.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/hu.lproj/NetPcsxrHIDInputPluginMain.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/hu.lproj/NetPcsxrHIDInputPluginMain.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/hu.lproj/NetPcsxrHIDInputPluginMain.strings 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,54 @@ + +/* Class = "NSWindow"; title = "Input Configuration"; ObjectID = "5"; */ +"5.title" = "Input Configuration"; + +/* Class = "NSTabViewItem"; label = "Controller 2"; ObjectID = "8"; */ +"8.label" = "Controller 2"; + +/* Class = "NSTabViewItem"; label = "Controller 1"; ObjectID = "9"; */ +"9.label" = "Controller 1"; + +/* Class = "NSTableColumn"; headerCell.title = "Button"; ObjectID = "124"; */ +"124.headerCell.title" = "Button"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "127"; */ +"127.title" = "OtherViews"; + +/* Class = "NSTableColumn"; headerCell.title = "Key"; ObjectID = "128"; */ +"128.headerCell.title" = "Key"; + +/* Class = "NSMenuItem"; title = "Digital Pad"; ObjectID = "130"; */ +"130.title" = "Digital Pad"; + +/* Class = "NSTextFieldCell"; placeholderString = "Double-Click to Set"; ObjectID = "166"; */ +"166.placeholderString" = "Double-Click to Set"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "190"; */ +"190.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "(Keyboard only)"; ObjectID = "192"; */ +"192.title" = "(Keyboard only)"; + +/* Class = "NSMenuItem"; title = "Analog Pad"; ObjectID = "198"; */ +"198.title" = "Analog Pad"; + +/* Class = "NSTextFieldCell"; title = "Type:"; ObjectID = "205"; */ +"205.title" = "Type:"; + +/* Class = "NSTextFieldCell"; title = "To reset an entry: Select it and press the delete '←' key"; ObjectID = "206"; */ +"206.title" = "To reset an entry: Select it and press the delete '←' key"; + +/* Class = "NSTextFieldCell"; title = "Device:"; ObjectID = "208"; */ +"208.title" = "Device:"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "257"; */ +"257.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "262"; */ +"262.title" = "Cancel"; + +/* Class = "NSButtonCell"; title = "Use Game Controller API"; ObjectID = "XyD-IN-gbq"; */ +//"XyD-IN-gbq.title" = "Use Game Controller API"; + +/* Class = "NSButton"; ibShadowedToolTip = "Uses the SDL2 Game Controller API to automatically map buttons"; ObjectID = "e1h-QZ-6Ge"; */ +//"e1h-QZ-6Ge.ibShadowedToolTip" = "Uses the SDL2 Game Controller API to automatically map buttons"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/Info.plist pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/Info.plist --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/Info.plist 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/Info.plist 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,26 @@ + + + + + CFBundleAllowMixedLocalizations + + CFBundleDevelopmentRegion + en_US + CFBundleExecutable + DFInput + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + PsxP + CFBundleSignature + DFI + CFBundleVersion + 1.5 + NSPrincipalClass + NetPcsxrHIDInputPluginPadController + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/cfg.c pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/cfg.c --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/cfg.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/cfg.c 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,457 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "pad.h" +#include "cfg.h" + +GLOBALDATA g; + +long DoConfiguration(); +void DoAbout(); + +long PADconfigure(void) { + if (SDL_WasInit(SDL_INIT_JOYSTICK)) + return PSE_ERR_FATAL; // cannot change settings on the fly + + DoConfiguration(); + //LoadPADConfig(); + return PSE_ERR_SUCCESS; +} + +void PADabout(void) { + DoAbout(); +} + +struct { + uint16_t code; + const char *desc; +} KeyString[] = { + { kVK_ANSI_A + 1, "A" }, + { kVK_ANSI_B + 1, "B" }, + { kVK_ANSI_C + 1, "C" }, + { kVK_ANSI_D + 1, "D" }, + { kVK_ANSI_E + 1, "E" }, + { kVK_ANSI_F + 1, "F" }, + { kVK_ANSI_G + 1, "G" }, + { kVK_ANSI_H + 1, "H" }, + { kVK_ANSI_I + 1, "I" }, + { kVK_ANSI_J + 1, "J" }, + { kVK_ANSI_K + 1, "K" }, + { kVK_ANSI_L + 1, "L" }, + { kVK_ANSI_M + 1, "M" }, + { kVK_ANSI_N + 1, "N" }, + { kVK_ANSI_O + 1, "O" }, + { kVK_ANSI_P + 1, "P" }, + { kVK_ANSI_Q + 1, "Q" }, + { kVK_ANSI_R + 1, "R" }, + { kVK_ANSI_S + 1, "S" }, + { kVK_ANSI_T + 1, "T" }, + { kVK_ANSI_U + 1, "U" }, + { kVK_ANSI_V + 1, "V" }, + { kVK_ANSI_W + 1, "W" }, + { kVK_ANSI_X + 1, "X" }, + { kVK_ANSI_Y + 1, "Y" }, + { kVK_ANSI_Z + 1, "Z" }, + { kVK_ANSI_LeftBracket + 1, "[" }, + { kVK_ANSI_RightBracket + 1, "]" }, + { kVK_ANSI_Semicolon + 1, ";" }, + { kVK_ANSI_Quote + 1, "'" }, + { kVK_ANSI_Comma + 1, "," }, + { kVK_ANSI_Period + 1, "." }, + { kVK_ANSI_Slash + 1, "/" }, + { kVK_ANSI_Grave + 1, "`" }, + { kVK_ANSI_1 + 1, "1" }, + { kVK_ANSI_2 + 1, "2" }, + { kVK_ANSI_3 + 1, "3" }, + { kVK_ANSI_4 + 1, "4" }, + { kVK_ANSI_5 + 1, "5" }, + { kVK_ANSI_6 + 1, "6" }, + { kVK_ANSI_7 + 1, "7" }, + { kVK_ANSI_8 + 1, "8" }, + { kVK_ANSI_9 + 1, "9" }, + { kVK_ANSI_0 + 1, "0" }, + { kVK_ANSI_Minus + 1, "-" }, + { kVK_ANSI_Equal + 1, "=" }, + { kVK_ANSI_Backslash + 1, "\\" }, + { kVK_Tab + 1, "Tab" }, + { kVK_Shift + 1, "Shift" }, + { kVK_Option + 1, "Option" }, + { kVK_Control + 1, "Control" }, + { kVK_Command + 1, "Command" }, + { kVK_Space + 1, "Spacebar" }, + { kVK_Delete + 1, "Delete" }, + { kVK_Return + 1, "Return" }, + { kVK_UpArrow + 1, "Up" }, + { kVK_DownArrow + 1, "Down" }, + { kVK_LeftArrow + 1, "Left" }, + { kVK_RightArrow + 1, "Right" }, + { kVK_Help + 1, "Help" }, + { kVK_ForwardDelete + 1, "Forward Delete" }, + { kVK_Home + 1, "Home" }, + { kVK_End + 1, "End" }, + { kVK_PageUp + 1, "Page Up" }, + { kVK_PageDown + 1, "Page Down" }, + { kVK_ANSI_KeypadClear + 1, "Keypad Clear" }, + { kVK_ANSI_KeypadDivide + 1, "Keypad /" }, + { kVK_ANSI_KeypadMultiply + 1, "Keypad *" }, + { kVK_ANSI_KeypadMinus + 1, "Keypad -" }, + { kVK_ANSI_KeypadPlus + 1, "Keypad +" }, + { kVK_ANSI_KeypadEnter + 1, "Keypad Enter" }, + { kVK_ANSI_Keypad0 + 1, "Keypad 0" }, + { kVK_ANSI_Keypad1 + 1, "Keypad 1" }, + { kVK_ANSI_Keypad2 + 1, "Keypad 2" }, + { kVK_ANSI_Keypad3 + 1, "Keypad 3" }, + { kVK_ANSI_Keypad4 + 1, "Keypad 4" }, + { kVK_ANSI_Keypad5 + 1, "Keypad 5" }, + { kVK_ANSI_Keypad6 + 1, "Keypad 6" }, + { kVK_ANSI_Keypad7 + 1, "Keypad 7" }, + { kVK_ANSI_Keypad8 + 1, "Keypad 8" }, + { kVK_ANSI_Keypad9 + 1, "Keypad 9" }, + { kVK_ANSI_KeypadDecimal + 1, "Keypad ." }, + { kVK_F1 + 1, "F1" }, + { kVK_F2 + 1, "F2" }, + { kVK_F3 + 1, "F3" }, + { kVK_F4 + 1, "F4" }, + { kVK_F5 + 1, "F5" }, + { kVK_F6 + 1, "F6" }, + { kVK_F7 + 1, "F7" }, + { kVK_F8 + 1, "F8" }, + { kVK_F9 + 1, "F9" }, + { kVK_F10 + 1, "F10" }, + { kVK_F11 + 1, "F11" }, + { kVK_F12 + 1, "F12" }, + { kVK_F13 + 1, "F13" }, + { kVK_F14 + 1, "F14" }, + { kVK_F15 + 1, "F15" }, + { 0x00, NULL } +}; + +static const char *XKeysymToString(uint16_t key) { + static char buf[64]; + int i = 0; + + while (KeyString[i].code != 0) { + if (KeyString[i].code == key) { + strcpy(buf, KeyString[i].desc); + return buf; + } + i++; + } + + snprintf(buf, sizeof(buf), "0x%.2X", key); + return buf; +} + +static const char *hatname[16] = {"Centered", "Up", "Right", "Rightup", + "Down", "", "Rightdown", "", "Left", "Leftup", "", "", + "Leftdown", "", "", ""}; + +void GetKeyDescription(char *buf, int joynum, int key) +{ + switch (g.cfg.PadDef[joynum].KeyDef[key].JoyEvType) { + case BUTTON: + sprintf(buf, _("Joystick: Button %d"), g.cfg.PadDef[joynum].KeyDef[key].J.Button); + break; + + case AXIS: + sprintf(buf, _("Joystick: Axis %d%c"), abs(g.cfg.PadDef[joynum].KeyDef[key].J.Axis) - 1, + g.cfg.PadDef[joynum].KeyDef[key].J.Axis > 0 ? '+' : '-'); + break; + + case HAT: + sprintf(buf, _("Joystick: Hat %d %s"), (g.cfg.PadDef[joynum].KeyDef[key].J.Hat >> 8), + hatname[g.cfg.PadDef[joynum].KeyDef[key].J.Hat & 0x0F]); + break; + + case NONE: + default: + buf[0] = '\0'; + break; + } + + if (g.cfg.PadDef[joynum].KeyDef[key].Key != 0) { + if (buf[0] != '\0') { + strcat(buf, " / "); + } + char keyboardBuf[64] = {0}; + + snprintf(keyboardBuf, 63, _("Keyboard: %s"), XKeysymToString(g.cfg.PadDef[joynum].KeyDef[key].Key)); + strcat(buf, keyboardBuf); + } +} + +void GetKeyboardKeyDescription(char *buf, int joynum, int key) +{ + if (g.cfg.PadDef[joynum].KeyDef[key].Key != 0) { + sprintf(buf, _("Keyboard: %s"), XKeysymToString(g.cfg.PadDef[joynum].KeyDef[key].Key)); + } else { + buf[0] = '\0'; + } +} + +void GetKeyboardAnalogDescription(char *buf, int joynum, int analognum, int dir) +{ + if (g.cfg.PadDef[joynum].AnalogDef[analognum][dir].Key != 0) { + sprintf(buf, _("Keyboard: %s"), XKeysymToString(g.cfg.PadDef[joynum].AnalogDef[analognum][dir].Key)); + } else { + buf[0] = '\0'; + } +} + +void GetAnalogDescription(char *buf, int joynum, int analognum, int dir) +{ + switch (g.cfg.PadDef[joynum].AnalogDef[analognum][dir].JoyEvType) { + case BUTTON: + sprintf(buf, _("Joystick: Button %d"), g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Button); + break; + + case AXIS: + sprintf(buf, _("Joystick: Axis %d%c"), abs(g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Axis) - 1, + g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Axis > 0 ? '+' : '-'); + break; + + case HAT: + sprintf(buf, _("Joystick: Hat %d %s"), (g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Hat >> 8), + hatname[g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Hat & 0x0F]); + break; + + case NONE: + default: + buf[0] = '\0'; + break; + } + + if (g.cfg.PadDef[joynum].AnalogDef[analognum][dir].Key != 0) { + if (buf[0] != '\0') { + strcat(buf, " / "); + } + char keyboardBuf[64] = {0}; + + snprintf(keyboardBuf, 63, _("Keyboard: %s"), XKeysymToString(g.cfg.PadDef[joynum].AnalogDef[analognum][dir].Key)); + strcat(buf, keyboardBuf); + } +} + +int CheckKeyDown() { + KeyMap theKeys; + unsigned char *keybytes; + int i; + + GetKeys(theKeys); + keybytes = (unsigned char *) theKeys; + + for (i = 0; i < 128; i++) { + if (i == kVK_CapsLock) continue; // Ignore capslock + + if (keybytes[i >> 3] & (1 << (i & 7))) + return i + 1; + } + + return 0; +} + +static Sint16 InitialAxisPos[256], PrevAxisPos[256]; + +#define NUM_AXES(js) (SDL_JoystickNumAxes(js) > 256 ? 256 : SDL_JoystickNumAxes(js)) + +void InitAxisPos(int padnum) +{ + int i; + SDL_Joystick *js; + + if (g.cfg.PadDef[padnum].DevNum >= 0) { + js = SDL_JoystickOpen(g.cfg.PadDef[padnum].DevNum); + SDL_JoystickEventState(SDL_IGNORE); + } else return; + + SDL_JoystickUpdate(); + + for (i = 0; i < NUM_AXES(js); i++) { + InitialAxisPos[i] = PrevAxisPos[i] = SDL_JoystickGetAxis(js, i); + } + + SDL_JoystickClose(js); +} + +int ReadDKeyEvent(int padnum, int key) +{ + SDL_Joystick *js; + int i, changed = 0, t; + Sint16 axis; + + if (g.cfg.PadDef[padnum].DevNum >= 0) { + js = SDL_JoystickOpen(g.cfg.PadDef[padnum].DevNum); + SDL_JoystickEventState(SDL_IGNORE); + } else { + js = NULL; + } + + for (t = 0; t < 1000000 / 1000; t++) { + // check joystick events + if (js != NULL) { + SDL_JoystickUpdate(); + + for (i = 0; i < SDL_JoystickNumButtons(js); i++) { + if (SDL_JoystickGetButton(js, i)) { + g.cfg.PadDef[padnum].KeyDef[key].JoyEvType = BUTTON; + g.cfg.PadDef[padnum].KeyDef[key].J.Button = i; + changed = 1; + goto end; + } + } + + for (i = 0; i < NUM_AXES(js); i++) { + axis = SDL_JoystickGetAxis(js, i); + if (abs(axis) > 16383 && (abs(axis - PrevAxisPos[i]) > 4096 || abs(axis - InitialAxisPos[i]) > 4096)) { + g.cfg.PadDef[padnum].KeyDef[key].JoyEvType = AXIS; + g.cfg.PadDef[padnum].KeyDef[key].J.Axis = (i + 1) * (axis > 0 ? 1 : -1); + changed = 1; + goto end; + } + PrevAxisPos[i] = axis; + } + + for (i = 0; i < SDL_JoystickNumHats(js); i++) { + axis = SDL_JoystickGetHat(js, i); + if (axis != SDL_HAT_CENTERED) { + g.cfg.PadDef[padnum].KeyDef[key].JoyEvType = HAT; + + if (axis & SDL_HAT_UP) { + g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_UP); + } else if (axis & SDL_HAT_DOWN) { + g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_DOWN); + } else if (axis & SDL_HAT_LEFT) { + g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_LEFT); + } else if (axis & SDL_HAT_RIGHT) { + g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_RIGHT); + } + + changed = 1; + goto end; + } + } + } + + // check keyboard events + i = CheckKeyDown(); + if (i != 0) { + if (i != (kVK_Escape + 1)) g.cfg.PadDef[padnum].KeyDef[key].Key = i; + changed = 1; + goto end; + } + + // check mouse events + if (GetCurrentButtonState()) { + changed = 2; + goto end; + } + + usleep(1000); + } + +end: + if (js != NULL) { + SDL_JoystickClose(js); + } + + return changed; +} + +int ReadAnalogEvent(int padnum, int analognum, int analogdir) +{ + SDL_Joystick *js; + int i, changed = 0, t; + Sint16 axis; + + if (g.cfg.PadDef[padnum].DevNum >= 0) { + js = SDL_JoystickOpen(g.cfg.PadDef[padnum].DevNum); + SDL_JoystickEventState(SDL_IGNORE); + } else { + js = NULL; + } + + for (t = 0; t < 1000000 / 1000; t++) { + // check joystick events + if (js != NULL) { + SDL_JoystickUpdate(); + + for (i = 0; i < SDL_JoystickNumButtons(js); i++) { + if (SDL_JoystickGetButton(js, i)) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].JoyEvType = BUTTON; + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Button = i; + changed = 1; + goto end; + } + } + + for (i = 0; i < NUM_AXES(js); i++) { + axis = SDL_JoystickGetAxis(js, i); + if (abs(axis) > 16383 && (abs(axis - PrevAxisPos[i]) > 4096 || abs(axis - InitialAxisPos[i]) > 4096)) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].JoyEvType = AXIS; + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Axis = (i + 1) * (axis > 0 ? 1 : -1); + changed = 1; + goto end; + } + PrevAxisPos[i] = axis; + } + + for (i = 0; i < SDL_JoystickNumHats(js); i++) { + axis = SDL_JoystickGetHat(js, i); + if (axis != SDL_HAT_CENTERED) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].JoyEvType = HAT; + + if (axis & SDL_HAT_UP) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_UP); + } else if (axis & SDL_HAT_DOWN) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_DOWN); + } else if (axis & SDL_HAT_LEFT) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_LEFT); + } else if (axis & SDL_HAT_RIGHT) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_RIGHT); + } + + changed = 1; + goto end; + } + } + } + + // check keyboard events + i = CheckKeyDown(); + if (i != 0) { + if (i != (kVK_Escape + 1)) g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].Key = i; + changed = 1; + goto end; + } + + // check mouse events + if (GetCurrentButtonState()) { + changed = 2; + goto end; + } + + usleep(1000); + } + +end: + if (js != NULL) { + SDL_JoystickClose(js); + } + + return changed; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/cfg.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/cfg.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/cfg.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/cfg.h 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#ifndef CFG_H +#define CFG_H + +#include "pad.h" + +void GetKeyDescription(char *buf, int joynum, int key); +void GetAnalogDescription(char *buf, int joynum, int analognum, int dir); +void GetKeyboardKeyDescription(char *buf, int joynum, int key); +void GetKeyboardAnalogDescription(char *buf, int joynum, int analognum, int dir); +void InitAxisPos(int padnum); +int ReadDKeyEvent(int padnum, int key); +int ReadAnalogEvent(int padnum, int analognum, int analogdir); + +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/cfgHelper.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/cfgHelper.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/cfgHelper.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/cfgHelper.m 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,245 @@ +// +// cfgHelper.m +// Pcsxr +// +// Created by C.W. Betts on 8/28/13. +// +// + +#import +#import "PadController.h" +#include "cfg.h" + +#define padType @"Pad Type" +#define deviceNumber @"Device Number" +#define dfKey @"Key Value" +#define joyType @"Joystick Type" +#define joyVal @"Joystick Value" + +#define dSelect @"DKEY_SELECT" +#define dStart @"DKEY_START" +#define dUp @"DKEY_UP" +#define dRight @"DKEY_RIGHT" +#define dDown @"DKEY_DOWN" +#define dLeft @"DKEY_LEFT" +#define dL1 @"DKEY_L1" +#define dL2 @"DKEY_L2" +#define dL3 @"DKEY_L3" +#define dR1 @"DKEY_R1" +#define dR2 @"DKEY_R2" +#define dR3 @"DKEY_R3" +#define dTriangle @"DKEY_TRIANGLE" +#define dCircle @"DKEY_CIRCLE" +#define dCross @"DKEY_CROSS" +#define dSquare @"DKEY_SQUARE" +#define dAnalog @"DKEY_ANALOG" +#define dLeftAnalogXP @"LeftAnalogXP" +#define dLeftAnalogXM @"LeftAnalogXM" +#define dLeftAnalogYP @"LeftAnalogYP" +#define dLeftAnalogYM @"LeftAnalogYM" +#define dRightAnalogXP @"RightAnalogXP" +#define dRightAnalogXM @"RightAnalogXM" +#define dRightAnalogYP @"RightAnalogYP" +#define dRightAnalogYM @"RightAnalogYM" + +#define VibrateOn @"Visual Vibration" +#define UseSDL2Mapping @"SDL2 Mapping" + +NSDictionary *DefaultPadArray(int padnum) +{ + NSMutableDictionary *mutArray = + [NSMutableDictionary dictionaryWithDictionary:@{VibrateOn: @NO, + deviceNumber: @(padnum), + padType: @(PSE_PAD_TYPE_STANDARD), + dSelect: [NSMutableDictionary dictionaryWithObjectsAndKeys:@8, joyVal, @(BUTTON), joyType, nil], + dStart: [NSMutableDictionary dictionaryWithObjectsAndKeys:@9, joyVal, @(BUTTON), joyType, nil], + dUp: [NSMutableDictionary dictionaryWithObjectsAndKeys:@(-2), joyVal, @(AXIS), joyType, nil], + dRight: [NSMutableDictionary dictionaryWithObjectsAndKeys:@1, joyVal, @(AXIS), joyType, nil], + dDown: [NSMutableDictionary dictionaryWithObjectsAndKeys:@2, joyVal, @(AXIS), joyType, nil], + dLeft: [NSMutableDictionary dictionaryWithObjectsAndKeys:@(-1), joyVal, @(AXIS), joyType, nil], + dL2: [NSMutableDictionary dictionaryWithObjectsAndKeys:@4, joyVal, @(BUTTON), joyType, nil], + dL1: [NSMutableDictionary dictionaryWithObjectsAndKeys:@6, joyVal, @(BUTTON), joyType, nil], + dR2: [NSMutableDictionary dictionaryWithObjectsAndKeys:@5, joyVal, @(BUTTON), joyType, nil], + dR1: [NSMutableDictionary dictionaryWithObjectsAndKeys:@7, joyVal, @(BUTTON), joyType, nil], + dTriangle: [NSMutableDictionary dictionaryWithObjectsAndKeys:@0, joyVal, @(BUTTON), joyType, nil], + dCircle: [NSMutableDictionary dictionaryWithObjectsAndKeys:@1, joyVal, @(BUTTON), joyType, nil], + dCross: [NSMutableDictionary dictionaryWithObjectsAndKeys:@2, joyVal, @(BUTTON), joyType, nil], + dSquare: [NSMutableDictionary dictionaryWithObjectsAndKeys:@3, joyVal, @(BUTTON), joyType, nil], + UseSDL2Mapping: @YES}]; + if (padnum == 0) { + mutArray[dSelect][dfKey] = @9; + mutArray[dStart][dfKey] = @10; + mutArray[dUp][dfKey] = @127; + mutArray[dRight][dfKey] = @125; + mutArray[dDown][dfKey] = @126; + mutArray[dLeft][dfKey] = @124; + mutArray[dL2][dfKey] = @16; + mutArray[dR2][dfKey] = @18; + mutArray[dL1][dfKey] = @14; + mutArray[dR1][dfKey] = @15; + mutArray[dTriangle][dfKey] = @3; + mutArray[dCircle][dfKey] = @8; + mutArray[dCross][dfKey] = @7; + mutArray[dSquare][dfKey] = @2; + mutArray[dAnalog] = @{dfKey: @12}; + } + return [NSDictionary dictionaryWithDictionary:mutArray]; +} + +static NSDictionary *DictionaryFromButtonDef(KEYDEF theKey) +{ + NSMutableDictionary *mutDict = [NSMutableDictionary dictionaryWithCapacity:3]; + if (theKey.Key) { + mutDict[dfKey] = @(theKey.Key); + } + if (theKey.JoyEvType != NONE) { + mutDict[joyType] = @(theKey.JoyEvType); + switch (theKey.JoyEvType) { + case BUTTON: + mutDict[joyVal] = @(theKey.J.Button); + break; + + case HAT: + mutDict[joyVal] = @(theKey.J.Hat); + break; + + case AXIS: + mutDict[joyVal] = @(theKey.J.Axis); + break; + + case NONE: + default: + //[mutDict setObject:@(theKey.J.d) forKey:joyVal]; + [mutDict removeObjectForKey:joyType]; + break; + } + } + return [NSDictionary dictionaryWithDictionary:mutDict]; +} + +static void SetKeyFromDictionary(NSDictionary *inDict, KEYDEF *outDef) +{ + assert(outDef != NULL); + if (!inDict) { + return; + } + NSNumber *theJoyType = inDict[joyType]; + if (theJoyType) { + NSNumber *theJoyVal = inDict[joyVal]; + outDef->JoyEvType = [theJoyType unsignedCharValue]; + switch (outDef->JoyEvType) { + case BUTTON: + outDef->J.Button = [theJoyVal unsignedShortValue]; + break; + + case HAT: + outDef->J.Hat = [theJoyVal unsignedShortValue]; + break; + + case AXIS: + outDef->J.Axis = [theJoyVal shortValue]; + break; + + default: + break; + } + } + NSNumber *keyVal = inDict[dfKey]; + if (keyVal) { + outDef->Key = [keyVal unsignedShortValue]; + } +} + +void LoadPadArray(int padnum, NSDictionary *nsPrefs) +{ + PADDEF *curDef = &g.cfg.PadDef[padnum]; + curDef->DevNum = [nsPrefs[deviceNumber] charValue]; + curDef->Type = [nsPrefs[padType] unsignedShortValue]; + curDef->VisualVibration = [nsPrefs[VibrateOn] boolValue]; //Not implemented on OS X right now. + curDef->UseSDL2 = [nsPrefs[UseSDL2Mapping] boolValue]; + + //Analog buttons + SetKeyFromDictionary(nsPrefs[dL3], &curDef->KeyDef[DKEY_L3]); + SetKeyFromDictionary(nsPrefs[dR3], &curDef->KeyDef[DKEY_R3]); + SetKeyFromDictionary(nsPrefs[dAnalog], &curDef->KeyDef[DKEY_ANALOG]); + + //Analog sticks + SetKeyFromDictionary(nsPrefs[dLeftAnalogXP], &curDef->AnalogDef[ANALOG_LEFT][ANALOG_XP]); + SetKeyFromDictionary(nsPrefs[dLeftAnalogXM], &curDef->AnalogDef[ANALOG_LEFT][ANALOG_XM]); + SetKeyFromDictionary(nsPrefs[dLeftAnalogYP], &curDef->AnalogDef[ANALOG_LEFT][ANALOG_YP]); + SetKeyFromDictionary(nsPrefs[dLeftAnalogYM], &curDef->AnalogDef[ANALOG_LEFT][ANALOG_YM]); + + SetKeyFromDictionary(nsPrefs[dRightAnalogXP], &curDef->AnalogDef[ANALOG_RIGHT][ANALOG_XP]); + SetKeyFromDictionary(nsPrefs[dRightAnalogXM], &curDef->AnalogDef[ANALOG_RIGHT][ANALOG_XM]); + SetKeyFromDictionary(nsPrefs[dRightAnalogYP], &curDef->AnalogDef[ANALOG_RIGHT][ANALOG_YP]); + SetKeyFromDictionary(nsPrefs[dRightAnalogYM], &curDef->AnalogDef[ANALOG_RIGHT][ANALOG_YM]); + + //Digital shouldurs + SetKeyFromDictionary(nsPrefs[dL1], &curDef->KeyDef[DKEY_L1]); + SetKeyFromDictionary(nsPrefs[dL2], &curDef->KeyDef[DKEY_L2]); + SetKeyFromDictionary(nsPrefs[dR1], &curDef->KeyDef[DKEY_R1]); + SetKeyFromDictionary(nsPrefs[dR2], &curDef->KeyDef[DKEY_R2]); + + //Digital buttons + SetKeyFromDictionary(nsPrefs[dSelect], &curDef->KeyDef[DKEY_SELECT]); + SetKeyFromDictionary(nsPrefs[dStart], &curDef->KeyDef[DKEY_START]); + SetKeyFromDictionary(nsPrefs[dUp], &curDef->KeyDef[DKEY_UP]); + SetKeyFromDictionary(nsPrefs[dRight], &curDef->KeyDef[DKEY_RIGHT]); + SetKeyFromDictionary(nsPrefs[dDown], &curDef->KeyDef[DKEY_DOWN]); + SetKeyFromDictionary(nsPrefs[dLeft], &curDef->KeyDef[DKEY_LEFT]); + SetKeyFromDictionary(nsPrefs[dTriangle], &curDef->KeyDef[DKEY_TRIANGLE]); + SetKeyFromDictionary(nsPrefs[dCircle], &curDef->KeyDef[DKEY_CIRCLE]); + SetKeyFromDictionary(nsPrefs[dCross], &curDef->KeyDef[DKEY_CROSS]); + SetKeyFromDictionary(nsPrefs[dSquare], &curDef->KeyDef[DKEY_SQUARE]); +} + +NSDictionary *SavePadArray(int padnum) +{ + NSMutableDictionary *mutArray = [[NSMutableDictionary alloc] init]; + PADDEF *curDef = &g.cfg.PadDef[padnum]; + mutArray[deviceNumber] = @(curDef->DevNum); + mutArray[padType] = @(curDef->Type); + mutArray[VibrateOn] = curDef->VisualVibration ? @YES : @NO; + + switch (curDef->Type) { + case PSE_PAD_TYPE_ANALOGPAD: + mutArray[dL3] = DictionaryFromButtonDef(curDef->KeyDef[DKEY_L3]); + mutArray[dR3] = DictionaryFromButtonDef(curDef->KeyDef[DKEY_R3]); + mutArray[dAnalog] = DictionaryFromButtonDef(curDef->KeyDef[DKEY_ANALOG]); + + mutArray[dLeftAnalogXP] = DictionaryFromButtonDef(curDef->AnalogDef[ANALOG_LEFT][ANALOG_XP]); + mutArray[dLeftAnalogXM] = DictionaryFromButtonDef(curDef->AnalogDef[ANALOG_LEFT][ANALOG_XM]); + mutArray[dLeftAnalogYP] = DictionaryFromButtonDef(curDef->AnalogDef[ANALOG_LEFT][ANALOG_YP]); + mutArray[dLeftAnalogYM] = DictionaryFromButtonDef(curDef->AnalogDef[ANALOG_LEFT][ANALOG_YM]); + + mutArray[dRightAnalogXP] = DictionaryFromButtonDef(curDef->AnalogDef[ANALOG_RIGHT][ANALOG_XP]); + mutArray[dRightAnalogXM] = DictionaryFromButtonDef(curDef->AnalogDef[ANALOG_RIGHT][ANALOG_XM]); + mutArray[dRightAnalogYP] = DictionaryFromButtonDef(curDef->AnalogDef[ANALOG_RIGHT][ANALOG_YP]); + mutArray[dRightAnalogYM] = DictionaryFromButtonDef(curDef->AnalogDef[ANALOG_RIGHT][ANALOG_YM]); + //Fall through + + case PSE_PAD_TYPE_STANDARD: + mutArray[dL1] = DictionaryFromButtonDef(curDef->KeyDef[DKEY_L1]); + mutArray[dL2] = DictionaryFromButtonDef(curDef->KeyDef[DKEY_L2]); + mutArray[dR1] = DictionaryFromButtonDef(curDef->KeyDef[DKEY_R1]); + mutArray[dR2] = DictionaryFromButtonDef(curDef->KeyDef[DKEY_R2]); + + mutArray[dSelect] = DictionaryFromButtonDef(curDef->KeyDef[DKEY_SELECT]); + mutArray[dStart] = DictionaryFromButtonDef(curDef->KeyDef[DKEY_START]); + mutArray[dUp] = DictionaryFromButtonDef(curDef->KeyDef[DKEY_UP]); + mutArray[dRight] = DictionaryFromButtonDef(curDef->KeyDef[DKEY_RIGHT]); + mutArray[dDown] = DictionaryFromButtonDef(curDef->KeyDef[DKEY_DOWN]); + mutArray[dLeft] = DictionaryFromButtonDef(curDef->KeyDef[DKEY_LEFT]); + mutArray[dTriangle] = DictionaryFromButtonDef(curDef->KeyDef[DKEY_TRIANGLE]); + mutArray[dCircle] = DictionaryFromButtonDef(curDef->KeyDef[DKEY_CIRCLE]); + mutArray[dCross] = DictionaryFromButtonDef(curDef->KeyDef[DKEY_CROSS]); + mutArray[dSquare] = DictionaryFromButtonDef(curDef->KeyDef[DKEY_SQUARE]); + mutArray[UseSDL2Mapping] = @((BOOL)curDef->UseSDL2); + break; + + default: + break; + } + + return [NSDictionary dictionaryWithDictionary:mutArray]; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/ControllerList.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/ControllerList.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/ControllerList.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/ControllerList.h 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on HIDInput by Gil Pedersen. + * Copyright (c) 2004, Gil Pedersen. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#define ControllerList NetPcsxrHIDInputPluginControllerList + +#import +#include "cfg.h" + +@interface ControllerList : NSObject +@property (getter = isUsingSDL2) BOOL usingSDL2; + +- (id)initWithConfig; + ++ (void)setCurrentController:(int)which; ++ (int)currentController; ++ (int)buttonOfRow:(NSInteger)row; +- (void)deleteRow:(NSInteger)which; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/ControllerList.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/ControllerList.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/ControllerList.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/ControllerList.m 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,199 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on HIDInput by Gil Pedersen. + * Copyright (c) 2004, Gil Pedersen. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#import "ControllerList.h" +#include "pad.h" +#include "cfg.h" + +static int currentController; +static NSArray *labelText; +static NSArray *GameControllerText; + +@implementation ControllerList + +- (BOOL)isUsingSDL2 +{ + return g.cfg.PadDef[currentController].UseSDL2; +} + +- (void)setUsingSDL2:(BOOL)_usingSDL2 +{ + g.cfg.PadDef[currentController].UseSDL2 = _usingSDL2; +} + +- (id)initWithConfig +{ + if (self = [super init]) { + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + NSBundle *plugBundle = [NSBundle bundleForClass:[self class]]; + labelText = @[NSLocalizedStringFromTableInBundle(@"D-Pad Up", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"D-Pad Down", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"D-Pad Left", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"D-Pad Right", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"Cross", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"Circle", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"Square", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"Triangle", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"L1", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"R1", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"L2", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"R2", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"Select", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"Start", nil, plugBundle, @""), + + NSLocalizedStringFromTableInBundle(@"L3", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"R3", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"Analog", nil, plugBundle, @""), + + NSLocalizedStringFromTableInBundle(@"L-Stick Right", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"L-Stick Left", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"L-Stick Down", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"L-Stick Up", nil, plugBundle, @""), + + NSLocalizedStringFromTableInBundle(@"R-Stick Right", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"R-Stick Left", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"R-Stick Down", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"R-Stick Up", nil, plugBundle, @"")]; + + GameControllerText = @[NSLocalizedStringFromTableInBundle(@"D-Pad Up", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"D-Pad Down", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"D-Pad Left", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"D-Pad Right", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"Cross", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"Circle", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"Square", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"Triangle", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"Left Bumper", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"Right Bumper", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"Left Trigger", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"Right Trigger", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"Back", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"Start", nil, plugBundle, @""), + + NSLocalizedStringFromTableInBundle(@"L3", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"R3", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"Guide", nil, plugBundle, @""), + + NSLocalizedStringFromTableInBundle(@"L-Stick Right", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"L-Stick Left", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"L-Stick Down", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"L-Stick Up", nil, plugBundle, @""), + + NSLocalizedStringFromTableInBundle(@"R-Stick Right", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"R-Stick Left", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"R-Stick Down", nil, plugBundle, @""), + NSLocalizedStringFromTableInBundle(@"R-Stick Up", nil, plugBundle, @"")]; + }); + } + return self; +} + +/* sets current controller data returned by data source */ ++ (void)setCurrentController:(int)which +{ + currentController = which; +} + ++ (int)currentController +{ + return currentController; +} + +/* NSDataSource */ +- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView +{ + return DKEY_TOTAL + (g.cfg.PadDef[currentController].Type == PSE_PAD_TYPE_ANALOGPAD ? 8 : -3); +} + +static const int DPad[DKEY_TOTAL] = { + DKEY_UP, + DKEY_DOWN, + DKEY_LEFT, + DKEY_RIGHT, + DKEY_CROSS, + DKEY_CIRCLE, + DKEY_SQUARE, + DKEY_TRIANGLE, + DKEY_L1, + DKEY_R1, + DKEY_L2, + DKEY_R2, + DKEY_SELECT, + DKEY_START, + DKEY_L3, + DKEY_R3, + DKEY_ANALOG +}; + ++ (int)buttonOfRow:(NSInteger)row +{ + return DPad[row]; +} + +- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn + row:(NSInteger)rowIndex +{ + if ([[aTableColumn identifier] isEqualToString:@"key"]) { + return labelText[rowIndex]; + } else { + char buf[256] = {0}; + + if ([self isUsingSDL2]) { + NSString *keyBoardString, *gamePadStr = GameControllerText[rowIndex]; + if (rowIndex < DKEY_TOTAL) { + GetKeyboardKeyDescription(buf, currentController, DPad[rowIndex]); + } else { + NSInteger tmpRowIndex = rowIndex - DKEY_TOTAL; + GetKeyboardAnalogDescription(buf, currentController, (int)(tmpRowIndex / 4), tmpRowIndex % 4); + } + keyBoardString = @(buf); + + return [keyBoardString isEqualToString:@""] ? gamePadStr : [gamePadStr stringByAppendingFormat:@" / %@", keyBoardString]; + } else { + // actual keys + if (rowIndex < DKEY_TOTAL) { + GetKeyDescription(buf, currentController, DPad[rowIndex]); + } else { + rowIndex -= DKEY_TOTAL; + GetAnalogDescription(buf, currentController, (int)(rowIndex / 4), rowIndex % 4); + } + + return @(buf); + } + } +} + +- (void)deleteRow:(NSInteger)which +{ + if (which < DKEY_TOTAL) { + g.cfg.PadDef[currentController].KeyDef[DPad[which]].Key = 0; + g.cfg.PadDef[currentController].KeyDef[DPad[which]].JoyEvType = NONE; + g.cfg.PadDef[currentController].KeyDef[DPad[which]].J.d = 0; + } else { + which -= DKEY_TOTAL; + g.cfg.PadDef[currentController].AnalogDef[which / 4][which % 4].Key = 0; + g.cfg.PadDef[currentController].AnalogDef[which / 4][which % 4].JoyEvType = NONE; + g.cfg.PadDef[currentController].AnalogDef[which / 4][which % 4].J.d = 0; + } +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/MappingCell.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/MappingCell.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/MappingCell.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/MappingCell.h 2016-06-30 16:53:17.000000000 +0000 @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: HIDInput by Gil Pedersen. + * Copyright (c) 2004, Gil Pedersen. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#define MappingCell NetPcsxrHIDInputPluginMappingCell + +#import + +@interface MappingCell : NSTextFieldCell + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/MappingCell.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/MappingCell.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/MappingCell.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/MappingCell.m 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: HIDInput by Gil Pedersen. + * Copyright (c) 2004, Gil Pedersen. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#import "MappingCell.h" +#import "ControllerList.h" +#include "cfg.h" + +@implementation MappingCell + +- (id)initTextCell:(NSString *)aString { + if (self = [super initTextCell:aString]) { + [self setEditable:NO]; + } + + return self; +} + +- (void)selectWithFrame:(NSRect)aRect inView:(NSView *)controlView editor:(NSText *)textObj delegate:(id)anObject start:(NSInteger)selStart length:(NSInteger)selLength +{ + [super selectWithFrame:aRect inView:controlView editor:textObj delegate:anObject start:selStart length:selLength]; + + int whichPad = [ControllerList currentController]; + NSTableView *tableView = (NSTableView *)[self controlView]; + long i, changed = 0, row; + NSEvent *endEvent; + NSPoint where = {0.0, 0.0}; + + /* start a modal session */ + NSModalSession session = [NSApp beginModalSessionForWindow:[tableView window]]; + [NSApp runModalSession:session]; + + /* delay for a little while to allow user to release the button pressed to activate the element */ + [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.15]]; + + InitAxisPos(whichPad); + + /* wait for 10 seconds for user to press a key */ + for (i = 0; i < 10; i++) { + [NSApp runModalSession:session]; + row = [tableView selectedRow]; + if (row < DKEY_TOTAL) { + changed = ReadDKeyEvent(whichPad, [ControllerList buttonOfRow:row]); + } else { + row -= DKEY_TOTAL; + changed = ReadAnalogEvent(whichPad, (int)(row / 4), row % 4); + } + + if (changed) break; + } + + [NSApp endModalSession:session]; + + /* move selection to the next list element */ + [self endEditing:textObj]; + if (changed == 1) { + int nextRow = (int)[tableView selectedRow] + 1; + if (nextRow >= [tableView numberOfRows]) { + [tableView deselectAll:self]; + return; + } + [tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:nextRow] byExtendingSelection:NO]; + + /* discard any events we have received while waiting for the button press */ + endEvent = [NSEvent otherEventWithType:NSApplicationDefined location:where + modifierFlags:0 timestamp:(NSTimeInterval)0 + windowNumber:0 context:[NSGraphicsContext currentContext] subtype:0 data1:0 data2:0]; + [NSApp postEvent:endEvent atStart:NO]; + [NSApp discardEventsMatchingMask:NSAnyEventMask beforeEvent:endEvent]; + } + [[tableView window] makeFirstResponder:tableView]; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/PadController.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/PadController.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/PadController.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/PadController.h 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: HIDInput by Gil Pedersen. + * Copyright (c) 2004, Gil Pedersen. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#define PadController NetPcsxrHIDInputPluginPadController + +#import +#import "PadView.h" + +@interface PadController : NSWindowController +@property (weak) IBOutlet PadView *controllerView; +@property (weak) IBOutlet id controllerView1; +@property (weak) IBOutlet id controllerView2; + + +- (IBAction)cancel:(id)sender; +- (IBAction)ok:(id)sender; +@end + +__private_extern NSDictionary *DefaultPadArray(int padnum); +__private_extern void LoadPadArray(int padnum, NSDictionary *nsPrefs); +__private_extern NSDictionary *SavePadArray(int padnum); diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/PadController.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/PadController.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/PadController.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/PadController.m 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,468 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: HIDInput by Gil Pedersen. + * Copyright (c) 2004, Gil Pedersen. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#import +#import "PadController.h" +#include "pad.h" + +static inline void RunOnMainThreadSync(dispatch_block_t block) +{ + if ([NSThread isMainThread]) { + block(); + } else { + dispatch_sync(dispatch_get_main_queue(), block); + } +} + +static NSWindow *padWindow = nil; +static PadController *padController = nil; + +#define APP_ID @"net.pcsxr.DFInputPlugin" +#define PrefsKey APP_ID @" Settings" + +#define kDFThreading @"Threading" +#define kDFPad1 @"Pad 1" +#define kDFPad2 @"Pad 2" + +static void SetDefaultConfig() { + memset(&g.cfg, 0, sizeof(g.cfg)); + + g.cfg.Threaded = 1; + + g.cfg.PadDef[0].DevNum = 0; + g.cfg.PadDef[1].DevNum = 1; + + g.cfg.PadDef[0].Type = PSE_PAD_TYPE_STANDARD; + g.cfg.PadDef[1].Type = PSE_PAD_TYPE_STANDARD; + + // Pad1 keyboard + g.cfg.PadDef[0].KeyDef[DKEY_SELECT].Key = 9; + g.cfg.PadDef[0].KeyDef[DKEY_START].Key = 10; + g.cfg.PadDef[0].KeyDef[DKEY_UP].Key = 127; + g.cfg.PadDef[0].KeyDef[DKEY_RIGHT].Key = 125; + g.cfg.PadDef[0].KeyDef[DKEY_DOWN].Key = 126; + g.cfg.PadDef[0].KeyDef[DKEY_LEFT].Key = 124; + g.cfg.PadDef[0].KeyDef[DKEY_L2].Key = 16; + g.cfg.PadDef[0].KeyDef[DKEY_R2].Key = 18; + g.cfg.PadDef[0].KeyDef[DKEY_L1].Key = 14; + g.cfg.PadDef[0].KeyDef[DKEY_R1].Key = 15; + g.cfg.PadDef[0].KeyDef[DKEY_TRIANGLE].Key = 3; + g.cfg.PadDef[0].KeyDef[DKEY_CIRCLE].Key = 8; + g.cfg.PadDef[0].KeyDef[DKEY_CROSS].Key = 7; + g.cfg.PadDef[0].KeyDef[DKEY_SQUARE].Key = 2; + g.cfg.PadDef[0].KeyDef[DKEY_ANALOG].Key = 12; + + // Pad1 joystick + g.cfg.PadDef[0].KeyDef[DKEY_SELECT].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_SELECT].J.Button = 8; + g.cfg.PadDef[0].KeyDef[DKEY_START].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_START].J.Button = 9; + g.cfg.PadDef[0].KeyDef[DKEY_UP].JoyEvType = AXIS; + g.cfg.PadDef[0].KeyDef[DKEY_UP].J.Axis = -2; + g.cfg.PadDef[0].KeyDef[DKEY_RIGHT].JoyEvType = AXIS; + g.cfg.PadDef[0].KeyDef[DKEY_RIGHT].J.Axis = 1; + g.cfg.PadDef[0].KeyDef[DKEY_DOWN].JoyEvType = AXIS; + g.cfg.PadDef[0].KeyDef[DKEY_DOWN].J.Axis = 2; + g.cfg.PadDef[0].KeyDef[DKEY_LEFT].JoyEvType = AXIS; + g.cfg.PadDef[0].KeyDef[DKEY_LEFT].J.Axis = -1; + g.cfg.PadDef[0].KeyDef[DKEY_L2].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_L2].J.Button = 4; + g.cfg.PadDef[0].KeyDef[DKEY_L1].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_L1].J.Button = 6; + g.cfg.PadDef[0].KeyDef[DKEY_R2].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_R2].J.Button = 5; + g.cfg.PadDef[0].KeyDef[DKEY_R1].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_R1].J.Button = 7; + g.cfg.PadDef[0].KeyDef[DKEY_TRIANGLE].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_TRIANGLE].J.Button = 0; + g.cfg.PadDef[0].KeyDef[DKEY_CIRCLE].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_CIRCLE].J.Button = 1; + g.cfg.PadDef[0].KeyDef[DKEY_CROSS].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_CROSS].J.Button = 2; + g.cfg.PadDef[0].KeyDef[DKEY_SQUARE].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_SQUARE].J.Button = 3; + + // Pad2 joystick + g.cfg.PadDef[1].KeyDef[DKEY_SELECT].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_SELECT].J.Button = 8; + g.cfg.PadDef[1].KeyDef[DKEY_START].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_START].J.Button = 9; + g.cfg.PadDef[1].KeyDef[DKEY_UP].JoyEvType = AXIS; + g.cfg.PadDef[1].KeyDef[DKEY_UP].J.Axis = -2; + g.cfg.PadDef[1].KeyDef[DKEY_RIGHT].JoyEvType = AXIS; + g.cfg.PadDef[1].KeyDef[DKEY_RIGHT].J.Axis = 1; + g.cfg.PadDef[1].KeyDef[DKEY_DOWN].JoyEvType = AXIS; + g.cfg.PadDef[1].KeyDef[DKEY_DOWN].J.Axis = 2; + g.cfg.PadDef[1].KeyDef[DKEY_LEFT].JoyEvType = AXIS; + g.cfg.PadDef[1].KeyDef[DKEY_LEFT].J.Axis = -1; + g.cfg.PadDef[1].KeyDef[DKEY_L2].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_L2].J.Button = 4; + g.cfg.PadDef[1].KeyDef[DKEY_L1].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_L1].J.Button = 6; + g.cfg.PadDef[1].KeyDef[DKEY_R2].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_R2].J.Button = 5; + g.cfg.PadDef[1].KeyDef[DKEY_R1].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_R1].J.Button = 7; + g.cfg.PadDef[1].KeyDef[DKEY_TRIANGLE].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_TRIANGLE].J.Button = 0; + g.cfg.PadDef[1].KeyDef[DKEY_CIRCLE].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_CIRCLE].J.Button = 1; + g.cfg.PadDef[1].KeyDef[DKEY_CROSS].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_CROSS].J.Button = 2; + g.cfg.PadDef[1].KeyDef[DKEY_SQUARE].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_SQUARE].J.Button = 3; +} + +void LoadPADConfig() +{ + SetDefaultConfig(); + BOOL tryToLoadOld = YES; + //Do we have the new settings? + //This is placed here so we don't have the PrefsKey defined. + NSUserDefaults *usrDefaults = [NSUserDefaults standardUserDefaults]; + if ([usrDefaults objectForKey:PrefsKey]) { + //Yes we do, don't load the old. + tryToLoadOld = NO; + } + + [usrDefaults registerDefaults: + @{PrefsKey: @{kDFPad1: DefaultPadArray(0), + kDFPad2: DefaultPadArray(1), + kDFThreading: @YES}}]; + + //Load the old preferences if present and we don't have new ones. + NSFileManager *fm = [NSFileManager defaultManager]; + NSString *oldPrefPath = [NSString pathWithComponents:@[NSHomeDirectory(), @"Library", @"Preferences", @"net.pcsxr.DFInput.plist"]]; + if ([fm fileExistsAtPath:oldPrefPath] && tryToLoadOld) { + char buf[256] = {0}; + int current = 0, a = 0, b = 0, c = 0; + + FILE *fp = fopen([oldPrefPath fileSystemRepresentation], "r"); + if (fp == NULL) { + //Delete the old preferences + [fm removeItemAtPath:oldPrefPath error:NULL]; + return; + } + + while (fgets(buf, 256, fp) != NULL) { + if (strncmp(buf, "Threaded=", 9) == 0) { + g.cfg.Threaded = atoi(&buf[9]); + } else if (strncmp(buf, "[PAD", 4) == 0) { + current = atoi(&buf[4]) - 1; + if (current < 0) { + current = 0; + } else if (current > 1) { + current = 1; + } + } else if (strncmp(buf, "DevNum=", 7) == 0) { + g.cfg.PadDef[current].DevNum = atoi(&buf[7]); + } else if (strncmp(buf, "Type=", 5) == 0) { + g.cfg.PadDef[current].Type = atoi(&buf[5]); + } else if (strncmp(buf, "Select=", 7) == 0) { + sscanf(buf, "Select=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_SELECT].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_SELECT].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_SELECT].J.d = c; + } else if (strncmp(buf, "L3=", 3) == 0) { + sscanf(buf, "L3=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_L3].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_L3].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_L3].J.d = c; + } else if (strncmp(buf, "R3=", 3) == 0) { + sscanf(buf, "R3=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_R3].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_R3].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_R3].J.d = c; + } else if (strncmp(buf, "Analog=", 7) == 0) { + sscanf(buf, "Analog=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_ANALOG].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_ANALOG].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_ANALOG].J.d = c; + } else if (strncmp(buf, "Start=", 6) == 0) { + sscanf(buf, "Start=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_START].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_START].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_START].J.d = c; + } else if (strncmp(buf, "Up=", 3) == 0) { + sscanf(buf, "Up=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_UP].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_UP].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_UP].J.d = c; + } else if (strncmp(buf, "Right=", 6) == 0) { + sscanf(buf, "Right=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_RIGHT].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_RIGHT].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_RIGHT].J.d = c; + } else if (strncmp(buf, "Down=", 5) == 0) { + sscanf(buf, "Down=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_DOWN].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_DOWN].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_DOWN].J.d = c; + } else if (strncmp(buf, "Left=", 5) == 0) { + sscanf(buf, "Left=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_LEFT].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_LEFT].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_LEFT].J.d = c; + } else if (strncmp(buf, "L2=", 3) == 0) { + sscanf(buf, "L2=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_L2].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_L2].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_L2].J.d = c; + } else if (strncmp(buf, "R2=", 3) == 0) { + sscanf(buf, "R2=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_R2].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_R2].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_R2].J.d = c; + } else if (strncmp(buf, "L1=", 3) == 0) { + sscanf(buf, "L1=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_L1].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_L1].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_L1].J.d = c; + } else if (strncmp(buf, "R1=", 3) == 0) { + sscanf(buf, "R1=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_R1].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_R1].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_R1].J.d = c; + } else if (strncmp(buf, "Triangle=", 9) == 0) { + sscanf(buf, "Triangle=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_TRIANGLE].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_TRIANGLE].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_TRIANGLE].J.d = c; + } else if (strncmp(buf, "Circle=", 7) == 0) { + sscanf(buf, "Circle=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_CIRCLE].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_CIRCLE].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_CIRCLE].J.d = c; + } else if (strncmp(buf, "Cross=", 6) == 0) { + sscanf(buf, "Cross=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_CROSS].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_CROSS].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_CROSS].J.d = c; + } else if (strncmp(buf, "Square=", 7) == 0) { + sscanf(buf, "Square=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_SQUARE].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_SQUARE].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_SQUARE].J.d = c; + } else if (strncmp(buf, "LeftAnalogXP=", 13) == 0) { + sscanf(buf, "LeftAnalogXP=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_XP].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_XP].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_XP].J.d = c; + } else if (strncmp(buf, "LeftAnalogXM=", 13) == 0) { + sscanf(buf, "LeftAnalogXM=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_XM].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_XM].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_XM].J.d = c; + } else if (strncmp(buf, "LeftAnalogYP=", 13) == 0) { + sscanf(buf, "LeftAnalogYP=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_YP].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_YP].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_YP].J.d = c; + } else if (strncmp(buf, "LeftAnalogYM=", 13) == 0) { + sscanf(buf, "LeftAnalogYM=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_YM].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_YM].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_YM].J.d = c; + } else if (strncmp(buf, "RightAnalogXP=", 14) == 0) { + sscanf(buf, "RightAnalogXP=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_XP].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_XP].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_XP].J.d = c; + } else if (strncmp(buf, "RightAnalogXM=", 14) == 0) { + sscanf(buf, "RightAnalogXM=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_XM].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_XM].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_XM].J.d = c; + } else if (strncmp(buf, "RightAnalogYP=", 14) == 0) { + sscanf(buf, "RightAnalogYP=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_YP].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_YP].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_YP].J.d = c; + } else if (strncmp(buf, "RightAnalogYM=", 14) == 0) { + sscanf(buf, "RightAnalogYM=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_YM].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_YM].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_YM].J.d = c; + } + } + + fclose(fp); + //Save to new preferences + SavePADConfig(); + //Delete the old preferences + [fm removeItemAtPath:oldPrefPath error:NULL]; + } else { + NSDictionary *dfPrefs = [usrDefaults dictionaryForKey:PrefsKey]; + g.cfg.Threaded = [dfPrefs[kDFThreading] boolValue]; + LoadPadArray(0, dfPrefs[kDFPad1]); + LoadPadArray(1, dfPrefs[kDFPad2]); + } +} + +void SavePADConfig() +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSMutableDictionary *pad1Dict, *pad2Dict; + NSDictionary *prefDict = [defaults dictionaryForKey:PrefsKey]; + pad1Dict = [[NSMutableDictionary alloc] initWithDictionary:prefDict[kDFPad1]]; + pad2Dict = [[NSMutableDictionary alloc] initWithDictionary:prefDict[kDFPad2]]; + prefDict = nil; + + [pad1Dict addEntriesFromDictionary:SavePadArray(0)]; + [pad2Dict addEntriesFromDictionary:SavePadArray(1)]; + + [defaults setObject:@{kDFThreading: g.cfg.Threaded ? @YES : @NO, + kDFPad1: pad1Dict, + kDFPad2: pad2Dict} forKey:PrefsKey]; + [defaults synchronize]; +} + +void DoAbout() +{ + // Get parent application instance + NSBundle *bundle = [NSBundle bundleWithIdentifier:APP_ID]; + + // Get Credits.rtf + NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; + NSAttributedString *credits; + if (!path) { + path = [bundle pathForResource:@"Credits" ofType:@"rtfd"]; + } + if (path) { + credits = [[NSAttributedString alloc] initWithPath:path documentAttributes:NULL]; + } else { + credits = [[NSAttributedString alloc] initWithString:@""]; + } + + // Get Application Icon + NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:[bundle bundlePath]]; + NSSize size = NSMakeSize(64, 64); + [icon setSize:size]; + + NSDictionary *infoPaneDict = + @{@"ApplicationName": [bundle objectForInfoDictionaryKey:@"CFBundleName"], + @"ApplicationIcon": icon, + @"ApplicationVersion": [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], + @"Version": [bundle objectForInfoDictionaryKey:@"CFBundleVersion"], + @"Copyright": [bundle objectForInfoDictionaryKey:@"NSHumanReadableCopyright"], + @"Credits": credits}; + dispatch_async(dispatch_get_main_queue(), ^{ + [NSApp orderFrontStandardAboutPanelWithOptions:infoPaneDict]; + }); +} + +long DoConfiguration() +{ + RunOnMainThreadSync(^{ +#if SDL_VERSION_ATLEAST(2, 0, 0) + SDL_InitSubSystem(SDL_INIT_JOYSTICK); +#else + SDL_Init(SDL_INIT_JOYSTICK | SDL_INIT_NOPARACHUTE); +#endif + LoadPADConfig(); + + if (padWindow == nil) { + if (padController == nil) { + padController = [[PadController alloc] initWithWindowNibName:@"NetPcsxrHIDInputPluginMain"]; + } + padWindow = [padController window]; + } + + [padWindow center]; + [padWindow makeKeyAndOrderFront:nil]; + }); + + return 0; +} + +@implementation PadController +@synthesize controllerView; +@synthesize controllerView1; +@synthesize controllerView2; + +- (IBAction)cancel:(id)sender +{ +#if SDL_VERSION_ATLEAST(2, 0, 0) + SDL_QuitSubSystem(SDL_INIT_JOYSTICK); +#else + SDL_Quit(); +#endif + [self close]; +} + +- (IBAction)ok:(id)sender +{ + SavePADConfig(); +#if SDL_VERSION_ATLEAST(2, 0, 0) + SDL_QuitSubSystem(SDL_INIT_JOYSTICK); +#else + SDL_Quit(); +#endif + [self close]; +} + +- (void)awakeFromNib +{ + [controllerView1 addSubview: controllerView]; + [controllerView setController:0]; +} + +- (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem +{ + PadView *newView = nil; + if ([[tabViewItem identifier] isEqualToString:@"pad1"]) + newView = controllerView1; + else if ([[tabViewItem identifier] isEqualToString:@"pad2"]) + newView = controllerView2; + + if (nil != newView) { + [controllerView removeFromSuperviewWithoutNeedingDisplay]; + [newView addSubview: controllerView]; + [controllerView setFrame:[newView frame]]; + [controllerView setController:[newView isEqual:controllerView1] ? 0 : 1]; + } +} + +- (void)windowBecameKey:(NSNotification *)notification +{ + if ([notification object] == [self window]) { + if ([[controllerView1 subviews] count] > 0) + [controllerView setController:0]; + else if ([[controllerView2 subviews] count] > 0) + [controllerView setController:1]; + } +} + +- (void)windowWillClose:(NSNotification *)aNotification +{ + if ([aNotification object] == [self window]) { +#if SDL_VERSION_ATLEAST(2, 0, 0) + SDL_QuitSubSystem(SDL_INIT_JOYSTICK); +#else + SDL_Quit(); +#endif + } +} + +@end + +#import "OSXPlugLocalization.h" +PLUGLOCIMP([padController class]) diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/PadView.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/PadView.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/PadView.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/PadView.h 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: HIDInput by Gil Pedersen. + * Copyright (c) 2004, Gil Pedersen. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#define PadView NetPcsxrHIDInputPluginPadView + +#import +#import "ControllerList.h" + +@interface PadView : NSView + +@property (weak) IBOutlet NSTableView *tableView; +@property (weak) IBOutlet NSPopUpButton *typeMenu; +@property (weak) IBOutlet NSPopUpButton *deviceMenu; +@property (weak) IBOutlet NSButton *useSDL2Check; +@property (strong) ControllerList *controllerList; + +- (IBAction)setType:(id)sender; +- (IBAction)setDevice:(id)sender; +- (IBAction)toggleSDL2:(id)sender; + +- (void)setController:(int)which; +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/PadView.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/PadView.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/PadView.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/PadView.m 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: HIDInput by Gil Pedersen. + * Copyright (c) 2004, Gil Pedersen. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#import "PadView.h" +#include "pad.h" + +@implementation PadView +@synthesize controllerList = controller; + +- (id)initWithFrame:(NSRect)frameRect +{ + if (self = [super initWithFrame:frameRect]) { + controller = [[ControllerList alloc] initWithConfig]; + [self setController:0]; + } + return self; +} + +- (void)drawRect:(NSRect)rect +{ + +} + +- (IBAction)setType:(id)sender +{ + g.cfg.PadDef[[ControllerList currentController]].Type = + ([sender indexOfSelectedItem] > 0 ? PSE_PAD_TYPE_ANALOGPAD : PSE_PAD_TYPE_STANDARD); + + [self.tableView reloadData]; +} + +- (IBAction)setDevice:(id)sender +{ + g.cfg.PadDef[[ControllerList currentController]].DevNum = (int)[sender indexOfSelectedItem] - 1; +} + +- (IBAction)toggleSDL2:(id)sender +{ + controller.usingSDL2 = !controller.usingSDL2; + + [self.tableView reloadData]; +} + +- (void)setController:(int)which +{ + int i; + + [ControllerList setCurrentController:which]; + [self.tableView setDataSource:controller]; + + [self.deviceMenu removeAllItems]; + [self.deviceMenu addItemWithTitle:[[NSBundle bundleForClass:[self class]] localizedStringForKey:@"(Keyboard only)" value:@"" table:nil]]; + + for (i = 0; i < SDL_NumJoysticks(); i++) { + NSMenuItem *joystickItem; +#if SDL_VERSION_ATLEAST(2, 0, 0) + NSString *tmpString; + if (SDL_IsGameController(i)) { + tmpString = @(SDL_GameControllerNameForIndex(i)); + } else { + tmpString = @(SDL_JoystickNameForIndex(i)); + } + joystickItem = [[NSMenuItem alloc] initWithTitle:tmpString action:NULL keyEquivalent:@""]; +#else + joystickItem = [[NSMenuItem alloc] initWithTitle:@(SDL_JoystickName(i)) action:NULL keyEquivalent:@""]; +#endif + [joystickItem setTag:i + 1]; + [[self.deviceMenu menu] addItem:joystickItem]; + } + + if (g.cfg.PadDef[which].DevNum >= SDL_NumJoysticks()) { + g.cfg.PadDef[which].DevNum = -1; + } + + [self.deviceMenu selectItemAtIndex:g.cfg.PadDef[which].DevNum + 1]; + [self.typeMenu selectItemAtIndex:(g.cfg.PadDef[which].Type == PSE_PAD_TYPE_ANALOGPAD ? 1 : 0)]; + + [self.useSDL2Check setState:g.cfg.PadDef[which].UseSDL2 ? NSOnState : NSOffState]; + + [self.tableView reloadData]; +} + +- (BOOL)control:(NSControl *)control textShouldBeginEditing:(NSText *)fieldEditor +{ + return false; +} + +/* handles key events on the pad list */ +- (void)keyDown:(NSEvent *)theEvent +{ + unsigned short key = [theEvent keyCode]; + + if ([[theEvent window] firstResponder] == self.tableView) { + if (key == 51 || key == 117) { + // delete keys - remove the mappings for the selected item + [controller deleteRow:[self.tableView selectedRow]]; + [self.tableView reloadData]; + return; + } else if (key == 36) { + // return key - configure the selected item + [self.tableView editColumn:[self.tableView columnWithIdentifier:@"button"] row:[self.tableView selectedRow] withEvent:nil select:YES]; + return; + } + } + + [super keyDown:theEvent]; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/xkb.c pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/xkb.c --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/macsrc/xkb.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/macsrc/xkb.c 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "pad.h" + +void InitKeyboard() { + g.PadState[0].KeyStatus = 0xFFFF; + g.PadState[1].KeyStatus = 0xFFFF; +} + +void DestroyKeyboard() { +} + +static void bdown(int pad, int bit) +{ + if(bit < 16) + g.PadState[pad].KeyStatus &= ~(1 << bit); + else if(bit == DKEY_ANALOG) + g.PadState[pad].PadModeSwitch = 1; +} + +static void bup(int pad, int bit) +{ + if(bit < 16) + g.PadState[pad].KeyStatus |= (1 << bit); +} + +void CheckKeyboard() { + int i, j, k; + uint16_t key; + + union { + KeyMap km; + KeyMapByteArray k; + } keyState; + + g.PadState[0].KeyStatus = 0xFFFF; + g.PadState[1].KeyStatus = 0xFFFF; + + GetKeys(keyState.km); + +#define KeyDown(X) \ + (keyState.k[((X) - 1) >> 3] & (1 << (((X) - 1) & 7))) + + for (i = 0; i < 2; i++) { + for (j = 0; j < DKEY_TOTAL; j++) { + key = g.cfg.PadDef[i].KeyDef[j].Key; + if (key == 0) continue; + + if (KeyDown(key)) bdown(i, j); + else bup(i, j); + } + + if (g.cfg.PadDef[i].Type != PSE_PAD_TYPE_ANALOGPAD) continue; + + for (j = 0; j < ANALOG_TOTAL; j++) { + for (k = 0; k < 4; k++) { + key = g.cfg.PadDef[i].AnalogDef[j][k].Key; + if (key == 0) continue; + + g.PadState[i].AnalogKeyStatus[j][k] = (KeyDown(key) ? 1 : 0); + } + } + } +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/Resources/DFInput.exp pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/Resources/DFInput.exp --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/Resources/DFInput.exp 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/Resources/DFInput.exp 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,24 @@ +# DFInput.exp +# Pcsxr +# +# Created by C.W. Betts on 4/1/14. +# + +_PSEgetLibType +_PSEgetLibName +_PSEgetLibVersion +_PADsetMode +_PADinit +_PADshutdown +_PADopen +_PADclose +_PADstartPoll +_PADpoll +_PADreadPort1 +_PADreadPort2 +_PADquery +_PADconfigure +_PADtest +_PADabout +_PADregisterVibration +_PADkeypressed diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/zh-Hans.lproj/Credits.rtf pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/zh-Hans.lproj/Credits.rtf --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/zh-Hans.lproj/Credits.rtf 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/zh-Hans.lproj/Credits.rtf 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,24 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset134 STHeitiSC-Light;} +{\colortbl;\red255\green255\blue255;} +\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural + +\f0\b\fs24 \cf0 Macintosh Port: +\b0 \ + Wei Mingzhi\ + Gil Pedersen\ + Nicolas P\'e9pin-Perreault\ + C.W. \'93Madd the Sane\'94 Betts\ +\ + +\b Original coder: +\b0 \ + Wei Mingzhi\ +\ + +\b Chinese Translation( +\f1 \'d6\'d0\'ce\'c4\'b7\'ad\'d2\'eb +\f0 ): +\b0 \ + Sdchun} \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/zh-Hans.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/zh-Hans.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/zh-Hans.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/zh-Hans.lproj/Localizable.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,61 @@ +/* + Localizable.strings + DFInput + + Created by C.W. Betts on 11/16/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"Gamepad/Keyboard/Mouse Input" = "手柄/键盘/鼠标 输入"; +"Joystick: Button %d" = "操纵杆: 按钮 %d"; +"Joystick: Axis %d%c" = "操纵杆: 坐标轴 %d%c"; +"Joystick: Hat %d %s" = "操纵杆: Hat %d %s"; +"Keyboard: %s" = "键盘: %s"; + +"(Keyboard only)" = "(键盘)"; +"(Not Set)" = "(未设置)"; + +"D-Pad Up" = "↑ / 上"; +"D-Pad Down" = "↓ / 下"; +"D-Pad Left" = "← / 左"; +"D-Pad Right" = "→ / 右"; +"Cross" = "× / 叉"; +"Circle" = "◯ / 圆圈"; +"Square" = "☐ / 方块"; +"Triangle" = "△ / 三角"; +"L1" = "L1"; +"R1" = "R1"; +"L2" = "L2"; +"R2" = "R2"; +"Select" = "Select / 选择"; +"Start" = "Start / 开始"; +"L3" = "L3"; +"R3" = "R3"; +"Analog" = "模拟"; +"L-Stick Right" = "L-摇杆 → / 右"; +"L-Stick Left" = "L-摇杆 ← / 左"; +"L-Stick Down" = "L-摇杆 ↓ / 下"; +"L-Stick Up" = "L-摇杆 ↑ / 上"; +"R-Stick Right" = "R-摇杆 → / 右"; +"R-Stick Left" = "R-摇杆 ← / 左"; +"R-Stick Down" = "R-摇杆 ↓ / 下"; +"R-Stick Up" = "R-摇杆 ↑ / 上"; + +// Game Controller names +//"Left Bumper" = "Left Bumper"; +//"Right Bumper" = "Right Bumper"; +//"Left Trigger" = "Left Trigger"; +//"Right Trigger" = "Right Trigger"; +//"Guide" = "Guide"; +//"Back" = "Back"; + +// Unused right now +"Centered" = "中间键"; +"Up" = "↑ / 上"; +"Right" = "→ / 右"; +"Rightup" = "↗ / 右上"; +"Down" = "↓ / 下"; +"Rightdown" = "↘ / 右下"; +"Left" = "← / 左"; +"Leftup" = "↖ / 左上"; +"Leftdown" = "↙ / 左下"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/zh-Hans.lproj/NetPcsxrHIDInputPluginMain.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/zh-Hans.lproj/NetPcsxrHIDInputPluginMain.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFInput/zh-Hans.lproj/NetPcsxrHIDInputPluginMain.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFInput/zh-Hans.lproj/NetPcsxrHIDInputPluginMain.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,54 @@ + +/* Class = "NSWindow"; title = "手柄输入配置"; ObjectID = "5"; */ +"5.title" = "手柄输入配置"; + +/* Class = "NSTabViewItem"; label = "手柄 2"; ObjectID = "8"; */ +"8.label" = "手柄 2"; + +/* Class = "NSTabViewItem"; label = "手柄 1"; ObjectID = "9"; */ +"9.label" = "手柄 1"; + +/* Class = "NSTableColumn"; headerCell.title = "模拟输入按钮"; ObjectID = "124"; */ +"124.headerCell.title" = "模拟输入按钮"; + +/* Class = "NSMenu"; title = "查看其他"; ObjectID = "127"; */ +"127.title" = "查看其他"; + +/* Class = "NSTableColumn"; headerCell.title = "原始按钮"; ObjectID = "128"; */ +"128.headerCell.title" = "原始按钮"; + +/* Class = "NSMenuItem"; title = "数字手柄"; ObjectID = "130"; */ +"130.title" = "数字手柄"; + +/* Class = "NSTextFieldCell"; placeholderString = "双击设置"; ObjectID = "166"; */ +"166.placeholderString" = "双击设置"; + +/* Class = "NSMenu"; title = "查看其他"; ObjectID = "190"; */ +"190.title" = "查看其他"; + +/* Class = "NSMenuItem"; title = "(键盘)"; ObjectID = "192"; */ +"192.title" = "(键盘)"; + +/* Class = "NSMenuItem"; title = "模拟手柄"; ObjectID = "198"; */ +"198.title" = "模拟手柄"; + +/* Class = "NSTextFieldCell"; title = "类型:"; ObjectID = "205"; */ +"205.title" = "类型:"; + +/* Class = "NSTextFieldCell"; title = "重置一个输入按钮: 选择它并按下delete'←'键"; ObjectID = "206"; */ +"206.title" = "重置一个输入按钮: 选择它并按下delete'←'键"; + +/* Class = "NSTextFieldCell"; title = "设备:"; ObjectID = "208"; */ +"208.title" = "设备:"; + +/* Class = "NSButtonCell"; title = "确认"; ObjectID = "257"; */ +"257.title" = "确认"; + +/* Class = "NSButtonCell"; title = "取消"; ObjectID = "262"; */ +"262.title" = "取消"; + +/* Class = "NSButtonCell"; title = "Use Game Controller API"; ObjectID = "XyD-IN-gbq"; */ +//"XyD-IN-gbq.title" = "Use Game Controller API"; + +/* Class = "NSButton"; ibShadowedToolTip = "Uses the SDL2 Game Controller API to automatically map buttons"; ObjectID = "e1h-QZ-6Ge"; */ +//"e1h-QZ-6Ge.ibShadowedToolTip" = "Uses the SDL2 Game Controller API to automatically map buttons"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/Base.lproj/DFNet.xib pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/Base.lproj/DFNet.xib --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/Base.lproj/DFNet.xib 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/Base.lproj/DFNet.xib 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/Base.lproj/SockDialog.xib pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/Base.lproj/SockDialog.xib --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/Base.lproj/SockDialog.xib 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/Base.lproj/SockDialog.xib 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/DFNet.exp pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/DFNet.exp --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/DFNet.exp 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/DFNet.exp 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,23 @@ +# DFNet.exp +# Pcsxr +# +# Created by C.W. Betts on 2/8/15. +# + +_PSEgetLibType +_PSEgetLibName +_PSEgetLibVersion + +_NETinit +_NETshutdown +_NETclose +_NETconfigure +_NETtest +_NETabout +_NETpause +_NETresume +_NETqueryPlayer +_NETsendData +_NETrecvData +_NETsendPadData +_NETrecvPadData diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/en.lproj/Credits.rtf pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/en.lproj/Credits.rtf --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/en.lproj/Credits.rtf 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/en.lproj/Credits.rtf 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,14 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural + +\f0\b\fs24 \cf0 Original coder: +\b0 \ + linuzappz\ +\ + +\b Macintosh Port: +\b0 \ + C.W. \'93Madd the Sane\'94 Betts} \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/en.lproj/DFNet.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/en.lproj/DFNet.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/en.lproj/DFNet.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/en.lproj/DFNet.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,27 @@ + +/* Class = "NSWindow"; title = "Settings"; ObjectID = "1"; */ +"1.title" = "Settings"; + +/* Class = "NSTextFieldCell"; title = "127.0.0.1"; ObjectID = "10"; */ +"10.title" = "127.0.0.1"; + +/* Class = "NSTextFieldCell"; title = "33306"; ObjectID = "18"; */ +"18.title" = "33306"; + +/* Class = "NSTextFieldCell"; title = "IP Address:"; ObjectID = "20"; */ +"20.title" = "IP Address:"; + +/* Class = "NSTextFieldCell"; title = "Port:"; ObjectID = "22"; */ +"22.title" = "Port:"; + +/* Class = "NSTextFieldCell"; title = "Player Number:"; ObjectID = "25"; */ +"25.title" = "Player Number:"; + +/* Class = "NSTextFieldCell"; title = "1"; ObjectID = "27"; */ +"27.title" = "1"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "55"; */ +"55.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "60"; */ +"60.title" = "Cancel"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/en.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/en.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/en.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/en.lproj/InfoPlist.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,6 @@ +/* Localized versions of Info.plist keys */ + +CFBundleName = "NetPlay"; +CFBundleShortVersionString = "1.0"; +CFBundleGetInfoString = "NetPlay plugin by linuzappz."; +NSHumanReadableCopyright = "Copyright © 2010 C.W. Betts."; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/en.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/en.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/en.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/en.lproj/Localizable.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,16 @@ +/* + Localizable.strings + DFNet + + Created by C.W. Betts on 11/17/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"Error allocating memory!\n" = "Error allocating memory!\n"; +"error connecting to %s: %s\n" = "Error connecting to %s: %s\n"; +"Socket Driver" = "Socket Driver"; + +"Address Too Long" = "Address Too Long"; +"The address is too long.\n\nTry to use only the IP address and not a host name." = "The address is too long.\n\nTry to use only the IP address and not a host name."; +"Blank Address" = "Blank Address"; +"The address specified is either blank, or can't be converted to ASCII.\n\nTry connecting directly using the IP address using latin numerals." = "The address specified is either blank, or can't be converted to ASCII.\n\nTry connecting directly using the IP address using latin numerals."; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/en.lproj/SockDialog.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/en.lproj/SockDialog.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/en.lproj/SockDialog.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/en.lproj/SockDialog.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,9 @@ + +/* Class = "NSWindow"; title = "Connecting…"; ObjectID = "1"; */ +"1.title" = "Connecting…"; + +/* Class = "NSTextFieldCell"; title = "Waiting for connections..."; ObjectID = "4"; */ +"4.title" = "Waiting for connections…"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "27"; */ +"27.title" = "Cancel"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/fr.lproj/DFNet.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/fr.lproj/DFNet.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/fr.lproj/DFNet.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/fr.lproj/DFNet.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,27 @@ + +/* Class = "NSWindow"; title = "Settings"; ObjectID = "1"; */ +"1.title" = "Settings"; + +/* Class = "NSTextFieldCell"; title = "127.0.0.1"; ObjectID = "10"; */ +"10.title" = "127.0.0.1"; + +/* Class = "NSTextFieldCell"; title = "33306"; ObjectID = "18"; */ +"18.title" = "33306"; + +/* Class = "NSTextFieldCell"; title = "IP Address:"; ObjectID = "20"; */ +"20.title" = "IP Address:"; + +/* Class = "NSTextFieldCell"; title = "Port:"; ObjectID = "22"; */ +"22.title" = "Port:"; + +/* Class = "NSTextFieldCell"; title = "Player Number:"; ObjectID = "25"; */ +"25.title" = "Player Number:"; + +/* Class = "NSTextFieldCell"; title = "1"; ObjectID = "27"; */ +"27.title" = "1"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "55"; */ +"55.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "60"; */ +"60.title" = "Cancel"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/fr.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/fr.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/fr.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/fr.lproj/Localizable.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,16 @@ +/* + Localizable.strings + DFNet + + Created by C.W. Betts on 11/17/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"Error allocating memory!\n" = "Erreur d'allocation mémoire !\n"; +"error connecting to %s: %s\n" = "Erreur lors de la connection à %s: %s\n"; +"Socket Driver" = "Pilote Socket"; + +//"Address Too Long" = "Address Too Long"; +//"The address is too long.\n\nTry to use only the IP address and not a host name." = "The address is too long.\n\nTry to use only the IP address and not a host name."; +//"Blank Address" = "Blank Address"; +//"The address specified is either blank, or can't be converted to ASCII.\n\nTry connecting directly using the IP address using latin numerals." = "The address specified is either blank, or can't be converted to ASCII.\n\nTry connecting directly using the IP address using latin numerals."; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/fr.lproj/SockDialog.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/fr.lproj/SockDialog.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/fr.lproj/SockDialog.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/fr.lproj/SockDialog.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,9 @@ + +/* Class = "NSWindow"; title = "Connecting…"; ObjectID = "1"; */ +"1.title" = "Connecting…"; + +/* Class = "NSTextFieldCell"; title = "Waiting for connections..."; ObjectID = "4"; */ +"4.title" = "Waiting for connections…"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "27"; */ +"27.title" = "Cancel"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/hu.lproj/DFNet.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/hu.lproj/DFNet.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/hu.lproj/DFNet.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/hu.lproj/DFNet.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,27 @@ + +/* Class = "NSWindow"; title = "Settings"; ObjectID = "1"; */ +"1.title" = "Settings"; + +/* Class = "NSTextFieldCell"; title = "127.0.0.1"; ObjectID = "10"; */ +"10.title" = "127.0.0.1"; + +/* Class = "NSTextFieldCell"; title = "33306"; ObjectID = "18"; */ +"18.title" = "33306"; + +/* Class = "NSTextFieldCell"; title = "IP Address:"; ObjectID = "20"; */ +"20.title" = "IP Address:"; + +/* Class = "NSTextFieldCell"; title = "Port:"; ObjectID = "22"; */ +"22.title" = "Port:"; + +/* Class = "NSTextFieldCell"; title = "Player Number:"; ObjectID = "25"; */ +"25.title" = "Player Number:"; + +/* Class = "NSTextFieldCell"; title = "1"; ObjectID = "27"; */ +"27.title" = "1"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "55"; */ +"55.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "60"; */ +"60.title" = "Cancel"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/hu.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/hu.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/hu.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/hu.lproj/Localizable.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,16 @@ +/* + Localizable.strings + DFNet + + Created by C.W. Betts on 11/17/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"Error allocating memory!\n" = "Memória kiosztási hiba!\n"; +"error connecting to %s: %s\n" = "hiba a következőhöz történő kapcsolódáskor: %s: %s\n"; +"Socket Driver" = "Socket illesztőprogram"; + +//"Address Too Long" = "Address Too Long"; +//"The address is too long.\n\nTry to use only the IP address and not a host name." = "The address is too long.\n\nTry to use only the IP address and not a host name."; +//"Blank Address" = "Blank Address"; +//"The address specified is either blank, or can't be converted to ASCII.\n\nTry connecting directly using the IP address using latin numerals." = "The address specified is either blank, or can't be converted to ASCII.\n\nTry connecting directly using the IP address using latin numerals."; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/hu.lproj/SockDialog.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/hu.lproj/SockDialog.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/hu.lproj/SockDialog.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/hu.lproj/SockDialog.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,9 @@ + +/* Class = "NSWindow"; title = "Connecting…"; ObjectID = "1"; */ +"1.title" = "Connecting…"; + +/* Class = "NSTextFieldCell"; title = "Waiting for connections..."; ObjectID = "4"; */ +"4.title" = "Waiting for connections…"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "27"; */ +"27.title" = "Cancel"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/Info.plist pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/Info.plist --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/Info.plist 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/Info.plist 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,26 @@ + + + + + CFBundleAllowMixedLocalizations + + CFBundleDevelopmentRegion + en_US + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + PsxP + CFBundleSignature + DNet + CFBundleVersion + 1.0 + NSPrincipalClass + DFNetPlayPluginConfigController + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/macsrc/cfg.c pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/macsrc/cfg.c --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/macsrc/cfg.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/macsrc/cfg.c 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,30 @@ +// +// DF Netplay Plugin +// +// Based on netSock 0.2 by linuzappz. +// The Plugin is free source code. +// + +#include +#include +#include + +#include "dfnet.h" + +void AboutDlgProc(); +void ConfDlgProc(); +void ReadConfig(); + +void NETabout() { + AboutDlgProc(); +} + +long NETconfigure() { + ConfDlgProc(); + + return 0; +} + +void LoadConf() { + ReadConfig(); +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/macsrc/PluginConfigController.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/macsrc/PluginConfigController.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/macsrc/PluginConfigController.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/macsrc/PluginConfigController.h 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,15 @@ +#define PluginConfigController DFNetPlayPluginConfigController + +#import + +@interface PluginConfigController : NSWindowController +@property (weak) IBOutlet NSTextField *ipAddress; +@property (weak) IBOutlet NSTextField *portNum; +@property (weak) IBOutlet NSTextField *playerNum; + +- (IBAction)cancel:(id)sender; +- (IBAction)ok:(id)sender; + +- (void)loadValues; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/macsrc/PluginConfigController.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/macsrc/PluginConfigController.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/macsrc/PluginConfigController.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/macsrc/PluginConfigController.m 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,166 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: Cdrom for Psemu Pro like Emulators + * By: linuzappz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#import "PluginConfigController.h" +#include "dfnet.h" + +#define kIPADDRKEY @"IP Address" +#define kIPPORT @"IP Port" +#define kPLAYERNUM @"Player Number" + +#define APP_ID @"net.codeplex.pcsxr.DFNet" +#define PrefsKey APP_ID @" Settings" +#define NSLocalizedStringInBundle(key, bundle, comment) \ + [bundle localizedStringForKey:(key) value:@"" table:nil] + +static PluginConfigController *windowController = nil; + +static inline void RunOnMainThreadSync(dispatch_block_t block) +{ + if ([NSThread isMainThread]) { + block(); + } else { + dispatch_sync(dispatch_get_main_queue(), block); + } +} + +void AboutDlgProc() +{ + // Get parent application instance + NSBundle *bundle = [NSBundle bundleWithIdentifier:APP_ID]; + + // Get Credits.rtf + NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; + NSAttributedString *credits; + if (!path) { + path = [bundle pathForResource:@"Credits" ofType:@"rtfd"]; + } + if (path) { + credits = [[NSAttributedString alloc] initWithPath:path documentAttributes:NULL]; + } else { + credits = [[NSAttributedString alloc] initWithString:@""]; + } + + // Get Application Icon + NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:[bundle bundlePath]]; + [icon setSize:NSMakeSize(64, 64)]; + + NSDictionary *infoPaneDict = + @{@"ApplicationName": [bundle objectForInfoDictionaryKey:@"CFBundleName"], + @"ApplicationIcon": icon, + @"ApplicationVersion": [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], + @"Version": [bundle objectForInfoDictionaryKey:@"CFBundleVersion"], + @"Copyright": [bundle objectForInfoDictionaryKey:@"NSHumanReadableCopyright"], + @"Credits": credits}; + dispatch_async(dispatch_get_main_queue(), ^{ + [NSApp orderFrontStandardAboutPanelWithOptions:infoPaneDict]; + }); +} + +void ConfDlgProc() +{ + RunOnMainThreadSync(^{ + NSWindow *window; + + if (windowController == nil) { + windowController = [[PluginConfigController alloc] initWithWindowNibName:@"DFNet"]; + } + window = [windowController window]; + + [windowController loadValues]; + + [window center]; + [window makeKeyAndOrderFront:nil]; + }); +} + +void ReadConfig() +{ + NSDictionary *keyValues; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + [defaults registerDefaults:@{PrefsKey: @{kIPADDRKEY: @"127.0.0.1", + kIPPORT: @33306, + kPLAYERNUM: @1}}]; + + keyValues = [defaults dictionaryForKey:PrefsKey]; + + conf.PortNum = [keyValues[kIPPORT] unsignedShortValue]; + conf.PlayerNum = [keyValues[kPLAYERNUM] intValue]; + strlcpy(conf.ipAddress, [keyValues[kIPADDRKEY] cStringUsingEncoding:NSASCIIStringEncoding], sizeof(conf.ipAddress)); +} + +@implementation PluginConfigController +@synthesize ipAddress; +@synthesize portNum; +@synthesize playerNum; + +- (IBAction)cancel:(id)sender +{ + [self close]; +} + +- (IBAction)ok:(id)sender +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSBundle *curBundle = [NSBundle bundleForClass:[PluginConfigController class]]; + + NSString *theAddress = [ipAddress stringValue]; + NSInteger asciiLen = [theAddress lengthOfBytesUsingEncoding:NSASCIIStringEncoding]; + if (asciiLen > (sizeof(conf.ipAddress) - 1)) { + NSBeginAlertSheet(NSLocalizedStringInBundle(@"Address Too Long", curBundle, nil), nil, nil, nil, [self window], nil, NULL, NULL, NULL, @"%@", NSLocalizedStringInBundle(@"The address is too long.\n\nTry to use only the IP address and not a host name.", curBundle, nil)); + return; + } else if (asciiLen == 0) { + NSBeginAlertSheet(NSLocalizedStringInBundle(@"Blank Address", curBundle, nil), nil, nil, nil, [self window], nil, NULL, NULL, NULL, @"%@", NSLocalizedStringInBundle(@"The address specified is either blank, or can't be converted to ASCII.\n\nTry connecting directly using the IP address using latin numerals.", curBundle, nil)); + return; + } + + + NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:[defaults dictionaryForKey:PrefsKey]]; + writeDic[kIPPORT] = @((unsigned short)[portNum intValue]); + writeDic[kPLAYERNUM] = @([playerNum intValue]); + writeDic[kIPADDRKEY] = theAddress; + + // write to defaults + [defaults setObject:writeDic forKey:PrefsKey]; + [defaults synchronize]; + + // and set global values accordingly + ReadConfig(); + + [self close]; +} + +- (void)loadValues +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + ReadConfig(); + NSDictionary *keyValues = [defaults dictionaryForKey:PrefsKey]; + + [ipAddress setStringValue:keyValues[kIPADDRKEY]]; + [portNum setIntValue:[keyValues[kIPPORT] unsignedShortValue]]; + [playerNum setIntValue:[keyValues[kPLAYERNUM] intValue]]; +} + +@end + +#import "OSXPlugLocalization.h" +PLUGLOCIMP([PluginConfigController class]) diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/macsrc/SockDialog.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/macsrc/SockDialog.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/macsrc/SockDialog.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/macsrc/SockDialog.h 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,16 @@ +// +// SockDialog.h +// DFNet +// +// Created by C.W. Betts on 2/18/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import + + +@interface SockDialog : NSWindowController +@property (weak) IBOutlet NSProgressIndicator *spinningBar; + +- (IBAction)cancel:(id)sender; +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/macsrc/SockDialog.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/macsrc/SockDialog.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/macsrc/SockDialog.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/macsrc/SockDialog.m 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,99 @@ +// +// SockDialog.m +// DFNet +// +// Created by C.W. Betts on 2/18/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import "SockDialog.h" +#include "dfnet.h" + +#import "EmuThread.h" + +void SysMessage(const char *fmt, ...) +{ + va_list list; + va_start(list, fmt); + NSString *errString = [[NSString alloc] initWithFormat:@(fmt) arguments:list]; + va_end(list); + + fprintf(stderr, "message %s\n", [errString UTF8String]); + NSAlert *alert = [NSAlert alertWithMessageText:@"Error" defaultButton:@"Stop" alternateButton:nil otherButton:nil informativeTextWithFormat:@"%@", errString]; + [alert setAlertStyle:NSCriticalAlertStyle]; + NSInteger result = [alert runModal]; + if (result == NSAlertDefaultReturn) { + Class theEmuClass = NSClassFromString(@"EmuThread"); + if (theEmuClass) { + [theEmuClass stop]; + } else { + NSLog(@"Unable to stop emulation because the Objective-C class \"EmuThreaed\" was not found."); + NSLog(@"Are you using a different emulator than PCSXR?"); + } + } +} + +static inline void RunOnMainThreadSync(dispatch_block_t block) +{ + if ([NSThread isMainThread]) { + block(); + } else { + dispatch_sync(dispatch_get_main_queue(), block); + } +} + +static SockDialog *globalSock = nil; + +void sockCreateWaitDlg() +{ + RunOnMainThreadSync(^{ + if (globalSock == nil) { + globalSock = [[SockDialog alloc] init]; + } + NSWindow *tempWindow = [globalSock window]; + [tempWindow center]; + [globalSock showWindow:nil]; + [tempWindow makeKeyAndOrderFront:nil]; + }); +} + +void sockDlgUpdate() +{ + +} + +long sockOpen() +{ + LoadConf(); + + return 0; +} + +void sockDestroyWaitDlg() +{ + RunOnMainThreadSync(^{ + if (globalSock != nil) { + [globalSock close]; + globalSock = nil; + } + }); +} + +@implementation SockDialog +@synthesize spinningBar; + +- (IBAction)cancel:(id)sender { + WaitCancel = 1; +} + +- (instancetype)init +{ + return self = [self initWithWindowNibName:@"SockDialog"]; +} + +- (void)awakeFromNib +{ + [spinningBar startAnimation:nil]; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/version.plist pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/version.plist --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/version.plist 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/version.plist 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,16 @@ + + + + + BuildVersion + 38 + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + ProjectName + DFCdrom + SourceVersion + 2350000 + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/zh-Hans.lproj/Credits.rtf pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/zh-Hans.lproj/Credits.rtf --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/zh-Hans.lproj/Credits.rtf 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/zh-Hans.lproj/Credits.rtf 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,21 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset134 STHeitiSC-Light;} +{\colortbl;\red255\green255\blue255;} +\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural + +\f0\b\fs24 \cf0 Original coder: +\b0 \ + linuzappz\ +\ + +\b Macintosh Port: +\b0 \ + C.W. \'93Madd the Sane\'94 Betts\ +\ + +\b Chinese Translation( +\f1 \'d6\'d0\'ce\'c4\'b7\'ad\'d2\'eb +\f0 ): +\b0 \ + Sdchun} \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/zh-Hans.lproj/DFNet.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/zh-Hans.lproj/DFNet.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/zh-Hans.lproj/DFNet.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/zh-Hans.lproj/DFNet.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,27 @@ + +/* Class = "NSWindow"; title = "设置"; ObjectID = "1"; */ +"1.title" = "设置"; + +/* Class = "NSTextFieldCell"; title = "127.0.0.1"; ObjectID = "10"; */ +"10.title" = "127.0.0.1"; + +/* Class = "NSTextFieldCell"; title = "33306"; ObjectID = "18"; */ +"18.title" = "33306"; + +/* Class = "NSTextFieldCell"; title = "IP 地址:"; ObjectID = "20"; */ +"20.title" = "IP 地址:"; + +/* Class = "NSTextFieldCell"; title = "端口:"; ObjectID = "22"; */ +"22.title" = "端口:"; + +/* Class = "NSTextFieldCell"; title = "玩家编号:"; ObjectID = "25"; */ +"25.title" = "玩家编号:"; + +/* Class = "NSTextFieldCell"; title = "1"; ObjectID = "27"; */ +"27.title" = "1"; + +/* Class = "NSButtonCell"; title = "确认"; ObjectID = "55"; */ +"55.title" = "确认"; + +/* Class = "NSButtonCell"; title = "取消"; ObjectID = "60"; */ +"60.title" = "取消"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/zh-Hans.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/zh-Hans.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/zh-Hans.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/zh-Hans.lproj/InfoPlist.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,6 @@ +/* Localized versions of Info.plist keys */ + +CFBundleName = "网络玩家"; +CFBundleShortVersionString = "1.0"; +CFBundleGetInfoString = "NetPlay plugin by linuzappz."; +NSHumanReadableCopyright = "Copyright © 2010 C.W. Betts."; \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/zh-Hans.lproj/SockDialog.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/zh-Hans.lproj/SockDialog.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFNet/zh-Hans.lproj/SockDialog.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFNet/zh-Hans.lproj/SockDialog.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,9 @@ + +/* Class = "NSWindow"; title = "连接中…"; ObjectID = "1"; */ +"1.title" = "连接中…"; + +/* Class = "NSTextFieldCell"; title = "连接等待中..."; ObjectID = "4"; */ +"4.title" = "连接等待中…"; + +/* Class = "NSButtonCell"; title = "取消"; ObjectID = "27"; */ +"27.title" = "取消"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/macsrc/maccfg.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/macsrc/maccfg.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/macsrc/maccfg.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/macsrc/maccfg.h 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,13 @@ +// +// maccfg.h +// PeopsSPU +// + +#ifndef PeopsSPU_maccfg_h +#define PeopsSPU_maccfg_h + +void DoAbout(); +long DoConfiguration(); +void LoadConfiguration(); + +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/macsrc/NamedSlider.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/macsrc/NamedSlider.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/macsrc/NamedSlider.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/macsrc/NamedSlider.h 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,8 @@ +/* NetSfPeopsSPUPluginNamedSlider */ + +#import + +@interface NamedSlider : NSSlider +@property (strong) NSArray *strings; +@property (unsafe_unretained) Class pluginClass; +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/macsrc/NamedSlider.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/macsrc/NamedSlider.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/macsrc/NamedSlider.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/macsrc/NamedSlider.m 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,34 @@ +#import "NamedSlider.h" + +@implementation NamedSlider +@synthesize pluginClass; +@synthesize strings; + +- (NSString *)stringValue +{ + NSInteger index = [self integerValue]; + + if (index >= 0 && index < [strings count]) + return strings[index]; + + if (!pluginClass) { + return @"(Unknown)"; + } else { + return [[NSBundle bundleForClass:pluginClass] localizedStringForKey:@"(Unknown)" value:@"" table:nil]; + } +} + +- (void)setIntValue:(int)value +{ + [super setIntValue:value]; + [self sendAction:[self action] to:[self target]]; +} + +- (void)setIntegerValue:(NSInteger)anInteger +{ + [super setIntegerValue:anInteger]; + [self sendAction:[self action] to:[self target]]; +} + + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/macsrc/PluginController.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/macsrc/PluginController.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/macsrc/PluginController.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/macsrc/PluginController.h 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,13 @@ +/* NetSfPeopsSPUPluginController */ + +#import +#import "SPUPluginController.h" + +#ifdef USEOPENAL +#define PluginController NetSfPeopsSPUALPluginController +#else +#define PluginController NetSfPeopsSPUSDLPluginController +#endif + +@interface PluginController : SPUPluginController +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/macsrc/PluginController.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/macsrc/PluginController.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/macsrc/PluginController.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/macsrc/PluginController.m 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,224 @@ +#import "PluginController.h" +#include "stdafx.h" +#include "externals.h" +#include "maccfg.h" + +#ifdef ENABLE_NLS +#include +#include +#define _(x) gettext(x) +#define N_(x) (x) +//If running under Mac OS X, use the Localizable.strings file instead. +#elif defined(_MACOSX) +#ifdef PCSXRCORE +__private_extern char* Pcsxr_locale_text(char* toloc); +#define _(String) Pcsxr_locale_text(String) +#define N_(String) String +#else +#ifndef PCSXRPLUG +#warning please define the plug being built to use Mac OS X localization! +#define _(msgid) msgid +#define N_(msgid) msgid +#else +//Kludge to get the preprocessor to accept PCSXRPLUG as a variable. +#define PLUGLOC_x(x,y) x ## y +#define PLUGLOC_y(x,y) PLUGLOC_x(x,y) +#define PLUGLOC PLUGLOC_y(PCSXRPLUG,_locale_text) +__private_extern char* PLUGLOC(char* toloc); +#define _(String) PLUGLOC(String) +#define N_(String) String +#endif +#endif +#else +#define _(x) (x) +#define N_(x) (x) +#endif + +#ifdef USEOPENAL +#define APP_ID @"net.sf.peops.SPUALPlugin" +#else +#define APP_ID @"net.sf.peops.SPUSDLPlugin" +#endif +#define PrefsKey APP_ID @" Settings" + +static SPUPluginController *pluginController = nil; + +static inline void RunOnMainThreadSync(dispatch_block_t block) +{ + if ([NSThread isMainThread]) { + block(); + } else { + dispatch_sync(dispatch_get_main_queue(), block); + } +} + +void DoAbout() +{ + // Get parent application instance + NSBundle *bundle = [NSBundle bundleWithIdentifier:APP_ID]; + + // Get Credits.rtf + NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; + NSAttributedString *credits; + if (!path) { + path = [bundle pathForResource:@"Credits" ofType:@"rtfd"]; + } + if (path) { + credits = [[NSAttributedString alloc] initWithPath:path documentAttributes:NULL]; + } else { + credits = [[NSAttributedString alloc] initWithString:@""]; + } + + // Get Application Icon + NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:[bundle bundlePath]]; + NSSize size = NSMakeSize(64, 64); + [icon setSize:size]; + + NSDictionary *infoPaneDict = + @{@"ApplicationName": [bundle objectForInfoDictionaryKey:@"CFBundleName"], + @"ApplicationIcon": icon, + @"ApplicationVersion": [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], + @"Version": [bundle objectForInfoDictionaryKey:@"CFBundleVersion"], + @"Copyright": [bundle objectForInfoDictionaryKey:@"NSHumanReadableCopyright"], + @"Credits": credits}; + dispatch_async(dispatch_get_main_queue(), ^{ + [NSApp orderFrontStandardAboutPanelWithOptions:infoPaneDict]; + }); +} + +long DoConfiguration() +{ + RunOnMainThreadSync(^{ + NSWindow *window; + + if (pluginController == nil) { + pluginController = [[PluginController alloc] initWithWindowNibName:@"NetSfPeopsSpuPluginMain"]; + } + window = [pluginController window]; + + /* load values */ + [pluginController loadValues]; + + [window center]; + [window makeKeyAndOrderFront:nil]; + }); + + return 0; +} + +void ReadConfig(void) +{ + NSDictionary *keyValues; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults registerDefaults: + @{PrefsKey: @{@"High Compatibility Mode": @YES, + @"SPU IRQ Wait": @YES, + @"XA Pitch": @NO, + @"Mono Sound Output": @NO, + @"Interpolation Quality": @0, + @"Reverb Quality": @1, + @"Volume": @3}}]; + + keyValues = [defaults dictionaryForKey:PrefsKey]; + + iUseTimer = [keyValues[@"High Compatibility Mode"] boolValue] ? 2 : 0; + iSPUIRQWait = [keyValues[@"SPU IRQ Wait"] boolValue]; + iDisStereo = [keyValues[@"Mono Sound Output"] boolValue]; + iXAPitch = [keyValues[@"XA Pitch"] boolValue]; + + iUseInterpolation = [keyValues[@"Interpolation Quality"] intValue]; + iUseReverb = [keyValues[@"Reverb Quality"] intValue]; + + iVolume = 5 - [keyValues[@"Volume"] intValue]; +} + +@implementation PluginController + +- (IBAction)cancel:(id)sender +{ + [self close]; +} + +- (IBAction)ok:(id)sender +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:self.keyValues]; + writeDic[@"High Compatibility Mode"] = ([self.hiCompBox intValue] ? @YES : @NO); + writeDic[@"SPU IRQ Wait"] = ([self.irqWaitBox intValue] ? @YES : @NO); + writeDic[@"Mono Sound Output"] = ([self.monoSoundBox intValue] ? @YES : @NO); + writeDic[@"XA Pitch"] = ([self.xaSpeedBox intValue] ? @YES : @NO); + + writeDic[@"Interpolation Quality"] = @([self.interpolValue intValue]); + writeDic[@"Reverb Quality"] = @([self.reverbValue intValue]); + + writeDic[@"Volume"] = @([self.volumeValue intValue]); + + // write to defaults + [defaults setObject:writeDic forKey:PrefsKey]; + [defaults synchronize]; + + // and set global values accordingly + ReadConfig(); + + [self close]; +} + +- (IBAction)reset:(id)sender +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults removeObjectForKey:PrefsKey]; + [self loadValues]; +} + +- (void)loadValues +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + ReadConfig(); + + /* load from preferences */ + self.keyValues = [NSMutableDictionary dictionaryWithDictionary:[defaults dictionaryForKey:PrefsKey]]; + + [self.hiCompBox setIntValue:[self.keyValues[@"High Compatibility Mode"] boolValue]]; + [self.irqWaitBox setIntValue:[self.keyValues[@"SPU IRQ Wait"] boolValue]]; + [self.monoSoundBox setIntValue:[self.keyValues[@"Mono Sound Output"] boolValue]]; + [self.xaSpeedBox setIntValue:[self.keyValues[@"XA Pitch"] boolValue]]; + + [self.interpolValue setIntValue:[self.keyValues[@"Interpolation Quality"] intValue]]; + [self.reverbValue setIntValue:[self.keyValues[@"Reverb Quality"] intValue]]; + [self.volumeValue setIntValue:[self.keyValues[@"Volume"] intValue]]; +} + +- (void)awakeFromNib +{ + Class thisClass = [self class]; + + NSBundle *spuBundle = [NSBundle bundleForClass:thisClass]; + + [self.interpolValue setStrings:@[ + [spuBundle localizedStringForKey:@"(No Interpolation)" value:@"" table:nil], + [spuBundle localizedStringForKey:@"(Simple Interpolation)" value:@"" table:nil], + [spuBundle localizedStringForKey:@"(Gaussian Interpolation)" value:@"" table:nil], + [spuBundle localizedStringForKey:@"(Cubic Interpolation)" value:@"" table:nil]]]; + self.interpolValue.pluginClass = thisClass; + + [self.reverbValue setStrings:@[ + [spuBundle localizedStringForKey:@"(No Reverb)" value:@"" table:nil], + [spuBundle localizedStringForKey:@"(Simple Reverb)" value:@"" table:nil], + [spuBundle localizedStringForKey:@"(PSX Reverb)" value:@"" table:nil]]]; + self.reverbValue.pluginClass = thisClass; + + [self.volumeValue setStrings:@[ + [spuBundle localizedStringForKey:@"(Muted)" value:@"" table:nil], + [spuBundle localizedStringForKey:@"(Low)" value:@"" table:nil], + [spuBundle localizedStringForKey:@"(Medium)" value:@"" table:nil], + [spuBundle localizedStringForKey:@"(Loud)" value:@"" table:nil], + [spuBundle localizedStringForKey:@"(Loudest)" value:@"" table:nil]]]; + self.volumeValue.pluginClass = thisClass; +} + +@end + +#import "OSXPlugLocalization.h" +PLUGLOCIMP([PluginController class]); diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/macsrc/SPUPluginController.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/macsrc/SPUPluginController.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/macsrc/SPUPluginController.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/macsrc/SPUPluginController.h 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,28 @@ +// +// SPUPluginController.h +// PeopsSPU +// +// Created by C.W. Betts on 7/2/13. +// +// + +#import +#import "NamedSlider.h" + +@interface SPUPluginController : NSWindowController +@property (weak) IBOutlet NSCell *hiCompBox; +@property (weak) IBOutlet NamedSlider *interpolValue; +@property (weak) IBOutlet NSCell *irqWaitBox; +@property (weak) IBOutlet NSCell *monoSoundBox; +@property (weak) IBOutlet NamedSlider *reverbValue; +@property (weak) IBOutlet NSCell *xaEnableBox; +@property (weak) IBOutlet NSCell *xaSpeedBox; +@property (weak) IBOutlet NamedSlider *volumeValue; +@property (readwrite, strong) NSMutableDictionary *keyValues; + +- (IBAction)cancel:(id)sender; +- (IBAction)ok:(id)sender; +- (IBAction)reset:(id)sender; + +- (void)loadValues; +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/macsrc/SPUPluginController.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/macsrc/SPUPluginController.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/macsrc/SPUPluginController.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/macsrc/SPUPluginController.m 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,65 @@ +// +// SPUPluginController.m +// PeopsSPU +// +// Created by C.W. Betts on 7/2/13. +// +// + +#import "SPUPluginController.h" + +#ifdef DEBUG +static inline Class GetSPUBaseClass() +{ + static Class spuBaseClass; + if (!spuBaseClass) { + spuBaseClass = [SPUPluginController class]; + } + return spuBaseClass; +} +#endif + +static void FuncNotAvailable(id sel, id sender, SEL theCmd) +{ +#ifdef DEBUG + NSString *selString = NSStringFromSelector(theCmd); + if (sender) { + NSLog(@"Class %@ does not implement %@, and was sent a(n) %@ with the description %@", [sel class], selString, [sender class], [sender description]); + } else { + NSLog(@"Class %@ does not implement %@", [sel class], selString); + } + if ([sel class] == GetSPUBaseClass()) { + NSLog(@"For one thing, the class %@ isn't supposed to be accessed directly, just subclassed!", GetSPUBaseClass()); \ + } else { + NSLog(@"You should implement %@ for your class %@. As it is, you are calling %@ from the superclass %@.", selString, [sel class], selString, GetSPUBaseClass()); + } +#endif + [sel doesNotRecognizeSelector:theCmd]; +} + +#define NotAvailableWarn(sender) FuncNotAvailable(self, sender, _cmd) + +@implementation SPUPluginController +@synthesize keyValues; + +- (IBAction)cancel:(id)sender +{ + NotAvailableWarn(sender); +} + +- (IBAction)ok:(id)sender +{ + NotAvailableWarn(sender); +} + +- (IBAction)reset:(id)sender +{ + NotAvailableWarn(sender); +} + +- (void)loadValues +{ + NotAvailableWarn(nil); +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/OpenAL/en.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/OpenAL/en.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/OpenAL/en.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/OpenAL/en.lproj/InfoPlist.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,6 @@ +/* Localized versions of Info.plist keys */ + +CFBundleName = "OpenAL Sound Plugin"; +CFBundleShortVersionString = "SPU Plugin for PCSXR"; +CFBundleGetInfoString = "Based on P.E.Op.S. SPU Sound Plugin."; +NSHumanReadableCopyright = "Copyright © 2004 Gil Pedersen."; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/OpenAL/Info-AL.plist pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/OpenAL/Info-AL.plist --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/OpenAL/Info-AL.plist 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/OpenAL/Info-AL.plist 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,26 @@ + + + + + CFBundleAllowMixedLocalizations + + CFBundleDevelopmentRegion + en_US + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + PsxP + CFBundleSignature + PSPU + CFBundleVersion + 1.19 + NSPrincipalClass + NetSfPeopsSPUALPluginController + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/SDL/en.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/SDL/en.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/SDL/en.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/SDL/en.lproj/InfoPlist.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,6 @@ +/* Localized versions of Info.plist keys */ + +CFBundleName = "SDL Sound Plugin"; +CFBundleShortVersionString = "SPU Plugin for PCSXR"; +CFBundleGetInfoString = "Based on P.E.Op.S. SPU Sound Plugin."; +NSHumanReadableCopyright = "Copyright © 2004 Gil Pedersen."; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/SDL/Info-SDL.plist pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/SDL/Info-SDL.plist --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/SDL/Info-SDL.plist 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/SDL/Info-SDL.plist 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,26 @@ + + + + + CFBundleAllowMixedLocalizations + + CFBundleDevelopmentRegion + en_US + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + PsxP + CFBundleSignature + PSPU + CFBundleVersion + 1.19 + NSPrincipalClass + NetSfPeopsSPUSDLPluginController + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/Base.lproj/NetSfPeopsSpuPluginMain.xib pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/Base.lproj/NetSfPeopsSpuPluginMain.xib --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/Base.lproj/NetSfPeopsSpuPluginMain.xib 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/Base.lproj/NetSfPeopsSpuPluginMain.xib 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,304 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/DFSound.exp pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/DFSound.exp --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/DFSound.exp 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/DFSound.exp 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,27 @@ + +_PSEgetLibType +_PSEgetLibName +_PSEgetLibVersion +_SPUconfigure +_SPUabout +_SPUinit +_SPUshutdown +_SPUtest +_SPUopen +_SPUclose + +_SPUplayADPCMchannel +_SPUwriteRegister +_SPUreadRegister +_SPUregisterCallback + +_SPUwriteDMA +_SPUreadDMA +_SPUregisterCDDAVolume +_SPUwriteDMAMem +_SPUreadDMAMem +_SPUfreeze +_SPUupdate +_SPUasync + +_SPUplayCDDAchannel diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/en.lproj/Credits.rtf pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/en.lproj/Credits.rtf --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/en.lproj/Credits.rtf 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/en.lproj/Credits.rtf 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,15 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural + +\f0\b\fs24 \cf0 Macintosh Port: +\b0 \ + Gil Pedersen\ + C.W. \'93Madd the Sane\'94 Betts\ +\ + +\b Original coders: +\b0 \ + Pete Bernert and the P.E.Op.S. team} \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/en.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/en.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/en.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/en.lproj/Localizable.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,33 @@ +/* + Localizable.strings + PeopsSPU + + Created by C.W. Betts on 11/16/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"SDL Sound" = "SDL Sound"; +"OpenAL Sound" = "OpenAL Sound"; +"Mac OS X Sound" = "Mac OS X Sound"; +"P.E.Op.S. Sound Driver V1.7\nCoded by Pete Bernert and the P.E.Op.S. team\n" = "P.E.Op.S. Sound Driver V1.7\nCoded by Pete Bernert and the P.E.Op.S. team\n"; + +/*Unknown/not found value */ +"(Unknown)" = "(Unknown)"; + +/* Interpolation Values */ +"(No Interpolation)" = "(No Interpolation)"; +"(Simple Interpolation)" = "(Simple Interpolation)"; +"(Gaussian Interpolation)" = "(Gaussian Interpolation)"; +"(Cubic Interpolation)" = "(Cubic Interpolation)"; + +/* Reverb Values */ +"(No Reverb)" = "(No Reverb)"; +"(Simple Reverb)" = "(Simple Reverb)"; +"(PSX Reverb)" = "(PSX Reverb)"; + +/* Volume Values */ +"(Muted)" = "(Muted)"; +"(Low)" = "(Low)"; +"(Medium)" = "(Medium)"; +"(Loud)" = "(Loud)"; +"(Loudest)" = "(Loudest)"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/en.lproj/NetSfPeopsSpuPluginMain.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/en.lproj/NetSfPeopsSpuPluginMain.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/en.lproj/NetSfPeopsSpuPluginMain.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/en.lproj/NetSfPeopsSpuPluginMain.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,57 @@ + +/* Class = "NSWindow"; title = "SPU Configuration"; ObjectID = "6"; */ +"6.title" = "SPU Configuration"; + +/* Class = "NSBox"; title = "General Settings"; ObjectID = "9"; */ +"9.title" = "General Settings"; + +/* Class = "NSBox"; title = "XA Music"; ObjectID = "19"; */ +"19.title" = "XA Music"; + +/* Class = "NSBox"; title = "Misc"; ObjectID = "24"; */ +"24.title" = "Misc"; + +/* Class = "NSTextFieldCell"; title = "Reverb:"; ObjectID = "80"; */ +"80.title" = "Reverb:"; + +/* Class = "NSTextFieldCell"; title = "Interpolation:"; ObjectID = "82"; */ +"82.title" = "Interpolation:"; + +/* Class = "NSTextFieldCell"; title = "(Simple Reverb)"; ObjectID = "84"; */ +"84.title" = "(Simple Reverb)"; + +/* Class = "NSTextFieldCell"; title = "(Simple Interpolation)"; ObjectID = "85"; */ +"85.title" = "(Simple Interpolation)"; + +/* Class = "NSTextFieldCell"; title = "Volume:"; ObjectID = "86"; */ +"86.title" = "Volume:"; + +/* Class = "NSTextFieldCell"; title = "(Loud)"; ObjectID = "88"; */ +"88.title" = "(Loud)"; + +/* Class = "NSButtonCell"; title = "Change XA Speed"; ObjectID = "89"; */ +"89.title" = "Change XA Speed"; + +/* Class = "NSButtonCell"; title = "High Compatibility Mode"; ObjectID = "90"; */ +"90.title" = "High Compatibility Mode"; + +/* Class = "NSButtonCell"; title = "SPU IRQ Wait"; ObjectID = "91"; */ +"91.title" = "SPU IRQ Wait"; + +/* Class = "NSButtonCell"; title = "Mono Sound"; ObjectID = "92"; */ +"92.title" = "Mono Sound"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "163"; */ +"163.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "167"; */ +"167.title" = "Cancel"; + +/* Class = "NSButtonCell"; title = "Reset"; ObjectID = "172"; */ +"172.title" = "Reset"; + +/* Class = "NSButtonCell"; title = "High Compatibility Mode"; ObjectID = "197"; */ +"197.title" = "High Compatibility Mode"; + +/* Class = "NSButtonCell"; title = "Change XA Speed"; ObjectID = "234"; */ +"234.title" = "Change XA Speed"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/fr.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/fr.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/fr.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/fr.lproj/Localizable.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,35 @@ +/* + Localizable.strings + PeopsSPU + + Created by C.W. Betts on 11/16/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +//Commented out strings are those that need to be translated + +"SDL Sound" = "Son SDL"; +"OpenAL Sound" = "Son OpenAL"; +"Mac OS X Sound" = "Son Mac OS X"; +"P.E.Op.S. Sound Driver V1.7\nCoded by Pete Bernert and the P.E.Op.S. team\n" = "Pilote de son P.E.Op.S. V1.7\nCodé par Pete Bernert et l'équipe P.E.Op.S.\n"; + +/*Unknown/not found value */ +"(Unknown)" = "(Unknown)"; + +/* Interpolation Values */ +//"(No Interpolation)" = "(No Interpolation)"; +//"(Simple Interpolation)" = "(Simple Interpolation)"; +//"(Gaussian Interpolation)" = "(Gaussian Interpolation)"; +//"(Cubic Interpolation)" = "(Cubic Interpolation)"; + +/* Reverb Values */ +//"(No Reverb)" = "(No Reverb)"; +//"(Simple Reverb)" = "(Simple Reverb)"; +//"(PSX Reverb)" = "(PSX Reverb)"; + +/* Volume Values */ +//"(Muted)" = "(Muted)"; +//"(Low)" = "(Low)"; +//"(Medium)" = "(Medium)"; +//"(Loud)" = "(Loud)"; +//"(Loudest)" = "(Loudest)"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/fr.lproj/NetSfPeopsSpuPluginMain.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/fr.lproj/NetSfPeopsSpuPluginMain.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/fr.lproj/NetSfPeopsSpuPluginMain.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/fr.lproj/NetSfPeopsSpuPluginMain.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,57 @@ + +/* Class = "NSWindow"; title = "SPU Configuration"; ObjectID = "6"; */ +"6.title" = "SPU Configuration"; + +/* Class = "NSBox"; title = "General Settings"; ObjectID = "9"; */ +"9.title" = "General Settings"; + +/* Class = "NSBox"; title = "XA Music"; ObjectID = "19"; */ +"19.title" = "XA Music"; + +/* Class = "NSBox"; title = "Misc"; ObjectID = "24"; */ +"24.title" = "Misc"; + +/* Class = "NSTextFieldCell"; title = "Reverb:"; ObjectID = "80"; */ +"80.title" = "Reverb:"; + +/* Class = "NSTextFieldCell"; title = "Interpolation:"; ObjectID = "82"; */ +"82.title" = "Interpolation:"; + +/* Class = "NSTextFieldCell"; title = "(Simple Reverb)"; ObjectID = "84"; */ +"84.title" = "(Simple Reverb)"; + +/* Class = "NSTextFieldCell"; title = "(Simple Interpolation)"; ObjectID = "85"; */ +"85.title" = "(Simple Interpolation)"; + +/* Class = "NSTextFieldCell"; title = "Volume:"; ObjectID = "86"; */ +"86.title" = "Volume:"; + +/* Class = "NSTextFieldCell"; title = "(Loud)"; ObjectID = "88"; */ +"88.title" = "(Loud)"; + +/* Class = "NSButtonCell"; title = "Change XA Speed"; ObjectID = "89"; */ +"89.title" = "Change XA Speed"; + +/* Class = "NSButtonCell"; title = "High Compatibility Mode"; ObjectID = "90"; */ +"90.title" = "High Compatibility Mode"; + +/* Class = "NSButtonCell"; title = "SPU IRQ Wait"; ObjectID = "91"; */ +"91.title" = "SPU IRQ Wait"; + +/* Class = "NSButtonCell"; title = "Mono Sound"; ObjectID = "92"; */ +"92.title" = "Mono Sound"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "163"; */ +"163.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "167"; */ +"167.title" = "Cancel"; + +/* Class = "NSButtonCell"; title = "Reset"; ObjectID = "172"; */ +"172.title" = "Reset"; + +/* Class = "NSButtonCell"; title = "High Compatibility Mode"; ObjectID = "197"; */ +"197.title" = "High Compatibility Mode"; + +/* Class = "NSButtonCell"; title = "Change XA Speed"; ObjectID = "234"; */ +"234.title" = "Change XA Speed"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/hu.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/hu.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/hu.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/hu.lproj/Localizable.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,35 @@ +/* + Localizable.strings + PeopsSPU + + Created by C.W. Betts on 11/16/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +//Commented out strings are those that need to be translated + +"SDL Sound" = "SDL hang"; +"OpenAL Sound" = "OpenAL hang"; +"Mac OS X Sound" = "Mac OS X hang"; +"P.E.Op.S. Sound Driver V1.7\nCoded by Pete Bernert and the P.E.Op.S. team\n" = "P.E.Op.S. Sound Driver V1.7\nFejlesztő Pete Bernert és a P.E.Op.S. team\n"; + +/*Unknown/not found value */ +//"(Unknown)" = "(Unknown)"; + +/* Interpolation Values */ +//"(No Interpolation)" = "(No Interpolation)"; +//"(Simple Interpolation)" = "(Simple Interpolation)"; +//"(Gaussian Interpolation)" = "(Gaussian Interpolation)"; +//"(Cubic Interpolation)" = "(Cubic Interpolation)"; + +/* Reverb Values */ +//"(No Reverb)" = "(No Reverb)"; +//"(Simple Reverb)" = "(Simple Reverb)"; +//"(PSX Reverb)" = "(PSX Reverb)"; + +/* Volume Values */ +//"(Muted)" = "(Muted)"; +//"(Low)" = "(Low)"; +//"(Medium)" = "(Medium)"; +//"(Loud)" = "(Loud)"; +//"(Loudest)" = "(Loudest)"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/hu.lproj/NetSfPeopsSpuPluginMain.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/hu.lproj/NetSfPeopsSpuPluginMain.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/hu.lproj/NetSfPeopsSpuPluginMain.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/hu.lproj/NetSfPeopsSpuPluginMain.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,57 @@ + +/* Class = "NSWindow"; title = "SPU Configuration"; ObjectID = "6"; */ +"6.title" = "SPU Configuration"; + +/* Class = "NSBox"; title = "General Settings"; ObjectID = "9"; */ +"9.title" = "General Settings"; + +/* Class = "NSBox"; title = "XA Music"; ObjectID = "19"; */ +"19.title" = "XA Music"; + +/* Class = "NSBox"; title = "Misc"; ObjectID = "24"; */ +"24.title" = "Misc"; + +/* Class = "NSTextFieldCell"; title = "Reverb:"; ObjectID = "80"; */ +"80.title" = "Reverb:"; + +/* Class = "NSTextFieldCell"; title = "Interpolation:"; ObjectID = "82"; */ +"82.title" = "Interpolation:"; + +/* Class = "NSTextFieldCell"; title = "(Simple Reverb)"; ObjectID = "84"; */ +"84.title" = "(Simple Reverb)"; + +/* Class = "NSTextFieldCell"; title = "(Simple Interpolation)"; ObjectID = "85"; */ +"85.title" = "(Simple Interpolation)"; + +/* Class = "NSTextFieldCell"; title = "Volume:"; ObjectID = "86"; */ +"86.title" = "Volume:"; + +/* Class = "NSTextFieldCell"; title = "(Loud)"; ObjectID = "88"; */ +"88.title" = "(Loud)"; + +/* Class = "NSButtonCell"; title = "Change XA Speed"; ObjectID = "89"; */ +"89.title" = "Change XA Speed"; + +/* Class = "NSButtonCell"; title = "High Compatibility Mode"; ObjectID = "90"; */ +"90.title" = "High Compatibility Mode"; + +/* Class = "NSButtonCell"; title = "SPU IRQ Wait"; ObjectID = "91"; */ +"91.title" = "SPU IRQ Wait"; + +/* Class = "NSButtonCell"; title = "Mono Sound"; ObjectID = "92"; */ +"92.title" = "Mono Sound"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "163"; */ +"163.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "167"; */ +"167.title" = "Cancel"; + +/* Class = "NSButtonCell"; title = "Reset"; ObjectID = "172"; */ +"172.title" = "Reset"; + +/* Class = "NSButtonCell"; title = "High Compatibility Mode"; ObjectID = "197"; */ +"197.title" = "High Compatibility Mode"; + +/* Class = "NSButtonCell"; title = "Change XA Speed"; ObjectID = "234"; */ +"234.title" = "Change XA Speed"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/SPUShared-info.plist pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/SPUShared-info.plist --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/SPUShared-info.plist 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/SPUShared-info.plist 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,16 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SPUSharedCode + CFBundleVersion + 1.19 + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/zh-Hans.lproj/Credits.rtf pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/zh-Hans.lproj/Credits.rtf --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/zh-Hans.lproj/Credits.rtf 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/zh-Hans.lproj/Credits.rtf 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,22 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset134 STHeitiSC-Light;} +{\colortbl;\red255\green255\blue255;} +\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural + +\f0\b\fs24 \cf0 Macintosh Port: +\b0 \ + Gil Pedersen\ + C.W. \'93Madd the Sane\'94 Betts\ +\ + +\b Original coders: +\b0 \ + Pete Bernert and the P.E.Op.S. team\ +\ + +\b Chinese Translation( +\f1 \'d6\'d0\'ce\'c4\'b7\'ad\'d2\'eb +\f0 ): +\b0 \ + Sdchun} \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/zh-Hans.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/zh-Hans.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/zh-Hans.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/zh-Hans.lproj/Localizable.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,34 @@ +/* + Localizable.strings + PeopsSPU + + Created by C.W. Betts on 11/16/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ +//Commented out strings are those that need to be translated + +//"SDL Sound" = "SDL Sound"; +//"OpenAL Sound" = "OpenAL Sound"; +//"Mac OS X Sound" = "Mac OS X Sound"; +//"P.E.Op.S. Sound Driver V1.7\nCoded by Pete Bernert and the P.E.Op.S. team\n" = "P.E.Op.S. Sound Driver V1.7\nCoded by Pete Bernert and the P.E.Op.S. team\n"; + +/*Unknown/not found value */ +//"(Unknown)" = "(Unknown)"; + +/* Interpolation Values */ +//"(No Interpolation)" = "(No Interpolation)"; +"(Simple Interpolation)" = "(简易增益)"; +//"(Gaussian Interpolation)" = "(Gaussian Interpolation)"; +//"(Cubic Interpolation)" = "(Cubic Interpolation)"; + +/* Reverb Values */ +//"(No Reverb)" = "(No Reverb)"; +"(Simple Reverb)" = "(简易混响)"; +//"(PSX Reverb)" = "(PSX Reverb)"; + +/* Volume Values */ +//"(Muted)" = "(Muted)"; +//"(Low)" = "(Low)"; +//"(Medium)" = "(Medium)"; +"(Loud)" = "(高音)"; +//"(Loudest)" = "(Loudest)"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/zh-Hans.lproj/NetSfPeopsSpuPluginMain.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/zh-Hans.lproj/NetSfPeopsSpuPluginMain.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFSound/Resorces/Shared/zh-Hans.lproj/NetSfPeopsSpuPluginMain.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFSound/Resorces/Shared/zh-Hans.lproj/NetSfPeopsSpuPluginMain.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,57 @@ + +/* Class = "NSWindow"; title = "SPU 配置"; ObjectID = "6"; */ +"6.title" = "SPU 配置"; + +/* Class = "NSBox"; title = "常规设置"; ObjectID = "9"; */ +"9.title" = "常规设置"; + +/* Class = "NSBox"; title = "XA 音乐"; ObjectID = "19"; */ +"19.title" = "XA 音乐"; + +/* Class = "NSBox"; title = "杂项"; ObjectID = "24"; */ +"24.title" = "杂项"; + +/* Class = "NSTextFieldCell"; title = "混响:"; ObjectID = "80"; */ +"80.title" = "混响:"; + +/* Class = "NSTextFieldCell"; title = "增益:"; ObjectID = "82"; */ +"82.title" = "增益:"; + +/* Class = "NSTextFieldCell"; title = "(简易混响)"; ObjectID = "84"; */ +"84.title" = "(简易混响)"; + +/* Class = "NSTextFieldCell"; title = "(简易增益)"; ObjectID = "85"; */ +"85.title" = "(简易增益)"; + +/* Class = "NSTextFieldCell"; title = "音量:"; ObjectID = "86"; */ +"86.title" = "音量:"; + +/* Class = "NSTextFieldCell"; title = "(高音)"; ObjectID = "88"; */ +"88.title" = "(高音)"; + +/* Class = "NSButtonCell"; title = "改变 XA 速度"; ObjectID = "89"; */ +"89.title" = "改变 XA 速度"; + +/* Class = "NSButtonCell"; title = "高兼容模式"; ObjectID = "90"; */ +"90.title" = "高兼容模式"; + +/* Class = "NSButtonCell"; title = "SPU IRQ 等待"; ObjectID = "91"; */ +"91.title" = "SPU IRQ 等待"; + +/* Class = "NSButtonCell"; title = "单声道"; ObjectID = "92"; */ +"92.title" = "单声道"; + +/* Class = "NSButtonCell"; title = "确认"; ObjectID = "163"; */ +"163.title" = "确认"; + +/* Class = "NSButtonCell"; title = "取消"; ObjectID = "167"; */ +"167.title" = "取消"; + +/* Class = "NSButtonCell"; title = "重置"; ObjectID = "172"; */ +"172.title" = "重置"; + +/* Class = "NSButtonCell"; title = "高兼容模式"; ObjectID = "197"; */ +"197.title" = "高兼容模式"; + +/* Class = "NSButtonCell"; title = "改变 XA 速度"; ObjectID = "234"; */ +"234.title" = "改变 XA 速度"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/Base.lproj/NetSfPeopsSoftGPUConfig.xib pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/Base.lproj/NetSfPeopsSoftGPUConfig.xib --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/Base.lproj/NetSfPeopsSoftGPUConfig.xib 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/Base.lproj/NetSfPeopsSoftGPUConfig.xib 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,466 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Only enable a hack to fix a specific problem in a game. +Hold the mouse over a checkbox to get more information about it. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+
diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/DFXVideo.exp pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/DFXVideo.exp --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/DFXVideo.exp 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/DFXVideo.exp 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,62 @@ +# DFXVideo.exp +# Pcsxr +# +# Created by C.W. Betts on 2/8/15. +# + +_PSEgetLibType +_PSEgetLibName +_PSEgetLibVersion +_GPUinit +_GPUshutdown +_GPUopen +_GPUclose +_GPUconfigure +_GPUabout +_GPUtest +_GPUwriteData +_GPUwriteStatus +_GPUreadData +_GPUreadStatus +_GPUdmaChain +_GPUgetMode +_GPUsetMode +_GPUupdateLace +_GPUmakeSnapshot +_GPUwriteDataMem +_GPUreadDataMem +_GPUdisplayText +_GPUdisplayFlags +_GPUfreeze +_GPUshowScreenPic +_GPUgetScreenPic + +_GPUkeypressed +_GPUhSync +_GPUvBlank + +_GPUcursor +_GPUsetfix + +# _ZN_GPUdisplayFlags +# _ZN_GPUmakeSnapshot +# _ZN_GPUinit +# _ZN_GPUopen +# _ZN_GPUclose +# _ZN_GPUshutdown +# _ZN_GPUupdateLace +# _ZN_GPUreadStatus +# _ZN_GPUwriteStatus +# _ZN_GPUdmaSliceOut +# _ZN_GPUreadData +# _ZN_GPUsetMode +# _ZN_GPUgetMode +# _ZN_GPUdmaSliceIn +# _ZN_GPUwriteData +# _ZN_GPUdmaChain +# _ZN_GPUtest +# _ZN_GPUfreeze +# _ZN_GPUgetScreenPic +# _ZN_GPUshowScreenPic + +_GPUvisualVibration diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/en.lproj/Credits.rtf pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/en.lproj/Credits.rtf --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/en.lproj/Credits.rtf 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/en.lproj/Credits.rtf 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,15 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural + +\f0\b\fs24 \cf0 Created By +\b0 \ + Pete Bernert and the P.E.Op.S. team\ +\ + +\b Macintosh Port By +\b0 \ + Gil Pedersen\ + C.W. \'93Madd the Sane\'94 Betts} \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/en.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/en.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/en.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/en.lproj/InfoPlist.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,6 @@ +/* Localized versions of Info.plist keys */ + +CFBundleName = "SoftGL GPU Plugin"; +CFBundleShortVersionString = "GPU Plugin 1.17"; +CFBundleGetInfoString = "SoftGL GPU Renderer Plugin version 1.17."; +NSHumanReadableCopyright = "Copyright © 2004 Gil Pedersen."; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/en.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/en.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/en.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/en.lproj/Localizable.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,11 @@ +/* + Localizable.strings + PeopsSoftGPU + + Created by C.W. Betts on 11/16/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"Pete Bernert and the P.E.Op.S. team" = "Pete Bernert and the P.E.Op.S. team"; +"SoftGL Driver" = "SoftGL Driver"; +"P.E.Op.S. SoftGL Driver V1.17\nCoded by Pete Bernert and the P.E.Op.S. team\n" = "P.E.Op.S. SoftGL Driver V1.17\nCoded by Pete Bernert and the P.E.Op.S. team\n"; \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/en.lproj/NetSfPeopsSoftGPUConfig.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/en.lproj/NetSfPeopsSoftGPUConfig.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/en.lproj/NetSfPeopsSoftGPUConfig.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/en.lproj/NetSfPeopsSoftGPUConfig.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,189 @@ + +/* Class = "NSWindow"; title = "GPU Configuration"; ObjectID = "5"; */ +"5.title" = "GPU Configuration"; + +/* Class = "NSBox"; title = "Hacks"; ObjectID = "76"; */ +"76.title" = "Hacks"; + +/* Class = "NSBox"; title = "Display Settings"; ObjectID = "89"; */ +"89.title" = "Display Settings"; + +/* Class = "NSButton"; ibShadowedToolTip = "Removes tearing artifacts by waiting for the monitor to sync. Will cause a slight performance loss. This setting has no effect on LCD monitors."; ObjectID = "93"; */ +"93.ibShadowedToolTip" = "Removes tearing artifacts by waiting for the monitor to sync. Will cause a slight performance loss. This setting has no effect on LCD monitors."; + +/* Class = "NSButton"; ibShadowedToolTip = "Skip rendering frames to improve overall speed when needed. This setting might cause compatibility problems"; ObjectID = "96"; */ +"96.ibShadowedToolTip" = "Skip rendering frames to improve overall speed when needed. This setting might cause compatibility problems"; + +/* Class = "NSButton"; ibShadowedToolTip = "When Enabled a small counter will show the current performance of the rendering measured in Frames Per Second (FPS)"; ObjectID = "97"; */ +"97.ibShadowedToolTip" = "When Enabled a small counter will show the current performance of the rendering measured in Frames Per Second (FPS)"; + +/* Class = "NSButton"; ibShadowedToolTip = "Automatically enter full screen mode"; ObjectID = "99"; */ +"99.ibShadowedToolTip" = "Automatically enter full screen mode"; + +/* Class = "NSBox"; title = "Rendering"; ObjectID = "107"; */ +"107.title" = "Rendering"; + +/* Class = "NSMenuItem"; title = "Never"; ObjectID = "111"; */ +"111.title" = "Never"; + +/* Class = "NSTextField"; ibShadowedToolTip = "Specify when to use dithering to render colors"; ObjectID = "112"; */ +"112.ibShadowedToolTip" = "Specify when to use dithering to render colors"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "113"; */ +"113.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Always"; ObjectID = "114"; */ +"114.title" = "Always"; + +/* Class = "NSMenuItem"; title = "When Hinted"; ObjectID = "115"; */ +"115.title" = "When Hinted"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "Specify when to use dithering to render colors"; ObjectID = "116"; */ +"116.ibShadowedToolTip" = "Specify when to use dithering to render colors"; + +/* Class = "NSButton"; ibShadowedToolTip = "Enable use of the hacks specified below"; ObjectID = "117"; */ +"117.ibShadowedToolTip" = "Enable use of the hacks specified below"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Fixes black screens in Lunar"; ObjectID = "161"; */ +"161.ibShadowedToolTip" = "Fixes black screens in Lunar"; + +/* Class = "NSButtonCell"; title = "Ignore black brightness color"; ObjectID = "161"; */ +"161.title" = "Ignore black brightness color"; + +/* Class = "NSTextFieldCell"; title = "Only enable a hack to fix a specific problem in a game.\nHold the mouse over a checkbox to get more information about it."; ObjectID = "162"; */ +"162.title" = "Only enable a hack to fix a specific problem in a game.\nHold the mouse over a checkbox to get more information about it."; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Better fps limitation with some games"; ObjectID = "163"; */ +"163.ibShadowedToolTip" = "Better fps limitation with some games"; + +/* Class = "NSButtonCell"; title = "Use PC FPS calculation"; ObjectID = "163"; */ +"163.title" = "Use PC FPS calculation"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Old compatibility mode"; ObjectID = "164"; */ +"164.ibShadowedToolTip" = "Old compatibility mode"; + +/* Class = "NSButtonCell"; title = "Disable coord check"; ObjectID = "164"; */ +"164.title" = "Disable coord check"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Better fps limitation with some games"; ObjectID = "165"; */ +"165.ibShadowedToolTip" = "Better fps limitation with some games"; + +/* Class = "NSButtonCell"; title = "Use old frame skipping"; ObjectID = "165"; */ +"165.title" = "Use old frame skipping"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Shows the full area in Capcom 2D fighters"; ObjectID = "166"; */ +"166.ibShadowedToolTip" = "Shows the full area in Capcom 2D fighters"; + +/* Class = "NSButtonCell"; title = "Expand screen width"; ObjectID = "166"; */ +"166.title" = "Expand screen width"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Maybe faster, needed for Pandemonium 2"; ObjectID = "167"; */ +"167.ibShadowedToolTip" = "Maybe faster, needed for Pandemonium 2"; + +/* Class = "NSButtonCell"; title = "Lazy screen updates"; ObjectID = "167"; */ +"167.title" = "Lazy screen updates"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Chrono Cross"; ObjectID = "168"; */ +"168.ibShadowedToolTip" = "Chrono Cross"; + +/* Class = "NSButtonCell"; title = "Odd/even bit hack"; ObjectID = "168"; */ +"168.title" = "Odd/even bit hack"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Slightly distorted textures can happen"; ObjectID = "169"; */ +"169.ibShadowedToolTip" = "Slightly distorted textures can happen"; + +/* Class = "NSButtonCell"; title = "Draw tex-quads as triangles"; ObjectID = "169"; */ +"169.title" = "Draw tex-quads as triangles"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Needed by Dark Forces"; ObjectID = "170"; */ +"170.ibShadowedToolTip" = "Needed by Dark Forces"; + +/* Class = "NSButtonCell"; title = "Repeated flat tex triangles"; ObjectID = "170"; */ +"170.title" = "Repeated flat tex triangles"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Toggles busy flags after drawing"; ObjectID = "171"; */ +"171.ibShadowedToolTip" = "Toggles busy flags after drawing"; + +/* Class = "NSButtonCell"; title = "Fake 'gpu busy' states"; ObjectID = "171"; */ +"171.title" = "Fake 'gpu busy' states"; + +/* Class = "NSButtonCell"; title = "Sync to Monitor Refresh"; ObjectID = "172"; */ +"172.title" = "Sync to Monitor Refresh"; + +/* Class = "NSButtonCell"; title = "Use Frame Skipping"; ObjectID = "173"; */ +"173.title" = "Use Frame Skipping"; + +/* Class = "NSButtonCell"; title = "Display FPS Counter"; ObjectID = "174"; */ +"174.title" = "Display FPS Counter"; + +/* Class = "NSButtonCell"; title = "Auto Full Screen"; ObjectID = "175"; */ +"175.title" = "Auto Full Screen"; + +/* Class = "NSTextFieldCell"; title = "Dither Graphics:"; ObjectID = "176"; */ +"176.title" = "Dither Graphics:"; + +/* Class = "NSButtonCell"; title = "Enable Hacks"; ObjectID = "178"; */ +"178.title" = "Enable Hacks"; + +/* Class = "NSBox"; title = "Shaders"; ObjectID = "179"; */ +"179.title" = "Shaders"; + +/* Class = "NSButtonCell"; title = "Enable Shaders"; ObjectID = "181"; */ +"181.title" = "Enable Shaders"; + +/* Class = "NSButtonCell"; title = "Select..."; ObjectID = "183"; */ +"183.title" = "Select…"; + +/* Class = "NSButtonCell"; title = "Select..."; ObjectID = "185"; */ +"185.title" = "Select…"; + +/* Class = "NSTextFieldCell"; title = "Label"; ObjectID = "187"; */ +"187.title" = "Label"; + +/* Class = "NSTextFieldCell"; title = "Label"; ObjectID = "189"; */ +"189.title" = "Label"; + +/* Class = "NSTextFieldCell"; title = "Vertex:"; ObjectID = "195"; */ +"195.title" = "Vertex:"; + +/* Class = "NSTextFieldCell"; title = "Fragment:"; ObjectID = "197"; */ +"197.title" = "Fragment:"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "221"; */ +"221.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "1.0"; ObjectID = "222"; */ +"222.title" = "1.0"; + +/* Class = "NSMenuItem"; title = "2.0"; ObjectID = "223"; */ +"223.title" = "2.0"; + +/* Class = "NSMenuItem"; title = "3.0"; ObjectID = "224"; */ +"224.title" = "3.0"; + +/* Class = "NSTextFieldCell"; title = "Quality:"; ObjectID = "226"; */ +"226.title" = "Quality:"; + +/* Class = "NSMenuItem"; title = "4.0"; ObjectID = "227"; */ +"227.title" = "4.0"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "372"; */ +"372.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "376"; */ +"376.title" = "Cancel"; + +/* Class = "NSButtonCell"; title = "Reset"; ObjectID = "382"; */ +"382.title" = "Reset"; + +/* Class = "NSButtonCell"; title = "Odd/even bit hack"; ObjectID = "531"; */ +"531.title" = "Odd/even bit hack"; + +/* Class = "NSFormCell"; title = "Height:"; ObjectID = "3eM-lr-W6U"; */ +"3eM-lr-W6U.title" = "Height:"; + +/* Class = "NSFormCell"; title = "Width:"; ObjectID = "4UQ-Uy-UYS"; */ +"4UQ-Uy-UYS.title" = "Width:"; + +/* Class = "NSFormCell"; title = "Field:"; ObjectID = "7gB-tB-Kx4"; */ +"7gB-tB-Kx4.title" = "Field:"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/fr.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/fr.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/fr.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/fr.lproj/Localizable.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,11 @@ +/* + Localizable.strings + PeopsSoftGPU + + Created by C.W. Betts on 11/16/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"Pete Bernert and the P.E.Op.S. team" = "Pete Bernert et l'équipe P.E.Op.S."; +"SoftGL Driver" = "Pilote SoftGL"; +"P.E.Op.S. SoftGL Driver V1.17\nCoded by Pete Bernert and the P.E.Op.S. team\n" = "Pilote SoftGL P.E.Op.S. V1.17\nCodé par Pete Bernert et l'équipe P.E.Op.S.\n"; \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/fr.lproj/NetSfPeopsSoftGPUConfig.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/fr.lproj/NetSfPeopsSoftGPUConfig.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/fr.lproj/NetSfPeopsSoftGPUConfig.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/fr.lproj/NetSfPeopsSoftGPUConfig.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,189 @@ + +/* Class = "NSWindow"; title = "GPU Configuration"; ObjectID = "5"; */ +"5.title" = "GPU Configuration"; + +/* Class = "NSBox"; title = "Hacks"; ObjectID = "76"; */ +"76.title" = "Hacks"; + +/* Class = "NSBox"; title = "Display Settings"; ObjectID = "89"; */ +"89.title" = "Display Settings"; + +/* Class = "NSButton"; ibShadowedToolTip = "Removes tearing artifacts by waiting for the monitor to sync. Will cause a slight performance loss. This setting has no effect on LCD monitors."; ObjectID = "93"; */ +"93.ibShadowedToolTip" = "Removes tearing artifacts by waiting for the monitor to sync. Will cause a slight performance loss. This setting has no effect on LCD monitors."; + +/* Class = "NSButton"; ibShadowedToolTip = "Skip rendering frames to improve overall speed when needed. This setting might cause compatibility problems"; ObjectID = "96"; */ +"96.ibShadowedToolTip" = "Skip rendering frames to improve overall speed when needed. This setting might cause compatibility problems"; + +/* Class = "NSButton"; ibShadowedToolTip = "When Enabled a small counter will show the current performance of the rendering measured in Frames Per Second (FPS)"; ObjectID = "97"; */ +"97.ibShadowedToolTip" = "When Enabled a small counter will show the current performance of the rendering measured in Frames Per Second (FPS)"; + +/* Class = "NSButton"; ibShadowedToolTip = "Automatically enter full screen mode"; ObjectID = "99"; */ +"99.ibShadowedToolTip" = "Automatically enter full screen mode"; + +/* Class = "NSBox"; title = "Rendering"; ObjectID = "107"; */ +"107.title" = "Rendering"; + +/* Class = "NSMenuItem"; title = "Never"; ObjectID = "111"; */ +"111.title" = "Never"; + +/* Class = "NSTextField"; ibShadowedToolTip = "Specify when to use dithering to render colors"; ObjectID = "112"; */ +"112.ibShadowedToolTip" = "Specify when to use dithering to render colors"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "113"; */ +"113.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Always"; ObjectID = "114"; */ +"114.title" = "Always"; + +/* Class = "NSMenuItem"; title = "When Hinted"; ObjectID = "115"; */ +"115.title" = "When Hinted"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "Specify when to use dithering to render colors"; ObjectID = "116"; */ +"116.ibShadowedToolTip" = "Specify when to use dithering to render colors"; + +/* Class = "NSButton"; ibShadowedToolTip = "Enable use of the hacks specified below"; ObjectID = "117"; */ +"117.ibShadowedToolTip" = "Enable use of the hacks specified below"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Fixes black screens in Lunar"; ObjectID = "161"; */ +"161.ibShadowedToolTip" = "Fixes black screens in Lunar"; + +/* Class = "NSButtonCell"; title = "Ignore black brightness color"; ObjectID = "161"; */ +"161.title" = "Ignore black brightness color"; + +/* Class = "NSTextFieldCell"; title = "Only enable a hack to fix a specific problem in a game.\nHold the mouse over a checkbox to get more information about it."; ObjectID = "162"; */ +"162.title" = "Only enable a hack to fix a specific problem in a game.\nHold the mouse over a checkbox to get more information about it."; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Better fps limitation with some games"; ObjectID = "163"; */ +"163.ibShadowedToolTip" = "Better fps limitation with some games"; + +/* Class = "NSButtonCell"; title = "Use PC FPS calculation"; ObjectID = "163"; */ +"163.title" = "Use PC FPS calculation"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Old compatibility mode"; ObjectID = "164"; */ +"164.ibShadowedToolTip" = "Old compatibility mode"; + +/* Class = "NSButtonCell"; title = "Disable coord check"; ObjectID = "164"; */ +"164.title" = "Disable coord check"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Better fps limitation with some games"; ObjectID = "165"; */ +"165.ibShadowedToolTip" = "Better fps limitation with some games"; + +/* Class = "NSButtonCell"; title = "Use old frame skipping"; ObjectID = "165"; */ +"165.title" = "Use old frame skipping"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Shows the full area in Capcom 2D fighters"; ObjectID = "166"; */ +"166.ibShadowedToolTip" = "Shows the full area in Capcom 2D fighters"; + +/* Class = "NSButtonCell"; title = "Expand screen width"; ObjectID = "166"; */ +"166.title" = "Expand screen width"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Maybe faster, needed for Pandemonium 2"; ObjectID = "167"; */ +"167.ibShadowedToolTip" = "Maybe faster, needed for Pandemonium 2"; + +/* Class = "NSButtonCell"; title = "Lazy screen updates"; ObjectID = "167"; */ +"167.title" = "Lazy screen updates"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Chrono Cross"; ObjectID = "168"; */ +"168.ibShadowedToolTip" = "Chrono Cross"; + +/* Class = "NSButtonCell"; title = "Odd/even bit hack"; ObjectID = "168"; */ +"168.title" = "Odd/even bit hack"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Slightly distorted textures can happen"; ObjectID = "169"; */ +"169.ibShadowedToolTip" = "Slightly distorted textures can happen"; + +/* Class = "NSButtonCell"; title = "Draw tex-quads as triangles"; ObjectID = "169"; */ +"169.title" = "Draw tex-quads as triangles"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Needed by Dark Forces"; ObjectID = "170"; */ +"170.ibShadowedToolTip" = "Needed by Dark Forces"; + +/* Class = "NSButtonCell"; title = "Repeated flat tex triangles"; ObjectID = "170"; */ +"170.title" = "Repeated flat tex triangles"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Toggles busy flags after drawing"; ObjectID = "171"; */ +"171.ibShadowedToolTip" = "Toggles busy flags after drawing"; + +/* Class = "NSButtonCell"; title = "Fake 'gpu busy' states"; ObjectID = "171"; */ +"171.title" = "Fake 'gpu busy' states"; + +/* Class = "NSButtonCell"; title = "Sync to Monitor Refresh"; ObjectID = "172"; */ +"172.title" = "Sync to Monitor Refresh"; + +/* Class = "NSButtonCell"; title = "Use Frame Skipping"; ObjectID = "173"; */ +"173.title" = "Use Frame Skipping"; + +/* Class = "NSButtonCell"; title = "Display FPS Counter"; ObjectID = "174"; */ +"174.title" = "Display FPS Counter"; + +/* Class = "NSButtonCell"; title = "Auto Full Screen"; ObjectID = "175"; */ +"175.title" = "Auto Full Screen"; + +/* Class = "NSTextFieldCell"; title = "Dither Graphics:"; ObjectID = "176"; */ +"176.title" = "Dither Graphics:"; + +/* Class = "NSButtonCell"; title = "Enable Hacks"; ObjectID = "178"; */ +"178.title" = "Enable Hacks"; + +/* Class = "NSBox"; title = "Shaders"; ObjectID = "179"; */ +"179.title" = "Shaders"; + +/* Class = "NSButtonCell"; title = "Enable Shaders"; ObjectID = "181"; */ +"181.title" = "Enable Shaders"; + +/* Class = "NSButtonCell"; title = "Select..."; ObjectID = "183"; */ +"183.title" = "Select…"; + +/* Class = "NSButtonCell"; title = "Select..."; ObjectID = "185"; */ +"185.title" = "Select…"; + +/* Class = "NSTextFieldCell"; title = "Label"; ObjectID = "187"; */ +"187.title" = "Label"; + +/* Class = "NSTextFieldCell"; title = "Label"; ObjectID = "189"; */ +"189.title" = "Label"; + +/* Class = "NSTextFieldCell"; title = "Vertex:"; ObjectID = "195"; */ +"195.title" = "Vertex:"; + +/* Class = "NSTextFieldCell"; title = "Fragment:"; ObjectID = "197"; */ +"197.title" = "Fragment:"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "221"; */ +"221.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "1.0"; ObjectID = "222"; */ +"222.title" = "1.0"; + +/* Class = "NSMenuItem"; title = "2.0"; ObjectID = "223"; */ +"223.title" = "2.0"; + +/* Class = "NSMenuItem"; title = "3.0"; ObjectID = "224"; */ +"224.title" = "3.0"; + +/* Class = "NSTextFieldCell"; title = "Quality:"; ObjectID = "226"; */ +"226.title" = "Quality:"; + +/* Class = "NSMenuItem"; title = "4.0"; ObjectID = "227"; */ +"227.title" = "4.0"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "372"; */ +"372.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "376"; */ +"376.title" = "Cancel"; + +/* Class = "NSButtonCell"; title = "Reset"; ObjectID = "382"; */ +"382.title" = "Reset"; + +/* Class = "NSButtonCell"; title = "Odd/even bit hack"; ObjectID = "531"; */ +"531.title" = "Odd/even bit hack"; + +/* Class = "NSFormCell"; title = "Height:"; ObjectID = "3eM-lr-W6U"; */ +"3eM-lr-W6U.title" = "Height:"; + +/* Class = "NSFormCell"; title = "Width:"; ObjectID = "4UQ-Uy-UYS"; */ +"4UQ-Uy-UYS.title" = "Width:"; + +/* Class = "NSFormCell"; title = "Field:"; ObjectID = "7gB-tB-Kx4"; */ +"7gB-tB-Kx4.title" = "Field:"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/gpuPeteOGL2.slf pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/gpuPeteOGL2.slf --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/gpuPeteOGL2.slf 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/gpuPeteOGL2.slf 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,35 @@ +// ColoredStorybook shader +// by guest(r) +// License: GNU-GPL + +uniform sampler2D OGL2Texture; +uniform sampler2D OGL2TMU1; + +void main() +{ + vec3 paper = texture2D(OGL2TMU1, gl_TexCoord[6].zw).xyz; + vec3 c00 = texture2D(OGL2Texture, gl_TexCoord[5].xy).xyz; + vec3 c10 = texture2D(OGL2Texture, gl_TexCoord[1].xy).xyz; + vec3 c20 = texture2D(OGL2Texture, gl_TexCoord[2].zw).xyz; + vec3 c01 = texture2D(OGL2Texture, gl_TexCoord[3].xy).xyz; + vec3 c11 = texture2D(OGL2Texture, gl_TexCoord[0].xy).xyz; + vec3 c21 = texture2D(OGL2Texture, gl_TexCoord[4].xy).xyz; + vec3 c02 = texture2D(OGL2Texture, gl_TexCoord[1].zw).xyz; + vec3 c12 = texture2D(OGL2Texture, gl_TexCoord[2].xy).xyz; + vec3 c22 = texture2D(OGL2Texture, gl_TexCoord[6].xy).xyz; + vec3 dt = vec3(1.0,1.0,1.0); + + c11 = 0.25*(c11+0.5*(c10+c01+c12+c21)+0.25*(c02+c20+c00+c22)); + + float d1=dot(abs(c00-c22),dt); + float d2=dot(abs(c20-c02),dt); + float hl=dot(abs(c01-c21),dt); + float vl=dot(abs(c10-c12),dt); + + float d = 0.60*(d1+d2+hl+vl)/(dot(c11,dt)+0.5); + + d = 0.5*pow(d,0.5) + d; + c11 = (1.0-0.6*d)*c11; + + gl_FragColor.xyz = mix(paper, c11, pow(max(min(d,1.1)-0.1,0.0),0.5)); +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/gpuPeteOGL2.slv pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/gpuPeteOGL2.slv --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/gpuPeteOGL2.slv 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/gpuPeteOGL2.slv 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,26 @@ +// by guest(r) - guest.r@gmail.com +// license: GNU-GPL + +uniform vec4 OGL2Param; +uniform vec4 OGL2Size; + +void main() +{ + float x = (OGL2Size.x/2048.0)*OGL2Param.x; + float y = (OGL2Size.y/1024.0)*OGL2Param.y; + vec2 dg1 = vec2( x,y); + vec2 dg2 = vec2(-x,y); + vec2 dx = vec2(x,0.0); + vec2 dy = vec2(0.0,y); + gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; + gl_TexCoord[0] = gl_MultiTexCoord0; + gl_TexCoord[6].zw= gl_MultiTexCoord1.xy; + gl_TexCoord[1].xy = gl_TexCoord[0].xy - dy; + gl_TexCoord[2].xy = gl_TexCoord[0].xy + dy; + gl_TexCoord[3].xy = gl_TexCoord[0].xy - dx; + gl_TexCoord[4].xy = gl_TexCoord[0].xy + dx; + gl_TexCoord[5].xy = gl_TexCoord[0].xy - dg1; + gl_TexCoord[6].xy = gl_TexCoord[0].xy + dg1; + gl_TexCoord[1].zw = gl_TexCoord[0].xy - dg2; + gl_TexCoord[2].zw = gl_TexCoord[0].xy + dg2; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/hu.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/hu.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/hu.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/hu.lproj/Localizable.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,11 @@ +/* + Localizable.strings + PeopsSoftGPU + + Created by C.W. Betts on 11/16/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"Pete Bernert and the P.E.Op.S. team" = "Pete Bernert és a P.E.Op.S. team"; +"SoftGL Driver" = "SoftGL Driver"; +"P.E.Op.S. SoftGL Driver V1.17\nCoded by Pete Bernert and the P.E.Op.S. team\n" = "P.E.Op.S. SoftGL Driver V1.17\nFejlesztő Pete Bernert és a P.E.Op.S. team\n"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/hu.lproj/NetSfPeopsSoftGPUConfig.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/hu.lproj/NetSfPeopsSoftGPUConfig.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/hu.lproj/NetSfPeopsSoftGPUConfig.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/hu.lproj/NetSfPeopsSoftGPUConfig.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,189 @@ + +/* Class = "NSWindow"; title = "GPU Configuration"; ObjectID = "5"; */ +"5.title" = "GPU Configuration"; + +/* Class = "NSBox"; title = "Hacks"; ObjectID = "76"; */ +"76.title" = "Hacks"; + +/* Class = "NSBox"; title = "Display Settings"; ObjectID = "89"; */ +"89.title" = "Display Settings"; + +/* Class = "NSButton"; ibShadowedToolTip = "Removes tearing artifacts by waiting for the monitor to sync. Will cause a slight performance loss. This setting has no effect on LCD monitors."; ObjectID = "93"; */ +"93.ibShadowedToolTip" = "Removes tearing artifacts by waiting for the monitor to sync. Will cause a slight performance loss. This setting has no effect on LCD monitors."; + +/* Class = "NSButton"; ibShadowedToolTip = "Skip rendering frames to improve overall speed when needed. This setting might cause compatibility problems"; ObjectID = "96"; */ +"96.ibShadowedToolTip" = "Skip rendering frames to improve overall speed when needed. This setting might cause compatibility problems"; + +/* Class = "NSButton"; ibShadowedToolTip = "When Enabled a small counter will show the current performance of the rendering measured in Frames Per Second (FPS)"; ObjectID = "97"; */ +"97.ibShadowedToolTip" = "When Enabled a small counter will show the current performance of the rendering measured in Frames Per Second (FPS)"; + +/* Class = "NSButton"; ibShadowedToolTip = "Automatically enter full screen mode"; ObjectID = "99"; */ +"99.ibShadowedToolTip" = "Automatically enter full screen mode"; + +/* Class = "NSBox"; title = "Rendering"; ObjectID = "107"; */ +"107.title" = "Rendering"; + +/* Class = "NSMenuItem"; title = "Never"; ObjectID = "111"; */ +"111.title" = "Never"; + +/* Class = "NSTextField"; ibShadowedToolTip = "Specify when to use dithering to render colors"; ObjectID = "112"; */ +"112.ibShadowedToolTip" = "Specify when to use dithering to render colors"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "113"; */ +"113.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Always"; ObjectID = "114"; */ +"114.title" = "Always"; + +/* Class = "NSMenuItem"; title = "When Hinted"; ObjectID = "115"; */ +"115.title" = "When Hinted"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "Specify when to use dithering to render colors"; ObjectID = "116"; */ +"116.ibShadowedToolTip" = "Specify when to use dithering to render colors"; + +/* Class = "NSButton"; ibShadowedToolTip = "Enable use of the hacks specified below"; ObjectID = "117"; */ +"117.ibShadowedToolTip" = "Enable use of the hacks specified below"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Fixes black screens in Lunar"; ObjectID = "161"; */ +"161.ibShadowedToolTip" = "Fixes black screens in Lunar"; + +/* Class = "NSButtonCell"; title = "Ignore black brightness color"; ObjectID = "161"; */ +"161.title" = "Ignore black brightness color"; + +/* Class = "NSTextFieldCell"; title = "Only enable a hack to fix a specific problem in a game.\nHold the mouse over a checkbox to get more information about it."; ObjectID = "162"; */ +"162.title" = "Only enable a hack to fix a specific problem in a game.\nHold the mouse over a checkbox to get more information about it."; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Better fps limitation with some games"; ObjectID = "163"; */ +"163.ibShadowedToolTip" = "Better fps limitation with some games"; + +/* Class = "NSButtonCell"; title = "Use PC FPS calculation"; ObjectID = "163"; */ +"163.title" = "Use PC FPS calculation"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Old compatibility mode"; ObjectID = "164"; */ +"164.ibShadowedToolTip" = "Old compatibility mode"; + +/* Class = "NSButtonCell"; title = "Disable coord check"; ObjectID = "164"; */ +"164.title" = "Disable coord check"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Better fps limitation with some games"; ObjectID = "165"; */ +"165.ibShadowedToolTip" = "Better fps limitation with some games"; + +/* Class = "NSButtonCell"; title = "Use old frame skipping"; ObjectID = "165"; */ +"165.title" = "Use old frame skipping"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Shows the full area in Capcom 2D fighters"; ObjectID = "166"; */ +"166.ibShadowedToolTip" = "Shows the full area in Capcom 2D fighters"; + +/* Class = "NSButtonCell"; title = "Expand screen width"; ObjectID = "166"; */ +"166.title" = "Expand screen width"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Maybe faster, needed for Pandemonium 2"; ObjectID = "167"; */ +"167.ibShadowedToolTip" = "Maybe faster, needed for Pandemonium 2"; + +/* Class = "NSButtonCell"; title = "Lazy screen updates"; ObjectID = "167"; */ +"167.title" = "Lazy screen updates"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Chrono Cross"; ObjectID = "168"; */ +"168.ibShadowedToolTip" = "Chrono Cross"; + +/* Class = "NSButtonCell"; title = "Odd/even bit hack"; ObjectID = "168"; */ +"168.title" = "Odd/even bit hack"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Slightly distorted textures can happen"; ObjectID = "169"; */ +"169.ibShadowedToolTip" = "Slightly distorted textures can happen"; + +/* Class = "NSButtonCell"; title = "Draw tex-quads as triangles"; ObjectID = "169"; */ +"169.title" = "Draw tex-quads as triangles"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Needed by Dark Forces"; ObjectID = "170"; */ +"170.ibShadowedToolTip" = "Needed by Dark Forces"; + +/* Class = "NSButtonCell"; title = "Repeated flat tex triangles"; ObjectID = "170"; */ +"170.title" = "Repeated flat tex triangles"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Toggles busy flags after drawing"; ObjectID = "171"; */ +"171.ibShadowedToolTip" = "Toggles busy flags after drawing"; + +/* Class = "NSButtonCell"; title = "Fake 'gpu busy' states"; ObjectID = "171"; */ +"171.title" = "Fake 'gpu busy' states"; + +/* Class = "NSButtonCell"; title = "Sync to Monitor Refresh"; ObjectID = "172"; */ +"172.title" = "Sync to Monitor Refresh"; + +/* Class = "NSButtonCell"; title = "Use Frame Skipping"; ObjectID = "173"; */ +"173.title" = "Use Frame Skipping"; + +/* Class = "NSButtonCell"; title = "Display FPS Counter"; ObjectID = "174"; */ +"174.title" = "Display FPS Counter"; + +/* Class = "NSButtonCell"; title = "Auto Full Screen"; ObjectID = "175"; */ +"175.title" = "Auto Full Screen"; + +/* Class = "NSTextFieldCell"; title = "Dither Graphics:"; ObjectID = "176"; */ +"176.title" = "Dither Graphics:"; + +/* Class = "NSButtonCell"; title = "Enable Hacks"; ObjectID = "178"; */ +"178.title" = "Enable Hacks"; + +/* Class = "NSBox"; title = "Shaders"; ObjectID = "179"; */ +"179.title" = "Shaders"; + +/* Class = "NSButtonCell"; title = "Enable Shaders"; ObjectID = "181"; */ +"181.title" = "Enable Shaders"; + +/* Class = "NSButtonCell"; title = "Select..."; ObjectID = "183"; */ +"183.title" = "Select…"; + +/* Class = "NSButtonCell"; title = "Select..."; ObjectID = "185"; */ +"185.title" = "Select…"; + +/* Class = "NSTextFieldCell"; title = "Label"; ObjectID = "187"; */ +"187.title" = "Label"; + +/* Class = "NSTextFieldCell"; title = "Label"; ObjectID = "189"; */ +"189.title" = "Label"; + +/* Class = "NSTextFieldCell"; title = "Vertex:"; ObjectID = "195"; */ +"195.title" = "Vertex:"; + +/* Class = "NSTextFieldCell"; title = "Fragment:"; ObjectID = "197"; */ +"197.title" = "Fragment:"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "221"; */ +"221.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "1.0"; ObjectID = "222"; */ +"222.title" = "1.0"; + +/* Class = "NSMenuItem"; title = "2.0"; ObjectID = "223"; */ +"223.title" = "2.0"; + +/* Class = "NSMenuItem"; title = "3.0"; ObjectID = "224"; */ +"224.title" = "3.0"; + +/* Class = "NSTextFieldCell"; title = "Quality:"; ObjectID = "226"; */ +"226.title" = "Quality:"; + +/* Class = "NSMenuItem"; title = "4.0"; ObjectID = "227"; */ +"227.title" = "4.0"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "372"; */ +"372.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "376"; */ +"376.title" = "Cancel"; + +/* Class = "NSButtonCell"; title = "Reset"; ObjectID = "382"; */ +"382.title" = "Reset"; + +/* Class = "NSButtonCell"; title = "Odd/even bit hack"; ObjectID = "531"; */ +"531.title" = "Odd/even bit hack"; + +/* Class = "NSFormCell"; title = "Height:"; ObjectID = "3eM-lr-W6U"; */ +"3eM-lr-W6U.title" = "Height:"; + +/* Class = "NSFormCell"; title = "Width:"; ObjectID = "4UQ-Uy-UYS"; */ +"4UQ-Uy-UYS.title" = "Width:"; + +/* Class = "NSFormCell"; title = "Field:"; ObjectID = "7gB-tB-Kx4"; */ +"7gB-tB-Kx4.title" = "Field:"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/Info.plist pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/Info.plist --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/Info.plist 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/Info.plist 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,22 @@ + + + + + CFBundleAllowMixedLocalizations + + CFBundleDevelopmentRegion + en_US + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + PsxP + CFBundleSignature + PSGl + CFBundleVersion + 1.16 + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/drawgl.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/drawgl.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/drawgl.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/drawgl.m 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,209 @@ +/*************************************************************************** + drawgl.m + PeopsSoftGPU + + Created by Gil Pedersen on Sun April 18 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#import "PluginWindowController.h" +#import "PluginGLView.h" +#include "ExtendedKeys.h" +#include "externals.h" +#include "draw.h" +#include "gpu.h" +#include "menu.h" + +//////////////////////////////////////////////////////////////////////////////////// +// misc globals +//////////////////////////////////////////////////////////////////////////////////// + +int iResX; +int iResY; +long lLowerpart; +BOOL bIsFirstFrame = TRUE; +BOOL bCheckMask=FALSE; +unsigned short sSetMask=0; +unsigned long lSetMask=0; +int iDesktopCol=16; +int iShowFPS=0; +int iWinSize; +int iUseScanLines=0; +int iUseNoStretchBlt=0; +int iFastFwd=0; +int iDebugMode=0; +int iFVDisplay=0; +PSXPoint_t ptCursorPoint[8]; +unsigned short usCursorActive=0; +char * Xpixels; +char * pCaptionText; + +//static PluginWindowController *windowController; +static PluginGLView *glView; + +//////////////////////////////////////////////////////////////////////// + +void DoBufferSwap(void) // SWAP BUFFERS +{ +#if 1 + [glView swapBuffer]; +#else + static long long lastTickCount = -1; + static int skipCount = 0; + long long microTickCount; + long deltaTime; + + Microseconds((struct UnsignedWide *)µTickCount); + deltaTime = (long)(microTickCount - lastTickCount); + if (deltaTime <= (PSXDisplay.PAL ? 1000000/50 : 100000000 / 5994) || + skipCount >= 3) { + skipCount = 0; + [glView swapBuffer]; + } else { + skipCount++; + } + NSLog(@"count: %i", deltaTime); + lastTickCount = microTickCount; +#endif +} + + +//////////////////////////////////////////////////////////////////////// + +void DoClearScreenBuffer(void) // CLEAR DX BUFFER +{ + // clear the screen, and DON'T flush it + [glView clearBuffer:NO]; +} + + +//////////////////////////////////////////////////////////////////////// + +void DoClearFrontBuffer(void) // CLEAR DX BUFFER +{ + // clear the screen, and flush it + [glView clearBuffer:YES]; +} + +//////////////////////////////////////////////////////////////////////// + +unsigned long ulInitDisplay(void) // OPEN GAME WINDOW +{ + bUsingTWin = FALSE; + + InitMenu(); + + bIsFirstFrame = FALSE; + + if(iShowFPS) + { + //iShowFPS = 0; + ulKeybits |= KEY_SHOWFPS; + szDispBuf[0] = 0; + BuildDispMenu(0); + } + __block NSWindow *window = nil; + RunOnMainThreadSync(^{ + PluginWindowController *windowController = [PluginWindowController openGameView]; + glView = [windowController openGLView]; + + NSString *title = @(pCaptionText); + [[windowController window] setTitle:title]; + window = [windowController window]; + }); + + return (unsigned long)window; +} + + +//////////////////////////////////////////////////////////////////////// + +void CloseDisplay(void) +{ + if (gameController) { + [gameController close]; + gameController = nil; + gameWindow = nil; + } +} + + +//////////////////////////////////////////////////////////////////////// + +void CreatePic(unsigned char * pMem) +{ +} + + +/////////////////////////////////////////////////////////////////////////////////////// + +void DestroyPic(void) +{ +} + + +/////////////////////////////////////////////////////////////////////////////////////// + +void DisplayPic(void) +{ +} + + +/////////////////////////////////////////////////////////////////////////////////////// + +void ShowGpuPic(void) +{ + // this is the default implementation... +} + +/////////////////////////////////////////////////////////////////////////////////////// + +void ShowTextGpuPic(void) +{ + // this is the default implementation... +} + +void HandleKey(int keycode) +{ + switch (keycode) { + case GPU_FRAME_LIMIT: + if(UseFrameLimit) { + UseFrameLimit = 0; + iFrameLimit = 1; + } + else { + UseFrameLimit = 1; + iFrameLimit = 2; + } + SetAutoFrameCap(); + break; + case GPU_FAST_FORWARD: + if(UseFrameLimit) { + UseFrameLimit = 0; + iFrameLimit = 1; + UseFrameSkip = 1; + iFastFwd = 0; + } + else { + UseFrameLimit = 1; + iFrameLimit = 2; + UseFrameSkip = 0; + iFastFwd = 0; + } + bSkipNextFrame = FALSE; + break; + case GPU_FULLSCREEN_KEY: + gameController.fullscreen = !gameController.fullscreen; + break; + } +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/ExtendedKeys.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/ExtendedKeys.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/ExtendedKeys.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/ExtendedKeys.h 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,28 @@ + +#ifndef __EXTENDED_KEYS_H__ +#define __EXTENDED_KEYS_H__ + +enum { + PSX_FREEZE_KEY = 0xFFBE/*XK_F1*/, + PSX_NEXT_FREEZE_SLOT_KEY = 0xFFBF/*XK_F2*/, + PSX_DEFROST_KEY = 0xFFC0/*XK_F3*/, + PSX_SHOW_FREEZE_PIC_KEY = 0xFFC1/*XK_F4*/, + PSX_SIO_ALWAYS_ON_KEY = 0xFFC2/*XK_F5*/, + PSX_BW_MDEC_KEY = 0xFFC3/*XK_F6*/, + PSX_XA_AUDIO_ON_KEY = 0xFFC4/*XK_F7*/, + PSX_SNAPSHOT_KEY = 0xFFC5/*XK_F8*/, + PSX_OPEN_SHELL_KEY = 0xFFC6/*XK_F9*/, + PSX_CLOSE_SHELL_KEY = 0xFFC7/*XK_F10*/, + + PSX_STOP_KEY = 0xFF1B/*XK_Escape*/, + + GPU_FULLSCREEN_KEY = 0x0100, + GPU_FPS_DISPLAY_KEY = 0xFFFF,/*XK_Delete*/ + + // Fake HotKeys + GPU_HOTKEYS = 0x020, + GPU_FAST_FORWARD, + GPU_FRAME_LIMIT +}; + +#endif //__EXTENDED_KEYS_H__ diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/PluginConfigController.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/PluginConfigController.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/PluginConfigController.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/PluginConfigController.h 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,39 @@ +/* NetSfPeopsSoftGPUPluginConfigController */ + +#define PluginConfigController NetSfPeopsSoftGPUPluginConfigController + +#import + +@interface NetSfPeopsSoftGPUPluginConfigController : NSWindowController +@property (strong) NSURL *vertexPath; +@property (strong) NSURL *fragmentPath; +@property (strong) NSMutableDictionary *keyValues; + +@property (weak) IBOutlet NSFormCell *displayWidth; +@property (weak) IBOutlet NSFormCell *displayHeight; +@property (weak) IBOutlet NSControl *autoFullScreen; +@property (weak) IBOutlet NSPopUpButton *ditherMode; +@property (weak) IBOutlet NSControl *fpsCounter; +@property (weak) IBOutlet NSControl *frameSkipping; +@property (weak) IBOutlet NSControl *hackEnable; +@property (weak) IBOutlet NSView *hacksView; +@property (weak) IBOutlet NSMatrix *hacksMatrix; +@property (weak) IBOutlet NSControl *vSync; +@property (weak) IBOutlet NSControl *shaders; +@property (weak) IBOutlet NSTextField *vertexShaderViewablePath; +@property (weak) IBOutlet NSTextField *fragmentShaderViewablePath; +@property (weak) IBOutlet NSControl *vertexChooser; +@property (weak) IBOutlet NSControl *fragmentChooser; +@property (weak) IBOutlet NSView *shadersView; +@property (weak) IBOutlet NSPopUpButton *shaderQualitySelector; + +- (IBAction)cancel:(id)sender; +- (IBAction)ok:(id)sender; +- (IBAction)reset:(id)sender; +- (IBAction)hackToggle:(id)sender; +- (IBAction)toggleShader:(id)sender; +- (IBAction)selectShader:(id)sender; + +- (void)loadValues; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,387 @@ +#import "PluginConfigController.h" +#include "gpu.h" +#include "cfg.h" +#include "menu.h" +#include "externals.h" +#import "SGPUPreferences.h" +#import "PluginGLView.h" + +#ifdef ENABLE_NLS +#include +#include +#define _(x) gettext(x) +#define N_(x) (x) +//If running under Mac OS X, use the Localizable.strings file instead. +#elif defined(_MACOSX) +#ifdef PCSXRCORE +__private_extern char* Pcsxr_locale_text(char* toloc); +#define _(String) Pcsxr_locale_text(String) +#define N_(String) String +#else +#ifndef PCSXRPLUG +#warning please define the plug being built to use Mac OS X localization! +#define _(msgid) msgid +#define N_(msgid) msgid +#else +//Kludge to get the preprocessor to accept PCSXRPLUG as a variable. +#define PLUGLOC_x(x,y) x ## y +#define PLUGLOC_y(x,y) PLUGLOC_x(x,y) +#define PLUGLOC PLUGLOC_y(PCSXRPLUG,_locale_text) +__private_extern char* PLUGLOC(char* toloc); +#define _(String) PLUGLOC(String) +#define N_(String) String +#endif +#endif +#else +#define _(x) (x) +#define N_(x) (x) +#endif + +#define APP_ID @"net.sf.peops.SoftGpuGLPlugin" +#define PrefsKey APP_ID @" Settings" + +static PluginConfigController *windowController = nil; + +#define kWindowSize @"Window Size" + +void AboutDlgProc() +{ + // Get parent application instance + NSBundle *bundle = [NSBundle bundleWithIdentifier:APP_ID]; + + // Get Credits.rtf + NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; + NSAttributedString *credits; + if (!path) { + path = [bundle pathForResource:@"Credits" ofType:@"rtfd"]; + } + if (path) { + credits = [[NSAttributedString alloc] initWithPath:path documentAttributes:NULL]; + } else { + credits = [[NSAttributedString alloc] initWithString:@""]; + } + + // Get Application Icon + NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:[bundle bundlePath]]; + NSSize size = NSMakeSize(64, 64); + [icon setSize:size]; + + NSDictionary *infoPaneDict = + @{@"ApplicationName": [bundle objectForInfoDictionaryKey:@"CFBundleName"], + @"ApplicationIcon": icon, + @"ApplicationVersion": [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], + @"Version": [bundle objectForInfoDictionaryKey:@"CFBundleVersion"], + @"Copyright": [bundle objectForInfoDictionaryKey:@"NSHumanReadableCopyright"], + @"Credits": credits}; + dispatch_async(dispatch_get_main_queue(), ^{ + [NSApp orderFrontStandardAboutPanelWithOptions:infoPaneDict]; + }); +} + +void SoftDlgProc() +{ + RunOnMainThreadSync(^{ + NSWindow *window; + + if (windowController == nil) { + windowController = [[PluginConfigController alloc] initWithWindowNibName:@"NetSfPeopsSoftGPUConfig"]; + } + window = [windowController window]; + + /* load values */ + [windowController loadValues]; + + [window center]; + [window makeKeyAndOrderFront:nil]; + }); +} + +BOOL isShaderEnabled() +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSDictionary *keyValues = [defaults dictionaryForKey:PrefsKey]; + return [keyValues[@"UseShader"] boolValue]; +} + +NSURL *PSXVertexShader() +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSDictionary *keyValues = [defaults dictionaryForKey:PrefsKey]; + return [NSURL URLByResolvingBookmarkData:keyValues[@"VertexShader"] options:NSURLBookmarkResolutionWithoutUI relativeToURL:nil bookmarkDataIsStale:NULL error:nil]; +} + +NSURL *PSXFragmentShader() +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSDictionary *keyValues = [defaults dictionaryForKey:PrefsKey]; + return [NSURL URLByResolvingBookmarkData:keyValues[@"FragmentShader"] options:NSURLBookmarkResolutionWithoutUI relativeToURL:nil bookmarkDataIsStale:NULL error:nil]; +} + +float PSXShaderQuality() +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSDictionary *keyValues = [defaults dictionaryForKey:PrefsKey]; + return (float)[keyValues[@"ShaderQuality"] intValue]; +} + +void ReadConfig(void) +{ + NSDictionary *keyValues; + NSBundle *selfBundle = [NSBundle bundleWithIdentifier:APP_ID]; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults registerDefaults:@{PrefsKey: @{@"FPS Counter": @NO, + @"Auto Full Screen": @NO, + @"Frame Skipping": @NO, + @"Frame Limit": @YES, + @"VSync": @NO, + @"Enable Hacks": @NO, + @"Dither Mode": @1, + @"Hacks": @((unsigned int)0), + @"VertexShader": [[selfBundle URLForResource:@"gpuPeteOGL2" withExtension:@"slv"] bookmarkDataWithOptions:0 includingResourceValuesForKeys:nil relativeToURL:nil error:nil], + @"FragmentShader": [[selfBundle URLForResource:@"gpuPeteOGL2" withExtension:@"slf"] bookmarkDataWithOptions:0 includingResourceValuesForKeys:nil relativeToURL:nil error:nil], + @"UseShader": @NO, + @"ShaderQuality": @4, + kWindowSize: NSStringFromSize(NSMakeSize(640, 480))}}]; + + keyValues = [defaults dictionaryForKey:PrefsKey]; + BOOL windowSizeNeedsReset = NO; + if (keyValues) { + NSSize size = NSSizeFromString(keyValues[kWindowSize]); + if (!keyValues[kWindowSize]) { + windowSizeNeedsReset = YES; + } else if ([keyValues[kWindowSize] isKindOfClass:[NSNumber class]]) { + windowSizeNeedsReset = YES; + } else if (size.height == 0 || size.width == 0) { + windowSizeNeedsReset = YES; + } + } + if (windowSizeNeedsReset) { + NSMutableDictionary *tmpDict = [[NSMutableDictionary alloc] initWithDictionary:keyValues]; + tmpDict[kWindowSize] = NSStringFromSize(NSMakeSize(640, 480)); + [defaults setObject:tmpDict forKey:PrefsKey]; + [defaults synchronize]; + } + + iShowFPS = [keyValues[@"FPS Counter"] boolValue]; + iWindowMode = [keyValues[@"Auto Full Screen"] boolValue] ? 0 : 1; + UseFrameSkip = [keyValues[@"Frame Skipping"] boolValue]; + UseFrameLimit = [keyValues[@"Frame Limit"] boolValue]; + //??? = [[keyValues objectForKey:@"VSync"] boolValue]; + iUseFixes = [keyValues[@"Enable Hacks"] boolValue]; + + iUseDither = [keyValues[@"Dither Mode"] intValue]; + dwCfgFixes = [keyValues[@"Hacks"] unsignedIntValue]; + + NSSize windowSize = NSSizeFromString(keyValues[kWindowSize]); + + iResX = windowSize.width; + iResY = windowSize.height; + iUseNoStretchBlt = 1; + + fFrameRate = 60; + iFrameLimit = 2; + + if (iShowFPS) + ulKeybits |= KEY_SHOWFPS; + else + ulKeybits &= ~KEY_SHOWFPS; + + // additional checks + if(!iColDepth) + iColDepth = 32; + if(iUseFixes) { + dwActFixes = dwCfgFixes; + } else { + dwActFixes = 0; + } + SetFixes(); + + if(iFrameLimit == 2) + SetAutoFrameCap(); + bSkipNextFrame = FALSE; + + szDispBuf[0] = 0; + BuildDispMenu(0); +} + +@implementation NetSfPeopsSoftGPUPluginConfigController +@synthesize fragmentPath; +@synthesize vertexPath; +@synthesize autoFullScreen; +@synthesize ditherMode; +@synthesize fpsCounter; +@synthesize frameSkipping; +@synthesize hackEnable; +@synthesize hacksView; +@synthesize hacksMatrix; +@synthesize vSync; +@synthesize shaders; +@synthesize vertexShaderViewablePath; +@synthesize fragmentShaderViewablePath; +@synthesize vertexChooser; +@synthesize fragmentChooser; +@synthesize shadersView; +@synthesize shaderQualitySelector; + +- (IBAction)cancel:(id)sender +{ + [self close]; +} + +- (IBAction)ok:(id)sender +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:self.keyValues]; + writeDic[@"FPS Counter"] = ([fpsCounter intValue] ? @YES : @NO); + writeDic[@"Auto Full Screen"] = ([autoFullScreen intValue] ? @YES : @NO); + writeDic[@"Frame Skipping"] = ([frameSkipping intValue] ? @YES : @NO); + //[writeDic setObject:@([frameLimit intValue]) forKey:@"Frame Limit"]; + writeDic[@"VSync"] = ([vSync intValue] ? @YES : @NO); + writeDic[@"Enable Hacks"] = ([hackEnable intValue] ? @YES : @NO); + writeDic[@"UseShader"] = ([shaders intValue] ? @YES : @NO); + writeDic[@"ShaderQuality"] = @([shaderQualitySelector indexOfSelectedItem] + 1); + writeDic[@"Dither Mode"] = @([ditherMode indexOfSelectedItem]); + + unsigned int hackValues = 0; + for (NSCell *control in [hacksMatrix cells]) { + hackValues |= [control intValue] << ([control tag] - 1); + } + + writeDic[@"Hacks"] = @(hackValues); + + writeDic[@"VertexShader"] = [vertexPath bookmarkDataWithOptions:0 includingResourceValuesForKeys:nil relativeToURL:nil error:nil]; + writeDic[@"FragmentShader"] = [fragmentPath bookmarkDataWithOptions:0 includingResourceValuesForKeys:nil relativeToURL:nil error:nil]; + writeDic[kWindowSize] = NSStringFromSize(NSMakeSize(self.displayWidth.integerValue, self.displayHeight.integerValue)); + + // write to defaults + [defaults setObject:writeDic forKey:PrefsKey]; + [defaults synchronize]; + + // and set global values accordingly + ReadConfig(); + + [self close]; +} + +- (IBAction)reset:(id)sender +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults removeObjectForKey:PrefsKey]; + [self loadValues]; +} + +- (IBAction)hackToggle:(id)sender +{ + BOOL enable = [sender intValue] ? YES : NO; + NSArray *views = [[hacksView subviews][0] subviews]; + + for (NSView *control in views) { + if ([control isKindOfClass:[NSControl class]]) { + if ([control isKindOfClass:[NSTextField class]]) { + [(NSTextField*)control setTextColor:enable ? [NSColor controlTextColor] : [NSColor disabledControlTextColor] ]; + } + [(NSControl *)control setEnabled:enable]; + } + } +} + +- (IBAction)toggleShader:(id)sender { + BOOL enable = [sender intValue] ? YES : NO; + NSArray *views = [[shadersView subviews][0] subviews]; + + for (NSView *control in views) { + if ([control isKindOfClass:[NSControl class]]) { + if ([control isKindOfClass:[NSTextField class]]) { + [(NSTextField*)control setTextColor:enable ? [NSColor controlTextColor] : [NSColor disabledControlTextColor] ]; + } + [(NSControl *)control setEnabled:enable]; + } + } +} + +- (void)setFragmentPathInfo:(NSURL *)_fragmentPath +{ + self.fragmentPath = _fragmentPath; + if (_fragmentPath) { + [fragmentShaderViewablePath setStringValue:[fragmentPath lastPathComponent]]; + [fragmentShaderViewablePath setToolTip:[fragmentPath path]]; + } +} + +- (void)setVertexPathInfo:(NSURL *)_vertexPath +{ + self.vertexPath = _vertexPath; + if (_vertexPath) { + [vertexShaderViewablePath setStringValue:[vertexPath lastPathComponent]]; + [vertexShaderViewablePath setToolTip:[vertexPath path]]; + } +} + +- (IBAction)selectShader:(id)sender { + NSOpenPanel *openPanel = [NSOpenPanel openPanel]; + [openPanel setAllowsMultipleSelection:NO]; + [openPanel setCanChooseDirectories:NO]; + [openPanel setCanChooseFiles:YES]; + if ([openPanel runModal] == NSFileHandlingPanelOKButton) { + if ([sender tag] == 1) { + [self setVertexPathInfo:[openPanel URL]]; + } else { + [self setFragmentPathInfo:[openPanel URL]]; + } + } +} + +- (void)loadValues +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSSize theSize; + + ReadConfig(); + + /* load from preferences */ + self.keyValues = [[defaults dictionaryForKey:PrefsKey] mutableCopy]; + + { + BOOL resetPrefs = NO; + [self setVertexPathInfo:[NSURL URLByResolvingBookmarkData:self.keyValues[@"VertexShader"] options:NSURLBookmarkResolutionWithoutUI relativeToURL:nil bookmarkDataIsStale:NULL error:nil]]; + if (!vertexPath) { + resetPrefs = YES; + } + [self setFragmentPathInfo:[NSURL URLByResolvingBookmarkData:self.keyValues[@"FragmentShader"] options:NSURLBookmarkResolutionWithoutUI relativeToURL:nil bookmarkDataIsStale:NULL error:nil]]; + if (!fragmentPath) { + resetPrefs = YES; + } + if (resetPrefs) { + NSBundle *selfBundle = [NSBundle bundleForClass:[self class]]; + [self setVertexPathInfo:[selfBundle URLForResource:@"gpuPeteOGL2" withExtension:@"slv"]]; + [self setFragmentPathInfo:[selfBundle URLForResource:@"gpuPeteOGL2" withExtension:@"slf"]]; + } + } + [fpsCounter setIntValue:[self.keyValues[@"FPS Counter"] intValue]]; + [autoFullScreen setIntValue:[self.keyValues[@"Auto Full Screen"] intValue]]; + [frameSkipping setIntValue:[self.keyValues[@"Frame Skipping"] intValue]]; + [vSync setIntValue:[self.keyValues[@"VSync"] intValue]]; + [hackEnable setIntValue:[self.keyValues[@"Enable Hacks"] intValue]]; + [shaders setIntValue:[self.keyValues[@"UseShader"] intValue]]; + + [ditherMode selectItemAtIndex:[self.keyValues[@"Dither Mode"] intValue]]; + [shaderQualitySelector selectItemAtIndex:[self.keyValues[@"ShaderQuality"] intValue] - 1]; + + unsigned int hackValues = [self.keyValues[@"Hacks"] unsignedIntValue]; + + for (NSCell *control in [hacksMatrix cells]) { + [control setIntValue:(hackValues >> ([control tag] - 1)) & 1]; + } + theSize = NSSizeFromString(self.keyValues[kWindowSize]); + [self.displayWidth setIntegerValue:theSize.width]; + [self.displayHeight setIntegerValue:theSize.height]; + + [self hackToggle:hackEnable]; + [self toggleShader:shaders]; +} + +@end + +#import "OSXPlugLocalization.h" +PLUGLOCIMP([PluginConfigController class]) diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/PluginGLView.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/PluginGLView.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/PluginGLView.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/PluginGLView.h 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,48 @@ +/*************************************************************************** + PluginGLView.h + PeopsSoftGPU + + Created by Gil Pedersen on Sun April 18 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define PluginGLView NetSfPeopsSoftGPUPluginGLView + +#import +#include +#include + +#define IMAGE_COUNT 2 + +static inline void RunOnMainThreadSync(dispatch_block_t block) +{ + if ([NSThread isMainThread]) { + block(); + } else { + dispatch_sync(dispatch_get_main_queue(), block); + } +} + +@interface PluginGLView : NSOpenGLView + +@property (readonly, strong) NSLock *glLock; + +- (void)renderScreen; +- (void)swapBuffer; +- (void)clearBuffer:(BOOL)display; +- (void)loadTextures:(GLboolean)first; ++ (char*)loadSource:(NSURL *)filename; +void printProgramInfoLog(GLuint obj); +- (GLuint)loadShader:(GLenum)type location:(NSURL*)filename; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/PluginGLView.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/PluginGLView.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/PluginGLView.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/PluginGLView.m 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,783 @@ +/*************************************************************************** + PluginGLView.m + PeopsSoftGPU + + Created by Gil Pedersen on Sun April 18 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#import +#include +#include +#include +#include +#import "PluginGLView.h" +#import "SGPUPreferences.h" +#include "externals.h" +#undef BOOL +#include "gpu.h" +#include "swap.h" + +#include +extern time_t tStart; + +static int mylog2(int val) +{ + int i; + for (i=1; i<31; i++) + if (val <= (1 << i)) + return (1 << i); + + return -1; +} + + +@implementation PluginGLView +{ + GLubyte *image_base; + GLubyte *image[IMAGE_COUNT]; + + GLboolean useShader; + float shaderQuality; + GLint buffers; + GLuint vertexShader; + GLuint fragmentShader; + GLuint program; + //GLint frame_rate; + + GLenum texture_hint; + GLboolean rect_texture; + GLboolean client_storage; + GLboolean texture_range; + + struct timeval cycle_time; + + BOOL noDisplay; + BOOL drawBG; + + int image_width; + int image_height; + int image_width2; + int image_height2; + int image_depth; + int image_type; + float image_tx; + float image_ty; + int whichImage; + BOOL isFullscreen; +} +@synthesize glLock; + +//- (id)initWithFrame:(NSRect)frameRect +- (id) initWithCoder: (NSCoder *) coder +{ + if ((self = [super initWithCoder:coder]) == nil) + return nil; + + glLock = [[NSLock alloc] init]; + if (nil == glLock) { + return nil; + } + + const GLubyte * strExt; + + // Init pixel format attribs + static const NSOpenGLPixelFormatAttribute attrs[] = + { + NSOpenGLPFAAccelerated, + NSOpenGLPFANoRecovery, + NSOpenGLPFADoubleBuffer, + 0 + }; + + // Get pixel format from OpenGL + NSOpenGLPixelFormat* pixFmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attrs]; + if (!pixFmt) + { + NSLog(@"No Accelerated OpenGL pixel format found\n"); + + static const NSOpenGLPixelFormatAttribute attrs2[] = + { + NSOpenGLPFANoRecovery, + 0 + }; + + // Get pixel format from OpenGL + pixFmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attrs2]; + if (!pixFmt) { + NSLog(@"No OpenGL pixel format found!\n"); + + return nil; + } + } + + [self setPixelFormat:pixFmt]; + + /* + long swapInterval = 1 ; + [[self openGLContext] + setValues:&swapInterval + forParameter:NSOpenGLCPSwapInterval]; + */ + [glLock lock]; + [[self openGLContext] makeCurrentContext]; + + // Init object members + strExt = glGetString (GL_EXTENSIONS); + texture_range = gluCheckExtension ((const unsigned char *)"GL_APPLE_texture_range", strExt) ? GL_TRUE : GL_FALSE; + texture_hint = GL_STORAGE_SHARED_APPLE ; + client_storage = gluCheckExtension ((const unsigned char *)"GL_APPLE_client_storage", strExt) ? GL_TRUE : GL_FALSE; + rect_texture = gluCheckExtension((const unsigned char *)"GL_EXT_texture_rectangle", strExt) ? GL_TRUE : GL_FALSE; + + // Setup some basic OpenGL stuff + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); + + // Loads the shaders + + if(isShaderEnabled()){ + rect_texture = GL_FALSE; + // --- Params --- + shaderQuality = PSXShaderQuality(); + vertexShader = [self loadShader:GL_VERTEX_SHADER location:PSXVertexShader()]; + fragmentShader = [self loadShader:GL_FRAGMENT_SHADER location:PSXFragmentShader()]; + + //--- shader loading --- + program = glCreateProgram(); + glAttachShader(program, vertexShader); + glAttachShader(program, fragmentShader); + glLinkProgram(program); + glUseProgram(program); + } + + + [NSOpenGLContext clearCurrentContext]; + [glLock unlock]; + + image_width = 1024; + image_height = 512; + image_depth = 16; + + image_type = GL_UNSIGNED_SHORT_1_5_5_5_REV; + image_base = (GLubyte *) calloc(((IMAGE_COUNT * image_width * image_height) / 3) * 4, image_depth >> 3); + if (image_base == nil) { + return nil; + } + + // Create and load textures for the first time + [self loadTextures:GL_TRUE]; + + // Init fps timer + //gettimeofday(&cycle_time, NULL); + + drawBG = YES; + + // Call for a redisplay + noDisplay = YES; + PSXDisplay.Disabled = 1; + [self setNeedsDisplay:YES]; + + return self; +} + +- (void)dealloc +{ + int i; + + [glLock lock]; + + [[self openGLContext] makeCurrentContext]; + for(i = 0; i < IMAGE_COUNT; i++) + { + GLuint dt = i+1; + glDeleteTextures(1, &dt); + } + if(texture_range) + glTextureRangeAPPLE(GL_TEXTURE_RECTANGLE_EXT, IMAGE_COUNT * image_width * image_height * (image_depth >> 3), image_base); + + [NSOpenGLContext clearCurrentContext]; + [glLock unlock]; + + if (image_base) { + free(image_base); + } +} + +- (BOOL)isOpaque +{ + return YES; +} + +- (BOOL)acceptsFirstResponder +{ + return NO; +} + +- (void)drawRect:(NSRect)aRect +{ + // Check if an update has occured to the buffer + if ([self lockFocusIfCanDraw]) { + + // Make this context current + if (drawBG) { + [[NSColor blackColor] setFill]; + [NSBezierPath fillRect:[self visibleRect]]; + } + + //glFinish() ; + // Swap buffer to screen + //[[self openGLContext] flushBuffer]; + + [self unlockFocus]; + } +} + +#if 0 +- (void)update // moved or resized +{ + NSRect rect; + + [super update]; + + [[self openGLContext] makeCurrentContext]; + [[self openGLContext] update]; + + rect = [self bounds]; + + glViewport(0, 0, (int) rect.size.width, (int) rect.size.height); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + //[self setNeedsDisplay:true]; +} +#endif + +- (void)reshape // scrolled, moved or resized +{ + [glLock lock]; + + [super reshape]; + + NSOpenGLContext *oglContext = [self openGLContext]; + NSRect rect; + + [oglContext makeCurrentContext]; + [oglContext update]; + + rect = [[oglContext view] bounds]; + + glViewport(0, 0, (int) rect.size.width, (int) rect.size.height); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + drawBG = YES; + + [NSOpenGLContext clearCurrentContext]; + + //[self setNeedsDisplay:true]; + [self renderScreen]; + [glLock unlock]; +} + +- (void)renderScreen +{ + int bufferIndex = whichImage; + + if (1/*[glLock tryLock]*/) { + // Make this context current + [[self openGLContext] makeCurrentContext]; + + if (PSXDisplay.Disabled) { + glClear(GL_COLOR_BUFFER_BIT); + } else { + // Bind, update and draw new image + if(rect_texture && isShaderEnabled() == NO) // cant go in there if we use shaders + { + //printf("Texture Rectangle\n"); + //glActiveTexture(bufferIndex+1); + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_RECTANGLE_EXT, bufferIndex+1); + + glTexSubImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, 0, 0, image_width, image_height, GL_BGRA, image_type, image[bufferIndex]); + + + glBegin(GL_QUADS); + { + glTexCoord2f(0.0f, 0.0f); + glVertex2f(-1.0f, 1.0f); + + glTexCoord2f(0.0f, image_height); + glVertex2f(-1.0f, -1.0f); + + glTexCoord2f(image_width, image_height); + glVertex2f(1.0f, -1.0f); + + glTexCoord2f(image_width, 0.0f); + glVertex2f(1.0f, 1.0f); + } + glEnd(); + } + else + { + NSRect rect = [[[self openGLContext] view] bounds]; + //printf("Texture 2D normale de taille : %d, %d sur un ecran : %f x %f \n",image_width,image_height,rect.size.width,rect.size.height); + //glActiveTexture(whichImage+1); + glBindTexture(GL_TEXTURE_2D, whichImage+1); + + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, image_width2, image_height2, GL_BGRA, image_type, image[bufferIndex]); + + + if(isShaderEnabled()){ + glUseProgram(program); + + int loc = glGetUniformLocation(program, "OGL2Texture"); + glUniform1i(loc,0); + int loc2 = glGetUniformLocation(program, "OGL2Param"); + float param[4]; + param[2] = shaderQuality; + param[0] = param[2] / image_width; + param[1] = param[2] / image_height; + //param[2]=2.0; + param[3] = 0.0; + int loc3 = glGetUniformLocation(program, "OGL2Size"); + float size[4]; + //NSRect rect = [[[self openGLContext] view] bounds]; + size[0] = image_width; + size[1] = image_height; + size[2] = rect.size.width; + size[3] = rect.size.height; + int loc4 = glGetUniformLocation(program, "OGL2InvSize"); + float invSize[4]; + invSize[0] = 1.0/size[0]; + invSize[1] = 1.0/size[1]; + invSize[2] = 1.0/size[2]; + invSize[3] = 1.0/size[3]; + //invSize[4]=1.0/size[4]; //Did we goof here? + glUniform4fv(loc2, 1, param); + glUniform4fv(loc3, 1, size); + glUniform4fv(loc4, 1, invSize); + } + + glBegin(GL_QUADS); + { + glTexCoord2f(0.0f, 0.0f); + glVertex2f(-1.0f, 1.0f); + + glTexCoord2f(0.0f, image_ty); + glVertex2f(-1.0f, -1.0f); + + glTexCoord2f(image_tx, image_ty); + glVertex2f(1.0f, -1.0f); + + glTexCoord2f(image_tx, 0.0f); + glVertex2f(1.0f, 1.0f); + } + glEnd(); + } + } + + // FPS Display + if(ulKeybits&KEY_SHOWFPS) + { + int len, i; + if(szDebugText[0] && ((time(NULL) - tStart) < 2)) + { + strlcpy(szDispBuf, szDebugText, 63); + } + else + { + szDebugText[0]=0; + if (szMenuBuf) { + strncat(szDispBuf, szMenuBuf, 63 - strlen(szDispBuf)); + } + } + + NSRect rect = [[[self openGLContext] view] bounds]; + len = (int) strlen(szDispBuf); + + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + + gluOrtho2D(0.0, rect.size.width, 0.0, rect.size.height); + glDisable(rect_texture ? GL_TEXTURE_RECTANGLE_EXT : GL_TEXTURE_2D); + + glColor4f(0.0, 0.0, 0.0, 0.5); + glRasterPos2f(3.0, rect.size.height - 14.0); + for (i = 0; i < len; i++) { + glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, szDispBuf[i]); + } + + glColor3f(1.0, 1.0, 1.0); + glRasterPos2f(2.0, rect.size.height - 13.0); + for (i = 0; i < len; i++) { + glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, szDispBuf[i]); + } + + glEnable(rect_texture ? GL_TEXTURE_RECTANGLE_EXT : GL_TEXTURE_2D); + glPopMatrix(); + } + + //printProgramInfoLog(program); + //printf("\n\n\n"); + [[self openGLContext] flushBuffer]; + [NSOpenGLContext clearCurrentContext]; + //[glLock unlock]; + } +} + +- (void)loadTextures:(GLboolean)first +{ + GLint i; + printf("Loading texture\n"); + //[glLock lock]; + [[self openGLContext] makeCurrentContext]; + + image_width = PreviousPSXDisplay.Range.x1; + image_height = PreviousPSXDisplay.DisplayMode.y; + if (PSXDisplay.RGB24) { + image_depth = 32; + image_type = GL_UNSIGNED_INT_8_8_8_8_REV; + } else { + image_depth = 16; + image_type = GL_UNSIGNED_SHORT_1_5_5_5_REV; + //image_width >>= 1; + } + + if (image_width * image_height * (image_depth >> 3) > ((1024*512*2)/3)*4) + printf("Fatal error: desired dimension are too large! (%ix%i %ibpp)\n", + image_width, image_height, image_depth); + + for(i = 0; i < IMAGE_COUNT; i++) + image[i] = image_base + i * image_width * image_height * (image_depth >> 3); + + if(rect_texture) + { + image_width2 = image_width; + image_height2 = image_height; + image_tx = (float)image_width; + image_ty = (float)image_height; + + if(texture_range) glTextureRangeAPPLE(GL_TEXTURE_RECTANGLE_EXT, IMAGE_COUNT * image_width * image_height * (image_depth >> 3), image_base); + else glTextureRangeAPPLE(GL_TEXTURE_RECTANGLE_EXT, 0, NULL); + + for(i = 0; i < IMAGE_COUNT; i++) + { + if(!first) + { + GLuint dt = i+1; + glDeleteTextures(1, &dt); + } + + glDisable(GL_TEXTURE_2D); + glActiveTexture(GL_TEXTURE0); + glEnable(GL_TEXTURE_RECTANGLE_EXT); + glBindTexture(GL_TEXTURE_RECTANGLE_EXT, i+1); + + + glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_STORAGE_HINT_APPLE , texture_hint); + glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, client_storage); + glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + + glTexImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, GL_RGBA, image_width, + image_height, 0, GL_BGRA, image_type, image[i]); + } + } + else + { + image_width2 = mylog2(image_width); + image_height2 = mylog2(image_height); + image_tx = (float)image_width/(float)image_width2; + image_ty = (float)image_height/(float)image_height2; + + glTextureRangeAPPLE(GL_TEXTURE_RECTANGLE_EXT, 0, NULL); + if(texture_range) glTextureRangeAPPLE(GL_TEXTURE_2D, IMAGE_COUNT * image_width2 * image_height2 * (image_depth >> 3), image_base); + else glTextureRangeAPPLE(GL_TEXTURE_2D, 0, NULL); + + for(i = 0; i < IMAGE_COUNT; i++) + { + if(!first) + { + GLuint dt = i+1; + glDeleteTextures(1, &dt); + } + + glDisable(GL_TEXTURE_RECTANGLE_EXT); + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, i+1); + + //if(texture_range) glTextureRangeAPPLE(GL_TEXTURE_2D, IMAGE_COUNT * image_width2 * image_height2 * (image_depth >> 3), image_base); + //else glTextureRangeAPPLE(GL_TEXTURE_2D, 0, NULL); + + glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_STORAGE_HINT_APPLE , texture_hint); + glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, client_storage); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image_width2, + image_height2, 0, GL_BGRA, image_type, image[i]); + } + } + + [NSOpenGLContext clearCurrentContext]; + //[glLock unlock]; +} + +- (void)swapBuffer +{ + RunOnMainThreadSync(^{ + //printf("y=%i",PSXDisplay.DisplayPosition.y); + + unsigned char * surf; + long x = PSXDisplay.DisplayPosition.x; + long y = PSXDisplay.DisplayPosition.y; + GLuint lu; + unsigned short row,column; + unsigned short dx=PreviousPSXDisplay.Range.x1; + unsigned short dy=PreviousPSXDisplay.DisplayMode.y; + long lPitch; + + if ([glLock tryLock]) { + // make sure the texture area is ready to be written to + glFinishObjectAPPLE(GL_TEXTURE, 2-whichImage); + + if ((image_width != PreviousPSXDisplay.Range.x1) || + (image_height != PreviousPSXDisplay.DisplayMode.y) || + ((PSXDisplay.RGB24 ? 32 : 16) != image_depth)) { + [self loadTextures:GL_FALSE]; + } + + surf = image[1-whichImage]; + lPitch=image_width2<<(image_depth >> 4); + + if(PreviousPSXDisplay.Range.y0) // centering needed? + { + surf+=PreviousPSXDisplay.Range.y0*lPitch; + dy-=PreviousPSXDisplay.Range.y0; + } + + if(PSXDisplay.RGB24) + { + unsigned char * pD; + size_t startxy; + + surf+=PreviousPSXDisplay.Range.x0<<2; + + for(column=0;column>24)&0xff)<<16)|(((lu1>>16)&0xff)<<8)|(((lu1>>8)&0xff)); + *(dst+1)= + (((lu1>>0)&0xff)<<16)|(((lu2>>24)&0xff)<<8)|(((lu2>>16)&0xff)); + *(dst+2)= + (((lu2>>8)&0xff)<<16)|(((lu2>>0)&0xff)<<8)|(((lu3>>24)&0xff)); + *(dst+3)= + (((lu3>>16)&0xff)<<16)|(((lu3>>8)&0xff)<<8)|(((lu3>>0)&0xff)); +#else + *(dst)= + (((lu1>>0)&0xff)<<16)|(((lu1>>8)&0xff)<<8)|(((lu1>>16)&0xff)); + *(dst+1)= + (((lu1>>24)&0xff)<<16)|(((lu2>>0)&0xff)<<8)|(((lu2>>8)&0xff)); + *(dst+2)= + (((lu2>>16)&0xff)<<16)|(((lu2>>24)&0xff)<<8)|(((lu3>>0)&0xff)); + *(dst+3)= + (((lu3>>8)&0xff)<<16)|(((lu3>>16)&0xff)<<8)|(((lu3>>24)&0xff)); +#endif + pD+=12; + } + + //for(;row> 1); + + dx >>= 1; + + LineOffset = 512 - dx; + SurfOffset = (lPitch >> 2) - dx; + + for(column=0;column> 10) & 0x1f001f); + } + SRCPtr += LineOffset; + DSTPtr += SurfOffset; + } + } + + // Swap image buffer + whichImage = 1 - whichImage; + + [self renderScreen]; + [glLock unlock]; + } + + }); +} + +- (void)clearBuffer:(BOOL)display +{ + if (display == NO) { + //[[self openGLContext] makeCurrentContext]; + //glClear(GL_COLOR_BUFFER_BIT); + //[self loadTextures:NO]; + } else { + noDisplay = YES; + //[self setNeedsDisplay:true]; + } +} + +- (GLuint)loadShader:(GLenum)type location:(NSURL*)filename +{ + GLuint myShader = 0; + + GLsizei logsize = 0; + GLint compile_status = GL_TRUE; + char *log = NULL; + char *src = NULL; + + /* creation d'un shader de sommet */ + myShader = glCreateShader(type); + if(myShader == 0) + { + NSLog(@"impossible de creer le shader"); + return 0; + } + + /* chargement du code source */ + src = [PluginGLView loadSource:filename]; + if(src == NULL) + { + /* theoriquement, la fonction LoadSource a deja affiche un message + d'erreur, nous nous contenterons de supprimer notre shader + et de retourner 0 */ + + glDeleteShader(myShader); + return 0; + } + + /* assignation du code source */ + glShaderSource(myShader, 1, (const GLchar**)&src, NULL); + + /* compilation du shader */ + glCompileShader(myShader); + + /* liberation de la memoire du code source */ + free(src); + src = NULL; + + /* verification du succes de la compilation */ + glGetShaderiv(myShader, GL_COMPILE_STATUS, &compile_status); + if(compile_status != GL_TRUE) + { + /* erreur a la compilation recuperation du log d'erreur */ + + /* on recupere la taille du message d'erreur */ + glGetShaderiv(myShader, GL_INFO_LOG_LENGTH, &logsize); + + /* on alloue un espace memoire dans lequel OpenGL ecrira le message */ + log = calloc(logsize + 1, 1); + if(log == NULL) + { + NSLog(@"impossible d'allouer de la memoire!"); + return 0; + } + + glGetShaderInfoLog(myShader, logsize, &logsize, log); + NSLog(@"impossible de compiler le shader '%@' :\n%s", + [filename path], log); + + /* ne pas oublier de liberer la memoire et notre shader */ + free(log); + glDeleteShader(myShader); + + return 0; + } + return myShader; +} + ++ (char*)loadSource:(NSURL *)filename +{ + //Since we're passing Cocoa NSURLs, let's use Cocoa's methods + if (filename == nil) { + return NULL; + } + + NSUInteger len; + NSMutableData *shaderData = [[NSMutableData alloc] initWithContentsOfURL:filename]; + [shaderData appendBytes:"\0" length:1]; + len = [shaderData length]; + char *shaderText = malloc(len); + [shaderData getBytes:shaderText length:len]; + return shaderText; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,36 @@ +/*************************************************************************** + PluginWindowController.h + PeopsSoftGPU + + Created by Gil Pedersen on Mon April 11 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define PluginWindowController NetSfPeopsSoftGPUPluginWindowController + +#import +#import "PluginGLView.h" + +@class PluginWindowController; + +extern NSWindow *gameWindow; +extern PluginWindowController *gameController; + +@interface PluginWindowController : NSWindowController + +@property (getter = isFullscreen) BOOL fullscreen; +@property (weak) IBOutlet NSOpenGLView *glView; ++ (id)openGameView; +- (PluginGLView *)openGLView; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,219 @@ +/*************************************************************************** + PluginWindowController.m + PeopsSoftGPU + + Created by Gil Pedersen on Tue April 12 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#import "PluginWindowController.h" +#import "PluginWindow.h" +#include "externals.h" +#undef BOOL + +NSWindow *gameWindow; +PluginWindowController *gameController; +NSRect windowFrame; + +@implementation PluginWindowController +{ + NSWindow *fullWindow; +} ++ (id)openGameView +{ + if (gameWindow == nil) { + if (gameController == nil) { + gameController = [[PluginWindowController alloc] initWithWindowNibName:@"NetSfPeopsSoftGPUInterface"]; + } + gameWindow = [gameController window]; + } + + windowFrame = NSMakeRect(0, 0, iResX + 8, iResY + 4); + + windowFrame = [NSWindow contentRectForFrameRect:windowFrame styleMask:NSTitledWindowMask]; + + + if (windowFrame.size.width != 0) { + [gameWindow setFrame:windowFrame display:NO]; + } + [gameWindow center]; + + [gameWindow makeKeyAndOrderFront:nil]; + [gameController showWindow:nil]; + + CGDirectDisplayID display = (CGDirectDisplayID)[[[gameWindow screen] deviceDescription][@"NSScreenNumber"] unsignedIntValue]; + if (CGDisplayIsCaptured(display)) { + [gameController setFullscreen:YES]; + } + + return gameController; +} + +- (PluginGLView *)openGLView +{ + return (PluginGLView *)self.glView; +} + +- (void)dealloc +{ + if (fullWindow) { + [fullWindow orderOut:self]; + } + fullWindow = nil; + + windowFrame = [[self window] frame]; +} + +// forget keyDownEvents +- (void)keyDown:(NSEvent *)theEvent +{ + // Not required any more +} + +- (void)mouseDown:(NSEvent *)theEvent +{ + if (self.fullscreen) { + [self setFullscreen:NO]; + } +} + +- (BOOL)isFullscreen +{ + return (fullWindow != nil); +} + +- (void)setFullscreen:(BOOL)flag +{ + NSWindow *window = [self window]; + NSScreen *screen = [window screen]; + CGDirectDisplayID display = (CGDirectDisplayID)[[screen deviceDescription][@"NSScreenNumber"] unsignedIntValue]; + + NSDisableScreenUpdates(); + + if (flag) { + if (!CGDisplayIsCaptured(display)) { + CGDisplayCapture(display); + + CGDisplayCount count = 10; + CGDirectDisplayID displays[10]; + CGGetActiveDisplayList(10, displays, &count); + if (count == 1) { + CGDisplayHideCursor(display); + CGAssociateMouseAndMouseCursorPosition(NO); + } + + //[window orderOut:self]; + } + + size_t width = CGDisplayPixelsWide(display); + size_t height = CGDisplayPixelsHigh(display); + + // assume square pixel ratio on the monitor + if ((width*3)/4 < height) { + height = (width*3)/4; + } else { + width = (height*4)/3; + } + + fullWindow = [[NSWindow alloc] initWithContentRect:NSMakeRect((CGDisplayPixelsWide(display)-width)/2, + (CGDisplayPixelsHigh(display)-height)/2, + width, height) + styleMask:NSBorderlessWindowMask + backing:NSBackingStoreRetained + defer:NO + screen:screen]; + + //[[glView openGLContext] setFullScreen]; + [[self.glView openGLContext] setView:[fullWindow contentView]]; + [self.glView reshape]; + //[[glView openGLContext] update]; + //[fullWindow setContentView:glView]; + + [fullWindow setBackgroundColor:[NSColor blackColor]]; + [fullWindow setHasShadow:NO]; + [fullWindow setDelegate:self]; + + [fullWindow setLevel:CGShieldingWindowLevel()]; + [fullWindow makeKeyAndOrderFront:self]; + + [[self window] makeKeyAndOrderFront:self]; + } else { + CGDisplayRelease(display); + //CGReleaseAllDisplays(); + + CGAssociateMouseAndMouseCursorPosition(YES); + CGDisplayShowCursor(display); + + if (fullWindow) { + [fullWindow orderOut:self]; + fullWindow = nil; + + [[self.glView openGLContext] setView:_glView]; + [self.glView reshape]; + //[window setContentView:glView]; + } + + [[self window] makeKeyAndOrderFront:self]; + } + + NSEnableScreenUpdates(); +} + +- (BOOL)windowShouldZoom:(NSWindow *)sender toFrame:(NSRect)newFrame +{ + self.fullscreen = YES; + + return NO; +} + +- (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)proposedFrameSize +{ + if (!(([sender resizeFlags] & NSShiftKeyMask) == NSShiftKeyMask)) { + NSRect oldSize = [sender frame]; + NSRect viewSize = [self.glView frame]; + + float xDiff = NSWidth(oldSize) - NSWidth(viewSize); + float yDiff = NSHeight(oldSize) - NSHeight(viewSize); + + //if ((proposedFrameSize.height / proposedFrameSize.width) < (3.0/4.0)) + // proposedFrameSize.height = ((proposedFrameSize.width - xDiff) * 3.0) / 4.0 + yDiff; + //else + proposedFrameSize.width = ((proposedFrameSize.height - yDiff) * 4.0) / 3.0 + xDiff; + } + + return proposedFrameSize; +} + +- (void)windowWillMiniaturize:(NSNotification *)aNotification +{ + [[NSNotificationCenter defaultCenter] postNotificationName:@"emuWindowWantPause" object:self]; +} + +- (void)windowDidDeminiaturize:(NSNotification *)aNotification +{ + [[NSNotificationCenter defaultCenter] postNotificationName:@"emuWindowWantResume" object:self]; +} + +- (BOOL)windowShouldClose:(id)sender +{ + if (fullWindow) { + return NO; + } + [[NSNotificationCenter defaultCenter] postNotificationName:@"emuWindowDidClose" object:self]; + gameController = nil; + gameWindow = nil; + + return YES; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/PluginWindow.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/PluginWindow.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/PluginWindow.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/PluginWindow.h 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,23 @@ +/*************************************************************************** + PluginWindow.h + PeopsSoftGPU + + Created by Gil Pedersen on Wed April 21 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#import + +@interface NetSfPeopsSoftGPUPluginWindow : NSWindow + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/PluginWindow.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/PluginWindow.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/PluginWindow.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/PluginWindow.m 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,46 @@ +/*************************************************************************** + PluginWindow.m + PeopsSoftGPU + + Created by Gil Pedersen on Wed April 21 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#import "PluginWindow.h" + +@implementation NetSfPeopsSoftGPUPluginWindow +/* +- (BOOL)windowShouldClose:(id)sender +{ + [[NSNotificationCenter defaultCenter] postNotificationName:@"emuWindowDidClose" object:self]; + + return YES; +}*/ + +- (void)sendEvent:(NSEvent *)theEvent +{ + NSEventType type = [theEvent type]; + if (type == NSKeyDown || type == NSKeyUp) { + if (type == NSKeyDown && [theEvent keyCode] == 53 /* escape */) { + // reroute to menu event + [[NSApp mainMenu] performKeyEquivalent:theEvent]; + } + + // ignore all key Events + return; + } + + [super sendEvent:theEvent]; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/SGPUPreferences.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/SGPUPreferences.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/macsrc/SGPUPreferences.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/macsrc/SGPUPreferences.h 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,14 @@ +// +// SGPUPreferences.h +// PeopsSoftGPU +// +// Created by C.W. Betts on 9/16/12. +// +// + +#import + +BOOL isShaderEnabled(); +NSURL *PSXFragmentShader(); +NSURL *PSXVertexShader(); +float PSXShaderQuality(); diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/NetSfPeopsSoftGPUInterface.xib pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/NetSfPeopsSoftGPUInterface.xib --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/NetSfPeopsSoftGPUInterface.xib 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/NetSfPeopsSoftGPUInterface.xib 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/zh-Hans.lproj/Credits.rtf pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/zh-Hans.lproj/Credits.rtf --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/zh-Hans.lproj/Credits.rtf 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/zh-Hans.lproj/Credits.rtf 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,22 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset134 STHeitiSC-Light;} +{\colortbl;\red255\green255\blue255;} +\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural + +\f0\b\fs24 \cf0 Created By +\b0 \ + Pete Bernert and the P.E.Op.S. team\ +\ + +\b Macintosh Port By +\b0 \ + Gil Pedersen\ + C.W. \'93Madd the Sane\'94 Betts\ +\ + +\b Chinese Translation( +\f1 \'d6\'d0\'ce\'c4\'b7\'ad\'d2\'eb +\f0 ): +\b0 \ + Sdchun} \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/zh-Hans.lproj/NetSfPeopsSoftGPUConfig.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/zh-Hans.lproj/NetSfPeopsSoftGPUConfig.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/DFXVideo/zh-Hans.lproj/NetSfPeopsSoftGPUConfig.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/DFXVideo/zh-Hans.lproj/NetSfPeopsSoftGPUConfig.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,192 @@ + +/* Class = "NSWindow"; title = "GPU 配置"; ObjectID = "5"; */ +"5.title" = "GPU 配置"; + +/* Class = "NSBox"; title = "技巧"; ObjectID = "76"; */ +"76.title" = "技巧"; + +/* Class = "NSBox"; title = "显示设置"; ObjectID = "89"; */ +"89.title" = "显示设置"; + +/* Class = "NSButton"; ibShadowedToolTip = "等待显示器同步移除画面撕裂.会轻微性能降低.这个设置不会影响LCD显示器."; ObjectID = "93"; */ +"93.ibShadowedToolTip" = "等待显示器同步移除画面撕裂.会轻微性能降低.这个设置不会影响LCD显示器."; + +/* Class = "NSButton"; ibShadowedToolTip = "需要时跳过渲染以改善全部速度.这个设置可能使兼容性存在问题."; ObjectID = "96"; */ +"96.ibShadowedToolTip" = "需要时跳过渲染以改善全部速度.这个设置可能使兼容性存在问题."; + +/* Class = "NSButton"; ibShadowedToolTip = "启用小计数器测量现有FPS性能."; ObjectID = "97"; */ +"97.ibShadowedToolTip" = "启用小计数器测量现有FPS性能."; + +/* Class = "NSButton"; ibShadowedToolTip = "自动进入全屏模式"; ObjectID = "99"; */ +"99.ibShadowedToolTip" = "自动进入全屏模式"; + +/* Class = "NSBox"; title = "渲染"; ObjectID = "107"; */ +"107.title" = "渲染"; + +/* Class = "NSMenuItem"; title = "从不"; ObjectID = "111"; */ +"111.title" = "从不"; + +/* Class = "NSTextField"; ibShadowedToolTip = "指定使用抖动时渲染颜色"; ObjectID = "112"; */ +"112.ibShadowedToolTip" = "指定使用抖动时渲染颜色"; + +/* Class = "NSMenu"; title = "查看其他"; ObjectID = "113"; */ +"113.title" = "查看其他"; + +/* Class = "NSMenuItem"; title = "总是"; ObjectID = "114"; */ +"114.title" = "总是"; + +/* Class = "NSMenuItem"; title = "需要时"; ObjectID = "115"; */ +"115.title" = "需要时"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "指定使用抖动时渲染颜色"; ObjectID = "116"; */ +"116.ibShadowedToolTip" = "指定使用抖动时渲染颜色"; + +/* Class = "NSButton"; ibShadowedToolTip = "启用下面指定的技巧"; ObjectID = "117"; */ +"117.ibShadowedToolTip" = "启用下面指定的技巧"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "修复在Lunar时黑屏"; ObjectID = "161"; */ +"161.ibShadowedToolTip" = "修复在Lunar时黑屏"; + +/* Class = "NSButtonCell"; title = "忽视黑色"; ObjectID = "161"; */ +"161.title" = "忽视黑色"; + +/* Class = "NSTextFieldCell"; title = "仅启用技巧修复游戏中指定的问题."; ObjectID = "162"; */ +"162.title" = "仅启用技巧修复游戏中指定的问题."; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "在有些游戏中限制每秒的帧数."; ObjectID = "163"; */ +"163.ibShadowedToolTip" = "在有些游戏中限制每秒的帧数."; + +/* Class = "NSButtonCell"; title = "使用PC计算每秒的帧数"; ObjectID = "163"; */ +"163.title" = "使用PC计算每秒的帧数"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "老兼容模式"; ObjectID = "164"; */ +"164.ibShadowedToolTip" = "老兼容模式"; + +/* Class = "NSButtonCell"; title = "关闭坐标检查"; ObjectID = "164"; */ +"164.title" = "关闭坐标检查"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "在有些游戏中限制每秒的帧数."; ObjectID = "165"; */ +"165.ibShadowedToolTip" = "在有些游戏中限制每秒的帧数."; + +/* Class = "NSButtonCell"; title = "使用老跳帧方式"; ObjectID = "165"; */ +"165.title" = "使用老跳帧方式"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "显示全部Capcom的2D战斗"; ObjectID = "166"; */ +"166.ibShadowedToolTip" = "显示全部Capcom的2D战斗"; + +/* Class = "NSButtonCell"; title = "扩大屏幕宽度"; ObjectID = "166"; */ +"166.title" = "扩大屏幕宽度"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "可能更快,需要 Pandemonium 2"; ObjectID = "167"; */ +"167.ibShadowedToolTip" = "可能更快,需要 Pandemonium 2"; + +/* Class = "NSButtonCell"; title = "屏幕更新缓慢"; ObjectID = "167"; */ +"167.title" = "屏幕更新缓慢"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "取消计时器"; ObjectID = "168"; */ +"168.ibShadowedToolTip" = "取消计时器"; + +/* Class = "NSButtonCell"; title = "奇数/偶数 控制技巧"; ObjectID = "168"; */ +"168.title" = "奇数/偶数 控制技巧"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "偶尔会有轻微的纹理失真"; ObjectID = "169"; */ +"169.ibShadowedToolTip" = "偶尔会有轻微的纹理失真"; + +/* Class = "NSButtonCell"; title = "四倍tex曲线"; ObjectID = "169"; */ +"169.title" = "四倍tex曲线"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "需要黑暗势力"; ObjectID = "170"; */ +"170.ibShadowedToolTip" = "需要黑暗势力"; + +/* Class = "NSButtonCell"; title = "反复扁平tex triangles"; ObjectID = "170"; */ +"170.title" = "反复扁平tex triangles"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "绘图繁忙时切换标志寄存器"; ObjectID = "171"; */ +"171.ibShadowedToolTip" = "绘图繁忙时切换标志寄存器"; + +/* Class = "NSButtonCell"; title = "假冒GPU繁忙状态"; ObjectID = "171"; */ +"171.title" = "假冒GPU繁忙状态"; + +/* Class = "NSButtonCell"; title = "显示器同步刷新"; ObjectID = "172"; */ +"172.title" = "显示器同步刷新"; + +/* Class = "NSButtonCell"; title = "使用自动跳帧"; ObjectID = "173"; */ +"173.title" = "使用自动跳帧"; + +/* Class = "NSButtonCell"; title = "显示反相FPS"; ObjectID = "174"; */ +"174.title" = "显示反相FPS"; + +/* Class = "NSButtonCell"; title = "自动全屏"; ObjectID = "175"; */ +"175.title" = "自动全屏"; + +/* Class = "NSTextFieldCell"; title = "图形抖动:"; ObjectID = "176"; */ +"176.title" = "图形抖动:"; + +/* Class = "NSButtonCell"; title = "启用技巧"; ObjectID = "178"; */ +"178.title" = "启用技巧"; + +/* Class = "NSBox"; title = "着色器"; ObjectID = "179"; */ +"179.title" = "着色器"; + +/* Class = "NSButtonCell"; title = "启用着色器"; ObjectID = "181"; */ +"181.title" = "启用着色器"; + +/* Class = "NSButtonCell"; title = "选择..."; ObjectID = "183"; */ +"183.title" = "选择…"; + +/* Class = "NSButtonCell"; title = "选择..."; ObjectID = "185"; */ +"185.title" = "选择…"; + +/* Class = "NSTextFieldCell"; title = "标签"; ObjectID = "187"; */ +"187.title" = "标签"; + +/* Class = "NSTextFieldCell"; title = "标签"; ObjectID = "189"; */ +"189.title" = "标签"; + +/* Class = "NSTextFieldCell"; title = "顶点:"; ObjectID = "195"; */ +"195.title" = "顶点:"; + +/* Class = "NSTextFieldCell"; title = "片段:"; ObjectID = "197"; */ +"197.title" = "片段:"; + +/* Class = "NSMenu"; title = "查看其他"; ObjectID = "221"; */ +"221.title" = "查看其他"; + +/* Class = "NSMenuItem"; title = "1.0"; ObjectID = "222"; */ +"222.title" = "1.0"; + +/* Class = "NSMenuItem"; title = "2.0"; ObjectID = "223"; */ +"223.title" = "2.0"; + +/* Class = "NSMenuItem"; title = "3.0"; ObjectID = "224"; */ +"224.title" = "3.0"; + +/* Class = "NSTextFieldCell"; title = "品质:"; ObjectID = "226"; */ +"226.title" = "品质:"; + +/* Class = "NSMenuItem"; title = "4.0"; ObjectID = "227"; */ +"227.title" = "4.0"; + +/* Class = "NSButtonCell"; title = "确认"; ObjectID = "372"; */ +"372.title" = "确认"; + +/* Class = "NSButtonCell"; title = "取消"; ObjectID = "376"; */ +"376.title" = "取消"; + +/* Class = "NSButtonCell"; title = "重置"; ObjectID = "382"; */ +"382.title" = "重置"; + +/* Class = "NSButtonCell"; title = "Odd/even bit hack"; ObjectID = "531"; */ +"531.title" = "Odd/even bit hack"; + +/* Class = "NSFormCell"; title = "高度:"; ObjectID = "3eM-lr-W6U"; */ +"3eM-lr-W6U.title" = "高度:"; + +/* Class = "NSFormCell"; title = "宽度:"; ObjectID = "4UQ-Uy-UYS"; */ +"4UQ-Uy-UYS.title" = "宽度:"; + +/* Class = "NSFormCell"; title = "领域:"; ObjectID = "7gB-tB-Kx4"; */ +"7gB-tB-Kx4.title" = "领域:"; + +/* Class = "NSButtonCell"; title = "隐藏"; ObjectID = "tsc-3g-k3d"; */ +"tsc-3g-k3d.title" = "隐藏"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/Base.lproj/NetSfPeopsOpenGLConfig.xib pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/Base.lproj/NetSfPeopsOpenGLConfig.xib --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/Base.lproj/NetSfPeopsOpenGLConfig.xib 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/Base.lproj/NetSfPeopsOpenGLConfig.xib 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,735 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Only enable a hack to fix a specific problem in a game. +Hold the mouse over a checkbox to get more information about it. + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/en.lproj/Credits.rtf pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/en.lproj/Credits.rtf --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/en.lproj/Credits.rtf 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/en.lproj/Credits.rtf 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,15 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\vieww10800\viewh8400\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural + +\f0\b\fs24 \cf0 Created By +\b0 \ + Pete Bernert and the P.E.Op.S. team\ +\ + +\b Macintosh Port By +\b0 \ + Gil Pedersen\ + C.W. \'93Madd the Sane\'94 Betts} \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/en.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/en.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/en.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/en.lproj/InfoPlist.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,6 @@ +/* Localized versions of Info.plist keys */ + +CFBundleName = "Peops OpenGL GPU Plugin"; +CFBundleShortVersionString = "GPU Plugin 1.17"; +CFBundleGetInfoString = "OpenGL GPU Renderer Plugin version 1.17."; +NSHumanReadableCopyright = "Copyright © 2004 Gil Pedersen."; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/en.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/en.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/en.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/en.lproj/Localizable.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,11 @@ +/* + Localizable.strings + PeopsXGL + + Created by C.W. Betts on 11/16/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"OpenGL Driver" = "OpenGL Driver"; +"Pete Bernert" = "Pete Bernert"; +"Based on P.E.Op.S. MesaGL Driver V1.78\nCoded by Pete Bernert\n" = "Based on P.E.Op.S. MesaGL Driver V1.78\nCoded by Pete Bernert\n"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/en.lproj/NetSfPeopsOpenGLConfig.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/en.lproj/NetSfPeopsOpenGLConfig.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/en.lproj/NetSfPeopsOpenGLConfig.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/en.lproj/NetSfPeopsOpenGLConfig.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,363 @@ + +/* Class = "NSWindow"; title = "GPU Configuration"; ObjectID = "5"; */ +"5.title" = "GPU Configuration"; + +/* Class = "NSBox"; title = "Display Settings"; ObjectID = "89"; */ +"89.title" = "Display Settings"; + +/* Class = "NSBox"; ibShadowedToolTip = "If your card supports it, will mix textures more accurately"; ObjectID = "107"; */ +"107.ibShadowedToolTip" = "If your card supports it, will mix textures more accurately"; + +/* Class = "NSBox"; title = "Rendering"; ObjectID = "107"; */ +"107.title" = "Rendering"; + +/* Class = "NSMenuItem"; title = "Never"; ObjectID = "111"; */ +"111.title" = "Never"; + +/* Class = "NSTextField"; ibShadowedToolTip = "Specify when to use dithering to render colors"; ObjectID = "112"; */ +"112.ibShadowedToolTip" = "Specify when to use dithering to render colors"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "113"; */ +"113.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Always"; ObjectID = "114"; */ +"114.title" = "Always"; + +/* Class = "NSMenuItem"; title = "When Hinted"; ObjectID = "115"; */ +"115.title" = "When Hinted"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "Specify when to use dithering to render colors"; ObjectID = "116"; */ +"116.ibShadowedToolTip" = "Specify when to use dithering to render colors"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "The color depth of stored textures."; ObjectID = "169"; */ +"169.ibShadowedToolTip" = "The color depth of stored textures."; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "170"; */ +"170.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "RGBA 16"; ObjectID = "171"; */ +"171.title" = "RGBA 16"; + +/* Class = "NSMenuItem"; title = "default"; ObjectID = "172"; */ +"172.title" = "default"; + +/* Class = "NSMenuItem"; title = "R5 G5 B5 A1"; ObjectID = "173"; */ +"173.title" = "R5 G5 B5 A1"; + +/* Class = "NSTextField"; ibShadowedToolTip = "The color depth of stored textures."; ObjectID = "174"; */ +"174.ibShadowedToolTip" = "The color depth of stored textures."; + +/* Class = "NSTextField"; ibShadowedToolTip = "Filter textures when scaled. Higher values filter more kinds of textures, i.e. sprites."; ObjectID = "193"; */ +"193.ibShadowedToolTip" = "Filter textures when scaled. Higher values filter more kinds of textures, i.e. sprites."; + +/* Class = "NSTextField"; ibShadowedToolTip = "Select a quality level of texture scaling"; ObjectID = "201"; */ +"201.ibShadowedToolTip" = "Select a quality level of texture scaling"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "Use offscreen drawing to remove some graphics glitches"; ObjectID = "202"; */ +"202.ibShadowedToolTip" = "Use offscreen drawing to remove some graphics glitches"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "203"; */ +"203.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Some"; ObjectID = "204"; */ +"204.title" = "Some"; + +/* Class = "NSMenuItem"; title = "None"; ObjectID = "205"; */ +"205.title" = "None"; + +/* Class = "NSMenuItem"; title = "Default"; ObjectID = "206"; */ +"206.title" = "Default"; + +/* Class = "NSTextField"; ibShadowedToolTip = "Use offscreen drawing to remove some graphics glitches"; ObjectID = "207"; */ +"207.ibShadowedToolTip" = "Use offscreen drawing to remove some graphics glitches"; + +/* Class = "NSBox"; title = "Textures"; ObjectID = "212"; */ +"212.title" = "Textures"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "216"; */ +"216.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Item2"; ObjectID = "217"; */ +"217.title" = "Item2"; + +/* Class = "NSMenuItem"; title = "Item1"; ObjectID = "218"; */ +"218.title" = "Item1"; + +/* Class = "NSMenuItem"; title = "Item3"; ObjectID = "219"; */ +"219.title" = "Item3"; + +/* Class = "NSTextField"; ibShadowedToolTip = "Select the method the PSX uses to read the contents of the screen"; ObjectID = "220"; */ +"220.ibShadowedToolTip" = "Select the method the PSX uses to read the contents of the screen"; + +/* Class = "NSMenuItem"; title = "RGBA 32"; ObjectID = "250"; */ +"250.title" = "RGBA 32"; + +/* Class = "NSMenuItem"; title = "BGRA 32"; ObjectID = "251"; */ +"251.title" = "BGRA 32"; + +/* Class = "NSSlider"; ibShadowedToolTip = "Filter textures when scaled. Higher values filter more kinds of textures, i.e. sprites."; ObjectID = "252"; */ +"252.ibShadowedToolTip" = "Filter textures when scaled. Higher values filter more kinds of textures, i.e. sprites."; + +/* Class = "NSSlider"; ibShadowedToolTip = "Select a quality level of texture scaling"; ObjectID = "253"; */ +"253.ibShadowedToolTip" = "Select a quality level of texture scaling"; + +/* Class = "NSMenuItem"; title = "More"; ObjectID = "254"; */ +"254.title" = "More"; + +/* Class = "NSMenuItem"; title = "Aggressive"; ObjectID = "255"; */ +"255.title" = "Aggressive"; + +/* Class = "NSColorWell"; ibShadowedToolTip = "Select a color and transparency for the scanlines"; ObjectID = "341"; */ +"341.ibShadowedToolTip" = "Select a color and transparency for the scanlines"; + +/* Class = "NSButtonCell"; title = "Sync to Monitor Refresh"; ObjectID = "374"; */ +"374.title" = "Sync to Monitor Refresh"; + +/* Class = "NSButtonCell"; title = "Use Frame Skipping"; ObjectID = "375"; */ +"375.title" = "Use Frame Skipping"; + +/* Class = "NSButtonCell"; title = "Display FPS Counter"; ObjectID = "376"; */ +"376.title" = "Display FPS Counter"; + +/* Class = "NSButtonCell"; title = "Auto Full Screen"; ObjectID = "377"; */ +"377.title" = "Auto Full Screen"; + +/* Class = "NSButtonCell"; title = "Limit Frame Rate"; ObjectID = "380"; */ +"380.title" = "Limit Frame Rate"; + +/* Class = "NSTextFieldCell"; title = "Dither Graphics:"; ObjectID = "383"; */ +"383.title" = "Dither Graphics:"; + +/* Class = "NSButtonCell"; title = "Draw Wireframes Only"; ObjectID = "385"; */ +"385.title" = "Draw Wireframes Only"; + +/* Class = "NSButtonCell"; title = "Use Advanced Blending"; ObjectID = "386"; */ +"386.title" = "Use Advanced Blending"; + +/* Class = "NSButtonCell"; title = "Perform Opaque Pass"; ObjectID = "387"; */ +"387.title" = "Perform Opaque Pass"; + +/* Class = "NSButtonCell"; title = "Use Clipping Z-Masks"; ObjectID = "388"; */ +"388.title" = "Use Clipping Z-Masks"; + +/* Class = "NSButtonCell"; title = "Motion JPEG decoder"; ObjectID = "389"; */ +"389.title" = "Motion JPEG decoder"; + +/* Class = "NSButtonCell"; title = "15bit Motion JPEGs"; ObjectID = "390"; */ +"390.title" = "15bit Motion JPEGs"; + +/* Class = "NSButtonCell"; title = "Draw scan lines"; ObjectID = "391"; */ +"391.title" = "Draw scan lines"; + +/* Class = "NSButtonCell"; title = "Add Blur"; ObjectID = "392"; */ +"392.title" = "Add Blur"; + +/* Class = "NSTextFieldCell"; title = "Offscreen Drawing:"; ObjectID = "394"; */ +"394.title" = "Offscreen Drawing:"; + +/* Class = "NSTextFieldCell"; title = "Color Depth:"; ObjectID = "396"; */ +"396.title" = "Color Depth:"; + +/* Class = "NSTextFieldCell"; title = "Filtering:"; ObjectID = "397"; */ +"397.title" = "Filtering:"; + +/* Class = "NSTextFieldCell"; title = "Enhancement:"; ObjectID = "398"; */ +"398.title" = "Enhancement:"; + +/* Class = "NSTextFieldCell"; title = "Frame Buffer Effects"; ObjectID = "402"; */ +"402.title" = "Frame Buffer Effects"; + +/* Class = "NSButtonCell"; title = "GTE Accuracy"; ObjectID = "406"; */ +"406.title" = "GTE Accuracy"; + +/* Class = "NSWindow"; title = "Hacks"; ObjectID = "472"; */ +"472.title" = "Hacks"; + +/* Class = "NSButtonCell"; title = "Enable Hacks"; ObjectID = "477"; */ +"477.title" = "Enable Hacks"; + +/* Class = "NSTextFieldCell"; title = "Only enable a hack to fix a specific problem in a game.\nHold the mouse over a checkbox to get more information about it."; ObjectID = "478"; */ +"478.title" = "Only enable a hack to fix a specific problem in a game.\nHover the mouse over a checkbox to get more information about it."; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "For buggy motherboard chipsets"; ObjectID = "480"; */ +"480.ibShadowedToolTip" = "For buggy motherboard chipsets"; + +/* Class = "NSButtonCell"; title = "Use low-res FPS timer"; ObjectID = "480"; */ +"480.title" = "Use low-res FPS timer"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Needed with epsxe 1.5.2 and older, Chrono Cross"; ObjectID = "481"; */ +"481.ibShadowedToolTip" = "Needed with epsxe 1.5.2 and older, Chrono Cross"; + +/* Class = "NSButtonCell"; title = "Odd/even bit hack"; ObjectID = "481"; */ +"481.title" = "Odd/even bit hack"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Needed by some (buggy) OpenGL ICDs"; ObjectID = "482"; */ +"482.ibShadowedToolTip" = "Needed by some (buggy) OpenGL ICDs"; + +/* Class = "NSButtonCell"; title = "Fake subtractive blending"; ObjectID = "482"; */ +"482.title" = "Fake subtractive blending"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "DW7 fix (not 100% perfect...)"; ObjectID = "483"; */ +"483.ibShadowedToolTip" = "DW7 fix (not 100% perfect…)"; + +/* Class = "NSButtonCell"; title = "Lazy upload detection"; ObjectID = "483"; */ +"483.title" = "Lazy upload detection"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Fixes black areas with some cards"; ObjectID = "484"; */ +"484.ibShadowedToolTip" = "Fixes black areas with some cards"; + +/* Class = "NSButtonCell"; title = "Use old texture filtering"; ObjectID = "484"; */ +"484.title" = "Use old texture filtering"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Toggles busy flags after drawing"; ObjectID = "485"; */ +"485.ibShadowedToolTip" = "Toggles busy flags after drawing"; + +/* Class = "NSButtonCell"; title = "Fake \"GPU busy\" states"; ObjectID = "485"; */ +"485.title" = "Fake \"GPU busy\" states"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Shows the full area in Capcom 2D fighters"; ObjectID = "486"; */ +"486.ibShadowedToolTip" = "Shows the full area in Capcom 2D fighters"; + +/* Class = "NSButtonCell"; title = "Expand screen width"; ObjectID = "486"; */ +"486.title" = "Expand screen width"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "ONLY for FF9 battle mode... yellow rect"; ObjectID = "487"; */ +"487.ibShadowedToolTip" = "ONLY for FF9 battle mode… yellow rect"; + +/* Class = "NSButtonCell"; title = "G4 polygon cache"; ObjectID = "487"; */ +"487.title" = "G4 polygon cache"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "May show some additional splash screens"; ObjectID = "488"; */ +"488.ibShadowedToolTip" = "May show some additional splash screens"; + +/* Class = "NSButtonCell"; title = "Special upload detection"; ObjectID = "488"; */ +"488.title" = "Special upload detection"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "ONLY for FF7 battle cursor/battle swirl"; ObjectID = "489"; */ +"489.ibShadowedToolTip" = "ONLY for FF7 battle cursor/battle swirl"; + +/* Class = "NSButtonCell"; title = "Adjust framebuffer access"; ObjectID = "489"; */ +"489.title" = "Adjust framebuffer access"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Speed up in nasty frame upload situations"; ObjectID = "490"; */ +"490.ibShadowedToolTip" = "Speed up in nasty frame upload situations"; + +/* Class = "NSButtonCell"; title = "Direct framebuffer updates"; ObjectID = "490"; */ +"490.title" = "Direct framebuffer updates"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Fixes black screens in Lunar"; ObjectID = "491"; */ +"491.ibShadowedToolTip" = "Fixes black screens in Lunar"; + +/* Class = "NSButtonCell"; title = "Ignore black brightness color"; ObjectID = "491"; */ +"491.title" = "Ignore black brightness color"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Speed freaks, Killer Loop"; ObjectID = "492"; */ +"492.ibShadowedToolTip" = "Speed freaks, Killer Loop"; + +/* Class = "NSButtonCell"; title = "Swap front/back detection"; ObjectID = "492"; */ +"492.title" = "Swap front/back detection"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Old coord compatibility mode"; ObjectID = "493"; */ +"493.ibShadowedToolTip" = "Old coord compatibility mode"; + +/* Class = "NSButtonCell"; title = "Disable coord check"; ObjectID = "493"; */ +"493.title" = "Disable coord check"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Leg. o. Dragoon, Alpha Multipass needed"; ObjectID = "494"; */ +"494.ibShadowedToolTip" = "Leg. o. Dragoon, Alpha Multipass needed"; + +/* Class = "NSButtonCell"; title = "Remove blue glitches"; ObjectID = "494"; */ +"494.title" = "Remove blue glitches"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Faster FB access on some systems/ATI"; ObjectID = "495"; */ +"495.ibShadowedToolTip" = "Faster FB access on some systems/ATI"; + +/* Class = "NSButtonCell"; title = "Mixed software FB access"; ObjectID = "495"; */ +"495.title" = "Mixed software FB access"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Better fps limitation with some games"; ObjectID = "496"; */ +"496.ibShadowedToolTip" = "Better fps limitation with some games"; + +/* Class = "NSButtonCell"; title = "Use PC FPS calculation"; ObjectID = "496"; */ +"496.title" = "Use PC FPS calculation"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Skips only every second frame"; ObjectID = "497"; */ +"497.ibShadowedToolTip" = "Skips only every second frame"; + +/* Class = "NSButtonCell"; title = "Use old frame skipping"; ObjectID = "497"; */ +"497.title" = "Use old frame skipping"; + +/* Class = "NSButtonCell"; title = "Odd/even bit hack"; ObjectID = "498"; */ +"498.title" = "Odd/even bit hack"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "502"; */ +"502.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "504"; */ +"504.title" = "Cancel"; + +/* Class = "NSButtonCell"; title = "Reset"; ObjectID = "666"; */ +"666.title" = "Reset"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "671"; */ +"671.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "675"; */ +"675.title" = "Cancel"; + +/* Class = "NSButtonCell"; title = "Draw scan lines"; ObjectID = "703"; */ +"703.title" = "Draw scan lines"; + +/* Class = "NSButtonCell"; title = "Limit Frame Rate"; ObjectID = "786"; */ +"786.title" = "Limit Frame Rate"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "Change resolution to this when going full screen"; ObjectID = "908"; */ +"908.ibShadowedToolTip" = "Change resolution to this when going full screen"; + +/* Class = "NSTextField"; ibShadowedToolTip = "Change resolution to this when going full screen"; ObjectID = "909"; */ +"909.ibShadowedToolTip" = "Change resolution to this when going full screen"; + +/* Class = "NSButton"; ibShadowedToolTip = "When checked, will keep the PSX display at natural aspect ratio"; ObjectID = "910"; */ +"910.ibShadowedToolTip" = "When checked, will keep the PSX display at natural aspect ratio"; + +/* Class = "NSFormCell"; title = "Height:"; ObjectID = "913"; */ +"913.title" = "Height:"; + +/* Class = "NSFormCell"; title = "Width:"; ObjectID = "914"; */ +"914.title" = "Width:"; + +/* Class = "NSFormCell"; title = "Field:"; ObjectID = "915"; */ +"915.title" = "Field:"; + +/* Class = "NSButtonCell"; title = "Hacks…"; ObjectID = "918"; */ +"918.title" = "Hacks…"; + +/* Class = "NSButtonCell"; title = "Resize Proportionally"; ObjectID = "919"; */ +"919.title" = "Resize Proportionally"; + +/* Class = "NSTextFieldCell"; title = "Fullscreen size"; ObjectID = "922"; */ +"922.title" = "Fullscreen size"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "925"; */ +"925.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Current"; ObjectID = "926"; */ +"926.title" = "Current"; + +/* Class = "NSMenuItem"; title = "1600 x 1200"; ObjectID = "927"; */ +"927.title" = "1600 x 1200"; + +/* Class = "NSMenuItem"; title = "1280 x1024"; ObjectID = "928"; */ +"928.title" = "1280 x1024"; + +/* Class = "NSMenuItem"; title = "1152 x 864"; ObjectID = "929"; */ +"929.title" = "1152 x 864"; + +/* Class = "NSMenuItem"; title = "1024 x 768"; ObjectID = "930"; */ +"930.title" = "1024 x 768"; + +/* Class = "NSMenuItem"; title = "640 x 480"; ObjectID = "931"; */ +"931.title" = "640 x 480"; + +/* Class = "NSMenuItem"; title = "800 x 600"; ObjectID = "932"; */ +"932.title" = "800 x 600"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/fr.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/fr.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/fr.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/fr.lproj/Localizable.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,11 @@ +/* + Localizable.strings + PeopsXGL + + Created by C.W. Betts on 11/16/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"OpenGL Driver" = "Pilote OpenGL"; +"Pete Bernert" = "Pete Bernert"; +"Based on P.E.Op.S. MesaGL Driver V1.78\nCoded by Pete Bernert\n" = "Basé sur le pilote MesaGL P.E.Op.S. V1.78\nCodé par Pete Bernert\n"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/fr.lproj/NetSfPeopsOpenGLConfig.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/fr.lproj/NetSfPeopsOpenGLConfig.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/fr.lproj/NetSfPeopsOpenGLConfig.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/fr.lproj/NetSfPeopsOpenGLConfig.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,363 @@ + +/* Class = "NSWindow"; title = "GPU Configuration"; ObjectID = "5"; */ +"5.title" = "GPU Configuration"; + +/* Class = "NSBox"; title = "Display Settings"; ObjectID = "89"; */ +"89.title" = "Display Settings"; + +/* Class = "NSBox"; ibShadowedToolTip = "If your card supports it, will mix textures more accurately"; ObjectID = "107"; */ +"107.ibShadowedToolTip" = "If your card supports it, will mix textures more accurately"; + +/* Class = "NSBox"; title = "Rendering"; ObjectID = "107"; */ +"107.title" = "Rendering"; + +/* Class = "NSMenuItem"; title = "Never"; ObjectID = "111"; */ +"111.title" = "Never"; + +/* Class = "NSTextField"; ibShadowedToolTip = "Specify when to use dithering to render colors"; ObjectID = "112"; */ +"112.ibShadowedToolTip" = "Specify when to use dithering to render colors"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "113"; */ +"113.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Always"; ObjectID = "114"; */ +"114.title" = "Always"; + +/* Class = "NSMenuItem"; title = "When Hinted"; ObjectID = "115"; */ +"115.title" = "When Hinted"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "Specify when to use dithering to render colors"; ObjectID = "116"; */ +"116.ibShadowedToolTip" = "Specify when to use dithering to render colors"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "The color depth of stored textures."; ObjectID = "169"; */ +"169.ibShadowedToolTip" = "The color depth of stored textures."; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "170"; */ +"170.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "RGBA 16"; ObjectID = "171"; */ +"171.title" = "RGBA 16"; + +/* Class = "NSMenuItem"; title = "default"; ObjectID = "172"; */ +"172.title" = "default"; + +/* Class = "NSMenuItem"; title = "R5 G5 B5 A1"; ObjectID = "173"; */ +"173.title" = "R5 G5 B5 A1"; + +/* Class = "NSTextField"; ibShadowedToolTip = "The color depth of stored textures."; ObjectID = "174"; */ +"174.ibShadowedToolTip" = "The color depth of stored textures."; + +/* Class = "NSTextField"; ibShadowedToolTip = "Filter textures when scaled. Higher values filter more kinds of textures, i.e. sprites."; ObjectID = "193"; */ +"193.ibShadowedToolTip" = "Filter textures when scaled. Higher values filter more kinds of textures, i.e. sprites."; + +/* Class = "NSTextField"; ibShadowedToolTip = "Select a quality level of texture scaling"; ObjectID = "201"; */ +"201.ibShadowedToolTip" = "Select a quality level of texture scaling"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "Use offscreen drawing to remove some graphics glitches"; ObjectID = "202"; */ +"202.ibShadowedToolTip" = "Use offscreen drawing to remove some graphics glitches"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "203"; */ +"203.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Some"; ObjectID = "204"; */ +"204.title" = "Some"; + +/* Class = "NSMenuItem"; title = "None"; ObjectID = "205"; */ +"205.title" = "None"; + +/* Class = "NSMenuItem"; title = "Default"; ObjectID = "206"; */ +"206.title" = "Default"; + +/* Class = "NSTextField"; ibShadowedToolTip = "Use offscreen drawing to remove some graphics glitches"; ObjectID = "207"; */ +"207.ibShadowedToolTip" = "Use offscreen drawing to remove some graphics glitches"; + +/* Class = "NSBox"; title = "Textures"; ObjectID = "212"; */ +"212.title" = "Textures"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "216"; */ +"216.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Item2"; ObjectID = "217"; */ +"217.title" = "Item2"; + +/* Class = "NSMenuItem"; title = "Item1"; ObjectID = "218"; */ +"218.title" = "Item1"; + +/* Class = "NSMenuItem"; title = "Item3"; ObjectID = "219"; */ +"219.title" = "Item3"; + +/* Class = "NSTextField"; ibShadowedToolTip = "Select the method the PSX uses to read the contents of the screen"; ObjectID = "220"; */ +"220.ibShadowedToolTip" = "Select the method the PSX uses to read the contents of the screen"; + +/* Class = "NSMenuItem"; title = "RGBA 32"; ObjectID = "250"; */ +"250.title" = "RGBA 32"; + +/* Class = "NSMenuItem"; title = "BGRA 32"; ObjectID = "251"; */ +"251.title" = "BGRA 32"; + +/* Class = "NSSlider"; ibShadowedToolTip = "Filter textures when scaled. Higher values filter more kinds of textures, i.e. sprites."; ObjectID = "252"; */ +"252.ibShadowedToolTip" = "Filter textures when scaled. Higher values filter more kinds of textures, i.e. sprites."; + +/* Class = "NSSlider"; ibShadowedToolTip = "Select a quality level of texture scaling"; ObjectID = "253"; */ +"253.ibShadowedToolTip" = "Select a quality level of texture scaling"; + +/* Class = "NSMenuItem"; title = "More"; ObjectID = "254"; */ +"254.title" = "More"; + +/* Class = "NSMenuItem"; title = "Aggressive"; ObjectID = "255"; */ +"255.title" = "Aggressive"; + +/* Class = "NSColorWell"; ibShadowedToolTip = "Select a color and transparency for the scanlines"; ObjectID = "341"; */ +"341.ibShadowedToolTip" = "Select a color and transparency for the scanlines"; + +/* Class = "NSButtonCell"; title = "Sync to Monitor Refresh"; ObjectID = "374"; */ +"374.title" = "Sync to Monitor Refresh"; + +/* Class = "NSButtonCell"; title = "Use Frame Skipping"; ObjectID = "375"; */ +"375.title" = "Use Frame Skipping"; + +/* Class = "NSButtonCell"; title = "Display FPS Counter"; ObjectID = "376"; */ +"376.title" = "Display FPS Counter"; + +/* Class = "NSButtonCell"; title = "Auto Full Screen"; ObjectID = "377"; */ +"377.title" = "Auto Full Screen"; + +/* Class = "NSButtonCell"; title = "Limit Frame Rate"; ObjectID = "380"; */ +"380.title" = "Limit Frame Rate"; + +/* Class = "NSTextFieldCell"; title = "Dither Graphics:"; ObjectID = "383"; */ +"383.title" = "Dither Graphics:"; + +/* Class = "NSButtonCell"; title = "Draw Wireframes Only"; ObjectID = "385"; */ +"385.title" = "Draw Wireframes Only"; + +/* Class = "NSButtonCell"; title = "Use Advanced Blending"; ObjectID = "386"; */ +"386.title" = "Use Advanced Blending"; + +/* Class = "NSButtonCell"; title = "Perform Opaque Pass"; ObjectID = "387"; */ +"387.title" = "Perform Opaque Pass"; + +/* Class = "NSButtonCell"; title = "Use Clipping Z-Masks"; ObjectID = "388"; */ +"388.title" = "Use Clipping Z-Masks"; + +/* Class = "NSButtonCell"; title = "Motion JPEG decoder"; ObjectID = "389"; */ +"389.title" = "Motion JPEG decoder"; + +/* Class = "NSButtonCell"; title = "15bit Motion JPEGs"; ObjectID = "390"; */ +"390.title" = "15bit Motion JPEGs"; + +/* Class = "NSButtonCell"; title = "Draw scan lines"; ObjectID = "391"; */ +"391.title" = "Draw scan lines"; + +/* Class = "NSButtonCell"; title = "Add Blur"; ObjectID = "392"; */ +"392.title" = "Add Blur"; + +/* Class = "NSTextFieldCell"; title = "Offscreen Drawing:"; ObjectID = "394"; */ +"394.title" = "Offscreen Drawing:"; + +/* Class = "NSTextFieldCell"; title = "Color Depth:"; ObjectID = "396"; */ +"396.title" = "Color Depth:"; + +/* Class = "NSTextFieldCell"; title = "Filtering:"; ObjectID = "397"; */ +"397.title" = "Filtering:"; + +/* Class = "NSTextFieldCell"; title = "Enhancement:"; ObjectID = "398"; */ +"398.title" = "Enhancement:"; + +/* Class = "NSTextFieldCell"; title = "Frame Buffer Effects"; ObjectID = "402"; */ +"402.title" = "Frame Buffer Effects"; + +/* Class = "NSButtonCell"; title = "GTE Accuracy"; ObjectID = "406"; */ +"406.title" = "GTE Accuracy"; + +/* Class = "NSWindow"; title = "Hacks"; ObjectID = "472"; */ +"472.title" = "Hacks"; + +/* Class = "NSButtonCell"; title = "Enable Hacks"; ObjectID = "477"; */ +"477.title" = "Enable Hacks"; + +/* Class = "NSTextFieldCell"; title = "Only enable a hack to fix a specific problem in a game.\nHold the mouse over a checkbox to get more information about it."; ObjectID = "478"; */ +"478.title" = "Only enable a hack to fix a specific problem in a game.\nHold the mouse over a checkbox to get more information about it."; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "For buggy motherboard chipsets"; ObjectID = "480"; */ +"480.ibShadowedToolTip" = "For buggy motherboard chipsets"; + +/* Class = "NSButtonCell"; title = "Use low-res FPS timer"; ObjectID = "480"; */ +"480.title" = "Use low-res FPS timer"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Needed with epsxe 1.5.2 and older, Chrono Cross"; ObjectID = "481"; */ +"481.ibShadowedToolTip" = "Needed with epsxe 1.5.2 and older, Chrono Cross"; + +/* Class = "NSButtonCell"; title = "Odd/even bit hack"; ObjectID = "481"; */ +"481.title" = "Odd/even bit hack"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Needed by some (buggy) OpenGL ICDs"; ObjectID = "482"; */ +"482.ibShadowedToolTip" = "Needed by some (buggy) OpenGL ICDs"; + +/* Class = "NSButtonCell"; title = "Fake subtractive blending"; ObjectID = "482"; */ +"482.title" = "Fake subtractive blending"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "DW7 fix (not 100% perfect...)"; ObjectID = "483"; */ +"483.ibShadowedToolTip" = "DW7 fix (not 100% perfect...)"; + +/* Class = "NSButtonCell"; title = "Lazy upload detection"; ObjectID = "483"; */ +"483.title" = "Lazy upload detection"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Fixes black areas with some cards"; ObjectID = "484"; */ +"484.ibShadowedToolTip" = "Fixes black areas with some cards"; + +/* Class = "NSButtonCell"; title = "Use old texture filtering"; ObjectID = "484"; */ +"484.title" = "Use old texture filtering"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Toggles busy flags after drawing"; ObjectID = "485"; */ +"485.ibShadowedToolTip" = "Toggles busy flags after drawing"; + +/* Class = "NSButtonCell"; title = "Fake \"GPU busy\" states"; ObjectID = "485"; */ +"485.title" = "Fake \"GPU busy\" states"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Shows the full area in Capcom 2D fighters"; ObjectID = "486"; */ +"486.ibShadowedToolTip" = "Shows the full area in Capcom 2D fighters"; + +/* Class = "NSButtonCell"; title = "Expand screen width"; ObjectID = "486"; */ +"486.title" = "Expand screen width"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "ONLY for FF9 battle mode... yellow rect"; ObjectID = "487"; */ +"487.ibShadowedToolTip" = "ONLY for FF9 battle mode... yellow rect"; + +/* Class = "NSButtonCell"; title = "G4 polygon cache"; ObjectID = "487"; */ +"487.title" = "G4 polygon cache"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "May show some additional splash screens"; ObjectID = "488"; */ +"488.ibShadowedToolTip" = "May show some additional splash screens"; + +/* Class = "NSButtonCell"; title = "Special upload detection"; ObjectID = "488"; */ +"488.title" = "Special upload detection"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "ONLY for FF7 battle cursor/battle swirl"; ObjectID = "489"; */ +"489.ibShadowedToolTip" = "ONLY for FF7 battle cursor/battle swirl"; + +/* Class = "NSButtonCell"; title = "Adjust framebuffer access"; ObjectID = "489"; */ +"489.title" = "Adjust framebuffer access"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Speed up in nasty frame upload situations"; ObjectID = "490"; */ +"490.ibShadowedToolTip" = "Speed up in nasty frame upload situations"; + +/* Class = "NSButtonCell"; title = "Direct framebuffer updates"; ObjectID = "490"; */ +"490.title" = "Direct framebuffer updates"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Fixes black screens in Lunar"; ObjectID = "491"; */ +"491.ibShadowedToolTip" = "Fixes black screens in Lunar"; + +/* Class = "NSButtonCell"; title = "Ignore black brightness color"; ObjectID = "491"; */ +"491.title" = "Ignore black brightness color"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Speed freaks, Killer Loop"; ObjectID = "492"; */ +"492.ibShadowedToolTip" = "Speed freaks, Killer Loop"; + +/* Class = "NSButtonCell"; title = "Swap front/back detection"; ObjectID = "492"; */ +"492.title" = "Swap front/back detection"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Old coord compatibility mode"; ObjectID = "493"; */ +"493.ibShadowedToolTip" = "Old coord compatibility mode"; + +/* Class = "NSButtonCell"; title = "Disable coord check"; ObjectID = "493"; */ +"493.title" = "Disable coord check"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Leg. o. Dragoon, Alpha Multipass needed"; ObjectID = "494"; */ +"494.ibShadowedToolTip" = "Leg. o. Dragoon, Alpha Multipass needed"; + +/* Class = "NSButtonCell"; title = "Remove blue glitches"; ObjectID = "494"; */ +"494.title" = "Remove blue glitches"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Faster FB access on some systems/ATI"; ObjectID = "495"; */ +"495.ibShadowedToolTip" = "Faster FB access on some systems/ATI"; + +/* Class = "NSButtonCell"; title = "Mixed software FB access"; ObjectID = "495"; */ +"495.title" = "Mixed software FB access"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Better fps limitation with some games"; ObjectID = "496"; */ +"496.ibShadowedToolTip" = "Better fps limitation with some games"; + +/* Class = "NSButtonCell"; title = "Use PC FPS calculation"; ObjectID = "496"; */ +"496.title" = "Use PC FPS calculation"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Skips only every second frame"; ObjectID = "497"; */ +"497.ibShadowedToolTip" = "Skips only every second frame"; + +/* Class = "NSButtonCell"; title = "Use old frame skipping"; ObjectID = "497"; */ +"497.title" = "Use old frame skipping"; + +/* Class = "NSButtonCell"; title = "Odd/even bit hack"; ObjectID = "498"; */ +"498.title" = "Odd/even bit hack"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "502"; */ +"502.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "504"; */ +"504.title" = "Cancel"; + +/* Class = "NSButtonCell"; title = "Reset"; ObjectID = "666"; */ +"666.title" = "Reset"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "671"; */ +"671.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "675"; */ +"675.title" = "Cancel"; + +/* Class = "NSButtonCell"; title = "Draw scan lines"; ObjectID = "703"; */ +"703.title" = "Draw scan lines"; + +/* Class = "NSButtonCell"; title = "Limit Frame Rate"; ObjectID = "786"; */ +"786.title" = "Limit Frame Rate"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "Change resolution to this when going full screen"; ObjectID = "908"; */ +"908.ibShadowedToolTip" = "Change resolution to this when going full screen"; + +/* Class = "NSTextField"; ibShadowedToolTip = "Change resolution to this when going full screen"; ObjectID = "909"; */ +"909.ibShadowedToolTip" = "Change resolution to this when going full screen"; + +/* Class = "NSButton"; ibShadowedToolTip = "When checked, will keep the PSX display at natural aspect ratio"; ObjectID = "910"; */ +"910.ibShadowedToolTip" = "When checked, will keep the PSX display at natural aspect ratio"; + +/* Class = "NSFormCell"; title = "Height:"; ObjectID = "913"; */ +"913.title" = "Height:"; + +/* Class = "NSFormCell"; title = "Width:"; ObjectID = "914"; */ +"914.title" = "Width:"; + +/* Class = "NSFormCell"; title = "Field:"; ObjectID = "915"; */ +"915.title" = "Field:"; + +/* Class = "NSButtonCell"; title = "Hacks…"; ObjectID = "918"; */ +"918.title" = "Hacks…"; + +/* Class = "NSButtonCell"; title = "Resize Proportionally"; ObjectID = "919"; */ +"919.title" = "Resize Proportionally"; + +/* Class = "NSTextFieldCell"; title = "Fullscreen size"; ObjectID = "922"; */ +"922.title" = "Fullscreen size"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "925"; */ +"925.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Current"; ObjectID = "926"; */ +"926.title" = "Current"; + +/* Class = "NSMenuItem"; title = "1600 x 1200"; ObjectID = "927"; */ +"927.title" = "1600 x 1200"; + +/* Class = "NSMenuItem"; title = "1280 x1024"; ObjectID = "928"; */ +"928.title" = "1280 x1024"; + +/* Class = "NSMenuItem"; title = "1152 x 864"; ObjectID = "929"; */ +"929.title" = "1152 x 864"; + +/* Class = "NSMenuItem"; title = "1024 x 768"; ObjectID = "930"; */ +"930.title" = "1024 x 768"; + +/* Class = "NSMenuItem"; title = "640 x 480"; ObjectID = "931"; */ +"931.title" = "640 x 480"; + +/* Class = "NSMenuItem"; title = "800 x 600"; ObjectID = "932"; */ +"932.title" = "800 x 600"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/hu.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/hu.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/hu.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/hu.lproj/Localizable.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,11 @@ +/* + Localizable.strings + PeopsXGL + + Created by C.W. Betts on 11/16/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"OpenGL Driver" = "OpenGL Driver"; +"Pete Bernert" = "Pete Bernert"; +"Based on P.E.Op.S. MesaGL Driver V1.78\nCoded by Pete Bernert\n" = "P.E.Op.S. MesaGL driver V1.78 alapján\nFejlesztő Pete Bernert\n"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/hu.lproj/NetSfPeopsOpenGLConfig.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/hu.lproj/NetSfPeopsOpenGLConfig.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/hu.lproj/NetSfPeopsOpenGLConfig.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/hu.lproj/NetSfPeopsOpenGLConfig.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,363 @@ + +/* Class = "NSWindow"; title = "GPU Configuration"; ObjectID = "5"; */ +"5.title" = "GPU Configuration"; + +/* Class = "NSBox"; title = "Display Settings"; ObjectID = "89"; */ +"89.title" = "Display Settings"; + +/* Class = "NSBox"; ibShadowedToolTip = "If your card supports it, will mix textures more accurately"; ObjectID = "107"; */ +"107.ibShadowedToolTip" = "If your card supports it, will mix textures more accurately"; + +/* Class = "NSBox"; title = "Rendering"; ObjectID = "107"; */ +"107.title" = "Rendering"; + +/* Class = "NSMenuItem"; title = "Never"; ObjectID = "111"; */ +"111.title" = "Never"; + +/* Class = "NSTextField"; ibShadowedToolTip = "Specify when to use dithering to render colors"; ObjectID = "112"; */ +"112.ibShadowedToolTip" = "Specify when to use dithering to render colors"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "113"; */ +"113.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Always"; ObjectID = "114"; */ +"114.title" = "Always"; + +/* Class = "NSMenuItem"; title = "When Hinted"; ObjectID = "115"; */ +"115.title" = "When Hinted"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "Specify when to use dithering to render colors"; ObjectID = "116"; */ +"116.ibShadowedToolTip" = "Specify when to use dithering to render colors"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "The color depth of stored textures."; ObjectID = "169"; */ +"169.ibShadowedToolTip" = "The color depth of stored textures."; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "170"; */ +"170.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "RGBA 16"; ObjectID = "171"; */ +"171.title" = "RGBA 16"; + +/* Class = "NSMenuItem"; title = "default"; ObjectID = "172"; */ +"172.title" = "default"; + +/* Class = "NSMenuItem"; title = "R5 G5 B5 A1"; ObjectID = "173"; */ +"173.title" = "R5 G5 B5 A1"; + +/* Class = "NSTextField"; ibShadowedToolTip = "The color depth of stored textures."; ObjectID = "174"; */ +"174.ibShadowedToolTip" = "The color depth of stored textures."; + +/* Class = "NSTextField"; ibShadowedToolTip = "Filter textures when scaled. Higher values filter more kinds of textures, i.e. sprites."; ObjectID = "193"; */ +"193.ibShadowedToolTip" = "Filter textures when scaled. Higher values filter more kinds of textures, i.e. sprites."; + +/* Class = "NSTextField"; ibShadowedToolTip = "Select a quality level of texture scaling"; ObjectID = "201"; */ +"201.ibShadowedToolTip" = "Select a quality level of texture scaling"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "Use offscreen drawing to remove some graphics glitches"; ObjectID = "202"; */ +"202.ibShadowedToolTip" = "Use offscreen drawing to remove some graphics glitches"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "203"; */ +"203.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Some"; ObjectID = "204"; */ +"204.title" = "Some"; + +/* Class = "NSMenuItem"; title = "None"; ObjectID = "205"; */ +"205.title" = "None"; + +/* Class = "NSMenuItem"; title = "Default"; ObjectID = "206"; */ +"206.title" = "Default"; + +/* Class = "NSTextField"; ibShadowedToolTip = "Use offscreen drawing to remove some graphics glitches"; ObjectID = "207"; */ +"207.ibShadowedToolTip" = "Use offscreen drawing to remove some graphics glitches"; + +/* Class = "NSBox"; title = "Textures"; ObjectID = "212"; */ +"212.title" = "Textures"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "216"; */ +"216.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Item2"; ObjectID = "217"; */ +"217.title" = "Item2"; + +/* Class = "NSMenuItem"; title = "Item1"; ObjectID = "218"; */ +"218.title" = "Item1"; + +/* Class = "NSMenuItem"; title = "Item3"; ObjectID = "219"; */ +"219.title" = "Item3"; + +/* Class = "NSTextField"; ibShadowedToolTip = "Select the method the PSX uses to read the contents of the screen"; ObjectID = "220"; */ +"220.ibShadowedToolTip" = "Select the method the PSX uses to read the contents of the screen"; + +/* Class = "NSMenuItem"; title = "RGBA 32"; ObjectID = "250"; */ +"250.title" = "RGBA 32"; + +/* Class = "NSMenuItem"; title = "BGRA 32"; ObjectID = "251"; */ +"251.title" = "BGRA 32"; + +/* Class = "NSSlider"; ibShadowedToolTip = "Filter textures when scaled. Higher values filter more kinds of textures, i.e. sprites."; ObjectID = "252"; */ +"252.ibShadowedToolTip" = "Filter textures when scaled. Higher values filter more kinds of textures, i.e. sprites."; + +/* Class = "NSSlider"; ibShadowedToolTip = "Select a quality level of texture scaling"; ObjectID = "253"; */ +"253.ibShadowedToolTip" = "Select a quality level of texture scaling"; + +/* Class = "NSMenuItem"; title = "More"; ObjectID = "254"; */ +"254.title" = "More"; + +/* Class = "NSMenuItem"; title = "Aggressive"; ObjectID = "255"; */ +"255.title" = "Aggressive"; + +/* Class = "NSColorWell"; ibShadowedToolTip = "Select a color and transparency for the scanlines"; ObjectID = "341"; */ +"341.ibShadowedToolTip" = "Select a color and transparency for the scanlines"; + +/* Class = "NSButtonCell"; title = "Sync to Monitor Refresh"; ObjectID = "374"; */ +"374.title" = "Sync to Monitor Refresh"; + +/* Class = "NSButtonCell"; title = "Use Frame Skipping"; ObjectID = "375"; */ +"375.title" = "Use Frame Skipping"; + +/* Class = "NSButtonCell"; title = "Display FPS Counter"; ObjectID = "376"; */ +"376.title" = "Display FPS Counter"; + +/* Class = "NSButtonCell"; title = "Auto Full Screen"; ObjectID = "377"; */ +"377.title" = "Auto Full Screen"; + +/* Class = "NSButtonCell"; title = "Limit Frame Rate"; ObjectID = "380"; */ +"380.title" = "Limit Frame Rate"; + +/* Class = "NSTextFieldCell"; title = "Dither Graphics:"; ObjectID = "383"; */ +"383.title" = "Dither Graphics:"; + +/* Class = "NSButtonCell"; title = "Draw Wireframes Only"; ObjectID = "385"; */ +"385.title" = "Draw Wireframes Only"; + +/* Class = "NSButtonCell"; title = "Use Advanced Blending"; ObjectID = "386"; */ +"386.title" = "Use Advanced Blending"; + +/* Class = "NSButtonCell"; title = "Perform Opaque Pass"; ObjectID = "387"; */ +"387.title" = "Perform Opaque Pass"; + +/* Class = "NSButtonCell"; title = "Use Clipping Z-Masks"; ObjectID = "388"; */ +"388.title" = "Use Clipping Z-Masks"; + +/* Class = "NSButtonCell"; title = "Motion JPEG decoder"; ObjectID = "389"; */ +"389.title" = "Motion JPEG decoder"; + +/* Class = "NSButtonCell"; title = "15bit Motion JPEGs"; ObjectID = "390"; */ +"390.title" = "15bit Motion JPEGs"; + +/* Class = "NSButtonCell"; title = "Draw scan lines"; ObjectID = "391"; */ +"391.title" = "Draw scan lines"; + +/* Class = "NSButtonCell"; title = "Add Blur"; ObjectID = "392"; */ +"392.title" = "Add Blur"; + +/* Class = "NSTextFieldCell"; title = "Offscreen Drawing:"; ObjectID = "394"; */ +"394.title" = "Offscreen Drawing:"; + +/* Class = "NSTextFieldCell"; title = "Color Depth:"; ObjectID = "396"; */ +"396.title" = "Color Depth:"; + +/* Class = "NSTextFieldCell"; title = "Filtering:"; ObjectID = "397"; */ +"397.title" = "Filtering:"; + +/* Class = "NSTextFieldCell"; title = "Enhancement:"; ObjectID = "398"; */ +"398.title" = "Enhancement:"; + +/* Class = "NSTextFieldCell"; title = "Frame Buffer Effects"; ObjectID = "402"; */ +"402.title" = "Frame Buffer Effects"; + +/* Class = "NSButtonCell"; title = "GTE Accuracy"; ObjectID = "406"; */ +"406.title" = "GTE Accuracy"; + +/* Class = "NSWindow"; title = "Hacks"; ObjectID = "472"; */ +"472.title" = "Hacks"; + +/* Class = "NSButtonCell"; title = "Enable Hacks"; ObjectID = "477"; */ +"477.title" = "Enable Hacks"; + +/* Class = "NSTextFieldCell"; title = "Only enable a hack to fix a specific problem in a game.\nHold the mouse over a checkbox to get more information about it."; ObjectID = "478"; */ +"478.title" = "Only enable a hack to fix a specific problem in a game.\nHold the mouse over a checkbox to get more information about it."; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "For buggy motherboard chipsets"; ObjectID = "480"; */ +"480.ibShadowedToolTip" = "For buggy motherboard chipsets"; + +/* Class = "NSButtonCell"; title = "Use low-res FPS timer"; ObjectID = "480"; */ +"480.title" = "Use low-res FPS timer"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Needed with epsxe 1.5.2 and older, Chrono Cross"; ObjectID = "481"; */ +"481.ibShadowedToolTip" = "Needed with epsxe 1.5.2 and older, Chrono Cross"; + +/* Class = "NSButtonCell"; title = "Odd/even bit hack"; ObjectID = "481"; */ +"481.title" = "Odd/even bit hack"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Needed by some (buggy) OpenGL ICDs"; ObjectID = "482"; */ +"482.ibShadowedToolTip" = "Needed by some (buggy) OpenGL ICDs"; + +/* Class = "NSButtonCell"; title = "Fake subtractive blending"; ObjectID = "482"; */ +"482.title" = "Fake subtractive blending"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "DW7 fix (not 100% perfect...)"; ObjectID = "483"; */ +"483.ibShadowedToolTip" = "DW7 fix (not 100% perfect...)"; + +/* Class = "NSButtonCell"; title = "Lazy upload detection"; ObjectID = "483"; */ +"483.title" = "Lazy upload detection"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Fixes black areas with some cards"; ObjectID = "484"; */ +"484.ibShadowedToolTip" = "Fixes black areas with some cards"; + +/* Class = "NSButtonCell"; title = "Use old texture filtering"; ObjectID = "484"; */ +"484.title" = "Use old texture filtering"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Toggles busy flags after drawing"; ObjectID = "485"; */ +"485.ibShadowedToolTip" = "Toggles busy flags after drawing"; + +/* Class = "NSButtonCell"; title = "Fake \"GPU busy\" states"; ObjectID = "485"; */ +"485.title" = "Fake \"GPU busy\" states"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Shows the full area in Capcom 2D fighters"; ObjectID = "486"; */ +"486.ibShadowedToolTip" = "Shows the full area in Capcom 2D fighters"; + +/* Class = "NSButtonCell"; title = "Expand screen width"; ObjectID = "486"; */ +"486.title" = "Expand screen width"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "ONLY for FF9 battle mode... yellow rect"; ObjectID = "487"; */ +"487.ibShadowedToolTip" = "ONLY for FF9 battle mode... yellow rect"; + +/* Class = "NSButtonCell"; title = "G4 polygon cache"; ObjectID = "487"; */ +"487.title" = "G4 polygon cache"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "May show some additional splash screens"; ObjectID = "488"; */ +"488.ibShadowedToolTip" = "May show some additional splash screens"; + +/* Class = "NSButtonCell"; title = "Special upload detection"; ObjectID = "488"; */ +"488.title" = "Special upload detection"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "ONLY for FF7 battle cursor/battle swirl"; ObjectID = "489"; */ +"489.ibShadowedToolTip" = "ONLY for FF7 battle cursor/battle swirl"; + +/* Class = "NSButtonCell"; title = "Adjust framebuffer access"; ObjectID = "489"; */ +"489.title" = "Adjust framebuffer access"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Speed up in nasty frame upload situations"; ObjectID = "490"; */ +"490.ibShadowedToolTip" = "Speed up in nasty frame upload situations"; + +/* Class = "NSButtonCell"; title = "Direct framebuffer updates"; ObjectID = "490"; */ +"490.title" = "Direct framebuffer updates"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Fixes black screens in Lunar"; ObjectID = "491"; */ +"491.ibShadowedToolTip" = "Fixes black screens in Lunar"; + +/* Class = "NSButtonCell"; title = "Ignore black brightness color"; ObjectID = "491"; */ +"491.title" = "Ignore black brightness color"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Speed freaks, Killer Loop"; ObjectID = "492"; */ +"492.ibShadowedToolTip" = "Speed freaks, Killer Loop"; + +/* Class = "NSButtonCell"; title = "Swap front/back detection"; ObjectID = "492"; */ +"492.title" = "Swap front/back detection"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Old coord compatibility mode"; ObjectID = "493"; */ +"493.ibShadowedToolTip" = "Old coord compatibility mode"; + +/* Class = "NSButtonCell"; title = "Disable coord check"; ObjectID = "493"; */ +"493.title" = "Disable coord check"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Leg. o. Dragoon, Alpha Multipass needed"; ObjectID = "494"; */ +"494.ibShadowedToolTip" = "Leg. o. Dragoon, Alpha Multipass needed"; + +/* Class = "NSButtonCell"; title = "Remove blue glitches"; ObjectID = "494"; */ +"494.title" = "Remove blue glitches"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Faster FB access on some systems/ATI"; ObjectID = "495"; */ +"495.ibShadowedToolTip" = "Faster FB access on some systems/ATI"; + +/* Class = "NSButtonCell"; title = "Mixed software FB access"; ObjectID = "495"; */ +"495.title" = "Mixed software FB access"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Better fps limitation with some games"; ObjectID = "496"; */ +"496.ibShadowedToolTip" = "Better fps limitation with some games"; + +/* Class = "NSButtonCell"; title = "Use PC FPS calculation"; ObjectID = "496"; */ +"496.title" = "Use PC FPS calculation"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Skips only every second frame"; ObjectID = "497"; */ +"497.ibShadowedToolTip" = "Skips only every second frame"; + +/* Class = "NSButtonCell"; title = "Use old frame skipping"; ObjectID = "497"; */ +"497.title" = "Use old frame skipping"; + +/* Class = "NSButtonCell"; title = "Odd/even bit hack"; ObjectID = "498"; */ +"498.title" = "Odd/even bit hack"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "502"; */ +"502.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "504"; */ +"504.title" = "Cancel"; + +/* Class = "NSButtonCell"; title = "Reset"; ObjectID = "666"; */ +"666.title" = "Reset"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "671"; */ +"671.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "675"; */ +"675.title" = "Cancel"; + +/* Class = "NSButtonCell"; title = "Draw scan lines"; ObjectID = "703"; */ +"703.title" = "Draw scan lines"; + +/* Class = "NSButtonCell"; title = "Limit Frame Rate"; ObjectID = "786"; */ +"786.title" = "Limit Frame Rate"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "Change resolution to this when going full screen"; ObjectID = "908"; */ +"908.ibShadowedToolTip" = "Change resolution to this when going full screen"; + +/* Class = "NSTextField"; ibShadowedToolTip = "Change resolution to this when going full screen"; ObjectID = "909"; */ +"909.ibShadowedToolTip" = "Change resolution to this when going full screen"; + +/* Class = "NSButton"; ibShadowedToolTip = "When checked, will keep the PSX display at natural aspect ratio"; ObjectID = "910"; */ +"910.ibShadowedToolTip" = "When checked, will keep the PSX display at natural aspect ratio"; + +/* Class = "NSFormCell"; title = "Height:"; ObjectID = "913"; */ +"913.title" = "Height:"; + +/* Class = "NSFormCell"; title = "Width:"; ObjectID = "914"; */ +"914.title" = "Width:"; + +/* Class = "NSFormCell"; title = "Field:"; ObjectID = "915"; */ +"915.title" = "Field:"; + +/* Class = "NSButtonCell"; title = "Hacks…"; ObjectID = "918"; */ +"918.title" = "Hacks…"; + +/* Class = "NSButtonCell"; title = "Resize Proportionally"; ObjectID = "919"; */ +"919.title" = "Resize Proportionally"; + +/* Class = "NSTextFieldCell"; title = "Fullscreen size"; ObjectID = "922"; */ +"922.title" = "Fullscreen size"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "925"; */ +"925.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Current"; ObjectID = "926"; */ +"926.title" = "Current"; + +/* Class = "NSMenuItem"; title = "1600 x 1200"; ObjectID = "927"; */ +"927.title" = "1600 x 1200"; + +/* Class = "NSMenuItem"; title = "1280 x1024"; ObjectID = "928"; */ +"928.title" = "1280 x1024"; + +/* Class = "NSMenuItem"; title = "1152 x 864"; ObjectID = "929"; */ +"929.title" = "1152 x 864"; + +/* Class = "NSMenuItem"; title = "1024 x 768"; ObjectID = "930"; */ +"930.title" = "1024 x 768"; + +/* Class = "NSMenuItem"; title = "640 x 480"; ObjectID = "931"; */ +"931.title" = "640 x 480"; + +/* Class = "NSMenuItem"; title = "800 x 600"; ObjectID = "932"; */ +"932.title" = "800 x 600"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/Info.plist pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/Info.plist --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/Info.plist 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/Info.plist 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,24 @@ + + + + + CFBundleAllowMixedLocalizations + + CFBundleDevelopmentRegion + en_US + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + PsxP + CFBundleSignature + POGl + CFBundleVersion + 1.16 + NSPrincipalClass + NetSfPeopsOpenGLPluginConfigController + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/drawgl.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/drawgl.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/drawgl.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/drawgl.h 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,11 @@ +/* drawgl.h */ + +unsigned long ulInitDisplay(void); +void CloseDisplay(void); +void BringContextForward(void); +void DoBufferSwap(void); +void SetVSync(GLint myValue); +void BringContextForward(void); +void ChangeWindowMode(void); +void AboutDlgProc(); +void DlgProc(); diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/drawgl.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/drawgl.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/drawgl.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/drawgl.m 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,260 @@ +/*************************************************************************** + drawgl.m + an odd set of functions that seem misplaced ATM. + presumably this is the glue to the C GPU plugin stuff + but a much better place might be "PluginWindowController.m" as + gluing is what a controller is made for. + + PeopsOpenGPU + + Created by Gil Pedersen on Sun April 18 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#import "PluginWindowController.h" +#import "PluginGLView.h" +#include "ExtendedKeys.h" +#include "externals.h" +#include "draw.h" +#include "gpu.h" +#include "menu.h" +#include "drawgl.h" + +//////////////////////////////////////////////////////////////////////////////////// +// misc globals +//////////////////////////////////////////////////////////////////////////////////// +#if 0 // globals for OpenGL (vs. SoftGPU) are owned by others... weird +int iResX; +int iResY; +long lLowerpart; +BOOL bIsFirstFrame = TRUE; +BOOL bCheckMask=FALSE; +unsigned short sSetMask=0; +/* unsigned long lSetMask=0; */ +uint32_t sSetMassk=0; +int iDesktopCol=16; +int iShowFPS=0; +int iWinSize; +int iUseScanLines=0; +int iUseNoStretchBlt=0; +int iFastFwd=0; +int iDebugMode=0; +int iFVDisplay=0; +PSXPoint_t ptCursorPoint[8]; +unsigned short usCursorActive=0; +char * Xpixels; +char * pCaptionText; +#endif + + +extern BOOL bCheckMask; +extern BOOL bIsFirstFrame; +extern int iShowFPS; +extern unsigned short sSetMask; +extern int iUseScanLines; +extern unsigned short usCursorActive; + + +int iResX; +int iResY; +long lLowerpart; + +uint32_t sSetMassk=0; +int iDesktopCol=16; +int iWinSize; +int iUseNoStretchBlt=0; +int iFastFwd=0; +int iDebugMode=0; +int iFVDisplay=0; +PSXPoint_t ptCursorPoint[8]; +char * Xpixels; +char * pCaptionText; + +//static PluginWindowController *windowController; +// static is BAD NEWS if user uses other plug ins +PluginGLView *glView; + +//////////////////////////////////////////////////////////////////////// + +void DoBufferSwap(void) // SWAP BUFFERS +{ +#if 1 + [glView swapBuffer]; +#else + static long long lastTickCount = -1; + static int skipCount = 0; + long long microTickCount; + long deltaTime; + + Microseconds((struct UnsignedWide *)µTickCount); + deltaTime = (long)(microTickCount - lastTickCount); + if (deltaTime <= (PSXDisplay.PAL ? 1000000/50 : 100000000 / 5994) || + skipCount >= 3) { + skipCount = 0; + [glView swapBuffer]; + } else { + skipCount++; + } + NSLog(@"count: %i", deltaTime); + lastTickCount = microTickCount; +#endif +} + + +//////////////////////////////////////////////////////////////////////// + +void DoClearScreenBuffer(void) // CLEAR DX BUFFER +{ + // clear the screen, and DON'T flush it + [glView clearBuffer:NO]; +} + + +//////////////////////////////////////////////////////////////////////// + +void DoClearFrontBuffer(void) // CLEAR DX BUFFER +{ + // clear the screen, and flush it + [glView clearBuffer:YES]; +} + +//////////////////////////////////////////////////////////////////////// + +unsigned long ulInitDisplay(void) // OPEN GAME WINDOW +{ + bUsingTWin = FALSE; + + //InitMenu(); // This function does nothing + + bIsFirstFrame = FALSE; + + if(iShowFPS) + { + //iShowFPS=0; + ulKeybits |= KEY_SHOWFPS; + szDispBuf[0] = 0; + BuildDispMenu(0); + } + + __block PluginWindowController *windowController; + + // this causes a runtime error if it's done on a thread other than the main thread + RunOnMainThreadSync(^{ + windowController = [PluginWindowController openGameView]; + glView = [windowController openGLView]; + + [[windowController window] setTitle:@(pCaptionText)]; + }); + + return (unsigned long)[windowController window]; +} + + +//////////////////////////////////////////////////////////////////////// + +void CloseDisplay(void) +{ + if (gameController) { + [gameController close]; + gameController = nil; + gameWindow = nil; + } +} + +void BringContextForward(void) +{ + [[glView openGLContext] makeCurrentContext]; +} + +void SendContextBack(void) +{ + [NSOpenGLContext clearCurrentContext]; +} + +void SetVSync(GLint myValue) +{ + GLint DoItMyFriend = myValue; + [[glView openGLContext] setValues: &DoItMyFriend forParameter: NSOpenGLCPSwapInterval]; + +} +//////////////////////////////////////////////////////////////////////// + +/* taken care of in menu.c +void CreatePic(unsigned char * pMem) +{ +} +*/ + +/////////////////////////////////////////////////////////////////////////////////////// + +/* taken care of in menu.c +void DestroyPic(void) +{ +} +*/ + +/////////////////////////////////////////////////////////////////////////////////////// +/* taken care of in menu.c +void DisplayPic(void) +{ +} +*/ + +/////////////////////////////////////////////////////////////////////////////////////// + +void ShowGpuPic(void) +{ + // this is the default implementation... +} + +/////////////////////////////////////////////////////////////////////////////////////// + +void ShowTextGpuPic(void) +{ + // this is the default implementation... +} + +void HandleKey(int keycode) +{ + switch (keycode) { + case GPU_FRAME_LIMIT: + if(bUseFrameLimit) { + bUseFrameLimit = false; + iFrameLimit = 1; + } + else { + bUseFrameLimit = true; + iFrameLimit = 2; + } + SetAutoFrameCap(); + break; + case GPU_FAST_FORWARD: + if(bUseFrameLimit) { + bUseFrameLimit = false; + iFrameLimit = 1; + bUseFrameSkip = true; + iFastFwd = 0; + } + else { + bUseFrameLimit = true; + iFrameLimit = 2; + bUseFrameSkip = false; + iFastFwd = 0; + } + bSkipNextFrame = FALSE; + break; + case GPU_FULLSCREEN_KEY: + [gameController setFullscreen:![gameController fullscreen]]; + break; + } +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/ExtendedKeys.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/ExtendedKeys.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/ExtendedKeys.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/ExtendedKeys.h 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,28 @@ + +#ifndef __EXTENDED_KEYS_H__ +#define __EXTENDED_KEYS_H__ + +enum { + PSX_FREEZE_KEY = 0xFFBE/*XK_F1*/, + PSX_NEXT_FREEZE_SLOT_KEY = 0xFFBF/*XK_F2*/, + PSX_DEFROST_KEY = 0xFFC0/*XK_F3*/, + PSX_SHOW_FREEZE_PIC_KEY = 0xFFC1/*XK_F4*/, + PSX_SIO_ALWAYS_ON_KEY = 0xFFC2/*XK_F5*/, + PSX_BW_MDEC_KEY = 0xFFC3/*XK_F6*/, + PSX_XA_AUDIO_ON_KEY = 0xFFC4/*XK_F7*/, + PSX_SNAPSHOT_KEY = 0xFFC5/*XK_F8*/, + PSX_OPEN_SHELL_KEY = 0xFFC6/*XK_F9*/, + PSX_CLOSE_SHELL_KEY = 0xFFC7/*XK_F10*/, + + PSX_STOP_KEY = 0xFF1B/*XK_Escape*/, + + GPU_FULLSCREEN_KEY = 0x0100, + GPU_FPS_DISPLAY_KEY = 0xFFFF,/*XK_Delete*/ + + // Fake HotKeys + GPU_HOTKEYS = 0x020, + GPU_FAST_FORWARD, + GPU_FRAME_LIMIT +}; + +#endif //__EXTENDED_KEYS_H__ diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.h 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,53 @@ +/* NetSfPeopsSoftGPUPluginConfigController */ +/* All the various stuff needed for configuration is done here, including reading + the preferences and displaying a dialog box for the user +*/ + +#define PluginConfigController NetSfPeopsOpenGLPluginConfigController + +#import + +@interface NetSfPeopsOpenGLPluginConfigController : NSWindowController +@property (weak) IBOutlet NSCell *autoFullScreen; +@property (weak) IBOutlet NSPopUpButton *ditherMode; +@property (weak) IBOutlet NSCell *fpsCounter; +@property (weak) IBOutlet NSCell *frameSkipping; +@property (weak) IBOutlet NSCell *vSync; +@property (weak) IBOutlet NSControl *proportionalResize; +@property (weak) IBOutlet NSPopUpButton *fullscreenSize; +@property (weak) IBOutlet NSFormCell *windowWidth; +@property (weak) IBOutlet NSFormCell *windowHeighth; +@property (weak) IBOutlet NSPopUpButton *offscreenDrawing; +@property (weak) IBOutlet NSPopUpButton *texColorDepth; +@property (weak) IBOutlet NSSlider *texFiltering; +@property (weak) IBOutlet NSSlider *texEnhancment; +@property (weak) IBOutlet NSPopUpButton *frameBufferEffects; +@property (weak) IBOutlet NSCell *drawScanlines; +@property (weak) IBOutlet NSCell *advancedBlending; +@property (weak) IBOutlet NSCell *opaquePass; +@property (weak) IBOutlet NSCell *zMaskClipping; +@property (weak) IBOutlet NSCell *wireframeOnly; +@property (weak) IBOutlet NSCell *blurEffect; +@property (weak) IBOutlet NSCell *mjpegDecoder; +@property (weak) IBOutlet NSCell *mjpegDecoder15bit; +@property (weak) IBOutlet NSCell *gteAccuracy; +@property (weak) IBOutlet NSColorWell *scanlineColorWell; +@property (weak) IBOutlet NSMatrix *hacksMatrix; +@property (weak) IBOutlet NSControl *hackEnable; +@property (weak) IBOutlet NSWindow *hacksWindow; +@property (readwrite, strong) NSMutableDictionary *keyValues; + +- (IBAction)cancel:(id)sender; +- (IBAction)ok:(id)sender; +- (IBAction)reset:(id)sender; +- (IBAction)toggleCheck:(id)sender; + +- (IBAction)hackToggle:(id)sender; +- (IBAction)showHacks:(id)sender; +- (IBAction)closeHacks:(id)sender; + +- (void)loadValues; + +@end + +void PrepFactoryDefaultPreferences(void); diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,486 @@ + +/* All the various stuff needed for configuration is done here, + including reading the Config file and displaying a dialog box + AboutDlgProc() is a plug-in function called from the PCSXR app, as is + DlgProc() +*/ + +#import "NetSfPeopsOpenGLPluginConfigController.h" +#include "gpu.h" +#include "cfg.h" +#include "menu.h" +#include // bah, "externals.h" thinks include files are for wimps; OpenGL header, in fact, is needed +#include "externals.h" +#import "PluginGLView.h" + +#ifdef ENABLE_NLS +#include +#include +#define _(x) gettext(x) +#define N_(x) (x) +//If running under Mac OS X, use the Localizable.strings file instead. +#elif defined(_MACOSX) +#ifdef PCSXRCORE +__private_extern char* Pcsxr_locale_text(char* toloc); +#define _(String) Pcsxr_locale_text(String) +#define N_(String) String +#else +#ifndef PCSXRPLUG +#warning please define the plug being built to use Mac OS X localization! +#define _(msgid) msgid +#define N_(msgid) msgid +#else +//Kludge to get the preprocessor to accept PCSXRPLUG as a variable. +#define PLUGLOC_x(x,y) x ## y +#define PLUGLOC_y(x,y) PLUGLOC_x(x,y) +#define PLUGLOC PLUGLOC_y(PCSXRPLUG,_locale_text) +__private_extern char* PLUGLOC(char* toloc); +#define _(String) PLUGLOC(String) +#define N_(String) String +#endif +#endif +#else +#define _(x) (x) +#define N_(x) (x) +#endif + +#define APP_ID @"net.sf.peops.GpuOpenGLPlugin" +#define PrefsKey APP_ID @" Settings" + +static NetSfPeopsOpenGLPluginConfigController *windowController = nil; + +void AboutDlgProc() +{ + // Get parent application instance + NSBundle *bundle = [NSBundle bundleWithIdentifier:APP_ID]; + + // Get Credits.rtf + NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; + NSAttributedString *credits; + if (!path) { + path = [bundle pathForResource:@"Credits" ofType:@"rtfd"]; + } + if (path) { + credits = [[NSAttributedString alloc] initWithPath:path documentAttributes:NULL]; + } else { + credits = [[NSAttributedString alloc] initWithString:@""]; + } + + // Get Application Icon + NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:[bundle bundlePath]]; + NSSize size = NSMakeSize(64, 64); + [icon setSize:size]; + + NSDictionary *infoPaneDict = + @{@"ApplicationName": [bundle objectForInfoDictionaryKey:@"CFBundleName"], + @"ApplicationIcon": icon, + @"ApplicationVersion": [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], + @"Version": [bundle objectForInfoDictionaryKey:@"CFBundleVersion"], + @"Copyright": [bundle objectForInfoDictionaryKey:@"NSHumanReadableCopyright"], + @"Credits": credits}; + dispatch_async(dispatch_get_main_queue(), ^{ + [NSApp orderFrontStandardAboutPanelWithOptions:infoPaneDict]; + }); +} + +void DlgProc() +{ + RunOnMainThreadSync(^{ + NSWindow *window; + + PrepFactoryDefaultPreferences(); + + if (windowController == nil) { + windowController = [[PluginConfigController alloc] initWithWindowNibName:@"NetSfPeopsOpenGLConfig"]; + } + window = [windowController window]; + + /* load values */ + [windowController loadValues]; + + [window center]; + [window makeKeyAndOrderFront:nil]; + }); +} + +#define kFPSCounter @"FPS Counter" +#define kHacks @"Hacks" +#define kAutoFullScreen @"Auto Full Screen" +#define kFrameSkipping @"Frame Skipping" +#define kFrameLimit @"Frame Limit" +#define kVSync @"VSync" +#define kHacksEnable @"Enable Hacks" +#define kWindowSize @"Window Size" + +void PrepFactoryDefaultPreferences(void) +{ + // THE place to find the names of settings. + // If it's not here, you can't set it. + + // create or read a sub-dictionary beneath the main PCSXR app prefs. + // dictionary is named "net.sf.GpuOpenGLPlugin Settings" + // and contains all our key/values + // the prefs .plist will store this dictionary ("net.sf...") as an object + + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + NSDictionary* keyValues = [defaults dictionaryForKey:PrefsKey]; + BOOL windowSizeNeedsReset = NO; + if (keyValues) { + NSSize size = NSSizeFromString(keyValues[kWindowSize]); + if (!keyValues[kWindowSize]) { + windowSizeNeedsReset = YES; + } else if ([keyValues[kWindowSize] isKindOfClass:[NSNumber class]]) { + windowSizeNeedsReset = YES; + } else if (size.height == 0 || size.width == 0) { + windowSizeNeedsReset = YES; + } + } + if (windowSizeNeedsReset) { + NSMutableDictionary *tmpDict = [[NSMutableDictionary alloc] initWithDictionary:keyValues]; + tmpDict[kWindowSize] = NSStringFromSize(NSMakeSize(800, 600)); + [defaults setObject:tmpDict forKey:PrefsKey]; + [defaults synchronize]; + } + keyValues = nil; + + [defaults registerDefaults: + @{PrefsKey: + @{kFPSCounter: @NO, + kAutoFullScreen: @NO, + kFrameSkipping: @NO, + kFrameLimit: @YES, + kVSync: @NO, + kHacksEnable: @NO, + @"Dither Mode": @0, + kHacks: @0, + + @"Proportional Resize": @YES, + //[NSSize stringWithCString: @"default"], @"Fullscreen Resolution", + @"Offscreen Drawing Level": @2, + @"Texture Color Depth Level": @0, + @"Texture Enhancement Level": @0, + @"Texture Filter Level": @0, + @"Frame Buffer Level": @0, + kWindowSize: NSStringFromSize(NSMakeSize(800, 600)), + @"Draw Scanlines": @NO, + // nasty: + @"Scanline Color": [NSArchiver archivedDataWithRootObject: [NSColor colorWithCalibratedRed:0 green:0 blue:0 alpha:0.25]], + @"Advanced Blending": @NO, + @"Opaque Pass": @NO, + @"Blur": @NO, + @"Z Mask Clipping": @YES, + @"Wireframe Mode": @NO, + @"Emulate mjpeg decoder": @YES, // helps remove unsightly vertical line in movies + @"Fast mjpeg decoder": @NO, + @"GteAccuracy": @YES}}]; +} + +void ReadConfig(void) +{ + // set up PCSXR GPU plug's global variables according to user preferences. + // this is called from the PCSXR GPU plugin thread via GPUOpen. + + // has nothing to do with the Configuration dialog box, btw., other than the + // fact that the config dialog writes to user prefs. This only reads, which + // is important because PCSXR will change its globals on the fly + // and saving those new ad hoc changes is Bad for the user. + + PrepFactoryDefaultPreferences(); // in case user deletes, or on new startup + + NSDictionary* keyValues = [[NSUserDefaults standardUserDefaults] dictionaryForKey:PrefsKey]; + + // bind all prefs settings to their PCSXR counterparts + // with a little finagling to make it work as expected + iShowFPS = [keyValues[kFPSCounter] boolValue]; + + if ([keyValues[kFrameLimit] boolValue]) { + bUseFrameLimit = 1; + iFrameLimit = 2; // required + fFrameRate = 60; // required (some number, 60 seems ok) + } + + // Dithering is either on or off in OpenGL plug, but hey + bDrawDither = [keyValues[@"Dither Mode"] intValue]; + + bChangeWinMode = [keyValues[kAutoFullScreen] boolValue] ? 2 : 1; + bUseFrameSkip = [keyValues[kFrameSkipping] boolValue]; + + bUseFixes = [keyValues[kHacksEnable] boolValue]; + dwCfgFixes = [keyValues[kHacks] unsignedIntValue]; + + // we always start out at 800x600 (at least until resizing the window is implemented) + NSSize winSize = NSSizeFromString(keyValues[kWindowSize]); + if (bChangeWinMode == 1) { + iResX = winSize.width; + iResY = winSize.height; + } else { + iResX = 800; + iResY = 600; + } + + iBlurBuffer = [keyValues[@"Blur"] boolValue]; // not noticeable, but doesn't harm + iUseScanLines = [keyValues[@"Draw Scanlines"] boolValue]; // works + NSColor* scanColor = [NSUnarchiver unarchiveObjectWithData:keyValues[@"Scanline Color"]]; + scanColor = [scanColor colorUsingColorSpace:[NSColorSpace deviceRGBColorSpace]]; + iScanlineColor[0] = [scanColor redComponent]; + iScanlineColor[1] = [scanColor greenComponent]; + iScanlineColor[2] = [scanColor blueComponent]; + iScanlineColor[3] = [scanColor alphaComponent]; + + iScanBlend = 0; // we always draw nice since it costs nothing. + iUseMask = [keyValues[@"Z Mask Clipping"] boolValue]; // works, clips polygons with primitive "Z" buffer + bUseLines = [keyValues[@"Wireframe Mode"] boolValue]; // works, aka "Wireframe" mode + iOffscreenDrawing = [keyValues[@"Offscreen Drawing Level"] intValue]; // draw offscreen for texture building? + if (iOffscreenDrawing > 4) iOffscreenDrawing = 4; + if (iOffscreenDrawing < 0) iOffscreenDrawing = 0; + + + // texture quality, whatever that means (doesn't hurt), more like "texture handling" or "texture performance" + iFrameTexType = [keyValues[@"Frame Buffer Level"] intValue]; + if (iFrameTexType > 3) iFrameTexType = 3; + if (iFrameTexType < 0) iFrameTexType = 0; + + iTexQuality = [keyValues[@"Texture Color Depth Level"] intValue]; + if (iTexQuality > 4) iTexQuality = 4; + if (iTexQuality < 0) iTexQuality = 0; + + // MAG_FILTER = LINEAR, etc. + iFilterType = [keyValues[@"Texture Filter Level"] intValue]; + if (iFilterType > 2) iFilterType = 2; + if (iFilterType < 0) iFilterType = 0; + + // stretches textures (more detail). You'd think it would look great, but it's not massively better. NEEDS iFilterType to be of any use. + iHiResTextures = [keyValues[@"Texture Enhancement Level"] intValue]; + if (iHiResTextures > 2) + iHiResTextures = 2; + if (iHiResTextures < 0) + iHiResTextures = 0; + + // well actually, the "SaI" mode is best, but is #1, so swap qualities: + if (iHiResTextures != 0) + iHiResTextures = 3 - iHiResTextures; + + if (iHiResTextures && !iFilterType) + iFilterType = 1; // needed to see any real effect + + bUseFastMdec = [keyValues[@"Emulate mjpeg decoder"] boolValue]; + bUse15bitMdec = [keyValues[@"Fast mjpeg decoder"] boolValue]; + bGteAccuracy = [keyValues[@"GteAccuracy"] boolValue]; + + if (iShowFPS) + ulKeybits |= KEY_SHOWFPS; + else + ulKeybits &=~ KEY_SHOWFPS; + + // additional checks + if(!iColDepth) + iColDepth=32; + if(bUseFixes) { + dwActFixes = dwCfgFixes; + } else { + dwActFixes = 0; + } + + SetFixes(); + + // need this or you'll be playing at light speed: + if(iFrameLimit == 2) SetAutoFrameCap(); + bSkipNextFrame = FALSE; + + szDispBuf[0] = 0; + BuildDispMenu(0); +} + +@implementation NetSfPeopsOpenGLPluginConfigController +@synthesize autoFullScreen; +@synthesize ditherMode; +@synthesize fpsCounter; +@synthesize frameSkipping; +@synthesize vSync; +@synthesize proportionalResize; +@synthesize fullscreenSize; +@synthesize windowWidth; +@synthesize windowHeighth; +@synthesize offscreenDrawing; +@synthesize texColorDepth; +@synthesize texFiltering; +@synthesize texEnhancment; +@synthesize frameBufferEffects; +@synthesize drawScanlines; +@synthesize advancedBlending; +@synthesize opaquePass; +@synthesize zMaskClipping; +@synthesize wireframeOnly; +@synthesize blurEffect; +@synthesize mjpegDecoder; +@synthesize mjpegDecoder15bit; +@synthesize gteAccuracy; +@synthesize scanlineColorWell; +@synthesize hacksMatrix; +@synthesize hackEnable; +@synthesize hacksWindow; + +@synthesize keyValues; + +- (IBAction)cancel:(id)sender +{ + [self close]; +} + +- (IBAction)ok:(id)sender +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + NSMutableDictionary *writeDic = [keyValues mutableCopy]; + writeDic[kFPSCounter] = ([fpsCounter integerValue] ? @YES : @NO); + writeDic[@"Scanline Color"] = [NSArchiver archivedDataWithRootObject:[scanlineColorWell color]]; + writeDic[kFrameSkipping] = ([frameSkipping integerValue] ? @YES : @NO); + writeDic[kAutoFullScreen] = ([autoFullScreen integerValue] ? @YES : @NO); + //[writeDic setObject:([frameLimit integerValue] ? @YES : @NO) forKey:kFrameLimit]; + writeDic[@"Proportional Resize"] = ([proportionalResize integerValue] ? @YES : @NO); + writeDic[@"Dither Mode"] = @([ditherMode indexOfSelectedItem]); + writeDic[@"Offscreen Drawing Level"] = @([offscreenDrawing indexOfSelectedItem]); + writeDic[@"Texture Color Depth Level"] = @([texColorDepth indexOfSelectedItem]); + writeDic[@"Texture Enhancement Level"] = @([texEnhancment integerValue]); + writeDic[@"Texture Filter Level"] = @([texFiltering integerValue]); + writeDic[@"Frame Buffer Level"] = @([frameBufferEffects indexOfSelectedItem]); + writeDic[@"Draw Scanlines"] = ([drawScanlines integerValue] ? @YES : @NO); + writeDic[@"Advanced Blending"] = ([advancedBlending integerValue] ? @YES : @NO); + writeDic[@"Opaque Pass"] = ([opaquePass integerValue] ? @YES : @NO); + writeDic[@"Blur"] = ([blurEffect integerValue] ? @YES : @NO); + writeDic[@"Z Mask Clipping"] = ([zMaskClipping integerValue] ? @YES : @NO); + writeDic[@"Wireframe Mode"] = ([wireframeOnly integerValue] ? @YES : @NO); + writeDic[@"Emulate mjpeg decoder"] = ([mjpegDecoder integerValue] ? @YES : @NO); + writeDic[@"Fast mjpeg decoder"] = ([mjpegDecoder15bit integerValue] ? @YES : @NO); + writeDic[@"GteAccuracy"] = ([gteAccuracy integerValue] ? @YES : @NO); + writeDic[kVSync] = ([vSync integerValue] ? @YES : @NO); + writeDic[kWindowSize] = NSStringFromSize(NSMakeSize([windowWidth integerValue], [windowHeighth integerValue])); + + [defaults setObject:writeDic forKey:PrefsKey]; + [defaults synchronize]; + + [self close]; +} + +- (IBAction)reset:(id)sender +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults removeObjectForKey:PrefsKey]; + [self loadValues]; +} + +- (IBAction)hackToggle:(id)sender +{ + // enable the "hacks" checkboxes + BOOL enable = [sender intValue] ? YES : NO; + NSArray *views = [hacksMatrix cells]; + + for (NSControl *control in views) { + [control setEnabled:enable]; + } +} + +- (void)loadHacksValues +{ + unsigned int hackValues = [(self.keyValues)[kHacks] unsignedIntValue]; + [hackEnable setIntegerValue:[(self.keyValues)[kHacksEnable] boolValue]]; + + // build refs to hacks checkboxes + for (NSControl *control in [hacksMatrix cells]) { + [control setIntValue:(hackValues >> ([control tag] - 1)) & 1]; + } + + [self hackToggle:hackEnable]; +} + +- (void)loadValues +{ + // set up the window with the values in the .plist + + PrepFactoryDefaultPreferences(); // in case we're starting anew + + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + /* load from preferences */ + self.keyValues = [[defaults dictionaryForKey:PrefsKey] mutableCopy]; + + [self loadHacksValues]; + + [autoFullScreen setIntegerValue:[keyValues[kAutoFullScreen] boolValue]]; + [ditherMode selectItemAtIndex:[keyValues[@"Dither Mode"] integerValue]]; + [fpsCounter setIntegerValue:[keyValues[kFPSCounter] boolValue]]; + [scanlineColorWell setColor:[NSUnarchiver unarchiveObjectWithData: keyValues[@"Scanline Color"]]]; + [frameSkipping setIntegerValue:[keyValues[kFrameSkipping] boolValue]]; + [advancedBlending setIntegerValue:[keyValues[@"Advanced Blending"] boolValue]]; + [texFiltering setIntegerValue:[keyValues[@"Texture Filter Level"] integerValue]]; + [texEnhancment setIntegerValue:[keyValues[@"Texture Enhancement Level"] integerValue]]; + [zMaskClipping setIntegerValue:[keyValues[@"Z Mask Clipping"] integerValue]]; + [mjpegDecoder setIntegerValue:[keyValues[@"Emulate mjpeg decoder"] boolValue]]; + [mjpegDecoder15bit setIntegerValue:[keyValues[@"Fast mjpeg decoder"] boolValue]]; + [drawScanlines setIntegerValue:[keyValues[@"Draw Scanlines"] boolValue]]; + [offscreenDrawing selectItemAtIndex:[keyValues[@"Offscreen Drawing Level"] integerValue]]; + [advancedBlending setIntegerValue:[keyValues[@"Advanced Blending"] boolValue]]; + [opaquePass setIntegerValue:[keyValues[@"Opaque Pass"] boolValue]]; + [wireframeOnly setIntegerValue:[keyValues[@"Wireframe Mode"] boolValue]]; + [blurEffect setIntegerValue:[keyValues[@"Blur"] boolValue]]; + [texColorDepth selectItemAtIndex:[keyValues[@"Texture Color Depth Level"] integerValue]]; + [gteAccuracy setIntegerValue:[keyValues[@"GteAccuracy"] boolValue]]; + [scanlineColorWell setEnabled:[keyValues[@"Draw Scanlines"] boolValue]]; + [frameBufferEffects selectItemAtIndex:[keyValues[@"Frame Buffer Level"] integerValue]]; + [vSync setIntegerValue:[keyValues[kVSync] boolValue]]; + [proportionalResize setIntegerValue:[keyValues[@"Proportional Resize"] boolValue]]; + NSSize winSize = NSSizeFromString(keyValues[kWindowSize]); + [windowWidth setIntegerValue:winSize.width]; + [windowHeighth setIntegerValue:winSize.height]; +} + +- (void)awakeFromNib +{ + [[NSColorPanel sharedColorPanel] setShowsAlpha:YES]; // eliminate dumb behavior! +} + +- (void)hacksSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo +{ + NSParameterAssert(sheet == hacksWindow); + if (returnCode == NSCancelButton) { + //Reset hack preferences. + [self loadHacksValues]; + } else { + unsigned int hackValues = 0; + for (NSControl *control in [hacksMatrix cells]) { + hackValues |= [control intValue] << ([control tag] - 1); + } + NSMutableDictionary *writeDic = self.keyValues; + writeDic[kHacks] = @(hackValues); + writeDic[kHacksEnable] = ([hackEnable integerValue] ? @YES : @NO); + } + [sheet orderOut:nil]; +} + +- (IBAction)closeHacks:(id)sender +{ + if ([sender tag] == 1) { + [NSApp endSheet:hacksWindow returnCode:NSOKButton]; + } else { + [NSApp endSheet:hacksWindow returnCode:NSCancelButton]; + } +} + +- (IBAction)showHacks:(id)sender +{ + [NSApp beginSheet:hacksWindow modalForWindow:[self window] modalDelegate:self + didEndSelector:@selector(hacksSheetDidEnd:returnCode:contextInfo:) contextInfo:NULL]; +} + +- (IBAction)toggleCheck:(id)sender +{ + if([sender tag] == 1) { + [scanlineColorWell setEnabled: [sender intValue] ? YES : NO]; + } +} + +@end + +#import "OSXPlugLocalization.h" +PLUGLOCIMP([PluginConfigController class]) diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/PluginGLView.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/PluginGLView.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/PluginGLView.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/PluginGLView.h 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,47 @@ +/*************************************************************************** + PluginGLView.h -- a view within game window, rudimentary OpenGL setup + maintainence + PeopsOpenGPU + + Created by Gil Pedersen on Sun April 18 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define PluginGLView NetSfPeopsOpenGLGPUPluginGLView + +#import +#import +#include + +#define IMAGE_COUNT 2 + +static inline void RunOnMainThreadSync(dispatch_block_t block) +{ + if ([NSThread isMainThread]) { + block(); + } else { + dispatch_sync(dispatch_get_main_queue(), block); + } +} + +@interface PluginGLView : NSOpenGLView + +- (void)swapBuffer; // I wonder what this does ;-) +- (void)clearBuffer:(BOOL)display; + +// overrides: +- (id) initWithCoder: (NSCoder *) coder; +- (BOOL)isOpaque; +- (BOOL)acceptsFirstResponder; +- (void)reshape; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,154 @@ +/*************************************************************************** + PluginGLView.m + a view within game window, rudimentary OpenGL setup + maintainence + Also, I clear the gl screen with a beautiful yellow color for + debugging purposes. + + PeopsOpenGLGPU + + Created by Gil Pedersen on Sun April 18 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#import +#import +#import +//#import +//#import +#import "PluginGLView.h" +#include "externals.h" // for PSXDisplay.disable -- should move it elsewhere really +#undef BOOL + +@implementation PluginGLView +{ + struct timeval cycle_time; + + NSLock *glLock; // FIXME: wha? + BOOL noDisplay; + BOOL drawBG; +} + +- (BOOL)isOpaque +{ + return YES; +} +- (BOOL)acceptsFirstResponder +{ + return NO; +} + +- (id) initWithCoder: (NSCoder *) coder +{ + // Set up pixel format on creation + // and, well, that's about it. + if ((self = [super initWithCoder:coder]) == nil) + return nil; + + glLock = [[NSLock alloc] init]; + if (nil == glLock) { + return nil; + } + + // Init pixel format attribs + NSOpenGLPixelFormatAttribute attrs[] = + { + NSOpenGLPFAAccelerated, + NSOpenGLPFANoRecovery, + NSOpenGLPFADoubleBuffer, + //NSOpenGLPFASampleBuffers, 1, // For full screen AA when implemented + //NSOpenGLPFASamples, 2, + 0 + }; + + // Get pixel format from OpenGL + NSOpenGLPixelFormat* pixFmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attrs]; + if (!pixFmt) + { + NSLog(@"No Accelerated OpenGL pixel format found\n"); + + NSOpenGLPixelFormatAttribute attrs2[] = + { + NSOpenGLPFANoRecovery, + 0 + }; + + // Get pixel format from OpenGL + pixFmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attrs2]; + if (!pixFmt) { + NSLog(@"No OpenGL pixel format found!\n"); + + return nil; + } + } + + [self setPixelFormat:pixFmt]; + + [[self openGLContext] makeCurrentContext]; + + // we're done, dude. + + // Call for a redisplay + noDisplay = YES; // hm, this can be deleted I think + PSXDisplay.Disabled = 1; + [self setNeedsDisplay:true]; + + return self; +} + +- (void)dealloc +{ + [[self openGLContext] makeCurrentContext]; // just in case + [NSOpenGLContext clearCurrentContext]; +} + +- (void)reshape // scrolled, moved or resized +{ + [super reshape]; + + [glLock lock]; // not sure if needed, but hey + [[self openGLContext] makeCurrentContext]; + + NSRect rect = [self bounds]; + rect.size = [self convertSize:rect.size toView:nil]; + glViewport(0.0, 0.0, NSWidth(rect), NSHeight(rect)); + + glClearColor (1.0, 0.5, 0.0, 0.0); + glClear(GL_COLOR_BUFFER_BIT); + [[self openGLContext] flushBuffer]; + + //[NSOpenGLContext clearCurrentContext]; // this makes bad things happen, so screw it. + [glLock unlock]; + return; +} + +- (void)swapBuffer +{ + // actually not much to do here. + [[self openGLContext] flushBuffer]; + return; +} + +// don't know what this does, pasted it in from PeopsSoftGPU's PluginGLView because something was calling it +- (void)clearBuffer:(BOOL)display +{ + if (display == NO) { + //[[self openGLContext] makeCurrentContext]; + //glClear(GL_COLOR_BUFFER_BIT); + //[self loadTextures:NO]; + } else { + noDisplay = YES; + // [self setNeedsDisplay:true]; + } +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.h 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,57 @@ +/*************************************************************************** + PluginWindowController.h + The big bad boy that controls/creates the game window, the openGLView, and + communicates with PCSXR itself + PeopsOpenGPU + + Created by Gil Pedersen on Mon April 11 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +/* + In truth, this controller should be the ONLY place that glues between the + running PCSXR gpu and the mac interface. + ATM, some of the glue is here, some of it in drawgl.m, and a couple + of bits are in the config controller... +*/ + +#define PluginWindowController NetSfPeopsOpenGLGPUPluginWindowController + +#import +#import "PluginGLView.h" + +@class PluginWindowController; + +extern NSWindow *gameWindow; +extern PluginWindowController *gameController; + +@interface PluginWindowController : NSWindowController + +@property (weak) IBOutlet NSOpenGLView *glView; + ++ (id)openGameView; +- (PluginGLView *)openGLView; +- (BOOL)fullscreen; +- (void)setFullscreen:(BOOL)flag; +- (void)performFullscreenSwap; +- (void)cureAllIlls; +- (void) adaptToFrame:(NSRect)aFrame; +- (NSRect) screenFrame; +- (void)subscribeToEvents; + +- (id)initWithCoder:(NSCoder *)aDecoder ; +- (id)initWithWindow:(NSWindow*)theWindow; + +- (void)windowDidBecomeKey:(NSNotification*)aNotice; +- (void)windowDidResignKey:(NSNotification*)aNotice; +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,425 @@ +/*************************************************************************** + PluginWindowController.m + The big bad boy that controls/creates the game window, the openGLView, and + communicates with PCSXR itself + + PeopsOpenGPU + + Created by Gil Pedersen on Tue April 12 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#import "PluginWindowController.h" +#import "PluginWindow.h" +#import "Carbon/Carbon.h" +#include // OpenGL needed for "externals.h" +#include "externals.h" +#include "draw.h" // for CreateScanLines() +#undef BOOL + +// not sure why these aren't class or instance variables... +NSWindow *gameWindow; +PluginWindowController *gameController; +NSRect windowFrame; +NSRect windowDefaultRect; // default window size (needed to go back into window mode) + +NSRect FitRectInRect(NSRect source, NSRect destination) +{ + NSRect newRect; + + if (NSContainsRect(destination,source)) + return source; + + if (source.size.width > destination.size.width || source.size.height > destination.size.height){ + // have to rescale + float ratio = source.size.width/source.size.height; + if (ratio > destination.size.width/destination.size.height){ + source.size.width = destination.size.width; + source.size.height = source.size.width / ratio ; + } + else{ + source.size.height = destination.size.height; + source.size.width = source.size.height * ratio; + } + } + // center horizontally and take top vertical + newRect.origin.x = destination.origin.x + (destination.size.width - source.size.width)/2; + newRect.origin.y = destination.origin.y + destination.size.height - source.size.height; + newRect.size = source.size; + + return newRect; +} + +@implementation PluginWindowController +{ + BOOL inFullscreen; +} ++ (id)openGameView +{ + // create a window for the GPU and return + // the controller that controls it + + if (gameWindow == nil) { + if (gameController == nil) { + gameController = [[PluginWindowController alloc] initWithWindowNibName:@"NetSfPeopsOpenGLGPUInterface"]; + } + gameWindow = [gameController window]; + } + else { + NSLog(@"Well, we have a game window open already, which is kinda bad."); + abort(); + return nil; + } + + [gameWindow setBackgroundColor: [NSColor blackColor]]; + + windowFrame.size.width=iResX; + windowFrame.size.height=iResY; + + + if (windowFrame.size.width != 0) + [gameWindow setFrame:windowFrame display:NO]; + + [gameWindow center]; + windowDefaultRect = [gameWindow frame]; + + [gameWindow makeKeyAndOrderFront:nil]; + [gameController showWindow:nil]; + NSOpenGLView* glInstance = [gameController openGLView]; + [glInstance setFrameSize: windowDefaultRect.size]; + [glInstance reshape]; +// [glView update]; + + CGDirectDisplayID display = (CGDirectDisplayID)[[[gameWindow screen] deviceDescription][@"NSScreenNumber"] unsignedIntValue]; + if (CGDisplayIsCaptured(display)) { + [gameController setFullscreen:YES]; + } + + return gameController; +} + +- (void)subscribeToEvents +{ + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc addObserver:self selector:@selector(applicationDidChangeScreenParameters:) + name:NSApplicationDidChangeScreenParametersNotification object:NSApp]; + +/* not used ATM: + [nc addObserver:self selector:@selector(applicationWillResignActive:) name:NSApplicationWillResignActiveNotification object:NSApp]; + [nc addObserver:self selector:@selector(applicationWillBecomeActive:) name:NSApplicationWillBecomeActiveNotification object:NSApp]; + [nc addObserver:self selector:@selector(applicationWillTerminate:) name:NSApplicationWillTerminateNotification object:NSApp]; +*/ +} + +- (id)initWithCoder:(NSCoder *)aDecoder { + + self = [super initWithCoder:aDecoder]; + + + [self subscribeToEvents]; + return self; +} + +- (id)initWithWindow:(NSWindow*)theWindow { + self = [super initWithWindow:theWindow]; + + [self subscribeToEvents]; + return self; +} + +- (NSRect) screenFrame +{ + NSWindow* wind = [self window]; + CGDirectDisplayID display = (CGDirectDisplayID)[[[wind screen] deviceDescription][@"NSScreenNumber"] unsignedIntValue]; + + return NSMakeRect (0,0,CGDisplayPixelsWide(display), CGDisplayPixelsHigh(display)); +} + +- (void) applicationDidChangeScreenParameters:(NSNotification*)aNotice +{ + // TODO: There could be issues with more drastic things like + // openGL pixel format, etc. when screen changes... + + // if fullscreen, conform to new size. + if ([self fullscreen]){ + if (NSEqualRects([[self window] frame], [self screenFrame])){ + return; + } + + [self adaptToFrame: [self screenFrame]]; + + } + else { + // if windowed, recenter. + // TODO: scale window if screen size is too small + [[self window] center]; + + } + +} + +- (PluginGLView *)openGLView +{ + return (PluginGLView *)self.glView; +} + +- (void) cureAllIlls +{ + // try to reset the GPU without discarding textures, etc. + // when a resize takes place, all hell breaks loose, so + // this is necessarily ugly. + + // all this should be in draw.c, actually + +// needed, but I don't know what it's for... + rRatioRect.left = rRatioRect.top=0; + rRatioRect.right = iResX; + rRatioRect.bottom = iResY; + + [[self.glView openGLContext] makeCurrentContext]; + + glFlush(); + glFinish(); + + glViewport(rRatioRect.left, // init viewport by ratio rect + iResY-(rRatioRect.top+rRatioRect.bottom), + rRatioRect.right, + rRatioRect.bottom); + + + glScissor(0, 0, iResX, iResY); // init clipping (fullscreen) + glEnable(GL_SCISSOR_TEST); + glMatrixMode(GL_PROJECTION); // init projection with psx resolution + glLoadIdentity(); + glOrtho(0,PSXDisplay.DisplayMode.x, + PSXDisplay.DisplayMode.y, 0, -1, 1); + + CreateScanLines(); +// if(bKeepRatio) SetAspectRatio(); // set ratio + glFlush(); + glFinish(); + + [NSOpenGLContext clearCurrentContext]; + + [self.glView reshape]; // to get rid of fuglies on screen +// GLinitialize(); // blunt instrument method of setting a proper state. + +} + +- (void)dealloc +{ + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + + [nc removeObserver:self]; + windowFrame = [[self window] frame]; // huh? +} + +// forget keyDownEvents +- (void)keyDown:(NSEvent *)theEvent +{ + // Not required any more +} + +- (void)mouseDown:(NSEvent *)theEvent +{ + if ([self fullscreen]) { + [self setFullscreen:NO]; + } +} + +- (BOOL)fullscreen +{ + return inFullscreen; +} + +- (void)setFullscreen:(BOOL)flag +{ +// this is called by cocoa, not the main PSX thread. +// Messing with the opengl context is a Bad Thing. +// Therefore, just set a global flag, and +// wait around for a frame until +// gpu.c calls fullscreenswap() from +// the right thread + + if ([self fullscreen] == flag) + return; + + if (flag) + bChangeWinMode = 2; + else + bChangeWinMode = 1; + +} + +- (void)performFullscreenSwap +{ + // ah, that's better. We are called from the main PSX thread + // after a screen update, so we're clean. + // bChangeWinMode is a global set from PSX + + int flag = bChangeWinMode - 1; // 1 = go to window, 2 = go to fullscreen + bChangeWinMode = 0; // this is our flag that launched us, so 0 now + + NSWindow *window = [self window]; + NSScreen *screen = [window screen]; + + CGDirectDisplayID display = (CGDirectDisplayID)[[screen deviceDescription][@"NSScreenNumber"] unsignedIntValue]; + + NSRect newPlace; + + if (flag){ + [window setLevel: NSScreenSaverWindowLevel]; + newPlace = [self screenFrame] ; + CGDisplayHideCursor(display); + CGAssociateMouseAndMouseCursorPosition(NO); // this could be bad since it disables mouse somewhat + } + else{ + [window setLevel: NSNormalWindowLevel]; + newPlace = windowDefaultRect; + CGDisplayShowCursor(display); + CGAssociateMouseAndMouseCursorPosition(YES); + } + + if (flag) inFullscreen = TRUE; + else inFullscreen = FALSE; + + if (!inFullscreen) + newPlace = FitRectInRect(newPlace, NSMakeRect(0,0,CGDisplayPixelsWide(display),CGDisplayPixelsHigh(display)-24)); // with menu bar room + + [self adaptToFrame: newPlace]; + +} + +- (BOOL)windowShouldZoom:(NSWindow *)sender toFrame:(NSRect)newFrame +{ + [self setFullscreen:YES]; + + return NO; +} + +- (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)proposedFrameSize +{ + // we don't bother + + return proposedFrameSize; + + if (!(([sender resizeFlags] & NSShiftKeyMask) == NSShiftKeyMask)) { + NSRect oldSize = [sender frame]; + NSRect viewSize = [self.glView frame]; + + float xDiff = NSWidth(oldSize) - NSWidth(viewSize); + float yDiff = NSHeight(oldSize) - NSHeight(viewSize); + + //if ((proposedFrameSize.height / proposedFrameSize.width) < (3.0/4.0)) + // proposedFrameSize.height = ((proposedFrameSize.width - xDiff) * 3.0) / 4.0 + yDiff; + //else + proposedFrameSize.width = ((proposedFrameSize.height - yDiff) * 4.0) / 3.0 + xDiff; + } + + return proposedFrameSize; +} + +- (void)windowWillMiniaturize:(NSNotification *)aNotification +{ + [[NSNotificationCenter defaultCenter] postNotificationName:@"emuWindowWantPause" object:self]; +} + +- (void)windowDidDeminiaturize:(NSNotification *)aNotification +{ + [[NSNotificationCenter defaultCenter] postNotificationName:@"emuWindowWantResume" object:self]; +} + +- (BOOL)windowShouldClose:(id)sender +{ + [[NSNotificationCenter defaultCenter] postNotificationName:@"emuWindowDidClose" object:self]; + gameController = nil; + gameWindow = nil; + CGReleaseAllDisplays(); + return YES; +} + +// these two funcs should be handled by the window class but +// since we do fullscreen tweaking (hiding mouse, etc), +// the controller must do it ATM... +- (void)windowDidBecomeKey:(NSNotification*)aNotice +{ + // if in fullscreen, we must restore level and mouse hiding. + // it might be cooler if window goes to "window" size or hides + // instead of taking up full screen in background. + + NSWindow *window = [self window]; + NSScreen *screen = [window screen]; + + CGDirectDisplayID display = (CGDirectDisplayID)[[screen deviceDescription][@"NSScreenNumber"] unsignedIntValue]; + + if ([self fullscreen]){ + [window setLevel: NSScreenSaverWindowLevel]; + CGDisplayHideCursor(display); + } +} + +- (void)windowDidResignKey:(NSNotification*)aNotice +{ + // if in fullscreen, we must abdicate mouse hiding and level. + NSWindow *window = [self window]; + NSScreen *screen = [window screen]; + CGDirectDisplayID display = (CGDirectDisplayID)[[screen deviceDescription][@"NSScreenNumber"] unsignedIntValue]; + + if ([self fullscreen]){ + [window setLevel: NSNormalWindowLevel]; + CGDisplayShowCursor(display); + } +} + +- (void) adaptToFrame:(NSRect)aFrame +{ + // do magic so everything goes as planned + // when the window area changes + + int proportionalWidth, proportionalHeight; + + NSWindow* window = [self window]; + + [window setFrame:aFrame display:NO]; + + // assume square pixel ratio on the monitor + if ((aFrame.size.width*3)/4 <= aFrame.size.height) { // is window skinnier than it needs to be? + proportionalHeight = (aFrame.size.width*3)/4; // then shrink the content height (letterbox) + proportionalWidth = aFrame.size.width; // and conform to width + } else { + proportionalWidth = (aFrame.size.height*4)/3; + proportionalHeight = aFrame.size.height; + } + + NSRect fitToWindow = NSMakeRect( + roundf((aFrame.size.width - proportionalWidth)/2.0), + roundf((aFrame.size.height - proportionalHeight)/2.0), + roundf(proportionalWidth), roundf(proportionalHeight)); + + [self.glView setFrame:fitToWindow]; + [self.glView reshape]; + iResX = roundf(proportionalWidth); + iResY = roundf(proportionalHeight); + + [self cureAllIlls]; // do some fixin' + return; + +} + +@end + +void ChangeWindowMode(void) +{ + // glue from PSX thread. Globals are already set + [ gameController performFullscreenSwap]; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/PluginWindow.h pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/PluginWindow.h --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/PluginWindow.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/PluginWindow.h 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,39 @@ +/*************************************************************************** + PluginWindow.h - Specialization of the main game window (borderless) + PeopsSoftGPU + + Created by Gil Pedersen on Wed April 21 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + + /* this is a borderless window that can be dragged about. Also, holds a GLView */ +#import + +@interface NetSfPeopsOpenGLGPUPluginWindow : NSWindow + +@property (readonly) BOOL canBecomeKeyWindow; // to stop the beeping + +- (void) sendEvent:(NSEvent *)theEvent; +- (void) windowDidResize:(NSNotification*)notice; +- (void) windowDidUpdate: (NSNotification*)notice; +- (void) windowDidMove:(NSNotification *)notice; + +- (void) performClose: (id)sender; +- (void) mouseDown:(NSEvent *)theEvent; +- (void) mouseDragged:(NSEvent *)theEvent; + +- (void)keyDown:(NSEvent *)theEvent; +- (void)keyUp:(NSEvent *)theEvent; + +- (BOOL)validateMenuItem:(NSMenuItem*) item; +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/PluginWindow.m pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/PluginWindow.m --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/macsrc/PluginWindow.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/macsrc/PluginWindow.m 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,144 @@ +/*************************************************************************** + PluginWindow.m + PeopsSoftGPU + + Created by Gil Pedersen on Wed April 21 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#import "PluginWindow.h" +@implementation NetSfPeopsOpenGLGPUPluginWindow +{ + NSWindow* myParent; + NSPoint initialLocation; +} +/* +- (BOOL)windowShouldClose:(id)sender +{ + [[NSNotificationCenter defaultCenter] postNotificationName:@"emuWindowDidClose" object:self]; + + return YES; +}*/ + +- (void)sendEvent:(NSEvent *)theEvent +{ + NSEventType type = [theEvent type]; + if (type == NSKeyDown || type == NSKeyUp) { + if (type == NSKeyDown && [theEvent keyCode] == 53 /* escape */) { + // reroute to menu event + [[NSApp mainMenu] performKeyEquivalent:theEvent]; + } + + // ignore all key Events + return; + } + + [super sendEvent:theEvent]; +} + +- (void) windowDidResize:(NSNotification*)notice +{ +} + +- (void) windowDidUpdate: (NSNotification*)notice +{ +} + +- (void)windowDidMove:(NSNotification *)notification +{ + +} + +- (BOOL) canBecomeKeyWindow +{ + return YES; +} + +- (void)keyDown:(NSEvent *)theEvent +{ +} + +- (void)keyUp:(NSEvent *)theEvent +{ +} + +- (BOOL)validateMenuItem:(NSMenuItem*) menuItem +{ +// SEL bleh = [menuItem action]; +// NSLog(@"Validate: %@, action: %@", menuItem, NSStringFromSelector(bleh)); + if ([menuItem action] == @selector(performClose:)) + return YES; + + return NO; + +} + +- (void) performClose: (id)sender +{ + if ([self delegate]){ + // NSLog(@"We have a delegate %@", [self delegate]); + + if ([[self delegate] windowShouldClose:sender]) + [super close]; + } + else { + // hmm, just explode I guess + [super close]; + } +} + +- (void)mouseDown:(NSEvent *)theEvent { + + // Get the mouse location in window coordinates. + initialLocation = [theEvent locationInWindow]; + +} + + +/* + + Once the user starts dragging the mouse, move the window with it. The window has no title bar for the user to drag (so we have to implement dragging ourselves) + + */ + +- (void)mouseDragged:(NSEvent *)theEvent { + + if ([self level] == NSScreenSaverWindowLevel) + // we don't drag when in fullscreen + // note that it is only because a quirk in the ordering of events + // and the time that NSScreenSaverWindowLevel is set + // that we'll never be dragged while in the background + return; + + NSRect screenVisibleFrame = [[NSScreen mainScreen] visibleFrame]; + NSRect windowFrame = [self frame]; + NSPoint newOrigin = windowFrame.origin; + + // Get the mouse location in window coordinates. + NSPoint currentLocation = [theEvent locationInWindow]; + + // Update the origin with the difference between the new mouse location and the old mouse location. + newOrigin.x += (currentLocation.x - initialLocation.x); + newOrigin.y += (currentLocation.y - initialLocation.y); + + // Don't let window get dragged up under the menu bar + if ((newOrigin.y + windowFrame.size.height) > (screenVisibleFrame.origin.y + screenVisibleFrame.size.height)) { + newOrigin.y = screenVisibleFrame.origin.y + (screenVisibleFrame.size.height - windowFrame.size.height); + } + + // Move the window to the new location + [self setFrameOrigin:newOrigin]; + +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/NetSfPeopsOpenGLGPUInterface.xib pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/NetSfPeopsOpenGLGPUInterface.xib --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/NetSfPeopsOpenGLGPUInterface.xib 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/NetSfPeopsOpenGLGPUInterface.xib 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/PeopsXgl.exp pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/PeopsXgl.exp --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/PeopsXgl.exp 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/PeopsXgl.exp 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,39 @@ +# PeopsXgl.exp +# Pcsxr +# +# Created by C.W. Betts on 2/8/15. +# + +_PSEgetLibType +_PSEgetLibName +_PSEgetLibVersion +_GPUinit +_GPUshutdown +_GPUopen +_GPUclose +_GPUconfigure +_GPUabout +_GPUtest +_GPUwriteData +_GPUwriteStatus +_GPUreadData +_GPUreadStatus +_GPUdmaChain +_GPUupdateLace +_GPUmakeSnapshot +_GPUwriteDataMem +_GPUreadDataMem +_GPUdisplayFlags +_GPUfreeze +_GPUshowScreenPic +_GPUgetScreenPic + +_GPUkeypressed +_GPUhSync +_GPUvBlank +_GPUaddVertex + +_GPUcursor +_GPUsetfix + +_GPUvisualVibration diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/zh-Hans.lproj/Credits.rtf pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/zh-Hans.lproj/Credits.rtf --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/zh-Hans.lproj/Credits.rtf 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/zh-Hans.lproj/Credits.rtf 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,22 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset134 STHeitiSC-Light;} +{\colortbl;\red255\green255\blue255;} +\vieww10800\viewh8400\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural + +\f0\b\fs24 \cf0 Created By +\b0 \ + Pete Bernert and the P.E.Op.S. team\ +\ + +\b Macintosh Port By +\b0 \ + Gil Pedersen\ + C.W. \'93Madd the Sane\'94 Betts\ +\ + +\b Chinese Translation( +\f1 \'d6\'d0\'ce\'c4\'b7\'ad\'d2\'eb +\f0 ): +\b0 \ + Sdchun} \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/zh-Hans.lproj/NetSfPeopsOpenGLConfig.strings pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/zh-Hans.lproj/NetSfPeopsOpenGLConfig.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/plugins/PeopsXgl/zh-Hans.lproj/NetSfPeopsOpenGLConfig.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/plugins/PeopsXgl/zh-Hans.lproj/NetSfPeopsOpenGLConfig.strings 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,363 @@ + +/* Class = "NSWindow"; title = "GPU 配置"; ObjectID = "5"; */ +"5.title" = "GPU 配置"; + +/* Class = "NSBox"; title = "显示设置"; ObjectID = "89"; */ +"89.title" = "显示设置"; + +/* Class = "NSBox"; ibShadowedToolTip = "如果你的硬件支持,纹理将更精确."; ObjectID = "107"; */ +"107.ibShadowedToolTip" = "如果你的硬件支持,纹理将更精确."; + +/* Class = "NSBox"; title = "渲染"; ObjectID = "107"; */ +"107.title" = "渲染"; + +/* Class = "NSMenuItem"; title = "从不"; ObjectID = "111"; */ +"111.title" = "从不"; + +/* Class = "NSTextField"; ibShadowedToolTip = "指定渲染抖动的颜色"; ObjectID = "112"; */ +"112.ibShadowedToolTip" = "指定渲染抖动的颜色"; + +/* Class = "NSMenu"; title = "查看其他"; ObjectID = "113"; */ +"113.title" = "查看其他"; + +/* Class = "NSMenuItem"; title = "永远"; ObjectID = "114"; */ +"114.title" = "永远"; + +/* Class = "NSMenuItem"; title = "需要时"; ObjectID = "115"; */ +"115.title" = "需要时"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "指定渲染抖动的颜色"; ObjectID = "116"; */ +"116.ibShadowedToolTip" = "指定渲染抖动的颜色"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "纹理颜色深度."; ObjectID = "169"; */ +"169.ibShadowedToolTip" = "纹理颜色深度."; + +/* Class = "NSMenu"; title = "查看其他"; ObjectID = "170"; */ +"170.title" = "查看其他"; + +/* Class = "NSMenuItem"; title = "RGBA 16"; ObjectID = "171"; */ +"171.title" = "RGBA 16"; + +/* Class = "NSMenuItem"; title = "预设值"; ObjectID = "172"; */ +"172.title" = "预设值"; + +/* Class = "NSMenuItem"; title = "R5 G5 B5 A1"; ObjectID = "173"; */ +"173.title" = "R5 G5 B5 A1"; + +/* Class = "NSTextField"; ibShadowedToolTip = "纹理颜色深度."; ObjectID = "174"; */ +"174.ibShadowedToolTip" = "纹理颜色深度."; + +/* Class = "NSTextField"; ibShadowedToolTip = "纹理过滤.高标准过滤纹理种类."; ObjectID = "193"; */ +"193.ibShadowedToolTip" = "纹理过滤.高标准过滤纹理种类."; + +/* Class = "NSTextField"; ibShadowedToolTip = "选择纹理缩放品质等级"; ObjectID = "201"; */ +"201.ibShadowedToolTip" = "选择纹理缩放品质等级"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "使用屏幕外绘画移除图形毛刺"; ObjectID = "202"; */ +"202.ibShadowedToolTip" = "使用屏幕外绘画移除图形毛刺"; + +/* Class = "NSMenu"; title = "查看其他"; ObjectID = "203"; */ +"203.title" = "查看其他"; + +/* Class = "NSMenuItem"; title = "有些"; ObjectID = "204"; */ +"204.title" = "有些"; + +/* Class = "NSMenuItem"; title = "无"; ObjectID = "205"; */ +"205.title" = "无"; + +/* Class = "NSMenuItem"; title = "默认值"; ObjectID = "206"; */ +"206.title" = "默认值"; + +/* Class = "NSTextField"; ibShadowedToolTip = "使用屏幕外绘画移除图形毛刺"; ObjectID = "207"; */ +"207.ibShadowedToolTip" = "使用屏幕外绘画移除图形毛刺"; + +/* Class = "NSBox"; title = "纹理"; ObjectID = "212"; */ +"212.title" = "纹理"; + +/* Class = "NSMenu"; title = "查看其他"; ObjectID = "216"; */ +"216.title" = "查看其他"; + +/* Class = "NSMenuItem"; title = "Item2"; ObjectID = "217"; */ +"217.title" = "Item2"; + +/* Class = "NSMenuItem"; title = "Item1"; ObjectID = "218"; */ +"218.title" = "Item1"; + +/* Class = "NSMenuItem"; title = "Item3"; ObjectID = "219"; */ +"219.title" = "Item3"; + +/* Class = "NSTextField"; ibShadowedToolTip = "选择PSX读取屏幕内容的方案"; ObjectID = "220"; */ +"220.ibShadowedToolTip" = "选择PSX读取屏幕内容的方案"; + +/* Class = "NSMenuItem"; title = "RGBA 32"; ObjectID = "250"; */ +"250.title" = "RGBA 32"; + +/* Class = "NSMenuItem"; title = "BGRA 32"; ObjectID = "251"; */ +"251.title" = "BGRA 32"; + +/* Class = "NSSlider"; ibShadowedToolTip = "纹理过滤.高标准过滤纹理种类."; ObjectID = "252"; */ +"252.ibShadowedToolTip" = "纹理过滤.高标准过滤纹理种类."; + +/* Class = "NSSlider"; ibShadowedToolTip = "选择纹理缩放品质等级"; ObjectID = "253"; */ +"253.ibShadowedToolTip" = "选择纹理缩放品质等级"; + +/* Class = "NSMenuItem"; title = "更多"; ObjectID = "254"; */ +"254.title" = "更多"; + +/* Class = "NSMenuItem"; title = "侵略性"; ObjectID = "255"; */ +"255.title" = "侵略性"; + +/* Class = "NSColorWell"; ibShadowedToolTip = "选择屏幕颜色透明度"; ObjectID = "341"; */ +"341.ibShadowedToolTip" = "选择屏幕颜色透明度"; + +/* Class = "NSButtonCell"; title = "显示器同步刷新"; ObjectID = "374"; */ +"374.title" = "显示器同步刷新"; + +/* Class = "NSButtonCell"; title = "使用自动跳帧"; ObjectID = "375"; */ +"375.title" = "使用自动跳帧"; + +/* Class = "NSButtonCell"; title = "显示反相FPS"; ObjectID = "376"; */ +"376.title" = "显示反相FPS"; + +/* Class = "NSButtonCell"; title = "自动全屏"; ObjectID = "377"; */ +"377.title" = "自动全屏"; + +/* Class = "NSButtonCell"; title = "限制跳帧速度"; ObjectID = "380"; */ +"380.title" = "限制跳帧速度"; + +/* Class = "NSTextFieldCell"; title = "图形抖动:"; ObjectID = "383"; */ +"383.title" = "图形抖动:"; + +/* Class = "NSButtonCell"; title = "只绘制线框图"; ObjectID = "385"; */ +"385.title" = "只绘制线框图"; + +/* Class = "NSButtonCell"; title = "使用高级混合"; ObjectID = "386"; */ +"386.title" = "使用高级混合"; + +/* Class = "NSButtonCell"; title = "通过不透明输出"; ObjectID = "387"; */ +"387.title" = "通过不透明输出"; + +/* Class = "NSButtonCell"; title = "裁剪 Z-Masks"; ObjectID = "388"; */ +"388.title" = "裁剪 Z-Masks"; + +/* Class = "NSButtonCell"; title = "建议 JPEG 解码"; ObjectID = "389"; */ +"389.title" = "建议 JPEG 解码"; + +/* Class = "NSButtonCell"; title = "建议 JPEGs 15bit"; ObjectID = "390"; */ +"390.title" = "建议 JPEGs 15bit"; + +/* Class = "NSButtonCell"; title = "绘制扫描线"; ObjectID = "391"; */ +"391.title" = "绘制扫描线"; + +/* Class = "NSButtonCell"; title = "增加模糊"; ObjectID = "392"; */ +"392.title" = "增加模糊"; + +/* Class = "NSTextFieldCell"; title = "画面外绘画:"; ObjectID = "394"; */ +"394.title" = "画面外绘画:"; + +/* Class = "NSTextFieldCell"; title = "颜色深度:"; ObjectID = "396"; */ +"396.title" = "颜色深度:"; + +/* Class = "NSTextFieldCell"; title = "滤波:"; ObjectID = "397"; */ +"397.title" = "滤波:"; + +/* Class = "NSTextFieldCell"; title = "优化:"; ObjectID = "398"; */ +"398.title" = "优化:"; + +/* Class = "NSTextFieldCell"; title = "帧缓冲效果"; ObjectID = "402"; */ +"402.title" = "帧缓冲效果"; + +/* Class = "NSButtonCell"; title = "GTE精确度"; ObjectID = "406"; */ +"406.title" = "GTE精确度"; + +/* Class = "NSWindow"; title = "技巧"; ObjectID = "472"; */ +"472.title" = "技巧"; + +/* Class = "NSButtonCell"; title = "启用技巧"; ObjectID = "477"; */ +"477.title" = "启用技巧"; + +/* Class = "NSTextFieldCell"; title = "仅启用技巧修复游戏中指定的问题."; ObjectID = "478"; */ +"478.title" = "仅启用技巧修复游戏中指定的问题."; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "buggy芯片组主板"; ObjectID = "480"; */ +"480.ibShadowedToolTip" = "buggy芯片组主板"; + +/* Class = "NSButtonCell"; title = "使用 low-res FPS 时钟"; ObjectID = "480"; */ +"480.title" = "使用 low-res FPS 时钟"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "需要 epsxe 1.5.2 或更老版本."; ObjectID = "481"; */ +"481.ibShadowedToolTip" = "需要 epsxe 1.5.2 或更老版本."; + +/* Class = "NSButtonCell"; title = "奇数/偶数 控制技巧"; ObjectID = "481"; */ +"481.title" = "奇数/偶数 控制技巧"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "需要(buggy) OpenGL ICDs"; ObjectID = "482"; */ +"482.ibShadowedToolTip" = "需要(buggy) OpenGL ICDs"; + +/* Class = "NSButtonCell"; title = "假装删减混合"; ObjectID = "482"; */ +"482.title" = "假装删减混合"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "DW7 fix (不是100%完美...)"; ObjectID = "483"; */ +"483.ibShadowedToolTip" = "DW7 fix (不是100%完美…)"; + +/* Class = "NSButtonCell"; title = "缓慢检测更新"; ObjectID = "483"; */ +"483.title" = "缓慢检测更新"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "修复黑色区域"; ObjectID = "484"; */ +"484.ibShadowedToolTip" = "修复黑色区域"; + +/* Class = "NSButtonCell"; title = "使用老纹理过滤"; ObjectID = "484"; */ +"484.title" = "使用老纹理过滤"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "绘图繁忙时切换标志寄存器"; ObjectID = "485"; */ +"485.ibShadowedToolTip" = "绘图繁忙时切换标志寄存器"; + +/* Class = "NSButtonCell"; title = "假装\"GPU繁忙\"状态"; ObjectID = "485"; */ +"485.title" = "假装\"GPU繁忙\"状态"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "显示全部Capcom的2D战斗"; ObjectID = "486"; */ +"486.ibShadowedToolTip" = "显示全部Capcom的2D战斗"; + +/* Class = "NSButtonCell"; title = "扩大屏幕宽度"; ObjectID = "486"; */ +"486.title" = "扩大屏幕宽度"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "只对FF9战斗模式..."; ObjectID = "487"; */ +"487.ibShadowedToolTip" = "只对FF9战斗模式…"; + +/* Class = "NSButtonCell"; title = "G4多边形缓存"; ObjectID = "487"; */ +"487.title" = "G4多边形缓存"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "显示一些额外的飞溅屏幕"; ObjectID = "488"; */ +"488.ibShadowedToolTip" = "显示一些额外的飞溅屏幕"; + +/* Class = "NSButtonCell"; title = "检测特殊上传"; ObjectID = "488"; */ +"488.title" = "检测特殊上传"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "只对FF9战斗指针..."; ObjectID = "489"; */ +"489.ibShadowedToolTip" = "只对FF9战斗指针…"; + +/* Class = "NSButtonCell"; title = "调整帧缓冲区通道"; ObjectID = "489"; */ +"489.title" = "调整帧缓冲区通道"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "帧上传状态速度上升"; ObjectID = "490"; */ +"490.ibShadowedToolTip" = "帧上传状态速度上升"; + +/* Class = "NSButtonCell"; title = "管理帧缓冲区更新"; ObjectID = "490"; */ +"490.title" = "管理帧缓冲区更新"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "修复在Lunar时黑屏"; ObjectID = "491"; */ +"491.ibShadowedToolTip" = "修复在Lunar时黑屏"; + +/* Class = "NSButtonCell"; title = "忽视黑色"; ObjectID = "491"; */ +"491.title" = "忽视黑色"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "速度怪胎,循环杀手"; ObjectID = "492"; */ +"492.ibShadowedToolTip" = "速度怪胎,循环杀手"; + +/* Class = "NSButtonCell"; title = "正面交换/后面检测"; ObjectID = "492"; */ +"492.title" = "正面交换/后面检测"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "老坐标兼容模式"; ObjectID = "493"; */ +"493.ibShadowedToolTip" = "老坐标兼容模式"; + +/* Class = "NSButtonCell"; title = "关闭坐标检查"; ObjectID = "493"; */ +"493.title" = "关闭坐标检查"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Leg. o. 龙骑兵,需要多通道"; ObjectID = "494"; */ +"494.ibShadowedToolTip" = "Leg. o. 龙骑兵,需要多通道"; + +/* Class = "NSButtonCell"; title = "移除蓝色毛刺"; ObjectID = "494"; */ +"494.title" = "移除蓝色毛刺"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "在ATI系统快速使用FB"; ObjectID = "495"; */ +"495.ibShadowedToolTip" = "在ATI系统快速使用FB"; + +/* Class = "NSButtonCell"; title = "混合软件使用FB"; ObjectID = "495"; */ +"495.title" = "混合软件使用FB"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "在有些游戏中限制每秒的帧数."; ObjectID = "496"; */ +"496.ibShadowedToolTip" = "在有些游戏中限制每秒的帧数."; + +/* Class = "NSButtonCell"; title = "使用PC计算每秒的帧数"; ObjectID = "496"; */ +"496.title" = "使用PC计算每秒的帧数"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "每秒只跳过帧数"; ObjectID = "497"; */ +"497.ibShadowedToolTip" = "每秒只跳过帧数"; + +/* Class = "NSButtonCell"; title = "使用老跳帧方式"; ObjectID = "497"; */ +"497.title" = "使用老跳帧方式"; + +/* Class = "NSButtonCell"; title = "奇数/偶数 控制技巧"; ObjectID = "498"; */ +"498.title" = "奇数/偶数 控制技巧"; + +/* Class = "NSButtonCell"; title = "确认"; ObjectID = "502"; */ +"502.title" = "确认"; + +/* Class = "NSButtonCell"; title = "取消"; ObjectID = "504"; */ +"504.title" = "取消"; + +/* Class = "NSButtonCell"; title = "重置"; ObjectID = "666"; */ +"666.title" = "重置"; + +/* Class = "NSButtonCell"; title = "确认"; ObjectID = "671"; */ +"671.title" = "确认"; + +/* Class = "NSButtonCell"; title = "取消"; ObjectID = "675"; */ +"675.title" = "取消"; + +/* Class = "NSButtonCell"; title = "绘制扫描线"; ObjectID = "703"; */ +"703.title" = "绘制扫描线"; + +/* Class = "NSButtonCell"; title = "限制跳帧速度"; ObjectID = "786"; */ +"786.title" = "限制跳帧速度"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "改变全屏模式分辨率"; ObjectID = "908"; */ +"908.ibShadowedToolTip" = "改变全屏模式分辨率"; + +/* Class = "NSTextField"; ibShadowedToolTip = "改变全屏模式分辨率"; ObjectID = "909"; */ +"909.ibShadowedToolTip" = "改变全屏模式分辨率"; + +/* Class = "NSButton"; ibShadowedToolTip = "保持PSX显示固有比例"; ObjectID = "910"; */ +"910.ibShadowedToolTip" = "保持PSX显示固有比例"; + +/* Class = "NSFormCell"; title = "高度:"; ObjectID = "913"; */ +"913.title" = "高度:"; + +/* Class = "NSFormCell"; title = "宽度:"; ObjectID = "914"; */ +"914.title" = "宽度:"; + +/* Class = "NSFormCell"; title = "领域:"; ObjectID = "915"; */ +"915.title" = "领域:"; + +/* Class = "NSButtonCell"; title = "技巧…"; ObjectID = "918"; */ +"918.title" = "技巧…"; + +/* Class = "NSButtonCell"; title = "按比例调整大小"; ObjectID = "919"; */ +"919.title" = "按比例调整大小"; + +/* Class = "NSTextFieldCell"; title = "全屏大小"; ObjectID = "922"; */ +"922.title" = "全屏大小"; + +/* Class = "NSMenu"; title = "查看其他"; ObjectID = "925"; */ +"925.title" = "查看其他"; + +/* Class = "NSMenuItem"; title = "当前"; ObjectID = "926"; */ +"926.title" = "当前"; + +/* Class = "NSMenuItem"; title = "1600 x 1200"; ObjectID = "927"; */ +"927.title" = "1600 x 1200"; + +/* Class = "NSMenuItem"; title = "1280 x1024"; ObjectID = "928"; */ +"928.title" = "1280 x1024"; + +/* Class = "NSMenuItem"; title = "1152 x 864"; ObjectID = "929"; */ +"929.title" = "1152 x 864"; + +/* Class = "NSMenuItem"; title = "1024 x 768"; ObjectID = "930"; */ +"930.title" = "1024 x 768"; + +/* Class = "NSMenuItem"; title = "640 x 480"; ObjectID = "931"; */ +"931.title" = "640 x 480"; + +/* Class = "NSMenuItem"; title = "800 x 600"; ObjectID = "932"; */ +"932.title" = "800 x 600"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Psx-Memcard/en.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/Psx-Memcard/en.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Psx-Memcard/en.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Psx-Memcard/en.lproj/InfoPlist.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,4 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "Copyright © 2014 Pcsx Reloaded team"; +CFBundleShortVersionString = "1.0"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Psx-Memcard/en.lproj/schema.strings pcsxr-unstable-1.9.94+svn98108/macosx/Psx-Memcard/en.lproj/schema.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Psx-Memcard/en.lproj/schema.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Psx-Memcard/en.lproj/schema.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,30 @@ +/* ---------- + + + This file is only needed if you are defining a custom importer attribute. + Most importer plugins will not need to do this. + Add this file to your project's localized resources if you have defined a custom attribute. + + + ----------*/ + + +/* Localized DisplayNames for your custom metadata attributes */ +/* The form is: "myMetadataKey" = "My Metadata Key"; */ +/* The name on the left is the name defined in schema.xml */ +/* The name on the right is what the user will see */ +"com_codeplex_pcsxr_memcard_memcount" = "Saves"; +"com_codeplex_pcsxr_memcard_freeblocks" = "Free Blocks"; +"com_codeplex_pcsxr_memcard_savenames" = "Saved Games"; +"com_codeplex_pcsxr_memcard_memnames" = "Memory Block Names"; +"com_codeplex_pcsxr_memcard_memids" = "Memory Block IDs"; + +/* Localized Description of you custom metadata attributes */ +/* The form is: "myMetadataKey.Description" = "stuff"; +/* com_Foo_YourAttrName should be definded in the schema.xml file */ +/* The value on the right will be displayed by the Finder etc.. */ +"com_codeplex_pcsxr_memcard_memcount.Description" = "Number of individual save games"; +"com_codeplex_pcsxr_memcard_freeblocks.Description" = "Number of blocks that are free"; +"com_codeplex_pcsxr_memcard_savenames.Description" = "The names of the games saved on the memory card"; +"com_codeplex_pcsxr_memcard_memnames.Description" = "The names of the memory blocks"; +"com_codeplex_pcsxr_memcard_memids.Descriptions" = "IDs of memory cards"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Psx-Memcard/GetMetadataForFile.h pcsxr-unstable-1.9.94+svn98108/macosx/Psx-Memcard/GetMetadataForFile.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Psx-Memcard/GetMetadataForFile.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Psx-Memcard/GetMetadataForFile.h 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,16 @@ +// +// GetMetadataForFile.h +// Pcsxr +// +// Created by C.W. Betts on 6/6/14. +// +// + +#ifndef Pcsxr_GetMetadataForFile_h +#define Pcsxr_GetMetadataForFile_h + +#include + +__private_extern Boolean GetMetadataForFile(void *thisInterface, CFMutableDictionaryRef attributes, CFStringRef contentTypeUTI, CFStringRef pathToFile); + +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Psx-Memcard/GetMetadataForFile.m pcsxr-unstable-1.9.94+svn98108/macosx/Psx-Memcard/GetMetadataForFile.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Psx-Memcard/GetMetadataForFile.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Psx-Memcard/GetMetadataForFile.m 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,214 @@ +// +// GetMetadataForFile.m +// Psx-Memcard +// +// Created by C.W. Betts on 6/6/14. +// +// + +#include +#import +#include "GetMetadataForFile.h" +#include "sio.h" + +#define MAX_MEMCARD_BLOCKS 15 +#define kPCSXRSaveNames @"com_codeplex_pcsxr_memcard_savenames" +#define kPCSXRMemCount @"com_codeplex_pcsxr_memcard_memcount" +#define kPCSXRFreeBlocks @"com_codeplex_pcsxr_memcard_freeblocks" +#define kPCSXRMemNames @"com_codeplex_pcsxr_memcard_memnames" +#define kPCSXRMemIDs @"com_codeplex_pcsxr_memcard_memids" + +//============================================================================== +// +// Get metadata attributes from document files +// +// The purpose of this function is to extract useful information from the +// file formats for your document, and set the values into the attribute +// dictionary for Spotlight to include. +// +//============================================================================== + +typedef NS_ENUM(char, PCSXRMemFlags) { + PCSXRMemFlagDeleted = 0, + PCSXRMemFlagFree, + PCSXRMemFlagUsed, + PCSXRMemFlagLink, + PCSXRMemFlagEndLink +}; + +static void GetSoloBlockInfo(unsigned char *data, int block, McdBlock *Info) +{ + unsigned char *ptr = data + block * 8192 + 2; + unsigned char *str = Info->Title; + unsigned char *sstr = Info->sTitle; + unsigned short c; + int i, x = 0; + + memset(Info, 0, sizeof(McdBlock)); + Info->IconCount = *ptr & 0x3; + ptr += 2; + + for (i = 0; i < 48; i++) { + c = *(ptr) << 8; + c |= *(ptr + 1); + if (!c) + break; + + // Convert ASCII characters to half-width + if (c >= 0x8281 && c <= 0x829A) { + c = (c - 0x8281) + 'a'; + } else if (c >= 0x824F && c <= 0x827A) { + c = (c - 0x824F) + '0'; + } else if (c == 0x8140) { + c = ' '; + } else if (c == 0x8143) { + c = ','; + } else if (c == 0x8144) { + c = '.'; + } else if (c == 0x8146) { + c = ':'; + } else if (c == 0x8147) { + c = ';'; + } else if (c == 0x8148) { + c = '?'; + } else if (c == 0x8149) { + c = '!'; + } else if (c == 0x815E) { + c = '/'; + } else if (c == 0x8168) { + c = '"'; + } else if (c == 0x8169) { + c = '('; + } else if (c == 0x816A) { + c = ')'; + } else if (c == 0x816D) { + c = '['; + } else if (c == 0x816E) { + c = ']'; + } else if (c == 0x817C) { + c = '-'; + } else { + str[i] = ' '; + sstr[x++] = *ptr++; + sstr[x++] = *ptr++; + continue; + } + + str[i] = sstr[x++] = c; + ptr += 2; + } + + ptr = data + block * 128; + + Info->Flags = *ptr; + + ptr += 0xa; + strlcpy(Info->ID, ptr, 13); + ptr += 12; + strlcpy(Info->Name, ptr, 17); +} + +static inline PCSXRMemFlags MemBlockFlag(unsigned char blockFlags) +{ + if ((blockFlags & 0xF0) == 0xA0) { + if ((blockFlags & 0xF) >= 1 && (blockFlags & 0xF) <= 3) + return PCSXRMemFlagDeleted; + else + return PCSXRMemFlagFree; + } else if ((blockFlags & 0xF0) == 0x50) { + if ((blockFlags & 0xF) == 0x1) + return PCSXRMemFlagUsed; + else if ((blockFlags & 0xF) == 0x2) + return PCSXRMemFlagLink; + else if ((blockFlags & 0xF) == 0x3) + return PCSXRMemFlagEndLink; + } else + return PCSXRMemFlagFree; + + //Xcode complains unless we do this... + //NSLog(@"Unknown flag %x", blockFlags); + return PCSXRMemFlagFree; +} + +Boolean GetMetadataForFile(void *thisInterface, CFMutableDictionaryRef attributes, CFStringRef contentTypeUTI, CFStringRef pathToFile) +{ + Boolean ok = FALSE; + @autoreleasepool { + int i = 0, x; + NSCharacterSet *theCharSet = [NSCharacterSet whitespaceAndNewlineCharacterSet]; + short freeBlocks = MAX_MEMCARD_BLOCKS; + short memCount = 0; + //NSMutableArray *enNames = [[NSMutableArray alloc] initWithCapacity:MAX_MEMCARD_BLOCKS]; + NSMutableArray *jpNames = [[NSMutableArray alloc] initWithCapacity:MAX_MEMCARD_BLOCKS]; + NSMutableArray *memNames = [[NSMutableArray alloc] initWithCapacity:MAX_MEMCARD_BLOCKS]; + NSMutableArray *memIDs = [[NSMutableArray alloc] initWithCapacity:MAX_MEMCARD_BLOCKS]; + NSMutableDictionary *attr = (__bridge NSMutableDictionary*)attributes; + NSString *path = (__bridge NSString*)pathToFile; + const unsigned char* fileCData = NULL; + NSData *fileData = [[NSData alloc] initWithContentsOfFile:path options:NSDataReadingMappedIfSafe error:NULL]; + if (!fileData) { + return FALSE; + } + fileCData = [fileData bytes]; + if ([fileData length] == MCD_SIZE + 64) + fileCData += 64; + else if([fileData length] == MCD_SIZE + 3904) + fileCData += 3904; + else if ([fileData length] != MCD_SIZE) + return FALSE; + + while (i < MAX_MEMCARD_BLOCKS) { + x = 1; + McdBlock memBlock; + //NSString *enName; + NSString *jpName; + NSString *memName; + NSString *memID; + + GetSoloBlockInfo((unsigned char *)fileCData, i + 1, &memBlock); + + if (MemBlockFlag(memBlock.Flags) == PCSXRMemFlagFree) { + //Free space: ignore + i++; + continue; + } + while (i + x < MAX_MEMCARD_BLOCKS) { + McdBlock tmpBlock; + GetSoloBlockInfo((unsigned char *)fileCData, i + x + 1, &tmpBlock); + if ((tmpBlock.Flags & 0x3) == 0x3) { + x++; + break; + } else if ((tmpBlock.Flags & 0x2) == 0x2) { + x++; + } else { + break; + } + }; + i += x; + // Ignore deleted blocks + if (MemBlockFlag(memBlock.Flags) == PCSXRMemFlagDeleted) { + continue; + } + memCount++; + freeBlocks -= x; + jpName = [[NSString alloc] initWithCString:memBlock.sTitle encoding:NSShiftJISStringEncoding]; + jpName = [jpName stringByTrimmingCharactersInSet:theCharSet]; + memName = @(memBlock.Name); + memID = @(memBlock.ID); + + [jpNames addObject:jpName]; + [memNames addObject:memName]; + [memIDs addObject:memID]; + } + + attr[kPCSXRSaveNames] = jpNames; + attr[kPCSXRMemCount] = @(memCount); + attr[kPCSXRFreeBlocks] = @(freeBlocks); + attr[kPCSXRMemNames] = memNames; + attr[kPCSXRMemIDs] = memIDs; + ok = TRUE; + } + + // Return the status + return ok; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Psx-Memcard/main.c pcsxr-unstable-1.9.94+svn98108/macosx/Psx-Memcard/main.c --- pcsxr-unstable-1.9.94+svn97809/macosx/Psx-Memcard/main.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Psx-Memcard/main.c 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,187 @@ +// +// main.c +// Psx-Memcard +// +// Created by C.W. Betts on 6/6/14. +// +// + +#include +#include +#include +#include "GetMetadataForFile.h" + +// ----------------------------------------------------------------------------- +// constants +// ----------------------------------------------------------------------------- + + +#define PLUGIN_ID "E6CB501C-9D5C-4CAF-A9DA-A6940F261514" + +// +// Below is the generic glue code for all plug-ins. +// + +// ----------------------------------------------------------------------------- +// typedefs +// ----------------------------------------------------------------------------- + +// The layout for an instance of MetaDataImporterPlugIn +typedef struct __MetadataImporterPluginType { + MDImporterInterfaceStruct *conduitInterface; + CFUUIDRef factoryID; + UInt32 refCount; +} MDImporterType; + +// ----------------------------------------------------------------------------- +// prototypes +// ----------------------------------------------------------------------------- +// Forward declaration for the IUnknown implementation. +// + +static MDImporterType *AllocMetadataImporterPluginType(CFUUIDRef inFactoryID); +static void DeallocMetadataImporterPluginType(MDImporterType *thisInstance); +static HRESULT MetadataImporterQueryInterface(void *thisInstance,REFIID iid,LPVOID *ppv); +extern void *MetadataImporterPluginFactory(CFAllocatorRef allocator,CFUUIDRef typeID); +static ULONG MetadataImporterPluginAddRef(void *thisInstance); +static ULONG MetadataImporterPluginRelease(void *thisInstance); +// ----------------------------------------------------------------------------- +// testInterfaceFtbl definition +// ----------------------------------------------------------------------------- +// The TestInterface function table. +// + +static MDImporterInterfaceStruct testInterfaceFtbl = { + NULL, + MetadataImporterQueryInterface, + MetadataImporterPluginAddRef, + MetadataImporterPluginRelease, + GetMetadataForFile +}; + + +// ----------------------------------------------------------------------------- +// AllocMetadataImporterPluginType +// ----------------------------------------------------------------------------- +// Utility function that allocates a new instance. +// You can do some initial setup for the importer here if you wish +// like allocating globals etc... +// +MDImporterType *AllocMetadataImporterPluginType(CFUUIDRef inFactoryID) +{ + MDImporterType *theNewInstance = (MDImporterType *)calloc(sizeof(MDImporterType), 1); + + /* Point to the function table */ + theNewInstance->conduitInterface = &testInterfaceFtbl; + + /* Retain and keep an open instance refcount for each factory. */ + theNewInstance->factoryID = CFRetain(inFactoryID); + CFPlugInAddInstanceForFactory(inFactoryID); + + /* This function returns the IUnknown interface so set the refCount to one. */ + theNewInstance->refCount = 1; + return theNewInstance; +} + +// ----------------------------------------------------------------------------- +// DeallocPsx_MemcardMDImporterPluginType +// ----------------------------------------------------------------------------- +// Utility function that deallocates the instance when +// the refCount goes to zero. +// In the current implementation importer interfaces are never deallocated +// but implement this as this might change in the future +// +void DeallocMetadataImporterPluginType(MDImporterType *thisInstance) +{ + CFUUIDRef theFactoryID = thisInstance->factoryID; + + free(thisInstance); + if (theFactoryID){ + CFPlugInRemoveInstanceForFactory(theFactoryID); + CFRelease(theFactoryID); + } +} + +// ----------------------------------------------------------------------------- +// MetadataImporterQueryInterface +// ----------------------------------------------------------------------------- +// Implementation of the IUnknown QueryInterface function. +// +HRESULT MetadataImporterQueryInterface(void *thisInstance, REFIID iid, LPVOID *ppv) +{ + CFUUIDRef interfaceID = CFUUIDCreateFromUUIDBytes(kCFAllocatorDefault, iid); + + if (CFEqual(interfaceID, kMDImporterInterfaceID)) { + /* If the Right interface was requested, bump the ref count, + * set the ppv parameter equal to the instance, and + * return good status. + */ + ((MDImporterType*)thisInstance)->conduitInterface->AddRef(thisInstance); + *ppv = thisInstance; + CFRelease(interfaceID); + return S_OK; + } else if (CFEqual(interfaceID, IUnknownUUID)) { + /* If the IUnknown interface was requested, same as above. */ + ((MDImporterType*)thisInstance )->conduitInterface->AddRef(thisInstance); + *ppv = thisInstance; + CFRelease(interfaceID); + return S_OK; + } else { + /* Requested interface unknown, bail with error. */ + *ppv = NULL; + CFRelease(interfaceID); + return E_NOINTERFACE; + } +} + +// ----------------------------------------------------------------------------- +// MetadataImporterPluginAddRef +// ----------------------------------------------------------------------------- +// Implementation of reference counting for this type. Whenever an interface +// is requested, bump the refCount for the instance. NOTE: returning the +// refcount is a convention but is not required so don't rely on it. +// +ULONG MetadataImporterPluginAddRef(void *thisInstance) +{ + return ++((MDImporterType*) thisInstance)->refCount; +} + +// ----------------------------------------------------------------------------- +// SampleCMPluginRelease +// ----------------------------------------------------------------------------- +// When an interface is released, decrement the refCount. +// If the refCount goes to zero, deallocate the instance. +// +ULONG MetadataImporterPluginRelease(void *thisInstance) +{ + ((MDImporterType*)thisInstance)->refCount -= 1; + if (((MDImporterType*)thisInstance)->refCount == 0){ + DeallocMetadataImporterPluginType((MDImporterType*)thisInstance); + return 0; + }else{ + return ((MDImporterType*) thisInstance )->refCount; + } +} + +// ----------------------------------------------------------------------------- +// Psx_MemcardMDImporterPluginFactory +// ----------------------------------------------------------------------------- +// Implementation of the factory function for this type. +// +void *MetadataImporterPluginFactory(CFAllocatorRef allocator,CFUUIDRef typeID) +{ + MDImporterType *result; + CFUUIDRef uuid; + + /* If correct type is being requested, allocate an + * instance of TestType and return the IUnknown interface. + */ + if (CFEqual(typeID,kMDImporterTypeID)){ + uuid = CFUUIDCreateFromString(kCFAllocatorDefault,CFSTR(PLUGIN_ID)); + result = AllocMetadataImporterPluginType(uuid); + CFRelease(uuid); + return result; + } + /* If the requested type is incorrect, return NULL. */ + return NULL; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Psx-Memcard/Psx-Memcard-Info.plist pcsxr-unstable-1.9.94+svn98108/macosx/Psx-Memcard/Psx-Memcard-Info.plist --- pcsxr-unstable-1.9.94+svn97809/macosx/Psx-Memcard/Psx-Memcard-Info.plist 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Psx-Memcard/Psx-Memcard-Info.plist 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,84 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDocumentTypes + + + CFBundleTypeRole + MDImporter + LSItemContentTypes + + com.codeplex.pcsxr.memcard + + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundleVersion + 1.0 + CFPlugInDynamicRegisterFunction + + CFPlugInDynamicRegistration + + CFPlugInFactories + + E6CB501C-9D5C-4CAF-A9DA-A6940F261514 + MetadataImporterPluginFactory + + CFPlugInTypes + + 8B08C4BF-415B-11D8-B3F9-0003936726FC + + E6CB501C-9D5C-4CAF-A9DA-A6940F261514 + + + CFPlugInUnloadFunction + + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + UTImportedTypeDeclarations + + + UTTypeConformsTo + + public.data + public.content + + UTTypeDescription + PCSXR Memory Card + UTTypeIconFile + pcsxrmemcard + UTTypeIdentifier + com.codeplex.pcsxr.memcard + UTTypeReferenceURL + http://pcsxr.codeplex.com/ + UTTypeTagSpecification + + com.apple.ostype + + Pmcr + + public.filename-extension + + mcr + mc + mem + vgs + mcd + gme + ddf + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Psx-Memcard/Psx-Memcard-Prefix.pch pcsxr-unstable-1.9.94+svn98108/macosx/Psx-Memcard/Psx-Memcard-Prefix.pch --- pcsxr-unstable-1.9.94+svn97809/macosx/Psx-Memcard/Psx-Memcard-Prefix.pch 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Psx-Memcard/Psx-Memcard-Prefix.pch 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,12 @@ +// +// Prefix header +// +// The contents of this file are implicitly included at the beginning of every source file. +// + +#define __private_extern __attribute__((visibility("hidden"))) +#include + +#ifdef __OBJC__ + #import +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Psx-Memcard/schema.xml pcsxr-unstable-1.9.94+svn98108/macosx/Psx-Memcard/schema.xml --- pcsxr-unstable-1.9.94+svn97809/macosx/Psx-Memcard/schema.xml 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Psx-Memcard/schema.xml 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + com_codeplex_pcsxr_memcard_memcount + com_codeplex_pcsxr_memcard_freeblocks + com_codeplex_pcsxr_memcard_savenames + com_codeplex_pcsxr_memcard_memnames + com_codeplex_pcsxr_memcard_memids + + + + com_codeplex_pcsxr_memcard_memcount + com_codeplex_pcsxr_memcard_freeblocks + com_codeplex_pcsxr_memcard_savenames + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Base.lproj/AddPluginSheet.xib pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Base.lproj/AddPluginSheet.xib --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Base.lproj/AddPluginSheet.xib 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Base.lproj/AddPluginSheet.xib 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Base.lproj/CheatWindow.xib pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Base.lproj/CheatWindow.xib --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Base.lproj/CheatWindow.xib 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Base.lproj/CheatWindow.xib 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,394 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NSAllRomanInputSourcesLocaleIdentifier + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Base.lproj/Configuration.xib pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Base.lproj/Configuration.xib --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Base.lproj/Configuration.xib 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Base.lproj/Configuration.xib 2016-06-30 16:53:18.000000000 +0000 @@ -0,0 +1,1336 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Any key pressed at the same time as the GPU Key Modifier will be sent directly to the GPU Plugin. This is useful for plugins with menus. Control (ctrl) is the recommended modifier; command (cmd or apple key) should not be used unless you absolutely want to. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NSNegateBoolean + + + + + + + + + + + + + + + + + + + + + + + + NSNegateBoolean + + + + + + + + + + + + + + + + + + + + title + name + image + showCount + blockSize + + + + + + + + title + name + image + blockSize + showCount + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Base.lproj/PcsxrMemCard.xib pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Base.lproj/PcsxrMemCard.xib --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Base.lproj/PcsxrMemCard.xib 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Base.lproj/PcsxrMemCard.xib 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Base.lproj/PCSXR.xib pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Base.lproj/PCSXR.xib --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Base.lproj/PCSXR.xib 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Base.lproj/PCSXR.xib 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,499 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Gw + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/en.lproj/AddPluginSheet.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/en.lproj/AddPluginSheet.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/en.lproj/AddPluginSheet.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/en.lproj/AddPluginSheet.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,15 @@ + +/* Class = "NSPanel"; title = "Install Plug-in"; ObjectID = "10"; */ +"10.title" = "Install Plug-in"; + +/* Class = "NSTextFieldCell"; title = "Plugin Installation"; ObjectID = "58"; */ +"58.title" = "Plugin Installation"; + +/* Class = "NSTextFieldCell"; title = "Do you want to install this plugin into PCSXR?"; ObjectID = "59"; */ +"59.title" = "Do you want to install this plugin into PCSXR?"; + +/* Class = "NSButtonCell"; title = "Yes"; ObjectID = "113"; */ +"113.title" = "Yes"; + +/* Class = "NSButtonCell"; title = "No"; ObjectID = "117"; */ +"117.title" = "No"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/en.lproj/CheatWindow.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/en.lproj/CheatWindow.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/en.lproj/CheatWindow.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/en.lproj/CheatWindow.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,48 @@ + +/* Class = "NSWindow"; title = "Cheats"; ObjectID = "1"; */ +"1.title" = "Cheats"; + +/* Class = "NSButtonCell"; title = "Save Cheats…"; ObjectID = "5"; */ +"5.title" = "Save Cheats…"; + +/* Class = "NSButtonCell"; title = "Load Cheats…"; ObjectID = "7"; */ +"7.title" = "Load Cheats…"; + +/* Class = "NSTableColumn"; headerCell.title = "Name"; ObjectID = "28"; */ +"28.headerCell.title" = "Name"; + +/* Class = "NSTableColumn"; headerCell.title = "Enabled"; ObjectID = "29"; */ +"29.headerCell.title" = "Enabled"; + +/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "31"; */ +"31.title" = "Text Cell"; + +/* Class = "NSButtonCell"; title = "Clear"; ObjectID = "79"; */ +"79.title" = "Clear"; + +/* Class = "NSButtonCell"; title = "Edit…"; ObjectID = "130"; */ +"130.title" = "Edit…"; + +/* Class = "NSWindow"; title = "Edit Cheat"; ObjectID = "134"; */ +"134.title" = "Edit Cheat"; + +/* Class = "NSTableColumn"; headerCell.title = "Address"; ObjectID = "141"; */ +"141.headerCell.title" = "Address"; + +/* Class = "NSTableColumn"; headerCell.title = "Value"; ObjectID = "142"; */ +"142.headerCell.title" = "Value"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "153"; */ +"153.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "157"; */ +"157.title" = "Cancel"; + +/* Class = "NSButtonCell"; title = "Add"; ObjectID = "207"; */ +"207.title" = "Add"; + +/* Class = "NSButtonCell"; title = "Remove"; ObjectID = "228"; */ +"228.title" = "Remove"; + +/* Class = "NSButtonCell"; title = "Apply"; ObjectID = "257"; */ +"257.title" = "Apply"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/en.lproj/Configuration.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/en.lproj/Configuration.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/en.lproj/Configuration.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/en.lproj/Configuration.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,300 @@ + +/* Class = "NSWindow"; title = "PCSXR Preferences"; ObjectID = "21"; */ +"21.title" = "PCSXR Preferences"; + +/* Class = "NSTabViewItem"; label = "Emulation"; ObjectID = "240"; */ +"240.label" = "Emulation"; + +/* Class = "NSTabViewItem"; label = "Plugins"; ObjectID = "241"; */ +"241.label" = "Plugins"; + +/* Class = "NSBox"; title = "Graphics"; ObjectID = "257"; */ +"257.title" = "Graphics"; + +/* Class = "NSBox"; title = "Sound"; ObjectID = "291"; */ +"291.title" = "Sound"; + +/* Class = "NSBox"; title = "Controller"; ObjectID = "299"; */ +"299.title" = "Controller"; + +/* Class = "NSBox"; title = "CD-ROM"; ObjectID = "302"; */ +"302.title" = "CD-ROM"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "369"; */ +"369.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Graphics Plugin"; ObjectID = "370"; */ +"370.title" = "Graphics Plugin"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "372"; */ +"372.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Sound Plugin"; ObjectID = "373"; */ +"373.title" = "Sound Plugin"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "375"; */ +"375.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Controller Plugin"; ObjectID = "376"; */ +"376.title" = "Controller Plugin"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "378"; */ +"378.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "CDROM Plugin"; ObjectID = "379"; */ +"379.title" = "CDROM Plugin"; + +/* Class = "NSBox"; title = "Options"; ObjectID = "502"; */ +"502.title" = "Options"; + +/* Class = "NSBox"; title = "Game Fixes"; ObjectID = "509"; */ +"509.title" = "Game Fixes"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "When enabled the emulation will be faster, but possibly more unstable"; ObjectID = "516"; */ +"516.ibShadowedToolTip" = "When enabled the emulation will be faster, but possibly more unstable"; + +/* Class = "NSButtonCell"; title = "Dynarec CPU core"; ObjectID = "516"; */ +"516.title" = "Dynarec CPU core"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Disables decoding of CD audio tracks"; ObjectID = "517"; */ +"517.ibShadowedToolTip" = "Disables decoding of CD audio tracks"; + +/* Class = "NSButtonCell"; title = "No CD audio"; ObjectID = "517"; */ +"517.title" = "No CD audio"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Enables the emulator to run without using an actual Playstation BIOS file. The compatibility might also decrease"; ObjectID = "518"; */ +"518.ibShadowedToolTip" = "Enables the emulator to run without using an actual Playstation BIOS file. The compatibility might also decrease"; + +/* Class = "NSButtonCell"; title = "Simulate PSX BIOS"; ObjectID = "518"; */ +"518.title" = "Simulate PSX BIOS"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Disables decoding of streamed XA audio"; ObjectID = "519"; */ +"519.ibShadowedToolTip" = "Disables decoding of streamed XA audio"; + +/* Class = "NSButtonCell"; title = "No XA audio"; ObjectID = "519"; */ +"519.title" = "No XA audio"; + +/* Class = "NSButtonCell"; title = "InuYasha Sengoku Battle"; ObjectID = "539"; */ +"539.title" = "InuYasha Sengoku Battle"; + +/* Class = "NSButtonCell"; title = "Parasite Eve 2, Vandal Hearts 1/2"; ObjectID = "540"; */ +"540.title" = "Parasite Eve 2, Vandal Hearts 1/2"; + +/* Class = "NSBox"; title = "Hacks"; ObjectID = "542"; */ +"542.title" = "Hacks"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "This should generally be disabled, though it might help to enable it if you are having sound problems"; ObjectID = "543"; */ +"543.ibShadowedToolTip" = "This should generally be disabled, though it might help to enable it if you are having sound problems"; + +/* Class = "NSButtonCell"; title = "SPU IRQ always enabled"; ObjectID = "543"; */ +"543.title" = "SPU IRQ always enabled"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "This should generally be disabled, though it might help to enable it if you are having controller problems"; ObjectID = "545"; */ +"545.ibShadowedToolTip" = "This should generally be disabled, though it might help to enable it if you are having controller problems"; + +/* Class = "NSButtonCell"; title = "SIO IRQ always enabled"; ObjectID = "545"; */ +"545.title" = "SIO IRQ always enabled"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "561"; */ +"561.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "System Region"; ObjectID = "562"; */ +"562.title" = "System Region"; + +/* Class = "NSMenuItem"; title = "Autodetect"; ObjectID = "563"; */ +"563.title" = "Autodetect"; + +/* Class = "NSMenuItem"; title = "NTSC (USA/Japan)"; ObjectID = "564"; */ +"564.title" = "NTSC (USA/Japan)"; + +/* Class = "NSMenuItem"; title = "PAL (Europe)"; ObjectID = "566"; */ +"566.title" = "PAL (Europe)"; + +/* Class = "NSTabViewItem"; label = "Memory Cards"; ObjectID = "579"; */ +"579.label" = "Memory Cards"; + +/* Class = "NSButtonCell"; title = "About…"; ObjectID = "599"; */ +"599.title" = "About…"; + +/* Class = "NSButtonCell"; title = "Configure…"; ObjectID = "600"; */ +"600.title" = "Configure…"; + +/* Class = "NSButtonCell"; title = "About…"; ObjectID = "602"; */ +"602.title" = "About…"; + +/* Class = "NSButtonCell"; title = "Configure…"; ObjectID = "603"; */ +"603.title" = "Configure…"; + +/* Class = "NSButtonCell"; title = "Configure…"; ObjectID = "605"; */ +"605.title" = "Configure…"; + +/* Class = "NSButtonCell"; title = "About…"; ObjectID = "606"; */ +"606.title" = "About…"; + +/* Class = "NSButtonCell"; title = "About…"; ObjectID = "608"; */ +"608.title" = "About…"; + +/* Class = "NSButtonCell"; title = "Configure…"; ObjectID = "609"; */ +"609.title" = "Configure…"; + +/* Class = "NSButtonCell"; title = "Switch"; ObjectID = "617"; */ +"617.title" = "Switch"; + +/* Class = "NSButtonCell"; title = "Switch"; ObjectID = "618"; */ +"618.title" = "Switch"; + +/* Class = "NSButtonCell"; title = "Switch"; ObjectID = "619"; */ +"619.title" = "Switch"; + +/* Class = "NSBox"; title = "Network"; ObjectID = "622"; */ +"622.title" = "Network"; + +/* Class = "NSButtonCell"; title = "Configure…"; ObjectID = "626"; */ +"626.title" = "Configure…"; + +/* Class = "NSButtonCell"; title = "About…"; ObjectID = "627"; */ +"627.title" = "About…"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "629"; */ +"629.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Net Plugin"; ObjectID = "630"; */ +"630.title" = "Net Plugin"; + +/* Class = "NSButtonCell"; title = "Enable NetPlay"; ObjectID = "640"; */ +"640.title" = "Enable NetPlay"; + +/* Class = "NSButtonCell"; title = "Widescreen"; ObjectID = "652"; */ +"652.title" = "Widescreen"; + +/* Class = "NSTabViewItem"; label = "Hotkeys"; ObjectID = "655"; */ +"655.label" = "Hotkeys"; + +/* Class = "NSButtonCell"; title = "Fast Forward"; ObjectID = "770"; */ +"770.title" = "Fast Forward"; + +/* Class = "NSTextFieldCell"; placeholderString = "None…"; ObjectID = "772"; */ +"772.placeholderString" = "None…"; + +/* Class = "NSTextFieldCell"; placeholderString = "None…"; ObjectID = "852"; */ +"852.placeholderString" = "None…"; + +/* Class = "NSButtonCell"; title = "Save State"; ObjectID = "853"; */ +"853.title" = "Save State"; + +/* Class = "NSButtonCell"; title = "Load State"; ObjectID = "856"; */ +"856.title" = "Load State"; + +/* Class = "NSButtonCell"; title = "Next State"; ObjectID = "862"; */ +"862.title" = "Next State"; + +/* Class = "NSButtonCell"; title = "Previous State"; ObjectID = "868"; */ +"868.title" = "Previous State"; + +/* Class = "NSTextFieldCell"; placeholderString = "None…"; ObjectID = "871"; */ +"871.placeholderString" = "None…"; + +/* Class = "NSTextFieldCell"; placeholderString = "None…"; ObjectID = "873"; */ +"873.placeholderString" = "None…"; + +/* Class = "NSTextFieldCell"; placeholderString = "None…"; ObjectID = "875"; */ +"875.placeholderString" = "None…"; + +/* Class = "NSBox"; title = "Box"; ObjectID = "884"; */ +"884.title" = "Box"; + +/* Class = "NSTextFieldCell"; title = "GPU Key Modifier"; ObjectID = "886"; */ +"886.title" = "GPU Key Modifier"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "Any key pressed at the same time as the GPU Key Modifier will be sent directly to the GPU Plugin. This is useful for plugins with menus. Control (ctrl) is the recommended modifier; command (cmd or apple key) should not be used unless you absolutely want to."; ObjectID = "887"; */ +"887.ibShadowedToolTip" = "Any key pressed at the same time as the GPU Key Modifier will be sent directly to the GPU Plugin. This is useful for plugins with menus. Control (ctrl) is the recommended modifier; command (cmd or apple key) should not be used unless you absolutely want to."; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "889"; */ +"889.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Control ⌃"; ObjectID = "890"; */ +"890.title" = "Control ⌃"; + +/* Class = "NSMenuItem"; title = "Shift ⇧"; ObjectID = "891"; */ +"891.title" = "Shift ⇧"; + +/* Class = "NSMenuItem"; title = "Command ⌘"; ObjectID = "892"; */ +"892.title" = "Command ⌘"; + +/* Class = "NSMenuItem"; title = "Alt / Option ⌥"; ObjectID = "893"; */ +"893.title" = "Alt / Option ⌥"; + +/* Class = "NSTextFieldCell"; placeholderString = "None…"; ObjectID = "898"; */ +"898.placeholderString" = "None…"; + +/* Class = "NSButtonCell"; title = "Frame Limit"; ObjectID = "899"; */ +"899.title" = "Frame Limit"; + +/* Class = "NSBox"; title = "SIO1"; ObjectID = "902"; */ +"902.title" = "SIO1"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "907"; */ +"907.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Net Plugin"; ObjectID = "908"; */ +"908.title" = "Net Plugin"; + +/* Class = "NSButtonCell"; title = "About…"; ObjectID = "909"; */ +"909.title" = "About…"; + +/* Class = "NSButtonCell"; title = "Configure…"; ObjectID = "910"; */ +"910.title" = "Configure…"; + +/* Class = "NSTextFieldCell"; title = "Label"; ObjectID = "936"; */ +"936.title" = "Label"; + +/* Class = "NSButtonCell"; title = "Change…"; ObjectID = "937"; */ +"937.title" = "Change…"; + +/* Class = "NSButtonCell"; title = "New…"; ObjectID = "938"; */ +"938.title" = "New…"; + +/* Class = "NSTextFieldCell"; title = "Label"; ObjectID = "939"; */ +"939.title" = "Label"; + +/* Class = "NSButtonCell"; title = "Change…"; ObjectID = "940"; */ +"940.title" = "Change…"; + +/* Class = "NSButtonCell"; title = "New…"; ObjectID = "941"; */ +"941.title" = "New…"; + +/* Class = "NSButtonCell"; title = "Delete…"; ObjectID = "942"; */ +"942.title" = "Delete…"; + +/* Class = "NSButtonCell"; title = "Delete…"; ObjectID = "943"; */ +"943.title" = "Delete…"; + +/* Class = "NSButtonCell"; title = "Format…"; ObjectID = "944"; */ +"944.title" = "Format…"; + +/* Class = "NSButtonCell"; title = "Format…"; ObjectID = "945"; */ +"945.title" = "Format…"; + +/* Class = "NSButtonCell"; title = "→"; ObjectID = "952"; */ +"952.title" = "→"; + +/* Class = "NSButtonCell"; title = "←"; ObjectID = "954"; */ +"954.title" = "←"; + +/* Class = "NSBox"; title = "Box"; ObjectID = "965"; */ +"965.title" = "Box"; + +/* Class = "NSTextFieldCell"; title = "English name"; ObjectID = "981"; */ +"981.title" = "English name"; + +/* Class = "NSTextFieldCell"; title = "DELETED"; ObjectID = "983"; */ +"983.title" = "DELETED"; + +/* Class = "NSTextFieldCell"; title = "0"; ObjectID = "1048"; */ +"1048.title" = "0"; + +/* Class = "NSButtonCell"; title = "Logging"; ObjectID = "1278"; */ +"1278.title" = "Logging"; + +/* Class = "NSButtonCell"; title = "Fast boot"; ObjectID = "1279"; */ +"1279.title" = "Fast boot"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/en.lproj/Credits.rtf pcsxr-unstable-1.9.94+svn98108/macosx/Resources/en.lproj/Credits.rtf --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/en.lproj/Credits.rtf 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/en.lproj/Credits.rtf 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,31 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\vieww10800\viewh8400\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural + +\f0\b\fs24 \cf0 Macintosh Port: +\b0 \ + Gil Pedersen\ + C.W. \'93Madd the Sane\'94 Betts\ + Nicolas P\'e9pin-Perreault\ +\ + +\b Icon Design: +\b0 \ + Romain Lafourcade\ +\ + +\b Original Coders: +\b0 \ + Linuzappz\ + Shadow\ + Pete Bernert\ + NoComp\ + Nik3d\ +\ + +\b Macintosh Testing: +\b0 \ + Richard Banister\ + Many others} \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/en.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/en.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/en.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/en.lproj/InfoPlist.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,12 @@ +/* Localized versions of Info.plist keys */ + +CFBundleName = "PCSX-R"; +CFBundleShortVersionString = "PCSX-Reloaded 1.9.95"; +CFBundleGetInfoString = "PlayStation Emulator based on PCSX-df Project."; +NSHumanReadableCopyright = "Copyright © 2003-2005 PCSX Team, Gil Pedersen, Nicolas Pepin-Perreault.\nCopyright © 2009-2014 PCSX-Reloaded Team."; +"Playstation Emulator Plug-in" = "PlayStation Emulator Plug-in"; +"Playstation BIOS Image" = "PlayStation BIOS Image"; +"PCSXR Memory Card" = "PSX Memory Card"; +"PCSXR Freeze State" = "PCSXR Freeze State"; +"Playstation Cheat" = "PCSXR Cheat Codes"; +"PlayStation Disc" = "PSX Image File"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/en.lproj/KeyNames.plist pcsxr-unstable-1.9.94+svn98108/macosx/Resources/en.lproj/KeyNames.plist --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/en.lproj/KeyNames.plist 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/en.lproj/KeyNames.plist 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,204 @@ + + + + + 12 + Q + 13 + W + 14 + E + 15 + R + 17 + T + 16 + Y + 32 + U + 34 + I + 31 + O + 35 + P + 0 + A + 1 + S + 2 + D + 3 + F + 5 + G + 4 + H + 38 + J + 40 + K + 37 + L + 6 + Z + 7 + X + 8 + C + 9 + V + 11 + B + 45 + N + 46 + M + 18 + 1 + 19 + 2 + 20 + 3 + 21 + 4 + 23 + 5 + 22 + 6 + 26 + 7 + 28 + 8 + 25 + 9 + 29 + 0 + 122 + F1 + 120 + F2 + 99 + F3 + 118 + F4 + 96 + F5 + 97 + F6 + 98 + F7 + 100 + F8 + 101 + F9 + 109 + F10 + 103 + F11 + 111 + F12 + 105 + F13 + 107 + F14 + 113 + F15 + 106 + F16 + 64 + F17 + 79 + F18 + 80 + F19 + 50 + ` + 27 + - + 24 + = + 51 + Delete (Backspace) + 48 + Tab + 33 + [ + 30 + ] + 42 + \ + 41 + ; (Semicolon) + 39 + ' (Quote) + 36 + Return + 43 + , (Comma) + 47 + . (Period) + 44 + / + 49 + Space + 114 + Insert + 115 + Home + 119 + End + 116 + Page Up + 121 + Page Down + 117 + Forward Delete + 126 + Up Arrow + 125 + Down Arrow + 123 + Left Arrow + 124 + Right Arrow + 82 + NumPad 0 + 83 + NumPad 1 + 84 + NumPad 2 + 85 + NumPad 3 + 86 + NumPad 4 + 87 + NumPad 5 + 88 + NumPad 6 + 89 + NumPad 7 + 91 + NumPad 8 + 92 + NumPad 9 + 71 + NumPad Clear + 81 + NumPad = + 75 + NumPad / + 67 + NumPad * + 78 + NumPad - + 69 + NumPad + + 65 + NumPad . + 76 + NumPad Enter + 53 + Escape + + diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/en.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/en.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/en.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/en.lproj/Localizable.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,123 @@ +/* + Localizable.strings + Pcsx + + Created by C.W. Betts on 4/23/11. + Copyright 2011 __MyCompanyName__. All rights reserved. +*/ + +//libpcsxrcore strings +"Error Opening CDR Plugin" = "Error Opening CDR Plugin"; +"Error Opening SPU Plugin" = "Error Opening SPU Plugin"; +"Error Opening GPU Plugin" = "Error Opening GPU Plugin"; +"Error Opening PAD1 Plugin" = "Error Opening PAD1 Plugin"; +"Error Opening PAD2 Plugin" = "Error Opening PAD2 Plugin"; +"Error opening SIO1 plugin!" = "Error Opening SIO1 Plugin"; +"Error Closing CDR Plugin" = "Error Closing CDR Plugin"; +"Error Closing SPU Plugin" = "Error Closing SPU Plugin"; +"Error Closing PAD1 Plugin" = "Error Closing PAD1 Plugin"; +"Error Closing PAD2 Plugin" = "Error Closing PAD2 Plugin"; +"Error Closing GPU Plugin" = "Error Closing GPU Plugin"; +"Error closing SIO1 plugin!" = "Error Closing SIO1 Plugin"; +"CDRinit error: %d" = "CDRinit error: %d"; +"GPUinit error: %d" = "GPUinit error: %d"; +"SPUinit error: %d" = "SPUinit error: %d"; +"PAD1init error: %d" = "PAD1init error: %d"; +"PAD2init error: %d" = "PAD2init error: %d"; +"NETinit error: %d" = "NETinit error: %d"; +"SIO1init error: %d!" = "SIO1init error: %d"; +"Could not open BIOS:\"%s\". Enabling HLE Bios!\n" = "Could not open BIOS:\"%s\". Enabling HLE Bios!\n"; +"Error allocating memory!" = "Error allocating memory!"; +"Running PCSXR Version %s (%s).\n" = "Running PCSXR Version %s (%s).\n"; +"No memory card value was specified - creating a default card %s\n" = "No memory card value was specified - creating a default card %s\n"; +"Memory card %s failed to load!\n" = "Memory card %s failed to load!\n"; +"Loading memory card %s\n" = "Loading memory card %s\n"; +"The memory card %s doesn't exist - creating it\n" = "The memory card %s doesn't exist - creating it\n"; +"Track %.2d (%s) - Start %.2d:%.2d:%.2d, Length %.2d:%.2d:%.2d\n" = "Track %.2d (%s) - Start %.2d:%.2d:%.2d, Length %.2d:%.2d:%.2d\n"; +"Loaded CD Image: %s" = "Loaded CD Image: %s"; +"Cheats saved to: %s\n" = "Cheats saved to: %s\n"; +"Cheats loaded from: %s\n" = "Cheats loaded from: %s\n"; +"Error allocating memory" = "Error allocating memory"; +"Unable to start debug server.\n" = "Unable to start debug server.\n"; +"Debugger started.\n" = "Debugger started.\n"; +"Debugger stopped.\n" = "Debugger stopped.\n"; +"CD-ROM Label: %.32s\n" = "CD-ROM Label: %.32s\n"; +"CD-ROM ID: %.9s\n" = "CD-ROM ID: %.9s\n"; +"CD-ROM EXE Name: %.255s\n" = "CD-ROM EXE Name: %.255s\n"; +"Error opening file: %s.\n" = "Error opening file: %s.\n"; +"Unknown CPE opcode %02x at position %08x.\n" = "Unknown CPE opcode %02x at position %08x.\n"; +"\ncould not open: %s\n" = "\ncould not open: %s\n"; +"New Memory Card.mcd" = "New Memory Card File.mcr"; +"Loaded PPF %d.0 patch: %s.\n" = "Loaded PPF %d.0 patch: %s.\n"; + +//Emu Thread +"*PCSXR*: Loaded State" = "*PCSXR*: Loaded State"; +"*PCSXR*: Error Saving State %d" = "*PCSXR*: Error Saving State %d"; +"*PCSXR*: Saved State %d" = "*PCSXR*: Saved State %d"; + +"*PCSXR*: Error Loading State %d" = "*PCSXR*: Error Loading State %d"; +"*PCSXR*: Sio Irq Always Enabled" = "*PCSXR*: Sio Irq Always Enabled"; +"*PCSXR*: Sio Irq Not Always Enabled" = "*PCSXR*: Sio Irq Not Always Enabled"; + + +// Cocoa Code +"Plugin Initialization Failed!" = "Plugin Initialization Failed!"; +"Pcsxr failed to initialize the selected %@ plugin (error=%i).\nThe plugin might not work with your system." = "Pcsxr failed to initialize the selected %1$@ plugin (error=%2$i).\nThe plugin might not work with your system."; +"Error!" = "Error!"; +"Installation Succesfull" = "Installation Succesfull"; +"Installation Failed!" = "Installation Failed!"; +"The installation of the specified plugin was succesfull. In order to use it, please restart the application." = "The installation of the specified plugin was succesfull. In order to use it, please restart the application."; +"The installation of the specified plugin failed. Please try again, or make a manual install." ="The installation of the specified plugin failed. Please try again, or make a manual install."; +"Missing plugins!" = "Missing plugins!"; +"Pcsxr is missing one or more critical plugins. You will need to install these in order to play games." = "Pcsx is missing one or more critical plugins. You will need to install these in order to play games."; +"Missing BIOS!" = "Missing BIOS!"; +"Pcsxr wasn't able to locate any Playstation BIOS ROM files. This means that it will run in BIOS simulation mode which is less stable and compatible than using a real Playstation BIOS.\nIf you have a BIOS available, please copy it to\n%@" = "Pcsxr wasn't able to locate any Playstation BIOS ROM files. This means that it will run in BIOS simulation mode which is less stable and compatible than using a real Playstation BIOS.\nIf you have a BIOS available, please copy it to:\n%@"; + +"Error opening file" = "Error opening file."; +"Unable to open %@: %@" = "Unable to open %1$@: %2$@"; +"PSX Mem moved Desc" = "Memory Cards Moved"; +"Psx Mem Moved" = "The memory card folder has been moved to your \"Documents\" folder\n\nThis message will not show up again."; + +//Memory card management +"Format Card" = "Format Card"; +"Free Size" = "Free Size"; +"Format" = "Format"; +"Formatting a memory card will remove all data on it.\n\nThis cannot be undone." = "Formatting a memory card will remove all data on it.\n\nThis cannot be undone."; +"Delete Block" = "Delete Block"; +"Deleting a block will remove all saved data on that block.\n\nThis cannot be undone." = "Deleting a memory card object will set the blocks to not be readable by the emulator, and may result in the data being overwritten in the future."; +"No Free Space" = "No Free Space"; +"Memory card %d doesn't have %d free consecutive blocks on it. Please remove some blocks on that card to continue" = "Memory card %1$d doesn't have %2$d free consecutive blocks on it. Please remove some blocks on that card to continue."; +"Memory card %i does not have enough free consecutive blocks.\n\nIn order to copy over \"%@,\" memory card %i must be compressed. Compressing memory cards will make deleted blocks unrecoverable.\n\nDo you want to continue?" = "Memory card %1$i does not have enough free consecutive blocks.\n\nIn order to copy over “%2$@,” memory card %3$i must be compressed. Compressing memory cards will make deleted blocks unrecoverable.\n\nDo you want to continue?"; + +//Cheat manager +"Save Cheats" = "Save Cheats"; +"The cheat codes have not been applied. Unapplied cheats will not run nor be saved. Do you wish to save?" = "The cheat codes have not been applied. Unapplied cheats will not run nor be saved. Do you wish to save?"; +"Unsaved Changes" = "Unsaved Changes"; +"(Untitled)" = "(Untitled)"; + +//General buttons +"Okay" = "OK"; +"Cancel" = "Cancel"; +"Yes" = "Yes"; +"No" = "No"; +"Delete" = "Delete"; + +//BIOS file opener +"PlayStation BIOS File" = "PlayStation BIOS File"; +"The file \"%@\" seems to be a BIOS file. Do you want PCSX-R to copy it to the proper location?" = "The file “%1$@\” seems to be a BIOS file. Do you want PCSX-R to copy it to the proper location?"; +"BIOS_Copy" = "Copy"; +"BIOS_Move" = "Move"; +"BIOS Already Exists" = "BIOS Already Exists"; +"There already exists a BIOS file at \"%1$@\": not copying the file at \"%2$@\".\n\nIf you do want to use the BIOS file at \"%2$@\", delete the BIOS at \"%1$@\"." = "There already exists a BIOS file at “%1$@”: not copying the file at “%2$@”.\n\nIf you do want to use the BIOS file at “%2$@”, delete the BIOS at “%1$@”."; +"There already exists a BIOS file at \"%1$@\": not moving the file at \"%2$@\".\n\nIf you do want to use the BIOS file at \"%2$@\", delete the BIOS at \"%1$@\"." = "There already exists a BIOS file at “%1$@”: not moving the file at “%2$@”.\n\nIf you do want to use the BIOS file at “%2$@”, delete the BIOS at “%1$@”."; + +//not-so-general buttons +"Show Folder" = "Show Folder"; + +//Mem card flags +"MemCard_Deleted" = "Deleted"; +"MemCard_Free" = "Free"; +"MemCard_Used" = "Used"; +"MemCard_Link" = "Link"; +"MemCard_EndLink" = "End Link"; +"MemCard_MultiSave" = "Multi-save"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/en.lproj/PcsxrMemCard.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/en.lproj/PcsxrMemCard.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/en.lproj/PcsxrMemCard.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/en.lproj/PcsxrMemCard.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,21 @@ + +/* Class = "NSWindow"; title = "Memory Card"; ObjectID = "5"; */ +"5.title" = "Memory Card"; + +/* Class = "NSTextFieldCell"; title = "Select which memory card slot you want to put this card in."; ObjectID = "100028"; */ +"100028.title" = "Select which memory card slot you want to put this card in."; + +/* Class = "NSTextFieldCell"; title = "Memory Card Selection"; ObjectID = "100029"; */ +"100029.title" = "Memory Card Selection"; + +/* Class = "NSTextFieldCell"; placeholderString = "Mem card file name"; ObjectID = "100035"; */ +"100035.placeholderString" = "Mem card file name"; + +/* Class = "NSButtonCell"; title = "Slot 2"; ObjectID = "100127"; */ +"100127.title" = "Slot 2"; + +/* Class = "NSButtonCell"; title = "Slot 1"; ObjectID = "100131"; */ +"100131.title" = "Slot 1"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "100135"; */ +"100135.title" = "Cancel"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/en.lproj/PCSXR.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/en.lproj/PCSXR.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/en.lproj/PCSXR.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/en.lproj/PCSXR.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,276 @@ + +/* Class = "NSMenuItem"; title = "Bring All to Front"; ObjectID = "5"; */ +"5.title" = "Bring All to Front"; + +/* Class = "NSMenuItem"; title = "Window"; ObjectID = "19"; */ +"19.title" = "Window"; + +/* Class = "NSMenuItem"; title = "Minimize"; ObjectID = "23"; */ +"23.title" = "Minimize"; + +/* Class = "NSMenu"; title = "Window"; ObjectID = "24"; */ +"24.title" = "Window"; + +/* Class = "NSMenu"; title = "PCSXR"; ObjectID = "29"; */ +"29.title" = "PCSXR"; + +/* Class = "NSMenuItem"; title = "PCSXR"; ObjectID = "56"; */ +"56.title" = "PCSXR"; + +/* Class = "NSMenu"; title = "PCSXR"; ObjectID = "57"; */ +"57.title" = "PCSXR"; + +/* Class = "NSMenuItem"; title = "About PCSXR"; ObjectID = "58"; */ +"58.title" = "About PCSXR"; + +/* Class = "NSMenu"; title = "File"; ObjectID = "81"; */ +"81.title" = "File"; + +/* Class = "NSMenuItem"; title = "File"; ObjectID = "83"; */ +"83.title" = "File"; + +/* Class = "NSMenuItem"; title = "Help"; ObjectID = "103"; */ +"103.title" = "Help"; + +/* Class = "NSMenu"; title = "Help"; ObjectID = "106"; */ +"106.title" = "Help"; + +/* Class = "NSMenuItem"; title = "PCSXR Help"; ObjectID = "111"; */ +"111.title" = "PCSXR Help"; + +/* Class = "NSMenuItem"; title = "Preferences..."; ObjectID = "129"; */ +"129.title" = "Preferences…"; + +/* Class = "NSMenu"; title = "Services"; ObjectID = "130"; */ +"130.title" = "Services"; + +/* Class = "NSMenuItem"; title = "Services"; ObjectID = "131"; */ +"131.title" = "Services"; + +/* Class = "NSMenuItem"; title = "Hide PCSXR"; ObjectID = "134"; */ +"134.title" = "Hide PCSXR"; + +/* Class = "NSMenuItem"; title = "Quit PCSXR"; ObjectID = "136"; */ +"136.title" = "Quit PCSXR"; + +/* Class = "NSMenuItem"; title = "Hide Others"; ObjectID = "145"; */ +"145.title" = "Hide Others"; + +/* Class = "NSMenuItem"; title = "Show All"; ObjectID = "150"; */ +"150.title" = "Show All"; + +/* Class = "NSMenuItem"; title = "Reset"; ObjectID = "244"; */ +"244.title" = "Reset"; + +/* Class = "NSMenuItem"; title = "Pause"; ObjectID = "267"; */ +"267.title" = "Pause"; + +/* Class = "NSMenuItem"; title = "Close"; ObjectID = "270"; */ +"270.title" = "Close"; + +/* Class = "NSMenuItem"; title = "Run CD"; ObjectID = "273"; */ +"273.title" = "Run CD"; + +/* Class = "NSMenu"; title = "Freeze State"; ObjectID = "278"; */ +"278.title" = "Freeze State"; + +/* Class = "NSMenuItem"; title = "Freeze State"; ObjectID = "280"; */ +"280.title" = "Freeze State"; + +/* Class = "NSMenuItem"; title = "Slot 0"; ObjectID = "281"; */ +"281.title" = "Slot 0"; + +/* Class = "NSMenuItem"; title = "Defrost State"; ObjectID = "284"; */ +"284.title" = "Defrost State"; + +/* Class = "NSMenu"; title = "Defrost State"; ObjectID = "285"; */ +"285.title" = "Defrost State"; + +/* Class = "NSMenuItem"; title = "Slot 2"; ObjectID = "286"; */ +"286.title" = "Slot 2"; + +/* Class = "NSMenuItem"; title = "Slot 0"; ObjectID = "287"; */ +"287.title" = "Slot 0"; + +/* Class = "NSMenuItem"; title = "Slot 2"; ObjectID = "289"; */ +"289.title" = "Slot 2"; + +/* Class = "NSMenuItem"; title = "Run ISO..."; ObjectID = "290"; */ +"290.title" = "Run ISO…"; + +/* Class = "NSMenuItem"; title = "Slot 3"; ObjectID = "292"; */ +"292.title" = "Slot 3"; + +/* Class = "NSMenuItem"; title = "Slot 3"; ObjectID = "293"; */ +"293.title" = "Slot 3"; + +/* Class = "NSMenuItem"; title = "Fullscreen"; ObjectID = "300"; */ +"300.title" = "Fullscreen"; + +/* Class = "NSMenuItem"; title = "Eject CD"; ObjectID = "303"; */ +"303.title" = "Eject CD"; + +/* Class = "NSMenuItem"; title = "Run BIOS"; ObjectID = "306"; */ +"306.title" = "Run BIOS"; + +/* Class = "NSMenuItem"; title = "Slot 4"; ObjectID = "309"; */ +"309.title" = "Slot 4"; + +/* Class = "NSMenuItem"; title = "Slot 5"; ObjectID = "310"; */ +"310.title" = "Slot 5"; + +/* Class = "NSMenuItem"; title = "Slot 4"; ObjectID = "311"; */ +"311.title" = "Slot 4"; + +/* Class = "NSMenuItem"; title = "Slot 5"; ObjectID = "312"; */ +"312.title" = "Slot 5"; + +/* Class = "NSMenuItem"; title = "Pause When Inactive"; ObjectID = "318"; */ +"318.title" = "Pause When Inactive"; + +/* Class = "NSMenuItem"; title = "Slot 1"; ObjectID = "320"; */ +"320.title" = "Slot 1"; + +/* Class = "NSMenuItem"; title = "Slot 1"; ObjectID = "322"; */ +"322.title" = "Slot 1"; + +/* Class = "NSMenuItem"; title = "Run Recent..."; ObjectID = "329"; */ +"329.title" = "Run Recent…"; + +/* Class = "NSMenu"; title = "Run Recent..."; ObjectID = "330"; */ +"330.title" = "Run Recent…"; + +/* Class = "NSMenuItem"; title = "Clear recent list"; ObjectID = "366"; */ +"366.title" = "Clear Recent List"; + +/* Class = "NSMenuItem"; title = "Cheats"; ObjectID = "371"; */ +"371.title" = "Cheats"; + +/* Class = "NSMenuItem"; title = "Edit"; ObjectID = "385"; */ +"385.title" = "Edit"; + +/* Class = "NSMenu"; title = "Edit"; ObjectID = "386"; */ +"386.title" = "Edit"; + +/* Class = "NSMenuItem"; title = "Undo"; ObjectID = "387"; */ +"387.title" = "Undo"; + +/* Class = "NSMenuItem"; title = "Redo"; ObjectID = "388"; */ +"388.title" = "Redo"; + +/* Class = "NSMenuItem"; title = "Cut"; ObjectID = "390"; */ +"390.title" = "Cut"; + +/* Class = "NSMenuItem"; title = "Copy"; ObjectID = "391"; */ +"391.title" = "Copy"; + +/* Class = "NSMenuItem"; title = "Paste"; ObjectID = "392"; */ +"392.title" = "Paste"; + +/* Class = "NSMenuItem"; title = "Paste and Match Style"; ObjectID = "393"; */ +"393.title" = "Paste and Match Style"; + +/* Class = "NSMenuItem"; title = "Delete"; ObjectID = "394"; */ +"394.title" = "Delete"; + +/* Class = "NSMenuItem"; title = "Select All"; ObjectID = "395"; */ +"395.title" = "Select All"; + +/* Class = "NSMenuItem"; title = "Find"; ObjectID = "397"; */ +"397.title" = "Find"; + +/* Class = "NSMenuItem"; title = "Spelling and Grammar"; ObjectID = "398"; */ +"398.title" = "Spelling and Grammar"; + +/* Class = "NSMenuItem"; title = "Substitutions"; ObjectID = "399"; */ +"399.title" = "Substitutions"; + +/* Class = "NSMenuItem"; title = "Transformations"; ObjectID = "400"; */ +"400.title" = "Transformations"; + +/* Class = "NSMenuItem"; title = "Speech"; ObjectID = "401"; */ +"401.title" = "Speech"; + +/* Class = "NSMenu"; title = "Speech"; ObjectID = "402"; */ +"402.title" = "Speech"; + +/* Class = "NSMenuItem"; title = "Start Speaking"; ObjectID = "403"; */ +"403.title" = "Start Speaking"; + +/* Class = "NSMenuItem"; title = "Stop Speaking"; ObjectID = "404"; */ +"404.title" = "Stop Speaking"; + +/* Class = "NSMenu"; title = "Transformations"; ObjectID = "405"; */ +"405.title" = "Transformations"; + +/* Class = "NSMenuItem"; title = "Make Upper Case"; ObjectID = "406"; */ +"406.title" = "Make Upper Case"; + +/* Class = "NSMenuItem"; title = "Make Lower Case"; ObjectID = "407"; */ +"407.title" = "Make Lower Case"; + +/* Class = "NSMenuItem"; title = "Capitalize"; ObjectID = "408"; */ +"408.title" = "Capitalize"; + +/* Class = "NSMenu"; title = "Substitutions"; ObjectID = "409"; */ +"409.title" = "Substitutions"; + +/* Class = "NSMenuItem"; title = "Show Substitutions"; ObjectID = "410"; */ +"410.title" = "Show Substitutions"; + +/* Class = "NSMenuItem"; title = "Smart Copy/Paste"; ObjectID = "412"; */ +"412.title" = "Smart Copy/Paste"; + +/* Class = "NSMenuItem"; title = "Smart Quotes"; ObjectID = "413"; */ +"413.title" = "Smart Quotes"; + +/* Class = "NSMenuItem"; title = "Smart Dashes"; ObjectID = "414"; */ +"414.title" = "Smart Dashes"; + +/* Class = "NSMenuItem"; title = "Smart Links"; ObjectID = "415"; */ +"415.title" = "Smart Links"; + +/* Class = "NSMenuItem"; title = "Data Detectors"; ObjectID = "416"; */ +"416.title" = "Data Detectors"; + +/* Class = "NSMenuItem"; title = "Text Replacement"; ObjectID = "417"; */ +"417.title" = "Text Replacement"; + +/* Class = "NSMenu"; title = "Spelling"; ObjectID = "418"; */ +"418.title" = "Spelling"; + +/* Class = "NSMenuItem"; title = "Show Spelling and Grammar"; ObjectID = "419"; */ +"419.title" = "Show Spelling and Grammar"; + +/* Class = "NSMenuItem"; title = "Check Document Now"; ObjectID = "420"; */ +"420.title" = "Check Document Now"; + +/* Class = "NSMenuItem"; title = "Check Spelling While Typing"; ObjectID = "422"; */ +"422.title" = "Check Spelling While Typing"; + +/* Class = "NSMenuItem"; title = "Check Grammar With Spelling"; ObjectID = "423"; */ +"423.title" = "Check Grammar With Spelling"; + +/* Class = "NSMenuItem"; title = "Correct Spelling Automatically"; ObjectID = "424"; */ +"424.title" = "Correct Spelling Automatically"; + +/* Class = "NSMenu"; title = "Find"; ObjectID = "425"; */ +"425.title" = "Find"; + +/* Class = "NSMenuItem"; title = "Find…"; ObjectID = "426"; */ +"426.title" = "Find…"; + +/* Class = "NSMenuItem"; title = "Find Next"; ObjectID = "427"; */ +"427.title" = "Find Next"; + +/* Class = "NSMenuItem"; title = "Find Previous"; ObjectID = "428"; */ +"428.title" = "Find Previous"; + +/* Class = "NSMenuItem"; title = "Use Selection for Find"; ObjectID = "429"; */ +"429.title" = "Use Selection for Find"; + +/* Class = "NSMenuItem"; title = "Jump to Selection"; ObjectID = "430"; */ +"430.title" = "Jump to Selection"; + +/* Class = "NSMenuItem"; title = "Find and Replace…"; ObjectID = "456"; */ +"456.title" = "Find and Replace…"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/fr.lproj/AddPluginSheet.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/fr.lproj/AddPluginSheet.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/fr.lproj/AddPluginSheet.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/fr.lproj/AddPluginSheet.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,15 @@ + +/* Class = "NSPanel"; title = "Install Greffon"; ObjectID = "10"; */ +"10.title" = "Install Greffon"; + +/* Class = "NSTextFieldCell"; title = "Plugin Installation"; ObjectID = "58"; */ +"58.title" = "Plugin Installation"; + +/* Class = "NSTextFieldCell"; title = "Do you want to install this plugin into PCSXR?"; ObjectID = "59"; */ +"59.title" = "Do you want to install this plugin into PCSXR?"; + +/* Class = "NSButtonCell"; title = "Oui"; ObjectID = "113"; */ +"113.title" = "Oui"; + +/* Class = "NSButtonCell"; title = "Non"; ObjectID = "117"; */ +"117.title" = "Non"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/fr.lproj/CheatWindow.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/fr.lproj/CheatWindow.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/fr.lproj/CheatWindow.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/fr.lproj/CheatWindow.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,48 @@ + +/* Class = "NSWindow"; title = "Codes de Triche"; ObjectID = "1"; */ +"1.title" = "Codes de Triche"; + +/* Class = "NSButtonCell"; title = "Sauver de triche…"; ObjectID = "5"; */ +"5.title" = "Sauver de triche…"; //fuzzy + +/* Class = "NSButtonCell"; title = "Charger de triche…"; ObjectID = "7"; */ +"7.title" = "Charger de triche…"; //fuzzy + +/* Class = "NSTableColumn"; headerCell.title = "Nom"; ObjectID = "28"; */ +"28.headerCell.title" = "Nom"; + +/* Class = "NSTableColumn"; headerCell.title = "Activé"; ObjectID = "29"; */ +"29.headerCell.title" = "Activé"; + +/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "31"; */ +"31.title" = "Text Cell"; + +/* Class = "NSButtonCell"; title = "Effacer"; ObjectID = "79"; */ +"79.title" = "Effacer"; + +/* Class = "NSButtonCell"; title = "Modifier…"; ObjectID = "130"; */ +"130.title" = "Modifier…"; + +/* Class = "NSWindow"; title = "Modifier un code"; ObjectID = "134"; */ +"134.title" = "Modifier un code"; + +/* Class = "NSTableColumn"; headerCell.title = "Adresse"; ObjectID = "141"; */ +"141.headerCell.title" = "Adresse"; + +/* Class = "NSTableColumn"; headerCell.title = "Valeur"; ObjectID = "142"; */ +"142.headerCell.title" = "Valeur"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "153"; */ +"153.title" = "OK"; + +/* Class = "NSButtonCell"; title = "Annuler"; ObjectID = "157"; */ +"157.title" = "Annuler"; + +/* Class = "NSButtonCell"; title = "Ajouter"; ObjectID = "207"; */ +"207.title" = "Ajouter"; + +/* Class = "NSButtonCell"; title = "Supprimer"; ObjectID = "228"; */ +"228.title" = "Supprimer"; + +/* Class = "NSButtonCell"; title = "Appliquer"; ObjectID = "257"; */ +"257.title" = "Appliquer"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/fr.lproj/Configuration.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/fr.lproj/Configuration.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/fr.lproj/Configuration.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/fr.lproj/Configuration.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,300 @@ + +/* Class = "NSWindow"; title = "PCSXR Preferences"; ObjectID = "21"; */ +"21.title" = "PCSXR Preferences"; + +/* Class = "NSTabViewItem"; label = "Émulation"; ObjectID = "240"; */ +"240.label" = "Émulation"; + +/* Class = "NSTabViewItem"; label = "Greffon"; ObjectID = "241"; */ +"241.label" = "Greffon"; + +/* Class = "NSBox"; title = "Graphismes"; ObjectID = "257"; */ +"257.title" = "Graphismes"; + +/* Class = "NSBox"; title = "Son"; ObjectID = "291"; */ +"291.title" = "Son"; + +/* Class = "NSBox"; title = "Contrôleur"; ObjectID = "299"; */ +"299.title" = "Contrôleur"; + +/* Class = "NSBox"; title = "CD-ROM"; ObjectID = "302"; */ +"302.title" = "CD-ROM"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "369"; */ +"369.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Graphics Plugin"; ObjectID = "370"; */ +"370.title" = "Graphics Plugin"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "372"; */ +"372.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Sound Plugin"; ObjectID = "373"; */ +"373.title" = "Sound Plugin"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "375"; */ +"375.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Controller Plugin"; ObjectID = "376"; */ +"376.title" = "Controller Plugin"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "378"; */ +"378.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "CDROM Plugin"; ObjectID = "379"; */ +"379.title" = "CDROM Plugin"; + +/* Class = "NSBox"; title = "Options"; ObjectID = "502"; */ +"502.title" = "Options"; + +/* Class = "NSBox"; title = "les correctifs de jeu"; ObjectID = "509"; */ +"509.title" = "les correctifs de jeu"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "When enabled the emulation will be faster, but possibly more unstable"; ObjectID = "516"; */ +"516.ibShadowedToolTip" = "When enabled the emulation will be faster, but possibly more unstable"; + +/* Class = "NSButtonCell"; title = "Dynarec CPU core"; ObjectID = "516"; */ +"516.title" = "Dynarec CPU core"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Disables decoding of CD audio tracks"; ObjectID = "517"; */ +"517.ibShadowedToolTip" = "Disables decoding of CD audio tracks"; + +/* Class = "NSButtonCell"; title = "Désactiver CD Audio"; ObjectID = "517"; */ +"517.title" = "Désactiver CD Audio"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Enables the emulator to run without using an actual Playstation BIOS file. The compatibility might also decrease"; ObjectID = "518"; */ +"518.ibShadowedToolTip" = "Enables the emulator to run without using an actual Playstation BIOS file. The compatibility might also decrease"; + +/* Class = "NSButtonCell"; title = "Simuler le BIOS PSX"; ObjectID = "518"; */ +"518.title" = "Simuler le BIOS PSX"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Disables decoding of streamed XA audio"; ObjectID = "519"; */ +"519.ibShadowedToolTip" = "Disables decoding of streamed XA audio"; + +/* Class = "NSButtonCell"; title = "Désativer le décodage XA"; ObjectID = "519"; */ +"519.title" = "Désativer le décodage XA"; + +/* Class = "NSButtonCell"; title = "InuYasha Sengoku Battle"; ObjectID = "539"; */ +"539.title" = "InuYasha Sengoku Battle"; + +/* Class = "NSButtonCell"; title = "Parasite Eve 2, Vandal Hearts 1/2"; ObjectID = "540"; */ +"540.title" = "Parasite Eve 2, Vandal Hearts 1/2"; + +/* Class = "NSBox"; title = "Hacks"; ObjectID = "542"; */ +"542.title" = "Hacks"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "This should generally be disabled, though it might help to enable it if you are having sound problems"; ObjectID = "543"; */ +"543.ibShadowedToolTip" = "This should generally be disabled, though it might help to enable it if you are having sound problems"; + +/* Class = "NSButtonCell"; title = "SPU IRQ toujours activé"; ObjectID = "543"; */ +"543.title" = "SPU IRQ toujours activé"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "This should generally be disabled, though it might help to enable it if you are having controller problems"; ObjectID = "545"; */ +"545.ibShadowedToolTip" = "This should generally be disabled, though it might help to enable it if you are having controller problems"; + +/* Class = "NSButtonCell"; title = "SIO IRQ toujours activé"; ObjectID = "545"; */ +"545.title" = "SIO IRQ toujours activé"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "561"; */ +"561.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Type de système"; ObjectID = "562"; */ +"562.title" = "Type de système"; + +/* Class = "NSMenuItem"; title = "Autodétection"; ObjectID = "563"; */ +"563.title" = "Autodétection"; + +/* Class = "NSMenuItem"; title = "NTSC (USA/Japan)"; ObjectID = "564"; */ +"564.title" = "NTSC (USA/Japan)"; + +/* Class = "NSMenuItem"; title = "PAL (Europe)"; ObjectID = "566"; */ +"566.title" = "PAL (Europe)"; + +/* Class = "NSTabViewItem"; label = "Cartes mémoires"; ObjectID = "579"; */ +"579.label" = "Cartes mémoires"; + +/* Class = "NSButtonCell"; title = "À propos"; ObjectID = "599"; */ +"599.title" = "À propos"; + +/* Class = "NSButtonCell"; title = "Configurer"; ObjectID = "600"; */ +"600.title" = "Configurer"; + +/* Class = "NSButtonCell"; title = "À propos"; ObjectID = "602"; */ +"602.title" = "À propos"; + +/* Class = "NSButtonCell"; title = "Configurer"; ObjectID = "603"; */ +"603.title" = "Configurer"; + +/* Class = "NSButtonCell"; title = "Configurer"; ObjectID = "605"; */ +"605.title" = "Configurer"; + +/* Class = "NSButtonCell"; title = "À propos"; ObjectID = "606"; */ +"606.title" = "À propos"; + +/* Class = "NSButtonCell"; title = "À propos"; ObjectID = "608"; */ +"608.title" = "À propos"; + +/* Class = "NSButtonCell"; title = "Configurer"; ObjectID = "609"; */ +"609.title" = "Configurer"; + +/* Class = "NSButtonCell"; title = "Switch"; ObjectID = "617"; */ +"617.title" = "Switch"; + +/* Class = "NSButtonCell"; title = "Switch"; ObjectID = "618"; */ +"618.title" = "Switch"; + +/* Class = "NSButtonCell"; title = "Switch"; ObjectID = "619"; */ +"619.title" = "Switch"; + +/* Class = "NSBox"; title = "Jeu en réseau"; ObjectID = "622"; */ +"622.title" = "Jeu en réseau"; + +/* Class = "NSButtonCell"; title = "Configurer"; ObjectID = "626"; */ +"626.title" = "Configurer"; + +/* Class = "NSButtonCell"; title = "À propos"; ObjectID = "627"; */ +"627.title" = "À propos"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "629"; */ +"629.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Net Plugin"; ObjectID = "630"; */ +"630.title" = "Net Plugin"; + +/* Class = "NSButtonCell"; title = "Jeu en réseau"; ObjectID = "640"; */ +"640.title" = "Jeu en réseau"; + +/* Class = "NSButtonCell"; title = "Widescreen"; ObjectID = "652"; */ +"652.title" = "Widescreen"; + +/* Class = "NSTabViewItem"; label = "Émulateur"; ObjectID = "655"; */ +"655.label" = "Émulateur"; + +/* Class = "NSButtonCell"; title = "Fast Forward"; ObjectID = "770"; */ +"770.title" = "Fast Forward"; + +/* Class = "NSTextFieldCell"; placeholderString = "Non…"; ObjectID = "772"; */ +"772.placeholderString" = "Non…"; + +/* Class = "NSTextFieldCell"; placeholderString = "Non…"; ObjectID = "852"; */ +"852.placeholderString" = "Non…"; + +/* Class = "NSButtonCell"; title = "Sauver un état"; ObjectID = "853"; */ +"853.title" = "Sauver un état"; + +/* Class = "NSButtonCell"; title = "Charger un état"; ObjectID = "856"; */ +"856.title" = "Charger un état"; + +/* Class = "NSButtonCell"; title = "Next State"; ObjectID = "862"; */ +"862.title" = "Next State"; + +/* Class = "NSButtonCell"; title = "Previous State"; ObjectID = "868"; */ +"868.title" = "Previous State"; + +/* Class = "NSTextFieldCell"; placeholderString = "Non…"; ObjectID = "871"; */ +"871.placeholderString" = "Non…"; + +/* Class = "NSTextFieldCell"; placeholderString = "Non…"; ObjectID = "873"; */ +"873.placeholderString" = "Non…"; + +/* Class = "NSTextFieldCell"; placeholderString = "Non…"; ObjectID = "875"; */ +"875.placeholderString" = "Non…"; + +/* Class = "NSBox"; title = "Box"; ObjectID = "884"; */ +"884.title" = "Box"; + +/* Class = "NSTextFieldCell"; title = "GPU Key Modifier:"; ObjectID = "886"; */ +"886.title" = "GPU Key Modifier:"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "Any key pressed at the same time as the GPU Key Modifier will be sent directly to the GPU Plugin. This is useful for plugins with menus. Control (ctrl) is the recommended modifier; command (cmd or apple key) should not be used unless you absolutely want to."; ObjectID = "887"; */ +"887.ibShadowedToolTip" = "Any key pressed at the same time as the GPU Key Modifier will be sent directly to the GPU Plugin. This is useful for plugins with menus. Control (ctrl) is the recommended modifier; command (cmd or apple key) should not be used unless you absolutely want to."; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "889"; */ +"889.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Control ⌃"; ObjectID = "890"; */ +"890.title" = "Control ⌃"; + +/* Class = "NSMenuItem"; title = "Shift ⇧"; ObjectID = "891"; */ +"891.title" = "Shift ⇧"; + +/* Class = "NSMenuItem"; title = "Command ⌘"; ObjectID = "892"; */ +"892.title" = "Command ⌘"; + +/* Class = "NSMenuItem"; title = "Alt / Option ⌥"; ObjectID = "893"; */ +"893.title" = "Alt / Option ⌥"; + +/* Class = "NSTextFieldCell"; placeholderString = "None…"; ObjectID = "898"; */ +"898.placeholderString" = "None…"; + +/* Class = "NSButtonCell"; title = "Frame Limit"; ObjectID = "899"; */ +"899.title" = "Frame Limit"; + +/* Class = "NSBox"; title = "SIO1"; ObjectID = "902"; */ +"902.title" = "SIO1"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "907"; */ +"907.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Net Plugin"; ObjectID = "908"; */ +"908.title" = "Net Plugin"; + +/* Class = "NSButtonCell"; title = "À propos"; ObjectID = "909"; */ +"909.title" = "À propos"; + +/* Class = "NSButtonCell"; title = "Configurer"; ObjectID = "910"; */ +"910.title" = "Configurer"; + +/* Class = "NSTextFieldCell"; title = "Label"; ObjectID = "936"; */ +"936.title" = "Label"; + +/* Class = "NSButtonCell"; title = "Changer…"; ObjectID = "937"; */ +"937.title" = "Changer…"; + +/* Class = "NSButtonCell"; title = "Nouveau…"; ObjectID = "938"; */ +"938.title" = "Nouveau…"; + +/* Class = "NSTextFieldCell"; title = "Label"; ObjectID = "939"; */ +"939.title" = "Label"; + +/* Class = "NSButtonCell"; title = "Changer…"; ObjectID = "940"; */ +"940.title" = "Changer…"; + +/* Class = "NSButtonCell"; title = "Nouveau…"; ObjectID = "941"; */ +"941.title" = "Nouveau…"; + +/* Class = "NSButtonCell"; title = "Delete…"; ObjectID = "942"; */ +"942.title" = "Delete…"; + +/* Class = "NSButtonCell"; title = "Delete…"; ObjectID = "943"; */ +"943.title" = "Delete…"; + +/* Class = "NSButtonCell"; title = "Formater…"; ObjectID = "944"; */ +"944.title" = "Formater…"; + +/* Class = "NSButtonCell"; title = "Formater…"; ObjectID = "945"; */ +"945.title" = "Formater…"; + +/* Class = "NSButtonCell"; title = "→"; ObjectID = "952"; */ +"952.title" = "→"; + +/* Class = "NSButtonCell"; title = "←"; ObjectID = "954"; */ +"954.title" = "←"; + +/* Class = "NSBox"; title = "Box"; ObjectID = "965"; */ +"965.title" = "Box"; + +/* Class = "NSTextFieldCell"; title = "English name"; ObjectID = "981"; */ +"981.title" = "English name"; + +/* Class = "NSTextFieldCell"; title = "DELETED"; ObjectID = "983"; */ +"983.title" = "DELETED"; + +/* Class = "NSTextFieldCell"; title = "0"; ObjectID = "1048"; */ +"1048.title" = "0"; + +/* Class = "NSButtonCell"; title = "la sortie console"; ObjectID = "1278"; */ +"1278.title" = "la sortie console"; + +/* Class = "NSButtonCell"; title = "Fast boot"; ObjectID = "1279"; */ +"1279.title" = "Fast boot"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/fr.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/fr.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/fr.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/fr.lproj/InfoPlist.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,14 @@ +/* Localized versions of Info.plist keys */ + +//Commented out strings are those that need to be translated + +CFBundleName = "PCSX-R"; +CFBundleShortVersionString = "PCSX-Reloaded 1.9.95"; +//CFBundleGetInfoString = "PlayStation Emulator based on PCSX-df Project."; +//NSHumanReadableCopyright = "Copyright © 2003-2005 PCSX Team, Gil Pedersen, Nicolas Pepin-Perreault.\nCopyright © 2009-2014 PCSX-Reloaded Team."; +"Playstation Emulator Plug-in" = "PlayStation Emulator Greffon"; //Incomplete/mangled translation +//"Playstation BIOS Image" = "PlayStation BIOS Image"; +"PCSXR Memory Card" = "Format de carte mémoire PSX"; +//"PCSXR Freeze State" = "PCSXR Freeze State"; +"Playstation Cheat" = "Codes de triche PCSXR"; +"PlayStation Disc" = "Images de disques PSX"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/fr.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/fr.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/fr.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/fr.lproj/Localizable.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,125 @@ +/* + Localizable.strings + Pcsx + + Created by C.W. Betts on 4/23/11. + Copyright 2011 __MyCompanyName__. All rights reserved. +*/ + +//Commented out strings are those that need to be translated + +//libpcsxrcore strings +"Error Opening CDR Plugin" = "Erreur lors de l'ouverture du greffon CD-ROM !"; +"Error Opening SPU Plugin" = "Erreur lors de l'ouverture du greffon SPU !"; +"Error Opening GPU Plugin" = "Erreur lors de l'ouverture du greffon GPU !"; +"Error Opening PAD1 Plugin" = "Erreur lors de l'ouverture du greffon Contrôleur 1 !"; +"Error Opening PAD2 Plugin" = "Erreur lors de l'ouverture du greffon Contrôleur 2 !"; +"Error opening SIO1 plugin!" = "Erreur lors de l'ouverture du greffon SPU !"; +"Error Closing CDR Plugin" = "Erreur lors de la fermeture du greffon CD-ROM !"; +"Error Closing SPU Plugin" = "Erreur lors de la fermeture du greffon SPU !"; +"Error Closing PAD1 Plugin" = "Erreur lors de la fermeture du greffon Contrôleur 1 !"; +"Error Closing PAD2 Plugin" = "Erreur lors de la fermeture du greffon Contrôleur 2 !"; +"Error Closing GPU Plugin" = "Erreur lors de la fermeture du greffon GPU !"; +"Error closing SIO1 plugin!" = "Erreur lors de la fermeture du greffon SIO1 !"; +"CDRinit error: %d" = "Erreur lors de l'initialisation du greffon CDR : %d"; +"GPUinit error: %d" = "Erreur lors de l'initialisation du greffon GPU : %d"; +"SPUinit error: %d" = "Erreur lors de l'initialisation du greffon SPU : %d"; +"PAD1init error: %d" = "Erreur lors de l'initialisation du greffon PAD1 : %d"; +"PAD2init error: %d" = "Erreur lors de l'initialisation du greffon PAD2 : %d"; +"NETinit error: %d" = "Erreur lors de l'initialisation du greffon NET : %d"; +"SIO1init error: %d!" = "Erreur lors de l'initialisation du greffon SIO1 : %d"; +"Could not open BIOS:\"%s\". Enabling HLE Bios!\n" = "Impossible d'ouvrir le BIOS : \"%s\". Activation du BIOS HLE !\n"; +"Error allocating memory!" = "Érreur d'allocation mémoire"; +"Running PCSXR Version %s (%s).\n" = "Version PCSXR Lancée %s (%s).\n"; +"No memory card value was specified - creating a default card %s\n" = "Pas de carte mémoire spécifiée - création d'une carte mémoire par défaut %s\n"; +"The memory card %s doesn't exist - creating it\n" = "La carte mémoire %s n'existe pas - création de la carte mémoire\n"; +"Memory card %s failed to load!\n" = "Problème lors du chargement de la carte mémoire %s!\n"; +"Loading memory card %s\n" = "Chargement de la carte mémoire %s\n"; +"Track %.2d (%s) - Start %.2d:%.2d:%.2d, Length %.2d:%.2d:%.2d\n" = "Piste %.2d (%s) - Début %.2d:%.2d:%.2d, Durée %.2d:%.2d:%.2d\n"; +"Loaded CD Image: %s" = "Image CD Chargée : %s"; +"Cheats saved to: %s\n" = "Codes sauvegardés dans : %s\n"; +"Cheats loaded from: %s\n" = "Codes chargées à partir de : %s\n"; +"Error allocating memory" = "Érreur d'allocation mémoire"; +"Unable to start debug server.\n" = "Impossible de démarrer le serveur de débuggage.\n"; +"Debugger started.\n" = "Débuggeur lancé.\n"; +"Debugger stopped.\n" = "Débuggeur arrêté.\n"; +"CD-ROM Label: %.32s\n" = "Label CD-ROM : %.32s\n"; +"CD-ROM ID: %.9s\n" = "ID CD-ROM : %.9s\n"; +//"CD-ROM EXE Name: %.255s\n" = "CD-ROM EXE Name: %.255s\n"; +"Error opening file: %s.\n" = "Érreur en ouvrant le fichier %s.\n"; +"Unknown CPE opcode %02x at position %08x.\n" = "Opcode CPE inconnu %02x à la position %08x.\n"; +"\ncould not open: %s\n" = "\nImpossible d'ouvrir le dossier : '%s'\n"; +"New Memory Card.mcd" = "Nouvelle carte mémoire.mcd"; +"Loaded PPF %d.0 patch: %s.\n" = "Patch PPF %d.0 chargé : %s.\n"; + +//Emu Thread +"*PCSXR*: Loaded State" = "*PCSXR*: État chargé %d"; +"*PCSXR*: Error Saving State %d" = "*PCSXR*: Erreur lors de la sauvegarde de l'état %d"; +"*PCSXR*: Saved State %d" = "*PCSXR*: État sauvé %d"; + +//Not used on OS X. +"*PCSXR*: Error Loading State %d" = "*PCSXR*: Erreur lors du chargement de l'état %d"; +"*PCSXR*: Sio Irq Always Enabled" = "*PCSXR*: SIO IRQ toujours activé"; +"*PCSXR*: Sio Irq Not Always Enabled" = "*PCSXR*: SIO IRQ pas toujours activé"; + +// Cocoa Code +"Plugin Initialization Failed!" = "Plugin Initialization Failed!"; +"Pcsxr failed to initialize the selected %@ plugin (error=%i).\nThe plugin might not work with your system." = "Pcsxr failed to initialize the selected %1$@ plugin (error=%2$i).\nThe plugin might not work with your system."; +//"Error!" = "Error!"; +//"Installation Succesfull" = "Installation Succesfull"; +//"Installation Failed!" = "Installation Failed!"; +//"The installation of the specified plugin was succesfull. In order to use it, please restart the application." = "The installation of the specified plugin was succesfull. In order to use it, please restart the application."; +//"The installation of the specified plugin failed. Please try again, or make a manual install." ="The installation of the specified plugin failed. Please try again, or make a manual install."; +//"Missing plugins!" = "Missing plugins!"; +//"Pcsxr is missing one or more critical plugins. You will need to install these in order to play games." = "Pcsx is missing one or more critical plugins. You will need to install these in order to play games."; +//"Missing BIOS!" = "Missing BIOS!"; +//"Pcsxr wasn't able to locate any Playstation BIOS ROM files. This means that it will run in BIOS simulation mode which is less stable and compatible than using a real Playstation BIOS.\nIf you have a BIOS available, please copy it to\n%@" = "Pcsxr wasn't able to locate any Playstation BIOS ROM files. This means that it will run in BIOS simulation mode which is less stable and compatible than using a real Playstation BIOS.\nIf you have a BIOS available, please copy it to:\n%@"; + +"Error opening file" = "Érreur en ouvrant le fichier."; +"Unable to open %@: %@" = "Unable to open %1$@: %2$@"; +//"PSX Mem moved Desc" = "Memory Cards Moved"; +//"Psx Mem Moved" = "The memory card folder has been moved to your \"Documents\" folder\n\nThis message will not show up again."; + +//Memory card management +"Format Card" = "Formater cette carte mémoire ?"; //Trim this down +//"Free Size" = "Free Size"; +//"Format" = "Format"; +//"Formatting a memory card will remove all data on it.\n\nThis cannot be undone." = "Formatting a memory card will remove all data on it.\n\nThis cannot be undone."; +//"Delete Block" = "Delete Block"; +//"Deleting a block will remove all saved data on that block.\n\nThis cannot be undone." = "Deleting a memory card object will set the blocks to not be readable by the emulator, and may result in the data being overwritten in the future."; +"No Free Space" = "Pas d'emplacement libre sur la carte mémoire"; //Trim this down +//"Memory card %d doesn't have %d free consecutive blocks on it. Please remove some blocks on that card to continue" = "Memory card %1$d doesn't have %2$d free consecutive blocks on it. Please remove some blocks on that card to continue."; +//"Memory card %i does not have enough free consecutive blocks.\n\nIn order to copy over \"%@,\" memory card %i must be compressed. Compressing memory cards will make deleted blocks unrecoverable.\n\nDo you want to continue?" = "Memory card %1$i does not have enough free consecutive blocks.\n\nIn order to copy over “%2$@,” memory card %3$i must be compressed. Compressing memory cards will make deleted blocks unrecoverable.\n\nDo you want to continue?"; + +//Cheat manager +//"Save Cheats" = "Save Cheats"; +//"The cheat codes have not been applied. Unapplied cheats will not run nor be saved. Do you wish to save?" = "The cheat codes have not been applied. Unapplied cheats will not run nor be saved. Do you wish to save?"; +//"Unsaved Changes" = "Unsaved Changes"; +"(Untitled)" = "(Sans titre)"; + +//General buttons +"Okay" = "OK"; +"Cancel" = "Annuler"; +"Yes" = "Oui"; +"No" = "Non"; +//"Delete" = "Delete"; + +//not-so-general buttons +//"Show Folder" = "Show Folder"; + +//BIOS file opener +//"PlayStation BIOS File" = "PlayStation BIOS File"; +//"The file \"%@\" seems to be a BIOS file. Do you want PCSX-R to copy it to the proper location?" = "The file “%1$@\” seems to be a BIOS file. Do you want PCSX-R to copy it to the proper location?"; +//"BIOS_Copy" = "Copy"; +//"BIOS_Move" = "Move"; +//"BIOS Already Exists" = "BIOS Already Exists"; +//"There already exists a BIOS file at \"%1$@\": not copying the file at \"%2$@\".\n\nIf you do want to use the BIOS file at \"%2$@\", delete the BIOS at \"%1$@\"." = "There already exists a BIOS file at “%1$@”: not copying the file at “%2$@”.\n\nIf you do want to use the BIOS file at “%2$@”, delete the BIOS at “%1$@”."; +//"There already exists a BIOS file at \"%1$@\": not moving the file at \"%2$@\".\n\nIf you do want to use the BIOS file at \"%2$@\", delete the BIOS at \"%1$@\"." = "There already exists a BIOS file at “%1$@”: not moving the file at “%2$@”.\n\nIf you do want to use the BIOS file at “%2$@”, delete the BIOS at “%1$@”."; + +//Mem card flags +"MemCard_Deleted" = "Supprimé"; +"MemCard_Free" = "Libre"; +"MemCard_Used" = "Utilisé"; +//"MemCard_Link" = "Link"; +//"MemCard_EndLink" = "End Link"; +//"MemCard_MultiSave" = "Multi-save"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/fr.lproj/PcsxrMemCard.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/fr.lproj/PcsxrMemCard.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/fr.lproj/PcsxrMemCard.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/fr.lproj/PcsxrMemCard.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,21 @@ + +/* Class = "NSWindow"; title = "Carte Mémoire"; ObjectID = "5"; */ +"5.title" = "Carte Mémoire"; + +/* Class = "NSTextFieldCell"; title = "Select which memory card slot you want to put this card in."; ObjectID = "100028"; */ +"100028.title" = "Select which memory card slot you want to put this card in."; + +/* Class = "NSTextFieldCell"; title = "Memory Card Selection"; ObjectID = "100029"; */ +"100029.title" = "Memory Card Selection"; + +/* Class = "NSTextFieldCell"; placeholderString = "Mem card file name"; ObjectID = "100035"; */ +"100035.placeholderString" = "Mem card file name"; + +/* Class = "NSButtonCell"; title = "Carte 2"; ObjectID = "100127"; */ +"100127.title" = "Carte 2"; + +/* Class = "NSButtonCell"; title = "Carte 1"; ObjectID = "100131"; */ +"100131.title" = "Carte 1"; + +/* Class = "NSButtonCell"; title = "Annuler"; ObjectID = "100135"; */ +"100135.title" = "Annuler"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/fr.lproj/PCSXR.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/fr.lproj/PCSXR.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/fr.lproj/PCSXR.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/fr.lproj/PCSXR.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,276 @@ + +/* Class = "NSMenuItem"; title = "Bring All to Front"; ObjectID = "5"; */ +"5.title" = "Bring All to Front"; + +/* Class = "NSMenuItem"; title = "Window"; ObjectID = "19"; */ +"19.title" = "Window"; + +/* Class = "NSMenuItem"; title = "Minimize"; ObjectID = "23"; */ +"23.title" = "Minimize"; + +/* Class = "NSMenu"; title = "Window"; ObjectID = "24"; */ +"24.title" = "Window"; + +/* Class = "NSMenu"; title = "PCSXR"; ObjectID = "29"; */ +"29.title" = "PCSXR"; + +/* Class = "NSMenuItem"; title = "PCSXR"; ObjectID = "56"; */ +"56.title" = "PCSXR"; + +/* Class = "NSMenu"; title = "PCSXR"; ObjectID = "57"; */ +"57.title" = "PCSXR"; + +/* Class = "NSMenuItem"; title = "About PCSXR"; ObjectID = "58"; */ +"58.title" = "About PCSXR"; + +/* Class = "NSMenu"; title = "File"; ObjectID = "81"; */ +"81.title" = "File"; + +/* Class = "NSMenuItem"; title = "File"; ObjectID = "83"; */ +"83.title" = "File"; + +/* Class = "NSMenuItem"; title = "Help"; ObjectID = "103"; */ +"103.title" = "Help"; + +/* Class = "NSMenu"; title = "Help"; ObjectID = "106"; */ +"106.title" = "Help"; + +/* Class = "NSMenuItem"; title = "PCSXR Help"; ObjectID = "111"; */ +"111.title" = "PCSXR Help"; + +/* Class = "NSMenuItem"; title = "Preferences..."; ObjectID = "129"; */ +"129.title" = "Préférences…"; + +/* Class = "NSMenu"; title = "Services"; ObjectID = "130"; */ +"130.title" = "Services"; + +/* Class = "NSMenuItem"; title = "Services"; ObjectID = "131"; */ +"131.title" = "Services"; + +/* Class = "NSMenuItem"; title = "Hide PCSXR"; ObjectID = "134"; */ +"134.title" = "Hide PCSXR"; + +/* Class = "NSMenuItem"; title = "Quit PCSXR"; ObjectID = "136"; */ +"136.title" = "Quitter PCSXR"; + +/* Class = "NSMenuItem"; title = "Hide Others"; ObjectID = "145"; */ +"145.title" = "Hide Others"; + +/* Class = "NSMenuItem"; title = "Show All"; ObjectID = "150"; */ +"150.title" = "Show All"; + +/* Class = "NSMenuItem"; title = "Reset"; ObjectID = "244"; */ +"244.title" = "Reset"; + +/* Class = "NSMenuItem"; title = "Pause"; ObjectID = "267"; */ +"267.title" = "Pause"; + +/* Class = "NSMenuItem"; title = "Close"; ObjectID = "270"; */ +"270.title" = "Close"; + +/* Class = "NSMenuItem"; title = "Run CD"; ObjectID = "273"; */ +"273.title" = "Lancer à Partir du CD"; + +/* Class = "NSMenu"; title = "Freeze State"; ObjectID = "278"; */ +"278.title" = "Sauver un État"; + +/* Class = "NSMenuItem"; title = "Freeze State"; ObjectID = "280"; */ +"280.title" = "Sauver un État"; + +/* Class = "NSMenuItem"; title = "Slot 0"; ObjectID = "281"; */ +"281.title" = "Emplacement 0"; + +/* Class = "NSMenuItem"; title = "Defrost State"; ObjectID = "284"; */ +"284.title" = "Charger un État"; + +/* Class = "NSMenu"; title = "Defrost State"; ObjectID = "285"; */ +"285.title" = "Charger un État"; + +/* Class = "NSMenuItem"; title = "Slot 2"; ObjectID = "286"; */ +"286.title" = "Emplacement 2"; + +/* Class = "NSMenuItem"; title = "Slot 0"; ObjectID = "287"; */ +"287.title" = "Emplacement 0"; + +/* Class = "NSMenuItem"; title = "Slot 2"; ObjectID = "289"; */ +"289.title" = "Emplacement 2"; + +/* Class = "NSMenuItem"; title = "Run ISO..."; ObjectID = "290"; */ +"290.title" = "Lancer un ISO…"; + +/* Class = "NSMenuItem"; title = "Slot 3"; ObjectID = "292"; */ +"292.title" = "Emplacement 3"; + +/* Class = "NSMenuItem"; title = "Slot 3"; ObjectID = "293"; */ +"293.title" = "Emplacement 3"; + +/* Class = "NSMenuItem"; title = "Fullscreen"; ObjectID = "300"; */ +"300.title" = "Fullscreen"; + +/* Class = "NSMenuItem"; title = "Eject CD"; ObjectID = "303"; */ +"303.title" = "Lancer à partir du CD"; + +/* Class = "NSMenuItem"; title = "Run BIOS"; ObjectID = "306"; */ +"306.title" = "Lancer le BIOS"; + +/* Class = "NSMenuItem"; title = "Slot 4"; ObjectID = "309"; */ +"309.title" = "Emplacement 4"; + +/* Class = "NSMenuItem"; title = "Slot 5"; ObjectID = "310"; */ +"310.title" = "Emplacement 5"; + +/* Class = "NSMenuItem"; title = "Slot 4"; ObjectID = "311"; */ +"311.title" = "Emplacement 4"; + +/* Class = "NSMenuItem"; title = "Slot 5"; ObjectID = "312"; */ +"312.title" = "Emplacement 5"; + +/* Class = "NSMenuItem"; title = "Pause When Inactive"; ObjectID = "318"; */ +"318.title" = "Pause When Inactive"; + +/* Class = "NSMenuItem"; title = "Slot 1"; ObjectID = "320"; */ +"320.title" = "Emplacement 1"; + +/* Class = "NSMenuItem"; title = "Slot 1"; ObjectID = "322"; */ +"322.title" = "Emplacement 1"; + +/* Class = "NSMenuItem"; title = "Run Recent..."; ObjectID = "329"; */ +"329.title" = "Run Recent…"; + +/* Class = "NSMenu"; title = "Run Recent..."; ObjectID = "330"; */ +"330.title" = "Run Recent…"; + +/* Class = "NSMenuItem"; title = "Clear recent list"; ObjectID = "366"; */ +"366.title" = "Clear recent list"; + +/* Class = "NSMenuItem"; title = "Cheats"; ObjectID = "371"; */ +"371.title" = "Codes de Triche"; + +/* Class = "NSMenuItem"; title = "Edit"; ObjectID = "385"; */ +"385.title" = "Edit"; + +/* Class = "NSMenu"; title = "Edit"; ObjectID = "386"; */ +"386.title" = "Edit"; + +/* Class = "NSMenuItem"; title = "Undo"; ObjectID = "387"; */ +"387.title" = "Undo"; + +/* Class = "NSMenuItem"; title = "Redo"; ObjectID = "388"; */ +"388.title" = "Redo"; + +/* Class = "NSMenuItem"; title = "Cut"; ObjectID = "390"; */ +"390.title" = "Cut"; + +/* Class = "NSMenuItem"; title = "Copy"; ObjectID = "391"; */ +"391.title" = "Copy"; + +/* Class = "NSMenuItem"; title = "Paste"; ObjectID = "392"; */ +"392.title" = "Paste"; + +/* Class = "NSMenuItem"; title = "Paste and Match Style"; ObjectID = "393"; */ +"393.title" = "Paste and Match Style"; + +/* Class = "NSMenuItem"; title = "Delete"; ObjectID = "394"; */ +"394.title" = "Delete"; + +/* Class = "NSMenuItem"; title = "Select All"; ObjectID = "395"; */ +"395.title" = "Select All"; + +/* Class = "NSMenuItem"; title = "Find"; ObjectID = "397"; */ +"397.title" = "Find"; + +/* Class = "NSMenuItem"; title = "Spelling and Grammar"; ObjectID = "398"; */ +"398.title" = "Spelling and Grammar"; + +/* Class = "NSMenuItem"; title = "Substitutions"; ObjectID = "399"; */ +"399.title" = "Substitutions"; + +/* Class = "NSMenuItem"; title = "Transformations"; ObjectID = "400"; */ +"400.title" = "Transformations"; + +/* Class = "NSMenuItem"; title = "Speech"; ObjectID = "401"; */ +"401.title" = "Speech"; + +/* Class = "NSMenu"; title = "Speech"; ObjectID = "402"; */ +"402.title" = "Speech"; + +/* Class = "NSMenuItem"; title = "Start Speaking"; ObjectID = "403"; */ +"403.title" = "Start Speaking"; + +/* Class = "NSMenuItem"; title = "Stop Speaking"; ObjectID = "404"; */ +"404.title" = "Stop Speaking"; + +/* Class = "NSMenu"; title = "Transformations"; ObjectID = "405"; */ +"405.title" = "Transformations"; + +/* Class = "NSMenuItem"; title = "Make Upper Case"; ObjectID = "406"; */ +"406.title" = "Make Upper Case"; + +/* Class = "NSMenuItem"; title = "Make Lower Case"; ObjectID = "407"; */ +"407.title" = "Make Lower Case"; + +/* Class = "NSMenuItem"; title = "Capitalize"; ObjectID = "408"; */ +"408.title" = "Capitalize"; + +/* Class = "NSMenu"; title = "Substitutions"; ObjectID = "409"; */ +"409.title" = "Substitutions"; + +/* Class = "NSMenuItem"; title = "Show Substitutions"; ObjectID = "410"; */ +"410.title" = "Show Substitutions"; + +/* Class = "NSMenuItem"; title = "Smart Copy/Paste"; ObjectID = "412"; */ +"412.title" = "Smart Copy/Paste"; + +/* Class = "NSMenuItem"; title = "Smart Quotes"; ObjectID = "413"; */ +"413.title" = "Smart Quotes"; + +/* Class = "NSMenuItem"; title = "Smart Dashes"; ObjectID = "414"; */ +"414.title" = "Smart Dashes"; + +/* Class = "NSMenuItem"; title = "Smart Links"; ObjectID = "415"; */ +"415.title" = "Smart Links"; + +/* Class = "NSMenuItem"; title = "Data Detectors"; ObjectID = "416"; */ +"416.title" = "Data Detectors"; + +/* Class = "NSMenuItem"; title = "Text Replacement"; ObjectID = "417"; */ +"417.title" = "Text Replacement"; + +/* Class = "NSMenu"; title = "Spelling"; ObjectID = "418"; */ +"418.title" = "Spelling"; + +/* Class = "NSMenuItem"; title = "Show Spelling and Grammar"; ObjectID = "419"; */ +"419.title" = "Show Spelling and Grammar"; + +/* Class = "NSMenuItem"; title = "Check Document Now"; ObjectID = "420"; */ +"420.title" = "Check Document Now"; + +/* Class = "NSMenuItem"; title = "Check Spelling While Typing"; ObjectID = "422"; */ +"422.title" = "Check Spelling While Typing"; + +/* Class = "NSMenuItem"; title = "Check Grammar With Spelling"; ObjectID = "423"; */ +"423.title" = "Check Grammar With Spelling"; + +/* Class = "NSMenuItem"; title = "Correct Spelling Automatically"; ObjectID = "424"; */ +"424.title" = "Correct Spelling Automatically"; + +/* Class = "NSMenu"; title = "Find"; ObjectID = "425"; */ +"425.title" = "Find"; + +/* Class = "NSMenuItem"; title = "Find…"; ObjectID = "426"; */ +"426.title" = "Find…"; + +/* Class = "NSMenuItem"; title = "Find Next"; ObjectID = "427"; */ +"427.title" = "Find Next"; + +/* Class = "NSMenuItem"; title = "Find Previous"; ObjectID = "428"; */ +"428.title" = "Find Previous"; + +/* Class = "NSMenuItem"; title = "Use Selection for Find"; ObjectID = "429"; */ +"429.title" = "Use Selection for Find"; + +/* Class = "NSMenuItem"; title = "Jump to Selection"; ObjectID = "430"; */ +"430.title" = "Jump to Selection"; + +/* Class = "NSMenuItem"; title = "Find and Replace…"; ObjectID = "456"; */ +"456.title" = "Find and Replace…"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/hu.lproj/Configuration.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/hu.lproj/Configuration.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/hu.lproj/Configuration.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/hu.lproj/Configuration.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,300 @@ + +/* Class = "NSWindow"; title = "PCSXR Preferences"; ObjectID = "21"; */ +"21.title" = "PCSXR Preferences"; + +/* Class = "NSTabViewItem"; label = "Emuláció"; ObjectID = "240"; */ +"240.label" = "Emuláció"; + +/* Class = "NSTabViewItem"; label = "Plugins"; ObjectID = "241"; */ +"241.label" = "Plugins"; + +/* Class = "NSBox"; title = "Kép"; ObjectID = "257"; */ +"257.title" = "Kép"; + +/* Class = "NSBox"; title = "Hang"; ObjectID = "291"; */ +"291.title" = "Hang"; + +/* Class = "NSBox"; title = "Irányító"; ObjectID = "299"; */ +"299.title" = "Irányító"; + +/* Class = "NSBox"; title = "CD-ROM"; ObjectID = "302"; */ +"302.title" = "CD-ROM"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "369"; */ +"369.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Graphics Plugin"; ObjectID = "370"; */ +"370.title" = "Graphics Plugin"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "372"; */ +"372.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Sound Plugin"; ObjectID = "373"; */ +"373.title" = "Sound Plugin"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "375"; */ +"375.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Controller Plugin"; ObjectID = "376"; */ +"376.title" = "Controller Plugin"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "378"; */ +"378.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "CDROM Plugin"; ObjectID = "379"; */ +"379.title" = "CDROM Plugin"; + +/* Class = "NSBox"; title = "Options"; ObjectID = "502"; */ +"502.title" = "Options"; + +/* Class = "NSBox"; title = "javítások használata"; ObjectID = "509"; */ +"509.title" = "javítások használata"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "When enabled the emulation will be faster, but possibly more unstable"; ObjectID = "516"; */ +"516.ibShadowedToolTip" = "When enabled the emulation will be faster, but possibly more unstable"; + +/* Class = "NSButtonCell"; title = "Dynarec CPU core"; ObjectID = "516"; */ +"516.title" = "Dynarec CPU core"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Disables decoding of CD audio tracks"; ObjectID = "517"; */ +"517.ibShadowedToolTip" = "Disables decoding of CD audio tracks"; + +/* Class = "NSButtonCell"; title = "CD hang kikapcsolása"; ObjectID = "517"; */ +"517.title" = "CD hang kikapcsolása"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Enables the emulator to run without using an actual Playstation BIOS file. The compatibility might also decrease"; ObjectID = "518"; */ +"518.ibShadowedToolTip" = "Enables the emulator to run without using an actual Playstation BIOS file. The compatibility might also decrease"; + +/* Class = "NSButtonCell"; title = "PSX BIOS szimulálása"; ObjectID = "518"; */ +"518.title" = "PSX BIOS szimulálása"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "Disables decoding of streamed XA audio"; ObjectID = "519"; */ +"519.ibShadowedToolTip" = "Disables decoding of streamed XA audio"; + +/* Class = "NSButtonCell"; title = "XA kódolás kikapcsolása"; ObjectID = "519"; */ +"519.title" = "XA kódolás kikapcsolása"; + +/* Class = "NSButtonCell"; title = "InuYasha Sengoku Battle javítás"; ObjectID = "539"; */ +"539.title" = "InuYasha Sengoku Battle javítás"; + +/* Class = "NSButtonCell"; title = "Parasite Eve 2, Vandal Hearts 1/2 javítás"; ObjectID = "540"; */ +"540.title" = "Parasite Eve 2, Vandal Hearts 1/2 javítás"; + +/* Class = "NSBox"; title = "Hacks"; ObjectID = "542"; */ +"542.title" = "Hacks"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "This should generally be disabled, though it might help to enable it if you are having sound problems"; ObjectID = "543"; */ +"543.ibShadowedToolTip" = "This should generally be disabled, though it might help to enable it if you are having sound problems"; + +/* Class = "NSButtonCell"; title = "Hang IRQ mindig bekacsolva"; ObjectID = "543"; */ +"543.title" = "Hang IRQ mindig bekacsolva"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "This should generally be disabled, though it might help to enable it if you are having controller problems"; ObjectID = "545"; */ +"545.ibShadowedToolTip" = "This should generally be disabled, though it might help to enable it if you are having controller problems"; + +/* Class = "NSButtonCell"; title = "SIO IRQ mindig bekapcsolva"; ObjectID = "545"; */ +"545.title" = "SIO IRQ mindig bekapcsolva"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "561"; */ +"561.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Rendszer Típus"; ObjectID = "562"; */ +"562.title" = "Rendszer Típus"; + +/* Class = "NSMenuItem"; title = "Automatikus Észlelés"; ObjectID = "563"; */ +"563.title" = "Automatikus Észlelés"; + +/* Class = "NSMenuItem"; title = "NTSC (USA/Japan)"; ObjectID = "564"; */ +"564.title" = "NTSC (USA/Japan)"; + +/* Class = "NSMenuItem"; title = "PAL (Europe)"; ObjectID = "566"; */ +"566.title" = "PAL (Europe)"; + +/* Class = "NSTabViewItem"; label = "Memória Kártyák"; ObjectID = "579"; */ +"579.label" = "Memória Kártyák"; + +/* Class = "NSButtonCell"; title = "Névjegy…"; ObjectID = "599"; */ +"599.title" = "Névjegy…"; + +/* Class = "NSButtonCell"; title = "Beállítás…"; ObjectID = "600"; */ +"600.title" = "Beállítás…"; + +/* Class = "NSButtonCell"; title = "Névjegy…"; ObjectID = "602"; */ +"602.title" = "Névjegy…"; + +/* Class = "NSButtonCell"; title = "Beállítás…"; ObjectID = "603"; */ +"603.title" = "Beállítás…"; + +/* Class = "NSButtonCell"; title = "Beállítás…"; ObjectID = "605"; */ +"605.title" = "Beállítás…"; + +/* Class = "NSButtonCell"; title = "Névjegy…"; ObjectID = "606"; */ +"606.title" = "Névjegy…"; + +/* Class = "NSButtonCell"; title = "Névjegy…"; ObjectID = "608"; */ +"608.title" = "Névjegy…"; + +/* Class = "NSButtonCell"; title = "Beállítás…"; ObjectID = "609"; */ +"609.title" = "Beállítás…"; + +/* Class = "NSButtonCell"; title = "Switch"; ObjectID = "617"; */ +"617.title" = "Switch"; + +/* Class = "NSButtonCell"; title = "Switch"; ObjectID = "618"; */ +"618.title" = "Switch"; + +/* Class = "NSButtonCell"; title = "Switch"; ObjectID = "619"; */ +"619.title" = "Switch"; + +/* Class = "NSBox"; title = "Network"; ObjectID = "622"; */ +"622.title" = "Network"; + +/* Class = "NSButtonCell"; title = "Beállítás…"; ObjectID = "626"; */ +"626.title" = "Beállítás…"; + +/* Class = "NSButtonCell"; title = "Névjegy…"; ObjectID = "627"; */ +"627.title" = "Névjegy…"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "629"; */ +"629.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Internetes Játék"; ObjectID = "630"; */ +"630.title" = "Internetes Játék"; + +/* Class = "NSButtonCell"; title = "Enable NetPlay"; ObjectID = "640"; */ +"640.title" = "Enable NetPlay"; + +/* Class = "NSButtonCell"; title = "Widescreen"; ObjectID = "652"; */ +"652.title" = "Widescreen"; + +/* Class = "NSTabViewItem"; label = "Hotkeys"; ObjectID = "655"; */ +"655.label" = "Hotkeys"; + +/* Class = "NSButtonCell"; title = "Fast Forward"; ObjectID = "770"; */ +"770.title" = "Fast Forward"; + +/* Class = "NSTextFieldCell"; placeholderString = "Nincs…"; ObjectID = "772"; */ +"772.placeholderString" = "Nincs…"; + +/* Class = "NSTextFieldCell"; placeholderString = "Nincs…"; ObjectID = "852"; */ +"852.placeholderString" = "Nincs…"; + +/* Class = "NSButtonCell"; title = "Save State"; ObjectID = "853"; */ +"853.title" = "Save State"; + +/* Class = "NSButtonCell"; title = "Load State"; ObjectID = "856"; */ +"856.title" = "Load State"; + +/* Class = "NSButtonCell"; title = "Next State"; ObjectID = "862"; */ +"862.title" = "Next State"; + +/* Class = "NSButtonCell"; title = "Previous State"; ObjectID = "868"; */ +"868.title" = "Previous State"; + +/* Class = "NSTextFieldCell"; placeholderString = "Nincs…"; ObjectID = "871"; */ +"871.placeholderString" = "Nincs…"; + +/* Class = "NSTextFieldCell"; placeholderString = "Nincs…"; ObjectID = "873"; */ +"873.placeholderString" = "Nincs…"; + +/* Class = "NSTextFieldCell"; placeholderString = "Nincs…"; ObjectID = "875"; */ +"875.placeholderString" = "Nincs…"; + +/* Class = "NSBox"; title = "Box"; ObjectID = "884"; */ +"884.title" = "Box"; + +/* Class = "NSTextFieldCell"; title = "GPU Key Modifier"; ObjectID = "886"; */ +"886.title" = "GPU Key Modifier"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "Any key pressed at the same time as the GPU Key Modifier will be sent directly to the GPU Plugin. This is useful for plugins with menus. Control (ctrl) is the recommended modifier; command (cmd or apple key) should not be used unless you absolutely want to."; ObjectID = "887"; */ +"887.ibShadowedToolTip" = "Any key pressed at the same time as the GPU Key Modifier will be sent directly to the GPU Plugin. This is useful for plugins with menus. Control (ctrl) is the recommended modifier; command (cmd or apple key) should not be used unless you absolutely want to."; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "889"; */ +"889.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Control ⌃"; ObjectID = "890"; */ +"890.title" = "Control ⌃"; + +/* Class = "NSMenuItem"; title = "Shift ⇧"; ObjectID = "891"; */ +"891.title" = "Shift ⇧"; + +/* Class = "NSMenuItem"; title = "Command ⌘"; ObjectID = "892"; */ +"892.title" = "Command ⌘"; + +/* Class = "NSMenuItem"; title = "Alt / Option ⌥"; ObjectID = "893"; */ +"893.title" = "Alt / Option ⌥"; + +/* Class = "NSTextFieldCell"; placeholderString = "Nincs…"; ObjectID = "898"; */ +"898.placeholderString" = "Nincs…"; + +/* Class = "NSButtonCell"; title = "Frame Limit"; ObjectID = "899"; */ +"899.title" = "Frame Limit"; + +/* Class = "NSBox"; title = "SIO1"; ObjectID = "902"; */ +"902.title" = "SIO1"; + +/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "907"; */ +"907.title" = "OtherViews"; + +/* Class = "NSMenuItem"; title = "Net Plugin"; ObjectID = "908"; */ +"908.title" = "Net Plugin"; + +/* Class = "NSButtonCell"; title = "Névjegy…"; ObjectID = "909"; */ +"909.title" = "Névjegy…"; + +/* Class = "NSButtonCell"; title = "Beállítás…"; ObjectID = "910"; */ +"910.title" = "Beállítás…"; + +/* Class = "NSTextFieldCell"; title = "Label"; ObjectID = "936"; */ +"936.title" = "Label"; + +/* Class = "NSButtonCell"; title = "Change…"; ObjectID = "937"; */ +"937.title" = "Change…"; + +/* Class = "NSButtonCell"; title = "New…"; ObjectID = "938"; */ +"938.title" = "New…"; + +/* Class = "NSTextFieldCell"; title = "Label"; ObjectID = "939"; */ +"939.title" = "Label"; + +/* Class = "NSButtonCell"; title = "Change…"; ObjectID = "940"; */ +"940.title" = "Change…"; + +/* Class = "NSButtonCell"; title = "New…"; ObjectID = "941"; */ +"941.title" = "New…"; + +/* Class = "NSButtonCell"; title = "Delete…"; ObjectID = "942"; */ +"942.title" = "Delete…"; + +/* Class = "NSButtonCell"; title = "Delete…"; ObjectID = "943"; */ +"943.title" = "Delete…"; + +/* Class = "NSButtonCell"; title = "Format…"; ObjectID = "944"; */ +"944.title" = "Format…"; + +/* Class = "NSButtonCell"; title = "Format…"; ObjectID = "945"; */ +"945.title" = "Format…"; + +/* Class = "NSButtonCell"; title = "→"; ObjectID = "952"; */ +"952.title" = "→"; + +/* Class = "NSButtonCell"; title = "←"; ObjectID = "954"; */ +"954.title" = "←"; + +/* Class = "NSBox"; title = "Box"; ObjectID = "965"; */ +"965.title" = "Box"; + +/* Class = "NSTextFieldCell"; title = "English name"; ObjectID = "981"; */ +"981.title" = "English name"; + +/* Class = "NSTextFieldCell"; title = "DELETED"; ObjectID = "983"; */ +"983.title" = "DELETED"; + +/* Class = "NSTextFieldCell"; title = "0"; ObjectID = "1048"; */ +"1048.title" = "0"; + +/* Class = "NSButtonCell"; title = "Logging"; ObjectID = "1278"; */ +"1278.title" = "Logging"; + +/* Class = "NSButtonCell"; title = "Fast boot"; ObjectID = "1279"; */ +"1279.title" = "Fast boot"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/hu.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/hu.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/hu.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/hu.lproj/InfoPlist.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,14 @@ +/* Localized versions of Info.plist keys */ + +//Commented out strings are those that need to be translated + +CFBundleName = "PCSX-R"; +CFBundleShortVersionString = "PCSX-Reloaded 1.9.95"; +//CFBundleGetInfoString = "PlayStation Emulator based on PCSX-df Project."; +//NSHumanReadableCopyright = "Copyright © 2003-2005 PCSX Team, Gil Pedersen, Nicolas Pepin-Perreault.\nCopyright © 2009-2014 PCSX-Reloaded Team."; +//"Playstation Emulator Plug-in" = "PlayStation Emulator Plug-in"; +//"Playstation BIOS Image" = "PlayStation BIOS Image"; +"PCSXR Memory Card" = "Psx memória kártya formátum"; +//"PCSXR Freeze State" = "PCSXR Freeze State"; +"Playstation Cheat" = "PCSXR csalás kód fájlok"; +"PlayStation Disc" = "PSX képfájlok"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/hu.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/hu.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/hu.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/hu.lproj/Localizable.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,125 @@ +/* + Localizable.strings + Pcsx + + Created by C.W. Betts on 4/23/11. + Copyright 2011 __MyCompanyName__. All rights reserved. +*/ + +//Commented out strings are those that need to be translated + +//libpcsxrcore strings +"Error Opening CDR Plugin" = "Error Opening CDR Plugin"; +"Error Opening SPU Plugin" = "Hiba a hang plugin megnyitáskor"; +"Error Opening GPU Plugin" = "Hiba a kép plugin megnyitáskor"; +"Error Opening PAD1 Plugin" = "Hiba az egyes irányító plugin megnyitásakor"; +"Error Opening PAD2 Plugin" = "Hiba a kettes irányító plugin megnyitásakor"; +"Error opening SIO1 plugin!" = "Hiba a hang plugin megnyitáskor"; +"Error Closing CDR Plugin" = "Hiba a CD-ROM plugin bezárásakor"; +"Error Closing SPU Plugin" = "Hiba a hang plugin bezárásakor"; +//"Error Closing PAD1 Plugin" = "Hiba az egyes irányító plugin bezárásakor"; //Commented-out on the .po file +//"Error Closing PAD2 Plugin" = "Hiba a kettes irányító plugin bezárásakor"; //Commented-out on the .po file +"Error Closing GPU Plugin" = "Hiba a kép plugin bezárásakor"; +"Error closing SIO1 plugin!" = "Hiba a hang plugin bezárásakor"; +"CDRinit error: %d" = "CD-ROM inicializálási hiba: %d"; +"GPUinit error: %d" = "Kép plugin inicializálási hiba: %d"; +"SPUinit error: %d" = "Hang plugin inicializálási hiba: %d"; +"PAD1init error: %d" = "Egyes irányító plugin inicializálási hiba: %d"; +"PAD2init error: %d" = "Kettes irányító plugin inicializálási hiba: %d"; +"NETinit error: %d" = "Internetes plugin inicializálási hiba: %d"; +"SIO1init error: %d!" = "Hang plugin inicializálási hiba: %d"; +"Could not open BIOS:\"%s\". Enabling HLE Bios!\n" = "BIOS nem nyitható meg:\"%s\". HLE Bios használata!\n"; +"Error allocating memory!" = "Memóriafoglalási hiba!"; +"Running PCSXR Version %s (%s).\n" = "PCSXR %s (%s) verzió fut.\n"; +"No memory card value was specified - creating a default card %s\n" = "Nincs megadva memóriakártyához tartozó érték - alapértelmezett kártya létrehozása %s\n"; +"Memory card %s failed to load!\n" = "%s. memóriakártya betöltése sikertelen!\n"; +"Loading memory card %s\n" = "%s. memóriakártya betöltése\n"; +"The memory card %s doesn't exist - creating it\n" = "Nincs %s. memóriakártya - létrehozása folyamatban\n"; +"Track %.2d (%s) - Start %.2d:%.2d:%.2d, Length %.2d:%.2d:%.2d\n" = "Sáv %.2d (%s) - Kezdet %.2d:%.2d:%.2d, Hosszúság %.2d:%.2d:%.2d\n"; +"Loaded CD Image: %s" = "Betöltött CD képfájl: %s"; +"Cheats saved to: %s\n" = "Csalások mentve ide: %s\n"; +"Cheats loaded from: %s\n" = "Csalások betöltve innen: %s\n"; +"Error allocating memory" = "Memóriafoglalási hiba"; +"Unable to start debug server.\n" = "Hibakereső szervert nem lehetett elindítani.\n"; +"Debugger started.\n" = "Hibakereső elindítva.\n"; +"Debugger stopped.\n" = "Hibakereső leállítva.\n"; +"CD-ROM Label: %.32s\n" = "CD-ROM címke: %.32s\n"; +"CD-ROM ID: %.9s\n" = "CD-ROM azonosító: %.9s\n"; +//"CD-ROM EXE Name: %.255s\n" = "CD-ROM címke: %.32s\n"; +"Error opening file: %s.\n" = "Hiba a fájl megnyitása közben: %s.\n"; +"Unknown CPE opcode %02x at position %08x.\n" = "Ismeretlen CPE művelet-kód: %02x ezen a helyen: %08x.\n"; +"\ncould not open: %s\n" = "\nA könyvtár nem nyitható meg: '%s'\n"; +"New Memory Card.mcd" = "Új memória kártya.mcr"; +"Loaded PPF %d.0 patch: %s.\n" = "PPF %d.0 patch betöltve: %s.\n"; + +//Emu Thread +"*PCSXR*: Loaded State" = "*PCSXR*: Betöltött elmentett állás"; +"*PCSXR*: Error Saving State %d" = "*PCSXR*: Hiba az állás mentése közben %d"; +"*PCSXR*: Saved State %d" = "*PCSXR*: Elmentett állás %d"; + +"*PCSXR*: Error Loading State %d" = "*PCSXR*: Hiba a mentett állás betöltése közben %d"; +"*PCSXR*: Sio Irq Always Enabled" = "*PCSXR*: Sio IRQ mindig bekapcsolva"; +"*PCSXR*: Sio Irq Not Always Enabled" = "*PCSXR*: Sio IRQ nincs mindig bekapcsolva"; + + +// Cocoa Code +//"Plugin Initialization Failed!" = "Plugin Initialization Failed!"; +//"Pcsxr failed to initialize the selected %@ plugin (error=%i).\nThe plugin might not work with your system." = "Pcsxr failed to initialize the selected %1$@ plugin (error=%2$i).\nThe plugin might not work with your system."; +//"Error!" = "Error!"; +//"Installation Succesfull" = "Installation Succesfull"; +//"Installation Failed!" = "Installation Failed!"; +//"The installation of the specified plugin was succesfull. In order to use it, please restart the application." = "The installation of the specified plugin was succesfull. In order to use it, please restart the application."; +//"The installation of the specified plugin failed. Please try again, or make a manual install." ="The installation of the specified plugin failed. Please try again, or make a manual install."; +//"Missing plugins!" = "Missing plugins!"; +//"Pcsxr is missing one or more critical plugins. You will need to install these in order to play games." = "Pcsx is missing one or more critical plugins. You will need to install these in order to play games."; +//"Missing BIOS!" = "Missing BIOS!"; +//"Pcsxr wasn't able to locate any Playstation BIOS ROM files. This means that it will run in BIOS simulation mode which is less stable and compatible than using a real Playstation BIOS.\nIf you have a BIOS available, please copy it to\n%@" = "Pcsxr wasn't able to locate any Playstation BIOS ROM files. This means that it will run in BIOS simulation mode which is less stable and compatible than using a real Playstation BIOS.\nIf you have a BIOS available, please copy it to:\n%@"; + +"Error opening file" = "Hiba a fájl megnyitása közben"; +//"Unable to open %@: %@" = "Unable to open %1$@: %2$@"; +//"PSX Mem moved Desc" = "Memory Cards Moved"; +//"Psx Mem Moved" = "The memory card folder has been moved to your \"Documents\" folder\n\nThis message will not show up again."; + +//Memory card management +"Format Card" = "Kártya formázása"; +//"Free Size" = "Free Size"; +"Format" = "Formázod a memória kártyát?"; +"Formatting a memory card will remove all data on it.\n\nThis cannot be undone." = "Ha leformázod a memória kártyát, akkor a kártya üres lesz és minden meglévő adat el fog veszni."; +//"Delete Block" = "Delete Block"; +//"Deleting a block will remove all saved data on that block.\n\nThis cannot be undone." = "Deleting a memory card object will set the blocks to not be readable by the emulator, and may result in the data being overwritten in the future."; +"No Free Space" = "Nincs szabad hely a memória kártyán"; +//"Memory card %d doesn't have %d free consecutive blocks on it. Please remove some blocks on that card to continue" = "Memory card %1$d doesn't have %2$d free consecutive blocks on it. Please remove some blocks on that card to continue."; +//"Memory card %i does not have enough free consecutive blocks.\n\nIn order to copy over \"%@,\" memory card %i must be compressed. Compressing memory cards will make deleted blocks unrecoverable.\n\nDo you want to continue?" = "Memory card %1$i does not have enough free consecutive blocks.\n\nIn order to copy over “%2$@,” memory card %3$i must be compressed. Compressing memory cards will make deleted blocks unrecoverable.\n\nDo you want to continue?"; + +//Cheat manager +//"Save Cheats" = "Save Cheats"; +//"The cheat codes have not been applied. Unapplied cheats will not run nor be saved. Do you wish to save?" = "The cheat codes have not been applied. Unapplied cheats will not run nor be saved. Do you wish to save?"; +//"Unsaved Changes" = "Unsaved Changes"; +"(Untitled)" = "(Cím nélküli)"; + +//General buttons +"Okay" = "Rendben"; +"Cancel" = "Mégsem"; +"Yes" = "Igen"; +"No" = "Nem"; +//"Delete" = "Delete"; + +//not-so-general buttons +//"Show Folder" = "Show Folder"; + +//BIOS file opener +//"PlayStation BIOS File" = "PlayStation BIOS File"; +//"The file \"%@\" seems to be a BIOS file. Do you want PCSX-R to copy it to the proper location?" = "The file “%1$@\” seems to be a BIOS file. Do you want PCSX-R to copy it to the proper location?"; +//"BIOS_Copy" = "Copy"; +//"BIOS_Move" = "Move"; +//"BIOS Already Exists" = "BIOS Already Exists"; +//"There already exists a BIOS file at \"%1$@\": not copying the file at \"%2$@\".\n\nIf you do want to use the BIOS file at \"%2$@\", delete the BIOS at \"%1$@\"." = "There already exists a BIOS file at “%1$@”: not copying the file at “%2$@”.\n\nIf you do want to use the BIOS file at “%2$@”, delete the BIOS at “%1$@”."; +//"There already exists a BIOS file at \"%1$@\": not moving the file at \"%2$@\".\n\nIf you do want to use the BIOS file at \"%2$@\", delete the BIOS at \"%1$@\"." = "There already exists a BIOS file at “%1$@”: not moving the file at “%2$@”.\n\nIf you do want to use the BIOS file at “%2$@”, delete the BIOS at “%1$@”."; + +//Mem card flags +"MemCard_Deleted" = "Törölve"; +"MemCard_Free" = "Üres"; +"MemCard_Used" = "Foglalt"; +//"MemCard_Link" = "Link"; +//"MemCard_EndLink" = "End Link"; +//"MemCard_MultiSave" = "Multi-save"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/hu.lproj/PCSXR.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/hu.lproj/PCSXR.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/hu.lproj/PCSXR.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/hu.lproj/PCSXR.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,276 @@ + +/* Class = "NSMenuItem"; title = "Bring All to Front"; ObjectID = "5"; */ +"5.title" = "Bring All to Front"; + +/* Class = "NSMenuItem"; title = "Window"; ObjectID = "19"; */ +"19.title" = "Window"; + +/* Class = "NSMenuItem"; title = "Minimize"; ObjectID = "23"; */ +"23.title" = "Minimize"; + +/* Class = "NSMenu"; title = "Window"; ObjectID = "24"; */ +"24.title" = "Window"; + +/* Class = "NSMenu"; title = "PCSXR"; ObjectID = "29"; */ +"29.title" = "PCSXR"; + +/* Class = "NSMenuItem"; title = "PCSXR"; ObjectID = "56"; */ +"56.title" = "PCSXR"; + +/* Class = "NSMenu"; title = "PCSXR"; ObjectID = "57"; */ +"57.title" = "PCSXR"; + +/* Class = "NSMenuItem"; title = "About PCSXR"; ObjectID = "58"; */ +"58.title" = "About PCSXR"; + +/* Class = "NSMenu"; title = "File"; ObjectID = "81"; */ +"81.title" = "File"; + +/* Class = "NSMenuItem"; title = "File"; ObjectID = "83"; */ +"83.title" = "File"; + +/* Class = "NSMenuItem"; title = "Help"; ObjectID = "103"; */ +"103.title" = "Help"; + +/* Class = "NSMenu"; title = "Help"; ObjectID = "106"; */ +"106.title" = "Help"; + +/* Class = "NSMenuItem"; title = "PCSXR Help"; ObjectID = "111"; */ +"111.title" = "PCSXR Help"; + +/* Class = "NSMenuItem"; title = "Preferences..."; ObjectID = "129"; */ +"129.title" = "Preferences…"; + +/* Class = "NSMenu"; title = "Services"; ObjectID = "130"; */ +"130.title" = "Services"; + +/* Class = "NSMenuItem"; title = "Services"; ObjectID = "131"; */ +"131.title" = "Services"; + +/* Class = "NSMenuItem"; title = "Hide PCSXR"; ObjectID = "134"; */ +"134.title" = "Hide PCSXR"; + +/* Class = "NSMenuItem"; title = "Quit PCSXR"; ObjectID = "136"; */ +"136.title" = "Quit PCSXR"; + +/* Class = "NSMenuItem"; title = "Hide Others"; ObjectID = "145"; */ +"145.title" = "Hide Others"; + +/* Class = "NSMenuItem"; title = "Show All"; ObjectID = "150"; */ +"150.title" = "Show All"; + +/* Class = "NSMenuItem"; title = "Reset"; ObjectID = "244"; */ +"244.title" = "Reset"; + +/* Class = "NSMenuItem"; title = "Pause"; ObjectID = "267"; */ +"267.title" = "Pause"; + +/* Class = "NSMenuItem"; title = "Close"; ObjectID = "270"; */ +"270.title" = "Close"; + +/* Class = "NSMenuItem"; title = "Run CD"; ObjectID = "273"; */ +"273.title" = "Run CD"; + +/* Class = "NSMenu"; title = "Freeze State"; ObjectID = "278"; */ +"278.title" = "Freeze State"; + +/* Class = "NSMenuItem"; title = "Freeze State"; ObjectID = "280"; */ +"280.title" = "Freeze State"; + +/* Class = "NSMenuItem"; title = "Slot 0"; ObjectID = "281"; */ +"281.title" = "Slot 0"; + +/* Class = "NSMenuItem"; title = "Defrost State"; ObjectID = "284"; */ +"284.title" = "Defrost State"; + +/* Class = "NSMenu"; title = "Defrost State"; ObjectID = "285"; */ +"285.title" = "Defrost State"; + +/* Class = "NSMenuItem"; title = "Slot 2"; ObjectID = "286"; */ +"286.title" = "Slot 2"; + +/* Class = "NSMenuItem"; title = "Slot 0"; ObjectID = "287"; */ +"287.title" = "Slot 0"; + +/* Class = "NSMenuItem"; title = "Slot 2"; ObjectID = "289"; */ +"289.title" = "Slot 2"; + +/* Class = "NSMenuItem"; title = "Run ISO..."; ObjectID = "290"; */ +"290.title" = "Run ISO…"; + +/* Class = "NSMenuItem"; title = "Slot 3"; ObjectID = "292"; */ +"292.title" = "Slot 3"; + +/* Class = "NSMenuItem"; title = "Slot 3"; ObjectID = "293"; */ +"293.title" = "Slot 3"; + +/* Class = "NSMenuItem"; title = "Fullscreen"; ObjectID = "300"; */ +"300.title" = "Fullscreen"; + +/* Class = "NSMenuItem"; title = "Eject CD"; ObjectID = "303"; */ +"303.title" = "Eject CD"; + +/* Class = "NSMenuItem"; title = "Run BIOS"; ObjectID = "306"; */ +"306.title" = "Run BIOS"; + +/* Class = "NSMenuItem"; title = "Slot 4"; ObjectID = "309"; */ +"309.title" = "Slot 4"; + +/* Class = "NSMenuItem"; title = "Slot 5"; ObjectID = "310"; */ +"310.title" = "Slot 5"; + +/* Class = "NSMenuItem"; title = "Slot 4"; ObjectID = "311"; */ +"311.title" = "Slot 4"; + +/* Class = "NSMenuItem"; title = "Slot 5"; ObjectID = "312"; */ +"312.title" = "Slot 5"; + +/* Class = "NSMenuItem"; title = "Pause When Inactive"; ObjectID = "318"; */ +"318.title" = "Pause When Inactive"; + +/* Class = "NSMenuItem"; title = "Slot 1"; ObjectID = "320"; */ +"320.title" = "Slot 1"; + +/* Class = "NSMenuItem"; title = "Slot 1"; ObjectID = "322"; */ +"322.title" = "Slot 1"; + +/* Class = "NSMenuItem"; title = "Run Recent..."; ObjectID = "329"; */ +"329.title" = "Run Recent…"; + +/* Class = "NSMenu"; title = "Run Recent..."; ObjectID = "330"; */ +"330.title" = "Run Recent…"; + +/* Class = "NSMenuItem"; title = "Clear recent list"; ObjectID = "366"; */ +"366.title" = "Clear recent list"; + +/* Class = "NSMenuItem"; title = "Cheats"; ObjectID = "371"; */ +"371.title" = "Cheats"; + +/* Class = "NSMenuItem"; title = "Edit"; ObjectID = "385"; */ +"385.title" = "Edit"; + +/* Class = "NSMenu"; title = "Edit"; ObjectID = "386"; */ +"386.title" = "Edit"; + +/* Class = "NSMenuItem"; title = "Undo"; ObjectID = "387"; */ +"387.title" = "Undo"; + +/* Class = "NSMenuItem"; title = "Redo"; ObjectID = "388"; */ +"388.title" = "Redo"; + +/* Class = "NSMenuItem"; title = "Cut"; ObjectID = "390"; */ +"390.title" = "Cut"; + +/* Class = "NSMenuItem"; title = "Copy"; ObjectID = "391"; */ +"391.title" = "Copy"; + +/* Class = "NSMenuItem"; title = "Paste"; ObjectID = "392"; */ +"392.title" = "Paste"; + +/* Class = "NSMenuItem"; title = "Paste and Match Style"; ObjectID = "393"; */ +"393.title" = "Paste and Match Style"; + +/* Class = "NSMenuItem"; title = "Delete"; ObjectID = "394"; */ +"394.title" = "Delete"; + +/* Class = "NSMenuItem"; title = "Select All"; ObjectID = "395"; */ +"395.title" = "Select All"; + +/* Class = "NSMenuItem"; title = "Find"; ObjectID = "397"; */ +"397.title" = "Find"; + +/* Class = "NSMenuItem"; title = "Spelling and Grammar"; ObjectID = "398"; */ +"398.title" = "Spelling and Grammar"; + +/* Class = "NSMenuItem"; title = "Substitutions"; ObjectID = "399"; */ +"399.title" = "Substitutions"; + +/* Class = "NSMenuItem"; title = "Transformations"; ObjectID = "400"; */ +"400.title" = "Transformations"; + +/* Class = "NSMenuItem"; title = "Speech"; ObjectID = "401"; */ +"401.title" = "Speech"; + +/* Class = "NSMenu"; title = "Speech"; ObjectID = "402"; */ +"402.title" = "Speech"; + +/* Class = "NSMenuItem"; title = "Start Speaking"; ObjectID = "403"; */ +"403.title" = "Start Speaking"; + +/* Class = "NSMenuItem"; title = "Stop Speaking"; ObjectID = "404"; */ +"404.title" = "Stop Speaking"; + +/* Class = "NSMenu"; title = "Transformations"; ObjectID = "405"; */ +"405.title" = "Transformations"; + +/* Class = "NSMenuItem"; title = "Make Upper Case"; ObjectID = "406"; */ +"406.title" = "Make Upper Case"; + +/* Class = "NSMenuItem"; title = "Make Lower Case"; ObjectID = "407"; */ +"407.title" = "Make Lower Case"; + +/* Class = "NSMenuItem"; title = "Capitalize"; ObjectID = "408"; */ +"408.title" = "Capitalize"; + +/* Class = "NSMenu"; title = "Substitutions"; ObjectID = "409"; */ +"409.title" = "Substitutions"; + +/* Class = "NSMenuItem"; title = "Show Substitutions"; ObjectID = "410"; */ +"410.title" = "Show Substitutions"; + +/* Class = "NSMenuItem"; title = "Smart Copy/Paste"; ObjectID = "412"; */ +"412.title" = "Smart Copy/Paste"; + +/* Class = "NSMenuItem"; title = "Smart Quotes"; ObjectID = "413"; */ +"413.title" = "Smart Quotes"; + +/* Class = "NSMenuItem"; title = "Smart Dashes"; ObjectID = "414"; */ +"414.title" = "Smart Dashes"; + +/* Class = "NSMenuItem"; title = "Smart Links"; ObjectID = "415"; */ +"415.title" = "Smart Links"; + +/* Class = "NSMenuItem"; title = "Data Detectors"; ObjectID = "416"; */ +"416.title" = "Data Detectors"; + +/* Class = "NSMenuItem"; title = "Text Replacement"; ObjectID = "417"; */ +"417.title" = "Text Replacement"; + +/* Class = "NSMenu"; title = "Spelling"; ObjectID = "418"; */ +"418.title" = "Spelling"; + +/* Class = "NSMenuItem"; title = "Show Spelling and Grammar"; ObjectID = "419"; */ +"419.title" = "Show Spelling and Grammar"; + +/* Class = "NSMenuItem"; title = "Check Document Now"; ObjectID = "420"; */ +"420.title" = "Check Document Now"; + +/* Class = "NSMenuItem"; title = "Check Spelling While Typing"; ObjectID = "422"; */ +"422.title" = "Check Spelling While Typing"; + +/* Class = "NSMenuItem"; title = "Check Grammar With Spelling"; ObjectID = "423"; */ +"423.title" = "Check Grammar With Spelling"; + +/* Class = "NSMenuItem"; title = "Correct Spelling Automatically"; ObjectID = "424"; */ +"424.title" = "Correct Spelling Automatically"; + +/* Class = "NSMenu"; title = "Find"; ObjectID = "425"; */ +"425.title" = "Find"; + +/* Class = "NSMenuItem"; title = "Find…"; ObjectID = "426"; */ +"426.title" = "Find…"; + +/* Class = "NSMenuItem"; title = "Find Next"; ObjectID = "427"; */ +"427.title" = "Find Next"; + +/* Class = "NSMenuItem"; title = "Find Previous"; ObjectID = "428"; */ +"428.title" = "Find Previous"; + +/* Class = "NSMenuItem"; title = "Use Selection for Find"; ObjectID = "429"; */ +"429.title" = "Use Selection for Find"; + +/* Class = "NSMenuItem"; title = "Jump to Selection"; ObjectID = "430"; */ +"430.title" = "Jump to Selection"; + +/* Class = "NSMenuItem"; title = "Find and Replace…"; ObjectID = "456"; */ +"456.title" = "Find and Replace…"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/it.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/it.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/it.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/it.lproj/InfoPlist.strings 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,14 @@ +/* Localized versions of Info.plist keys */ + +//Commented out strings are those that need to be translated + +CFBundleName = "PCSX-R"; +CFBundleShortVersionString = "PCSX-Reloaded 1.9.95"; +//CFBundleGetInfoString = "PlayStation Emulator based on PCSX-df Project."; +//NSHumanReadableCopyright = "Copyright © 2003-2005 PCSX Team, Gil Pedersen, Nicolas Pepin-Perreault.\nCopyright © 2009-2014 PCSX-Reloaded Team."; +//"Playstation Emulator Plug-in" = "PlayStation Emulator Plug-in"; +//"Playstation BIOS Image" = "PlayStation BIOS Image"; +"PCSXR Memory Card" = "Formato memory card della psx"; +//"PCSXR Freeze State" = "PCSXR Freeze State"; +"Playstation Cheat" = "File cheat di PCSXR"; +"PlayStation Disc" = "File immagine PSX"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/ko-KR.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/ko-KR.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/ko-KR.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/ko-KR.lproj/InfoPlist.strings 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,14 @@ +/* Localized versions of Info.plist keys */ + +//Commented out strings are those that need to be translated + +CFBundleName = "PCSX-R"; +CFBundleShortVersionString = "PCSX-Reloaded 1.9.95"; +//CFBundleGetInfoString = "PlayStation Emulator based on PCSX-df Project."; +//NSHumanReadableCopyright = "Copyright © 2003-2005 PCSX Team, Gil Pedersen, Nicolas Pepin-Perreault.\nCopyright © 2009-2014 PCSX-Reloaded Team."; +//"Playstation Emulator Plug-in" = "PlayStation Emulator Plug-in"; +//"Playstation BIOS Image" = "PlayStation BIOS Image"; +"PCSXR Memory Card" = "Psx 메모리카드"; +//"PCSXR Freeze State" = "PCSXR Freeze State"; +"Playstation Cheat" = "PCSXR 치트코드 파일"; +"PlayStation Disc" = "PSX 이미지 파일"; Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/PCSXR.appiconset/128.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/PCSXR.appiconset/128.png differ diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/PCSXR.appiconset/Contents.json pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/PCSXR.appiconset/Contents.json --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/PCSXR.appiconset/Contents.json 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/PCSXR.appiconset/Contents.json 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,61 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "icon_16x16.png", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "icon_32x32.png", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "128.png", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/PCSXR.appiconset/icon_16x16.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/PCSXR.appiconset/icon_16x16.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/PCSXR.appiconset/icon_32x32.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/PCSXR.appiconset/icon_32x32.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/pcsxrfreeze.iconset/icon_128x128.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/pcsxrfreeze.iconset/icon_128x128.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/pcsxrfreeze.iconset/icon_16x16.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/pcsxrfreeze.iconset/icon_16x16.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/pcsxrfreeze.iconset/icon_32x32.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/pcsxrfreeze.iconset/icon_32x32.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/pcsxrmemcard.iconset/icon_128x128.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/pcsxrmemcard.iconset/icon_128x128.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/pcsxrmemcard.iconset/icon_16x16.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/pcsxrmemcard.iconset/icon_16x16.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/pcsxrmemcard.iconset/icon_32x32.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/pcsxrmemcard.iconset/icon_32x32.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/psxbios.iconset/icon_128x128.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/psxbios.iconset/icon_128x128.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/psxbios.iconset/icon_16x16.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/psxbios.iconset/icon_16x16.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/psxbios.iconset/icon_32x32.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/psxbios.iconset/icon_32x32.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_128x128@2x.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_128x128@2x.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_128x128.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_128x128.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_16x16@2x.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_16x16@2x.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_16x16.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_16x16.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_256x256@2x.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_256x256@2x.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_256x256.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_256x256.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_32x32@2x.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_32x32@2x.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_32x32.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_32x32.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_512x512@2x.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_512x512@2x.png differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_512x512.png and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/macosx/Resources/Media.xcassets/psxplugin.iconset/icon_512x512.png differ diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/pt-BR.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/pt-BR.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/pt-BR.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/pt-BR.lproj/InfoPlist.strings 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,14 @@ +/* Localized versions of Info.plist keys */ + +//Commented out strings are those that need to be translated + +CFBundleName = "PCSX-R"; +CFBundleShortVersionString = "PCSX-Reloaded 1.9.95"; +//CFBundleGetInfoString = "PlayStation Emulator based on PCSX-df Project."; +//NSHumanReadableCopyright = "Copyright © 2003-2005 PCSX Team, Gil Pedersen, Nicolas Pepin-Perreault.\nCopyright © 2009-2014 PCSX-Reloaded Team."; +//"Playstation Emulator Plug-in" = "PlayStation Emulator Plug-in"; +//"Playstation BIOS Image" = "PlayStation BIOS Image"; +"PCSXR Memory Card" = "Qualquer formato"; +//"PCSXR Freeze State" = "PCSXR Freeze State"; +"Playstation Cheat" = "Arquivos de trapaça do PCSXR"; +"PlayStation Disc" = "Arquivo de imagens de CD de PSX"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/ru.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/ru.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/ru.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/ru.lproj/InfoPlist.strings 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,14 @@ +/* Localized versions of Info.plist keys */ + +//Commented out strings are those that need to be translated + +CFBundleName = "PCSX-R"; +CFBundleShortVersionString = "PCSX-Reloaded 1.9.95"; +//CFBundleGetInfoString = "PlayStation Emulator based on PCSX-df Project."; +//NSHumanReadableCopyright = "Copyright © 2003-2005 PCSX Team, Gil Pedersen, Nicolas Pepin-Perreault.\nCopyright © 2009-2014 PCSX-Reloaded Team."; +//"Playstation Emulator Plug-in" = "PlayStation Emulator Plug-in"; +//"Playstation BIOS Image" = "PlayStation BIOS Image"; +"PCSXR Memory Card" = "Форматы карт памяти psx"; +//"PCSXR Freeze State" = "PCSXR Freeze State"; +"Playstation Cheat" = "Файлы читов PCSXR"; +"PlayStation Disc" = "Образы PSX дисков"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/zh-Hans.lproj/AddPluginSheet.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/zh-Hans.lproj/AddPluginSheet.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/zh-Hans.lproj/AddPluginSheet.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/zh-Hans.lproj/AddPluginSheet.strings 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,15 @@ + +/* Class = "NSPanel"; title = "插件安装"; ObjectID = "10"; */ +"10.title" = "插件安装"; + +/* Class = "NSTextFieldCell"; title = "插件安装"; ObjectID = "58"; */ +"58.title" = "插件安装"; + +/* Class = "NSTextFieldCell"; title = "你想安装这个插件到PCSXR吗?"; ObjectID = "59"; */ +"59.title" = "你想安装这个插件到PCSXR吗?"; + +/* Class = "NSButtonCell"; title = "确定"; ObjectID = "113"; */ +"113.title" = "确定"; + +/* Class = "NSButtonCell"; title = "取消"; ObjectID = "117"; */ +"117.title" = "取消"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/zh-Hans.lproj/CheatWindow.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/zh-Hans.lproj/CheatWindow.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/zh-Hans.lproj/CheatWindow.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/zh-Hans.lproj/CheatWindow.strings 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,48 @@ + +/* Class = "NSWindow"; title = "金手指"; ObjectID = "1"; */ +"1.title" = "金手指"; + +/* Class = "NSButtonCell"; title = "存储金手指..."; ObjectID = "5"; */ +"5.title" = "存储金手指…"; + +/* Class = "NSButtonCell"; title = "载入金手指..."; ObjectID = "7"; */ +"7.title" = "载入金手指…"; + +/* Class = "NSTableColumn"; headerCell.title = "名称"; ObjectID = "28"; */ +"28.headerCell.title" = "名称"; + +/* Class = "NSTableColumn"; headerCell.title = "启用"; ObjectID = "29"; */ +"29.headerCell.title" = "启用"; + +/* Class = "NSTextFieldCell"; title = "文本框"; ObjectID = "31"; */ +"31.title" = "文本框"; + +/* Class = "NSButtonCell"; title = "清除"; ObjectID = "79"; */ +"79.title" = "清除"; + +/* Class = "NSButtonCell"; title = "编辑…"; ObjectID = "130"; */ +"130.title" = "编辑…"; + +/* Class = "NSWindow"; title = "编辑金手指"; ObjectID = "134"; */ +"134.title" = "编辑金手指"; + +/* Class = "NSTableColumn"; headerCell.title = "地址"; ObjectID = "141"; */ +"141.headerCell.title" = "地址"; + +/* Class = "NSTableColumn"; headerCell.title = "数值"; ObjectID = "142"; */ +"142.headerCell.title" = "数值"; + +/* Class = "NSButtonCell"; title = "确认"; ObjectID = "153"; */ +"153.title" = "确认"; + +/* Class = "NSButtonCell"; title = "取消"; ObjectID = "157"; */ +"157.title" = "取消"; + +/* Class = "NSButtonCell"; title = "添加"; ObjectID = "207"; */ +"207.title" = "添加"; + +/* Class = "NSButtonCell"; title = "移除"; ObjectID = "228"; */ +"228.title" = "移除"; + +/* Class = "NSButtonCell"; title = "应用"; ObjectID = "257"; */ +"257.title" = "应用"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/zh-Hans.lproj/Configuration.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/zh-Hans.lproj/Configuration.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/zh-Hans.lproj/Configuration.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/zh-Hans.lproj/Configuration.strings 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,300 @@ + +/* Class = "NSWindow"; title = "PCSXR 偏好设置"; ObjectID = "21"; */ +"21.title" = "PCSXR 偏好设置"; + +/* Class = "NSTabViewItem"; label = "模拟"; ObjectID = "240"; */ +"240.label" = "模拟"; + +/* Class = "NSTabViewItem"; label = "插件"; ObjectID = "241"; */ +"241.label" = "插件"; + +/* Class = "NSBox"; title = "图像"; ObjectID = "257"; */ +"257.title" = "图像"; + +/* Class = "NSBox"; title = "声音"; ObjectID = "291"; */ +"291.title" = "声音"; + +/* Class = "NSBox"; title = "手柄"; ObjectID = "299"; */ +"299.title" = "手柄"; + +/* Class = "NSBox"; title = "光驱"; ObjectID = "302"; */ +"302.title" = "光驱"; + +/* Class = "NSMenu"; title = "查看其他"; ObjectID = "369"; */ +"369.title" = "查看其他"; + +/* Class = "NSMenuItem"; title = "图像插件"; ObjectID = "370"; */ +"370.title" = "图像插件"; + +/* Class = "NSMenu"; title = "查看其他"; ObjectID = "372"; */ +"372.title" = "查看其他"; + +/* Class = "NSMenuItem"; title = "声音插件"; ObjectID = "373"; */ +"373.title" = "声音插件"; + +/* Class = "NSMenu"; title = "查看其他"; ObjectID = "375"; */ +"375.title" = "查看其他"; + +/* Class = "NSMenuItem"; title = "手柄插件"; ObjectID = "376"; */ +"376.title" = "手柄插件"; + +/* Class = "NSMenu"; title = "查看其他"; ObjectID = "378"; */ +"378.title" = "查看其他"; + +/* Class = "NSMenuItem"; title = "光驱插件"; ObjectID = "379"; */ +"379.title" = "光驱插件"; + +/* Class = "NSBox"; title = "选项"; ObjectID = "502"; */ +"502.title" = "选项"; + +/* Class = "NSBox"; title = "游戏修正"; ObjectID = "509"; */ +"509.title" = "游戏修正"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "启用后模拟速度更快,但有可能不稳定."; ObjectID = "516"; */ +"516.ibShadowedToolTip" = "启用后模拟速度更快,但有可能不稳定."; + +/* Class = "NSButtonCell"; title = "Dynarec CPU 核心"; ObjectID = "516"; */ +"516.title" = "Dynarec CPU 核心"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "关闭CD音轨解码"; ObjectID = "517"; */ +"517.ibShadowedToolTip" = "关闭CD音轨解码"; + +/* Class = "NSButtonCell"; title = "关闭CD音频"; ObjectID = "517"; */ +"517.title" = "关闭CD音频"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "启用后模拟器将超过真实的Playstation BIOS文件,但是兼容性可能会降低."; ObjectID = "518"; */ +"518.ibShadowedToolTip" = "启用后模拟器将超过真实的Playstation BIOS文件,但是兼容性可能会降低."; + +/* Class = "NSButtonCell"; title = "模拟 PSX BIOS"; ObjectID = "518"; */ +"518.title" = "模拟 PSX BIOS"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "关闭XA音频解码"; ObjectID = "519"; */ +"519.ibShadowedToolTip" = "关闭XA音频解码"; + +/* Class = "NSButtonCell"; title = "关闭XA音频"; ObjectID = "519"; */ +"519.title" = "关闭XA音频"; + +/* Class = "NSButtonCell"; title = "InuYasha Sengoku Battle"; ObjectID = "539"; */ +"539.title" = "InuYasha Sengoku Battle"; + +/* Class = "NSButtonCell"; title = "寄生前夜 2,天上之门 1/2"; ObjectID = "540"; */ +"540.title" = "寄生前夜 2,天上之门 1/2"; + +/* Class = "NSBox"; title = "技巧"; ObjectID = "542"; */ +"542.title" = "技巧"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "这里通常应该关闭,如果你遇到声音问题或许应该启用它."; ObjectID = "543"; */ +"543.ibShadowedToolTip" = "这里通常应该关闭,如果你遇到声音问题或许应该启用它."; + +/* Class = "NSButtonCell"; title = "总是启用 SPU IRQ"; ObjectID = "543"; */ +"543.title" = "总是启用 SPU IRQ"; + +/* Class = "NSButtonCell"; ibShadowedToolTip = "这里通常应该关闭,如果你遇到控制器问题或许应该启用它."; ObjectID = "545"; */ +"545.ibShadowedToolTip" = "这里通常应该关闭,如果你遇到控制器问题或许应该启用它."; + +/* Class = "NSButtonCell"; title = "总是启用 SIO IRQ"; ObjectID = "545"; */ +"545.title" = "总是启用 SIO IRQ"; + +/* Class = "NSMenu"; title = "查看其他"; ObjectID = "561"; */ +"561.title" = "查看其他"; + +/* Class = "NSMenuItem"; title = "地区信息"; ObjectID = "562"; */ +"562.title" = "地区信息"; + +/* Class = "NSMenuItem"; title = "自动选择"; ObjectID = "563"; */ +"563.title" = "自动选择"; + +/* Class = "NSMenuItem"; title = "NTSC (美国/日本)"; ObjectID = "564"; */ +"564.title" = "NTSC (美国/日本)"; + +/* Class = "NSMenuItem"; title = "PAL (欧洲)"; ObjectID = "566"; */ +"566.title" = "PAL (欧洲)"; + +/* Class = "NSTabViewItem"; label = "记忆卡"; ObjectID = "579"; */ +"579.label" = "记忆卡"; + +/* Class = "NSButtonCell"; title = "关于…"; ObjectID = "599"; */ +"599.title" = "关于…"; + +/* Class = "NSButtonCell"; title = "配置…"; ObjectID = "600"; */ +"600.title" = "配置…"; + +/* Class = "NSButtonCell"; title = "关于…"; ObjectID = "602"; */ +"602.title" = "关于…"; + +/* Class = "NSButtonCell"; title = "配置…"; ObjectID = "603"; */ +"603.title" = "配置…"; + +/* Class = "NSButtonCell"; title = "配置…"; ObjectID = "605"; */ +"605.title" = "配置…"; + +/* Class = "NSButtonCell"; title = "关于…"; ObjectID = "606"; */ +"606.title" = "关于…"; + +/* Class = "NSButtonCell"; title = "关于…"; ObjectID = "608"; */ +"608.title" = "关于…"; + +/* Class = "NSButtonCell"; title = "配置…"; ObjectID = "609"; */ +"609.title" = "配置…"; + +/* Class = "NSButtonCell"; title = "选择"; ObjectID = "617"; */ +"617.title" = "选择"; + +/* Class = "NSButtonCell"; title = "选择"; ObjectID = "618"; */ +"618.title" = "选择"; + +/* Class = "NSButtonCell"; title = "选择"; ObjectID = "619"; */ +"619.title" = "选择"; + +/* Class = "NSBox"; title = "网络"; ObjectID = "622"; */ +"622.title" = "网络"; + +/* Class = "NSButtonCell"; title = "配置…"; ObjectID = "626"; */ +"626.title" = "配置…"; + +/* Class = "NSButtonCell"; title = "关于…"; ObjectID = "627"; */ +"627.title" = "关于…"; + +/* Class = "NSMenu"; title = "查看其他"; ObjectID = "629"; */ +"629.title" = "查看其他"; + +/* Class = "NSMenuItem"; title = "网络插件"; ObjectID = "630"; */ +"630.title" = "网络插件"; + +/* Class = "NSButtonCell"; title = "启用网络对战"; ObjectID = "640"; */ +"640.title" = "启用网络对战"; + +/* Class = "NSButtonCell"; title = "宽屏"; ObjectID = "652"; */ +"652.title" = "宽屏"; + +/* Class = "NSTabViewItem"; label = "热键"; ObjectID = "655"; */ +"655.label" = "热键"; + +/* Class = "NSButtonCell"; title = "快进"; ObjectID = "770"; */ +"770.title" = "快进"; + +/* Class = "NSTextFieldCell"; placeholderString = "无…"; ObjectID = "772"; */ +"772.placeholderString" = "无…"; + +/* Class = "NSTextFieldCell"; placeholderString = "无…"; ObjectID = "852"; */ +"852.placeholderString" = "无…"; + +/* Class = "NSButtonCell"; title = "即时存档"; ObjectID = "853"; */ +"853.title" = "即时存档"; + +/* Class = "NSButtonCell"; title = "即时读档"; ObjectID = "856"; */ +"856.title" = "即时读档"; + +/* Class = "NSButtonCell"; title = "下个进度"; ObjectID = "862"; */ +"862.title" = "下个进度"; + +/* Class = "NSButtonCell"; title = "上个进度"; ObjectID = "868"; */ +"868.title" = "上个进度"; + +/* Class = "NSTextFieldCell"; placeholderString = "无…"; ObjectID = "871"; */ +"871.placeholderString" = "无…"; + +/* Class = "NSTextFieldCell"; placeholderString = "无…"; ObjectID = "873"; */ +"873.placeholderString" = "无…"; + +/* Class = "NSTextFieldCell"; placeholderString = "无…"; ObjectID = "875"; */ +"875.placeholderString" = "无…"; + +/* Class = "NSBox"; title = "窗体"; ObjectID = "884"; */ +"884.title" = "窗体"; + +/* Class = "NSTextFieldCell"; title = "GPU 热键修改"; ObjectID = "886"; */ +"886.title" = "GPU 热键修改"; + +/* Class = "NSPopUpButton"; ibShadowedToolTip = "Control (ctrl);command (cmd)."; ObjectID = "887"; */ +"887.ibShadowedToolTip" = "Control (ctrl);command (cmd)."; + +/* Class = "NSMenu"; title = "查看其他"; ObjectID = "889"; */ +"889.title" = "查看其他"; + +/* Class = "NSMenuItem"; title = "Control ⌃"; ObjectID = "890"; */ +"890.title" = "Control ⌃"; + +/* Class = "NSMenuItem"; title = "Shift ⇧"; ObjectID = "891"; */ +"891.title" = "Shift ⇧"; + +/* Class = "NSMenuItem"; title = "Command ⌘"; ObjectID = "892"; */ +"892.title" = "Command ⌘"; + +/* Class = "NSMenuItem"; title = "Alt / Option ⌥"; ObjectID = "893"; */ +"893.title" = "Alt / Option ⌥"; + +/* Class = "NSTextFieldCell"; placeholderString = "无…"; ObjectID = "898"; */ +"898.placeholderString" = "无…"; + +/* Class = "NSButtonCell"; title = "跳帧限制"; ObjectID = "899"; */ +"899.title" = "跳帧限制"; + +/* Class = "NSBox"; title = "SIO1"; ObjectID = "902"; */ +"902.title" = "SIO1"; + +/* Class = "NSMenu"; title = "查看其他"; ObjectID = "907"; */ +"907.title" = "查看其他"; + +/* Class = "NSMenuItem"; title = "网络插件"; ObjectID = "908"; */ +"908.title" = "网络插件"; + +/* Class = "NSButtonCell"; title = "关于…"; ObjectID = "909"; */ +"909.title" = "关于…"; + +/* Class = "NSButtonCell"; title = "配置…"; ObjectID = "910"; */ +"910.title" = "配置…"; + +/* Class = "NSTextFieldCell"; title = "标签"; ObjectID = "936"; */ +"936.title" = "标签"; + +/* Class = "NSButtonCell"; title = "改变…"; ObjectID = "937"; */ +"937.title" = "改变…"; + +/* Class = "NSButtonCell"; title = "新建…"; ObjectID = "938"; */ +"938.title" = "新建…"; + +/* Class = "NSTextFieldCell"; title = "标签"; ObjectID = "939"; */ +"939.title" = "标签"; + +/* Class = "NSButtonCell"; title = "改变…"; ObjectID = "940"; */ +"940.title" = "改变…"; + +/* Class = "NSButtonCell"; title = "新建…"; ObjectID = "941"; */ +"941.title" = "新建…"; + +/* Class = "NSButtonCell"; title = "删除…"; ObjectID = "942"; */ +"942.title" = "删除…"; + +/* Class = "NSButtonCell"; title = "删除…"; ObjectID = "943"; */ +"943.title" = "删除…"; + +/* Class = "NSButtonCell"; title = "格式化…"; ObjectID = "944"; */ +"944.title" = "格式化…"; + +/* Class = "NSButtonCell"; title = "格式化…"; ObjectID = "945"; */ +"945.title" = "格式化…"; + +/* Class = "NSButtonCell"; title = "→"; ObjectID = "952"; */ +"952.title" = "→"; + +/* Class = "NSButtonCell"; title = "←"; ObjectID = "954"; */ +"954.title" = "←"; + +/* Class = "NSBox"; title = "窗体"; ObjectID = "965"; */ +"965.title" = "窗体"; + +/* Class = "NSTextFieldCell"; title = "英文名称"; ObjectID = "981"; */ +"981.title" = "英文名称"; + +/* Class = "NSTextFieldCell"; title = "删除"; ObjectID = "983"; */ +"983.title" = "删除"; + +/* Class = "NSTextFieldCell"; title = "0"; ObjectID = "1048"; */ +"1048.title" = "0"; + +/* Class = "NSButtonCell"; title = "日志"; ObjectID = "1278"; */ +"1278.title" = "日志"; + +/* Class = "NSButtonCell"; title = "快速启动"; ObjectID = "1279"; */ +"1279.title" = "快速启动"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/zh-Hans.lproj/Credits.rtf pcsxr-unstable-1.9.94+svn98108/macosx/Resources/zh-Hans.lproj/Credits.rtf --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/zh-Hans.lproj/Credits.rtf 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/zh-Hans.lproj/Credits.rtf 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,38 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset134 STHeitiSC-Light;} +{\colortbl;\red255\green255\blue255;} +\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural + +\f0\b\fs24 \cf0 Macintosh Port: +\b0 \ + Gil Pedersen\ + C.W. \'93Madd the Sane\'94 Betts\ + Nicolas P\'e9pin-Perreault\ +\ + +\b Icon Design: +\b0 \ + Romain Lafourcade\ +\ + +\b Original Coders: +\b0 \ + Linuzappz\ + Shadow\ + Pete Bernert\ + NoComp\ + Nik3d\ +\ + +\b Macintosh Testing: +\b0 \ + Richard Banister\ + Many others\ +\ + +\b Chinese Translation( +\f1 \'d6\'d0\'ce\'c4\'b7\'ad\'d2\'eb +\f0 ): +\b0 \ + Sdchun} \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/zh-Hans.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/zh-Hans.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/zh-Hans.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/zh-Hans.lproj/InfoPlist.strings 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,12 @@ +/* Localized versions of Info.plist keys */ + +CFBundleName = "PCSX-R"; +CFBundleShortVersionString = "PCSX-Reloaded 1.9.95"; +CFBundleGetInfoString = "PlayStation 模拟器源代码 PCSX-df 项目."; +NSHumanReadableCopyright = "Copyright © 2003-2005 PCSX Team, Gil Pedersen, Nicolas Pepin-Perreault.\nCopyright © 2009-2014 PCSX-Reloaded Team."; +"Playstation Emulator Plug-in" = "PlayStation 模拟器插件安装"; +"Playstation BIOS Image" = "PlayStation BIOS 映像"; +"PCSXR Memory Card" = "Psx 记忆卡格式"; +"PCSXR Freeze State" = "PCSXR 即时进度"; +"Playstation Cheat" = "PCSXR 金手指文件"; +"PlayStation Disc" = "PS 镜像文件"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/zh-Hans.lproj/Localizable.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/zh-Hans.lproj/Localizable.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/zh-Hans.lproj/Localizable.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/zh-Hans.lproj/Localizable.strings 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,125 @@ +/* + Localizable.strings + Pcsx + + Created by C.W. Betts on 4/23/11. + Copyright 2011 __MyCompanyName__. All rights reserved. +*/ + +//Commented out strings are those that need to be translated + +//libpcsxrcore strings +"Error Opening CDR Plugin" = "打开CDR插件时发生错误"; +"Error Opening SPU Plugin" = "打开SPU插件时发生错误"; +"Error Opening GPU Plugin" = "打开GPU插件时发生错误"; +"Error Opening PAD1 Plugin" = "打开PAD1插件时发生错误"; +"Error Opening PAD2 Plugin" = "打开PAD2插件时发生错误"; +"Error opening SIO1 plugin!" = "打开SIO1插件时发生错误"; +"Error Closing CDR Plugin" = "关闭CDR插件时发生错误"; +"Error Closing SPU Plugin" = "关闭SPU插件时发生错误"; +"Error Closing PAD1 Plugin" = "关闭PAD1插件时发生错误"; +"Error Closing PAD2 Plugin" = "关闭PAD2插件时发生错误"; +"Error Closing GPU Plugin" = "关闭GPU插件时发生错误"; +"Error closing SIO1 plugin!" = "关闭SIO1插件时发生错误"; +"CDRinit error: %d" = "光驱初始化错误: %d"; +"GPUinit error: %d" = "GPU初始化错误: %d"; +"SPUinit error: %d" = "SPU初始化错误: %d"; +"PAD1init error: %d" = "PAD1初始化错误: %d"; +"PAD2init error: %d" = "PAD2初始化错误: %d"; +"NETinit error: %d" = "网络初始化错误: %d"; +"SIO1init error: %d!" = "SIO1初始化错误: %d"; +"Could not open BIOS:\"%s\". Enabling HLE Bios!\n" = "不能打开BIOS:\"%s\".启用 HLE Bios!\n"; +"Error allocating memory!" = "分配内存错误!"; +"Running PCSXR Version %s (%s).\n" = "运行 PCSXR 版本 %s (%s).\n"; +"No memory card value was specified - creating a default card %s\n" = "无记忆卡,指定 - 创建一个记忆卡 %s\n"; +"Memory card %s failed to load!\n" = "记忆卡 %s 载入失败!\n"; +"Loading memory card %s\n" = "加载记忆卡 %s\n"; +"The memory card %s doesn't exist - creating it\n" = "记忆卡 %s 不能推出 - 创建\n"; +"Track %.2d (%s) - Start %.2d:%.2d:%.2d, Length %.2d:%.2d:%.2d\n" = "音轨 %.2d (%s) - 开始 %.2d:%.2d:%.2d, 长度 %.2d:%.2d:%.2d\n"; +"Loaded CD Image: %s" = "载入 CD 映像: %s"; +"Cheats saved to: %s\n" = "金手指存储为: %s\n"; +"Cheats loaded from: %s\n" = "金手指载入: %s\n"; +"Error allocating memory" = "分配内存错误"; +"Unable to start debug server.\n" = "不能开启调试服务.\n"; +"Debugger started.\n" = "调试程序开始.\n"; +"Debugger stopped.\n" = "调试程序停止.\n"; +"CD-ROM Label: %.32s\n" = "光驱标签: %.32s\n"; +"CD-ROM ID: %.9s\n" = "光驱ID: %.9s\n"; +"CD-ROM EXE Name: %.255s\n" = "光驱名称: %.255s\n"; +"Error opening file: %s.\n" = "打开文件错误: %s.\n"; +"Unknown CPE opcode %02x at position %08x.\n" = "未知CPE指令 %02x在%08x.\n"; +"\ncould not open: %s\n" = "\n不能打开: %s\n"; +"New Memory Card.mcd" = "新记忆卡文件.mcr"; +"Loaded PPF %d.0 patch: %s.\n" = "载入 PPF %d.0 补丁: %s.\n"; + +//Emu Thread +"*PCSXR*: Loaded State" = "*PCSXR*: 载入进度"; +"*PCSXR*: Error Saving State %d" = "*PCSXR*: 存储进度 %d 错误"; +"*PCSXR*: Saved State %d" = "*PCSXR*: 存储进度 %d"; + +"*PCSXR*: Error Loading State %d" = "*PCSXR*: 载入进度 %d 错误"; +"*PCSXR*: Sio Irq Always Enabled" = "*PCSXR*: Sio Irq 总是开启"; +"*PCSXR*: Sio Irq Not Always Enabled" = "*PCSXR*: Sio Irq 取消总是开始"; + + +// Cocoa Code +"Plugin Initialization Failed!" = "插件初始化失败!"; +"Pcsxr failed to initialize the selected %@ plugin (error=%i).\nThe plugin might not work with your system." = "Pcsxr 初始化插件 %1$@ 失败 (error=%2$i).\n插件不能工作."; +"Error!" = "错误!"; +"Installation Succesfull" = "初始化成功!"; +"Installation Failed!" = "初始化失败!"; +"The installation of the specified plugin was succesfull. In order to use it, please restart the application." = "初始化指定插件成功.请重启应用以使用它."; +"The installation of the specified plugin failed. Please try again, or make a manual install." = "初始化指定插件失败.请重试或手动安装."; +"Missing plugins!" = "缺少插件!"; +"Pcsxr is missing one or more critical plugins. You will need to install these in order to play games." = "Pcsx缺少至少一个关键插件.需要安装这些插件才能进行游戏."; +"Missing BIOS!" = "缺少BIOS!"; +"Pcsxr wasn't able to locate any Playstation BIOS ROM files. This means that it will run in BIOS simulation mode which is less stable and compatible than using a real Playstation BIOS.\nIf you have a BIOS available, please copy it to\n%@" = "Pcsxr找不到BIOS映像文件.这意味着将运行在模拟BIOS模式(会降低稳定和兼容性).\n如果你有BIOS文件,请复制到:\n%@"; + +"Error opening file" = "文件打开错误."; +"Unable to open %@: %@" = "不能打开 %1$@: %2$@"; +//"PSX Mem moved Desc" = "Memory Cards Moved"; +//"Psx Mem Moved" = "The memory card folder has been moved to your \"Documents\" folder\n\nThis message will not show up again."; + +//Memory card management +"Format Card" = "格式化记忆卡"; +"Free Size" = "可用大小"; +"Format" = "格式"; +"Formatting a memory card will remove all data on it.\n\nThis cannot be undone." = "格式化记忆卡将移除里面的数据.\n"; +"Delete Block" = "删除存档"; +"Deleting a block will remove all saved data on that block.\n\nThis cannot be undone." = "删除后在模拟器里将不能呢个读取这个存档."; +"No Free Space" = "没有可用空间"; +"Memory card %d doesn't have %d free consecutive blocks on it. Please remove some blocks on that card to continue" = "记忆卡 %1$d 没有 %2$d 个可用存储位置.请移除一些存档."; +"Memory card %i does not have enough free consecutive blocks.\n\nIn order to copy over \"%@,\" memory card %i must be compressed. Compressing memory cards will make deleted blocks unrecoverable.\n\nDo you want to continue?" = "记忆卡 %1$i 没有足够的空间.\n\nIn 复制结束 “%2$@,” 记忆卡 %3$i 必须压缩. 压缩记忆卡将删除存档且不可回复.\n\n要继续吗?"; + +//Cheat manager +"Save Cheats" = "存储金手指"; +"The cheat codes have not been applied. Unapplied cheats will not run nor be saved. Do you wish to save?" = "金手指代码不能应用.未应用的金手指不能运行也不能存储.你要存储吗?"; +"Unsaved Changes" = "更改后未存储"; +"(Untitled)" = "(无标题)"; + +//General buttons +"Okay" = "确认"; +"Cancel" = "取消"; +"Yes" = "确定"; +"No" = "取消"; +"Delete" = "删除"; + +//not-so-general buttons +//"Show Folder" = "Show Folder"; + +//BIOS file opener +"PlayStation BIOS File" = "PlayStation BIOS 映像"; +//"The file \"%@\" seems to be a BIOS file. Do you want PCSX-R to copy it to the proper location?" = "The file “%1$@\” seems to be a BIOS file. Do you want PCSX-R to copy it to the proper location?"; +//"BIOS_Copy" = "Copy"; +//"BIOS_Move" = "Move"; +//"BIOS Already Exists" = "BIOS Already Exists"; +//"There already exists a BIOS file at \"%1$@\": not copying the file at \"%2$@\".\n\nIf you do want to use the BIOS file at \"%2$@\", delete the BIOS at \"%1$@\"." = "There already exists a BIOS file at “%1$@”: not copying the file at “%2$@”.\n\nIf you do want to use the BIOS file at “%2$@”, delete the BIOS at “%1$@”."; +//"There already exists a BIOS file at \"%1$@\": not moving the file at \"%2$@\".\n\nIf you do want to use the BIOS file at \"%2$@\", delete the BIOS at \"%1$@\"." = "There already exists a BIOS file at “%1$@”: not moving the file at “%2$@”.\n\nIf you do want to use the BIOS file at “%2$@”, delete the BIOS at “%1$@”."; + +//Mem card flags +"MemCard_Deleted" = "删除"; +"MemCard_Free" = "可用"; +"MemCard_Used" = "占用"; +"MemCard_Link" = "链接"; +"MemCard_EndLink" = "链接结束"; +//"MemCard_MultiSave" = "Multi-save"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/zh-Hans.lproj/PcsxrMemCard.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/zh-Hans.lproj/PcsxrMemCard.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/zh-Hans.lproj/PcsxrMemCard.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/zh-Hans.lproj/PcsxrMemCard.strings 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,21 @@ + +/* Class = "NSWindow"; title = "记忆卡"; ObjectID = "5"; */ +"5.title" = "记忆卡"; + +/* Class = "NSTextFieldCell"; title = "选择要插入这个记忆卡的插槽."; ObjectID = "100028"; */ +"100028.title" = "选择要插入这个记忆卡的插槽."; + +/* Class = "NSTextFieldCell"; title = "选择记忆卡"; ObjectID = "100029"; */ +"100029.title" = "选择记忆卡"; + +/* Class = "NSTextFieldCell"; placeholderString = "记忆卡文件名称"; ObjectID = "100035"; */ +"100035.placeholderString" = "记忆卡文件名称"; + +/* Class = "NSButtonCell"; title = "插槽2"; ObjectID = "100127"; */ +"100127.title" = "插槽2"; + +/* Class = "NSButtonCell"; title = "插槽1"; ObjectID = "100131"; */ +"100131.title" = "插槽1"; + +/* Class = "NSButtonCell"; title = "取消"; ObjectID = "100135"; */ +"100135.title" = "取消"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/zh-Hans.lproj/PCSXR.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/zh-Hans.lproj/PCSXR.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/zh-Hans.lproj/PCSXR.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/zh-Hans.lproj/PCSXR.strings 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,276 @@ + +/* Class = "NSMenuItem"; title = "前置全部窗口"; ObjectID = "5"; */ +"5.title" = "前置全部窗口"; + +/* Class = "NSMenuItem"; title = "窗口"; ObjectID = "19"; */ +"19.title" = "窗口"; + +/* Class = "NSMenuItem"; title = "缩放"; ObjectID = "23"; */ +"23.title" = "缩放"; + +/* Class = "NSMenu"; title = "窗口"; ObjectID = "24"; */ +"24.title" = "窗口"; + +/* Class = "NSMenu"; title = "PCSXR"; ObjectID = "29"; */ +"29.title" = "PCSXR"; + +/* Class = "NSMenuItem"; title = "PCSXR"; ObjectID = "56"; */ +"56.title" = "PCSXR"; + +/* Class = "NSMenu"; title = "PCSXR"; ObjectID = "57"; */ +"57.title" = "PCSXR"; + +/* Class = "NSMenuItem"; title = "关于 PCSXR"; ObjectID = "58"; */ +"58.title" = "关于 PCSXR"; + +/* Class = "NSMenu"; title = "游戏"; ObjectID = "81"; */ +"81.title" = "游戏"; + +/* Class = "NSMenuItem"; title = "游戏"; ObjectID = "83"; */ +"83.title" = "游戏"; + +/* Class = "NSMenuItem"; title = "帮助"; ObjectID = "103"; */ +"103.title" = "帮助"; + +/* Class = "NSMenu"; title = "帮助"; ObjectID = "106"; */ +"106.title" = "帮助"; + +/* Class = "NSMenuItem"; title = "PCSXR 帮助"; ObjectID = "111"; */ +"111.title" = "PCSXR 帮助"; + +/* Class = "NSMenuItem"; title = "偏好设置..."; ObjectID = "129"; */ +"129.title" = "偏好设置…"; + +/* Class = "NSMenu"; title = "服务"; ObjectID = "130"; */ +"130.title" = "服务"; + +/* Class = "NSMenuItem"; title = "服务"; ObjectID = "131"; */ +"131.title" = "服务"; + +/* Class = "NSMenuItem"; title = "隐藏 PCSXR"; ObjectID = "134"; */ +"134.title" = "隐藏 PCSXR"; + +/* Class = "NSMenuItem"; title = "退出 PCSXR"; ObjectID = "136"; */ +"136.title" = "退出 PCSXR"; + +/* Class = "NSMenuItem"; title = "隐藏其他"; ObjectID = "145"; */ +"145.title" = "隐藏其他"; + +/* Class = "NSMenuItem"; title = "全部显示"; ObjectID = "150"; */ +"150.title" = "全部显示"; + +/* Class = "NSMenuItem"; title = "重置"; ObjectID = "244"; */ +"244.title" = "重置"; + +/* Class = "NSMenuItem"; title = "暂停"; ObjectID = "267"; */ +"267.title" = "暂停"; + +/* Class = "NSMenuItem"; title = "关闭"; ObjectID = "270"; */ +"270.title" = "关闭"; + +/* Class = "NSMenuItem"; title = "运行 CD"; ObjectID = "273"; */ +"273.title" = "运行 CD"; + +/* Class = "NSMenu"; title = "即时存档"; ObjectID = "278"; */ +"278.title" = "即时存档"; + +/* Class = "NSMenuItem"; title = "即时存档"; ObjectID = "280"; */ +"280.title" = "即时存档"; + +/* Class = "NSMenuItem"; title = "位置 0"; ObjectID = "281"; */ +"281.title" = "位置 0"; + +/* Class = "NSMenuItem"; title = "即时读档"; ObjectID = "284"; */ +"284.title" = "即时读档"; + +/* Class = "NSMenu"; title = "即时读档"; ObjectID = "285"; */ +"285.title" = "即时读档"; + +/* Class = "NSMenuItem"; title = "位置 2"; ObjectID = "286"; */ +"286.title" = "位置 2"; + +/* Class = "NSMenuItem"; title = "位置 0"; ObjectID = "287"; */ +"287.title" = "位置 0"; + +/* Class = "NSMenuItem"; title = "位置 2"; ObjectID = "289"; */ +"289.title" = "位置 2"; + +/* Class = "NSMenuItem"; title = "运行 ISO..."; ObjectID = "290"; */ +"290.title" = "运行 ISO…"; + +/* Class = "NSMenuItem"; title = "位置 3"; ObjectID = "292"; */ +"292.title" = "位置 3"; + +/* Class = "NSMenuItem"; title = "位置 3"; ObjectID = "293"; */ +"293.title" = "位置 3"; + +/* Class = "NSMenuItem"; title = "全屏"; ObjectID = "300"; */ +"300.title" = "全屏"; + +/* Class = "NSMenuItem"; title = "换碟"; ObjectID = "303"; */ +"303.title" = "换碟"; + +/* Class = "NSMenuItem"; title = "运行 BIOS"; ObjectID = "306"; */ +"306.title" = "运行 BIOS"; + +/* Class = "NSMenuItem"; title = "位置 4"; ObjectID = "309"; */ +"309.title" = "位置 4"; + +/* Class = "NSMenuItem"; title = "位置 5"; ObjectID = "310"; */ +"310.title" = "位置 5"; + +/* Class = "NSMenuItem"; title = "位置 4"; ObjectID = "311"; */ +"311.title" = "位置 4"; + +/* Class = "NSMenuItem"; title = "位置 5"; ObjectID = "312"; */ +"312.title" = "位置 5"; + +/* Class = "NSMenuItem"; title = "失去焦点时暂停"; ObjectID = "318"; */ +"318.title" = "失去焦点时暂停"; + +/* Class = "NSMenuItem"; title = "位置 1"; ObjectID = "320"; */ +"320.title" = "位置 1"; + +/* Class = "NSMenuItem"; title = "位置 1"; ObjectID = "322"; */ +"322.title" = "位置 1"; + +/* Class = "NSMenuItem"; title = "运行历史..."; ObjectID = "329"; */ +"329.title" = "运行历史…"; + +/* Class = "NSMenu"; title = "运行历史..."; ObjectID = "330"; */ +"330.title" = "运行历史…"; + +/* Class = "NSMenuItem"; title = "清除列表"; ObjectID = "366"; */ +"366.title" = "清除列表"; + +/* Class = "NSMenuItem"; title = "金手指"; ObjectID = "371"; */ +"371.title" = "金手指"; + +/* Class = "NSMenuItem"; title = "编辑"; ObjectID = "385"; */ +"385.title" = "编辑"; + +/* Class = "NSMenu"; title = "编辑"; ObjectID = "386"; */ +"386.title" = "编辑"; + +/* Class = "NSMenuItem"; title = "撤销"; ObjectID = "387"; */ +"387.title" = "撤销"; + +/* Class = "NSMenuItem"; title = "重做"; ObjectID = "388"; */ +"388.title" = "重做"; + +/* Class = "NSMenuItem"; title = "剪切"; ObjectID = "390"; */ +"390.title" = "剪切"; + +/* Class = "NSMenuItem"; title = "拷贝"; ObjectID = "391"; */ +"391.title" = "拷贝"; + +/* Class = "NSMenuItem"; title = "粘贴"; ObjectID = "392"; */ +"392.title" = "粘贴"; + +/* Class = "NSMenuItem"; title = "粘贴并匹配样式"; ObjectID = "393"; */ +"393.title" = "粘贴并匹配样式"; + +/* Class = "NSMenuItem"; title = "删除"; ObjectID = "394"; */ +"394.title" = "删除"; + +/* Class = "NSMenuItem"; title = "全选"; ObjectID = "395"; */ +"395.title" = "全选"; + +/* Class = "NSMenuItem"; title = "查找"; ObjectID = "397"; */ +"397.title" = "查找"; + +/* Class = "NSMenuItem"; title = "拼写和语法"; ObjectID = "398"; */ +"398.title" = "拼写和语法"; + +/* Class = "NSMenuItem"; title = "替换"; ObjectID = "399"; */ +"399.title" = "替换"; + +/* Class = "NSMenuItem"; title = "转换"; ObjectID = "400"; */ +"400.title" = "转换"; + +/* Class = "NSMenuItem"; title = "语音"; ObjectID = "401"; */ +"401.title" = "语音"; + +/* Class = "NSMenu"; title = "语音"; ObjectID = "402"; */ +"402.title" = "语音"; + +/* Class = "NSMenuItem"; title = "开始朗读"; ObjectID = "403"; */ +"403.title" = "开始朗读"; + +/* Class = "NSMenuItem"; title = "停止朗读"; ObjectID = "404"; */ +"404.title" = "停止朗读"; + +/* Class = "NSMenu"; title = "转换"; ObjectID = "405"; */ +"405.title" = "转换"; + +/* Class = "NSMenuItem"; title = "变为大写"; ObjectID = "406"; */ +"406.title" = "变为大写"; + +/* Class = "NSMenuItem"; title = "变为小写"; ObjectID = "407"; */ +"407.title" = "变为小写"; + +/* Class = "NSMenuItem"; title = "首字母大写"; ObjectID = "408"; */ +"408.title" = "首字母大写"; + +/* Class = "NSMenu"; title = "替换"; ObjectID = "409"; */ +"409.title" = "替换"; + +/* Class = "NSMenuItem"; title = "显示替换"; ObjectID = "410"; */ +"410.title" = "显示替换"; + +/* Class = "NSMenuItem"; title = "智能拷贝/粘贴"; ObjectID = "412"; */ +"412.title" = "智能拷贝/粘贴"; + +/* Class = "NSMenuItem"; title = "智能引号"; ObjectID = "413"; */ +"413.title" = "智能引号"; + +/* Class = "NSMenuItem"; title = "智能破折号"; ObjectID = "414"; */ +"414.title" = "智能破折号"; + +/* Class = "NSMenuItem"; title = "智能链接"; ObjectID = "415"; */ +"415.title" = "智能链接"; + +/* Class = "NSMenuItem"; title = "资料探测"; ObjectID = "416"; */ +"416.title" = "资料探测"; + +/* Class = "NSMenuItem"; title = "文本替换"; ObjectID = "417"; */ +"417.title" = "文本替换"; + +/* Class = "NSMenu"; title = "拼写"; ObjectID = "418"; */ +"418.title" = "拼写"; + +/* Class = "NSMenuItem"; title = "显示拼写和检查"; ObjectID = "419"; */ +"419.title" = "显示拼写和检查"; + +/* Class = "NSMenuItem"; title = "立即检查文稿"; ObjectID = "420"; */ +"420.title" = "立即检查文稿"; + +/* Class = "NSMenuItem"; title = "键入时检查拼写"; ObjectID = "422"; */ +"422.title" = "键入时检查拼写"; + +/* Class = "NSMenuItem"; title = "检查拼写和语法"; ObjectID = "423"; */ +"423.title" = "检查拼写和语法"; + +/* Class = "NSMenuItem"; title = "自动纠正拼写"; ObjectID = "424"; */ +"424.title" = "自动纠正拼写"; + +/* Class = "NSMenu"; title = "查找"; ObjectID = "425"; */ +"425.title" = "查找"; + +/* Class = "NSMenuItem"; title = "查找..."; ObjectID = "426"; */ +"426.title" = "查找…"; + +/* Class = "NSMenuItem"; title = "查找下一个"; ObjectID = "427"; */ +"427.title" = "查找下一个"; + +/* Class = "NSMenuItem"; title = "查找上一个"; ObjectID = "428"; */ +"428.title" = "查找上一个"; + +/* Class = "NSMenuItem"; title = "查找所选内容"; ObjectID = "429"; */ +"429.title" = "查找所选内容"; + +/* Class = "NSMenuItem"; title = "跳到所选内容"; ObjectID = "430"; */ +"430.title" = "跳到所选内容"; + +/* Class = "NSMenuItem"; title = "查找和替换…"; ObjectID = "456"; */ +"456.title" = "查找和替换…"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Resources/zh-Hant.lproj/InfoPlist.strings pcsxr-unstable-1.9.94+svn98108/macosx/Resources/zh-Hant.lproj/InfoPlist.strings --- pcsxr-unstable-1.9.94+svn97809/macosx/Resources/zh-Hant.lproj/InfoPlist.strings 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Resources/zh-Hant.lproj/InfoPlist.strings 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,14 @@ +/* Localized versions of Info.plist keys */ + +//Commented out strings are those that need to be translated + +CFBundleName = "PCSX-R"; +CFBundleShortVersionString = "PCSX-Reloaded 1.9.95"; +//CFBundleGetInfoString = "PlayStation Emulator based on PCSX-df Project."; +//NSHumanReadableCopyright = "Copyright © 2003-2005 PCSX Team, Gil Pedersen, Nicolas Pepin-Perreault.\nCopyright © 2009-2014 PCSX-Reloaded Team."; +//"Playstation Emulator Plug-in" = "PlayStation Emulator Plug-in"; +//"Playstation BIOS Image" = "PlayStation BIOS Image"; +"PCSXR Memory Card" = "PS 記憶卡格式"; +//"PCSXR Freeze State" = "PCSXR Freeze State"; +"Playstation Cheat" = "PCSXR 金手指檔"; +"PlayStation Disc" = "PS 鏡像檔"; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/CheatController.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/CheatController.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/CheatController.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/CheatController.h 2016-06-30 16:53:22.000000000 +0000 @@ -0,0 +1,53 @@ +// +// CheatController.h +// Pcsxr +// + +#import +#import "PcsxrHexadecimalFormatter.h" +#include "psxcommon.h" +#include "cheat.h" + +@interface PcsxrCheatTempObject : NSObject +@property (readwrite) uint32_t cheatAddress; +@property (readwrite) uint16_t cheatValue; + +- (instancetype)initWithAddress:(uint32_t)add value:(uint16_t)val NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithCheatCode:(CheatCode *)theCheat; +@end + +@interface PcsxrCheatTemp : NSObject +@property (readwrite, strong) NSMutableArray *cheatValues; +@property (readwrite, strong) NSString *cheatName; +@property (readwrite, getter = isEnabled) BOOL enabled; + +- (instancetype)initWithCheat:(Cheat *)theCheat NS_DESIGNATED_INITIALIZER; +@end + +@interface CheatController : NSWindowController + +@property (weak) IBOutlet NSTableView *cheatView; +@property (weak) IBOutlet NSWindow *editCheatWindow; +@property (weak) IBOutlet NSTableView *editCheatView; +@property (weak) IBOutlet PcsxrHexadecimalFormatter *addressFormatter; +@property (weak) IBOutlet PcsxrHexadecimalFormatter *valueFormatter; + +@property (readwrite, strong) NSMutableArray *tempCheatCodes; +@property (readwrite, strong) NSMutableArray *cheats; + +- (void)refresh; + +- (IBAction)saveCheats:(id)sender; +- (IBAction)loadCheats:(id)sender; +- (IBAction)clear:(id)sender; +- (IBAction)editCheat:(id)sender; +- (IBAction)addCheat:(id)sender; +- (IBAction)applyCheats:(id)sender; +- (IBAction)removeCheats:(id)sender; +- (IBAction)changeCheat:(id)sender; + +- (IBAction)closeCheatEdit:(id)sender; +- (IBAction)removeCheatValue:(id)sender; +- (IBAction)addCheatValue:(id)sender; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/CheatController.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/CheatController.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/CheatController.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/CheatController.m 2016-06-30 16:53:22.000000000 +0000 @@ -0,0 +1,324 @@ +// +// CheatController.m +// Pcsxr +// + +#import +#import "CheatController.h" +#import "PcsxrCheatHandler.h" +#import "PcsxrHexadecimalFormatter.h" + +#define kTempCheatCodesName @"tempCheatCodes" +#define kCheatsName @"cheats" + +@implementation PcsxrCheatTempObject +@synthesize cheatAddress, cheatValue; + +- (instancetype)init +{ + return [self initWithAddress:0x10000000 value:0]; +} + +- (instancetype)initWithAddress:(uint32_t)add value:(uint16_t)val +{ + if (self = [super init]) { + self.cheatAddress = add; + self.cheatValue = val; + } + return self; +} + +- (instancetype)initWithCheatCode:(CheatCode *)theCheat +{ + return [self initWithAddress:theCheat->Addr value:theCheat->Val]; +} + +- (NSString*)description +{ + return [NSString stringWithFormat:@"%08x %04x", cheatAddress, cheatValue]; +} + +- (BOOL)isEqual:(id)object +{ + if ([object isKindOfClass:[PcsxrCheatTempObject class]]) { + if (cheatAddress != [object cheatAddress]) { + return NO; + } else if (cheatValue != [object cheatValue]) { + return NO; + } else + return YES; + } else + return NO; +} + +- (NSUInteger)hash +{ + return cheatAddress ^ cheatValue; +} + +- (id)copyWithZone:(NSZone *)zone +{ + return [[[self class] allocWithZone:zone] initWithAddress:cheatAddress value:cheatValue]; +} + +@end + +@implementation PcsxrCheatTemp +@synthesize cheatName; +@synthesize cheatValues; +@synthesize enabled; + +- (instancetype)initWithCheat:(Cheat *)theCheat +{ + if (self = [super init]) { + self.cheatName = @(theCheat->Descr); + self.enabled = theCheat->Enabled ? YES : NO; + self.cheatValues = [NSMutableArray arrayWithCapacity:theCheat->n]; + for (int i = 0; i < theCheat->n; i++) { + [cheatValues addObject:[[PcsxrCheatTempObject alloc] initWithCheatCode:&CheatCodes[i+theCheat->First]]]; + } + } + return self; +} + +- (NSUInteger)hash +{ + return [cheatName hash] ^ [cheatValues hash]; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"[%@%@]\n%@", enabled ? @"*" : @"", cheatName, [cheatValues componentsJoinedByString:@"\n"]]; +} + +@end + +@implementation CheatController +@synthesize addressFormatter; +@synthesize cheatView; +@synthesize editCheatView; +@synthesize editCheatWindow; +@synthesize valueFormatter; + +- (NSString *)windowNibName +{ + return @"CheatWindow"; +} + +- (instancetype)init +{ + return self = [self initWithWindowNibName:@"CheatWindow"]; +} + +- (instancetype)initWithCoder:(NSCoder *)aDecoder +{ + if (self = [super initWithCoder:aDecoder]) { + self.tempCheatCodes = [NSMutableArray array]; + } + return self; +} + +- (instancetype)initWithWindow:(NSWindow *)window +{ + if (self = [super initWithWindow:window]) { + self.tempCheatCodes = [NSMutableArray array]; + } + return self; +} + +- (void)refreshNSCheatArray +{ + NSMutableArray *tmpArray = [[NSMutableArray alloc] initWithCapacity:NumCheats]; + for (int i = 0; i < NumCheats; i++) { + PcsxrCheatTemp *tmpObj = [[PcsxrCheatTemp alloc] initWithCheat:&Cheats[i]]; + [tmpArray addObject:tmpObj]; + } + self.cheats = tmpArray; + [self setDocumentEdited:NO]; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context +{ + if ([keyPath isEqualToString:kCheatsName]) { + [self setDocumentEdited:YES]; + } +} + +- (void)refresh +{ + [cheatView reloadData]; + [self refreshNSCheatArray]; +} + +- (void)awakeFromNib +{ + [valueFormatter setHexPadding:4]; + [addressFormatter setHexPadding:8]; + [self refreshNSCheatArray]; + [self addObserver:self forKeyPath:kCheatsName options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context:NULL]; +} + +- (IBAction)loadCheats:(id)sender +{ + NSOpenPanel *openDlg = [NSOpenPanel openPanel]; + [openDlg setAllowsMultipleSelection:NO]; + [openDlg setAllowedFileTypes:[PcsxrCheatHandler supportedUTIs]]; + + if ([openDlg runModal] == NSFileHandlingPanelOKButton) { + NSURL *file = [openDlg URL]; + LoadCheats([[file path] fileSystemRepresentation]); + [self refresh]; + } +} + +- (IBAction)saveCheats:(id)sender +{ + NSSavePanel *saveDlg = [NSSavePanel savePanel]; + [saveDlg setAllowedFileTypes:[PcsxrCheatHandler supportedUTIs]]; + [saveDlg setCanSelectHiddenExtension:YES]; + [saveDlg setCanCreateDirectories:YES]; + [saveDlg setPrompt:NSLocalizedString(@"Save Cheats", nil)]; + if ([saveDlg runModal] == NSFileHandlingPanelOKButton) { + NSURL *url = [saveDlg URL]; + NSString *saveString = [self.cheats componentsJoinedByString:@"\n"]; + [saveString writeToURL:url atomically:YES encoding:NSUTF8StringEncoding error:NULL]; + } +} + +- (IBAction)clear:(id)sender +{ + self.cheats = [[NSMutableArray alloc] init]; +} + +- (IBAction)closeCheatEdit:(id)sender +{ + [[self window] endSheet:editCheatWindow returnCode:[sender tag] == 1 ? NSCancelButton : NSOKButton]; +} + +- (IBAction)changeCheat:(id)sender +{ + [self setDocumentEdited:YES]; +} + +- (IBAction)removeCheatValue:(id)sender +{ + if ([editCheatView selectedRow] < 0) { + NSBeep(); + return; + } + + NSIndexSet *toRemoveIndex = [editCheatView selectedRowIndexes]; + [self willChange:NSKeyValueChangeRemoval valuesAtIndexes:toRemoveIndex forKey:kTempCheatCodesName]; + [self.tempCheatCodes removeObjectsAtIndexes:toRemoveIndex]; + [self didChange:NSKeyValueChangeRemoval valuesAtIndexes:toRemoveIndex forKey:kTempCheatCodesName]; +} + +- (IBAction)addCheatValue:(id)sender +{ + NSIndexSet *newSet = [NSIndexSet indexSetWithIndex:[self.tempCheatCodes count]]; + [self willChange:NSKeyValueChangeInsertion valuesAtIndexes:newSet forKey:kTempCheatCodesName]; + [self.tempCheatCodes addObject:[[PcsxrCheatTempObject alloc] init]]; + [self didChange:NSKeyValueChangeInsertion valuesAtIndexes:newSet forKey:kTempCheatCodesName]; +} + +- (void)reloadCheats +{ + NSFileManager *manager = [NSFileManager defaultManager]; + NSURL *tmpURL = [[manager URLForDirectory:NSItemReplacementDirectory inDomain:NSUserDomainMask appropriateForURL:[[NSBundle mainBundle] bundleURL] create:YES error:nil] URLByAppendingPathComponent:@"temp.cht" isDirectory:NO]; + NSString *tmpStr = [self.cheats componentsJoinedByString:@"\n"]; + [tmpStr writeToURL:tmpURL atomically:NO encoding:NSUTF8StringEncoding error:NULL]; + LoadCheats([[tmpURL path] fileSystemRepresentation]); + [manager removeItemAtURL:tmpURL error:NULL]; +} + +- (IBAction)editCheat:(id)sender +{ + if ([cheatView selectedRow] < 0) { + NSBeep(); + return; + } + NSMutableArray *tmpArray = [(self.cheats)[[cheatView selectedRow]] cheatValues]; + NSMutableArray *newCheats = [[NSMutableArray alloc] initWithArray:tmpArray copyItems:YES]; + self.tempCheatCodes = newCheats; + [[self window] beginSheet:editCheatWindow completionHandler:^(NSModalResponse returnCode) { + if (returnCode == NSOKButton) { + PcsxrCheatTemp *tmpCheat = (self.cheats)[[cheatView selectedRow]]; + if (![tmpCheat.cheatValues isEqualToArray:self.tempCheatCodes]) { + tmpCheat.cheatValues = self.tempCheatCodes; + [self setDocumentEdited:YES]; + } + } + + [editCheatWindow orderOut:nil]; + }]; +} + +- (IBAction)addCheat:(id)sender +{ + NSIndexSet *newSet = [NSIndexSet indexSetWithIndex:[self.cheats count]]; + [self willChange:NSKeyValueChangeInsertion valuesAtIndexes:newSet forKey:kCheatsName]; + PcsxrCheatTemp *tmpCheat = [[PcsxrCheatTemp alloc] init]; + tmpCheat.cheatName = NSLocalizedString(@"New Cheat", @"New Cheat Name" ); + PcsxrCheatTempObject *tmpObj = [[PcsxrCheatTempObject alloc] initWithAddress:0x10000000 value:0]; + NSMutableArray *tmpArray = [NSMutableArray arrayWithObject:tmpObj]; + tmpCheat.cheatValues = tmpArray; + [self.cheats addObject:tmpCheat]; + [self didChange:NSKeyValueChangeInsertion valuesAtIndexes:newSet forKey:kCheatsName]; + [self setDocumentEdited:YES]; +} + +- (IBAction)applyCheats:(id)sender +{ + [self reloadCheats]; + [self setDocumentEdited:NO]; +} + +- (void)sheetDidDismiss:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo +{ + switch (returnCode) { + case NSAlertDefaultReturn: + [self reloadCheats]; + [self close]; + break; + + default: + [self refreshNSCheatArray]; + [self close]; + break; + + case NSAlertOtherReturn: + break; + } +} + +- (BOOL)windowShouldClose:(id)sender +{ + if (![sender isDocumentEdited] || ![[self window] isEqual:sender]) { + return YES; + } else { + NSBeginAlertSheet(NSLocalizedString(@"Unsaved Changes", @"Unsaved changes"), + NSLocalizedString(@"Save", @"Save"), + NSLocalizedString(@"Don't Save",@"Don't Save"), + NSLocalizedString(@"Cancel", @"Cancel"), [self window], self, + NULL, @selector(sheetDidDismiss:returnCode:contextInfo:), NULL, + NSLocalizedString(@"The cheat codes have not been applied. Unapplied cheats will not run nor be saved. Do you wish to save?", nil)); + + return NO; + } +} + +- (IBAction)removeCheats:(id)sender +{ + if ([cheatView selectedRow] < 0) { + NSBeep(); + return; + } + + NSIndexSet *toRemoveIndex = [cheatView selectedRowIndexes]; + [self willChange:NSKeyValueChangeRemoval valuesAtIndexes:toRemoveIndex forKey:kCheatsName]; + [self.cheats removeObjectsAtIndexes:toRemoveIndex]; + [self didChange:NSKeyValueChangeRemoval valuesAtIndexes:toRemoveIndex forKey:kCheatsName]; + [self setDocumentEdited:YES]; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/config.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/config.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/config.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/config.h 2016-06-30 16:53:22.000000000 +0000 @@ -0,0 +1,32 @@ +// +// Copyright (c) 2008, Wei Mingzhi. All rights reserved. +// +// Use, redistribution and modification of this code is unrestricted as long as this +// notice is preserved. +// + +#ifndef CONFIG_H +#define CONFIG_H + +#ifndef MAXPATHLEN +//match PATH_MAX in +#define MAXPATHLEN 1024 +#endif + +#ifndef PACKAGE_VERSION +#define PACKAGE_VERSION "1.9" +#endif + +#ifndef PREFIX +#define PREFIX "./" +#endif + +#ifndef inline +#ifdef _DEBUG +#define inline /* */ +#else +#define inline __inline__ +#endif +#endif + +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/ConfigurationController.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/ConfigurationController.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/ConfigurationController.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/ConfigurationController.h 2016-06-30 16:53:22.000000000 +0000 @@ -0,0 +1,55 @@ +/* ConfigurationController */ + +#import +#import "PluginController.h" +#import "HotkeyController.h" +#import "PluginList.h" + +extern NSString *const memChangeNotifier; +extern NSString *const memCardChangeNumberKey; + +@class PcsxrMemCardController; + +@interface ConfigurationController : NSWindowController +@property (weak) IBOutlet PluginController *cdromPlugin; +@property (weak) IBOutlet PluginController *graphicsPlugin; +@property (weak) IBOutlet PluginController *padPlugin; +@property (weak) IBOutlet PluginController *soundPlugin; +@property (weak) IBOutlet PluginController *netPlugin; +@property (weak) IBOutlet PluginController *sio1Plugin; + +@property (weak) IBOutlet PcsxrMemCardController *memCardEdit; + +// Hotkeys +@property (weak) IBOutlet HotkeyController *hkController; +@property (weak) IBOutlet NSTabViewItem *hkTab; + +@property (weak) IBOutlet NSButtonCell *noXaAudioCell; +@property (weak) IBOutlet NSButtonCell *sioIrqAlwaysCell; +@property (weak) IBOutlet NSButtonCell *bwMdecCell; +@property (weak) IBOutlet NSButtonCell *autoVTypeCell; +@property (weak) IBOutlet NSPopUpButton *vTypePALCell; +@property (weak) IBOutlet NSButtonCell *noCDAudioCell; +@property (weak) IBOutlet NSButtonCell *usesHleCell; +@property (weak) IBOutlet NSButtonCell *usesDynarecCell; +@property (weak) IBOutlet NSButtonCell *consoleOutputCell; +@property (weak) IBOutlet NSButtonCell *spuIrqAlwaysCell; +@property (weak) IBOutlet NSButtonCell *rCountFixCell; +@property (weak) IBOutlet NSButtonCell *vSyncWAFixCell; +@property (weak) IBOutlet NSButtonCell *noFastBootCell; +@property (weak) IBOutlet NSButtonCell *enableNetPlayCell; +@property (weak) IBOutlet NSButtonCell *widescreen; + +- (IBAction)setCheckbox:(id)sender; +- (IBAction)setCheckboxInverse:(id)sender; +- (IBAction)setVideoType:(id)sender; + ++ (void)setMemoryCard:(NSInteger)theCard toPath:(NSString *)theFile; ++ (void)setMemoryCard:(NSInteger)theCard toURL:(NSURL *)theURL; + +- (IBAction)mcdNewClicked:(id)sender; +- (IBAction)mcdChangeClicked:(id)sender; + +- (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/ConfigurationController.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/ConfigurationController.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/ConfigurationController.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/ConfigurationController.m 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,290 @@ +#import "ConfigurationController.h" +#import "PcsxrController.h" +#import "PluginList.h" +#import "PcsxrPlugin.h" +#import "PcsxrMemCardController.h" +#import "PcsxrMemCardHandler.h" +#include "psxcommon.h" +#include "plugins.h" + +NSString *const memChangeNotifier = @"PcsxrMemoryCardDidChangeNotifier"; +NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; + +@interface ConfigurationController () +@property (strong) NSMutableDictionary *checkBoxDefaults; +- (NSString *)keyForSender:(id)sender; +@end + +@implementation ConfigurationController +@synthesize autoVTypeCell; +@synthesize bwMdecCell; +@synthesize checkBoxDefaults = _checkBoxDefaults; +@synthesize consoleOutputCell; +@synthesize enableNetPlayCell; +@synthesize noCDAudioCell; +@synthesize noFastBootCell; +@synthesize noXaAudioCell; +@synthesize rCountFixCell; +@synthesize sioIrqAlwaysCell; +@synthesize spuIrqAlwaysCell; +@synthesize usesDynarecCell; +@synthesize usesHleCell; +@synthesize vSyncWAFixCell; +@synthesize vTypePALCell; +@synthesize widescreen; +@synthesize cdromPlugin; +@synthesize graphicsPlugin; +@synthesize padPlugin; +@synthesize soundPlugin; +@synthesize netPlugin; +@synthesize sio1Plugin; +@synthesize memCardEdit; +@synthesize hkController; +@synthesize hkTab; + ++ (void)setMemoryCard:(NSInteger)theCard toURL:(NSURL *)theURL; +{ + if (theCard == 1) { + [[NSUserDefaults standardUserDefaults] setURL:theURL forKey:@"Mcd1"]; + strlcpy(Config.Mcd1, [[theURL path] fileSystemRepresentation], MAXPATHLEN ); + } else { + [[NSUserDefaults standardUserDefaults] setURL:theURL forKey:@"Mcd2"]; + strlcpy(Config.Mcd2, [[theURL path] fileSystemRepresentation], MAXPATHLEN ); + } + + [[NSNotificationCenter defaultCenter] postNotificationName:memChangeNotifier object:nil userInfo: + @{memCardChangeNumberKey: @(theCard)}]; +} + ++ (void)setMemoryCard:(NSInteger)theCard toPath:(NSString *)theFile +{ + [self setMemoryCard:theCard toURL:[NSURL fileURLWithPath:theFile isDirectory:NO]]; +} + +- (IBAction)setCheckbox:(id)sender +{ + if ([sender isKindOfClass:[NSMatrix class]]) { + sender = [sender selectedCell]; + } + + NSString *key = [self keyForSender:sender]; + if (key) { + [[NSUserDefaults standardUserDefaults] setBool:[sender intValue] ? YES : NO forKey:key]; + [PcsxrController setConfigFromDefaults]; + } +} + +- (IBAction)setCheckboxInverse:(id)sender +{ + if ([sender isKindOfClass:[NSMatrix class]]) { + sender = [sender selectedCell]; + } + + NSString *key = [self keyForSender:sender]; + if (key) { + [[NSUserDefaults standardUserDefaults] setBool:[sender intValue] ? NO : YES forKey:key]; + [PcsxrController setConfigFromDefaults]; + } +} + +- (IBAction)mcdChangeClicked:(id)sender +{ + NSInteger tag = [sender tag]; + char *mcd; + NSOpenPanel *openDlg = [NSOpenPanel openPanel]; + NSString *path; + + if (tag == 1) { + mcd = Config.Mcd1; + } else { + mcd = Config.Mcd2; + } + + path = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:mcd length:strlen(mcd)]; + + [openDlg setAllowedFileTypes:[PcsxrMemCardHandler supportedUTIs]]; + [openDlg setDirectoryURL:[NSURL fileURLWithPath:[path stringByDeletingLastPathComponent] isDirectory:YES]]; + [openDlg setNameFieldStringValue:[path lastPathComponent]]; + [openDlg beginSheetModalForWindow:[self window] completionHandler:^(NSInteger result) { + if (result == NSFileHandlingPanelOKButton) { + NSURL *mcdURL = [openDlg URLs][0]; + + [ConfigurationController setMemoryCard:tag toURL:mcdURL]; + } + }]; +} + +- (IBAction)mcdNewClicked:(id)sender +{ + NSInteger tag = [sender tag]; + char *mcd; + NSSavePanel *openDlg = [NSSavePanel savePanel]; + NSString *path; + + if (tag == 1) { + mcd = Config.Mcd1; + } else { + mcd = Config.Mcd2; + } + + path = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:mcd length:strlen(mcd)]; + + [openDlg setDirectoryURL:[NSURL fileURLWithPath:[path stringByDeletingLastPathComponent] isDirectory:YES]]; + [openDlg setNameFieldStringValue:NSLocalizedString(@"New Memory Card.mcd", nil)]; + [openDlg setAllowedFileTypes:[PcsxrMemCardHandler supportedUTIs]]; + + [openDlg beginSheetModalForWindow:[self window] completionHandler:^(NSInteger result) { + if (result == NSFileHandlingPanelOKButton) { + NSURL *mcdURL = [openDlg URL]; + const char *fileSysRep; + + if ([mcdURL respondsToSelector:@selector(fileSystemRepresentation)]) { + fileSysRep = [mcdURL fileSystemRepresentation]; + } else { + fileSysRep = [[mcdURL path] fileSystemRepresentation]; + } + + //Workaround/kludge to make sure we create a memory card before posting a notification + strlcpy(mcd, fileSysRep, MAXPATHLEN); + CreateMcd(mcd); + + [ConfigurationController setMemoryCard:tag toURL:mcdURL]; + } + }]; +} + +- (IBAction)setVideoType:(id)sender +{ + NSInteger tag = [[sender selectedItem] tag]; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + if (3 == tag) { + [defaults setBool:YES forKey:@"AutoDetectVideoType"]; + } else if (1 == tag || 2 == tag) { + [defaults setBool:NO forKey:@"AutoDetectVideoType"]; + [defaults setBool:tag==2 forKey:@"VideoTypePAL"]; + } else { + return; + } + [PcsxrController setConfigFromDefaults]; + + if ([sender pullsDown]) { + NSArray *items = [sender itemArray]; + for (id object in items) { + [object setState:NSOffState]; + } + + [[sender selectedItem] setState:NSOnState]; + } +} + +- (void)awakeFromNib +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + [[self window] center]; + + // setup checkboxes + self.checkBoxDefaults = [[NSMutableDictionary alloc] init]; + + // check that the outlets are active before adding them + if (noXaAudioCell) + _checkBoxDefaults[@"NoXaAudio"] = noXaAudioCell; + if (enableNetPlayCell) + _checkBoxDefaults[@"NetPlay"] = enableNetPlayCell; + if (sioIrqAlwaysCell) + _checkBoxDefaults[@"SioIrqAlways"] = sioIrqAlwaysCell; + if (bwMdecCell) + _checkBoxDefaults[@"BlackAndWhiteMDECVideo"] = bwMdecCell; + if (autoVTypeCell) + _checkBoxDefaults[@"AutoDetectVideoType"] = autoVTypeCell; + if (vTypePALCell) + _checkBoxDefaults[@"VideoTypePAL"] = vTypePALCell; + if (noCDAudioCell) + _checkBoxDefaults[@"NoCDAudio"] = noCDAudioCell; + if (usesHleCell) + _checkBoxDefaults[@"UseHLE"] = usesHleCell; + if (usesDynarecCell) + _checkBoxDefaults[@"NoDynarec"] = usesDynarecCell; + if (consoleOutputCell) + _checkBoxDefaults[@"ConsoleOutput"] = consoleOutputCell; + if (spuIrqAlwaysCell) + _checkBoxDefaults[@"SpuIrqAlways"] = spuIrqAlwaysCell; + if (rCountFixCell) + _checkBoxDefaults[@"RootCounterFix"] = rCountFixCell; + if (vSyncWAFixCell) + _checkBoxDefaults[@"VideoSyncWAFix"] = vSyncWAFixCell; + if (noFastBootCell) + _checkBoxDefaults[@"NoFastBoot"] = noFastBootCell; + if (widescreen) + _checkBoxDefaults[@"Widescreen"] = widescreen; + + // make the visuals match the defaults + + for (NSString* key in _checkBoxDefaults) { + if ([defaults integerForKey:key]) { + [_checkBoxDefaults[key] setNextState]; + } + } + + // special cases + if (![PcsxrController biosAvailable]) { + // no bios means always use HLE + [usesHleCell setState:NSOnState]; + [usesHleCell setEnabled:NO]; + } + + + // setup labels + + NSInteger tag = [defaults integerForKey:@"AutoDetectVideoType"]; + if (tag) + tag = 3; + else { + tag = [defaults integerForKey:@"VideoTypePAL"]+1; + } + [vTypePALCell setAutoenablesItems:NO]; + if ([vTypePALCell pullsDown]) { + [[vTypePALCell itemAtIndex:[vTypePALCell indexOfItemWithTag:tag]] setState:NSOnState]; + } else { + [vTypePALCell selectItemAtIndex:[vTypePALCell indexOfItemWithTag:tag]]; + } + + // setup plugin lists + PluginList *list = [PluginList list]; + + [list refreshPlugins]; + [graphicsPlugin setPluginsTo:[list pluginsForType:PSE_LT_GPU] withType: PSE_LT_GPU]; + [soundPlugin setPluginsTo:[list pluginsForType:PSE_LT_SPU] withType: PSE_LT_SPU]; + [padPlugin setPluginsTo:[list pluginsForType:PSE_LT_PAD] withType: PSE_LT_PAD]; + [cdromPlugin setPluginsTo:[list pluginsForType:PSE_LT_CDR] withType: PSE_LT_CDR]; + [netPlugin setPluginsTo:[list pluginsForType:PSE_LT_NET] withType: PSE_LT_NET]; + [sio1Plugin setPluginsTo:[list pluginsForType:PSE_LT_SIO1] withType:PSE_LT_SIO1]; + + // Setup hotkey view + [hkController initialize]; +} + +- (NSString *)keyForSender:(id)sender +{ + for (NSString *key in [self.checkBoxDefaults keyEnumerator]) { + id object = (self.checkBoxDefaults)[key]; + if ([object isEqual:sender]) + return key; + } + + return nil; +} + +- (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem +{ + NSWindow *window = [self window]; + if(tabViewItem == hkTab) { + [window makeFirstResponder:(NSView*)hkController]; + } + else if([window firstResponder] == (NSView*)hkController) { + [hkController resignFirstResponder]; + } +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/EmuThread.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/EmuThread.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/EmuThread.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/EmuThread.h 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,44 @@ +// +// EmuThread.h +// Pcsxr +// +// Created by Gil Pedersen on Sun Sep 21 2003. +// Copyright (c) 2003 __MyCompanyName__. All rights reserved. +// + +#import +#include + +typedef NS_ENUM(char, EmuThreadPauseStatus) { + PauseStateIsNotPaused = 0, + PauseStatePauseRequested, + PauseStateIsPaused +}; + +@interface EmuThread : NSObject + +- (void)EmuThreadRun:(id)anObject; +- (void)EmuThreadRunBios:(id)anObject; +- (void)handleEvents; + ++ (void)run; ++ (void)runBios; ++ (void)stop; ++ (BOOL)pause; ++ (BOOL)pauseSafe; ++ (void)pauseSafeWithBlock:(void (^)(BOOL))theBlock; ++ (void)resume; ++ (void)resetNow; ++ (void)reset; + ++ (BOOL)isPaused; ++ (EmuThreadPauseStatus)pausedState; ++ (BOOL)active; ++ (BOOL)isRunBios; + ++ (void)freezeAt:(NSString *)path which:(int)num; ++ (BOOL)defrostAt:(NSString *)path; + +@end + +extern EmuThread *emuThread; diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/EmuThread.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/EmuThread.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/EmuThread.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/EmuThread.m 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,407 @@ +// +// EmuThread.m +// Pcsxr +// +// Created by Gil Pedersen on Sun Sep 21 2003. +// Copyright (c) 2003 __MyCompanyName__. All rights reserved. +// + +#import +#import +#include +#include +#import "EmuThread.h" +#include "psxcommon.h" +#include "plugins.h" +#include "misc.h" + +typedef NS_OPTIONS(unsigned int, EmulationEvents) { + EMUEVENT_NONE = 0, + EMUEVENT_PAUSE = (1<<0), + EMUEVENT_RESET = (1<<1), + EMUEVENT_STOP = (1<<2) +}; + +EmuThread *emuThread = nil; +static NSString *defrostPath = nil; +static EmulationEvents safeEvent; +static EmuThreadPauseStatus paused; +static BOOL runbios; + +static pthread_cond_t eventCond; +static pthread_mutex_t eventMutex; + +@implementation EmuThread +{ + BOOL wasPaused; + jmp_buf restartJmp; +} + +- (void)setUpThread +{ + NSAssert(![[NSThread currentThread] isEqual:[NSThread mainThread]], @"This function should not be run on the main thread!"); + + [[NSThread currentThread] setName:@"PSX Emu Background thread"]; + NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; + [center addObserver:self + selector:@selector(emuWindowDidClose:) + name:@"emuWindowDidClose" object:nil]; + + [center addObserver:self + selector:@selector(emuWindowWantPause:) + name:@"emuWindowWantPause" object:nil]; + + [center addObserver:self + selector:@selector(emuWindowWantResume:) + name:@"emuWindowWantResume" object:nil]; + + // we shouldn't change the priority, since we might depend on subthreads + //[NSThread setThreadPriority:1.0-((1.0-[NSThread threadPriority])/4.0)]; +} + +- (void)EmuThreadRun:(id)anObject +{ + [self setUpThread]; + + // Do processing here + if (OpenPlugins() == -1) + goto done; + + setjmp(restartJmp); + + int res = CheckCdrom(); + if (res == -1) { + ClosePlugins(); + SysMessage("%s", _("Could not check CD-ROM!\n")); + goto done; + } + + // Auto-detect: region first, then rcnt reset + EmuReset(); + + LoadCdrom(); + + if (defrostPath) { + LoadState([defrostPath fileSystemRepresentation]); + defrostPath = nil; + } + + psxCpu->Execute(); + +done: + emuThread = nil; + + return; +} + +- (void)EmuThreadRunBios:(id)anObject +{ + [self setUpThread]; + + // Do processing here + if (OpenPlugins() == -1) + goto done; + + EmuReset(); + + psxCpu->Execute(); + +done: + emuThread = nil; + + return; +} + +- (void)dealloc +{ + // remove all registered observers + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +- (void)emuWindowDidClose:(NSNotification *)aNotification +{ + [EmuThread stop]; +} + +- (void)emuWindowWantPause:(NSNotification *)aNotification +{ + wasPaused = [EmuThread pause]; +} + +- (void)emuWindowWantResume:(NSNotification *)aNotification +{ + if (!wasPaused) { + [EmuThread resume]; + } + wasPaused = NO; +} + +/* called periodically from the emulation thread */ +- (void)handleEvents +{ + /* only do a trylock here, since we're not interested in blocking, + and we can just handle events next time round */ + if (pthread_mutex_trylock(&eventMutex) == 0) { + while (safeEvent) { + if (safeEvent & EMUEVENT_STOP) { + /* signify that the emulation has stopped */ + emuThread = nil; + paused = PauseStateIsNotPaused; + + /* better unlock the mutex before killing ourself */ + pthread_mutex_unlock(&eventMutex); + + ClosePlugins(); + SysClose(); + + //[[NSThread currentThread] autorelease]; + [NSThread exit]; + return; + } + + if (safeEvent & EMUEVENT_RESET) { +#if 0 + /* signify that the emulation has stopped */ + [emuThread autorelease]; + emuThread = nil; + + /* better unlock the mutex before killing ourself */ + pthread_mutex_unlock(&eventMutex); + + ClosePlugins(); + + // start a new emulation thread + [EmuThread run]; + + //[[NSThread currentThread] autorelease]; + [NSThread exit]; + return; +#else + safeEvent &= ~EMUEVENT_RESET; + pthread_mutex_unlock(&eventMutex); + + longjmp(restartJmp, 0); +#endif + } + + if (safeEvent & EMUEVENT_PAUSE) { + paused = PauseStateIsPaused; + /* wait until we're signalled */ + pthread_cond_wait(&eventCond, &eventMutex); + } + } + pthread_mutex_unlock(&eventMutex); + } +} + ++ (void)run +{ + int err; + + if (emuThread) { + [EmuThread resume]; + return; + } + + if (pthread_mutex_lock(&eventMutex) != 0) { + err = pthread_cond_init(&eventCond, NULL); + if (err) return; + + err = pthread_mutex_init(&eventMutex, NULL); + if (err) return; + + pthread_mutex_lock(&eventMutex); + } + + safeEvent = EMUEVENT_NONE; + paused = NO; + runbios = NO; + + if (SysInit() != 0) { + pthread_mutex_unlock(&eventMutex); + return; + } + + emuThread = [[EmuThread alloc] init]; + + [NSThread detachNewThreadSelector:@selector(EmuThreadRun:) + toTarget:emuThread withObject:nil]; + + pthread_mutex_unlock(&eventMutex); +} + ++ (void)runBios +{ + int err; + + if (emuThread) { + [EmuThread resume]; + return; + } + + if (pthread_mutex_lock(&eventMutex) != 0) { + err = pthread_cond_init(&eventCond, NULL); + if (err) return; + + err = pthread_mutex_init(&eventMutex, NULL); + if (err) return; + + pthread_mutex_lock(&eventMutex); + } + + safeEvent = EMUEVENT_NONE; + paused = PauseStateIsNotPaused; + runbios = YES; + + if (SysInit() != 0) { + pthread_mutex_unlock(&eventMutex); + return; + } + + emuThread = [[EmuThread alloc] init]; + + [NSThread detachNewThreadSelector:@selector(EmuThreadRunBios:) + toTarget:emuThread withObject:nil]; + + pthread_mutex_unlock(&eventMutex); +} + ++ (void)stop +{ + pthread_mutex_lock(&eventMutex); + safeEvent = EMUEVENT_STOP; + pthread_mutex_unlock(&eventMutex); + + // wake it if it's sleeping + pthread_cond_broadcast(&eventCond); +} + ++ (BOOL)pause +{ + if (paused != PauseStateIsNotPaused || ![EmuThread active]) + return YES; + + pthread_mutex_lock(&eventMutex); + safeEvent |= EMUEVENT_PAUSE; + paused = PauseStatePauseRequested; + pthread_mutex_unlock(&eventMutex); + + pthread_cond_broadcast(&eventCond); + + return NO; +} + ++ (BOOL)pauseSafe +{ + if ((paused == PauseStateIsPaused) || ![EmuThread active]) + return YES; + + [EmuThread pause]; + while ([EmuThread pausedState] != PauseStateIsPaused) + [NSThread sleepUntilDate:[[NSDate date] dateByAddingTimeInterval:0.05]]; + + return NO; +} + ++ (void)pauseSafeWithBlock:(void (^)(BOOL))theBlock +{ + dispatch_async(dispatch_get_global_queue(0, 0), ^{ + BOOL wasPaused = [self pauseSafe]; + dispatch_async(dispatch_get_main_queue(), ^{theBlock(wasPaused);}); + }); +} + ++ (void)resume +{ + if (paused == PauseStateIsNotPaused || ![EmuThread active]) + return; + + pthread_mutex_lock(&eventMutex); + + safeEvent &= ~EMUEVENT_PAUSE; + paused = PauseStateIsNotPaused; + pthread_mutex_unlock(&eventMutex); + + pthread_cond_broadcast(&eventCond); +} + ++ (void)reset +{ + pthread_mutex_lock(&eventMutex); + safeEvent = EMUEVENT_RESET; + pthread_mutex_unlock(&eventMutex); + + pthread_cond_broadcast(&eventCond); +} + +// must only be called from within the emulation thread!!! ++ (void)resetNow +{ + /* signify that the emulation has stopped */ + emuThread = nil; + + ClosePlugins(); + + // start a new emulation thread + [EmuThread run]; + + //[[NSThread currentThread] autorelease]; + [NSThread exit]; + return; +} + ++ (EmuThreadPauseStatus)pausedState +{ + return paused; +} + ++ (BOOL)isPaused +{ + return paused != PauseStateIsNotPaused; +} + ++ (BOOL)isRunBios +{ + return runbios; +} + ++ (BOOL)active +{ + return emuThread ? YES : NO; +} + ++ (void)freezeAt:(NSString *)path which:(int)num +{ + [self pauseSafeWithBlock:^(BOOL emuWasPaused) { + int tmpNum = num; + char Text[256]; + + GPU_freeze(2, (GPUFreeze_t *)&tmpNum); + int ret = SaveState([path fileSystemRepresentation]); + + if (!emuWasPaused) { + [EmuThread resume]; + } + + if (ret == 0) + snprintf(Text, sizeof(Text), _("*PCSXR*: Saved State %d"), num); + else + snprintf(Text, sizeof(Text), _("*PCSXR*: Error Saving State %d"), num); + GPU_displayText(Text); + }]; +} + ++ (BOOL)defrostAt:(NSString *)path +{ + const char *cPath = [path fileSystemRepresentation]; + if (CheckState(cPath) != 0) + return NO; + + defrostPath = path; + [EmuThread reset]; + + GPU_displayText(_("*PCSXR*: Loaded State")); + return YES; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/ExtendedKeys.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/ExtendedKeys.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/ExtendedKeys.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/ExtendedKeys.h 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,28 @@ + +#ifndef __EXTENDED_KEYS_H__ +#define __EXTENDED_KEYS_H__ + +enum { + PSX_FREEZE_KEY = 0xFFBE/*XK_F1*/, + PSX_NEXT_FREEZE_SLOT_KEY = 0xFFBF/*XK_F2*/, + PSX_DEFROST_KEY = 0xFFC0/*XK_F3*/, + PSX_SHOW_FREEZE_PIC_KEY = 0xFFC1/*XK_F4*/, + PSX_SIO_ALWAYS_ON_KEY = 0xFFC2/*XK_F5*/, + PSX_BW_MDEC_KEY = 0xFFC3/*XK_F6*/, + PSX_XA_AUDIO_ON_KEY = 0xFFC4/*XK_F7*/, + PSX_SNAPSHOT_KEY = 0xFFC5/*XK_F8*/, + PSX_OPEN_SHELL_KEY = 0xFFC6/*XK_F9*/, + PSX_CLOSE_SHELL_KEY = 0xFFC7/*XK_F10*/, + + PSX_STOP_KEY = 0xFF1B/*XK_Escape*/, + + GPU_FULLSCREEN_KEY = 0x0100, + GPU_FPS_DISPLAY_KEY = 0xFFFF,/*XK_Delete*/ + + // Fake HotKeys + GPU_HOTKEYS = 0x020, + GPU_FAST_FORWARD, + GPU_FRAME_LIMIT +}; + +#endif //__EXTENDED_KEYS_H__ diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/HotkeyController.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/HotkeyController.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/HotkeyController.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/HotkeyController.h 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,25 @@ +/** + * HotkeyController + * Nicolas Pépin-Perreault - npepinpe - 2012 + */ + +#import + +@interface HotkeyController : NSView + +@property (weak) IBOutlet NSTextField *FastForward; +@property (weak) IBOutlet NSTextField *SaveState; +@property (weak) IBOutlet NSTextField *LoadState; +@property (weak) IBOutlet NSTextField *NextState; +@property (weak) IBOutlet NSTextField *PrevState; +@property (weak) IBOutlet NSTextField *FrameLimit; + + +@property NSInteger configInput; + +- (void) initialize; +- (BOOL) handleMouseDown:(NSEvent *)mouseEvent; +- (IBAction) hotkeySet:(id)sender; +- (void) hotkeyCancel; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/HotkeyController.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/HotkeyController.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/HotkeyController.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/HotkeyController.m 2016-06-30 16:53:19.000000000 +0000 @@ -0,0 +1,211 @@ +/** + * HotkeyController.m + * Pcsxr + * + * Created by Nicolas Pepin-Perreault on 12-12-10. + * + * Adapted from the Cocoa port of DeSMuMe + */ + +#import "HotkeyController.h" + +#define INPUT_HOLD_TIME 0.1 + +@interface HotkeyController () +@property (strong) NSButton *lastConfigButton; +@property (strong) NSMutableDictionary *hotkeysList; +@property (strong) NSDictionary *keyNameTable; +@property (strong) NSMutableDictionary *hotkeyOutlets; +@end + +@implementation HotkeyController + +@synthesize FastForward; +@synthesize FrameLimit; +@synthesize LoadState; +@synthesize NextState; +@synthesize PrevState; +@synthesize SaveState; + +- (void)initialize +{ + self.lastConfigButton = nil; + self.configInput = 0; + self.hotkeysList = [[NSMutableDictionary alloc] initWithCapacity:16]; + self.keyNameTable = [[NSDictionary alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"KeyNames" ofType:@"plist"]]; + self.hotkeyOutlets = [[NSMutableDictionary alloc] initWithCapacity:8]; + + [self mapOutletToIdentifier:FastForward forIdentifier:@"FastForward"]; + [self mapOutletToIdentifier:SaveState forIdentifier:@"SaveState"]; + [self mapOutletToIdentifier:LoadState forIdentifier:@"LoadState"]; + [self mapOutletToIdentifier:NextState forIdentifier:@"NextState"]; + [self mapOutletToIdentifier:PrevState forIdentifier:@"PrevState"]; + [self mapOutletToIdentifier:FrameLimit forIdentifier:@"FrameLimit"]; +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +- (void)mapOutletToIdentifier:(id)outlet forIdentifier:(NSString*)identifier1 +{ + (self.hotkeyOutlets)[identifier1] = outlet; + [self setHotkeyDisplay:identifier1]; +} + +- (void)setHotkeyDisplay:(NSString*)keyIdent +{ + NSString *label = [self parseMappingDisplayString:keyIdent]; + NSTextField *displayField = (self.hotkeyOutlets)[keyIdent]; + + if(displayField) { + [displayField setStringValue:label]; + } +} + +- (void)mouseDown:(NSEvent *)theEvent +{ + BOOL isHandled = [self handleMouseDown:theEvent]; + if (!isHandled) + { + [super mouseDown:theEvent]; + } +} + +- (void)mouseDragged:(NSEvent *)theEvent +{ + [self mouseDown:theEvent]; +} + +- (void)rightMouseDown:(NSEvent *)theEvent +{ + BOOL isHandled = [self handleMouseDown:theEvent]; + if (!isHandled) + { + [super rightMouseDown:theEvent]; + } +} + +- (void)rightMouseDragged:(NSEvent *)theEvent +{ + [self rightMouseDown:theEvent]; +} + +- (void)otherMouseDown:(NSEvent *)theEvent +{ + BOOL isHandled = [self handleMouseDown:theEvent]; + if (!isHandled) + { + [super otherMouseDown:theEvent]; + } +} + +- (void)otherMouseDragged:(NSEvent *)theEvent +{ + [self otherMouseDown:theEvent]; +} + +- (BOOL) handleMouseDown:(NSEvent *)mouseEvent +{ + if (self.configInput != 0) + { + [self hotkeyCancel]; + } + + return YES; +} + +- (void)keyDown:(NSEvent *)theEvent +{ + NSString *keyCode = [NSString stringWithFormat:@"%d", [theEvent keyCode]]; + NSString *keyLabel = (NSString *) (self.keyNameTable)[keyCode]; + + if (self.configInput != 0) + { + // Save input + NSString *ident = [self.lastConfigButton identifier]; + [self saveHotkey:ident device:@"NSEventKeyboard" deviceLabel:@"Keyboard" code:keyCode label:keyLabel]; + [self setHotkeyDisplay:ident]; + [self hotkeyCancel]; + } +} + +- (void)saveHotkey:(NSString*)keyIdent device:(NSString*)device deviceLabel:(NSString*)deviceLabel code:(NSString*)keyCode label:(NSString*)keyLabel +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults] ; + NSMutableDictionary *tempUserMappings = [NSMutableDictionary dictionaryWithDictionary:[defaults dictionaryForKey:@"HotkeyBindings"]]; + [tempUserMappings setValue:@{@"device": device, + @"deviceName": deviceLabel, + @"keyCode": keyCode, + @"keyLabel": keyLabel} forKey:keyIdent]; + [defaults setValue:tempUserMappings forKey:@"HotkeyBindings"]; +} + +- (NSString *) parseMappingDisplayString:(NSString *)keyString +{ + NSDictionary *userMappings = [[NSUserDefaults standardUserDefaults] dictionaryForKey:@"HotkeyBindings"]; + NSDictionary *binding = (NSDictionary *)[userMappings valueForKey:keyString]; + + NSString *displayString = @""; + if(binding) { + NSString *deviceLabel = (NSString *)[binding valueForKey:@"deviceName"]; + NSString *keyLabel = (NSString *)[binding valueForKey:@"keyLabel"]; + + displayString = [NSString stringWithString:deviceLabel]; + displayString = [displayString stringByAppendingString:@": "]; + displayString = [displayString stringByAppendingString:keyLabel]; + } + + return displayString; +} + +- (IBAction) hotkeySet:(id)sender +{ + NSButton *theButton = (NSButton *)sender; + + if (self.configInput && self.lastConfigButton != theButton) + { + [self.lastConfigButton setState:NSOffState]; + } + + if ([theButton state] == NSOnState) + { + self.lastConfigButton = theButton; + [self.hotkeysList removeAllObjects]; + self.configInput = [theButton tag]; + } + else + { + [self hotkeyCancel]; + } + +} + +- (void) hotkeyCancel +{ + if (self.lastConfigButton != nil) + { + [self.lastConfigButton setState:NSOffState]; + self.lastConfigButton = nil; + } + + self.configInput = 0; +} + +- (BOOL)acceptsFirstResponder +{ + return YES; +} + +- (BOOL)becomeFirstResponder +{ + return YES; +} + +- (BOOL)resignFirstResponder +{ + return YES; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/hotkeys.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/hotkeys.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/hotkeys.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/hotkeys.h 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,15 @@ +// +// hotkeys.h +// Pcsxr +// +// Created by Nicolas Pepin-Perreault on 12-12-12. +// +// + +#ifndef Pcsxr_hotkeys_h +#define Pcsxr_hotkeys_h + +void attachHotkeys(); +void detachHotkeys(); + +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/hotkeys.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/hotkeys.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/hotkeys.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/hotkeys.m 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,145 @@ +// +// hotkeys.m +// Pcsxr +// +// Created by Nicolas Pepin-Perreault on 12-12-12. +// +// + +#import +#import "hotkeys.h" +#import "EmuThread.h" +#include "plugins.h" +#include "ExtendedKeys.h" +#import "PcsxrController.h" + +#define HK_MAX_STATE 10 +static id monitor; +static id gpuMonitor; +static int currentState = 0; +static NSMutableDictionary *hotkeys = nil; + +typedef NS_ENUM(int, PCSXR_HotKey) { + HK_FAST_FORWARD, + HK_SAVE_STATE, + HK_LOAD_STATE, + HK_NEXT_STATE, + HK_PREV_STATE, + HK_FRAME_LIMIT +}; + +void nextState() { + currentState++; + if(currentState == HK_MAX_STATE) { + currentState = 0; + } +} + +void prevState() { + currentState--; + if(currentState < 0) { + currentState = HK_MAX_STATE-1; + } +} + +BOOL handleHotkey(NSString* keyCode) { + if([EmuThread active]) { // Don't catch hotkeys if there is no emulation + NSNumber *ident = hotkeys[keyCode]; + + if(ident != nil) { + switch([ident intValue]) { + case HK_FAST_FORWARD: + // We ignore FastForward requests if the emulation is paused + if(![EmuThread isPaused]) { + GPU_keypressed(GPU_FAST_FORWARD); + } + break; + + case HK_FRAME_LIMIT: + // Ignore FrameLimit requests if paused + if(![EmuThread isPaused]) { + GPU_keypressed(GPU_FRAME_LIMIT); + } + break; + + case HK_SAVE_STATE: + [PcsxrController saveState:currentState]; + break; + + case HK_LOAD_STATE: + [PcsxrController loadState:currentState]; + break; + + case HK_NEXT_STATE: + nextState(); + GPU_displayText((char*)[[NSString stringWithFormat:@"State Slot: %d", currentState] UTF8String]); + break; + + case HK_PREV_STATE: + prevState(); + GPU_displayText((char*)[[NSString stringWithFormat:@"State Slot: %d", currentState] UTF8String]); + break; + + default: + NSLog(@"Invalid hotkey identifier %i.", [ident intValue]); + break; + } + + return YES; + } + } + + return NO; +} + +void setupHotkey(PCSXR_HotKey hk, NSString *label, NSDictionary *binding) { + if(binding != nil) + hotkeys[binding[@"keyCode"]] = @(hk); +} + +void setupHotkeys() { + NSDictionary *bindings = [[NSUserDefaults standardUserDefaults] objectForKey:@"HotkeyBindings"]; + hotkeys = [[NSMutableDictionary alloc] initWithCapacity:[bindings count]]; + + setupHotkey(HK_FAST_FORWARD, @"FastForward", bindings[@"FastForward"]); + setupHotkey(HK_SAVE_STATE, @"SaveState", bindings[@"SaveState"]); + setupHotkey(HK_LOAD_STATE, @"LoadState", bindings[@"LoadState"]); + setupHotkey(HK_NEXT_STATE, @"NextState", bindings[@"NextState"]); + setupHotkey(HK_PREV_STATE, @"PrevState", bindings[@"PrevState"]); + setupHotkey(HK_FRAME_LIMIT, @"FrameLimit", bindings[@"FrameLimit"]); + + currentState = 0; +} + +void attachHotkeys() { + // Configurable hotkeys + NSEvent* (^handler)(NSEvent*) = ^(NSEvent *event) { + if(handleHotkey([NSString stringWithFormat:@"%d", [event keyCode]])) { + return (NSEvent*)nil; // handled + } + + // Not handled + return event; + }; + setupHotkeys(); + monitor = [NSEvent addLocalMonitorForEventsMatchingMask:NSKeyUpMask handler:handler]; + + // GPU key presses + NSEvent* (^gpuKeypress)(NSEvent*) = ^(NSEvent *event) { + if (event.modifierFlags & NSControlKeyMask) { + GPU_keypressed([event keyCode]); + return (NSEvent*)nil; + } else { + return event; + } + }; + gpuMonitor = [NSEvent addLocalMonitorForEventsMatchingMask:NSKeyUpMask handler:gpuKeypress]; +} + +void detachHotkeys() { + hotkeys = nil; + [NSEvent removeMonitor:monitor]; + [NSEvent removeMonitor:gpuMonitor]; + monitor = nil; + gpuMonitor = nil; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/LaunchArg.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/LaunchArg.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/LaunchArg.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/LaunchArg.h 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,25 @@ +// +// LaunchArg.h +// Pcsxr +// +// Created by C.W. Betts on 7/8/13. +// +// + +#import + +typedef enum _LaunchArgOrder { + LaunchArgPreRun = 0, + LaunchArgRun = 200, + LaunchArgPostRun = 400 +}LaunchArgOrder; + +@interface LaunchArg : NSObject +@property (readonly) unsigned launchOrder; +@property (readonly, copy, nonatomic) dispatch_block_t theBlock; +@property (readonly, copy) NSString *argument; + +- (instancetype)initWithLaunchOrder:(unsigned)order block:(dispatch_block_t)block argument:(NSString*)arg; +- (instancetype)initWithLaunchOrder:(unsigned)order argument:(NSString*)arg block:(dispatch_block_t)block NS_DESIGNATED_INITIALIZER; +- (void)addToDictionary:(NSMutableDictionary*)toAdd; +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/LaunchArg.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/LaunchArg.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/LaunchArg.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/LaunchArg.m 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,51 @@ +// +// LaunchArg.m +// Pcsxr +// +// Created by C.W. Betts on 7/8/13. +// +// + +#import "LaunchArg.h" + +@interface LaunchArg () +@property (readwrite) unsigned launchOrder; +@property (readwrite, copy, nonatomic) dispatch_block_t theBlock; +@property (readwrite, copy) NSString *argument; +@end + +@implementation LaunchArg +@synthesize argument = _argument; +@synthesize launchOrder = _launchOrder; +@synthesize theBlock = _theBlock; +- (void)setTheBlock:(dispatch_block_t)theBlock +{ + _theBlock = [theBlock copy]; +} + +- (instancetype)initWithLaunchOrder:(unsigned)order argument:(NSString*)arg block:(dispatch_block_t)block +{ + if (self = [super init]) { + self.launchOrder = order; + self.theBlock = block; + self.argument = arg; + } + return self; +} + +- (instancetype)initWithLaunchOrder:(unsigned)order block:(dispatch_block_t)block argument:(NSString*)arg +{ + return [self initWithLaunchOrder:order argument:arg block:block]; +} + +- (void)addToDictionary:(NSMutableDictionary*)toAdd +{ + toAdd[self.argument] = self; +} + +- (NSString*)description +{ + return [NSString stringWithFormat:@"Arg: %@, order: %u, block addr: %p", _argument, _launchOrder, _theBlock]; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/main.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/main.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/main.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/main.m 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,311 @@ +// +// main.m +// +// Created by Gil Pedersen on Fri Jun 06 2003. +// Copyright (c) 2003 SoftWorkz. All rights reserved. +// + +#import +#import "EmuThread.h" +#import "PcsxrController.h" +#import "ConfigurationController.h" +#include +#include +#include "psxcommon.h" +#include "sio.h" +#include +#import "hotkeys.h" + +#ifndef NSFoundationVersionNumber10_8_4 +#define NSFoundationVersionNumber10_8_4 945.18 +#endif + +static inline void RunOnMainThreadSync(dispatch_block_t block) +{ + if ([NSThread isMainThread]) { + block(); + } else { + dispatch_sync(dispatch_get_main_queue(), block); + } +} + +static BOOL sysInited = NO; +//#define EMU_LOG +static IOPMAssertionID powerAssertion = kIOPMNullAssertionID; + +void PADhandleKey(int key); + +static inline BOOL IsRootCwd() +{ + char buf[MAXPATHLEN]; + char *cwd = getcwd(buf, sizeof(buf)); + return (cwd && (strcmp(cwd, "/") == 0)); +} + +static inline BOOL IsTenPointNineOrLater() +{ + int curFoundNum = floor(NSFoundationVersionNumber), tenPointEightFoundNum = floor(NSFoundationVersionNumber10_8_4); + return curFoundNum > tenPointEightFoundNum; +} + +static BOOL IsFinderLaunch(const int argc, const char **argv) +{ + BOOL isNewerOS = IsTenPointNineOrLater(); + /* -psn_XXX is passed if we are launched from Finder in 10.8 and earlier */ + if ( (!isNewerOS) && (argc >= 2) && (strncmp(argv[1], "-psn", 4) == 0) ) { + return YES; + } else if ((isNewerOS) && (argc == 1) && IsRootCwd()) { + /* we might still be launched from the Finder; on 10.9+, you might not + get the -psn command line anymore. Check version, if there's no + command line, and if our current working directory is "/". */ + return YES; + } + return NO; /* not a Finder launch. */ +} + +int main(int argc, const char *argv[]) +{ + if (argc >= 2 && IsFinderLaunch(argc, argv)) { + wasFinderLaunch = YES; + char parentdir[MAXPATHLEN]; + char *c; + + strlcpy(parentdir, argv[0], sizeof(parentdir)); + c = (char*)parentdir; + + while (*c != '\0') /* go to end */ + c++; + + while (*c != '/') /* back up to parent */ + c--; + + *c++ = '\0'; /* cut off last part (binary name) */ + + assert(chdir(parentdir) == 0); /* chdir to the binary app's parent */ + assert(chdir("../../../") == 0); /* chdir to the .app's parent */ + } else { + for (int i = 1; i < argc; i++) { + //All the other option will be handled in the app delegate's awakeFromNib + if (!strcasecmp("--help", argv[i]) || !strcasecmp("-help", argv[i]) || !strcasecmp("-h", argv[i])) { + fprintf(stdout, "%s\n", argv[0]); + ShowHelpAndExit(stdout, EXIT_SUCCESS); + } + } + } + + strcpy(Config.BiosDir, "Bios/"); + strcpy(Config.PatchesDir, "Patches/"); + + // Setup the X11 window + if (getenv("DISPLAY") == NULL) + setenv("DISPLAY", ":0.0", 0); // Default to first local display + + return NSApplicationMain(argc, argv); +} + +int SysInit() +{ + if (!sysInited) { +#ifdef EMU_LOG +#ifndef LOG_STDOUT + NSFileManager *manager = [NSFileManager defaultManager]; + NSURL *supportURL = [manager URLForDirectory:NSLibraryDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:NULL]; + NSURL *logFolderURL = [supportURL URLByAppendingPathComponent:@"Logs/PCSXR"]; + if (![logFolderURL checkResourceIsReachableAndReturnError:NULL]) + [manager createDirectoryAtPath:[logFolderURL path] withIntermediateDirectories:YES attributes:nil error:NULL]; + //We use the log extension so that OS X's console app can open it by default. + NSURL *logFileURL = [logFolderURL URLByAppendingPathComponent:@"PCSX-R emuLog.log"]; + + emuLog = fopen([[logFileURL path] fileSystemRepresentation], "wb"); +#else + emuLog = stdout; +#endif + setvbuf(emuLog, NULL, _IONBF, 0); +#endif + + if (EmuInit() != 0) + return -1; + + sysInited = YES; + } + + if (LoadPlugins() == -1) { + return -1; + } + + LoadMcds(Config.Mcd1, Config.Mcd2); + + IOReturn success = IOPMAssertionCreateWithName(kIOPMAssertionTypePreventUserIdleDisplaySleep, kIOPMAssertionLevelOn, CFSTR("PSX Emu Running"), &powerAssertion); + if (success != kIOReturnSuccess) { + NSLog(@"Unable to stop sleep, error code %d", success); + } + + attachHotkeys(); + + return 0; +} + +void SysReset() +{ + [EmuThread resetNow]; + //EmuReset(); +} + +static void AddStringToLogList(NSString *themsg) +{ + static NSMutableString *theStr; + static dispatch_once_t onceToken; + NSRange newlineRange, fullLineRange; + dispatch_once(&onceToken, ^{ + theStr = [[NSMutableString alloc] init]; + }); + [theStr appendString:themsg]; + while ((newlineRange = [theStr rangeOfString:@"\n"]).location != NSNotFound) { + newlineRange = [theStr rangeOfComposedCharacterSequencesForRange:newlineRange]; + NSString *tmpStr = [theStr substringToIndex:newlineRange.location]; + if (tmpStr && ![tmpStr isEqualToString:@""]) { + NSLog(@"%@", tmpStr); + } + fullLineRange.location = 0; + fullLineRange.length = newlineRange.location + newlineRange.length; + fullLineRange = [theStr rangeOfComposedCharacterSequencesForRange:fullLineRange]; + [theStr deleteCharactersInRange:fullLineRange]; + } +} + +void SysPrintf(const char *fmt, ...) +{ + va_list list; + NSString *msg; + + va_start(list, fmt); + msg = [[NSString alloc] initWithFormat:@(fmt) arguments:list]; + va_end(list); + + RunOnMainThreadSync(^{ + if (Config.PsxOut) + AddStringToLogList(msg); +#ifdef EMU_LOG +#ifndef LOG_STDOUT + if (emuLog) + fprintf(emuLog, "%s", [msg UTF8String]); +#endif +#endif + }); +} + +void SysMessage(const char *fmt, ...) +{ + va_list list; + va_start(list, fmt); + NSString *msg = [[NSString alloc] initWithFormat:@(fmt) arguments:list]; + va_end(list); + + NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey: msg}; + + RunOnMainThreadSync(^{ + [NSApp presentError:[NSError errorWithDomain:@"Unknown Domain" code:-1 userInfo:userInfo]]; + }); +} + +void *SysLoadLibrary(const char *lib) +{ + NSBundle *bundle = [[NSBundle alloc] initWithPath:[[NSFileManager defaultManager] stringWithFileSystemRepresentation:lib length:strlen(lib)]]; + if (bundle != nil) { + return dlopen([[bundle executablePath] fileSystemRepresentation], RTLD_LAZY /*RTLD_NOW*/); + } + return dlopen(lib, RTLD_LAZY); +} + +void *SysLoadSym(void *lib, const char *sym) +{ + return dlsym(lib, sym); +} + +const char *SysLibError() +{ +#ifdef DEBUG + const char *theErr = dlerror(); + if (theErr) { + NSLog(@"dlerror(): %s.", theErr); + } + return theErr; +#else + return dlerror(); +#endif +} + +void SysCloseLibrary(void *lib) { + // We do not close libraries due to how Objective C code misbehaves if unloaded, + // particularly constant NSStrings. + //dlclose(lib); +} + +// Called periodically from the emu thread +void SysUpdate() +{ +#if 0 + PADhandleKey(PAD1_keypressed() & 0xffffffff); + PADhandleKey(PAD2_keypressed() & 0xffffffff); +#else + PAD1_keypressed(); + PAD2_keypressed(); +#endif + [emuThread handleEvents]; +} + +// Returns to the Gui +void SysRunGui() +{ + if (powerAssertion != kIOPMNullAssertionID) { + IOPMAssertionRelease(powerAssertion); + powerAssertion = kIOPMNullAssertionID; + } +} + +// Close mem and plugins +void SysClose() +{ + EmuShutdown(); + ReleasePlugins(); + + if (powerAssertion != kIOPMNullAssertionID) { + IOPMAssertionRelease(powerAssertion); + powerAssertion = kIOPMNullAssertionID; + } + + if (emuLog != NULL) { + fclose(emuLog); + emuLog = NULL; + } + + sysInited = NO; + detachHotkeys(); + + if (((PcsxrController *)[NSApp delegate]).endAtEmuClose) { + [NSApp stop:nil]; + } + + //Tell the memory card manager that the memory cards changed. + //The number three tells the mem card manager to update both cards 1 and 2. + [[NSNotificationCenter defaultCenter] postNotificationName:memChangeNotifier object:nil userInfo:@{memCardChangeNumberKey: @3}]; + + //Clear the log list + RunOnMainThreadSync(^{ + if (Config.PsxOut) + AddStringToLogList(@"\n"); + }); +} + +void OnFile_Exit() +{ + SysClose(); + [NSApp stop:nil]; +} + +char* Pcsxr_locale_text(char* toloc) +{ + NSString *origString = @(toloc), *transString = nil; + transString = [[NSBundle mainBundle] localizedStringForKey:origString value:@"" table:nil]; + return (char*)[transString UTF8String]; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/MemBadgeView.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/MemBadgeView.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/MemBadgeView.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/MemBadgeView.h 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,15 @@ +// +// MemBadgeView.h +// Pcsxr +// +// Created by C.W. Betts on 7/6/13. +// +// + +#import + +//TODO: also include the memory count in the view as well. +IB_DESIGNABLE +@interface MemBadgeView : NSView + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/MemBadgeView.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/MemBadgeView.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/MemBadgeView.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/MemBadgeView.m 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,51 @@ +// +// MemBadgeView.m +// Pcsxr +// +// Created by C.W. Betts on 7/6/13. +// +// + +#import "MemBadgeView.h" + +@implementation MemBadgeView + +//TODO: also include the memory count in the view as well. +- (instancetype)initWithFrame:(NSRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + // Initialization code here. + } + + return self; +} + +- (void)drawRect:(NSRect)dirtyRect +{ + NSRect drawToRect = dirtyRect; + NSImage *tmpDraw = nil; + if (!NSEqualSizes(self.frame.size, dirtyRect.size)) { + drawToRect = (NSRect) {NSZeroPoint, self.frame.size}; + tmpDraw = [[NSImage alloc] initWithSize:drawToRect.size]; + [tmpDraw lockFocus]; + } + + [[NSColor whiteColor] set]; + [[NSBezierPath bezierPathWithOvalInRect:drawToRect] fill]; + [[NSColor redColor] set]; + NSRect smallerRect = drawToRect; + smallerRect.origin.x += 2; + smallerRect.origin.y += 2; + smallerRect.size.height -= 4; + smallerRect.size.width -= 4; + [[NSBezierPath bezierPathWithOvalInRect:smallerRect] fill]; + + if (tmpDraw) { + [tmpDraw unlockFocus]; + + [tmpDraw drawInRect:dirtyRect fromRect:dirtyRect operation:NSCompositeSourceOver fraction:1.0]; + } +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/OSXPlugLocalization.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/OSXPlugLocalization.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/OSXPlugLocalization.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/OSXPlugLocalization.h 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,21 @@ +// +// OSXPlugLocalization.h +// Pcsxr +// +// Created by C.W. Betts on 7/8/13. +// +// + +#ifndef Pcsxr_OSXPlugLocalization_h +#define Pcsxr_OSXPlugLocalization_h + +#define PLUGLOCIMP(klass) \ +char* PLUGLOC(char *toloc) \ +{ \ +NSBundle *mainBundle = [NSBundle bundleForClass:klass]; \ +NSString *origString = @(toloc), *transString = nil; \ +transString = [mainBundle localizedStringForKey:origString value:@"" table:nil]; \ +return (char*)[transString UTF8String]; \ +} + +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrCheatHandler.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrCheatHandler.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrCheatHandler.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrCheatHandler.h 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,14 @@ +// +// PcsxrCheatHandler.h +// Pcsxr +// +// Created by C.W. Betts on 8/1/13. +// +// + +#import +#import "PcsxrFileHandle.h" + +@interface PcsxrCheatHandler : NSObject + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrCheatHandler.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrCheatHandler.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrCheatHandler.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrCheatHandler.m 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,36 @@ +// +// PcsxrCheatHandler.m +// Pcsxr +// +// Created by C.W. Betts on 8/1/13. +// +// + +#import "PcsxrCheatHandler.h" +#import "CheatController.h" +#import "PcsxrController.h" +#include "psxcommon.h" +#include "cheat.h" + +@implementation PcsxrCheatHandler + ++ (NSArray *)supportedUTIs +{ + static NSArray *utisupport; + if (utisupport == nil) { + utisupport = @[@"com.codeplex.pcsxr.cheat"]; + } + return utisupport; +} + +- (BOOL)handleFile:(NSString *)theFile +{ + LoadCheats([theFile fileSystemRepresentation]); + + if ([(PcsxrController*)[NSApp delegate] cheatController]) { + [[(PcsxrController*)[NSApp delegate] cheatController] refresh]; + } + return YES; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrController.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrController.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrController.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrController.h 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,40 @@ +/* PcsxrController */ + +#import +#import "EmuThread.h" +#import "PluginList.h" +#import "RecentItemsMenu.h" + +@class ConfigurationController; +@class CheatController; + +__private_extern void ShowHelpAndExit(FILE* output, int exitCode); +extern BOOL wasFinderLaunch; + +@interface PcsxrController : NSObject +@property (weak) IBOutlet RecentItemsMenu *recentItems; +@property (strong, readonly) CheatController *cheatController; +@property (readonly) BOOL endAtEmuClose; + +- (IBAction)ejectCD:(id)sender; +- (IBAction)pause:(id)sender; +- (IBAction)showCheatsWindow:(id)sender; +- (IBAction)preferences:(id)sender; +- (IBAction)reset:(id)sender; +- (IBAction)runCD:(id)sender; +- (IBAction)runIso:(id)sender; +- (IBAction)runBios:(id)sender; +- (IBAction)freeze:(id)sender; +- (IBAction)defrost:(id)sender; +- (IBAction)fullscreen:(id)sender; +- (IBAction)pauseInBackground:(id)sender; +- (void)runURL:(NSURL*)url; + ++ (void)setConfigFromDefaults; ++ (void)setDefaultFromConfig:(NSString *)defaultKey; ++ (BOOL)biosAvailable; ++ (NSString*)saveStatePath:(int)slot; ++ (void)saveState:(int)num; ++ (void)loadState:(int)num; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrController.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrController.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrController.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrController.m 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,1047 @@ +#import +#import "PcsxrController.h" +#import "ConfigurationController.h" +#import "CheatController.h" +#import "EmuThread.h" +#import "PcsxrMemCardHandler.h" +#import "PcsxrPluginHandler.h" +#import "PcsxrDiscHandler.h" +#import "PcsxrFreezeStateHandler.h" +#import "PcsxrCheatHandler.h" +#import "LaunchArg.h" +#include +#include +#include "psxcommon.h" +#include "plugins.h" +#include "misc.h" +#include "cdrom.h" +#include "ExtendedKeys.h" + +NSDictionary *prefStringKeys = nil; +NSDictionary *prefByteKeys = nil; +NSDictionary *prefURLKeys = nil; +NSMutableArray *biosList = nil; +NSString *saveStatePath = nil; +BOOL wasFinderLaunch = NO; + + +#define HELPSTR \ +"At least one of these must be passed:\n" \ +"\t-cdfile path launch with selected ISO\n" \ +"\t-runcd launch with a CD-ROM\n" \ +"\t-bios launch into the BIOS\n" \ +"\n" \ +"Additional options:\n" \ +"\t-nogui closes PCSX-R at when the emulation has ended\n" \ +"\t-mcd1 path sets the fist memory card to path\n" \ +"\t-mcd2 path sets the second memory card to path\n" \ +"\t-freeze path loads freeze state from path\n" \ +"\t-psxout Enable logging\n" \ +"\t-slowboot Show PSX splash screen\n" \ +"\n" \ +"Help:\n" \ +"\t-help shows this message\n" \ +"\n" \ + + +void ShowHelpAndExit(FILE* output, int exitCode) +{ + fprintf(output, HELPSTR); + if (!NSApp) { + exit(exitCode); + } else { + [NSApp stop:nil]; + } +} + +@interface PcsxrController () +@property (readwrite) BOOL endAtEmuClose; +@property BOOL sleepInBackground; +@property BOOL wasPausedBeforeBGSwitch; +@property BOOL wasPausedBeforeDiscEject; +@property (strong) NSMutableArray *skipFiles; +@property (strong) NSWindow *preferenceWindow; +@property (strong) NSWindow *cheatWindow; +@property (nonatomic) DASessionRef diskSession; +@property (strong, readwrite) CheatController *cheatController; +@end + +@implementation PcsxrController +{ + ConfigurationController *preferencesController; + PluginList *pluginList; + struct _PSXflags { + unsigned int sleepInBackground:1; + unsigned int wasPausedBeforeBGSwitch:1; + unsigned int endAtEmuClose:1; + unsigned int wasPausedBeforeDiscEject:1; + unsigned int reserved:28; + } PSXflags; +} +@synthesize recentItems; +@synthesize skipFiles; +@synthesize cheatController; +@synthesize cheatWindow; +@synthesize preferenceWindow; + +- (BOOL)endAtEmuClose +{ + return PSXflags.endAtEmuClose; +} + +- (void)setEndAtEmuClose:(BOOL)endAtEmuClose +{ + PSXflags.endAtEmuClose = endAtEmuClose; +} + +- (BOOL)sleepInBackground +{ + return PSXflags.sleepInBackground; +} + +- (void)setSleepInBackground:(BOOL)sleepInBackground +{ + PSXflags.sleepInBackground = sleepInBackground; +} + +- (BOOL)wasPausedBeforeBGSwitch +{ + return PSXflags.wasPausedBeforeBGSwitch; +} + +- (void)setWasPausedBeforeBGSwitch:(BOOL)wasPausedBeforeBGSwitch +{ + PSXflags.wasPausedBeforeBGSwitch = wasPausedBeforeBGSwitch; +} + +- (BOOL)wasPausedBeforeDiscEject +{ + return PSXflags.wasPausedBeforeDiscEject; +} + +-(void)setWasPausedBeforeDiscEject:(BOOL)wasPausedBeforeDiscEject +{ + PSXflags.wasPausedBeforeDiscEject = wasPausedBeforeDiscEject; +} + +@synthesize diskSession = _diskSession; +- (void)setDiskSession:(DASessionRef)diskSession +{ + if (diskSession == _diskSession) { + return; + } + if (_diskSession) { + CFRelease(_diskSession); + _diskSession = NULL; + }if (diskSession) { + _diskSession = diskSession; + CFRetain(diskSession); + } +} + +static void PSXDiscAppearedCallback(DADiskRef disk, void *context) +{ + PcsxrController *theSelf = (__bridge PcsxrController*)context; + //sleep(3); //Is this needed? + SetCdOpenCaseTime(time(NULL) + 2); + LidInterrupt(); + + /* and open new cd */ + if ([EmuThread active]) + CDR_open(); + + if (!theSelf.wasPausedBeforeDiscEject) { + [EmuThread resume]; + } + + DASessionUnscheduleFromRunLoop(theSelf.diskSession, CFRunLoopGetMain(), kCFRunLoopCommonModes); + theSelf.diskSession = NULL; +} + +- (IBAction)ejectCD:(id)sender +{ + self.wasPausedBeforeDiscEject = [EmuThread pauseSafe]; + + /* close connection to current cd */ + if ([EmuThread active]) + CDR_close(); + + // switch to another ISO if using internal image reader, otherwise eject the CD + if (UsingIso()) { + NSOpenPanel* openDlg = [NSOpenPanel openPanel]; + [openDlg setAllowedFileTypes:[PcsxrDiscHandler supportedUTIs]]; + + if ([openDlg runModal] == NSFileHandlingPanelOKButton) { + NSArray* files = [openDlg URLs]; + SetIsoFile([[files[0] path] fileSystemRepresentation]); + SetCdOpenCaseTime(time(NULL) + 2); + LidInterrupt(); + } + + if ([EmuThread active]) + CDR_open(); + + if (!self.wasPausedBeforeDiscEject) { + [EmuThread resume]; + } + } else { + NSMutableString *deviceName; + NSTask *ejectTask; + NSRange rdiskRange; + char *driveLetter = CDR_getDriveLetter(); + + if (driveLetter != NULL) { + deviceName = [NSMutableString stringWithString:[[NSFileManager defaultManager] stringWithFileSystemRepresentation:driveLetter length:strlen(driveLetter)]]; + + // delete the 'r' in 'rdisk' + rdiskRange = [deviceName rangeOfString:@"rdisk"]; + if (rdiskRange.length != 0) { + rdiskRange.length = 1; + [deviceName deleteCharactersInRange:rdiskRange]; + } + // execute hdiutil to eject the device + ejectTask = [NSTask launchedTaskWithLaunchPath:@"/usr/bin/hdiutil" arguments:@[@"eject", deviceName]]; + [ejectTask waitUntilExit]; + } + DASessionRef tmpSession = DASessionCreate(kCFAllocatorDefault); + CFDictionaryRef match = CFBridgingRetain(@{(NSString*)kDADiskDescriptionMediaKindKey : @(kIOCDMediaClass), + (NSString*)kDADiskDescriptionMediaWholeKey : @YES}); + DARegisterDiskAppearedCallback(tmpSession, match, PSXDiscAppearedCallback, (__bridge void*)self); + CFRelease(match); + + DASessionScheduleWithRunLoop(tmpSession, CFRunLoopGetMain(), kCFRunLoopCommonModes); + + self.diskSession = tmpSession; + CFRelease(tmpSession); + } +} + +- (void)emuWindowDidClose:(NSNotification*)theNot +{ + if (self.diskSession) { + DASessionUnscheduleFromRunLoop(self.diskSession, CFRunLoopGetMain(), kCFRunLoopCommonModes); + self.diskSession = NULL; + } +} + +- (IBAction)pause:(id)sender +{ + if ([EmuThread isPaused]) { + //[sender setState:NSOffState]; + [EmuThread resume]; + } + else { + //[sender setState:NSOnState]; + [EmuThread pause]; + } +} + +- (IBAction)showCheatsWindow:(id)sender +{ + /* load the nib if it hasn't yet */ + if (cheatWindow == nil) { + if (cheatController == nil) { + cheatController = [[CheatController alloc] initWithWindowNibName:@"CheatWindow"]; + } + cheatWindow = [cheatController window]; + } + + /* show the window */ + [cheatController showWindow:sender]; +} + +- (IBAction)preferences:(id)sender +{ + /* load the nib if it hasn't yet */ + if (preferenceWindow == nil) { + if (preferencesController == nil) { + preferencesController = [[ConfigurationController alloc] initWithWindowNibName:@"Configuration"]; + } + preferenceWindow = [preferencesController window]; + } + + /* show the window */ + [preferencesController showWindow:sender]; +} + +- (IBAction)reset:(id)sender +{ + [EmuThread reset]; +} + +- (IBAction)runCD:(id)sender +{ + SetIsoFile(NULL); + if ([[NSUserDefaults standardUserDefaults] boolForKey:@"NetPlay"]) { + [pluginList enableNetPlug]; + } else { + [pluginList disableNetPlug]; + } + [EmuThread run]; +} + +- (IBAction)runIso:(id)sender +{ + NSOpenPanel* openDlg = [NSOpenPanel openPanel]; + [openDlg setAllowedFileTypes:[PcsxrDiscHandler supportedUTIs]]; + + if ([openDlg runModal] == NSFileHandlingPanelOKButton) { + NSURL *url = [openDlg URLs][0]; + [recentItems addRecentItem:url]; + [self runURL:url]; + } +} + +- (IBAction)runBios:(id)sender +{ + SetIsoFile(NULL); + [pluginList disableNetPlug]; + [EmuThread runBios]; +} + +- (void)runURL:(NSURL*)url +{ + if ([EmuThread active] == YES) { + if (UsingIso()) { + SetIsoFile([[url path] fileSystemRepresentation]); + SetCdOpenCaseTime(time(NULL) + 2); + LidInterrupt(); + } else { + NSBeep(); + } + } else { + if ([[NSUserDefaults standardUserDefaults] boolForKey:@"NetPlay"]) { + [pluginList enableNetPlug]; + } else { + [pluginList disableNetPlug]; + } + SetIsoFile([[url path] fileSystemRepresentation]); + [EmuThread run]; + } +} + +- (IBAction)freeze:(id)sender +{ + NSInteger num = [sender tag]; + [PcsxrController saveState:(int)num]; +} + ++ (void)saveState:(int)num +{ + [EmuThread freezeAt:[PcsxrController saveStatePath:num] which:num]; +} + +- (IBAction)defrost:(id)sender +{ + NSInteger num = [sender tag]; + [PcsxrController loadState:(int)num]; +} + ++ (void)loadState:(int)num +{ + [EmuThread defrostAt:[PcsxrController saveStatePath:num]]; +} + +- (IBAction)fullscreen:(id)sender +{ + GPU_keypressed(GPU_FULLSCREEN_KEY); +} + +- (IBAction)pauseInBackground:(id)sender +{ + self.sleepInBackground = !self.sleepInBackground; + [[NSUserDefaults standardUserDefaults] setBool:self.sleepInBackground forKey:@"PauseInBackground"]; +} + +- (BOOL)validateMenuItem:(NSMenuItem *)menuItem +{ + if ([menuItem action] == @selector(pause:)) { + [menuItem setState:([EmuThread isPaused] ? NSOnState : NSOffState)]; + } + + if ([menuItem action] == @selector(pause:) || [menuItem action] == @selector(fullscreen:)) + return [EmuThread active]; + + if ([menuItem action] == @selector(reset:) || [menuItem action] == @selector(ejectCD:) || + [menuItem action] == @selector(freeze:)) + return [EmuThread active] && ![EmuThread isRunBios]; + + if ([menuItem action] == @selector(runCD:) || [menuItem action] == @selector(runIso:) || + [menuItem action] == @selector(runBios:)) { + if (preferenceWindow != nil) + if ([preferenceWindow isVisible]) + return NO; + + if (cheatWindow != nil) + if ([cheatWindow isVisible]) + return NO; + + if ([menuItem action] == @selector(runBios:) && strcmp(Config.Bios, "HLE") == 0) + return NO; + + return ![EmuThread active]; + } + + if ([menuItem action] == @selector(defrost:)) { + if (![EmuThread active] || [EmuThread isRunBios]) + return NO; + + NSString *path = [saveStatePath stringByAppendingPathComponent:[NSString stringWithFormat:@"%s-%3.3ld.pcsxrstate", CdromId, (long)[menuItem tag]]]; + return (CheckState((char *)[path fileSystemRepresentation]) == 0); + } + + if ([menuItem action] == @selector(preferences:)) + return ![EmuThread active]; + + if ([menuItem action] == @selector(pauseInBackground:)) { + [menuItem setState:(self.sleepInBackground ? NSOnState : NSOffState)]; + return YES; + } + + return YES; +} + +- (void)applicationWillResignActive:(NSNotification *)aNotification +{ + self.wasPausedBeforeBGSwitch = [EmuThread isPaused]; + + if (self.sleepInBackground) { + [EmuThread pause]; + } +} + +- (void)applicationDidBecomeActive:(NSNotification *)aNotification +{ + if (self.sleepInBackground && !self.wasPausedBeforeBGSwitch) { + [EmuThread resume]; + } +} + +- (void)applicationDidFinishLaunching:(NSNotification *)notification +{ + self.skipFiles = nil; + if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DidMoveMemoryObjects"]) { + NSAlert *memDidMove = [[NSAlert alloc] init]; + memDidMove.messageText = NSLocalizedString(@"PSX Mem moved Desc", @"Playstation Cards did move"); + memDidMove.informativeText = NSLocalizedString(@"Psx Mem Moved", @"Playstation Cards did move"); + memDidMove.alertStyle = NSInformationalAlertStyle; + [memDidMove runModal]; + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"DidMoveMemoryObjects"]; + } +} + +static void ParseErrorStr(NSString *errStr) +{ + NSLog(@"Parse error: %@", errStr); + NSRunCriticalAlertPanel(@"Parsing error", @"%@\n\nPlease check the command line options and try again.\n\nPCSXR will now quit.", nil, nil, nil, errStr); + ShowHelpAndExit(stderr, EXIT_FAILURE); +} + +//DO NOT END THIS MACRO WITH A SIMICOLON! it will break the if-else if process +#define HandleArg(arg, launchable, otherblock) \ +if ([[progArgs objectAtIndex:i] compare:arg options:NSCaseInsensitiveSearch] == NSOrderedSame) { \ +HandleArgBase(arg, launchable, otherblock) + +#define HandleArgElse(arg, launchable, otherblock) \ +else if ([[progArgs objectAtIndex:i] compare:arg options:NSCaseInsensitiveSearch] == NSOrderedSame) { \ +HandleArgBase(arg, launchable, otherblock) + +#define HandleArgBase(arg, launchable, otherblock) \ +if (isLaunchable && launchable) { \ +ParseErrorStr([NSString stringWithFormat:@"The options %@ and %@ are exclusive.", arg, runtimeStr]); \ +} \ +if(launchable) { \ +isLaunchable = YES; \ +runtimeStr = arg; \ +} \ +otherblock();\ +} + +#define kPCSXRArgumentCDROM @"-runcd" +#define kPCSXRArgumentBIOS @"-bios" +#define kPCSXRArgumentISO @"-cdfile" +#define kPCSXRArgumentMcd @"-mcd" +#define kPCSXRArgumentMcd1 kPCSXRArgumentMcd @"1" +#define kPCSXRArgumentMcd2 kPCSXRArgumentMcd @"2" +#define kPCSXRArgumentFreeze @"-freeze" +#define kPCSXRArgumentExitAtClose @"-nogui" +#define kPCSXRArgumentLogOutput @"-psxout" +#define kPCSXRArgumentSlowBoot @"-slowboot" + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +- (void)awakeFromNib +{ + [[NSNotificationCenter defaultCenter] + addObserver:self selector:@selector(emuWindowDidClose:) + name:@"emuWindowDidClose" object:nil]; + + pluginList = [[PluginList alloc] init]; + if (![pluginList configured] /*!Config.Gpu[0] || !Config.Spu[0] || !Config.Pad1[0] || !Config.Cdr[0]*/) { + // configure plugins + [self preferences:nil]; + + NSRunCriticalAlertPanel(NSLocalizedString(@"Missing plugins!", nil), + NSLocalizedString(@"Pcsxr is missing one or more critical plugins. You will need to install these in order to play games.", nil), + nil, nil, nil); + } + + if (![PcsxrController biosAvailable]) { + dispatch_async(dispatch_get_main_queue(), ^{ + NSFileManager *manager = [NSFileManager defaultManager]; + NSURL *supportURL = [manager URLForDirectory:NSApplicationSupportDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:NULL]; + NSURL *biosURL = [[supportURL URLByAppendingPathComponent:@"Pcsxr"] URLByAppendingPathComponent:@"Bios"]; + NSInteger retVal = NSRunInformationalAlertPanel(NSLocalizedString(@"Missing BIOS!", nil), + NSLocalizedString(@"Pcsxr wasn't able to locate any Playstation BIOS ROM files. This means that it will run in BIOS simulation mode which is less stable and compatible than using a real Playstation BIOS.\nIf you have a BIOS available, please copy it to\n%@", nil), + NSLocalizedString(@"Okay", @"OK"), NSLocalizedString(@"Show Folder", @"Show Folder"), nil, [[biosURL path] stringByAbbreviatingWithTildeInPath]); + if (retVal == NSAlertAlternateReturn) { + [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:@[biosURL]]; + } + }); + } + + self.sleepInBackground = [[NSUserDefaults standardUserDefaults] boolForKey:@"PauseInBackground"]; + + NSArray *progArgs = [[NSProcessInfo processInfo] arguments]; + if ([progArgs count] > 1 && !wasFinderLaunch) { + self.skipFiles = [NSMutableArray array]; + + BOOL isLaunchable = NO; + NSString *runtimeStr = nil; + + __block short memcardHandled = 0; + __block BOOL hasParsedAnArgument = NO; + __block NSString *(^FileTestBlock)() = NULL; + __block NSMutableDictionary *argDict = [[NSMutableDictionary alloc] initWithCapacity:[progArgs count]]; + + + NSMutableArray *unknownOptions = [NSMutableArray array]; + + dispatch_block_t cdromBlock = ^{ + hasParsedAnArgument = YES; + LaunchArg *larg = [[LaunchArg alloc] initWithLaunchOrder:LaunchArgRun argument:kPCSXRArgumentCDROM block:^{ + [self runCD:nil]; + }]; + [larg addToDictionary:argDict]; + }; + + dispatch_block_t biosBlock = ^{ + hasParsedAnArgument = YES; + LaunchArg *larg = [[LaunchArg alloc] initWithLaunchOrder:LaunchArgRun argument:kPCSXRArgumentBIOS block:^{ + [self runBios:nil]; + }]; + [larg addToDictionary:argDict]; + }; + + // This block/argument does not need to be sorted + dispatch_block_t emuCloseAtEnd = ^{ + hasParsedAnArgument = YES; + LaunchArg *larg = [[LaunchArg alloc] initWithLaunchOrder:LaunchArgPreRun argument:kPCSXRArgumentExitAtClose block:^{ + self.endAtEmuClose = YES; + }]; + [larg addToDictionary:argDict]; + }; + + dispatch_block_t psxOut = ^{ + hasParsedAnArgument = YES; + LaunchArg *larg = [[LaunchArg alloc] initWithLaunchOrder:LaunchArgPreRun argument:kPCSXRArgumentLogOutput block:^{ + Config.PsxOut = true; + }]; + [larg addToDictionary:argDict]; + }; + + dispatch_block_t slowBoot = ^{ + hasParsedAnArgument = YES; + LaunchArg *larg = [[LaunchArg alloc] initWithLaunchOrder:LaunchArgPreRun argument:kPCSXRArgumentSlowBoot block:^{ + Config.SlowBoot = true; + }]; + [larg addToDictionary:argDict]; + }; + + dispatch_block_t isoBlock = ^{ + hasParsedAnArgument = YES; + NSString *path = FileTestBlock(); + LaunchArg *larg = [[LaunchArg alloc] initWithLaunchOrder:LaunchArgRun argument:kPCSXRArgumentISO block:^{ + [self runURL:[NSURL fileURLWithPath:path isDirectory:NO]]; + }]; + [larg addToDictionary:argDict]; + }; + + void (^mcdBlock)(int mcdNumber) = ^(int mcdnumber){ + hasParsedAnArgument = YES; + if (memcardHandled & (1 << mcdnumber)) { + NSLog(@"Memory card %i has already been defined. The latest one passed will be used.", mcdnumber); + } else { + memcardHandled |= (1 << mcdnumber); + } + + NSString *path = FileTestBlock(); + NSString *mcdArg = [kPCSXRArgumentMcd stringByAppendingFormat:@"%i", mcdnumber]; + LaunchArg *larg = [[LaunchArg alloc] initWithLaunchOrder:LaunchArgPreRun argument:mcdArg block:^{ + LoadMcd(mcdnumber, (char*)[path fileSystemRepresentation]); + }]; + [larg addToDictionary:argDict]; + }; + + dispatch_block_t freezeBlock = ^{ + hasParsedAnArgument = YES; + NSString *path = FileTestBlock(); + LaunchArg *larg = [[LaunchArg alloc] initWithLaunchOrder:LaunchArgPostRun argument:kPCSXRArgumentFreeze block:^{ + if (![EmuThread isRunBios]) { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_global_queue(0, 0), ^{ + [EmuThread defrostAt:path]; + }); + } + }]; + [larg addToDictionary:argDict]; + }; + + BOOL hasFileTestBlock = NO; + + for (__block int i = 1; i < [progArgs count]; i++) { + if (!hasFileTestBlock) + { + FileTestBlock = ^NSString *(){ + if ([progArgs count] <= ++i) { + ParseErrorStr(@"Not enough arguments."); + } + NSString *path = [progArgs[i] stringByExpandingTildeInPath]; + if (![[NSFileManager defaultManager] fileExistsAtPath:path]) + { + ParseErrorStr([NSString stringWithFormat:@"The file \"%@\" does not exist.", path]); + return nil; + } + [skipFiles addObject:path]; + return path; + }; + hasFileTestBlock = YES; + } + + //DO NOT END these MACROS WITH A SIMICOLON! It will break the if-else if process + HandleArg(kPCSXRArgumentISO, YES, isoBlock) + HandleArgElse(kPCSXRArgumentCDROM, YES, cdromBlock) + HandleArgElse(kPCSXRArgumentBIOS, YES, biosBlock) + HandleArgElse(kPCSXRArgumentExitAtClose, NO, emuCloseAtEnd) + HandleArgElse(kPCSXRArgumentMcd1, NO, ^{mcdBlock(1);}) + HandleArgElse(kPCSXRArgumentMcd2, NO, ^{mcdBlock(2);}) + HandleArgElse(kPCSXRArgumentFreeze, NO, freezeBlock) + HandleArgElse(kPCSXRArgumentLogOutput, NO, psxOut) + HandleArgElse(kPCSXRArgumentSlowBoot, NO, slowBoot) + else { + [unknownOptions addObject:progArgs[i]]; + } + } +#ifdef DEBUG + if ([unknownOptions count]) { + NSString *unknownString = [unknownOptions componentsJoinedByString:@" "]; + + NSLog(@"The following options weren't recognized by PCSX-R: %@. This may be due to extra arguments passed by the OS or debugger.", unknownString); + } +#endif + unknownOptions = nil; + if (!isLaunchable && hasParsedAnArgument) { + NSMutableArray *mutProgArgs = [NSMutableArray arrayWithArray:progArgs]; + NSString *appRawPath = mutProgArgs[0]; + //Remove the app file path from the array + [mutProgArgs removeObjectAtIndex:0]; + NSString *arg = [mutProgArgs componentsJoinedByString:@" "]; + NSString *recognizedArgs = [[argDict allKeys] componentsJoinedByString:@" "]; + + NSString *tmpStr = [NSString stringWithFormat:@"A launch command wasn't found in the command line and one or more arguments that PCSX-R recognizes were: %@.\nThe following command line arguments were passed with the application launch file at %@: %@.\n\nThe valid launch commands are %@, %@, and %@.", recognizedArgs, appRawPath, arg, kPCSXRArgumentISO, kPCSXRArgumentCDROM, kPCSXRArgumentBIOS]; + ParseErrorStr(tmpStr); + } else if (hasParsedAnArgument){ + NSArray *argArray = [[argDict allValues] sortedArrayWithOptions:NSSortStable usingComparator:^NSComparisonResult(id obj1, id obj2) { + LaunchArg *LA1 = obj1; + LaunchArg *LA2 = obj2; + if (LA1.launchOrder > LA2.launchOrder) { + return NSOrderedDescending; + } else if (LA1.launchOrder < LA2.launchOrder) { + return NSOrderedAscending; + } else { + return NSOrderedSame; + } + }]; + for (LaunchArg *arg in argArray) { + arg.theBlock(); + } + } + } +} + ++ (void)setConfigFromDefaults +{ + const char *str; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + /* + enumerator = [prefStringKeys keyEnumerator]; + while ((key = [enumerator nextObject])) { + str = [[defaults stringForKey:key] fileSystemRepresentation]; + char *dst = (char *)[[prefStringKeys objectForKey:key] pointerValue]; + if (str != nil && dst != nil) strncpy(dst, str, 255); + }*/ + + for (NSString *key in prefByteKeys) { + u8 *dst = (u8 *)[prefByteKeys[key] pointerValue]; + if (dst != NULL) *dst = [defaults boolForKey:key]; + } + + // special cases + //str = [[defaults stringForKey:@"PluginPAD"] fileSystemRepresentation]; + //if (str != nil) strncpy(Config.Pad2, str, 255); + + str = [[defaults stringForKey:@"Bios"] fileSystemRepresentation]; + if (str) { + NSString *path = [defaults stringForKey:@"Bios"]; + NSInteger index = [biosList indexOfObject:path]; + + if (-1 == index) { + [biosList insertObject:path atIndex:0]; + } else if (0 < index) { + [biosList exchangeObjectAtIndex:index withObjectAtIndex:0]; + } + } + + { + NSFileManager *manager = [NSFileManager defaultManager]; + NSURL *oldMemoryURL = [[[manager URLForDirectory:NSApplicationSupportDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:NULL] URLByAppendingPathComponent:@"Pcsxr"] URLByAppendingPathComponent:@"Memory Cards"]; + NSURL *memoryURL = [[[manager URLForDirectory:NSDocumentDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:NULL] URLByAppendingPathComponent:@"Pcsxr"] URLByAppendingPathComponent:@"Memory Cards"]; + + if (!wasFinderLaunch && [oldMemoryURL checkResourceIsReachableAndReturnError:NULL]) { + NSDictionary *mcds = @{@"Mcd1": [defaults URLForKey:@"Mcd1"], + @"Mcd2": [defaults URLForKey:@"Mcd2"]}; + for (NSString *key in mcds) { + NSURL *obj = mcds[key]; + NSString *dirPath = [obj.path stringByStandardizingPath]; + NSString *oldDirPath = [oldMemoryURL.path stringByStandardizingPath]; + if ([dirPath hasPrefix:oldDirPath]) { + NSArray *barePath = [[dirPath stringByReplacingOccurrencesOfString:oldDirPath withString:@""] pathComponents]; + NSMutableArray *newPath = [[memoryURL pathComponents] mutableCopy]; + [newPath addObjectsFromArray:barePath]; + NSURL *replacementPath = [NSURL fileURLWithPathComponents:newPath]; + if ([manager moveItemAtURL:obj toURL:replacementPath error:NULL]) { + [defaults setURL:replacementPath forKey:key]; + } + } + } + NSArray *memoryFiles = [manager contentsOfDirectoryAtURL:oldMemoryURL includingPropertiesForKeys:@[] options:0 error:NULL]; + for (NSURL *memLoc in memoryFiles) { + [manager moveItemAtURL:memLoc toURL:[memoryURL URLByAppendingPathComponent:[memLoc lastPathComponent]] error:NULL]; + } + [manager removeItemAtURL:oldMemoryURL error:NULL]; + [defaults setBool:YES forKey:@"DidMoveMemoryObjects"]; + } + + str = [[[defaults URLForKey:@"Mcd1"] path] fileSystemRepresentation]; + if (str) { + strlcpy(Config.Mcd1, str, MAXPATHLEN); + } else { + NSURL *url = [memoryURL URLByAppendingPathComponent:@"Mcd001.mcr"]; + [defaults setURL:url forKey:@"Mcd1"]; + str = [[url path] fileSystemRepresentation]; + if (str != nil) strlcpy(Config.Mcd1, str, MAXPATHLEN); + } + + str = [[[defaults URLForKey:@"Mcd2"] path] fileSystemRepresentation]; + if (str) { + strlcpy(Config.Mcd2, str, MAXPATHLEN); + } else { + NSURL *url = [memoryURL URLByAppendingPathComponent:@"Mcd002.mcr"]; + [defaults setURL:url forKey:@"Mcd2"]; + str = [[url path] fileSystemRepresentation]; + if (str != nil) strlcpy(Config.Mcd2, str, MAXPATHLEN); + } + } + + if ([defaults boolForKey:@"UseHLE"] || 0 == [biosList count]) { + strcpy(Config.Bios, "HLE"); + } else { + str = [(NSString *)biosList[0] fileSystemRepresentation]; + if (str != nil) strlcpy(Config.Bios, str, MAXPATHLEN); + else strcpy(Config.Bios, "HLE"); + } + + str = [[defaults stringForKey:@"Net"] fileSystemRepresentation]; + if (str) strlcpy(Config.Net, str, MAXPATHLEN); + else { + strcpy(Config.Net, "Disabled"); + } +} + ++ (void)setDefaultFromConfig:(NSString *)defaultKey +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + char *str = (char *)[prefStringKeys[defaultKey] pointerValue]; + if (str) { + NSString *tmpNSStr = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:str length:strlen(str)]; + if (!tmpNSStr) { + tmpNSStr = @(str); + } + + [defaults setObject:tmpNSStr forKey:defaultKey]; + return; + } + + str = (char *)[prefURLKeys[defaultKey] pointerValue]; + if (str) { + NSString *tmpNSStr = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:str length:strlen(str)]; + if (!tmpNSStr) { + tmpNSStr = @(str); + } + [defaults setURL:[NSURL fileURLWithPath:tmpNSStr isDirectory:NO] forKey:defaultKey]; + return; + } + + u8 *val = (u8 *)[prefByteKeys[defaultKey] pointerValue]; + if (val) { + [defaults setInteger:*val forKey:defaultKey]; + return; + } +} + ++ (BOOL)biosAvailable +{ + return ([biosList count] > 0); +} + +// called when class is initialized ++ (void)initialize +{ + NSString *path; + const char *str; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSDictionary *appDefaults = @{@"NoDynarec": @YES, + @"AutoDetectVideoType": @YES, + @"UseHLE": @NO, + @"PauseInBackground": @YES, + @"Widescreen": @NO, + @"NetPlay": @NO, + @"DidMoveMemoryObjects": @NO, + @"NoFastBoot": @NO}; + + [defaults registerDefaults:appDefaults]; + + prefStringKeys = @{@"PluginGPU": [NSValue valueWithPointer:Config.Gpu], + @"PluginSPU": [NSValue valueWithPointer:Config.Spu], + @"PluginPAD": [NSValue valueWithPointer:Config.Pad1], + @"PluginCDR": [NSValue valueWithPointer:Config.Cdr], + @"PluginNET": [NSValue valueWithPointer:Config.Net], + @"PluginSIO1": [NSValue valueWithPointer:Config.Sio1]}; + + prefURLKeys = @{@"Mcd1": [NSValue valueWithPointer:Config.Mcd1], + @"Mcd2": [NSValue valueWithPointer:Config.Mcd2]}; + + prefByteKeys = @{@"NoXaAudio": [NSValue valueWithPointer:&Config.Xa], + @"SioIrqAlways": [NSValue valueWithPointer:&Config.SioIrq], + @"BlackAndWhiteMDECVideo": [NSValue valueWithPointer:&Config.Mdec], + @"AutoDetectVideoType": [NSValue valueWithPointer:&Config.PsxAuto], + @"VideoTypePAL": [NSValue valueWithPointer:&Config.PsxType], + @"NoCDAudio": [NSValue valueWithPointer:&Config.Cdda], + @"NoDynarec": [NSValue valueWithPointer:&Config.Cpu], + @"ConsoleOutput": [NSValue valueWithPointer:&Config.PsxOut], + @"SpuIrqAlways": [NSValue valueWithPointer:&Config.SpuIrq], + @"RootCounterFix": [NSValue valueWithPointer:&Config.RCntFix], + @"VideoSyncWAFix": [NSValue valueWithPointer:&Config.VSyncWA], + @"Widescreen": [NSValue valueWithPointer:&Config.Widescreen], + @"NoFastBoot": [NSValue valueWithPointer:&Config.SlowBoot]}; + + // setup application support paths + NSFileManager *manager = [NSFileManager defaultManager]; + NSURL *supportURL = [manager URLForDirectory:NSApplicationSupportDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:NULL]; + + if(supportURL != nil) { + NSURL *PcsxrAppSupport = [supportURL URLByAppendingPathComponent:@"Pcsxr"]; + NSURL *pcsxrDocument = [[manager URLForDirectory:NSDocumentDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:NULL] URLByAppendingPathComponent:@"Pcsxr"]; + NSURL *MemCardPath; + NSURL *url; + BOOL dir; + + + // create them if needed + url = [PcsxrAppSupport URLByAppendingPathComponent:@"Bios"]; + if (![url checkResourceIsReachableAndReturnError:NULL]) + [manager createDirectoryAtURL:url withIntermediateDirectories:YES attributes:nil error:NULL]; + + MemCardPath = [pcsxrDocument URLByAppendingPathComponent:@"Memory Cards"]; + url = MemCardPath; + if (![url checkResourceIsReachableAndReturnError:NULL]) + [manager createDirectoryAtURL:url withIntermediateDirectories:YES attributes:nil error:NULL]; + + url = [PcsxrAppSupport URLByAppendingPathComponent:@"Patches"]; + if (![url checkResourceIsReachableAndReturnError:NULL]) + [manager createDirectoryAtURL:url withIntermediateDirectories:YES attributes:nil error:NULL]; + + url = [PcsxrAppSupport URLByAppendingPathComponent:@"PlugIns"]; + if (![url checkResourceIsReachableAndReturnError:NULL]) + [manager createDirectoryAtURL:url withIntermediateDirectories:YES attributes:nil error:NULL]; + + saveStatePath = [[[PcsxrAppSupport URLByAppendingPathComponent:@"Save States"] path] copy]; + if (![manager fileExistsAtPath:saveStatePath isDirectory:&dir]) + [manager createDirectoryAtPath:saveStatePath withIntermediateDirectories:YES attributes:nil error:NULL]; + + url = [MemCardPath URLByAppendingPathComponent:@"Mcd001.mcr"]; + str = [[url path] fileSystemRepresentation]; + if (str != nil) + strlcpy(Config.Mcd1, str, MAXPATHLEN); + + url = [MemCardPath URLByAppendingPathComponent:@"Mcd002.mcr"]; + str = [[url path] fileSystemRepresentation]; + if (str != nil) + strlcpy(Config.Mcd2, str, MAXPATHLEN); + + url = [PcsxrAppSupport URLByAppendingPathComponent:@"Bios"]; + str = [[url path] fileSystemRepresentation]; + if (str != nil) + strlcpy(Config.BiosDir, str, MAXPATHLEN); + + url = [PcsxrAppSupport URLByAppendingPathComponent:@"Patches"]; + str = [[url path] fileSystemRepresentation]; + if (str != nil) { + strlcpy(Config.PatchesDir, str, MAXPATHLEN); + } + } else { + strcpy(Config.BiosDir, "Bios/"); + strcpy(Config.PatchesDir, "Patches/"); + + //NSString constants don't need to be retained/released. In fact, retain/releasing them does nothing. + saveStatePath = @"sstates"; + } + + // set plugin path + path = [[NSBundle mainBundle] builtInPlugInsPath]; + str = [path fileSystemRepresentation]; + if (str != nil) + strlcpy(Config.PluginsDir, str, MAXPATHLEN); + + // locate a bios + biosList = [[NSMutableArray alloc] init]; + + NSString *biosDir = [manager stringWithFileSystemRepresentation:Config.BiosDir length:strlen(Config.BiosDir)]; + NSArray *bioses = [manager contentsOfDirectoryAtPath:biosDir error:NULL]; + if (bioses) { + for (NSString *file in bioses) { + NSDictionary *attrib = [manager attributesOfItemAtPath:[[biosDir stringByAppendingPathComponent:file] stringByResolvingSymlinksInPath] error:NULL]; + + if ([[attrib fileType] isEqualToString:NSFileTypeRegular]) { + unsigned long long size = [attrib fileSize]; + if ((size % (256 * 1024)) == 0 && size > 0) { + [biosList addObject:file]; + } + } + } + } + + [PcsxrController setConfigFromDefaults]; +} + ++ (NSString*)saveStatePath:(int)slot +{ + if(slot >= 0) { + return [saveStatePath stringByAppendingPathComponent:[NSString stringWithFormat:@"%s-%3.3d.pcsxrstate", CdromId, slot]]; + } + + return saveStatePath; +} + +- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename +{ + NSFileManager *fm = [NSFileManager defaultManager]; + NSWorkspace *workspace = [NSWorkspace sharedWorkspace]; + if (skipFiles && [skipFiles count]) { + for (NSString *parsedFile in skipFiles) { + if ([filename isEqualToString:parsedFile]) { + return YES; + } + } + } + + if (![fm fileExistsAtPath:filename]) { + NSLog(@"Nonexistant file %@ was passed to open.", filename ); + return NO; + } + + if ([[filename pathExtension] compare:@"bin" options:(NSCaseInsensitiveSearch | NSWidthInsensitiveSearch)]) { + NSDictionary *attrib = [fm attributesOfItemAtPath:filename error:NULL]; + if ([[attrib fileType] isEqualToString:NSFileTypeRegular] && ([attrib fileSize] % (256 * 1024)) == 0 && [attrib fileSize] > 0 ) { + NSAlert *biosInfo = [NSAlert alertWithMessageText:NSLocalizedString(@"PlayStation BIOS File", @"PSX BIOS File") defaultButton:NSLocalizedString(@"BIOS_Copy", @"copy the BIOS over") alternateButton:NSLocalizedString(@"Cancel", @"Cancel") otherButton:NSLocalizedString(@"BIOS_Move", @"Move the bios over") informativeTextWithFormat:NSLocalizedString(@"The file \"%@\" seems to be a BIOS file. Do you want PCSX-R to copy it to the proper location?", @"Can we copy the BIOS?")]; + biosInfo.alertStyle = NSInformationalAlertStyle; + switch ([biosInfo runModal]) { + case NSAlertFirstButtonReturn: + case NSAlertDefaultReturn: + { + NSError *theErr = nil; + NSURL *biosDirPath = [NSURL fileURLWithPath:[fm stringWithFileSystemRepresentation:Config.BiosDir length:strlen(Config.BiosDir)] isDirectory:YES]; + NSURL *biosPath = [biosDirPath URLByAppendingPathComponent:[filename lastPathComponent]]; + if ([biosPath checkResourceIsReachableAndReturnError:NULL]) { + NSAlert *alreadyThere = [NSAlert alertWithMessageText:NSLocalizedString(@"BIOS Already Exists", @"BIOS file already there.") defaultButton:nil alternateButton:nil otherButton:nil informativeTextWithFormat:NSLocalizedString(@"There already exists a BIOS file at \"%1$@\": not copying the file at \"%2$@\".\n\nIf you do want to use the BIOS file at \"%2$@\", delete the BIOS at \"%1$@\".", @"What to do"), [biosPath path], filename]; + alreadyThere.alertStyle = NSCriticalAlertStyle; + [alreadyThere runModal]; + return NO; + } + if (![fm copyItemAtURL:[NSURL fileURLWithPath:filename isDirectory:NO] toURL:biosPath error:&theErr]) { + [[NSAlert alertWithError:theErr] runModal]; + return NO; + } + } + break; + + case NSAlertThirdButtonReturn: + case NSAlertOtherReturn: + { + NSError *theErr = nil; + NSURL *biosDirPath = [NSURL fileURLWithPath:[fm stringWithFileSystemRepresentation:Config.BiosDir length:strlen(Config.BiosDir)] isDirectory:YES]; + NSURL *biosPath = [biosDirPath URLByAppendingPathComponent:[filename lastPathComponent]]; + if ([biosPath checkResourceIsReachableAndReturnError:NULL]) { + NSAlert *alreadyThere = [NSAlert alertWithMessageText:NSLocalizedString(@"BIOS Already Exists", @"BIOS file already there.") defaultButton:nil alternateButton:nil otherButton:nil informativeTextWithFormat:NSLocalizedString(@"There already exists a BIOS file at \"%1$@\": not moving the file at \"%2$@\".\n\nIf you do want to use the BIOS file at \"%2$@\", delete the BIOS at \"%1$@\".", @"What to do"), [biosPath path], filename]; + alreadyThere.alertStyle = NSCriticalAlertStyle; + [alreadyThere runModal]; + return NO; + } + if (![fm moveItemAtURL:[NSURL fileURLWithPath:filename isDirectory:NO] toURL:biosPath error:&theErr]) { + [[NSAlert alertWithError:theErr] runModal]; + return NO; + } + } + break; + + default: + break; + } + return YES; + } + } + + NSError *err = nil; + NSString *utiFile = [workspace typeOfFile:filename error:&err]; + if (err) { + NSRunAlertPanel(NSLocalizedString(@"Error opening file", nil), NSLocalizedString(@"Unable to open %@: %@", nil), nil, nil, nil, [filename lastPathComponent], err); + return NO; + } + static NSArray *handlers = nil; + if (handlers == nil) { + handlers = @[[PcsxrPluginHandler class], [PcsxrMemCardHandler class], [PcsxrFreezeStateHandler class], [PcsxrDiscHandler class], [PcsxrCheatHandler class]]; + } + BOOL isHandled = NO; + for (Class fileHandler in handlers) { + NSObject *hand = [[fileHandler alloc] init]; + BOOL canHandle = NO; + for (NSString *uti in [fileHandler supportedUTIs]) { + if ([workspace type:utiFile conformsToType:uti]) { + canHandle = YES; + break; + } + } + if (canHandle) { + isHandled = [hand handleFile:filename]; + break; + } + } + + return isHandled; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrDiscHandler.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrDiscHandler.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrDiscHandler.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrDiscHandler.h 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,14 @@ +// +// PcsxrDiscHandler.h +// Pcsxr +// +// Created by Charles Betts on 12/11/11. +// Copyright (c) 2011 __MyCompanyName__. All rights reserved. +// + +#import +#import "PcsxrFileHandle.h" + +@interface PcsxrDiscHandler : NSObject + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrDiscHandler.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrDiscHandler.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrDiscHandler.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrDiscHandler.m 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,58 @@ +// +// PcsxrDiscHandler.m +// Pcsxr +// +// Created by Charles Betts on 12/11/11. +// Copyright (c) 2011 __MyCompanyName__. All rights reserved. +// + +#import "PcsxrDiscHandler.h" +#import "EmuThread.h" +#include "psxcommon.h" +#include "plugins.h" +#include "cdrom.h" +#import "RecentItemsMenu.h" +#import "PcsxrController.h" + +@interface PcsxrDiscHandler () +@property (nonatomic, strong) NSURL *discURL; +@property (weak) NSString *discPath; +@end + +@implementation PcsxrDiscHandler +@synthesize discURL = _discURL; +- (NSURL*)discURL +{ + if (!_discURL) { + self.discURL = [NSURL fileURLWithPath:discPath]; + } + return _discURL; +} + +@synthesize discPath; + ++ (NSArray *)supportedUTIs +{ + static NSArray *utisupport = nil; + if (utisupport == nil) { + utisupport = @[@"com.alcohol-soft.mdfdisc", @"com.goldenhawk.cdrwin-cuesheet", + @"com.apple.disk-image-ndif", @"public.iso-image", @"com.sony.psp.firmware", + @"com.codeplex.pcsxr.compressed-bin-image", @"com.coppertino.vox.cue", + @"com.apple.macbinary-​archive"]; + } + return utisupport; +} + +- (BOOL)handleFile:(NSString *)theFile +{ + self.discPath = theFile; + PcsxrController *appDelegate = [(NSApplication*)NSApp delegate]; + if ([EmuThread active] == YES && !UsingIso()) { + return NO; + } + [appDelegate runURL:[self discURL]]; + [[appDelegate recentItems] addRecentItem:[self discURL]]; + return YES; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrFileHandle.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrFileHandle.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrFileHandle.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrFileHandle.h 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,14 @@ +// +// PcsxrFileHandle.h +// Pcsxr +// +// Created by Charles Betts on 12/10/11. +// Copyright (c) 2011 __MyCompanyName__. All rights reserved. +// + +#import + +@protocol PcsxrFileHandle ++ (NSArray *)supportedUTIs; +- (BOOL)handleFile:(NSString *)theFile; +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrFreezeStateHandler.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrFreezeStateHandler.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrFreezeStateHandler.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrFreezeStateHandler.h 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,14 @@ +// +// PcsxrFreezeStateHandler.h +// Pcsxr +// +// Created by Charles Betts on 12/11/11. +// Copyright (c) 2011 __MyCompanyName__. All rights reserved. +// + +#import +#import "PcsxrFileHandle.h" + +@interface PcsxrFreezeStateHandler : NSObject + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrFreezeStateHandler.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrFreezeStateHandler.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrFreezeStateHandler.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrFreezeStateHandler.m 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,43 @@ +// +// PcsxrFreezeStateHandler.m +// Pcsxr +// +// Created by Charles Betts on 12/11/11. +// Copyright (c) 2011 __MyCompanyName__. All rights reserved. +// + +#import "PcsxrFreezeStateHandler.h" +#import "EmuThread.h" +#import "PluginList.h" +#include "misc.h" + +@implementation PcsxrFreezeStateHandler + ++ (NSArray *)supportedUTIs +{ + static NSArray *utisupport = nil; + if (utisupport == nil) { + utisupport = @[@"com.codeplex.pcsxr.freeze"]; + } + return utisupport; +} + +- (BOOL)handleFile:(NSString *)theFile +{ + if (CheckState([theFile fileSystemRepresentation]) != 0) { + return NO; + } + if (![EmuThread active]) { + PluginList *pluginList = [PluginList list]; + if ([[NSUserDefaults standardUserDefaults] boolForKey:@"NetPlay"]) { + [pluginList enableNetPlug]; + } else { + [pluginList disableNetPlug]; + } + + [EmuThread run]; + } + return [EmuThread defrostAt:theFile]; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrHexadecimalFormatter.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrHexadecimalFormatter.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrHexadecimalFormatter.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrHexadecimalFormatter.h 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,15 @@ +// +// PcsxrHexadecimalFormatter.h +// Pcsxr +// +// Created by C.W. Betts on 8/17/13. +// +// + +#import + +IB_DESIGNABLE +@interface PcsxrHexadecimalFormatter : NSFormatter +@property (nonatomic) IBInspectable char hexPadding; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrHexadecimalFormatter.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrHexadecimalFormatter.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrHexadecimalFormatter.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrHexadecimalFormatter.m 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,88 @@ +// +// PcsxrHexadecimalFormatter.m +// Pcsxr +// +// Created by C.W. Betts on 8/17/13. +// +// + +#import "PcsxrHexadecimalFormatter.h" + +@interface PcsxrHexadecimalFormatter () +@property (strong) NSString *hexFormatString; +@end + +@implementation PcsxrHexadecimalFormatter +@synthesize hexPadding; +@synthesize hexFormatString; + +- (void)setHexPadding:(char)_hexPadding +{ + hexPadding = _hexPadding; + self.hexFormatString = [NSString stringWithFormat:@"0x%%0%ilx", hexPadding]; +} + +- (instancetype)init +{ + if (self = [super init]) { +#ifdef __LP64__ + self.hexPadding = 16; +#else + self.hexPadding = 8; +#endif + } + return self; +} + +- (instancetype)initWithCoder:(NSCoder *)aDecoder +{ + if (self = [super initWithCoder:aDecoder]) { +#ifdef __LP64__ + self.hexPadding = 16; +#else + self.hexPadding = 8; +#endif + } + return self; +} + +- (NSString *)stringForObjectValue:(id)obj +{ + if ([obj isKindOfClass:[NSNumber class]]) { + return [NSString stringWithFormat:self.hexFormatString, (long)[obj integerValue]]; + } else return nil; +} + +- (NSString *)editingStringForObjectValue:(id)obj +{ + if ([obj isKindOfClass:[NSNumber class]]) { + return [NSString stringWithFormat:@"%lx", (long)[obj integerValue]]; + } else return nil; +} + +- (BOOL)getObjectValue:(out id *)obj forString:(NSString *)string errorDescription:(out NSString **)error +{ + NSString *tmpstr = nil; + unsigned int tmpNum; + NSScanner *theScan = [[NSScanner alloc] initWithString:string]; + if ([theScan scanHexInt:&tmpNum]) { + *obj = @(tmpNum); + return YES; + } else { + if ([string hasPrefix:@"0x"]) { + NSRange zeroXRange = [string rangeOfString:@"0x"]; + tmpstr = [string stringByReplacingCharactersInRange:zeroXRange withString:@""]; + }else { + tmpstr = string; + } + long tmpNum = 0; + if (sscanf([tmpstr UTF8String], "%lx", &tmpNum) == 1) { + *obj = @(tmpNum); + return YES; + } else { + return NO; + } + } +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrMemCardArray.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrMemCardArray.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrMemCardArray.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrMemCardArray.h 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,29 @@ +// +// PcsxrMemCardArray.h +// Pcsxr +// +// Created by C.W. Betts on 7/6/13. +// +// + +#import +#import "PcsxrMemoryObject.h" + +@interface PcsxrMemCardArray : NSObject + +- (instancetype)initWithMemoryCardNumber:(int)carNum NS_DESIGNATED_INITIALIZER; + +- (void)deleteMemoryBlocksAtIndex:(int)slotnum; +- (void)compactMemory; + +@property (readonly) int freeBlocks; +@property (readonly) int availableBlocks; +- (int)memorySizeAtIndex:(int)idx; +- (BOOL)moveBlockAtIndex:(int)idx toMemoryCard:(PcsxrMemCardArray*)otherCard; +- (int)indexOfFreeBlocksWithSize:(int)asize; + +@property (nonatomic, readonly, unsafe_unretained) NSArray *memoryArray; +@property (nonatomic, readonly, unsafe_unretained) NSURL *memCardURL; +@property (nonatomic, readonly) const char *memCardCPath; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrMemCardArray.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrMemCardArray.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrMemCardArray.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrMemCardArray.m 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,384 @@ +// +// PcsxrMemCardArray.m +// Pcsxr +// +// Created by C.W. Betts on 7/6/13. +// +// + +#import "PcsxrMemCardArray.h" +#import "ConfigurationController.h" +#include "sio.h" + +#define MAX_MEMCARD_BLOCKS 15 +#define ISLINKMIDBLOCK(Info) (((Info)->Flags & 0xF) == 0x2) +#define ISLINKENDBLOCK(Info) (((Info)->Flags & 0xF) == 0x3) +#define ISLINKBLOCK(Info) (ISLINKENDBLOCK((Info)) || ISLINKMIDBLOCK((Info))) +#define ISDELETED(Info) (((Info)->Flags & 0xF) >= 1 && ((Info)->Flags & 0xF) <= 3) +#define ISBLOCKDELETED(Info) (((Info)->Flags & 0xF0) == 0xA0) +#define ISSTATUSDELETED(Info) (ISBLOCKDELETED(Info) && ISDELETED(Info)) +#define ISLINKED(Data) ( ((Data) != 0xFFFFU) && ((Data) <= MAX_MEMCARD_BLOCKS) ) +#define GETLINKFORBLOCK(Data, block) (*((Data)+(((block)*128)+0x08))) + + +static int GetMcdBlockCount(int mcd, u8 startblock, u8* blocks) { + NSCAssert1((mcd == 1) || (mcd == 2), @"Mcd block %i is invalid", mcd); + int i=0; + u8 *data = NULL, *dataT, curblock=startblock; + u16 linkblock; + + if (mcd == 1) { + data = Mcd1Data; + } else if (mcd == 2) { + data = Mcd2Data; + } else { + return 0; + } + + blocks[i++] = startblock; + do { + dataT = data+((curblock*128)+0x08); + linkblock = ((u16*)dataT)[0]; + + // TODO check if target block has link flag (2 or 3) + linkblock = ( ISLINKED(linkblock) ? linkblock : 0xFFFFU ); + blocks[i++] = curblock = linkblock + 1; + //printf("LINKS %x %x %x %x %x\n", blocks[0], blocks[i-2], blocks[i-1], blocks[i], blocks[i+1]); + } while (ISLINKED(linkblock)); + return i-1; +} + + +static inline void CopyMemcardData(char *from, char *to, int srci, int dsti, char *str) +{ + // header + memmove(to + (dsti + 1) * 128, from + (srci + 1) * 128, 128); + SaveMcd(str, to, (dsti + 1) * 128, 128); + + // data + memmove(to + (dsti + 1) * 1024 * 8, from + (srci+1) * 1024 * 8, 1024 * 8); + SaveMcd(str, to, (dsti + 1) * 1024 * 8, 1024 * 8); +} + +static inline char* BlankHeader() +{ + struct PSXMemHeader { + unsigned int allocState; + unsigned int fileSize; + unsigned short nextBlock; + char fileName[21]; + unsigned char garbage[96]; + unsigned char checksum; + }; + + static struct PSXMemHeader *toReturn = NULL; + if (!toReturn) { + toReturn = calloc(sizeof(struct PSXMemHeader), 1); + + //FIXME: Which value is right? + toReturn->allocState = 0x000000a0; + //toReturn->allocState = 0xa0000000; + toReturn->nextBlock = 0xFFFF; + unsigned char *bytePtr = (unsigned char*)toReturn; + for (int i = 0; i < sizeof(struct PSXMemHeader) - sizeof(unsigned char); i++) { + toReturn->checksum ^= bytePtr[i]; + } + } + + return (char*)toReturn; +} + +static inline void ClearMemcardData(char *to, int dsti, char *str) +{ + // header + char *header = BlankHeader(); + memcpy(to + (dsti + 1) * 128, header, 128); + SaveMcd(str, to, (dsti + 1) * 128, 128); + + // data + memset(to + (dsti + 1) * 1024 * 8, 0, 1024 * 8); + SaveMcd(str, to, (dsti + 1) * 1024 * 8, 1024 * 8); +} + +@interface PcsxrMemCardArray () +@property (strong) NSArray *rawArray; +@property (readonly) char* memDataPtr; +@property int cardNumber; +@end + +@implementation PcsxrMemCardArray +@synthesize rawArray; +@synthesize cardNumber; + +- (char*)memDataPtr +{ + if (cardNumber == 1) { + return Mcd1Data; + } else { + return Mcd2Data; + } +} + +- (const char *)memCardCPath +{ + if (cardNumber == 1) { + return Config.Mcd1; + } else { + return Config.Mcd2; + } +} + +- (instancetype)initWithMemoryCardNumber:(int)carNum +{ + NSParameterAssert(carNum == 1 || carNum == 2); + if (self = [super init]) { + NSMutableArray *tmpMemArray = [[NSMutableArray alloc] initWithCapacity:MAX_MEMCARD_BLOCKS]; + cardNumber = carNum; + int i = 0, x; + unsigned char cardNums[MAX_MEMCARD_BLOCKS+1]; + BOOL populated[MAX_MEMCARD_BLOCKS] = {0}; + while (i < MAX_MEMCARD_BLOCKS) { + if (populated[i]) { + i += 1; + continue; + } + x = 1; + McdBlock memBlock; + GetMcdBlockInfo(carNum, i + 1, &memBlock); + + // ignore Free space + if ([PcsxrMemoryObject memFlagsFromBlockFlags:memBlock.Flags] == PCSXRMemFlagFree/* || + [PcsxrMemoryObject memFlagsFromBlockFlags:memBlock.Flags] == PCSXRMemFlagLink || + [PcsxrMemoryObject memFlagsFromBlockFlags:memBlock.Flags] == PCSXRMemFlagEndLink*/) { + i++; + continue; + } + @autoreleasepool { + int idxCount = GetMcdBlockCount(carNum, i+1, cardNums); + NSMutableIndexSet *cardIdx = [[NSMutableIndexSet alloc] init]; + for (int idxidx = 0; idxidx < idxCount; idxidx++) { + [cardIdx addIndex:cardNums[idxidx] - 1]; + populated[cardNums[idxidx] - 1] = YES; + } + PcsxrMemoryObject *obj = [[PcsxrMemoryObject alloc] initWithMcdBlock:&memBlock blockIndexes:cardIdx]; + [tmpMemArray addObject:obj]; + } + i += 1; + } + self.rawArray = [[NSArray alloc] initWithArray:tmpMemArray]; + } + return self; +} + +- (int)indexOfFreeBlocksWithSize:(int)asize +{ + int foundcount = 0, i = 0; + + McdBlock obj; + // search for empty (formatted) blocks first + while (i < MAX_MEMCARD_BLOCKS && foundcount < asize) { + GetMcdBlockInfo(cardNumber, 1 + i++, &obj); + //&Blocks[target_card][++i]; + if ((obj.Flags & 0xFF) == 0xA0) { // if A0 but not A1 + foundcount++; + } else if (foundcount >= 1) { // need to find n count consecutive blocks + foundcount = 0; + } else { + //i++; + } + //printf("formatstatus=%x\n", Info->Flags); + } + + if (foundcount == asize) + return (i-foundcount); + + // no free formatted slots, try to find a deleted one + foundcount = i = 0; + while (i < MAX_MEMCARD_BLOCKS && foundcount < asize) { + GetMcdBlockInfo(cardNumber, 1 + i++, &obj); + if ((obj.Flags & 0xF0) == 0xA0) { // A2 or A6 f.e. + foundcount++; + } else if (foundcount >= 1) { // need to find n count consecutive blocks + foundcount = 0; + } else { + //i++; + } + //printf("delstatus=%x\n", Info->Flags); + } + + if (foundcount == asize) + return (i-foundcount); + + return -1; +} + +- (BOOL)moveBlockAtIndex:(int)idx toMemoryCard:(PcsxrMemCardArray*)otherCard +{ + if (idx == [rawArray count]) { +#ifdef DEBUG + NSLog(@"Trying to get an object one more than the length of the raw array. Perhaps you were trying to \"move\" the free blocks. We don't want to do this."); +#endif + return NO; + } + PcsxrMemoryObject *tmpObj = rawArray[idx]; + + int memSize = tmpObj.blockSize; + + if ([otherCard availableBlocks] < memSize) { + NSLog(@"Failing because the other card does not have enough space!"); + return NO; + } + + int toCopy = [otherCard indexOfFreeBlocksWithSize:memSize]; + if (toCopy == -1) { + NSLog(@"Not enough consecutive blocks. Compacting the other card."); + [otherCard compactMemory]; + //Since we're accessing the mem card data directly (instead of via PcsxrMemoryObject objects) using the following calls, we don't need to reload the data. + toCopy = [otherCard indexOfFreeBlocksWithSize:memSize]; + NSAssert(toCopy != -1, @"Compacting the card should have made space!"); + } + + NSIndexSet *memIdxs = tmpObj.indexes; + int i = 0; + for (NSInteger memIdx = memIdxs.firstIndex; memIdx != NSNotFound; memIdx = [memIdxs indexGreaterThanIndex:memIdx]) { + CopyMemcardData([self memDataPtr], [otherCard memDataPtr], (int)memIdx, toCopy + i++, (char*)otherCard.memCardCPath); + } + return YES; +} + +- (int)freeBlocks +{ + int memSize = MAX_MEMCARD_BLOCKS; + for (PcsxrMemoryObject *memObj in rawArray) { + memSize -= memObj.blockSize; + } + return memSize; +} + +- (int)availableBlocks +{ + int memSize = MAX_MEMCARD_BLOCKS; + for (PcsxrMemoryObject *memObj in rawArray) { + if (memObj.flag != PCSXRMemFlagDeleted) { + memSize -= memObj.blockSize; + } + } + return memSize; +} + +- (NSArray*)memoryArray +{ + int freeSize = [self freeBlocks]; + + if (freeSize) { + McdBlock theBlock; + //Create a blank "block" that will be used to show the amount of free blocks + theBlock.Flags = 0xA0; + theBlock.IconCount = 0; + PcsxrMemoryObject *freeObj = [[PcsxrMemoryObject alloc] initWithMcdBlock:&theBlock startingIndex:MAX_MEMCARD_BLOCKS - 1 - freeSize size:freeSize]; + return [rawArray arrayByAddingObject:freeObj]; + } else + return rawArray; +} + +- (NSURL*)memCardURL +{ + if (cardNumber == 1) { + return [[NSUserDefaults standardUserDefaults] URLForKey:@"Mcd1"]; + } else { + return [[NSUserDefaults standardUserDefaults] URLForKey:@"Mcd2"]; + } +} + +- (int)memorySizeAtIndex:(int)idx +{ + if (idx == [rawArray count]) { +#ifdef DEBUG + NSLog(@"Trying to get an object one more than the length of the raw array. Perhaps you were trying to \"count\" the free blocks?"); +#endif + return [self freeBlocks]; + } + + return [rawArray[idx] blockSize]; +} + +- (void)compactMemory +{ + int i = 0, x = 1; + while (i < MAX_MEMCARD_BLOCKS && x < MAX_MEMCARD_BLOCKS) { + x = i; + McdBlock baseBlock; + GetMcdBlockInfo(cardNumber, i+1, &baseBlock); + PCSXRMemFlag theFlags = [PcsxrMemoryObject memFlagsFromBlockFlags:baseBlock.Flags]; + + if (theFlags == PCSXRMemFlagDeleted || theFlags == PCSXRMemFlagFree) { + PCSXRMemFlag up1Flags = theFlags; + while ((up1Flags == PCSXRMemFlagDeleted || up1Flags == PCSXRMemFlagFree) && x < MAX_MEMCARD_BLOCKS) { + x++; + McdBlock up1Block; + GetMcdBlockInfo(cardNumber, x+1, &up1Block); + up1Flags = [PcsxrMemoryObject memFlagsFromBlockFlags:up1Block.Flags]; + } + if (x >= MAX_MEMCARD_BLOCKS) { + break; + } + + CopyMemcardData(self.memDataPtr, self.memDataPtr, x, i, (char*)[[self.memCardURL path] fileSystemRepresentation]); + ClearMemcardData(self.memDataPtr, x, (char*)self.memCardCPath); + } + i++; + } + + while (i < MAX_MEMCARD_BLOCKS) { + ClearMemcardData(self.memDataPtr, i, (char*)self.memCardCPath); + i++; + } + + LoadMcd(cardNumber, (char*)self.memCardCPath); +} + +- (void)deleteMemoryBlocksAtIndex:(int)slotnum +{ + char *data, *ptr, *filename; + if (cardNumber == 1) { + filename = Config.Mcd1; + data = Mcd1Data; + } else { + filename = Config.Mcd2; + data = Mcd2Data; + } + + if (slotnum == [rawArray count]) { +#ifdef DEBUG + NSLog(@"Trying to get an object one more than the length of the raw array. Perhaps you were trying to \"delete\" the free blocks?"); +#endif + return; + } + + PcsxrMemoryObject *theObj = rawArray[slotnum]; + + McdBlock flagBlock; + + for (NSInteger i = theObj.indexes.firstIndex; i != NSNotFound; i = [theObj.indexes indexGreaterThanIndex:i]) + { + char xor = 0; + GetMcdBlockInfo(cardNumber, (int)i, &flagBlock); + ptr = data + i * 128; + + if ((flagBlock.Flags & 0xF0) == 0xA0) { + if ((flagBlock.Flags & 0xF) >= 1 && + (flagBlock.Flags & 0xF) <= 3) { // deleted + *ptr = 0x50 | (flagBlock.Flags & 0xF); + } else return; + } else if ((flagBlock.Flags & 0xF0) == 0x50) { // used + *ptr = 0xA0 | (flagBlock.Flags & 0xF); + } else { continue; } + + for (unsigned char j = 0; j < 127; j++) xor ^= *ptr++; + *ptr = xor; + + SaveMcd(filename, data, (int)(i * 128), 128); + } +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrMemCardController.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrMemCardController.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrMemCardController.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrMemCardController.h 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,26 @@ +// +// PcsxrMemCardManager.h +// Pcsxr +// +// Created by Charles Betts on 11/23/11. +// Copyright (c) 2011 __MyCompanyName__. All rights reserved. +// + +#import +@class PcsxrMemCardArray; + +@interface PcsxrMemCardController : NSViewController +@property (weak) IBOutlet NSCollectionView *memCard1view; +@property (weak) IBOutlet NSCollectionView *memCard2view; +@property (weak) IBOutlet NSTextField *memCard1Label; +@property (weak) IBOutlet NSTextField *memCard2Label; + +@property (readonly, strong) PcsxrMemCardArray *memCard1Array; +@property (readonly, strong) PcsxrMemCardArray *memCard2Array; + +- (IBAction)moveBlock:(id)sender; +- (IBAction)formatCard:(id)sender; +- (IBAction)deleteMemoryObject:(id)sender; +- (void)loadMemoryCardInfoForCard:(int)theCard; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrMemCardController.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrMemCardController.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrMemCardController.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrMemCardController.m 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,219 @@ +// +// PcsxrMemCardManager.m +// Pcsxr +// +// Created by Charles Betts on 11/23/11. +// Copyright (c) 2011 __MyCompanyName__. All rights reserved. +// + +#import "PcsxrMemCardController.h" +#import "PcsxrMemoryObject.h" +#import "ConfigurationController.h" +#import "PcsxrMemCardHandler.h" +#import "PcsxrMemCardArray.h" +#include "sio.h" + +#define MAX_MEMCARD_BLOCKS 15 + +@interface PcsxrMemCardController () +@property (readwrite, strong) PcsxrMemCardArray *memCard1Array; +@property (readwrite, strong) PcsxrMemCardArray *memCard2Array; +@end + +@implementation PcsxrMemCardController +@synthesize memCard1Array; +@synthesize memCard2Array; +@synthesize memCard1view; +@synthesize memCard2view; +@synthesize memCard1Label; +@synthesize memCard2Label; + +- (void)setupValues:(int)theCards +{ + NSParameterAssert(theCards < 4 && theCards > 0); + if (theCards == 3) { + LoadMcds(Config.Mcd1, Config.Mcd2); + } else { + LoadMcd(theCards, theCards == 1 ? Config.Mcd1 : Config.Mcd2); + } + NSFileManager *fm = [NSFileManager defaultManager]; + NSUserDefaults *def = [NSUserDefaults standardUserDefaults]; + NSString *fullPath = nil; + NSString *fileName = nil; + + if (theCards & 1) { + fullPath = [[def URLForKey:@"Mcd1"] path]; + fileName = [fm displayNameAtPath:fullPath]; + + [memCard1Label setStringValue:fileName]; + [memCard1Label setToolTip:fullPath]; + + [self loadMemoryCardInfoForCard:1]; + } + + if (theCards & 2) { + fullPath = [[def URLForKey:@"Mcd2"] path]; + fileName = [fm displayNameAtPath:fullPath]; + + [memCard2Label setStringValue:fileName]; + [memCard2Label setToolTip:fullPath]; + + [self loadMemoryCardInfoForCard:2]; + } +} + +- (void)loadMemoryCardInfoForCard:(int)theCard +{ + PcsxrMemCardArray *newArray = [[PcsxrMemCardArray alloc] initWithMemoryCardNumber:theCard]; + + if (theCard == 1) { + [self setMemCard1Array:newArray]; + } else { + [self setMemCard2Array:newArray]; + } +} + +- (void)memoryCardDidChangeNotification:(NSNotification *)aNote +{ + NSDictionary *dict = [aNote userInfo]; + NSNumber *theNum = dict[memCardChangeNumberKey]; + [self setupValues: theNum ? [theNum intValue] : 3]; +} + +- (void)awakeFromNib +{ + [super awakeFromNib]; + [self setupValues:3]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(memoryCardDidChangeNotification:) name:memChangeNotifier object:nil]; +} + +- (IBAction)moveBlock:(id)sender +{ + NSInteger memCardSelect = [sender tag]; + NSCollectionView *cardView; + NSIndexSet *selection; + PcsxrMemCardArray *toCard, *fromCard; + int cardnum; + if (memCardSelect == 1) { + cardView = memCard2view; + toCard = memCard1Array; + fromCard = memCard2Array; + cardnum = 1; + } else { + cardView = memCard1view; + toCard = memCard2Array; + fromCard = memCard1Array; + cardnum = 2; + } + selection = [cardView selectionIndexes]; + if (!selection || [selection count] != 1) { + NSBeep(); + return; + } + NSInteger selectedIndex = [selection firstIndex]; + + int cardSize, freeConsBlocks, availBlocks; + + if ([[fromCard memoryArray][selectedIndex] flag] == PCSXRMemFlagFree) { + NSBeep(); + return; + } + + cardSize = [fromCard memorySizeAtIndex:(int)selectedIndex]; + freeConsBlocks = [toCard indexOfFreeBlocksWithSize:cardSize]; + availBlocks = [toCard availableBlocks]; + if (freeConsBlocks == -1 && availBlocks >= cardSize) { + PcsxrMemoryObject *tmpmemobj = (fromCard.memoryArray)[selectedIndex]; + NSInteger copyOK = NSRunInformationalAlertPanel(NSLocalizedString(@"Free Size", nil), NSLocalizedString(@"Memory card %i does not have enough free consecutive blocks.\n\nIn order to copy over \"%@,\" memory card %i must be compressed. Compressing memory cards will make deleted blocks unrecoverable.\n\nDo you want to continue?", nil), NSLocalizedString(@"Yes", nil), NSLocalizedString(@"No", nil), nil, cardnum, tmpmemobj.name, cardnum); + if (copyOK != NSAlertDefaultReturn) { + return; + } + } else if (cardSize > availBlocks) { + NSRunCriticalAlertPanel(NSLocalizedString(@"No Free Space", nil), NSLocalizedString(@"Memory card %d doesn't have %d free consecutive blocks on it. Please remove some blocks on that card to continue", nil), nil, nil, nil, availBlocks, cardnum); + return; + } + + [fromCard moveBlockAtIndex:(int)selectedIndex toMemoryCard:toCard]; + + if (cardnum == 1) { + LoadMcd(1, Config.Mcd1); + } else { + LoadMcd(2, Config.Mcd2); + } + [self loadMemoryCardInfoForCard:cardnum]; +} + +- (IBAction)formatCard:(id)sender +{ + NSInteger formatOkay = NSRunAlertPanel(NSLocalizedString(@"Format Card", nil), NSLocalizedString(@"Formatting a memory card will remove all data on it.\n\nThis cannot be undone.", nil), NSLocalizedString(@"Cancel", nil), NSLocalizedString(@"Format", nil), nil); + if (formatOkay == NSAlertAlternateReturn) { + NSInteger memCardSelect = [sender tag]; + if (memCardSelect == 1) { + CreateMcd(Config.Mcd1); + LoadMcd(1, Config.Mcd1); + } else { + CreateMcd(Config.Mcd2); + LoadMcd(2, Config.Mcd2); + } + [self loadMemoryCardInfoForCard:(int)memCardSelect]; + } +} + +- (void)deleteMemoryBlocksAtIndex:(int)slotnum card:(int)cardNum +{ + PcsxrMemCardArray *cardArray; + if (cardNum == 1) { + cardArray = [self memCard1Array]; + } else { + cardArray = [self memCard2Array]; + } + [cardArray deleteMemoryBlocksAtIndex:slotnum]; +} + +- (IBAction)deleteMemoryObject:(id)sender +{ + PcsxrMemCardArray *curCard; + NSInteger memCardSelect = [sender tag]; + NSIndexSet *selected; + if (memCardSelect == 1) { + curCard = memCard1Array; + selected = [memCard1view selectionIndexes]; + } else { + curCard = memCard2Array; + selected = [memCard2view selectionIndexes]; + } + + if (!selected || [selected count] == 0) { + NSBeep(); + return; + } + + NSInteger selectedIndex = [selected firstIndex]; + + PcsxrMemoryObject *tmpObj = [curCard memoryArray][selectedIndex]; + + if (tmpObj.flag == PCSXRMemFlagFree) { + NSBeep(); + return; + } + + NSInteger deleteOkay = NSRunAlertPanel(NSLocalizedString(@"Delete Block", @"The block will be deleted"), NSLocalizedString(@"Deleting a block will remove all saved data on that block.\n\nThis cannot be undone.", @"Delete block cannot be undone"), NSLocalizedString(@"Cancel", @"Cancel"), NSLocalizedString(@"Delete", nil), nil); + if (deleteOkay == NSAlertAlternateReturn) { + [self deleteMemoryBlocksAtIndex:(int)selectedIndex card:(int)memCardSelect]; + + if (memCardSelect == 1) { + LoadMcd(1, Config.Mcd1); + } else { + LoadMcd(2, Config.Mcd2); + } + [self loadMemoryCardInfoForCard:(int)memCardSelect]; + } +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrMemCardHandler.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrMemCardHandler.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrMemCardHandler.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrMemCardHandler.h 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,15 @@ +// +// PcsxrMemCardHandler.h +// Pcsxr +// +// Created by Charles Betts on 12/10/11. +// Copyright (c) 2011 __MyCompanyName__. All rights reserved. +// + +#import +#import "PcsxrFileHandle.h" + +@interface PcsxrMemCardHandler : NSWindowController +@property (weak) IBOutlet NSTextField *cardPath; +- (IBAction)setMemCard:(id)sender; +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrMemCardHandler.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrMemCardHandler.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrMemCardHandler.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrMemCardHandler.m 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,81 @@ +// +// PcsxrMemCardHandler.m +// Pcsxr +// +// Created by Charles Betts on 12/10/11. +// Copyright (c) 2011 __MyCompanyName__. All rights reserved. +// + +#import "PcsxrMemCardHandler.h" +#import "ConfigurationController.h" +#import "EmuThread.h" + +@interface PcsxrMemCardHandler () +@property NSInteger memChosen; +@end + +@implementation PcsxrMemCardHandler +@synthesize cardPath; +@synthesize memChosen; + ++ (NSArray *)supportedUTIs +{ + static NSArray *utisupport = nil; + if (utisupport == nil) { + utisupport = @[@"com.codeplex.pcsxr.memcard"]; + } + return utisupport; +} + +- (instancetype)initWithWindow:(NSWindow *)window +{ + self = [super initWithWindow:window]; + if (self) { + memChosen = 0; + } + + return self; +} + +- (instancetype)init +{ + return self = [self initWithWindowNibName:@"PcsxrMemCard"]; +} + +- (void)windowDidLoad +{ + [super windowDidLoad]; + // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. +} + +- (NSString*)windowNibName +{ + return @"PcsxrMemCard"; +} + +- (IBAction)setMemCard:(id)sender +{ + memChosen = [sender tag]; + + [NSApp stopModal]; +} + +- (BOOL)handleFile:(NSString *)theFile +{ + if ([EmuThread active]) { + return NO; + } + + [cardPath setStringValue:[[NSFileManager defaultManager] displayNameAtPath:theFile]]; + + [NSApp runModalForWindow:[self window]]; + + [[self window] orderOut:nil]; + + if (memChosen != 0) { + [ConfigurationController setMemoryCard:memChosen toPath:theFile]; + } + return YES; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrMemoryObject.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrMemoryObject.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrMemoryObject.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrMemoryObject.h 2016-06-30 16:53:22.000000000 +0000 @@ -0,0 +1,48 @@ +// +// PcsxrMemoryObject.h +// Pcsxr +// +// Created by Charles Betts on 11/23/11. +// Copyright (c) 2011 __MyCompanyName__. All rights reserved. +// + +#import +#include "sio.h" + +typedef NS_ENUM(char, PCSXRMemFlag) { + PCSXRMemFlagDeleted, + PCSXRMemFlagFree, + PCSXRMemFlagUsed, + PCSXRMemFlagLink, + PCSXRMemFlagEndLink +}; + +@interface PcsxrMemoryObject : NSObject +@property (readonly, copy) NSString *title; +@property (readonly, copy) NSString *name; +@property (readonly, copy) NSString *identifier; +@property (readonly, strong) NSArray *imageArray; +@property (readonly, strong, nonatomic) NSImage *image; +@property (readonly) PCSXRMemFlag flag; +@property (readonly, strong) NSIndexSet *indexes; +@property (readonly) uint8_t blockSize; +@property (readonly) BOOL hasImages; + ++ (NSArray *)imagesFromMcd:(McdBlock *)block; ++ (NSString*)memoryLabelFromFlag:(PCSXRMemFlag)flagNameIndex; ++ (NSImage *)blankImage; ++ (PCSXRMemFlag)memFlagsFromBlockFlags:(unsigned char)blockFlags; + +- (instancetype)initWithMcdBlock:(McdBlock *)infoBlockc startingIndex:(uint8_t)startIdx size:(uint8_t)memSize DEPRECATED_ATTRIBUTE; +- (instancetype)initWithMcdBlock:(McdBlock *)infoBlockc blockIndexes:(NSIndexSet*)blockIdx NS_DESIGNATED_INITIALIZER; + +- (NSImage*)memoryImageAtIndex:(NSInteger)idx; + + +@property (readonly, copy) NSImage *firstImage; +@property (readonly, nonatomic) NSUInteger iconCount; +@property (readonly, unsafe_unretained, nonatomic) NSString *flagName; +@property (readonly, unsafe_unretained, nonatomic) NSAttributedString *attributedFlagName; +@property (readonly, nonatomic) BOOL showCount; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrMemoryObject.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrMemoryObject.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrMemoryObject.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrMemoryObject.m 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,338 @@ +// +// PcsxrMemoryObject.m +// Pcsxr +// +// Created by Charles Betts on 11/23/11. +// Copyright (c) 2011 __MyCompanyName__. All rights reserved. +// + +#import +#import "PcsxrMemoryObject.h" + +@interface PcsxrMemoryObject () +@property (readwrite, copy) NSString *title; +@property (readwrite, copy) NSString *name; +@property (readwrite, copy) NSString *identifier; + +@property (readwrite, strong) NSArray *imageArray; +@property (readwrite) PCSXRMemFlag flag; +@property (readwrite, nonatomic, strong) NSImage *image; +@property (readwrite) BOOL hasImages; +@property (readwrite, strong) NSIndexSet *indexes; + +@end + +#pragma pack(push,2) +struct PSXRGBColor { + UInt8 r; + UInt8 g; + UInt8 b; +}; +#pragma pack(pop) + +@implementation PcsxrMemoryObject + ++ (NSArray *)imagesFromMcd:(McdBlock *)block +{ + NSMutableArray *imagesArray = [[NSMutableArray alloc] initWithCapacity:block->IconCount]; + for (int i = 0; i < block->IconCount; i++) { + NSBitmapImageRep *imageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL pixelsWide:16 pixelsHigh:16 bitsPerSample:8 samplesPerPixel:3 hasAlpha:NO isPlanar:NO colorSpaceName:NSCalibratedRGBColorSpace bytesPerRow:16*3 bitsPerPixel:24]; + struct PSXRGBColor *cocoaImageData = (struct PSXRGBColor *)imageRep.bitmapData; + short *icon = block->Icon; + + for (int v = 0; v < 256; v++) { + int c = icon[(i * 256) + v]; + int r = (c & 0x001f) << 3; + int g = ((c & 0x03e0) >> 5) << 3; + int b = ((c & 0x7c00) >> 10) << 3; + struct PSXRGBColor *colorItem = &cocoaImageData[v]; + colorItem->r = r; + colorItem->g = g; + colorItem->b = b; + } + NSImage *memImage = [[NSImage alloc] init]; + [memImage addRepresentation:imageRep]; + [memImage setSize:NSMakeSize(32, 32)]; + [imagesArray addObject:memImage]; + } + return [NSArray arrayWithArray:imagesArray]; +} + +static NSString *MemLabelDeleted; +static NSString *MemLabelFree; +static NSString *MemLabelUsed; +static NSString *MemLabelLink; +static NSString *MemLabelEndLink; +static NSString *MemLabelMultiSave; + ++ (void)initialize +{ + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + NSBundle *mainBundle = [NSBundle mainBundle]; + MemLabelDeleted = [[mainBundle localizedStringForKey:@"MemCard_Deleted" value:@"" table:nil] copy]; + MemLabelFree = [[mainBundle localizedStringForKey:@"MemCard_Free" value:@"" table:nil] copy]; + MemLabelUsed = [[mainBundle localizedStringForKey:@"MemCard_Used" value:@"" table:nil] copy]; + MemLabelLink = [[mainBundle localizedStringForKey:@"MemCard_Link" value:@"" table:nil] copy]; + MemLabelEndLink = [[mainBundle localizedStringForKey:@"MemCard_EndLink" value:@"" table:nil] copy]; + MemLabelMultiSave = [[mainBundle localizedStringForKey:@"MemCard_MultiSave" value:@"" table:nil] copy]; + }); +} + +- (NSImage*)memoryImageAtIndex:(NSInteger)idx +{ + if (!self.hasImages || idx > self.iconCount) { + return [PcsxrMemoryObject blankImage]; + } + return memImages[idx]; +} + ++ (NSString*)memoryLabelFromFlag:(PCSXRMemFlag)flagNameIndex +{ + switch (flagNameIndex) { + default: + case PCSXRMemFlagFree: + return MemLabelFree; + break; + + case PCSXRMemFlagEndLink: + return MemLabelEndLink; + break; + + case PCSXRMemFlagLink: + return MemLabelLink; + break; + + case PCSXRMemFlagUsed: + return MemLabelUsed; + break; + + case PCSXRMemFlagDeleted: + return MemLabelDeleted; + break; + } +} + ++ (NSImage *)blankImage +{ + static NSImage *imageBlank = nil; + if (imageBlank == nil) { + NSRect imageRect = NSMakeRect(0, 0, 16, 16); + imageBlank = [[NSImage alloc] initWithSize:imageRect.size]; + [imageBlank lockFocus]; + [[NSColor blackColor] set]; + [NSBezierPath fillRect:imageRect]; + [imageBlank unlockFocus]; + } + return [imageBlank copy]; +} + ++ (PCSXRMemFlag)memFlagsFromBlockFlags:(unsigned char)blockFlags +{ + if ((blockFlags & 0xF0) == 0xA0) { + if ((blockFlags & 0xF) >= 1 && (blockFlags & 0xF) <= 3) + return PCSXRMemFlagDeleted; + else + return PCSXRMemFlagFree; + } else if ((blockFlags & 0xF0) == 0x50) { + if ((blockFlags & 0xF) == 0x1) + return PCSXRMemFlagUsed; + else if ((blockFlags & 0xF) == 0x2) + return PCSXRMemFlagLink; + else if ((blockFlags & 0xF) == 0x3) + return PCSXRMemFlagEndLink; + } else + return PCSXRMemFlagFree; + + //Xcode complains unless we do this... + NSLog(@"Unknown flag %x", blockFlags); + return PCSXRMemFlagFree; +} + +- (instancetype)initWithMcdBlock:(McdBlock *)infoBlock startingIndex:(uint8_t)startIdx size:(uint8_t)memSize +{ + return [self initWithMcdBlock:infoBlock blockIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(startIdx, memSize)]]; +} + +- (instancetype)initWithMcdBlock:(McdBlock *)infoBlock blockIndexes:(NSIndexSet*)blockIdx +{ + if (self = [super init]) { + self.indexes = blockIdx; + self.flag = [PcsxrMemoryObject memFlagsFromBlockFlags:infoBlock->Flags]; + if (self.flag == PCSXRMemFlagFree) { + self.imageArray = @[]; + self.hasImages = NO; + self.title = @"Free block"; + self.identifier = self.name = @""; + } else { + self.title = [NSString stringWithCString:infoBlock->sTitle encoding:NSShiftJISStringEncoding]; + self.imageArray = [PcsxrMemoryObject imagesFromMcd:infoBlock]; + + if ([memImages count] == 0) { + self.hasImages = NO; + } else { + self.hasImages = YES; + } + self.name = @(infoBlock->Name); + self.identifier = @(infoBlock->ID); + } + } + return self; +} + +#pragma mark - Property Synthesizers +@synthesize title; +@synthesize name; +@synthesize identifier; +@synthesize imageArray = memImages; +@synthesize flag; +@synthesize image = _memImage; + +- (uint8_t)blockSize +{ + return _indexes.count; +} + +#pragma mark Non-synthesized Properties +- (NSUInteger)iconCount +{ + return [memImages count]; +} + +- (NSImage*)firstImage +{ + if (self.hasImages == NO) { + return [PcsxrMemoryObject blankImage]; + } + return memImages[0]; +} + +- (NSImage*)image +{ + if (self.hasImages == NO) { + NSImage *tmpBlank = [PcsxrMemoryObject blankImage]; + tmpBlank.size = NSMakeSize(32, 32); + return tmpBlank; + } + + if (!_memImage) { + NSMutableData *gifData = [NSMutableData new]; + + CGImageDestinationRef dst = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)gifData, kUTTypeGIF, self.iconCount, NULL); + NSDictionary *gifPrep = @{(NSString *) kCGImagePropertyGIFDictionary: @{(NSString *) kCGImagePropertyGIFDelayTime: @0.30f}}; + for (NSImage *theImage in memImages) { + CGImageRef imageRef = [theImage CGImageForProposedRect:NULL context:nil hints:nil]; + CGImageDestinationAddImage(dst, imageRef,(__bridge CFDictionaryRef)(gifPrep)); + } + CGImageDestinationFinalize(dst); + CFRelease(dst); + + _memImage = [[NSImage alloc] initWithData:gifData]; + _memImage.size = NSMakeSize(32, 32); + } + return _memImage; +} + +- (NSString*)flagName +{ + return [PcsxrMemoryObject memoryLabelFromFlag:flag]; +} + +static inline void SetupAttrStr(NSMutableAttributedString *mutStr, NSColor *txtclr) +{ + NSRange wholeStrRange = NSMakeRange(0, mutStr.string.length); + [mutStr addAttribute:NSFontAttributeName value:[NSFont userFontOfSize:[NSFont systemFontSizeForControlSize:NSSmallControlSize]] range:wholeStrRange]; + [mutStr addAttribute:NSForegroundColorAttributeName value:txtclr range:wholeStrRange]; + [mutStr setAlignment:NSCenterTextAlignment range:wholeStrRange]; +} + +- (NSAttributedString*)attributedFlagName +{ + static NSAttributedString *attribMemLabelDeleted; + static NSAttributedString *attribMemLabelFree; + static NSAttributedString *attribMemLabelUsed; + static NSAttributedString *attribMemLabelLink; + static NSAttributedString *attribMemLabelEndLink; + + static dispatch_once_t attrStrSetOnceToken; + dispatch_once(&attrStrSetOnceToken, ^{ + NSMutableAttributedString *tmpStr = [[NSMutableAttributedString alloc] initWithString:MemLabelFree]; + SetupAttrStr(tmpStr, [NSColor greenColor]); + attribMemLabelFree = [tmpStr copy]; + +#ifdef DEBUG + tmpStr = [[NSMutableAttributedString alloc] initWithString:MemLabelEndLink]; + SetupAttrStr(tmpStr, [NSColor blueColor]); + attribMemLabelEndLink = [tmpStr copy]; + + tmpStr = [[NSMutableAttributedString alloc] initWithString:MemLabelLink]; + SetupAttrStr(tmpStr, [NSColor blueColor]); + attribMemLabelLink = [tmpStr copy]; + + tmpStr = [[NSMutableAttributedString alloc] initWithString:MemLabelUsed]; + SetupAttrStr(tmpStr, [NSColor controlTextColor]); + attribMemLabelUsed = [tmpStr copy]; +#else + tmpStr = [[NSMutableAttributedString alloc] initWithString:MemLabelMultiSave]; + SetupAttrStr(tmpStr, [NSColor blueColor]); + attribMemLabelEndLink = [tmpStr copy]; + + // Same as attribMemLabelEndLink on release builds + attribMemLabelLink = attribMemLabelEndLink; + + //display nothing + attribMemLabelUsed = [[NSAttributedString alloc] initWithString:@""]; +#endif + + tmpStr = [[NSMutableAttributedString alloc] initWithString:MemLabelDeleted]; + SetupAttrStr(tmpStr, [NSColor redColor]); + attribMemLabelDeleted = [tmpStr copy]; + }); + + switch (flag) { + default: + case PCSXRMemFlagFree: + return attribMemLabelFree; + break; + + case PCSXRMemFlagEndLink: + return attribMemLabelEndLink; + break; + + case PCSXRMemFlagLink: + return attribMemLabelLink; + break; + + case PCSXRMemFlagUsed: + return attribMemLabelUsed; + break; + + case PCSXRMemFlagDeleted: + return attribMemLabelDeleted; + break; + } +} + +- (BOOL)showCount +{ + if (flag == PCSXRMemFlagFree) { + //Always show the size of the free blocks + return YES; + } else { + return [self blockSize] != 1; + } +} + +#pragma mark - + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"%@: Name: %@ ID: %@, type: %@ blocks: %@", title, name, identifier, self.flagName, _indexes]; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrPlugin.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrPlugin.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrPlugin.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrPlugin.h 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,32 @@ +// +// PcsxrPlugin.h +// Pcsxr +// +// Created by Gil Pedersen on Fri Oct 03 2003. +// Copyright (c) 2003 __MyCompanyName__. All rights reserved. +// + +#import + +@interface PcsxrPlugin : NSObject +@property (readonly, copy) NSString *path; +@property (readonly, copy) NSString *name; +@property (readonly) int type; + ++ (NSString *)prefixForType:(int)type; ++ (NSString *)defaultKeyForType:(int)type; ++ (char **)configEntriesForType:(int)type; ++ (NSArray *)pluginsPaths; + +- (instancetype)initWithPath:(NSString *)aPath NS_DESIGNATED_INITIALIZER; + +@property (readonly, copy) NSString *displayVersion; +- (BOOL)hasAboutAs:(int)type; +- (BOOL)hasConfigureAs:(int)type; +- (long)runAs:(int)aType; +- (long)shutdownAs:(int)aType; +- (void)aboutAs:(int)type; +- (void)configureAs:(int)type; +- (BOOL)verifyOK; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrPluginHandler.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrPluginHandler.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrPluginHandler.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrPluginHandler.h 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,15 @@ +// +// PcsxrPluginHandler.h +// Pcsxr +// +// Created by Charles Betts on 12/10/11. +// Copyright (c) 2011 __MyCompanyName__. All rights reserved. +// + +#import +#import "PcsxrFileHandle.h" + +@interface PcsxrPluginHandler : NSWindowController +@property (weak) IBOutlet NSTextField *pluginName; +- (IBAction)closeAddPluginSheet:(id)sender; +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrPluginHandler.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrPluginHandler.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrPluginHandler.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrPluginHandler.m 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,97 @@ +// +// PcsxrPluginHandler.m +// Pcsxr +// +// Created by Charles Betts on 12/10/11. +// Copyright (c) 2011 __MyCompanyName__. All rights reserved. +// + +#import "PcsxrPluginHandler.h" +#import "EmuThread.h" + +@interface PcsxrPluginHandler () +@property BOOL moveOK; +@end + +@implementation PcsxrPluginHandler +@synthesize pluginName; +@synthesize moveOK; + ++ (NSArray *)supportedUTIs +{ + static NSArray *utisupport = nil; + if (utisupport == nil) { + utisupport = @[@"com.codeplex.pcsxr.plugin"]; + } + return utisupport; +} + +- (instancetype)initWithWindow:(NSWindow *)window +{ + self = [super initWithWindow:window]; + if (self) { + moveOK = NO; + } + + return self; +} + +- (NSString*)windowNibName +{ + return @"AddPluginSheet"; +} + +- (instancetype)init +{ + return self = [self initWithWindowNibName:@"AddPluginSheet"]; +} + +- (void)windowDidLoad +{ + [super windowDidLoad]; + + // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. +} + +- (IBAction)closeAddPluginSheet:(id)sender +{ + if ([[sender keyEquivalent] isEqualToString:@"\r"]) { + moveOK = YES; + } else { + moveOK = NO; + } + [NSApp stopModal]; +} + +- (BOOL)handleFile:(NSString *)theFile +{ + if ([EmuThread active]) { + return NO; + } + + [pluginName setObjectValue:[theFile lastPathComponent]]; + + [NSApp runModalForWindow:[self window]]; + + [[self window] orderOut:nil]; + if (moveOK == YES) { + NSURL *supportURL = [[NSFileManager defaultManager] URLForDirectory:NSApplicationSupportDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:NULL]; + NSURL *url = [[supportURL URLByAppendingPathComponent:@"Pcsxr" isDirectory:YES] URLByAppendingPathComponent:@"PlugIns" isDirectory:YES]; + + NSFileWrapper *wrapper = [[NSFileWrapper alloc] initWithPath:theFile]; + NSString *dst = [[url URLByAppendingPathComponent:[wrapper filename]] path]; + if ([wrapper writeToFile:dst atomically:NO updateFilenames:NO]) { + [[NSWorkspace sharedWorkspace] noteFileSystemChanged:[url path]]; + NSRunInformationalAlertPanel(NSLocalizedString(@"Installation Succesfull", nil), + NSLocalizedString(@"The installation of the specified plugin was succesfull. In order to use it, please restart the application.", nil), + nil, nil, nil); + } else { + NSRunAlertPanel(NSLocalizedString(@"Installation Failed!", nil), + NSLocalizedString(@"The installation of the specified plugin failed. Please try again, or make a manual install.", nil), + nil, nil, nil); + } + } + return YES; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrPlugin.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrPlugin.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PcsxrPlugin.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PcsxrPlugin.m 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,395 @@ +// +// PcsxrPlugin.m +// Pcsxr +// +// Created by Gil Pedersen on Fri Oct 03 2003. +// Copyright (c) 2003 __MyCompanyName__. All rights reserved. +// + +#import +#import "PcsxrPlugin.h" +#include "psxcommon.h" +#include "plugins.h" + +#define kPCSXRGetLibName "PSEgetLibName" +#define kPCSXRGetLibVersion "PSEgetLibVersion" +#define kPCSXRGetLibType "PSEgetLibType" + +@interface PcsxrPlugin () +@property (readwrite, copy) NSString *path; +@property (readwrite, copy) NSString *name; +@property (strong) NSDate *modDate; +@property (copy) NSString *fullPlugPath; +@property long version; +@property (readwrite) int type; +@property int active; +@property void *pluginRef; +@end + +@implementation PcsxrPlugin +@synthesize pluginRef; +@synthesize active; +@synthesize fullPlugPath; +@synthesize modDate; +@synthesize path; +@synthesize type; +@synthesize version; + ++ (NSString *)prefixForType:(int)aType +{ + switch (aType) { + case PSE_LT_GPU: return @"GPU"; break; + case PSE_LT_CDR: return @"CDR"; break; + case PSE_LT_SPU: return @"SPU"; break; + case PSE_LT_PAD: return @"PAD"; break; + case PSE_LT_NET: return @"NET"; break; + case PSE_LT_SIO1: return @"SIO1"; break; + } + + return @""; +} + ++ (NSString *)defaultKeyForType:(int)aType +{ + switch (aType) { + case PSE_LT_GPU: + case PSE_LT_CDR: + case PSE_LT_SPU: + case PSE_LT_PAD: + case PSE_LT_NET: + case PSE_LT_SIO1: + return [NSString stringWithFormat:@"Plugin%@", [self prefixForType:aType]]; + break; + default: + return @""; + break; + } +} + ++ (char **)configEntriesForType:(int)aType +{ + static char *gpu[2] = {(char *)&Config.Gpu, NULL}; + static char *cdr[2] = {(char *)&Config.Cdr, NULL}; + static char *spu[2] = {(char *)&Config.Spu, NULL}; + static char *pad[3] = {(char *)&Config.Pad1, (char *)&Config.Pad2, NULL}; + static char *net[2] = {(char *)&Config.Net, NULL}; + static char *sio1[2] = {(char *)&Config.Sio1, NULL}; + + switch (aType) { + case PSE_LT_GPU: return (char **)gpu; + case PSE_LT_CDR: return (char **)cdr; + case PSE_LT_SPU: return (char **)spu; + case PSE_LT_PAD: return (char **)pad; + case PSE_LT_NET: return (char **)net; + case PSE_LT_SIO1: return (char **)sio1; + } + + return nil; +} + ++ (NSArray *)pluginsPaths +{ + static NSArray *returnArray = nil; + if (returnArray == nil) + { + NSURL *supportURL = [[NSFileManager defaultManager] URLForDirectory:NSApplicationSupportDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:NULL]; + NSURL *libraryURL = [[NSFileManager defaultManager] URLForDirectory:NSLibraryDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:NULL]; + NSURL *localSupportURL = [[NSFileManager defaultManager] URLForDirectory:NSApplicationSupportDirectory inDomain:NSLocalDomainMask appropriateForURL:nil create:YES error:NULL]; + NSURL *localLibraryURL = [[NSFileManager defaultManager] URLForDirectory:NSLibraryDirectory inDomain:NSLocalDomainMask appropriateForURL:nil create:YES error:NULL]; + + NSMutableArray *mutArray = [NSMutableArray arrayWithCapacity:5]; + + [mutArray addObject:[[NSFileManager defaultManager] stringWithFileSystemRepresentation:Config.PluginsDir length:strlen(Config.PluginsDir)]]; + NSURL *url = [localLibraryURL URLByAppendingPathComponent:@"Playstation Emulator Plugins"]; + if ([url checkResourceIsReachableAndReturnError:NULL]) + [mutArray addObject:[url path]]; + url = [[localSupportURL URLByAppendingPathComponent:@"Pcsxr"] URLByAppendingPathComponent:@"PlugIns"]; + if ([url checkResourceIsReachableAndReturnError:NULL]) + [mutArray addObject:[url path]]; + url = [libraryURL URLByAppendingPathComponent:@"Playstation Emulator Plugins"]; + if ([url checkResourceIsReachableAndReturnError:NULL]) + [mutArray addObject:[url path]]; + url = [[supportURL URLByAppendingPathComponent:@"Pcsxr"] URLByAppendingPathComponent:@"PlugIns"]; + if ([url checkResourceIsReachableAndReturnError:NULL]) + [mutArray addObject:[url path]]; + returnArray = [[NSArray alloc] initWithArray:mutArray]; + } + return returnArray; +} + +- (instancetype)initWithPath:(NSString *)aPath +{ + if (!(self = [super init])) { + return nil; + } + + PSEgetLibType PSE_getLibType = NULL; + PSEgetLibVersion PSE_getLibVersion = NULL; + PSEgetLibName PSE_getLibName = NULL; + + NSFileManager *fm = [NSFileManager defaultManager]; + + pluginRef = NULL; + self.name = nil; + self.path = aPath; + NSString *goodPath = nil; + if ([aPath isAbsolutePath]) { + goodPath = aPath; + } else { + long tempVers = 0; + for (NSString *plugDir in [PcsxrPlugin pluginsPaths]) + { + NSString *fullPath = [plugDir stringByAppendingPathComponent:path]; + if ([fm fileExistsAtPath:fullPath]) { + void *tempHandle = SysLoadLibrary([fullPath fileSystemRepresentation]); + if (tempHandle != NULL) + { + PSEgetLibVersion tempLibVersion = SysLoadSym(tempHandle, kPCSXRGetLibVersion); + if (SysLibError() == NULL) + { + long tempVers2 = tempLibVersion(); + if (tempVers < tempVers2 ){ + goodPath = fullPath; + tempVers = tempVers2; + if (![plugDir isEqualToString:[fm stringWithFileSystemRepresentation:Config.PluginsDir length:strlen(Config.PluginsDir)]]) { + self.path = goodPath; + } + } + } + SysCloseLibrary(tempHandle); + } else { + SysLibError(); + } + } + } + } + + if (goodPath == nil) { + return nil; + } + + pluginRef = SysLoadLibrary([goodPath fileSystemRepresentation]); + if (pluginRef == NULL) { + SysLibError(); + return nil; + } + + // TODO: add support for plugins with multiple functionalities? + PSE_getLibType = (PSEgetLibType) SysLoadSym(pluginRef, kPCSXRGetLibType); + if (SysLibError() != nil) { + if (([path rangeOfString: @"gpu" options:NSCaseInsensitiveSearch]).length != 0) + type = PSE_LT_GPU; + else if (([path rangeOfString: @"cdr" options:NSCaseInsensitiveSearch]).length != 0) + type = PSE_LT_CDR; + else if (([path rangeOfString: @"spu" options:NSCaseInsensitiveSearch]).length != 0) + type = PSE_LT_SPU; + else if (([path rangeOfString: @"pad" options:NSCaseInsensitiveSearch]).length != 0) + type = PSE_LT_PAD; + else if (([path rangeOfString: @"net" options:NSCaseInsensitiveSearch]).length != 0) + type = PSE_LT_NET; + else if (([path rangeOfString: @"sio1" options:NSCaseInsensitiveSearch]).length != 0) + type = PSE_LT_SIO1; + else { + return nil; + } + } else { + type = (int)PSE_getLibType(); + if (type != PSE_LT_GPU && type != PSE_LT_CDR && type != PSE_LT_SPU && type != PSE_LT_PAD && type != PSE_LT_NET && type != PSE_LT_SIO1) { + return nil; + } + } + + PSE_getLibName = (PSEgetLibName) SysLoadSym(pluginRef, kPCSXRGetLibName); + if (SysLibError() == nil) { + self.name = @(PSE_getLibName()); + } + + PSE_getLibVersion = (PSEgetLibVersion) SysLoadSym(pluginRef, kPCSXRGetLibVersion); + if (SysLibError() == nil) { + version = PSE_getLibVersion(); + } else { + version = -1; + } + + // save the current modification date + NSDictionary *fattrs = [fm attributesOfItemAtPath:[goodPath stringByResolvingSymlinksInPath] error:NULL]; + self.modDate = [fattrs fileModificationDate]; + self.fullPlugPath = goodPath; + + active = 0; + + return self; +} + +- (void)dealloc +{ + int i; + + // shutdown if we had previously been inited + for (i=0; i<32; i++) { + if (active & (1 << i)) { + [self shutdownAs:(1 << i)]; + } + } + + if (pluginRef) { + SysCloseLibrary(pluginRef); + pluginRef = NULL; + } +} + +#define PluginSymbolName(type, theName) [[PcsxrPlugin prefixForType:type] stringByAppendingString:theName] +#define PluginSymbolNameConfigure(type) PluginSymbolName(type, @"configure") +#define PluginSymbolNameAbout(type) PluginSymbolName(type, @"about") + +- (void)runCommandNamed:(NSString*)arg +{ + long (*func)(void); + + func = SysLoadSym(pluginRef, [arg cStringUsingEncoding:NSASCIIStringEncoding]); + if (SysLibError() == NULL) { + func(); + } else { + NSBeep(); + } +} + +- (long)runAs:(int)aType +{ + long (*init)(); + long (*initArg)(long arg); + long res = PSE_ERR_FATAL; + + if ((active & aType) == aType) { + return 0; + } + + init = initArg = SysLoadSym(pluginRef, [PluginSymbolName(aType, @"init") + cStringUsingEncoding:NSASCIIStringEncoding]); + if (SysLibError() == NULL) { + if (aType != PSE_LT_PAD) { + res = init(); + } else { + res = initArg(1|2); + } + } + + if (0 == res) { + active |= aType; + } else { + NSRunCriticalAlertPanel(NSLocalizedString(@"Plugin Initialization Failed!", nil), + NSLocalizedString(@"Pcsxr failed to initialize the selected %@ plugin (error=%i).\nThe plugin might not work with your system.", nil), + nil, nil, nil, [PcsxrPlugin prefixForType:aType], res); + return res; + } + + //Prevent a memory leak. + long (*shutdown)(void); + shutdown = SysLoadSym(pluginRef, [PluginSymbolName(aType, @"shutdown") + cStringUsingEncoding:NSASCIIStringEncoding]); + if (SysLibError() == NULL) { + shutdown(); + } + + return res; +} + +- (long)shutdownAs:(int)aType +{ +#if 0 + long (*shutdown)(void); + + shutdown = SysLoadSym(pluginRef, [PluginSymbolName(aType, @"shutdown") + cStringUsingEncoding:NSASCIIStringEncoding]); + if (SysLibError() == nil) { + active &= ~aType; + return shutdown(); + } + + return PSE_ERR_FATAL; +#else + active &= ~aType; + return PSE_ERR_SUCCESS; +#endif +} + +- (BOOL)hasAboutAs:(int)aType +{ + SysLoadSym(pluginRef, [PluginSymbolNameAbout(aType) + cStringUsingEncoding:NSASCIIStringEncoding]); + + return (SysLibError() == NULL); +} + +- (BOOL)hasConfigureAs:(int)aType +{ + SysLoadSym(pluginRef, [PluginSymbolNameConfigure(aType) + cStringUsingEncoding:NSASCIIStringEncoding]); + + return (SysLibError() == NULL); +} + +- (void)aboutAs:(int)aType +{ + NSString *aboutSym = PluginSymbolNameAbout(aType); + //NSArray *arg = @[aboutSym, @0]; + + // detach a new thread + dispatch_async(dispatch_get_global_queue(0, 0), ^{ + [self runCommandNamed:aboutSym]; + }); +} + +- (void)configureAs:(int)aType +{ + NSString *configSym = PluginSymbolNameConfigure(aType); + //NSArray *arg = @[configSym, @1]; + + // detach a new thread + dispatch_async(dispatch_get_global_queue(0, 0), ^{ + [self runCommandNamed:configSym]; + }); +} + +- (NSString *)displayVersion +{ + if (version == -1) + return @""; + + return [NSString stringWithFormat:@"v%ld.%ld.%ld", version>>16,(version>>8)&0xff,version&0xff]; +} + +- (NSUInteger)hash +{ + return [fullPlugPath hash]; +} + +- (NSString *)description +{ + if (_name == nil) + return [path lastPathComponent]; + + return [NSString stringWithFormat:@"%@ %@ [%@]", self.name, self.displayVersion, path.lastPathComponent]; +} + +- (NSString*)debugDescription +{ + if (_name == nil) { + return fullPlugPath; + } + return [NSString stringWithFormat:@"%@, %@ [%@]", self.name, self.displayVersion, fullPlugPath]; +} + +// the plugin will check if it's still valid and return the status +- (BOOL)verifyOK +{ + // check that the file is still there with the same modification date + NSFileManager *dfm = [NSFileManager defaultManager]; + if (![dfm fileExistsAtPath:fullPlugPath]) + return NO; + + NSDictionary *fattrs = [dfm attributesOfItemAtPath:[fullPlugPath stringByResolvingSymlinksInPath] error:NULL]; + return [[fattrs fileModificationDate] isEqualToDate:modDate]; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/Plugin.c pcsxr-unstable-1.9.94+svn98108/macosx/Source/Plugin.c --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/Plugin.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/Plugin.c 2016-06-30 16:53:20.000000000 +0000 @@ -0,0 +1,227 @@ +/* Pcsxr - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include +#include + +#include "psxcommon.h" +#include "plugins.h" +#include "spu.h" + +void OnFile_Exit(); + +unsigned long gpuDisp; + +long SPU__open(void) { + return SPU_open(); +} + +int StatesC = 0; +extern int UseGui; +int ShowPic=0; + +void gpuShowPic() { +} + +void PADhandleKey(int key) { + //TODO: get these set up properly! + GPU_keypressed(key); +#ifdef ENABLE_SIO1API + SIO1_keypressed(key); +#endif + if (Config.UseNet) + NET_keypressed(key); +} + +long PAD1__open(void) { + return PAD1_open(&gpuDisp); +} + +long PAD2__open(void) { + return PAD2_open(&gpuDisp); +} + +void SignalExit(int sig) { + ClosePlugins(); + OnFile_Exit(); +} + +#define PARSEPATH(dst, src) \ + ptr = src + strlen(src); \ + while (*ptr != '\\' && ptr != src) ptr--; \ + if (ptr != src) { \ + strcpy(dst, ptr+1); \ + } + +int _OpenPlugins() { + long ret; + + GPU_clearDynarec(clearDynarec); + + ret = CDR_open(); + if (ret < 0) { SysMessage("%s", _("Error Opening CDR Plugin")); return -1; } + ret = SPU_open(); + if (ret < 0) { SysMessage("%s", _("Error Opening SPU Plugin")); return -1; } + SPU_registerCallback(SPUirq); + ret = GPU_open(&gpuDisp, "PCSXR", NULL); + if (ret < 0) { SysMessage("%s", _("Error Opening GPU Plugin")); return -1; } + ret = PAD1_open(&gpuDisp); + if (ret < 0) { SysMessage("%s", _("Error Opening PAD1 Plugin")); return -1; } + PAD1_registerVibration(GPU_visualVibration); + PAD1_registerCursor(GPU_cursor); + ret = PAD2_open(&gpuDisp); + if (ret < 0) { SysMessage("%s", _("Error Opening PAD2 Plugin")); return -1; } + PAD2_registerVibration(GPU_visualVibration); + PAD2_registerCursor(GPU_cursor); +#ifdef ENABLE_SIO1API + ret = SIO1_open(&gpuDisp); + if (ret < 0) { SysMessage("%s", _("Error opening SIO1 plugin!")); return -1; } + SIO1_registerCallback(SIO1irq); +#endif + + if (Config.UseNet && !NetOpened) { + netInfo info; + char path[MAXPATHLEN]; + + strcpy(info.EmuName, "PCSXR " PACKAGE_VERSION); + strncpy(info.CdromID, CdromId, 9); + strncpy(info.CdromLabel, CdromLabel, 11); + info.psxMem = psxM; + info.GPU_showScreenPic = GPU_showScreenPic; + info.GPU_displayText = GPU_displayText; + info.GPU_showScreenPic = GPU_showScreenPic; + info.PAD_setSensitive = PAD1_setSensitive; + sprintf(path, "%s%s", Config.BiosDir, Config.Bios); + strcpy(info.BIOSpath, path); + strcpy(info.MCD1path, Config.Mcd1); + strcpy(info.MCD2path, Config.Mcd2); + sprintf(path, "%s%s", Config.PluginsDir, Config.Gpu); + strcpy(info.GPUpath, path); + sprintf(path, "%s%s", Config.PluginsDir, Config.Spu); + strcpy(info.SPUpath, path); + sprintf(path, "%s%s", Config.PluginsDir, Config.Cdr); + strcpy(info.CDRpath, path); + NET_setInfo(&info); + + ret = NET_open(&gpuDisp); + if (ret < 0) { + if (ret == -2) { + // -2 is returned when something in the info + // changed and needs to be synced + char *ptr; + + PARSEPATH(Config.Bios, info.BIOSpath); + PARSEPATH(Config.Gpu, info.GPUpath); + PARSEPATH(Config.Spu, info.SPUpath); + PARSEPATH(Config.Cdr, info.CDRpath); + + strcpy(Config.Mcd1, info.MCD1path); + strcpy(Config.Mcd2, info.MCD2path); + return -2; + } else { + Config.UseNet = FALSE; + } + } else { + if (NET_queryPlayer() == 1) { + if (SendPcsxInfo() == -1) Config.UseNet = FALSE; + } else { + if (RecvPcsxInfo() == -1) Config.UseNet = FALSE; + } + } + NetOpened = TRUE; + } else if (Config.UseNet) { + NET_resume(); + } + + return 0; +} + +int OpenPlugins() { + int ret; + + while ((ret = _OpenPlugins()) == -2) { + ReleasePlugins(); + LoadMcds(Config.Mcd1, Config.Mcd2); + if (LoadPlugins() == -1) return -1; + } + return ret; +} + +void ClosePlugins() { + long ret; + + //signal(SIGINT, SIG_DFL); + //signal(SIGPIPE, SIG_DFL); + ret = CDR_close(); + if (ret < 0) { SysMessage("%s", _("Error Closing CDR Plugin")); return; } + ret = SPU_close(); + if (ret < 0) { SysMessage("%s", _("Error Closing SPU Plugin")); return; } + ret = PAD1_close(); + if (ret < 0) { SysMessage("%s", _("Error Closing PAD1 Plugin")); return; } + ret = PAD2_close(); + if (ret < 0) { SysMessage("%s", _("Error Closing PAD2 Plugin")); return; } + ret = GPU_close(); + if (ret < 0) { SysMessage("%s", _("Error Closing GPU Plugin")); return; } +#ifdef ENABLE_SIO1API + ret = SIO1_close(); + if (ret < 0) { SysMessage("%s", _("Error closing SIO1 plugin!")); return; } +#endif + + if (Config.UseNet) { + NET_pause(); + } +} + +void ResetPlugins() { + long ret; + + CDR_shutdown(); + GPU_shutdown(); + SPU_shutdown(); + PAD1_shutdown(); + PAD2_shutdown(); +#ifdef ENABLE_SIO1API + SIO1_shutdown(); +#endif + if (Config.UseNet) NET_shutdown(); + + ret = CDR_init(); + if (ret < 0) { SysMessage(_("CDRinit error: %d"), ret); return; } + ret = GPU_init(); + if (ret < 0) { SysMessage(_("GPUinit error: %d"), ret); return; } + ret = SPU_init(); + if (ret < 0) { SysMessage(_("SPUinit error: %d"), ret); return; } + ret = PAD1_init(1); + if (ret < 0) { SysMessage(_("PAD1init error: %d"), ret); return; } + ret = PAD2_init(2); + if (ret < 0) { SysMessage(_("PAD2init error: %d"), ret); return; } +#ifdef ENABLE_SIO1API + ret = SIO1_init(); + if (ret < 0) { SysMessage(_("SIO1init error: %d!"), ret); return; } +#endif + + if (Config.UseNet) { + ret = NET_init(); + if (ret < 0) { SysMessage(_("NETinit error: %d"), ret); return; } + } + + NetOpened = FALSE; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PluginController.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/PluginController.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PluginController.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PluginController.h 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,18 @@ +/* PluginController */ + +#import +#import "PluginList.h" + +@interface PluginController : NSObject + +@property (weak) IBOutlet NSButton *aboutButton; +@property (weak) IBOutlet NSButton *configureButton; +@property (weak) IBOutlet NSPopUpButton *pluginMenu; + +- (IBAction)doAbout:(id)sender; +- (IBAction)doConfigure:(id)sender; +- (IBAction)selectPlugin:(id)sender; + +- (void)setPluginsTo:(NSArray *)list withType:(int)type; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PluginController.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/PluginController.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PluginController.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PluginController.m 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,83 @@ +#import "PluginController.h" +#import "PcsxrPlugin.h" +#import "PcsxrController.h" + +@interface PluginController () +@property (strong) NSArray *plugins; +@property (strong) NSString *defaultKey; +@property int pluginType; +@end + +@implementation PluginController +@synthesize aboutButton; +@synthesize configureButton; +@synthesize pluginMenu; + +- (IBAction)doAbout:(id)sender +{ + PcsxrPlugin *plugin = (self.plugins)[[pluginMenu indexOfSelectedItem]]; + [plugin aboutAs:self.pluginType]; +} + +- (IBAction)doConfigure:(id)sender +{ + PcsxrPlugin *plugin = (self.plugins)[[pluginMenu indexOfSelectedItem]]; + [plugin configureAs:self.pluginType]; +} + +- (IBAction)selectPlugin:(id)sender +{ + if (sender == pluginMenu) { + NSInteger index = [pluginMenu indexOfSelectedItem]; + if (index != -1) { + PcsxrPlugin *plugin = (self.plugins)[index]; + + if (![[PluginList list] setActivePlugin:plugin forType:self.pluginType]) { + /* plugin won't initialize */ + } + + // write selection to defaults + [[NSUserDefaults standardUserDefaults] setObject:[plugin path] forKey:self.defaultKey]; + + // set button states + [aboutButton setEnabled:[plugin hasAboutAs:self.pluginType]]; + [configureButton setEnabled:[plugin hasConfigureAs:self.pluginType]]; + } else { + // set button states + [aboutButton setEnabled:NO]; + [configureButton setEnabled:NO]; + } + } +} + +// must be called before anything else +- (void)setPluginsTo:(NSArray *)list withType:(int)type +{ + NSString *sel; + + // remember the list + self.pluginType = type; + self.plugins = list; + self.defaultKey = [PcsxrPlugin defaultKeyForType:self.pluginType]; + + // clear the previous menu items + [pluginMenu removeAllItems]; + + // load the currently selected plugin + sel = [[NSUserDefaults standardUserDefaults] stringForKey:self.defaultKey]; + + // add the menu entries + for (PcsxrPlugin *plug in self.plugins) { + NSString *description = [plug description]; + [pluginMenu addItemWithTitle:description]; + + // make sure the currently selected is set as such + if ([sel isEqualToString:[plug path]]) { + [pluginMenu selectItemWithTitle:description]; + } + } + + [self selectPlugin:pluginMenu]; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PluginList.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/PluginList.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PluginList.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PluginList.h 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,32 @@ +// +// PluginList.h +// Pcsxr +// +// Created by Gil Pedersen on Sun Sep 21 2003. +// Copyright (c) 2003 __MyCompanyName__. All rights reserved. +// + +#import +#import "PcsxrPlugin.h" + +//extern NSMutableArray *plugins; +@class PcsxrPlugin; + +@interface PluginList : NSObject + ++ (PluginList *)list; + +- (void)refreshPlugins; +- (NSArray *)pluginsForType:(int)typeMask; +- (BOOL)hasPluginAtPath:(NSString *)path; +@property (readonly) BOOL configured; +- (PcsxrPlugin *)activePluginForType:(int)type; +- (BOOL)setActivePlugin:(PcsxrPlugin *)plugin forType:(int)type; + +- (void)disableNetPlug; +- (void)enableNetPlug; + +- (PcsxrPlugin*)objectAtIndexedSubscript:(NSInteger)index; +- (NSInteger)count; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/PluginList.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/PluginList.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/PluginList.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/PluginList.m 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,332 @@ +// +// PluginList.m +// Pcsxr +// +// Created by Gil Pedersen on Sun Sep 21 2003. +// Copyright (c) 2003 __MyCompanyName__. All rights reserved. +// + +#import "EmuThread.h" +#import "PluginList.h" +#import "PcsxrPlugin.h" +#include "psxcommon.h" +#include "plugins.h" + +static PluginList __weak *sPluginList = nil; +const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, PSE_LT_NET, PSE_LT_SIO1}; + +@interface PluginList () +@property (strong) NSMutableArray *pluginList; +@property BOOL missingPlugins; +@property (strong) PcsxrPlugin *activeGpuPlugin; +@property (strong) PcsxrPlugin *activeSpuPlugin; +@property (strong) PcsxrPlugin *activeCdrPlugin; +@property (strong) PcsxrPlugin *activePadPlugin; +@property (strong) PcsxrPlugin *activeNetPlugin; +@property (strong) PcsxrPlugin *activeSIO1Plugin; + +@end + +@implementation PluginList +@synthesize missingPlugins; + ++ (PluginList *)list +{ + return sPluginList; +} + +- (instancetype)init +{ + NSUInteger i; + + if (!(self = [super init])) + { + return nil; + } + + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + self.pluginList = [[NSMutableArray alloc] initWithCapacity:20]; + + self.activeGpuPlugin = self.activeSpuPlugin = self.activeCdrPlugin = self.activePadPlugin = self.activeNetPlugin = self.activeSIO1Plugin = nil; + + missingPlugins = NO; + for (i = 0; i < sizeof(typeList) / sizeof(typeList[0]); i++) { + NSString *path = [defaults stringForKey:[PcsxrPlugin defaultKeyForType:typeList[i]]]; + if (nil == path) { + missingPlugins = YES; + continue; + } + if ([path isEqualToString:@"Disabled"]) + continue; + + if (![self hasPluginAtPath:path]) { + @autoreleasepool { + PcsxrPlugin *plugin = [[PcsxrPlugin alloc] initWithPath:path]; + if (plugin) { + [self.pluginList addObject:plugin]; + if (![self setActivePlugin:plugin forType:typeList[i]]) + missingPlugins = YES; + } else { + missingPlugins = YES; + } + } + } + } + + if (missingPlugins) { + [self refreshPlugins]; + } + + sPluginList = self; + + return self; +} + +- (void)refreshPlugins +{ + NSDirectoryEnumerator *dirEnum; + NSString *pname; + NSUInteger i; + + // verify that the ones that are in list still works + for (i=0; i < [self.pluginList count]; i++) { + if (![(self.pluginList)[i] verifyOK]) { + [self.pluginList removeObjectAtIndex:i]; i--; + } + } + + for (NSString *plugDir in [PcsxrPlugin pluginsPaths]) + { + // look for new ones in the plugin directory + dirEnum = [[NSFileManager defaultManager] enumeratorAtPath:plugDir]; + + while ((pname = [dirEnum nextObject])) { + if ([[pname pathExtension] isEqualToString:@"psxplugin"] || + [[pname pathExtension] isEqualToString:@"so"]) { + [dirEnum skipDescendents]; /* don't enumerate this + directory */ + + if (![self hasPluginAtPath:pname]) { + @autoreleasepool { + PcsxrPlugin *plugin = [[PcsxrPlugin alloc] initWithPath:pname]; + if (plugin != nil) { + [self.pluginList addObject:plugin]; + } + } + } + } + } + } + + // check the we have the needed plugins + missingPlugins = NO; + for (i=0; i < 4 /*sizeof(*typeList)*/; i++) { + PcsxrPlugin *plugin = [self activePluginForType:typeList[i]]; + if (nil == plugin) { + NSArray *list = [self pluginsForType:typeList[i]]; + NSUInteger j; + + for (j=0; j < [list count]; j++) { + if ([self setActivePlugin:list[j] forType:typeList[i]]) + break; + } + if (j == [list count]) + missingPlugins = YES; + } + } +} + +- (NSArray *)pluginsForType:(int)typeMask +{ + NSMutableArray *types = [NSMutableArray array]; + + for (PcsxrPlugin *plugin in self.pluginList) { + if ([plugin type] & typeMask) { + [types addObject:plugin]; + } + } + + return types; +} + +- (BOOL)hasPluginAtPath:(NSString *)path +{ + if (nil == path) + return NO; + + for (PcsxrPlugin *plugin in self.pluginList) { + if ([[plugin path] isEqualToString:path]) + return YES; + } + + return NO; +} + +// returns if all the required plugins are available +- (BOOL)configured +{ + return !missingPlugins; +} + +- (BOOL)doInitPlugins +{ + BOOL bad = NO; + + if ([self.activeGpuPlugin runAs:PSE_LT_GPU] != 0) + bad = YES; + if ([self.activeSpuPlugin runAs:PSE_LT_SPU] != 0) + bad = YES; + if ([self.activeCdrPlugin runAs:PSE_LT_CDR] != 0) + bad = YES; + if ([self.activePadPlugin runAs:PSE_LT_PAD] != 0) + bad = YES; + if ([self.activeNetPlugin runAs:PSE_LT_NET] != 0) + bad = YES; + if ([self.activeSIO1Plugin runAs:PSE_LT_SIO1] != 0) + bad = YES; + + return !bad; +} + +- (PcsxrPlugin *)activePluginForType:(int)type +{ + switch (type) { + case PSE_LT_GPU: return self.activeGpuPlugin; break; + case PSE_LT_CDR: return self.activeCdrPlugin; break; + case PSE_LT_SPU: return self.activeSpuPlugin; break; + case PSE_LT_PAD: return self.activePadPlugin; break; + case PSE_LT_NET: return self.activeNetPlugin; break; + case PSE_LT_SIO1: return self.activeSIO1Plugin; break; + } + + return nil; +} + +- (BOOL)setActivePlugin:(PcsxrPlugin *)plugin forType:(int)type +{ + PcsxrPlugin *pluginPtr = nil; + + switch (type) { + case PSE_LT_SIO1: + case PSE_LT_GPU: + case PSE_LT_CDR: + case PSE_LT_SPU: + case PSE_LT_PAD: + case PSE_LT_NET: pluginPtr = [self activePluginForType:type]; break; + default: return NO; break; + } + if (plugin == pluginPtr) { + return YES; + } + + BOOL active = pluginPtr && [EmuThread active]; + BOOL wasPaused = NO; + if (active) { + // TODO: temporary freeze? + wasPaused = [EmuThread pauseSafe]; + ClosePlugins(); + ReleasePlugins(); + } + + // stop the old plugin and start the new one + if (pluginPtr) { + [pluginPtr shutdownAs:type]; + pluginPtr = nil; + } + + if ([plugin runAs:type] != 0) { + plugin = nil; + } + + switch (type) { + case PSE_LT_GPU: + self.activeGpuPlugin = plugin; + break; + case PSE_LT_CDR: + self.activeCdrPlugin = plugin; + break; + case PSE_LT_SPU: + self.activeSpuPlugin = plugin; + break; + case PSE_LT_PAD: + self.activePadPlugin = plugin; + break; + case PSE_LT_NET: + self.activeNetPlugin = plugin; + break; + case PSE_LT_SIO1: + self.activeSIO1Plugin = plugin; + break; + } + + // write path to the correct config entry + const char *str; + if (plugin != nil) { + str = [[plugin path] fileSystemRepresentation]; + if (str == NULL) { + str = "Invalid Plugin"; + } + } else { + str = "Invalid Plugin"; + } + + char **dst = [PcsxrPlugin configEntriesForType:type]; + while (*dst) { + strlcpy(*dst, str, MAXPATHLEN); + dst++; + } + + if (active) { + LoadPlugins(); + OpenPlugins(); + + if (!wasPaused) { + [EmuThread resume]; + } + } + + return plugin != nil; +} + +- (void)disableNetPlug +{ + char **dst = [PcsxrPlugin configEntriesForType:PSE_LT_NET]; + while (*dst) { + strcpy(*dst, "Disabled"); + dst++; + } +} + +- (void)enableNetPlug +{ + PcsxrPlugin *netPlug = [self activePluginForType:PSE_LT_NET]; + + const char *str = NULL; + if (netPlug) { + str = [[netPlug path] fileSystemRepresentation]; + } + if (str) { + char **dst = [PcsxrPlugin configEntriesForType:PSE_LT_NET]; + while (*dst) { + strlcpy(*dst, str, MAXPATHLEN); + dst++; + } + } +} + +- (NSInteger)count; +{ + return self.pluginList.count; +} + +- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(__unsafe_unretained id [])buffer count:(NSUInteger)len +{ + return [self.pluginList countByEnumeratingWithState:state objects:buffer count:len]; +} + +- (PcsxrPlugin*)objectAtIndexedSubscript:(NSInteger)index +{ + return self.pluginList[index]; +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/RecentItemsMenu.h pcsxr-unstable-1.9.94+svn98108/macosx/Source/RecentItemsMenu.h --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/RecentItemsMenu.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/RecentItemsMenu.h 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,22 @@ +// +// RecentItemsMenu.h +// Pcsxr +// +// Created by Nicolas Pepin-Perreault on 12-12-16. +// +// + +#import + +@class PcsxrController; +@interface RecentItemsMenu : NSMenu + +@property (weak) IBOutlet PcsxrController *pcsxr; + +- (IBAction)clearRecentDocuments:(id)sender; +- (void)addRecentItem:(NSURL*)documentURL; +- (NSMenuItem*)newMenuItem:(NSURL*)documentURL; +- (IBAction)openRecentItem:(NSMenuItem*)sender; +- (void)addMenuItem:(NSMenuItem*)item; + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/Source/RecentItemsMenu.m pcsxr-unstable-1.9.94+svn98108/macosx/Source/RecentItemsMenu.m --- pcsxr-unstable-1.9.94+svn97809/macosx/Source/RecentItemsMenu.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/Source/RecentItemsMenu.m 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,114 @@ +// +// RecentItemsMenu.m +// Pcsxr +// +// Created by Nicolas Pepin-Perreault on 12-12-16. +// +// + +#import "RecentItemsMenu.h" +#import "PcsxrController.h" + +@implementation RecentItemsMenu + +@synthesize pcsxr; + +// Initialization +- (void)awakeFromNib +{ + [self setAutoenablesItems:YES]; + + // Populate the menu + NSArray* recentDocuments = [[NSDocumentController sharedDocumentController] recentDocumentURLs]; + NSInteger index = 0; + for (NSURL* url in recentDocuments) { + NSMenuItem *tempItem = [self newMenuItem:url]; + [self addMenuItem:tempItem atIndex:index]; + index++; + } +} + +- (void)addRecentItem:(NSURL*)documentURL +{ + [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:documentURL]; + + NSMenuItem* item = [self findMenuItemByURL:documentURL]; + if (item != nil) { + [self removeItem:item]; + [self insertItem:item atIndex:0]; + } else { + NSMenuItem *newitem = [self newMenuItem:documentURL]; + [self addMenuItem:newitem]; + } +} + +- (void)addMenuItem:(NSMenuItem*)item +{ + [self addMenuItem:item atIndex:0]; + + // Prevent menu from overflowing; the -2 accounts for the "Clear..." and the separator items + NSInteger maxNumItems = [[NSDocumentController sharedDocumentController] maximumRecentDocumentCount]; + if (([self numberOfItems] - 2) > maxNumItems) { + [self removeItemAtIndex:maxNumItems]; + } +} + +- (NSMenuItem*)findMenuItemByURL:(NSURL*)url +{ + for(NSMenuItem* item in [self itemArray]) { + if([[item representedObject] isEqual:url]) { + return item; + } + } + + return nil; +} + +- (void)addMenuItem:(NSMenuItem*)item atIndex:(NSInteger)index +{ + [self insertItem:item atIndex:index]; // insert at the top +} + +- (NSMenuItem*)newMenuItem:(NSURL*)documentURL +{ + NSString *documentPath = [documentURL path]; + NSString *lastName = [[NSFileManager defaultManager] displayNameAtPath:documentPath]; + NSImage *fileImage = [[NSWorkspace sharedWorkspace] iconForFile:documentPath]; + fileImage.size = NSMakeSize(16, 16); + + NSMenuItem *newItem = [[NSMenuItem alloc] initWithTitle:lastName action:@selector(openRecentItem:) keyEquivalent:@""]; + [newItem setRepresentedObject:documentURL]; + newItem.image = fileImage; + [newItem setTarget:self]; + + return newItem; +} + +- (IBAction)openRecentItem:(NSMenuItem*)sender +{ + NSURL* url = [sender representedObject]; + [self addRecentItem:url]; + [pcsxr runURL:url]; +} + +- (IBAction)clearRecentDocuments:(id)sender +{ + [self removeDocumentItems]; + [[NSDocumentController sharedDocumentController] clearRecentDocuments:sender]; +} + +// Document items are menu items with tag 0 +- (void)removeDocumentItems +{ + NSMutableArray *removeItemsArray = [[NSMutableArray alloc] initWithCapacity:10]; + for (NSMenuItem* item in [self itemArray]) { + if([item tag] == 0) { + [removeItemsArray addObject:item]; + } + } + for (NSMenuItem *item in removeItemsArray) { + [self removeItem:item]; + } +} + +@end diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/updateInfoPlist/main.m pcsxr-unstable-1.9.94+svn98108/macosx/updateInfoPlist/main.m --- pcsxr-unstable-1.9.94+svn97809/macosx/updateInfoPlist/main.m 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/updateInfoPlist/main.m 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,52 @@ +// +// main.m +// updateInfoPlist +// +// Created by C.W. Betts on 10/23/13. +// Code based on the RubyCocoa script used by the MPlayerX team +// Original code can be found at http://blog.mplayerx.org/blog/2013/05/10/use-version-number-with-xcode-and-git/ +// +// + +#import + +int main(int argc, const char * argv[]) +{ + @autoreleasepool { + if (argc != 2) { + NSLog(@"Usage: %s \"path to plist\"", argv[0]); + abort(); + return EXIT_FAILURE; + } + NSString *plistLocation =[[NSFileManager defaultManager] stringWithFileSystemRepresentation:argv[1] length:strlen(argv[1])]; + NSMutableDictionary *plistDict = [[NSMutableDictionary alloc] initWithContentsOfFile:plistLocation]; + if (!plistDict) { + return EXIT_FAILURE; + } + NSTask *versionTask = [[NSTask alloc] init]; + [versionTask setLaunchPath:@"/bin/bash"]; + versionTask.arguments = @[@"version.sh"]; + NSPipe *soPipe = [NSPipe new]; + versionTask.standardOutput = soPipe; + + [versionTask launch]; + [versionTask waitUntilExit]; + + NSData *outData = [soPipe.fileHandleForReading readDataToEndOfFile]; + versionTask = nil; + NSString *outString = [[NSString alloc] initWithData:outData encoding:NSUTF8StringEncoding]; + outString = [outString stringByTrimmingCharactersInSet:[NSCharacterSet newlineCharacterSet]]; + if ([outString isEqualToString:@"unknown"]) { + NSLog(@"Version is invalid!"); + return EXIT_FAILURE; + } + if ([outString hasSuffix:@"m"]) { + outString = [outString stringByReplacingOccurrencesOfString:@"m" withString:@""]; + } + + plistDict[@"CFBundleVersion"] = outString; + + [plistDict writeToFile:[NSString stringWithFormat:@"%@vers.plist", plistLocation] atomically:NO]; + } + return 0; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/updateInfoPlist/updateInfoPlist-Prefix.pch pcsxr-unstable-1.9.94+svn98108/macosx/updateInfoPlist/updateInfoPlist-Prefix.pch --- pcsxr-unstable-1.9.94+svn97809/macosx/updateInfoPlist/updateInfoPlist-Prefix.pch 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/updateInfoPlist/updateInfoPlist-Prefix.pch 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,9 @@ +// +// Prefix header +// +// The contents of this file are implicitly included at the beginning of every source file. +// + +#ifdef __OBJC__ + #import +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/macosx/version.sh pcsxr-unstable-1.9.94+svn98108/macosx/version.sh --- pcsxr-unstable-1.9.94+svn97809/macosx/version.sh 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/macosx/version.sh 2016-06-30 16:53:21.000000000 +0000 @@ -0,0 +1,5 @@ +#!/bin/bash + +VER=`svnversion -n ../` +#VER=`expr ${VER} + 0` +echo $VER \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/config.h pcsxr-unstable-1.9.94+svn98108/win32/config.h --- pcsxr-unstable-1.9.94+svn97809/win32/config.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/config.h 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,50 @@ +// +// Copyright (c) 2008, Wei Mingzhi. All rights reserved. +// +// Use, redistribution and modification of this code is unrestricted as long as this +// notice is preserved. +// + +#ifndef CONFIG_H +#define CONFIG_H + +#ifndef __i386__ +#define __i386__ 1 +#endif + +#include + +#ifndef MAXPATHLEN +#define MAXPATHLEN 256 +#endif + +#ifndef PACKAGE_VERSION +#define PACKAGE_VERSION "1.9" +#endif + +#ifndef PREFIX +#define PREFIX "./" +#endif + +#ifndef inline +#ifdef _DEBUG +#define inline /* */ +#else +#ifdef _MSC_VER +#define inline __forceinline +#else +#define inline __inline__ +#endif +#endif +#endif + +#ifdef _MSC_VER +#pragma warning (disable:4133) +#pragma warning (disable:4142) +#pragma warning (disable:4244) +#pragma warning (disable:4996) +#pragma warning (disable:4018) +#pragma warning (disable:4761) +#endif + +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/glue/stdint.h pcsxr-unstable-1.9.94+svn98108/win32/glue/stdint.h --- pcsxr-unstable-1.9.94+svn97809/win32/glue/stdint.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/glue/stdint.h 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,42 @@ +// +// Copyright (c) 2008, Wei Mingzhi. All rights reserved. +// +// Use, redistribution and modification of this code is unrestricted +// as long as this notice is preserved. +// +// This code is provided with ABSOLUTELY NO WARRANTY. +// + +#ifndef __STDINT_H +#define __STDINT_H + +#ifdef _MSC_VER + +typedef __int8 int8_t; +typedef __int16 int16_t; +typedef __int32 int32_t; +typedef __int64 int64_t; + +typedef unsigned __int8 uint8_t; +typedef unsigned __int16 uint16_t; +typedef unsigned __int32 uint32_t; +typedef unsigned __int64 uint64_t; + +#else + +typedef signed char int8_t; +typedef signed short int16_t; +typedef signed int int32_t; +typedef signed __int64 int64_t; + +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +typedef unsigned __int64 uint64_t; + +#endif + +#define intptr_t int32_t +#define uintptr_t uint32_t + +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/glue/sys/mman.h pcsxr-unstable-1.9.94+svn98108/win32/glue/sys/mman.h --- pcsxr-unstable-1.9.94+svn97809/win32/glue/sys/mman.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/glue/sys/mman.h 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,20 @@ +// +// Copyright (c) 2008, Wei Mingzhi. All rights reserved. +// +// Use, redistribution and modification of this code is unrestricted +// as long as this notice is preserved. +// +// This code is provided with ABSOLUTELY NO WARRANTY. +// + +#ifndef MMAN_H +#define MMAN_H + +#include + +#define mmap(start, length, prot, flags, fd, offset) \ + ((unsigned char *)VirtualAlloc(NULL, (length), MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE)) + +#define munmap(start, length) do { VirtualFree((start), (length), MEM_RELEASE); } while (0) + +#endif Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/win32/gui/about.bmp and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/win32/gui/about.bmp differ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/gui/AboutDlg.c pcsxr-unstable-1.9.94+svn98108/win32/gui/AboutDlg.c --- pcsxr-unstable-1.9.94+svn97809/win32/gui/AboutDlg.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/gui/AboutDlg.c 2016-06-30 16:53:23.000000000 +0000 @@ -0,0 +1,68 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2003 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include "resource.h" +#include "AboutDlg.h" +#include "psxcommon.h" + +char *LabelAuthors = { N_( + "PCSXR - A PlayStation Emulator\n\n" + "Original Authors:\n" + "main coder: linuzappz\n" + "co-coders: shadow\n" + "ex-coders: Nocomp, Pete Bernett, nik3d\n" + "Webmaster: AkumaX") +}; + +char *LabelGreets = { N_( + "PCSX-df Authors:\n" + "Ryan Schultz, Andrew Burton, Stephen Chao,\n" + "Marcus Comstedt, Stefan Sikora\n\n" + "PCSX-Reloaded By:\n" + "edgbla, shalma, Wei Mingzhi, et al.\n\n" + "http://pcsxr.codeplex.com/") +}; + +LRESULT WINAPI AboutDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { + switch (uMsg) { + case WM_INITDIALOG: + SetWindowText(hDlg, _("About")); + + Button_SetText(GetDlgItem(hDlg, IDOK), _("OK")); + Static_SetText(GetDlgItem(hDlg, IDC_PCSXR_ABOUT_TEXT), _("PCSXR EMU\n")); + Static_SetText(GetDlgItem(hDlg, IDC_PCSXR_ABOUT_AUTHORS), _(LabelAuthors)); + Static_SetText(GetDlgItem(hDlg, IDC_PCSXR_ABOUT_GREETS), _(LabelGreets)); + Button_SetText(GetDlgItem(hDlg,IDOK), _("OK")); + return TRUE; + + case WM_COMMAND: + switch (wParam) { + case IDOK: + EndDialog(hDlg, TRUE); + return TRUE; + } + break; + + case WM_CLOSE: + EndDialog(hDlg, TRUE); + return TRUE; + } + return FALSE; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/gui/AboutDlg.h pcsxr-unstable-1.9.94+svn98108/win32/gui/AboutDlg.h --- pcsxr-unstable-1.9.94+svn97809/win32/gui/AboutDlg.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/gui/AboutDlg.h 2016-06-30 16:53:23.000000000 +0000 @@ -0,0 +1,24 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2003 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef _PCSX_ABOUTDLG_H_ +#define _PCSX_ABOUTDLG_H_ + +LRESULT WINAPI AboutDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); + +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/gui/CheatDlg.c pcsxr-unstable-1.9.94+svn98108/win32/gui/CheatDlg.c --- pcsxr-unstable-1.9.94+svn97809/win32/gui/CheatDlg.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/gui/CheatDlg.c 2016-06-30 16:53:23.000000000 +0000 @@ -0,0 +1,1021 @@ +/* Cheat Support for PCSX-Reloaded + * Copyright (C) 2009, Wei Mingzhi . + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#ifndef _WIN32_IE +#define _WIN32_IE 0x0400 +#endif +#include +#include +#include "psxcommon.h" +#include "psxmem.h" +#include "cheat.h" +#include "resource.h" +#include "Win32.h" + +static void UpdateCheatDlg(HWND hW) { + HWND List; + LV_ITEM item; + int i; + + List = GetDlgItem(hW, IDC_CODELIST); + + ListView_DeleteAllItems(List); + + for (i = 0; i < NumCheats; i++) { + memset(&item, 0, sizeof(item)); + + item.mask = LVIF_TEXT; + item.iItem = i; + item.pszText = Cheats[i].Descr; + item.iSubItem = 0; + + SendMessage(List, LVM_INSERTITEM, 0, (LPARAM)&item); + + item.pszText = (Cheats[i].Enabled ? _("Yes") : _("No")); + item.iSubItem = 1; + + SendMessage(List, LVM_SETITEM, 0, (LPARAM)&item); + } +} + +static int iEditItem = -1; +static char szDescr[256], szCode[1024]; + +static LRESULT WINAPI CheatEditDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + int i; + + switch (uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("Edit Cheat")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_DESCR), _("Description:")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_CODE), _("Cheat Code:")); + Button_SetText(GetDlgItem(hW, IDOK), _("OK")); + Button_SetText(GetDlgItem(hW, IDCANCEL), _("Cancel")); + + assert(iEditItem != -1 && iEditItem < NumCheats); + + Edit_SetText(GetDlgItem(hW, IDC_DESCR), Cheats[iEditItem].Descr); + + szCode[0] = '\0'; + for (i = Cheats[iEditItem].First; i < Cheats[iEditItem].First + Cheats[iEditItem].n; i++) { + sprintf(szDescr, "%.8X %.4X\r\n", CheatCodes[i].Addr, CheatCodes[i].Val); + strcat(szCode, szDescr); + } + Edit_SetText(GetDlgItem(hW, IDC_CODE), szCode); + break; + + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDOK: + Edit_GetText(GetDlgItem(hW, IDC_DESCR), szDescr, 256); + Edit_GetText(GetDlgItem(hW, IDC_CODE), szCode, 1024); + + if (EditCheat(iEditItem, szDescr, szCode) != 0) { + SysMessage(_("Invalid cheat code!")); + } + else { + EndDialog(hW, TRUE); + return TRUE; + } + break; + + case IDCANCEL: + EndDialog(hW, FALSE); + return TRUE; + } + break; + + case WM_CLOSE: + EndDialog(hW, FALSE); + return TRUE; + } + + return FALSE; +} + +static LRESULT WINAPI CheatAddDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + switch (uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("Add New Cheat")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_DESCR), _("Description:")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_CODE), _("Cheat Code:")); + Button_SetText(GetDlgItem(hW, IDOK), _("OK")); + Button_SetText(GetDlgItem(hW, IDCANCEL), _("Cancel")); + Edit_SetText(GetDlgItem(hW, IDC_DESCR), szDescr); + Edit_SetText(GetDlgItem(hW, IDC_CODE), szCode); + break; + + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDOK: + Edit_GetText(GetDlgItem(hW, IDC_DESCR), szDescr, 256); + Edit_GetText(GetDlgItem(hW, IDC_CODE), szCode, 1024); + + if (AddCheat(szDescr, szCode) != 0) { + SysMessage(_("Invalid cheat code!")); + } + else { + EndDialog(hW, TRUE); + return TRUE; + } + break; + + case IDCANCEL: + EndDialog(hW, FALSE); + return TRUE; + } + break; + + case WM_CLOSE: + EndDialog(hW, FALSE); + return TRUE; + } + + return FALSE; +} + +LRESULT WINAPI CheatDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + HWND List; + LV_COLUMN col; + LV_ITEM item; + int i; + OPENFILENAME ofn; + char szFileName[256]; + char szFileTitle[256]; + char szFilter[256]; + + switch (uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("Edit Cheat Codes")); + + Button_SetText(GetDlgItem(hW, IDC_ADDCODE), _("&Add Code")); + Button_SetText(GetDlgItem(hW, IDC_EDITCODE), _("&Edit Code")); + Button_SetText(GetDlgItem(hW, IDC_REMOVECODE), _("&Remove Code")); + Button_SetText(GetDlgItem(hW, IDC_TOGGLECODE), _("&Enable/Disable")); + Button_SetText(GetDlgItem(hW, IDC_LOADCODE), _("&Load...")); + Button_SetText(GetDlgItem(hW, IDC_SAVECODE), _("&Save As...")); + Button_SetText(GetDlgItem(hW, IDCANCEL), _("&Close")); + + List = GetDlgItem(hW, IDC_CODELIST); + + SendMessage(List, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT); + + memset(&col, 0, sizeof(col)); + + col.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM; + col.fmt = LVCFMT_LEFT; + + col.pszText = _("Description"); + col.cx = 400; + + SendMessage(List, LVM_INSERTCOLUMN, 0, (LPARAM)&col); + + col.pszText = _("Enabled"); + col.cx = 55; + + SendMessage(List, LVM_INSERTCOLUMN, 1, (LPARAM)&col); + + UpdateCheatDlg(hW); + break; + + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDCANCEL: + EndDialog(hW, FALSE); + return TRUE; + + case IDC_ADDCODE: + i = NumCheats; + szDescr[0] = '\0'; + szCode[0] = '\0'; + + DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_CHEATEDIT), hW, (DLGPROC)CheatAddDlgProc); + + if (NumCheats > i) { + // new cheat added + List = GetDlgItem(hW, IDC_CODELIST); + memset(&item, 0, sizeof(item)); + + item.mask = LVIF_TEXT; + item.iItem = i; + item.pszText = Cheats[i].Descr; + item.iSubItem = 0; + + SendMessage(List, LVM_INSERTITEM, 0, (LPARAM)&item); + + item.pszText = (Cheats[i].Enabled ? _("Yes") : _("No")); + item.iSubItem = 1; + + SendMessage(List, LVM_SETITEM, 0, (LPARAM)&item); + } + break; + + case IDC_EDITCODE: + List = GetDlgItem(hW, IDC_CODELIST); + iEditItem = ListView_GetSelectionMark(List); + + if (iEditItem != -1) { + DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_CHEATEDIT), hW, (DLGPROC)CheatEditDlgProc); + + memset(&item, 0, sizeof(item)); + + item.mask = LVIF_TEXT; + item.iItem = iEditItem; + item.pszText = Cheats[iEditItem].Descr; + item.iSubItem = 0; + + SendMessage(List, LVM_SETITEM, 0, (LPARAM)&item); + } + break; + + case IDC_REMOVECODE: + List = GetDlgItem(hW, IDC_CODELIST); + i = ListView_GetSelectionMark(List); + + if (i != -1) { + RemoveCheat(i); + ListView_DeleteItem(List, i); + ListView_SetSelectionMark(List, -1); + } + break; + + case IDC_TOGGLECODE: + List = GetDlgItem(hW, IDC_CODELIST); + i = ListView_GetSelectionMark(List); + + if (i != -1) { + Cheats[i].Enabled ^= 1; + + memset(&item, 0, sizeof(item)); + + item.mask = LVIF_TEXT; + item.iItem = i; + item.pszText = (Cheats[i].Enabled ? _("Yes") : _("No")); + item.iSubItem = 1; + + SendMessage(List, LVM_SETITEM, 0, (LPARAM)&item); + } + break; + + case IDC_LOADCODE: + memset(&szFileName, 0, sizeof(szFileName)); + memset(&szFileTitle, 0, sizeof(szFileTitle)); + memset(&szFilter, 0, sizeof(szFilter)); + + strcpy(szFilter, _("PCSXR Cheat Code Files")); + strcatz(szFilter, "*.*"); + + ofn.lStructSize = sizeof(OPENFILENAME); + ofn.hwndOwner = hW; + ofn.lpstrFilter = szFilter; + ofn.lpstrCustomFilter = NULL; + ofn.nMaxCustFilter = 0; + ofn.nFilterIndex = 1; + ofn.lpstrFile = szFileName; + ofn.nMaxFile = 256; + ofn.lpstrInitialDir = ".\\Cheats"; + ofn.lpstrFileTitle = szFileTitle; + ofn.nMaxFileTitle = 256; + ofn.lpstrTitle = NULL; + ofn.lpstrDefExt = "CHT"; + ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR; + + if (GetOpenFileName((LPOPENFILENAME)&ofn)) { + LoadCheats(szFileName); + UpdateCheatDlg(hW); + } + break; + + case IDC_SAVECODE: + memset(&szFileName, 0, sizeof(szFileName)); + memset(&szFileTitle, 0, sizeof(szFileTitle)); + memset(&szFilter, 0, sizeof(szFilter)); + + strcpy(szFilter, _("PCSXR Cheat Code Files")); + strcatz(szFilter, "*.*"); + + ofn.lStructSize = sizeof(OPENFILENAME); + ofn.hwndOwner = hW; + ofn.lpstrFilter = szFilter; + ofn.lpstrCustomFilter = NULL; + ofn.nMaxCustFilter = 0; + ofn.nFilterIndex = 1; + ofn.lpstrFile = szFileName; + ofn.nMaxFile = 256; + ofn.lpstrInitialDir = ".\\Cheats"; + ofn.lpstrFileTitle = szFileTitle; + ofn.nMaxFileTitle = 256; + ofn.lpstrTitle = NULL; + ofn.lpstrDefExt = "CHT"; + ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR | OFN_OVERWRITEPROMPT; + + if (GetOpenFileName((LPOPENFILENAME)&ofn)) { + SaveCheats(szFileName); + } + break; + } + break; + + case WM_NOTIFY: + switch (LOWORD(wParam)) { + case IDC_CODELIST: + List = GetDlgItem(hW, IDC_CODELIST); + i = ListView_GetSelectionMark(List); + + if (i != -1) { + Button_Enable(GetDlgItem(hW, IDC_EDITCODE), TRUE); + Button_Enable(GetDlgItem(hW, IDC_REMOVECODE), TRUE); + Button_Enable(GetDlgItem(hW, IDC_TOGGLECODE), TRUE); + } + else { + Button_Enable(GetDlgItem(hW, IDC_EDITCODE), FALSE); + Button_Enable(GetDlgItem(hW, IDC_REMOVECODE), FALSE); + Button_Enable(GetDlgItem(hW, IDC_TOGGLECODE), FALSE); + } + + Button_Enable(GetDlgItem(hW, IDC_SAVECODE), (NumCheats > 0)); + break; + } + break; + + case WM_CLOSE: + EndDialog(hW, FALSE); + return TRUE; + } + + return FALSE; +} + +/////////////////////////////////////////////////////////////////////////////// + +#define SEARCH_EQUALVAL 0 +#define SEARCH_NOTEQUALVAL 1 +#define SEARCH_RANGE 2 +#define SEARCH_INCBY 3 +#define SEARCH_DECBY 4 +#define SEARCH_INC 5 +#define SEARCH_DEC 6 +#define SEARCH_DIFFERENT 7 +#define SEARCH_NOCHANGE 8 + +#define SEARCHTYPE_8BIT 0 +#define SEARCHTYPE_16BIT 1 +#define SEARCHTYPE_32BIT 2 + +#define SEARCHBASE_DEC 0 +#define SEARCHBASE_HEX 1 + +static char current_search = SEARCH_EQUALVAL; +static char current_searchtype = SEARCHTYPE_8BIT; +static char current_searchbase = SEARCHBASE_DEC; +static uint32_t current_valuefrom = 0; +static uint32_t current_valueto = 0; + +static void UpdateCheatSearchDlg(HWND hW) { + char buf[256]; + int i; + + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_RESETCONTENT, 0, 0); + SendMessage(GetDlgItem(hW, IDC_RESLIST), LB_RESETCONTENT, 0, 0); + + Button_Enable(GetDlgItem(hW, IDC_FREEZE), FALSE); + Button_Enable(GetDlgItem(hW, IDC_MODIFY), FALSE); + Button_Enable(GetDlgItem(hW, IDC_COPY), FALSE); + + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_ADDSTRING, 0, (LPARAM)_("Equal Value")); + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_ADDSTRING, 0, (LPARAM)_("Not Equal Value")); + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_ADDSTRING, 0, (LPARAM)_("Range")); + + if (prevM != NULL) { + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_ADDSTRING, 0, (LPARAM)_("Increased By")); + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_ADDSTRING, 0, (LPARAM)_("Decreased By")); + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_ADDSTRING, 0, (LPARAM)_("Increased")); + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_ADDSTRING, 0, (LPARAM)_("Decreased")); + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_ADDSTRING, 0, (LPARAM)_("Different")); + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_ADDSTRING, 0, (LPARAM)_("No Change")); + + ComboBox_Enable(GetDlgItem(hW, IDC_DATATYPE), FALSE); + } + else { + ComboBox_Enable(GetDlgItem(hW, IDC_DATATYPE), TRUE); + } + + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_SETCURSEL, (WPARAM)current_search, 0); + + if (current_search == SEARCH_RANGE) { + ShowWindow(GetDlgItem(hW, IDC_LABEL_TO), SW_SHOW); + ShowWindow(GetDlgItem(hW, IDC_VALUETO), SW_SHOW); + } + else { + ShowWindow(GetDlgItem(hW, IDC_LABEL_TO), SW_HIDE); + ShowWindow(GetDlgItem(hW, IDC_VALUETO), SW_HIDE); + } + + SendMessage(GetDlgItem(hW, IDC_DATATYPE), CB_SETCURSEL, (WPARAM)current_searchtype, 0); + SendMessage(GetDlgItem(hW, IDC_DATABASE), CB_SETCURSEL, (WPARAM)current_searchbase, 0); + + if (current_searchbase == SEARCHBASE_HEX) { + sprintf(buf, "%X", current_valuefrom); + SetWindowText(GetDlgItem(hW, IDC_VALUEFROM), buf); + sprintf(buf, "%X", current_valueto); + SetWindowText(GetDlgItem(hW, IDC_VALUETO), buf); + } + else { + sprintf(buf, "%u", current_valuefrom); + SetWindowText(GetDlgItem(hW, IDC_VALUEFROM), buf); + sprintf(buf, "%u", current_valueto); + SetWindowText(GetDlgItem(hW, IDC_VALUETO), buf); + } + + if (prevM == NULL) { + SendMessage(GetDlgItem(hW, IDC_RESLIST), LB_ADDSTRING, (WPARAM)0, (LPARAM)_("Enter the values and start your search.")); + EnableWindow(GetDlgItem(hW, IDC_RESLIST), FALSE); + } + else { + if (NumSearchResults == 0) { + SendMessage(GetDlgItem(hW, IDC_RESLIST), LB_ADDSTRING, (WPARAM)0, (LPARAM)_("No addresses found.")); + EnableWindow(GetDlgItem(hW, IDC_RESLIST), FALSE); + } + else if (NumSearchResults > 100) { + SendMessage(GetDlgItem(hW, IDC_RESLIST), LB_ADDSTRING, (WPARAM)0, (LPARAM)_("Too many addresses found.")); + EnableWindow(GetDlgItem(hW, IDC_RESLIST), FALSE); + } + else { + for (i = 0; i < NumSearchResults; i++) { + u32 addr = SearchResults[i]; + + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + sprintf(buf, _("%.8X Current: %u (%.2X), Previous: %u (%.2X)"), + addr, PSXMu8(addr), PSXMu8(addr), PrevMu8(addr), PrevMu8(addr)); + break; + + case SEARCHTYPE_16BIT: + sprintf(buf, _("%.8X Current: %u (%.4X), Previous: %u (%.4X)"), + addr, PSXMu16(addr), PSXMu16(addr), PrevMu16(addr), PrevMu16(addr)); + break; + + case SEARCHTYPE_32BIT: + sprintf(buf, _("%.8X Current: %u (%.8X), Previous: %u (%.8X)"), + addr, PSXMu32(addr), PSXMu32(addr), PrevMu32(addr), PrevMu32(addr)); + break; + + default: + assert(FALSE); // impossible + break; + } + + SendMessage(GetDlgItem(hW, IDC_RESLIST), LB_ADDSTRING, (WPARAM)0, (LPARAM)buf); + SendMessage(GetDlgItem(hW, IDC_RESLIST), LB_SETITEMDATA, i, (LPARAM)i); + } + EnableWindow(GetDlgItem(hW, IDC_RESLIST), TRUE); + } + } + + sprintf(buf, _("Founded Addresses: %d"), NumSearchResults); + Static_SetText(GetDlgItem(hW, IDC_LABEL_RESULTSFOUND), buf); +} + +static int iCurItem = 0; + +static LRESULT WINAPI CheatFreezeProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + u32 val; + char buf[256]; + + switch (uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("Freeze")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_ADDRESS), _("Address:")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_VALUE), _("Value:")); + + sprintf(buf, "%.8X", SearchResults[iCurItem]); + SetWindowText(GetDlgItem(hW, IDC_ADDRESS), buf); + + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + val = PSXMu8(SearchResults[iCurItem]); + break; + + case SEARCHTYPE_16BIT: + val = PSXMu16(SearchResults[iCurItem]); + break; + + case SEARCHTYPE_32BIT: + val = PSXMu32(SearchResults[iCurItem]); + break; + + default: + assert(FALSE); // should not reach here + break; + } + + sprintf(buf, "%u", val); + SetWindowText(GetDlgItem(hW, IDC_VALUE), buf); + break; + + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDOK: + val = 0; + GetWindowText(GetDlgItem(hW, IDC_VALUE), buf, 255); + sscanf(buf, "%u", &val); + + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + if (val > (u32)0xFF) { + val = 0xFF; + } + sprintf(szCode, "%.8X %.4X", (SearchResults[iCurItem] & 0x1FFFFF) | (CHEAT_CONST8 << 24), val); + break; + + case SEARCHTYPE_16BIT: + if (val > (u32)0xFFFF) { + val = 0xFFFF; + } + sprintf(szCode, "%.8X %.4X", (SearchResults[iCurItem] & 0x1FFFFF) | (CHEAT_CONST16 << 24), val); + break; + + case SEARCHTYPE_32BIT: + sprintf(szCode, "%.8X %.4X\n%.8X %.4X", + (SearchResults[iCurItem] & 0x1FFFFF) | (CHEAT_CONST16 << 24), val & 0xFFFF, + ((SearchResults[iCurItem] + 2) & 0x1FFFFF) | (CHEAT_CONST16 << 24), ((val & 0xFFFF0000) >> 16) & 0xFFFF); + break; + + default: + assert(FALSE); // should not reach here + break; + } + + sprintf(szDescr, _("Freeze %.8X"), SearchResults[iCurItem]); + + if (DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_CHEATEDIT), hW, (DLGPROC)CheatAddDlgProc)) { + Cheats[NumCheats - 1].Enabled = 1; + EndDialog(hW, TRUE); + return TRUE; + } + break; + + case IDCANCEL: + EndDialog(hW, FALSE); + return TRUE; + } + break; + + case WM_CLOSE: + EndDialog(hW, FALSE); + return TRUE; + } + + return FALSE; +} + +static LRESULT WINAPI CheatModifyProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + u32 val; + char buf[256]; + + switch (uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("Modify")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_ADDRESS), _("Address:")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_VALUE), _("Value:")); + + sprintf(buf, "%.8X", SearchResults[iCurItem]); + SetWindowText(GetDlgItem(hW, IDC_ADDRESS), buf); + + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + val = PSXMu8(SearchResults[iCurItem]); + break; + + case SEARCHTYPE_16BIT: + val = PSXMu16(SearchResults[iCurItem]); + break; + + case SEARCHTYPE_32BIT: + val = PSXMu32(SearchResults[iCurItem]); + break; + + default: + assert(FALSE); // should not reach here + break; + } + + sprintf(buf, "%u", val); + SetWindowText(GetDlgItem(hW, IDC_VALUE), buf); + break; + + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDOK: + val = 0; + GetWindowText(GetDlgItem(hW, IDC_VALUE), buf, 255); + sscanf(buf, "%u", &val); + + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + if (val > 0xFF) { + val = 0xFF; + } + psxMemWrite8(SearchResults[iCurItem], (u8)val); + break; + + case SEARCHTYPE_16BIT: + if (val > 0xFFFF) { + val = 0xFFFF; + } + psxMemWrite16(SearchResults[iCurItem], (u16)val); + break; + + case SEARCHTYPE_32BIT: + psxMemWrite32(SearchResults[iCurItem], (u32)val); + break; + + default: + assert(FALSE); // should not reach here + break; + } + + EndDialog(hW, TRUE); + return TRUE; + + case IDCANCEL: + EndDialog(hW, TRUE); + return FALSE; + } + break; + + case WM_CLOSE: + EndDialog(hW, TRUE); + return FALSE; + } + + return FALSE; +} + +LRESULT WINAPI CheatSearchDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + char buf[256]; + uint32_t i; + + switch (uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("Cheat Search")); + + Static_SetText(GetDlgItem(hW, IDC_LABEL_SEARCHFOR), _("Search For:")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_DATATYPE), _("Data Type:")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_VALUE), _("Value:")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_DATABASE), _("Data Base:")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_TO), _("To:")); + Button_SetText(GetDlgItem(hW, IDC_FREEZE), _("&Freeze")); + Button_SetText(GetDlgItem(hW, IDC_MODIFY), _("&Modify")); + Button_SetText(GetDlgItem(hW, IDC_COPY), _("&Copy")); + Button_SetText(GetDlgItem(hW, IDC_SEARCH), _("&Search")); + Button_SetText(GetDlgItem(hW, IDC_NEWSEARCH), _("&New Search")); + Button_SetText(GetDlgItem(hW, IDCANCEL), _("C&lose")); + + SendMessage(GetDlgItem(hW, IDC_DATATYPE), CB_ADDSTRING, 0, (LPARAM)_("8-bit")); + SendMessage(GetDlgItem(hW, IDC_DATATYPE), CB_ADDSTRING, 0, (LPARAM)_("16-bit")); + SendMessage(GetDlgItem(hW, IDC_DATATYPE), CB_ADDSTRING, 0, (LPARAM)_("32-bit")); + SendMessage(GetDlgItem(hW, IDC_DATABASE), CB_ADDSTRING, 0, (LPARAM)_("Decimal")); + SendMessage(GetDlgItem(hW, IDC_DATABASE), CB_ADDSTRING, 0, (LPARAM)_("Hexadecimal")); + + UpdateCheatSearchDlg(hW); + break; + + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDCANCEL: + EndDialog(hW, FALSE); + return TRUE; + + case IDC_FREEZE: + iCurItem = SendMessage(GetDlgItem(hW, IDC_RESLIST), LB_GETCURSEL, 0, 0); + DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_CHEATVALEDIT), hW, (DLGPROC)CheatFreezeProc); + break; + + case IDC_MODIFY: + iCurItem = SendMessage(GetDlgItem(hW, IDC_RESLIST), LB_GETCURSEL, 0, 0); + DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_CHEATVALEDIT), hW, (DLGPROC)CheatModifyProc); + UpdateCheatSearchDlg(hW); + break; + + case IDC_COPY: + i = SendMessage(GetDlgItem(hW, IDC_RESLIST), LB_GETCURSEL, 0, 0); + sprintf(buf, "%.8X", SearchResults[i]); + + if (OpenClipboard(gApp.hWnd)) { + HGLOBAL hglbCopy = GlobalAlloc(GHND, 256); + char *p; + + if (hglbCopy != NULL) { + p = (char *)GlobalLock(hglbCopy); + strcpy(p, buf); + GlobalUnlock(p); + + EmptyClipboard(); + SetClipboardData(CF_TEXT, (HANDLE)hglbCopy); + } + + CloseClipboard(); + } + break; + + case IDC_SEARCH: + current_search = SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_GETCURSEL, 0, 0); + current_searchtype = SendMessage(GetDlgItem(hW, IDC_DATATYPE), CB_GETCURSEL, 0, 0); + current_searchbase = SendMessage(GetDlgItem(hW, IDC_DATABASE), CB_GETCURSEL, 0, 0); + current_valuefrom = 0; + current_valueto = 0; + + if (current_searchbase == SEARCHBASE_DEC) { + GetWindowText(GetDlgItem(hW, IDC_VALUEFROM), (LPTSTR)buf, 255); + sscanf(buf, "%u", ¤t_valuefrom); + GetWindowText(GetDlgItem(hW, IDC_VALUETO), (LPTSTR)buf, 255); + sscanf(buf, "%u", ¤t_valueto); + } + else { + GetWindowText(GetDlgItem(hW, IDC_VALUEFROM), (LPTSTR)buf, 255); + sscanf(buf, "%x", ¤t_valuefrom); + GetWindowText(GetDlgItem(hW, IDC_VALUETO), (LPTSTR)buf, 255); + sscanf(buf, "%x", ¤t_valueto); + } + + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + if (current_valuefrom > (u32)0xFF) { + current_valuefrom = 0xFF; + } + if (current_valueto > (u32)0xFF) { + current_valueto = 0xFF; + } + break; + + case SEARCHTYPE_16BIT: + if (current_valuefrom > (u32)0xFFFF) { + current_valuefrom = 0xFFFF; + } + if (current_valueto > (u32)0xFFFF) { + current_valueto = 0xFFFF; + } + break; + } + + if (current_search == SEARCH_RANGE && current_valuefrom > current_valueto) { + u32 t = current_valuefrom; + current_valuefrom = current_valueto; + current_valueto = t; + } + + switch (current_search) { + case SEARCH_EQUALVAL: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchEqual8((u8)current_valuefrom); + break; + + case SEARCHTYPE_16BIT: + CheatSearchEqual16((u16)current_valuefrom); + break; + + case SEARCHTYPE_32BIT: + CheatSearchEqual32((u32)current_valuefrom); + break; + } + break; + + case SEARCH_NOTEQUALVAL: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchNotEqual8((u8)current_valuefrom); + break; + + case SEARCHTYPE_16BIT: + CheatSearchNotEqual16((u16)current_valuefrom); + break; + + case SEARCHTYPE_32BIT: + CheatSearchNotEqual32((u32)current_valuefrom); + break; + } + break; + + case SEARCH_RANGE: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchRange8((u8)current_valuefrom, (u8)current_valueto); + break; + + case SEARCHTYPE_16BIT: + CheatSearchRange16((u16)current_valuefrom, (u16)current_valueto); + break; + + case SEARCHTYPE_32BIT: + CheatSearchRange32((u32)current_valuefrom, (u32)current_valueto); + break; + } + break; + + case SEARCH_INCBY: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchIncreasedBy8((u8)current_valuefrom); + break; + + case SEARCHTYPE_16BIT: + CheatSearchIncreasedBy16((u16)current_valuefrom); + break; + + case SEARCHTYPE_32BIT: + CheatSearchIncreasedBy32((u32)current_valuefrom); + break; + } + break; + + case SEARCH_DECBY: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchDecreasedBy8((u8)current_valuefrom); + break; + + case SEARCHTYPE_16BIT: + CheatSearchDecreasedBy16((u16)current_valuefrom); + break; + + case SEARCHTYPE_32BIT: + CheatSearchDecreasedBy32((u32)current_valuefrom); + break; + } + break; + + case SEARCH_INC: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchIncreased8(); + break; + + case SEARCHTYPE_16BIT: + CheatSearchIncreased16(); + break; + + case SEARCHTYPE_32BIT: + CheatSearchIncreased32(); + break; + } + break; + + case SEARCH_DEC: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchDecreased8(); + break; + + case SEARCHTYPE_16BIT: + CheatSearchDecreased16(); + break; + + case SEARCHTYPE_32BIT: + CheatSearchDecreased32(); + break; + } + break; + + case SEARCH_DIFFERENT: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchDifferent8(); + break; + + case SEARCHTYPE_16BIT: + CheatSearchDifferent16(); + break; + + case SEARCHTYPE_32BIT: + CheatSearchDifferent32(); + break; + } + break; + + case SEARCH_NOCHANGE: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchNoChange8(); + break; + + case SEARCHTYPE_16BIT: + CheatSearchNoChange16(); + break; + + case SEARCHTYPE_32BIT: + CheatSearchNoChange32(); + break; + } + break; + + default: + assert(FALSE); // not possible + break; + } + + UpdateCheatSearchDlg(hW); + break; + + case IDC_NEWSEARCH: + FreeCheatSearchMem(); + FreeCheatSearchResults(); + + current_search = SEARCH_EQUALVAL; + current_searchtype = SEARCHTYPE_8BIT; + current_searchbase = SEARCHBASE_DEC; + current_valuefrom = 0; + current_valueto = 0; + + UpdateCheatSearchDlg(hW); + EnableWindow(GetDlgItem(hW, IDC_VALUEFROM), TRUE); + break; + + case IDC_SEARCHFOR: + EnableWindow(GetDlgItem(hW, IDC_VALUEFROM), TRUE); + + if (SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_GETCURSEL, 0, 0) == SEARCH_RANGE) { + ShowWindow(GetDlgItem(hW, IDC_LABEL_TO), SW_SHOW); + ShowWindow(GetDlgItem(hW, IDC_VALUETO), SW_SHOW); + } + else { + ShowWindow(GetDlgItem(hW, IDC_LABEL_TO), SW_HIDE); + ShowWindow(GetDlgItem(hW, IDC_VALUETO), SW_HIDE); + + if (SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_GETCURSEL, 0, 0) >= SEARCH_INC) { + EnableWindow(GetDlgItem(hW, IDC_VALUEFROM), FALSE); + } + } + break; + + case IDC_DATABASE: + if (SendMessage(GetDlgItem(hW, IDC_DATABASE), CB_GETCURSEL, 0, 0) == SEARCHBASE_DEC) { + if (current_searchbase == SEARCHBASE_HEX) { + GetWindowText(GetDlgItem(hW, IDC_VALUEFROM), (LPTSTR)buf, 255); + sscanf(buf, "%x", &i); + sprintf(buf, "%u", i); + SetWindowText(GetDlgItem(hW, IDC_VALUEFROM), (LPCTSTR)buf); + + GetWindowText(GetDlgItem(hW, IDC_VALUETO), (LPTSTR)buf, 255); + sscanf(buf, "%x", &i); + sprintf(buf, "%u", i); + SetWindowText(GetDlgItem(hW, IDC_VALUETO), (LPCTSTR)buf); + } + } + else if (current_searchbase == SEARCHBASE_DEC){ + GetWindowText(GetDlgItem(hW, IDC_VALUEFROM), (LPTSTR)buf, 255); + sscanf(buf, "%u", &i); + sprintf(buf, "%X", i); + SetWindowText(GetDlgItem(hW, IDC_VALUEFROM), (LPCTSTR)buf); + + GetWindowText(GetDlgItem(hW, IDC_VALUETO), (LPTSTR)buf, 255); + sscanf(buf, "%u", &i); + sprintf(buf, "%X", i); + SetWindowText(GetDlgItem(hW, IDC_VALUETO), (LPCTSTR)buf); + } + current_searchbase = SendMessage(GetDlgItem(hW, IDC_DATABASE), CB_GETCURSEL, 0, 0); + break; + + case IDC_RESLIST: + switch (HIWORD(wParam)) { + case LBN_SELCHANGE: + Button_Enable(GetDlgItem(hW, IDC_FREEZE), TRUE); + Button_Enable(GetDlgItem(hW, IDC_MODIFY), TRUE); + Button_Enable(GetDlgItem(hW, IDC_COPY), TRUE); + break; + + case LBN_SELCANCEL: + Button_Enable(GetDlgItem(hW, IDC_FREEZE), FALSE); + Button_Enable(GetDlgItem(hW, IDC_MODIFY), FALSE); + Button_Enable(GetDlgItem(hW, IDC_COPY), FALSE); + break; + } + break; + } + break; + + case WM_CLOSE: + EndDialog(hW, FALSE); + return TRUE; + } + + return FALSE; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/gui/ConfigurePlugins.c pcsxr-unstable-1.9.94+svn98108/win32/gui/ConfigurePlugins.c --- pcsxr-unstable-1.9.94+svn97809/win32/gui/ConfigurePlugins.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/gui/ConfigurePlugins.c 2016-06-30 16:53:23.000000000 +0000 @@ -0,0 +1,713 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2003 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include "psxcommon.h" +#include "plugin.h" +#include "plugins.h" +#include "resource.h" +#include "Win32.h" + +#define QueryKeyV(name, var) \ + size = sizeof(DWORD); \ + if (RegQueryValueEx(myKey, name, 0, &type, (LPBYTE)&tmp, &size) != 0) { if (err) { RegCloseKey(myKey); return -1; } } \ + var = tmp; + +#define QueryKey(s, name, var) \ + size = s; \ + if (RegQueryValueEx(myKey, name, 0, &type, (LPBYTE)var, &size) != 0) { if (err) { RegCloseKey(myKey); return -1; } } + +#define SetKeyV(name, var) \ + tmp = var; \ + RegSetValueEx(myKey, name, 0, REG_DWORD, (LPBYTE)&tmp, sizeof(DWORD)); + +#define SetKey(name, var, s, t) \ + RegSetValueEx(myKey, name, 0, t, (LPBYTE)var, s); + +int LoadConfig() { + HKEY myKey; + DWORD type, size, tmp; + PcsxConfig *Conf = &Config; + int err; +#ifdef ENABLE_NLS + char text[256]; +#endif + + if (RegOpenKeyEx(HKEY_CURRENT_USER,cfgfile,0,KEY_ALL_ACCESS,&myKey)!=ERROR_SUCCESS) return -1; + + err = 1; + QueryKey(256, "Bios", Conf->Bios); + QueryKey(256, "Gpu", Conf->Gpu); + QueryKey(256, "Spu", Conf->Spu); + QueryKey(256, "Cdr", Conf->Cdr); + QueryKey(256, "Pad1", Conf->Pad1); + QueryKey(256, "Pad2", Conf->Pad2); +#ifdef ENABLE_SIO1API + QueryKey(256, "Sio1", Conf->Sio1); +#endif + QueryKey(256, "Mcd1", Conf->Mcd1); + QueryKey(256, "Mcd2", Conf->Mcd2); + QueryKey(256, "PluginsDir", Conf->PluginsDir); + QueryKey(256, "BiosDir", Conf->BiosDir); + err = 0; + QueryKey(256, "Net", Conf->Net); + QueryKey(256, "Lang", Conf->Lang); + + QueryKeyV("Xa", Conf->Xa); + QueryKeyV("SioIrq", Conf->SioIrq); + QueryKeyV("Mdec", Conf->Mdec); + QueryKeyV("PsxAuto", Conf->PsxAuto); + QueryKeyV("Cdda", Conf->Cdda); + QueryKeyV("SlowBoot", Conf->SlowBoot); + QueryKeyV("Debug", Conf->Debug); + QueryKeyV("PsxOut", Conf->PsxOut); + QueryKeyV("SpuIrq", Conf->SpuIrq); + QueryKeyV("RCntFix", Conf->RCntFix); + QueryKeyV("VSyncWA", Conf->VSyncWA); + QueryKeyV("Widescreen", Conf->Widescreen); + QueryKeyV("HideCursor", Conf->HideCursor); + QueryKeyV("SaveWindowPos", Conf->SaveWindowPos); + QueryKeyV("WindowPosX", Conf->WindowPos[0]); + QueryKeyV("WindowPosY", Conf->WindowPos[1]); + QueryKeyV("HackFix", Conf->HackFix); + + QueryKeyV("Cpu", Conf->Cpu); + QueryKeyV("PsxType", Conf->PsxType); + + if (Config.Cpu == CPU_DYNAREC) { + Config.Debug = 0; // don't enable debugger if using dynarec core + } + + RegCloseKey(myKey); + +#ifdef ENABLE_NLS + sprintf(text, "LANGUAGE=%s", Conf->Lang); + gettext_putenv(text); +#endif + + return 0; +} + +///////////////////////////////////////////////////////// + +void SaveConfig() { + HKEY myKey; + DWORD myDisp, tmp; + PcsxConfig *Conf = &Config; + + RegCreateKeyEx(HKEY_CURRENT_USER, cfgfile, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &myKey, &myDisp); + + SetKey("Bios", Conf->Bios, strlen(Conf->Bios), REG_SZ); + SetKey("Gpu", Conf->Gpu, strlen(Conf->Gpu), REG_SZ); + SetKey("Spu", Conf->Spu, strlen(Conf->Spu), REG_SZ); + SetKey("Cdr", Conf->Cdr, strlen(Conf->Cdr), REG_SZ); + SetKey("Pad1", Conf->Pad1, strlen(Conf->Pad1), REG_SZ); + SetKey("Pad2", Conf->Pad2, strlen(Conf->Pad2), REG_SZ); + SetKey("Sio1", Conf->Sio1, strlen(Conf->Sio1), REG_SZ); + SetKey("Net", Conf->Net, strlen(Conf->Net), REG_SZ); + SetKey("Mcd1", Conf->Mcd1, strlen(Conf->Mcd1), REG_SZ); + SetKey("Mcd2", Conf->Mcd2, strlen(Conf->Mcd2), REG_SZ); + SetKey("Lang", Conf->Lang, strlen(Conf->Lang), REG_SZ); + SetKey("PluginsDir", Conf->PluginsDir, strlen(Conf->PluginsDir), REG_SZ); + SetKey("BiosDir", Conf->BiosDir, strlen(Conf->BiosDir), REG_SZ); + + SetKeyV("Xa", Conf->Xa); + SetKeyV("SioIrq", Conf->SioIrq); + SetKeyV("Mdec", Conf->Mdec); + SetKeyV("PsxAuto", Conf->PsxAuto); + SetKeyV("Cdda", Conf->Cdda); + SetKeyV("SlowBoot",Conf->SlowBoot); + SetKeyV("Debug", Conf->Debug); + SetKeyV("PsxOut", Conf->PsxOut); + SetKeyV("SpuIrq", Conf->SpuIrq); + SetKeyV("RCntFix", Conf->RCntFix); + SetKeyV("VSyncWA", Conf->VSyncWA); + SetKeyV("Widescreen", Conf->Widescreen); + SetKeyV("HideCursor", Conf->HideCursor); + SetKeyV("SaveWindowPos", Conf->SaveWindowPos); + SetKeyV("WindowPosX", Conf->WindowPos[0]); + SetKeyV("WindowPosY", Conf->WindowPos[1]); + SetKeyV("HackFix", Conf->HackFix); + + SetKeyV("Cpu", Conf->Cpu); + SetKeyV("PsxType", Conf->PsxType); + + RegCloseKey(myKey); +} + +///////////////////////////////////////////////////////// + +#define ComboAddPlugin(hw, str) { \ + lp = (char *)malloc(strlen(FindData.cFileName)+8); \ + sprintf(lp, "%s", FindData.cFileName); \ + i = ComboBox_AddString(hw, tmpStr); \ + ComboBox_SetItemData(hw, i, lp); \ + if (stricmp(str, lp)==0) \ + ComboBox_SetCurSel(hw, i); \ +} + +BOOL OnConfigurePluginsDialog(HWND hW) { + WIN32_FIND_DATA FindData; + HANDLE Find; + HANDLE Lib; + PSEgetLibType PSE_GetLibType; + PSEgetLibName PSE_GetLibName; + PSEgetLibVersion PSE_GetLibVersion; + HWND hWC_GPU=GetDlgItem(hW,IDC_LISTGPU); + HWND hWC_SPU=GetDlgItem(hW,IDC_LISTSPU); + HWND hWC_CDR=GetDlgItem(hW,IDC_LISTCDR); + HWND hWC_PAD1=GetDlgItem(hW,IDC_LISTPAD1); + HWND hWC_PAD2=GetDlgItem(hW,IDC_LISTPAD2); + HWND hWC_SIO1=GetDlgItem(hW,IDC_LISTSIO1); + HWND hWC_BIOS=GetDlgItem(hW,IDC_LISTBIOS); + char tmpStr[256]; + char *lp; + int i; + + strcpy(tmpStr, Config.PluginsDir); + strcat(tmpStr, "*.dll"); + Find = FindFirstFile(tmpStr, &FindData); + + if (Find != INVALID_HANDLE_VALUE) { + do { + sprintf(tmpStr,"%s%s", Config.PluginsDir, FindData.cFileName); + Lib = LoadLibrary(tmpStr); + if (Lib != NULL) { + PSE_GetLibType = (PSEgetLibType) GetProcAddress((HMODULE)Lib,"PSEgetLibType"); + PSE_GetLibName = (PSEgetLibName) GetProcAddress((HMODULE)Lib,"PSEgetLibName"); + PSE_GetLibVersion = (PSEgetLibVersion) GetProcAddress((HMODULE)Lib,"PSEgetLibVersion"); + + if (PSE_GetLibType != NULL && PSE_GetLibName != NULL && PSE_GetLibVersion != NULL) { + unsigned long version = PSE_GetLibVersion(); + long type; + + sprintf(tmpStr, "%s %d.%d", PSE_GetLibName(), (int)(version>>8)&0xff, (int)version&0xff); + type = PSE_GetLibType(); + if (type & PSE_LT_CDR) { + ComboAddPlugin(hWC_CDR, Config.Cdr); + } + + if (type & PSE_LT_SPU) { + ComboAddPlugin(hWC_SPU, Config.Spu); + } + + if (type & PSE_LT_GPU) { + ComboAddPlugin(hWC_GPU, Config.Gpu); + } + + if (type & PSE_LT_PAD) { + PADquery query; + + query = (PADquery)GetProcAddress((HMODULE)Lib, "PADquery"); + if (query != NULL) { + if (query() & 0x1) + ComboAddPlugin(hWC_PAD1, Config.Pad1); + if (query() & 0x2) + ComboAddPlugin(hWC_PAD2, Config.Pad2); + } else { // just a guess + ComboAddPlugin(hWC_PAD1, Config.Pad1); + } + } + + if (type & PSE_LT_SIO1) { + ComboAddPlugin(hWC_SIO1, Config.Sio1); + } + } + } + } while (FindNextFile(Find,&FindData)); + FindClose(Find); + } + +// BIOS + + lp = (char *)malloc(strlen("HLE") + 1); + sprintf(lp, "HLE"); + i = ComboBox_AddString(hWC_BIOS, _("Simulate Psx Bios")); + ComboBox_SetItemData(hWC_BIOS, i, lp); + if (stricmp(Config.Bios, lp)==0) + ComboBox_SetCurSel(hWC_BIOS, i); + + strcpy(tmpStr, Config.BiosDir); + strcat(tmpStr, "*"); + Find=FindFirstFile(tmpStr, &FindData); + + if (Find != INVALID_HANDLE_VALUE) { + do { + if (!strcmp(FindData.cFileName, ".")) continue; + if (!strcmp(FindData.cFileName, "..")) continue; + if (FindData.nFileSizeLow != 1024 * 512) continue; + lp = (char *)malloc(strlen(FindData.cFileName)+8); + sprintf(lp, "%s", (char *)FindData.cFileName); + i = ComboBox_AddString(hWC_BIOS, FindData.cFileName); + ComboBox_SetItemData(hWC_BIOS, i, lp); + if (Config.Bios[0]=='\0') { + ComboBox_SetCurSel(hWC_BIOS, i); + strcpy(Config.Bios, FindData.cFileName); + } else if (stricmp(Config.Bios, FindData.cFileName)==0) + ComboBox_SetCurSel(hWC_BIOS, i); + } while (FindNextFile(Find,&FindData)); + FindClose(Find); + } + + if (ComboBox_GetCurSel(hWC_CDR ) == -1) + ComboBox_SetCurSel(hWC_CDR, 0); + if (ComboBox_GetCurSel(hWC_GPU ) == -1) + ComboBox_SetCurSel(hWC_GPU, 0); + if (ComboBox_GetCurSel(hWC_SPU ) == -1) + ComboBox_SetCurSel(hWC_SPU, 0); + if (ComboBox_GetCurSel(hWC_PAD1) == -1) + ComboBox_SetCurSel(hWC_PAD1, 0); + if (ComboBox_GetCurSel(hWC_PAD2) == -1) + ComboBox_SetCurSel(hWC_PAD2, 0); + if (ComboBox_GetCurSel(hWC_SIO1 ) == -1) + ComboBox_SetCurSel(hWC_SIO1, 0); + if (ComboBox_GetCurSel(hWC_BIOS) == -1) + ComboBox_SetCurSel(hWC_BIOS, 0); + + return TRUE; +} + +#define CleanCombo(item) \ + hWC = GetDlgItem(hW, item); \ + iCnt = ComboBox_GetCount(hWC); \ + for (i=0; i + +int SelectPath(HWND hW, char *Title, char *Path) { + LPITEMIDLIST pidl; + BROWSEINFO bi; + char Buffer[256]; + + bi.hwndOwner = hW; + bi.pidlRoot = NULL; + bi.pszDisplayName = Buffer; + bi.lpszTitle = Title; + bi.ulFlags = BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS; + bi.lpfn = NULL; + bi.lParam = 0; + if ((pidl = SHBrowseForFolder(&bi)) != NULL) { + if (SHGetPathFromIDList(pidl, Path)) { + int len = strlen(Path); + + if (Path[len - 1] != '\\') { strcat(Path,"\\"); } + return 0; + } + } + return -1; +} + +void SetPluginsDir(HWND hW) { + char Path[256]; + + if (SelectPath(hW, _("Select Plugins Directory"), Path) == -1) return; + strcpy(Config.PluginsDir, Path); + CleanUpCombos(hW); + OnConfigurePluginsDialog(hW); +} + +void SetBiosDir(HWND hW) { + char Path[256]; + + if (SelectPath(hW, _("Select Bios Directory"), Path) == -1) return; + strcpy(Config.BiosDir, Path); + CleanUpCombos(hW); + OnConfigurePluginsDialog(hW); +} + +BOOL CALLBACK ConfigurePluginsDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + switch(uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("Configuration")); + + Button_SetText(GetDlgItem(hW, IDOK), _("OK")); + Button_SetText(GetDlgItem(hW, IDCANCEL), _("Cancel")); + Static_SetText(GetDlgItem(hW, IDC_GRAPHICS), _("Graphics")); + Static_SetText(GetDlgItem(hW, IDC_FIRSTCONTROLLER), _("First Controller")); + Static_SetText(GetDlgItem(hW, IDC_SECONDCONTROLLER), _("Second Controller")); + Static_SetText(GetDlgItem(hW, IDC_SOUND), _("Sound")); + Static_SetText(GetDlgItem(hW, IDC_CDROM), _("Cdrom")); + Static_SetText(GetDlgItem(hW, IDC_LINKCABLE), _("Link cable")); + Static_SetText(GetDlgItem(hW, IDC_BIOS), _("Bios")); + Button_SetText(GetDlgItem(hW, IDC_BIOSDIR), _("Set Bios Directory")); + Button_SetText(GetDlgItem(hW, IDC_PLUGINSDIR), _("Set Plugins Directory")); + Button_SetText(GetDlgItem(hW, IDC_CONFIGGPU), _("Configure...")); + Button_SetText(GetDlgItem(hW, IDC_TESTGPU), _("Test...")); + Button_SetText(GetDlgItem(hW, IDC_ABOUTGPU), _("About...")); + Button_SetText(GetDlgItem(hW, IDC_CONFIGSPU), _("Configure...")); + Button_SetText(GetDlgItem(hW, IDC_TESTSPU), _("Test...")); + Button_SetText(GetDlgItem(hW, IDC_ABOUTSPU), _("About...")); + Button_SetText(GetDlgItem(hW, IDC_CONFIGCDR), _("Configure...")); + Button_SetText(GetDlgItem(hW, IDC_TESTCDR), _("Test...")); + Button_SetText(GetDlgItem(hW, IDC_ABOUTCDR), _("About...")); + Button_SetText(GetDlgItem(hW, IDC_CONFIGPAD1), _("Configure...")); + Button_SetText(GetDlgItem(hW, IDC_TESTPAD1), _("Test...")); + Button_SetText(GetDlgItem(hW, IDC_ABOUTPAD1), _("About...")); + Button_SetText(GetDlgItem(hW, IDC_CONFIGPAD2), _("Configure...")); + Button_SetText(GetDlgItem(hW, IDC_TESTPAD2), _("Test...")); + Button_SetText(GetDlgItem(hW, IDC_ABOUTPAD2), _("About...")); + Button_SetText(GetDlgItem(hW, IDC_CONFIGSIO1), _("Configure...")); + Button_SetText(GetDlgItem(hW, IDC_TESTSIO1), _("Test...")); + Button_SetText(GetDlgItem(hW, IDC_ABOUTSIO1), _("About...")); + + return OnConfigurePluginsDialog(hW); + + case WM_COMMAND: + switch(LOWORD(wParam)) { + case IDC_CONFIGGPU: ConfigureGPU(hW); return TRUE; + case IDC_CONFIGSPU: ConfigureSPU(hW); return TRUE; + case IDC_CONFIGCDR: ConfigureCDR(hW); return TRUE; + case IDC_CONFIGPAD1: ConfigurePAD1(hW); return TRUE; + case IDC_CONFIGPAD2: ConfigurePAD2(hW); return TRUE; + case IDC_CONFIGSIO1: ConfigureSIO1(hW); return TRUE; + + case IDC_TESTGPU: TestGPU(hW); return TRUE; + case IDC_TESTSPU: TestSPU(hW); return TRUE; + case IDC_TESTCDR: TestCDR(hW); return TRUE; + case IDC_TESTPAD1: TestPAD1(hW); return TRUE; + case IDC_TESTPAD2: TestPAD2(hW); return TRUE; + case IDC_TESTSIO1: TestSIO1(hW); return TRUE; + + case IDC_ABOUTGPU: AboutGPU(hW); return TRUE; + case IDC_ABOUTSPU: AboutSPU(hW); return TRUE; + case IDC_ABOUTCDR: AboutCDR(hW); return TRUE; + case IDC_ABOUTPAD1: AboutPAD1(hW); return TRUE; + case IDC_ABOUTPAD2: AboutPAD2(hW); return TRUE; + case IDC_ABOUTSIO1: AboutSIO1(hW); return TRUE; + + case IDC_PLUGINSDIR: SetPluginsDir(hW); return TRUE; + case IDC_BIOSDIR: SetBiosDir(hW); return TRUE; + + case IDCANCEL: + OnCancel(hW); + if (CancelQuit) { + SysClose(); exit(1); + } + return TRUE; + case IDOK: + OnOK(hW); + return TRUE; + } + } + return FALSE; +} + + +void ConfigurePlugins(HWND hWnd) { + DialogBox(gApp.hInstance, + MAKEINTRESOURCE(IDD_CONFIG), + hWnd, + (DLGPROC)ConfigurePluginsDlgProc); +} + +// NetPlay Config Dialog + +BOOL OnConfigureNetPlayDialog(HWND hW) { + WIN32_FIND_DATA FindData; + HANDLE Find; + HANDLE Lib; + PSEgetLibType PSE_GetLibType; + PSEgetLibName PSE_GetLibName; + PSEgetLibVersion PSE_GetLibVersion; + HWND hWC_NET=GetDlgItem(hW,IDC_LISTNET); + char tmpStr[256]; + char *lp; + int i; + + strcpy(tmpStr, Config.PluginsDir); + strcat(tmpStr, "*.dll"); + Find = FindFirstFile(tmpStr, &FindData); + + lp = (char *)malloc(strlen("Disabled")+8); + sprintf(lp, "Disabled"); + i = ComboBox_AddString(hWC_NET, "Disabled"); + ComboBox_SetItemData(hWC_NET, i, lp); + ComboBox_SetCurSel(hWC_NET, 0); + + if (Find != INVALID_HANDLE_VALUE) { + do { + sprintf(tmpStr,"%s%s", Config.PluginsDir, FindData.cFileName); + Lib = LoadLibrary(tmpStr); + if (Lib!=NULL) { + PSE_GetLibType = (PSEgetLibType) GetProcAddress((HMODULE)Lib,"PSEgetLibType"); + PSE_GetLibName = (PSEgetLibName) GetProcAddress((HMODULE)Lib,"PSEgetLibName"); + PSE_GetLibVersion = (PSEgetLibVersion) GetProcAddress((HMODULE)Lib,"PSEgetLibVersion"); + + if (PSE_GetLibType != NULL && PSE_GetLibName != NULL && PSE_GetLibVersion != NULL) { + unsigned long version = PSE_GetLibVersion(); + long type; + + sprintf(tmpStr, "%s %d.%d", PSE_GetLibName(), (int)(version>>8)&0xff, (int)version&0xff); + type = PSE_GetLibType(); + if (type & PSE_LT_NET && ((version >> 16) == 2)) { + ComboAddPlugin(hWC_NET, Config.Net); + } + } + } + } while (FindNextFile(Find,&FindData)); + FindClose(Find); + } + + return TRUE; +} + +BOOL CALLBACK ConfigureNetPlayDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + int i,iCnt;HWND hWC;char * lp; + + switch(uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("NetPlay Configuration")); + + Button_SetText(GetDlgItem(hW, IDOK), _("OK")); + Button_SetText(GetDlgItem(hW, IDCANCEL), _("Cancel")); + Static_SetText(GetDlgItem(hW, IDC_NETPLAY), _("NetPlay")); + Button_SetText(GetDlgItem(hW, IDC_CONFIGNET), _("Configure...")); + Button_SetText(GetDlgItem(hW, IDC_TESTNET), _("Test...")); + Button_SetText(GetDlgItem(hW, IDC_ABOUTNET), _("About...")); + Static_SetText(GetDlgItem(hW, IDC_NETPLAYNOTE), _("Note: The NetPlay Plugin Directory should be the same as the other Plugins.")); + + OnConfigureNetPlayDialog(hW); + return TRUE; + + case WM_COMMAND: { + switch (LOWORD(wParam)) { + case IDC_CONFIGNET: ConfigureNET(hW); return TRUE; + case IDC_TESTNET: TestNET(hW); return TRUE; + case IDC_ABOUTNET: AboutNET(hW); return TRUE; + + case IDCANCEL: + CleanCombo(IDC_LISTNET); + EndDialog(hW,FALSE); + return TRUE; + + case IDOK: + strcpy(Config.Net, GetSelDLL(hW, IDC_LISTNET)); + SaveConfig(); + CleanUpCombos(hW); + LoadPlugins(); + CleanCombo(IDC_LISTNET); + EndDialog(hW,TRUE); + return TRUE; + } + } + } + + return FALSE; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/gui/NoPic.h pcsxr-unstable-1.9.94+svn98108/win32/gui/NoPic.h --- pcsxr-unstable-1.9.94+svn97809/win32/gui/NoPic.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/gui/NoPic.h 2016-06-30 16:53:23.000000000 +0000 @@ -0,0 +1,1345 @@ +//////////////////////////////////////////////////////////////////////// +// following code taken from the gpuPeopsSoft +//////////////////////////////////////////////////////////////////////// + +// font 0-9, 24x20 pixels, 1 byte = 4 dots +// 00 = black +// 01 = white +// 10 = red +// 11 = transparent + +unsigned char cFont[10][120]= +{ +// 0 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 1 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x05,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x05,0x55,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 2 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x01,0x40,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 3 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 4 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x54,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x05,0x14,0x00,0x00, + 0x80,0x00,0x14,0x14,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x55,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 5 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x15,0x54,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 6 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x15,0x54,0x00,0x00, + 0x80,0x00,0x15,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 7 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x01,0x40,0x00,0x00, + 0x80,0x00,0x01,0x40,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 8 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 9 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x15,0x00,0x00, + 0x80,0x00,0x05,0x55,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x05,0x50,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +} +}; + +//////////////////////////////////////////////////////////////////////// + +void PaintPicDot(unsigned char * p,unsigned char c) +{ + + if(c==0) {*p++=0x00;*p++=0x00;*p=0x00;return;} // black + if(c==1) {*p++=0xff;*p++=0xff;*p=0xff;return;} // white + if(c==2) {*p++=0x00;*p++=0x00;*p=0xff;return;} // red + // transparent +} + + ///////////////////////////////////////////////////////////////////// + // generic number/border painter + +void DrawNumBorPic(unsigned char *pMem, int lSelectedSlot) +{ + unsigned char *pf; + int x,y; + int c,v; + + pf=pMem+(103*3); // offset to number rect + + for(y=0;y<20;y++) // loop the number rect pixel + { + for(x=0;x<6;x++) + { + c=cFont[lSelectedSlot][x+y*6]; // get 4 char dot infos at once (number depends on selected slot) + v=(c&0xc0)>>6; + PaintPicDot(pf,(unsigned char)v);pf+=3; // paint the dots into the rect + v=(c&0x30)>>4; + PaintPicDot(pf,(unsigned char)v);pf+=3; + v=(c&0x0c)>>2; + PaintPicDot(pf,(unsigned char)v);pf+=3; + v=c&0x03; + PaintPicDot(pf,(unsigned char)v);pf+=3; + } + pf+=104*3; // next rect y line + } + + pf=pMem; // ptr to first pos in 128x96 pic + for(x=0;x<128;x++) // loop top/bottom line + { + *(pf+(95*128*3))=0x00;*pf++=0x00; + *(pf+(95*128*3))=0x00;*pf++=0x00; // paint it red + *(pf+(95*128*3))=0xff;*pf++=0xff; + } + pf=pMem; // ptr to first pos + for(y=0;y<96;y++) // loop left/right line + { + *(pf+(127*3))=0x00;*pf++=0x00; + *(pf+(127*3))=0x00;*pf++=0x00; // paint it red + *(pf+(127*3))=0xff;*pf++=0xff; + pf+=127*3; // offset to next line + } +} + +//////////////////////////////////////////////////////////////////////// + + +/* GIMP RGB C-Source image dump (NoPic.h) */ + +static const struct { + unsigned int width; + unsigned int height; + unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ + unsigned char pixel_data[128 * 96 * 3 + 1]; +} NoPic_Image = { + 128, 96, 3, + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0U\0\0U\0\0U\0\0""8\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0U\0\0U\0\0U\0\0" + "U\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\341\0\0\34\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0" + "\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8" + "\0\0\305\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\251" + "\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\251\0" + "\0q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376" + "\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\305" + "\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\341\0\0\214\0\0\34\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\305\0\0\376\0\0\376\0\0\376\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\305\0\0\34\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376" + "\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\341\0\0""8\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\341\0\0U\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\376\0\0\305\0\0q\0\0U\0\0U\0" + "\0U\0\0\214\0\0\341\0\0\376\0\0\376\0\0\376\0\0\341\0\0\34\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0U\0\0\376\0\0\376\0\0\341\0\0\251\0\0\251\0\0\251\0\0\251\0\0\251" + "\0\0\251\0\0\251\0\0\341\0\0\376\0\0\376\0\0\376\0\0\341\0\0\34\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\376\0\0\251\0\0U\0\0U\0\0" + "U\0\0q\0\0\251\0\0\376\0\0\376\0\0\376\0\0\376\0\0\34\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376" + "\0\0\376\0\0\341\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0" + "\0\376\0\0\376\0\0\341\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0U\0\0\341\0\0\376\0\0\376\0\0\341\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\341\0\0" + "\376\0\0\376\0\0\214\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376" + "\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\305" + "\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376" + "\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0U\0\0\376\0\0\376\0\0\341\0\0\376\0\0\376\0\0\214\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\305\0\0\376\0\0\376\0\0\341\0\0\34\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\251" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214" + "\0\0\376\0\0\376\0\0\341\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0U\0\0\376\0\0\376" + "\0\0\376\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0" + "\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0\376\0\0\376\0\0\376\0\0\34" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34" + "\0\0\376\0\0\376\0\0\376\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\341\0\0\376\0\0" + "\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0\376\0\0\34\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\251\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0" + "\376\0\0\0\0\0\251\0\0\376\0\0\376\0\0\341\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\305\0" + "\0\376\0\0\376\0\0q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376" + "\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376" + "\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\251\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376" + "\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\214\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\376\0\0\376\0\0\376\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0" + "\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\305\0\0" + "\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0U\0\0U\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\376\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U" + "\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\305" + "\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0\376\0\0""8\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\376\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0" + "\0\0\0\305\0\0\376\0\0\376\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\214\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0" + "\376\0\0\341\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0" + "\0\0\0\0\0\0\0\0\0\0""8\0\0\376\0\0\376\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0" + "\0\376\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0\376\0\0q\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376" + "\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0" + "\0\376\0\0\305\0\0U\0\0U\0\0U\0\0U\0\0U\0\0U\0\0U\0\0\214\0\0\341\0\0\376" + "\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376" + "\0\0U\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0" + "\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\376\0\0\34" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\251\0" + "\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0" + "\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0" + "\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\305\0\0\376\0\0\376\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0" + "\0U\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0" + "\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\341\0\0U\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0" + "\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0\376\0\0q\0\0\0\0\0" + "\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0" + "\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0" + "\305\0\0U\0\0U\0\0U\0\0U\0\0U\0\0U\0\0U\0\0U\0\0\34\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0" + "\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\341\0\0\34\0\0\0" + "\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\251" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0q\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0" + "\0\0\0\0\0\0\0""8\0\0\376\0\0\376\0\0\341\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\305\0\0\376\0\0\376\0\0\251" + "\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\305\0\0\376\0\0\376\0\0""8\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0" + "\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376" + "\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376" + "\0\0\376\0\0\214\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0" + "\376\0\0\376\0\0\376\0\0U\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\376\0\0\376\0\0\376\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0\376\0\0\376\0\0\376\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\305\0\0\376\0\0\376" + "\0\0q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\305\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\341\0\0\34\0\0\376\0\0\376\0\0U\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0" + "\376\0\0\376\0\0\214\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0q\0\0\376\0\0\376\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0\376\0\0\34\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\341\0\0\376\0\0\376\0\0\251" + "\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0" + "\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\305" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376" + "\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0" + "\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\214\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\214\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0" + "\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376" + "\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\376" + "\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\376\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0\376\0\0\214\0\0\34\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\251\0\0\376\0\0\376\0\0\376\0\0\251\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\305\0\0\376\0\0\376\0\0\376\0\0\214\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0q\0\0\376\0\0\376\0\0\376\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\341\0\0\376\0\0\376\0" + "\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\251\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\305\0\0\251\0\0\251\0\0\251\0\0\341\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0" + "U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0" + "\376\0\0\376\0\0\251\0\0\251\0\0\251\0\0\251\0\0\376\0\0\376\0\0\376\0\0" + "\376\0\0\341\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\376\0\0\376" + "\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\341\0\0q\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\34\0\0\251\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0\251\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0U\0\0U\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0U\0" + "\0U\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0q\0\0\251\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\251\0\0q\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0U\0\0U\0\0""8\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0U\0\0U\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0\214\0\0\305\0\0\376\0\0\376\0\0\376" + "\0\0\376\0\0\341\0\0\214\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0", +}; + Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/win32/gui/pcsxr.bmp and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/win32/gui/pcsxr.bmp differ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/gui/pcsxr.exe.manifest pcsxr-unstable-1.9.94+svn98108/win32/gui/pcsxr.exe.manifest --- pcsxr-unstable-1.9.94+svn97809/win32/gui/pcsxr.exe.manifest 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/gui/pcsxr.exe.manifest 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,22 @@ + + + +MyApplication + + + + + + Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/win32/gui/pcsxr.ico and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/win32/gui/pcsxr.ico differ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/gui/plugin.c pcsxr-unstable-1.9.94+svn98108/win32/gui/plugin.c --- pcsxr-unstable-1.9.94+svn97809/win32/gui/plugin.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/gui/plugin.c 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,377 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2003 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include "plugin.h" +#include "plugins.h" +#include "resource.h" +#include +#include + +#include "r3000a.h" +#include "Win32.h" +#include "NoPic.h" +#include "misc.h" +#include "sio.h" + +int ShowPic = 0; + +extern void LidInterrupt(); + +void gpuShowPic() { + char Text[255]; + gzFile f; + + if (!ShowPic) { + unsigned char *pMem; + + pMem = (unsigned char *) malloc(128*96*3); + if (pMem == NULL) return; + GetStateFilename(Text, StatesC); + + GPU_freeze(2, (GPUFreeze_t *)&StatesC); + + f = gzopen(Text, "rb"); + if (f != NULL) { + gzseek(f, 32, SEEK_SET); // skip header + gzseek(f, sizeof(u32), SEEK_CUR); + gzseek(f, sizeof(boolean), SEEK_CUR); + gzread(f, pMem, 128*96*3); + gzclose(f); + } else { + memcpy(pMem, NoPic_Image.pixel_data, 128*96*3); + DrawNumBorPic(pMem, StatesC+1); + } + GPU_showScreenPic(pMem); + + free(pMem); + ShowPic = 1; + } else { GPU_showScreenPic(NULL); ShowPic = 0; } +} + +void GetStateFilename(char *out, int i) { + char trimlabel[33]; + int j; + + strncpy(trimlabel, CdromLabel, 32); + trimlabel[32] = 0; + for (j=31; j>=0; j--) + if (trimlabel[j] == ' ') + trimlabel[j] = '\0'; + + sprintf(out, "sstates\\%.32s-%.9s.%3.3d", trimlabel, CdromId, i); +} + +void PADhandleKey(int key) { + char Text[255]; + int ret; + + if (Running == 0) return; + switch (key) { + case 0: break; + case VK_F1: + GetStateFilename(Text, StatesC); + GPU_freeze(2, (GPUFreeze_t *)&StatesC); + ret = SaveState(Text); + if (ret == 0) + sprintf(Text, _("*PCSXR*: Saved State %d"), StatesC+1); + else sprintf(Text, _("*PCSXR*: Error Saving State %d"), StatesC+1); + GPU_displayText(Text); + if (ShowPic) { ShowPic = 0; gpuShowPic(); } + break; + + case VK_F2: + if (StatesC < 8) StatesC++; + else StatesC = 0; + GPU_freeze(2, (GPUFreeze_t *)&StatesC); + if (ShowPic) { ShowPic = 0; gpuShowPic(); } + break; + + case VK_F3: + GetStateFilename(Text, StatesC); + ret = LoadState(Text); + if (ret == 0) + sprintf(Text, _("*PCSXR*: Loaded State %d"), StatesC+1); + else sprintf(Text, _("*PCSXR*: Error Loading State %d"), StatesC+1); + GPU_displayText(Text); + break; + + case VK_F4: + gpuShowPic(); + break; + + case VK_F5: + Config.SioIrq ^= 0x1; + if (Config.SioIrq) + sprintf(Text, _("*PCSXR*: Sio Irq Always Enabled")); + else sprintf(Text, _("*PCSXR*: Sio Irq Not Always Enabled")); + GPU_displayText(Text); + break; + + case VK_F6: + Config.Mdec ^= 0x1; + if (Config.Mdec) + sprintf(Text, _("*PCSXR*: Black&White Mdecs Only Enabled")); + else sprintf(Text, _("*PCSXR*: Black&White Mdecs Only Disabled")); + GPU_displayText(Text); + break; + + case VK_F7: + Config.Xa ^= 0x1; + if (Config.Xa == 0) + sprintf (Text, _("*PCSXR*: Xa Enabled")); + else sprintf (Text, _("*PCSXR*: Xa Disabled")); + GPU_displayText(Text); + break; + + case VK_F8: + GPU_makeSnapshot(); + return; + + case VK_F9: + GPU_displayText(_("*PCSXR*: CdRom Case Opened")); + SetCdOpenCaseTime(-1); + LidInterrupt(); + break; + + case VK_F10: + GPU_displayText(_("*PCSXR*: CdRom Case Closed")); + SetCdOpenCaseTime(0); + LidInterrupt(); + break; + + case VK_F12: + SysPrintf("*PCSXR*: CpuReset\n"); + psxReset(); + break; + + case VK_ESCAPE: + ShowCursor(TRUE); // we want GUI to have cursor always + Running = 0; + ClosePlugins(); + SysRunGui(); + break; + } +} + +char charsTable[4] = { "|/-\\" }; + +BOOL CALLBACK ConnectDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + char str[256]; + static int waitState; + + switch(uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("Connecting...")); + + sprintf(str, _("Please wait while connecting... %c\n"), charsTable[waitState]); + Static_SetText(GetDlgItem(hW, IDC_CONNECTSTR), str); + SetTimer(hW, 0, 100, NULL); + return TRUE; + + case WM_TIMER: + if (++waitState == 4) waitState = 0; + sprintf(str, _("Please wait while connecting... %c\n"), charsTable[waitState]); + Static_SetText(GetDlgItem(hW, IDC_CONNECTSTR), str); + return TRUE; + +/* case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDCANCEL: + WaitCancel = 1; + return TRUE; + }*/ + } + + return FALSE; +} + +#define PARSEPATH(dst, src) \ + ptr = src + strlen(src); \ + while (*ptr != '\\' && ptr != src) ptr--; \ + if (ptr != src) { \ + strcpy(dst, ptr+1); \ + } + +int _OpenPlugins(HWND hWnd) { + int ret; + + GPU_clearDynarec(clearDynarec); + + ret = CDR_open(); + //if (ret < 0) { SysMessage (_("Error Opening CDR Plugin")); return -1; } + + SetCurrentDirectory(PcsxrDir); + if (Config.UseNet && !NetOpened) { + netInfo info; + char path[256]; + + strcpy(info.EmuName, "PCSXR " PACKAGE_VERSION); + strncpy(info.CdromID, CdromId, 9); + strncpy(info.CdromLabel, CdromLabel, 9); + info.psxMem = psxM; + info.GPU_showScreenPic = GPU_showScreenPic; + info.GPU_displayText = GPU_displayText; + info.GPU_showScreenPic = GPU_showScreenPic; + info.PAD_setSensitive = PAD1_setSensitive; + sprintf(path, "%s%s", Config.BiosDir, Config.Bios); + strcpy(info.BIOSpath, path); + strcpy(info.MCD1path, Config.Mcd1); + strcpy(info.MCD2path, Config.Mcd2); + sprintf(path, "%s%s", Config.PluginsDir, Config.Gpu); + strcpy(info.GPUpath, path); + sprintf(path, "%s%s", Config.PluginsDir, Config.Spu); + strcpy(info.SPUpath, path); + sprintf(path, "%s%s", Config.PluginsDir, Config.Cdr); + strcpy(info.CDRpath, path); + NET_setInfo(&info); + + ret = NET_open(hWnd); + if (ret < 0) { + if (ret == -2) { + // -2 is returned when something in the info + // changed and needs to be synced + char *ptr; + + PARSEPATH(Config.Bios, info.BIOSpath); + PARSEPATH(Config.Gpu, info.GPUpath); + PARSEPATH(Config.Spu, info.SPUpath); + PARSEPATH(Config.Cdr, info.CDRpath); + + strcpy(Config.Mcd1, info.MCD1path); + strcpy(Config.Mcd2, info.MCD2path); + return -2; + } else { + Config.UseNet = FALSE; + } + } else { + HWND hW = CreateDialog(gApp.hInstance, MAKEINTRESOURCE(IDD_CONNECT), gApp.hWnd, ConnectDlgProc); + ShowWindow(hW, SW_SHOW); + + if (NET_queryPlayer() == 1) { + if (SendPcsxInfo() == -1) Config.UseNet = FALSE; + } else { + if (RecvPcsxInfo() == -1) Config.UseNet = FALSE; + } + + DestroyWindow(hW); + } + NetOpened = TRUE; + } else if (Config.UseNet) { + NET_resume(); + } + + ret = GPU_open(hWnd); + if (ret < 0) { SysMessage (_("Error Opening GPU Plugin (%d)"), ret); return -1; } + ret = SPU_open(hWnd); + if (ret < 0) { SysMessage (_("Error Opening SPU Plugin (%d)"), ret); return -1; } + SPU_registerCallback(SPUirq); + ret = PAD1_open(hWnd); + if (ret < 0) { SysMessage (_("Error Opening PAD1 Plugin (%d)"), ret); return -1; } + PAD1_registerVibration(GPU_visualVibration); + PAD1_registerCursor(GPU_cursor); + ret = PAD2_open(hWnd); + if (ret < 0) { SysMessage (_("Error Opening PAD2 Plugin (%d)"), ret); return -1; } + PAD2_registerVibration(GPU_visualVibration); + PAD2_registerCursor(GPU_cursor); +#ifdef ENABLE_SIO1API + ret = SIO1_open(hWnd); + if (ret < 0) { SysMessage (_("Error Opening SIO1 plugin (%d)"), ret); return -1; } + SIO1_registerCallback(SIO1irq); +#endif + + SetCurrentDirectory(PcsxrDir); + + if(Config.HideCursor) + ShowCursor(FALSE); + return 0; +} + +int OpenPlugins(HWND hWnd, int internaliso) { + int ret; + + while ((ret = _OpenPlugins(hWnd)) == -2) { + ReleasePlugins(); + LoadMcds(Config.Mcd1, Config.Mcd2); + if (LoadPlugins() == -1) return -1; + } + return ret; +} + +void ClosePlugins() { + int ret; + + // PAD plugins have to be closed first, otherwise some plugins like + // LilyPad will mess up the window handle and cause crash. + // Also don't check return value here, as LilyPad uses void. + PAD1_close(); + PAD2_close(); + + ret = CDR_close(); + if (ret < 0) { SysMessage (_("Error Closing CDR Plugin")); return; } + ret = GPU_close(); + if (ret < 0) { SysMessage (_("Error Closing GPU Plugin")); return; } + ret = SPU_close(); + if (ret < 0) { SysMessage (_("Error Closing SPU Plugin")); return; } +#ifdef ENABLE_SIO1API + ret = SIO1_close(); + if (ret < 0) { SysMessage (_("Error Closing SIO1 plugin")); return; } +#endif + + if (Config.UseNet) { + NET_pause(); + } +} + +void ResetPlugins() { + int ret; + + CDR_shutdown(); + GPU_shutdown(); + SPU_shutdown(); + PAD1_shutdown(); + PAD2_shutdown(); +#ifdef ENABLE_SIO1API + SIO1_shutdown(); +#endif + if (Config.UseNet) NET_shutdown(); + + ret = CDR_init(); + if (ret != 0) { SysMessage (_("CDRinit error: %d"), ret); return; } + ret = GPU_init(); + if (ret != 0) { SysMessage (_("GPUinit error: %d"), ret); return; } + ret = SPU_init(); + if (ret != 0) { SysMessage (_("SPUinit error: %d"), ret); return; } + ret = PAD1_init(1); + if (ret != 0) { SysMessage (_("PAD1init error: %d"), ret); return; } + ret = PAD2_init(2); + if (ret != 0) { SysMessage (_("PAD2init error: %d"), ret); return; } +#ifdef ENABLE_SIO1API + ret = SIO1_init(); + if (ret != 0) { SysMessage (_("SIO1init error: %d"), ret); return; } +#endif + + if (Config.UseNet) { + ret = NET_init(); + if (ret < 0) { SysMessage (_("NETinit error: %d"), ret); return; } + } + + NetOpened = FALSE; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/gui/plugin.h pcsxr-unstable-1.9.94+svn98108/win32/gui/plugin.h --- pcsxr-unstable-1.9.94+svn97809/win32/gui/plugin.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/gui/plugin.h 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,27 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2003 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +// Windows Specific Plugin Functions +#ifndef __PLUGIN_H__ +#define __PLUGIN_H__ + +#include "plugins.h" + +void GetStateFilename(char *out, int i); + +#endif /* __PLUGIN_H__ */ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/gui/Win32.h pcsxr-unstable-1.9.94+svn98108/win32/gui/Win32.h --- pcsxr-unstable-1.9.94+svn97809/win32/gui/Win32.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/gui/Win32.h 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,70 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2003 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __WIN32_H__ +#define __WIN32_H__ + +typedef struct { + HWND hWnd; // Main window handle + HINSTANCE hInstance; // Application instance + HMENU hMenu; // Main window menu +} AppData; + +AppData gApp; +HANDLE hConsole; + +extern int StatesC; +extern int AccBreak; +extern int ConfPlug; +extern int CancelQuit; +extern char cfgfile[256]; +extern int Running; +extern boolean UseGui; +extern char PcsxrDir[256]; + +void strcatz(char *dst, char *src); + +LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); +BOOL CALLBACK ConfigureMcdsDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); +BOOL CALLBACK ConfigureCpuDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); +BOOL CALLBACK ConfigureNetPlayDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); + +LRESULT WINAPI CheatDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); +LRESULT WINAPI CheatSearchDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); + +void ConfigurePlugins(HWND hWnd); + +int Open_File_Proc(char *file); +int Open_Iso_Proc(char *file); +void Open_Mcd_Proc(HWND hW, int MCDID); +void CreateMainWindow(int nCmdShow); +void RunGui(); +void PADhandleKey(int key); + +int LoadConfig(); +void SaveConfig(); + +void ResetMenuSlots(); +void UpdateMenuItems(); + +void InitLanguages(); +char *GetLanguageNext(); +void CloseLanguages(); +void ChangeLanguage(char *lang); + +#endif /* __WIN32_H__ */ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/gui/WndMain.c pcsxr-unstable-1.9.94+svn98108/win32/gui/WndMain.c --- pcsxr-unstable-1.9.94+svn97809/win32/gui/WndMain.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/gui/WndMain.c 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,1990 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2003 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "resource.h" +#include "AboutDlg.h" + +#include "psxcommon.h" +#include "plugin.h" +#include "debug.h" +#include "Win32.h" +#include "sio.h" +#include "misc.h" +#include "cheat.h" + +#ifdef __MINGW32__ +#ifndef LVM_GETSELECTIONMARK +#define LVM_GETSELECTIONMARK (LVM_FIRST+66) +#endif +#ifndef ListView_GetSelectionMark +#define ListView_GetSelectionMark(w) (INT)SNDMSG((w),LVM_GETSELECTIONMARK,0,0) +#endif +#endif + +int AccBreak = 0; +int ConfPlug = 0; +int StatesC = 0; +int CancelQuit = 0; +char cfgfile[256]; +int Running = 0; +boolean UseGui = TRUE; +char PcsxrDir[256]; + +static HDC hDC; +static HDC hdcmem; +static HBITMAP hBm; +static BITMAP bm; + +#ifdef ENABLE_NLS + +unsigned int langsMax; + +typedef struct { + char lang[256]; +} _langs; +_langs *langs = NULL; + +typedef struct { + char id[8]; + char name[64]; + LANGID langid; +} LangDef; + +LangDef sLangs[] = { + { "ar", N_("Arabic"), 0x0401 }, + { "ca", N_("Catalan"), 0x0403 }, + { "de", N_("German"), 0x0407 }, + { "el", N_("Greek"), 0x0408 }, + { "en", N_("English"), 0x0409 }, + { "es", N_("Spanish"), 0x040a }, + { "fr_FR", N_("French"), 0x040c }, + { "hu_HU", N_("Hungarian"), 0x040e }, + { "it", N_("Italian"), 0x0410 }, + { "pt", N_("Portuguese"), 0x0816 }, + { "pt_BR", N_("Portuguese (Brazilian)"), 0x0416 }, + { "ro", N_("Romanian"), 0x0418 }, + { "ru_RU", N_("Russian"), 0x0419 }, + { "zh_CN", N_("Simplified Chinese"), 0x0804 }, + { "zh_TW", N_("Traditional Chinese"), 0x0404 }, + { "ja", N_("Japanese"), 0x0411 }, + { "ko_KR", N_("Korean"), 0x0412 }, + { "", "", 0xFFFF }, +}; + +char *ParseLang(char *id) { + int i=0; + + while (sLangs[i].id[0] != '\0') { + if (!strcmp(id, sLangs[i].id)) + return _(sLangs[i].name); + i++; + } + + return id; +} + +static void SetDefaultLang(void) { + LANGID langid; + int i; + + langid = GetSystemDefaultLangID(); + + i = 0; + while (sLangs[i].id[0] != '\0') { + if (langid == sLangs[i].langid) { + strcpy(Config.Lang, sLangs[i].id); + return; + } + i++; + } + + strcpy(Config.Lang, "English"); +} + +#endif + +void strcatz(char *dst, char *src) { + int len = strlen(dst) + 1; + strcpy(dst + len, src); +} + +int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { + char *arg = NULL; + char cdfile[MAXPATHLEN] = "", buf[4096]; + int loadstatenum = -1; + + strcpy(cfgfile, "Software\\Pcsxr"); + + gApp.hInstance = hInstance; + +#ifdef ENABLE_NLS + bindtextdomain(PACKAGE, "Langs\\"); + textdomain(PACKAGE); +#endif + + Running = 0; + + GetCurrentDirectory(256, PcsxrDir); + + memset(&Config, 0, sizeof(PcsxConfig)); + strcpy(Config.Net, "Disabled"); + if (LoadConfig() == -1) { + Config.PsxAuto = 1; + strcpy(Config.PluginsDir, "Plugins\\"); + strcpy(Config.BiosDir, "Bios\\"); + + strcpy(Config.Mcd1, "memcards\\Mcd001.mcr"); + strcpy(Config.Mcd2, "memcards\\Mcd002.mcr"); + + ConfPlug = 1; + +#ifdef ENABLE_NLS + { + char text[256]; + SetDefaultLang(); + sprintf(text, "LANGUAGE=%s", Config.Lang); + gettext_putenv(text); + } +#endif + + ConfigurePlugins(gApp.hWnd); + + if (LoadConfig() == -1) { + return 0; + } + } + + strcpy(Config.PatchesDir, "Patches\\"); + +#ifdef ENABLE_NLS + if (Config.Lang[0] == 0) { + SetDefaultLang(); + SaveConfig(); + LoadConfig(); + } +#endif + + // Parse command-line + strncpy(buf, lpCmdLine, 4096); + + for (arg = strtok(buf, " "); arg != NULL; arg = strtok(NULL, " ")) { + if (strcmp(arg, "-nogui") == 0) { + UseGui = FALSE; + } else if (strcmp(arg, "-runcd") == 0) { + cdfile[0] = '\0'; + } else if (strcmp(arg, "-cdfile") == 0) { + arg = strtok(NULL, " "); + if (arg != NULL) { + if (arg[0] == '"') { + strncpy(buf, lpCmdLine + (arg - buf), 4096); + arg = strtok(buf, "\""); + if (arg != NULL) strcpy(cdfile, arg); + } else { + strcpy(cdfile, arg); + } + UseGui = FALSE; + } + } else if (strcmp(arg, "-psxout") == 0) { + Config.PsxOut = TRUE; + } else if (strcmp(arg, "-slowboot") == 0) { + Config.SlowBoot = TRUE; + } else if (strcmp(arg, "-help") == 0) { + MessageBox(gApp.hWnd, _( + "Usage: pcsxr [options]\n" + "\toptions:\n" + "\t-nogui\t\tDon't open the GUI\n" + "\t-psxout\t\tEnable PSX output\n" + "\t-slowboot\t\tEnable BIOS logo\n" + "\t-runcd\t\tRuns CD-ROM (requires -nogui)\n" + "\t-cdfile FILE\tRuns a CD image file (requires -nogui)\n" + "\t-help\t\tDisplay this message"), + "PCSXR", 0); + + return 0; + } + } + + if (SysInit() == -1) return 1; + + CreateMainWindow(nCmdShow); + + if (!UseGui) { + SetIsoFile(cdfile); + PostMessage(gApp.hWnd, WM_COMMAND, ID_FILE_RUN_NOGUI, 0); + } + + RunGui(); + + return 0; +} + +void RunGui() { + MSG msg; + + for (;;) { + if (PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE)) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + else + { + // Avoid 100% cpu usage. + Sleep(10); + } + } +} + +void RestoreWindow() { + AccBreak = 1; + DestroyWindow(gApp.hWnd); + CreateMainWindow(SW_SHOWNORMAL); + + if(Config.HideCursor) + ShowCursor(TRUE); + + //SetCursor(LoadCursor(gApp.hInstance, IDC_ARROW)); + //ShowCursor(TRUE); + + if (!UseGui) PostMessage(gApp.hWnd, WM_COMMAND, ID_FILE_EXIT, 0); +} + +void ResetMenuSlots() { + char str[256]; + int i; + + for (i = 0; i < 9; i++) { + GetStateFilename(str, i); + if (CheckState(str) == -1) + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_SLOT1+i, MF_GRAYED); + else + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_SLOT1+i, MF_ENABLED); + } +} + +void OpenConsole() { + if (hConsole) return; + AllocConsole(); + SetConsoleTitle("Psx Output"); + hConsole = GetStdHandle(STD_OUTPUT_HANDLE); +} + +void CloseConsole() { + FreeConsole(); + hConsole = NULL; +} + +void States_Load(int num) { + char Text[256]; + int ret; + + SetMenu(gApp.hWnd, NULL); + OpenPlugins(gApp.hWnd); + + GetStateFilename(Text, num); + + ret = LoadState(Text); + if (ret == 0) + sprintf(Text, _("*PCSXR*: Loaded State %d"), num+1); + else sprintf(Text, _("*PCSXR*: Error Loading State %d"), num+1); + GPU_displayText(Text); + + Running = 1; + CheatSearchBackupMemory(); + psxCpu->Execute(); +} + +void States_Save(int num) { + char Text[256]; + int ret; + + SetMenu(gApp.hWnd, NULL); + OpenPlugins(gApp.hWnd); + + GPU_updateLace(); + + GetStateFilename(Text, num); + GPU_freeze(2, (GPUFreeze_t *)&num); + ret = SaveState(Text); + if (ret == 0) + sprintf(Text, _("*PCSXR*: Saved State %d"), num+1); + else sprintf(Text, _("*PCSXR*: Error Saving State %d"), num+1); + GPU_displayText(Text); + + Running = 1; + CheatSearchBackupMemory(); + psxCpu->Execute(); +} + +void OnStates_LoadOther() { + OPENFILENAME ofn; + char szFileName[MAXPATHLEN]; + char szFileTitle[MAXPATHLEN]; + char szFilter[256]; + + memset(&szFileName, 0, sizeof(szFileName)); + memset(&szFileTitle, 0, sizeof(szFileTitle)); + memset(&szFilter, 0, sizeof(szFilter)); + + strcpy(szFilter, _("PCSXR State Format")); + strcatz(szFilter, "*.*"); + + ofn.lStructSize = sizeof(OPENFILENAME); + ofn.hwndOwner = gApp.hWnd; + ofn.lpstrFilter = szFilter; + ofn.lpstrCustomFilter = NULL; + ofn.nMaxCustFilter = 0; + ofn.nFilterIndex = 1; + ofn.lpstrFile = szFileName; + ofn.nMaxFile = MAXPATHLEN; + ofn.lpstrInitialDir = NULL; + ofn.lpstrFileTitle = szFileTitle; + ofn.nMaxFileTitle = MAXPATHLEN; + ofn.lpstrTitle = NULL; + ofn.lpstrDefExt = NULL; + ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR; + + if (GetOpenFileName ((LPOPENFILENAME)&ofn)) { + char Text[256]; + int ret; + + SetMenu(gApp.hWnd, NULL); + OpenPlugins(gApp.hWnd); + + ret = LoadState(szFileName); + if (ret == 0) + sprintf(Text, _("*PCSXR*: Loaded State %s"), szFileName); + else sprintf(Text, _("*PCSXR*: Error Loading State %s"), szFileName); + GPU_displayText(Text); + + Running = 1; + psxCpu->Execute(); + } +} + +void OnStates_SaveOther() { + OPENFILENAME ofn; + char szFileName[MAXPATHLEN]; + char szFileTitle[MAXPATHLEN]; + char szFilter[256]; + + memset(&szFileName, 0, sizeof(szFileName)); + memset(&szFileTitle, 0, sizeof(szFileTitle)); + memset(&szFilter, 0, sizeof(szFilter)); + + strcpy(szFilter, _("PCSXR State Format")); + strcatz(szFilter, "*.*"); + + ofn.lStructSize = sizeof(OPENFILENAME); + ofn.hwndOwner = gApp.hWnd; + ofn.lpstrFilter = szFilter; + ofn.lpstrCustomFilter = NULL; + ofn.nMaxCustFilter = 0; + ofn.nFilterIndex = 1; + ofn.lpstrFile = szFileName; + ofn.nMaxFile = MAXPATHLEN; + ofn.lpstrInitialDir = NULL; + ofn.lpstrFileTitle = szFileTitle; + ofn.nMaxFileTitle = MAXPATHLEN; + ofn.lpstrTitle = NULL; + ofn.lpstrDefExt = NULL; + ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR; + + if (GetOpenFileName ((LPOPENFILENAME)&ofn)) { + char Text[256]; + int ret; + + SetMenu(gApp.hWnd, NULL); + OpenPlugins(gApp.hWnd); + + ret = SaveState(szFileName); + if (ret == 0) + sprintf(Text, _("*PCSXR*: Saved State %s"), szFileName); + else sprintf(Text, _("*PCSXR*: Error Saving State %s"), szFileName); + GPU_displayText(Text); + + Running = 1; + psxCpu->Execute(); + } +} + +LRESULT WINAPI MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { + char File[256]; + PAINTSTRUCT ps; + RECT rect; + + switch (msg) { + case WM_CREATE: + hBm = LoadBitmap(gApp.hInstance, MAKEINTRESOURCE(MAIN_LOGO)); + GetObject(hBm, sizeof(BITMAP), (LPVOID)&bm); + hDC = GetDC(hWnd); + hdcmem = CreateCompatibleDC(hDC); + ReleaseDC(hWnd, hDC); + break; + + case WM_PAINT: + hDC = BeginPaint(hWnd, &ps); + SelectObject(hdcmem, hBm); + if (!Running) BitBlt(hDC, 0, 0, bm.bmWidth, bm.bmHeight, hdcmem, 0, 0, SRCCOPY); + EndPaint(hWnd, &ps); + break; + + case WM_COMMAND: + switch (LOWORD(wParam)) { + case ID_FILE_EXIT: + SysClose(); + SaveConfig(); + PostQuitMessage(0); + exit(0); + return TRUE; + + case ID_FILE_RUN_CD: + SetIsoFile(NULL); + SetMenu(hWnd, NULL); + LoadPlugins(); + if (OpenPlugins(hWnd) == -1) { + ClosePlugins(); + RestoreWindow(); + return TRUE; + } + if (CheckCdrom() == -1) { + ClosePlugins(); + RestoreWindow(); + SysMessage(_("The CD does not appear to be a valid Playstation CD")); + return TRUE; + } + + // Auto-detect: region first, then rcnt reset + SysReset(); + + if (LoadCdrom() == -1) { + ClosePlugins(); + RestoreWindow(); + SysMessage(_("Could not load CD-ROM!")); + return TRUE; + } + if(Config.HideCursor) + ShowCursor(FALSE); + Running = 1; + psxCpu->Execute(); + return TRUE; + + case ID_FILE_RUNBIOS: + if (strcmp(Config.Bios, "HLE") == 0) { + SysMessage(_("Running BIOS is not supported with Internal HLE Bios.")); + return TRUE; + } + SetIsoFile(NULL); + SetMenu(hWnd, NULL); + LoadPlugins(); + if (OpenPlugins(hWnd) == -1) { + ClosePlugins(); + RestoreWindow(); + return TRUE; + } + if(Config.HideCursor) + ShowCursor(FALSE); + SysReset(); + CdromId[0] = '\0'; + CdromLabel[0] = '\0'; + Running = 1; + psxCpu->Execute(); + return TRUE; + + case ID_FILE_RUN_ISO: + if (!Open_Iso_Proc(File)) return TRUE; + SetIsoFile(File); + SetMenu(hWnd, NULL); + LoadPlugins(); + if (OpenPlugins(hWnd) == -1) { + ClosePlugins(); + RestoreWindow(); + return TRUE; + } + if (CheckCdrom() == -1) { + ClosePlugins(); + RestoreWindow(); + SysMessage(_("The CD does not appear to be a valid Playstation CD")); + return TRUE; + } + + // Auto-detect: region first, then rcnt reset + SysReset(); + + if (LoadCdrom() == -1) { + ClosePlugins(); + RestoreWindow(); + SysMessage(_("Could not load CD-ROM!")); + return TRUE; + } + if(Config.HideCursor) + ShowCursor(FALSE); + Running = 1; + psxCpu->Execute(); + return TRUE; + + case ID_FILE_RUN_EXE: + if (!Open_File_Proc(File)) return TRUE; + SetIsoFile(NULL); + SetMenu(hWnd, NULL); + LoadPlugins(); + if (OpenPlugins(hWnd) == -1) { + ClosePlugins(); + RestoreWindow(); + return TRUE; + } + CheckCdrom(); + + // Auto-detect: region first, then rcnt reset + SysReset(); + + Load(File); + Running = 1; + psxCpu->Execute(); + return TRUE; + + case ID_FILE_STATES_LOAD_SLOT1: States_Load(0); return TRUE; + case ID_FILE_STATES_LOAD_SLOT2: States_Load(1); return TRUE; + case ID_FILE_STATES_LOAD_SLOT3: States_Load(2); return TRUE; + case ID_FILE_STATES_LOAD_SLOT4: States_Load(3); return TRUE; + case ID_FILE_STATES_LOAD_SLOT5: States_Load(4); return TRUE; + case ID_FILE_STATES_LOAD_SLOT6: States_Load(5); return TRUE; + case ID_FILE_STATES_LOAD_SLOT7: States_Load(6); return TRUE; + case ID_FILE_STATES_LOAD_SLOT8: States_Load(7); return TRUE; + case ID_FILE_STATES_LOAD_SLOT9: States_Load(8); return TRUE; + case ID_FILE_STATES_LOAD_OTHER: OnStates_LoadOther(); return TRUE; + + case ID_FILE_STATES_SAVE_SLOT1: States_Save(0); return TRUE; + case ID_FILE_STATES_SAVE_SLOT2: States_Save(1); return TRUE; + case ID_FILE_STATES_SAVE_SLOT3: States_Save(2); return TRUE; + case ID_FILE_STATES_SAVE_SLOT4: States_Save(3); return TRUE; + case ID_FILE_STATES_SAVE_SLOT5: States_Save(4); return TRUE; + case ID_FILE_STATES_SAVE_SLOT6: States_Save(5); return TRUE; + case ID_FILE_STATES_SAVE_SLOT7: States_Save(6); return TRUE; + case ID_FILE_STATES_SAVE_SLOT8: States_Save(7); return TRUE; + case ID_FILE_STATES_SAVE_SLOT9: States_Save(8); return TRUE; + case ID_FILE_STATES_SAVE_OTHER: OnStates_SaveOther(); return TRUE; + + case ID_FILE_RUN_NOGUI: + SetMenu(hWnd, NULL); + LoadPlugins(); + if (OpenPlugins(hWnd) == -1) { + ClosePlugins(); + RestoreWindow(); + return TRUE; + } + if (CheckCdrom() == -1) { + fprintf(stderr, _("The CD does not appear to be a valid Playstation CD")); + ClosePlugins(); + RestoreWindow(); + return TRUE; + } + + // Auto-detect: region first, then rcnt reset + SysReset(); + + if (LoadCdrom() == -1) { + fprintf(stderr, _("Could not load CD-ROM!")); + ClosePlugins(); + RestoreWindow(); + return TRUE; + } + if(Config.HideCursor) + ShowCursor(FALSE); + Running = 1; + psxCpu->Execute(); + return TRUE; + + case ID_EMULATOR_RUN: + SetMenu(hWnd, NULL); + OpenPlugins(hWnd); + if(Config.HideCursor) + ShowCursor(FALSE); + Running = 1; + CheatSearchBackupMemory(); + psxCpu->Execute(); + return TRUE; + + case ID_EMULATOR_RESET: + SetMenu(hWnd, NULL); + OpenPlugins(hWnd); + CheckCdrom(); + + // Auto-detect: region first, then rcnt reset + SysReset(); + + LoadCdrom(); + if(Config.HideCursor) + ShowCursor(FALSE); + Running = 1; + psxCpu->Execute(); + return TRUE; + + case ID_EMULATOR_SHUTDOWN: + ReleasePlugins(); + SetIsoFile(NULL); + CdromId[0] = '\0'; + CdromLabel[0] = '\0'; + UpdateMenuItems(); + ShowCursor(TRUE); // we want GUI to have cursor always + return TRUE; + + case ID_EMULATOR_SWITCH_ISO: + if (!Open_Iso_Proc(File)) return TRUE; + SetIsoFile(File); + SetMenu(hWnd, NULL); + if (OpenPlugins(hWnd) == -1) { + ClosePlugins(); + RestoreWindow(); + return TRUE; + } + if(Config.HideCursor) + ShowCursor(FALSE); + Running = 1; + SetCdOpenCaseTime(time(NULL) + 2); + CheatSearchBackupMemory(); + psxCpu->Execute(); + return TRUE; + + case ID_CONFIGURATION_GRAPHICS: + if (GPU_configure) GPU_configure(); + return TRUE; + + case ID_CONFIGURATION_SOUND: + if (SPU_configure) SPU_configure(); + return TRUE; + + case ID_CONFIGURATION_CONTROLLERS: + if (PAD1_configure) PAD1_configure(); + if (strcmp(Config.Pad1, Config.Pad2)) if (PAD2_configure) PAD2_configure(); + return TRUE; + + case ID_CONFIGURATION_CDROM: + if (CDR_configure) CDR_configure(); + return TRUE; + + case ID_CONFIGURATION_LINKCABLE: +#ifdef ENABLE_SIO1API + if (SIO1_configure) SIO1_configure(); +#endif + return TRUE; + + case ID_CONFIGURATION_NETPLAY: + DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_NETPLAY), hWnd, (DLGPROC)ConfigureNetPlayDlgProc); + return TRUE; + + case ID_CONFIGURATION_MEMORYCARDMANAGER: + DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_MCDCONF), hWnd, (DLGPROC)ConfigureMcdsDlgProc); + return TRUE; + + case ID_CONFIGURATION_CPU: + DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_CPUCONF), hWnd, (DLGPROC)ConfigureCpuDlgProc); + return TRUE; + + case ID_CONFIGURATION: + ConfigurePlugins(hWnd); + return TRUE; + + case ID_CONFIGURATION_CHEATLIST: + DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_CHEATLIST), hWnd, (DLGPROC)CheatDlgProc); + break; + + case ID_CONFIGURATION_CHEATSEARCH: + DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_CHEATSEARCH), hWnd, (DLGPROC)CheatSearchDlgProc); + break; + + case ID_HELP_ABOUT: + DialogBox(gApp.hInstance, MAKEINTRESOURCE(ABOUT_DIALOG), hWnd, (DLGPROC)AboutDlgProc); + return TRUE; + + default: +#ifdef ENABLE_NLS + if (LOWORD(wParam) >= ID_LANGS && LOWORD(wParam) <= (ID_LANGS + langsMax)) { + AccBreak = 1; + DestroyWindow(gApp.hWnd); + ChangeLanguage(langs[LOWORD(wParam) - ID_LANGS].lang); + CreateMainWindow(SW_NORMAL); + return TRUE; + } +#endif + break; + } + break; + + case WM_SYSKEYDOWN: + if (wParam != VK_F10) + return DefWindowProc(hWnd, msg, wParam, lParam); + case WM_KEYDOWN: + PADhandleKey(wParam); + return TRUE; + + case WM_DESTROY: + if (!AccBreak) { + if (Running) ClosePlugins(); + SysClose(); + SaveConfig(); + PostQuitMessage(0); + exit(0); + } + else AccBreak = 0; + + DeleteObject(hBm); + DeleteDC(hdcmem); + return TRUE; + + case WM_EXITSIZEMOVE: + if(Config.SaveWindowPos) { + GetWindowRect(hWnd, &rect); + Config.WindowPos[0] = rect.left; + Config.WindowPos[1] = rect.top; + } + return TRUE; + + case WM_QUIT: + SaveConfig(); + exit(0); + break; + + default: + return DefWindowProc(hWnd, msg, wParam, lParam); + } + + return FALSE; +} + +HWND mcdDlg; +McdBlock Blocks[2][15]; +int IconC[2][15]; +HIMAGELIST Iiml[2]; +HICON eICON; + +void CreateListView(int idc) { + HWND List; + LV_COLUMN col; + + List = GetDlgItem(mcdDlg, idc); + + col.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM; + col.fmt = LVCFMT_LEFT; + + col.pszText = _("Title"); + col.cx = 170; + col.iSubItem = 0; + + ListView_InsertColumn(List, 0, &col); + + col.pszText = _("Status"); + col.cx = 50; + col.iSubItem = 1; + + ListView_InsertColumn(List, 1, &col); + + col.pszText = _("Game ID"); + col.cx = 90; + col.iSubItem = 2; + + ListView_InsertColumn(List, 2, &col); + + col.pszText = _("Game"); + col.cx = 80; + col.iSubItem = 3; + + ListView_InsertColumn(List, 3, &col); +} + +int GetRGB() { + HDC scrDC, memDC; + HBITMAP oldBmp = NULL; + HBITMAP curBmp = NULL; + COLORREF oldColor; + COLORREF curColor = RGB(255,255,255); + int i, R, G, B; + + R = G = B = 1; + + scrDC = CreateDC("DISPLAY", NULL, NULL, NULL); + memDC = CreateCompatibleDC(NULL); + curBmp = CreateCompatibleBitmap(scrDC, 1, 1); + oldBmp = (HBITMAP)SelectObject(memDC, curBmp); + + for (i = 255; i >= 0; --i) { + oldColor = curColor; + curColor = SetPixel(memDC, 0, 0, RGB(i, i, i)); + + if (GetRValue(curColor) < GetRValue(oldColor)) ++R; + if (GetGValue(curColor) < GetGValue(oldColor)) ++G; + if (GetBValue(curColor) < GetBValue(oldColor)) ++B; + } + + DeleteObject(oldBmp); + DeleteObject(curBmp); + DeleteDC(scrDC); + DeleteDC(memDC); + + return (R * G * B); +} + +HICON GetIcon(short *icon) { + ICONINFO iInfo; + HDC hDC; + char mask[16*16]; + int x, y, c, Depth; + + hDC = CreateIC("DISPLAY",NULL,NULL,NULL); + Depth=GetDeviceCaps(hDC, BITSPIXEL); + DeleteDC(hDC); + + if (Depth == 16) { + if (GetRGB() == (32 * 32 * 32)) + Depth = 15; + } + + for (y=0; y<16; y++) { + for (x=0; x<16; x++) { + c = icon[y*16+x]; + if (Depth == 15 || Depth == 32) + c = ((c&0x001f) << 10) | + ((c&0x7c00) >> 10) | + ((c&0x03e0) ); + else + c = ((c&0x001f) << 11) | + ((c&0x7c00) >> 9) | + ((c&0x03e0) << 1); + + icon[y*16+x] = c; + } + } + + iInfo.fIcon = TRUE; + memset(mask, 0, 16*16); + iInfo.hbmMask = CreateBitmap(16, 16, 1, 1, mask); + iInfo.hbmColor = CreateBitmap(16, 16, 1, 16, icon); + + return CreateIconIndirect(&iInfo); +} + +HICON hICON[2][3][15]; +int aIover[2]; +int ani[2]; + +void LoadMcdItems(int mcd, int idc) { + HWND List = GetDlgItem(mcdDlg, idc); + LV_ITEM item; + HIMAGELIST iml = Iiml[mcd-1]; + int i, j; + HICON hIcon; + McdBlock *Info; + + aIover[mcd-1]=0; + ani[mcd-1]=0; + + ListView_DeleteAllItems(List); + + for (i=0; i<15; i++) { + + item.mask = LVIF_TEXT | LVIF_IMAGE; + item.iItem = i; + item.iImage = i; + item.pszText = LPSTR_TEXTCALLBACK; + item.iSubItem = 0; + + IconC[mcd-1][i] = 0; + Info = &Blocks[mcd-1][i]; + + if ((Info->Flags & 0xF) == 1 && Info->IconCount != 0) { + hIcon = GetIcon(Info->Icon); + + if (Info->IconCount > 1) { + for(j = 0; j < 3; j++) + hICON[mcd-1][j][i]=hIcon; + } + } else { + hIcon = eICON; + } + + ImageList_ReplaceIcon(iml, -1, hIcon); + ListView_InsertItem(List, &item); + } +} + +void UpdateMcdItems(int mcd, int idc) { + HWND List = GetDlgItem(mcdDlg, idc); + LV_ITEM item; + HIMAGELIST iml = Iiml[mcd-1]; + int i, j; + McdBlock *Info; + HICON hIcon; + + aIover[mcd-1]=0; + ani[mcd-1]=0; + + for (i=0; i<15; i++) { + + item.mask = LVIF_TEXT | LVIF_IMAGE; + item.iItem = i; + item.iImage = i; + item.pszText = LPSTR_TEXTCALLBACK; + item.iSubItem = 0; + + IconC[mcd-1][i] = 0; + Info = &Blocks[mcd-1][i]; + + if ((Info->Flags & 0xF) == 1 && Info->IconCount != 0) { + hIcon = GetIcon(Info->Icon); + + if (Info->IconCount > 1) { + for(j = 0; j < 3; j++) + hICON[mcd-1][j][i]=hIcon; + } + } else { + hIcon = eICON; + } + + ImageList_ReplaceIcon(iml, i, hIcon); + ListView_SetItem(List, &item); + } + ListView_Update(List, -1); +} + +void McdListGetDispInfo(int mcd, int idc, LPNMHDR pnmh) { + LV_DISPINFO *lpdi = (LV_DISPINFO *)pnmh; + McdBlock *Info; + char buf[256]; + static char buftitle[256]; + + Info = &Blocks[mcd - 1][lpdi->item.iItem]; + + switch (lpdi->item.iSubItem) { + case 0: + switch (Info->Flags & 0xF) { + case 1: + if (MultiByteToWideChar(932, 0, (LPCSTR)Info->sTitle, -1, (LPWSTR)buf, sizeof(buf)) == 0) { + lpdi->item.pszText = Info->Title; + } else if (WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)buf, -1, (LPSTR)buftitle, sizeof(buftitle), NULL, NULL) == 0) { + lpdi->item.pszText = Info->Title; + } else { + lpdi->item.pszText = buftitle; + } + break; + case 2: + lpdi->item.pszText = _("mid link block"); + break; + case 3: + lpdi->item.pszText = _("terminiting link block"); + break; + } + break; + case 1: + if ((Info->Flags & 0xF0) == 0xA0) { + if ((Info->Flags & 0xF) >= 1 && + (Info->Flags & 0xF) <= 3) { + lpdi->item.pszText = _("Deleted"); + } else lpdi->item.pszText = _("Free"); + } else if ((Info->Flags & 0xF0) == 0x50) + lpdi->item.pszText = _("Used"); + else { lpdi->item.pszText = _("Free"); } + break; + case 2: + if((Info->Flags & 0xF)==1) + lpdi->item.pszText = Info->ID; + break; + case 3: + if((Info->Flags & 0xF)==1) + lpdi->item.pszText = Info->Name; + break; + } +} + +void McdListNotify(int mcd, int idc, LPNMHDR pnmh) { + switch (pnmh->code) { + case LVN_GETDISPINFO: McdListGetDispInfo(mcd, idc, pnmh); break; + } +} + +void UpdateMcdDlg() { + int i; + + for (i=1; i<16; i++) GetMcdBlockInfo(1, i, &Blocks[0][i-1]); + for (i=1; i<16; i++) GetMcdBlockInfo(2, i, &Blocks[1][i-1]); + UpdateMcdItems(1, IDC_LIST1); + UpdateMcdItems(2, IDC_LIST2); +} + +void LoadMcdDlg() { + int i; + + for (i=1; i<16; i++) GetMcdBlockInfo(1, i, &Blocks[0][i-1]); + for (i=1; i<16; i++) GetMcdBlockInfo(2, i, &Blocks[1][i-1]); + LoadMcdItems(1, IDC_LIST1); + LoadMcdItems(2, IDC_LIST2); +} + +void UpdateMcdIcon(int mcd, int idc) { + HWND List = GetDlgItem(mcdDlg, idc); + HIMAGELIST iml = Iiml[mcd-1]; + int i; + McdBlock *Info; + int *count; + + if(!aIover[mcd-1]) { + ani[mcd-1]++; + + for (i=0; i<15; i++) { + Info = &Blocks[mcd-1][i]; + count = &IconC[mcd-1][i]; + + if ((Info->Flags & 0xF) != 1) continue; + if (Info->IconCount <= 1) continue; + + if (*count < Info->IconCount) { + (*count)++; + aIover[mcd-1]=0; + + if(ani[mcd-1] <= (Info->IconCount-1)) // last frame and below... + hICON[mcd-1][ani[mcd-1]][i] = GetIcon(&Info->Icon[(*count)*16*16]); + } else { + aIover[mcd-1]=1; + } + } + + } else { + + if (ani[mcd-1] > 1) ani[mcd-1] = 0; // 1st frame + else ani[mcd-1]++; // 2nd, 3rd frame + + for(i=0;i<15;i++) { + Info = &Blocks[mcd-1][i]; + + if (((Info->Flags & 0xF) == 1) && (Info->IconCount > 1)) + ImageList_ReplaceIcon(iml, i, hICON[mcd-1][ani[mcd-1]][i]); + } + InvalidateRect(List, NULL, FALSE); + } +} + +static int copy = 0, copymcd = 0; +//static int listsel = 0; + +BOOL CALLBACK ConfigureMcdsDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + char str[256]; + LPBYTE lpAND, lpXOR; + LPBYTE lpA, lpX; + int i, j; + + switch(uMsg) { + case WM_INITDIALOG: + mcdDlg = hW; + + SetWindowText(hW, _("Memcard Manager")); + + Button_SetText(GetDlgItem(hW, IDOK), _("OK")); + Button_SetText(GetDlgItem(hW, IDCANCEL), _("Cancel")); + Button_SetText(GetDlgItem(hW, IDC_MCDSEL1), _("Select Mcd")); + Button_SetText(GetDlgItem(hW, IDC_FORMAT1), _("Format Mcd")); + Button_SetText(GetDlgItem(hW, IDC_RELOAD1), _("Reload Mcd")); + Button_SetText(GetDlgItem(hW, IDC_MCDSEL2), _("Select Mcd")); + Button_SetText(GetDlgItem(hW, IDC_FORMAT2), _("Format Mcd")); + Button_SetText(GetDlgItem(hW, IDC_RELOAD2), _("Reload Mcd")); + Button_SetText(GetDlgItem(hW, IDC_COPYTO2), _("-> Copy ->")); + Button_SetText(GetDlgItem(hW, IDC_COPYTO1), _("<- Copy <-")); + Button_SetText(GetDlgItem(hW, IDC_PASTE), _("Paste")); + Button_SetText(GetDlgItem(hW, IDC_DELETE1), _("<- Un/Delete")); + Button_SetText(GetDlgItem(hW, IDC_DELETE2), _("Un/Delete ->")); + + Static_SetText(GetDlgItem(hW, IDC_FRAMEMCD1), _("Memory Card 1")); + Static_SetText(GetDlgItem(hW, IDC_FRAMEMCD2), _("Memory Card 2")); + + lpA=lpAND=(LPBYTE)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,(16*16)); + lpX=lpXOR=(LPBYTE)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,(16*16)); + + for(i=0;i<16;i++) + { + for(j=0;j<16;j++) + { + *lpA++=0xff; + *lpX++=0; + } + } + eICON=CreateIcon(gApp.hInstance,16,16,1,1,lpAND,lpXOR); + + HeapFree(GetProcessHeap(),0,lpAND); + HeapFree(GetProcessHeap(),0,lpXOR); + + if (!strlen(Config.Mcd1)) strcpy(Config.Mcd1, "memcards\\Mcd001.mcr"); + if (!strlen(Config.Mcd2)) strcpy(Config.Mcd2, "memcards\\Mcd002.mcr"); + Edit_SetText(GetDlgItem(hW,IDC_MCD1), Config.Mcd1); + Edit_SetText(GetDlgItem(hW,IDC_MCD2), Config.Mcd2); + + CreateListView(IDC_LIST1); + CreateListView(IDC_LIST2); + + Iiml[0] = ImageList_Create(16, 16, ILC_COLOR16, 0, 0); + Iiml[1] = ImageList_Create(16, 16, ILC_COLOR16, 0, 0); + + ListView_SetImageList(GetDlgItem(mcdDlg, IDC_LIST1), Iiml[0], LVSIL_SMALL); + ListView_SetImageList(GetDlgItem(mcdDlg, IDC_LIST2), Iiml[1], LVSIL_SMALL); + + Button_Enable(GetDlgItem(hW, IDC_PASTE), FALSE); + + LoadMcdDlg(); + + SetTimer(hW, 1, 250, NULL); + + return TRUE; + + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDC_COPYTO1: + copy = ListView_GetSelectionMark(GetDlgItem(mcdDlg, IDC_LIST2)); + copymcd = 1; + + Button_Enable(GetDlgItem(hW, IDC_PASTE), TRUE); + return TRUE; + case IDC_COPYTO2: + copy = ListView_GetSelectionMark(GetDlgItem(mcdDlg, IDC_LIST1)); + copymcd = 2; + + Button_Enable(GetDlgItem(hW, IDC_PASTE), TRUE); + return TRUE; + case IDC_PASTE: + if (MessageBox(hW, _("Are you sure you want to paste this selection?"), _("Confirmation"), MB_YESNO) == IDNO) return TRUE; + + if (copymcd == 1) { + Edit_GetText(GetDlgItem(hW,IDC_MCD1), str, 256); + i = ListView_GetSelectionMark(GetDlgItem(mcdDlg, IDC_LIST1)); + + // save dir data + save data + memcpy(Mcd1Data + (i+1) * 128, Mcd2Data + (copy+1) * 128, 128); + SaveMcd(str, Mcd1Data, (i+1) * 128, 128); + memcpy(Mcd1Data + (i+1) * 1024 * 8, Mcd2Data + (copy+1) * 1024 * 8, 1024 * 8); + SaveMcd(str, Mcd1Data, (i+1) * 1024 * 8, 1024 * 8); + } else { // 2 + Edit_GetText(GetDlgItem(hW,IDC_MCD2), str, 256); + i = ListView_GetSelectionMark(GetDlgItem(mcdDlg, IDC_LIST2)); + + // save dir data + save data + memcpy(Mcd2Data + (i+1) * 128, Mcd1Data + (copy+1) * 128, 128); + SaveMcd(str, Mcd2Data, (i+1) * 128, 128); + memcpy(Mcd2Data + (i+1) * 1024 * 8, Mcd1Data + (copy+1) * 1024 * 8, 1024 * 8); + SaveMcd(str, Mcd2Data, (i+1) * 1024 * 8, 1024 * 8); + } + + UpdateMcdDlg(); + + return TRUE; + case IDC_DELETE1: + { + McdBlock *Info; + int mcd = 1; + int i, xor = 0, j; + unsigned char *data, *ptr; + + Edit_GetText(GetDlgItem(hW,IDC_MCD1), str, 256); + i = ListView_GetSelectionMark(GetDlgItem(mcdDlg, IDC_LIST1)); + data = Mcd1Data; + + i++; + + ptr = data + i * 128; + + Info = &Blocks[mcd-1][i-1]; + + if ((Info->Flags & 0xF0) == 0xA0) { + if ((Info->Flags & 0xF) >= 1 && + (Info->Flags & 0xF) <= 3) { // deleted + *ptr = 0x50 | (Info->Flags & 0xF); + } else return TRUE; + } else if ((Info->Flags & 0xF0) == 0x50) { // used + *ptr = 0xA0 | (Info->Flags & 0xF); + } else { return TRUE; } + + for (j=0; j<127; j++) xor^=*ptr++; + *ptr = xor; + + SaveMcd(str, data, i * 128, 128); + UpdateMcdDlg(); + } + + return TRUE; + case IDC_DELETE2: + { + McdBlock *Info; + int mcd = 2; + int i, xor = 0, j; + unsigned char *data, *ptr; + + Edit_GetText(GetDlgItem(hW,IDC_MCD2), str, 256); + i = ListView_GetSelectionMark(GetDlgItem(mcdDlg, IDC_LIST2)); + data = Mcd2Data; + + i++; + + ptr = data + i * 128; + + Info = &Blocks[mcd-1][i-1]; + + if ((Info->Flags & 0xF0) == 0xA0) { + if ((Info->Flags & 0xF) >= 1 && + (Info->Flags & 0xF) <= 3) { // deleted + *ptr = 0x50 | (Info->Flags & 0xF); + } else return TRUE; + } else if ((Info->Flags & 0xF0) == 0x50) { // used + *ptr = 0xA0 | (Info->Flags & 0xF); + } else { return TRUE; } + + for (j=0; j<127; j++) xor^=*ptr++; + *ptr = xor; + + SaveMcd(str, data, i * 128, 128); + UpdateMcdDlg(); + } + + return TRUE; + + case IDC_MCDSEL1: + Open_Mcd_Proc(hW, 1); + return TRUE; + case IDC_MCDSEL2: + Open_Mcd_Proc(hW, 2); + return TRUE; + case IDC_RELOAD1: + Edit_GetText(GetDlgItem(hW,IDC_MCD1), str, 256); + LoadMcd(1, str); + UpdateMcdDlg(); + return TRUE; + case IDC_RELOAD2: + Edit_GetText(GetDlgItem(hW,IDC_MCD2), str, 256); + LoadMcd(2, str); + UpdateMcdDlg(); + return TRUE; + case IDC_FORMAT1: + if (MessageBox(hW, _("Are you sure you want to format this Memory Card?"), _("Confirmation"), MB_YESNO) == IDNO) return TRUE; + Edit_GetText(GetDlgItem(hW,IDC_MCD1), str, 256); + CreateMcd(str); + LoadMcd(1, str); + UpdateMcdDlg(); + return TRUE; + case IDC_FORMAT2: + if (MessageBox(hW, _("Are you sure you want to format this Memory Card?"), _("Confirmation"), MB_YESNO) == IDNO) return TRUE; + Edit_GetText(GetDlgItem(hW,IDC_MCD2), str, 256); + CreateMcd(str); + LoadMcd(2, str); + UpdateMcdDlg(); + return TRUE; + case IDCANCEL: + LoadMcds(Config.Mcd1, Config.Mcd2); + + EndDialog(hW,FALSE); + + return TRUE; + case IDOK: + Edit_GetText(GetDlgItem(hW,IDC_MCD1), Config.Mcd1, 256); + Edit_GetText(GetDlgItem(hW,IDC_MCD2), Config.Mcd2, 256); + + LoadMcds(Config.Mcd1, Config.Mcd2); + SaveConfig(); + + EndDialog(hW,TRUE); + + return TRUE; + } + case WM_NOTIFY: + switch (wParam) { + case IDC_LIST1: McdListNotify(1, IDC_LIST1, (LPNMHDR)lParam); break; + case IDC_LIST2: McdListNotify(2, IDC_LIST2, (LPNMHDR)lParam); break; + } + return TRUE; + case WM_TIMER: + UpdateMcdIcon(1, IDC_LIST1); + UpdateMcdIcon(2, IDC_LIST2); + return TRUE; + case WM_DESTROY: + DestroyIcon(eICON); + //KillTimer(hW, 1); + return TRUE; + } + return FALSE; +} + +BOOL CALLBACK ConfigureCpuDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + long tmp; + RECT rect; + + switch(uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("Cpu Config")); + + Button_SetText(GetDlgItem(hW,IDOK), _("OK")); + Button_SetText(GetDlgItem(hW,IDCANCEL), _("Cancel")); + + Button_SetText(GetDlgItem(hW,IDC_XA), _("Disable Xa Decoding")); + Button_SetText(GetDlgItem(hW,IDC_SIO), _("Sio Irq Always Enabled")); + Button_SetText(GetDlgItem(hW,IDC_MDEC), _("Black && White Movies")); + Button_SetText(GetDlgItem(hW,IDC_CDDA), _("Disable Cd audio")); + Button_SetText(GetDlgItem(hW,IDC_SLOWBOOT),_("Slow Boot")); + Button_SetText(GetDlgItem(hW,IDC_PSXAUTO), _("Autodetect")); + Button_SetText(GetDlgItem(hW,IDC_CPU), _("Enable Interpreter Cpu")); + Button_SetText(GetDlgItem(hW,IDC_PSXOUT), _("Enable Console Output")); + Button_SetText(GetDlgItem(hW,IDC_DEBUG), _("Enable Debugger")); + Button_SetText(GetDlgItem(hW,IDC_SPUIRQ), _("Spu Irq Always Enabled")); + Button_SetText(GetDlgItem(hW,IDC_RCNTFIX), _("Parasite Eve 2, Vandal Hearts 1/2 Fix")); + Button_SetText(GetDlgItem(hW,IDC_VSYNCWA), _("InuYasha Sengoku Battle Fix")); + Button_SetText(GetDlgItem(hW,IDC_WIDESCREEN), _("Widescreen (GTE Hack)")); + Button_SetText(GetDlgItem(hW,IDC_HIDECURSOR), _("Hide cursor")); + Button_SetText(GetDlgItem(hW,IDC_SAVEWINDOWPOS), _("Save window position")); + Button_SetText(GetDlgItem(hW,IDC_HACKFIX), _("Compatibility hacks (Raystorm/VH-D/MML/Cart World/...)")); + + Static_SetText(GetDlgItem(hW,IDC_MISCOPT), _("Options")); + Static_SetText(GetDlgItem(hW,IDC_SELPSX), _("Psx System Type")); + + Button_SetCheck(GetDlgItem(hW,IDC_XA), Config.Xa); + Button_SetCheck(GetDlgItem(hW,IDC_SIO), Config.SioIrq); + Button_SetCheck(GetDlgItem(hW,IDC_MDEC), Config.Mdec); + Button_SetCheck(GetDlgItem(hW,IDC_CDDA), Config.Cdda); + Button_SetCheck(GetDlgItem(hW,IDC_SLOWBOOT),Config.SlowBoot); + Button_SetCheck(GetDlgItem(hW,IDC_PSXAUTO), Config.PsxAuto); + Button_SetCheck(GetDlgItem(hW,IDC_CPU), (Config.Cpu == CPU_INTERPRETER)); + Button_SetCheck(GetDlgItem(hW,IDC_PSXOUT), Config.PsxOut); + Button_SetCheck(GetDlgItem(hW,IDC_DEBUG), Config.Debug); + Button_SetCheck(GetDlgItem(hW,IDC_SPUIRQ), Config.SpuIrq); + Button_SetCheck(GetDlgItem(hW,IDC_RCNTFIX), Config.RCntFix); + Button_SetCheck(GetDlgItem(hW,IDC_VSYNCWA), Config.VSyncWA); + Button_SetCheck(GetDlgItem(hW,IDC_WIDESCREEN), Config.Widescreen); + Button_SetCheck(GetDlgItem(hW,IDC_HIDECURSOR), Config.HideCursor); + Button_SetCheck(GetDlgItem(hW,IDC_SAVEWINDOWPOS), Config.SaveWindowPos); + Button_SetCheck(GetDlgItem(hW,IDC_HACKFIX), Config.HackFix); + + ComboBox_AddString(GetDlgItem(hW,IDC_PSXTYPES), "NTSC"); + ComboBox_AddString(GetDlgItem(hW,IDC_PSXTYPES), "PAL"); + ComboBox_SetCurSel(GetDlgItem(hW,IDC_PSXTYPES),Config.PsxType); + + if (Config.Cpu == CPU_DYNAREC) { + Config.Debug = 0; + Button_SetCheck(GetDlgItem(hW, IDC_DEBUG), FALSE); + EnableWindow(GetDlgItem(hW, IDC_DEBUG), FALSE); + } + + EnableWindow(GetDlgItem(hW,IDC_PSXTYPES), !Config.PsxAuto); + break; + + case WM_COMMAND: { + switch (LOWORD(wParam)) { + case IDCANCEL: EndDialog(hW, FALSE); return TRUE; + case IDOK: + tmp = ComboBox_GetCurSel(GetDlgItem(hW,IDC_PSXTYPES)); + if (tmp == 0) Config.PsxType = 0; + else Config.PsxType = 1; + + Config.Xa = Button_GetCheck(GetDlgItem(hW,IDC_XA)); + Config.SioIrq = Button_GetCheck(GetDlgItem(hW,IDC_SIO)); + Config.Mdec = Button_GetCheck(GetDlgItem(hW,IDC_MDEC)); + Config.Cdda = Button_GetCheck(GetDlgItem(hW,IDC_CDDA)); + Config.SlowBoot= Button_GetCheck(GetDlgItem(hW,IDC_SLOWBOOT)); + Config.PsxAuto = Button_GetCheck(GetDlgItem(hW,IDC_PSXAUTO)); + tmp = Config.Cpu; + Config.Cpu = (Button_GetCheck(GetDlgItem(hW,IDC_CPU)) ? CPU_INTERPRETER : CPU_DYNAREC); + if (tmp != Config.Cpu) { + psxCpu->Shutdown(); + if (Config.Cpu == CPU_INTERPRETER) psxCpu = &psxInt; + else psxCpu = &psxRec; + if (psxCpu->Init() == -1) { + SysClose(); + exit(1); + } + psxCpu->Reset(); + } + Config.PsxOut = Button_GetCheck(GetDlgItem(hW,IDC_PSXOUT)); + Config.SpuIrq = Button_GetCheck(GetDlgItem(hW,IDC_SPUIRQ)); + Config.RCntFix = Button_GetCheck(GetDlgItem(hW,IDC_RCNTFIX)); + Config.VSyncWA = Button_GetCheck(GetDlgItem(hW,IDC_VSYNCWA)); + Config.Widescreen = Button_GetCheck(GetDlgItem(hW,IDC_WIDESCREEN)); + Config.HideCursor = Button_GetCheck(GetDlgItem(hW,IDC_HIDECURSOR)); + Config.SaveWindowPos = Button_GetCheck(GetDlgItem(hW,IDC_SAVEWINDOWPOS)); + Config.HackFix = Button_GetCheck(GetDlgItem(hW, IDC_HACKFIX)); + + if(Config.SaveWindowPos) { + GetWindowRect(gApp.hWnd, &rect); + Config.WindowPos[0] = rect.left; + Config.WindowPos[1] = rect.top; + } + tmp = Config.Debug; + Config.Debug = Button_GetCheck(GetDlgItem(hW,IDC_DEBUG)); + if (tmp != Config.Debug) { + if (Config.Debug) StartDebugger(); + else StopDebugger(); + } + + SaveConfig(); + + EndDialog(hW,TRUE); + + if (Config.PsxOut) OpenConsole(); + else CloseConsole(); + + return TRUE; + + case IDC_CPU: + if (Button_GetCheck(GetDlgItem(hW,IDC_CPU))) { + EnableWindow(GetDlgItem(hW,IDC_DEBUG), TRUE); + } else { + Button_SetCheck(GetDlgItem(hW,IDC_DEBUG), FALSE); + EnableWindow(GetDlgItem(hW,IDC_DEBUG), FALSE); + } + break; + + case IDC_PSXAUTO: + if (Button_GetCheck(GetDlgItem(hW,IDC_PSXAUTO))) { + EnableWindow(GetDlgItem(hW,IDC_PSXTYPES), FALSE); + } else { + EnableWindow(GetDlgItem(hW,IDC_PSXTYPES), TRUE); + } + break; + } + } + } + return FALSE; +} + +void Open_Mcd_Proc(HWND hW, int mcd) { + OPENFILENAME ofn; + char szFileName[MAXPATHLEN]; + char szFileTitle[MAXPATHLEN]; + char szFilter[1024]; + char *str; + + memset(&szFileName, 0, sizeof(szFileName)); + memset(&szFileTitle, 0, sizeof(szFileTitle)); + memset(&szFilter, 0, sizeof(szFilter)); + + strcpy(szFilter, _("Psx Mcd Format (*.mcr;*.mc;*.mem;*.vgs;*.mcd;*.gme;*.ddf)")); + str = szFilter + strlen(szFilter) + 1; + strcpy(str, "*.mcr;*.mcd;*.mem;*.gme;*.mc;*.ddf"); + + str+= strlen(str) + 1; + strcpy(str, _("Psx Memory Card (*.mcr;*.mc)")); + str+= strlen(str) + 1; + strcpy(str, "*.mcr;0*.mc"); + + str+= strlen(str) + 1; + strcpy(str, _("CVGS Memory Card (*.mem;*.vgs)")); + str+= strlen(str) + 1; + strcpy(str, "*.mem;*.vgs"); + + str+= strlen(str) + 1; + strcpy(str, _("Bleem Memory Card (*.mcd)")); + str+= strlen(str) + 1; + strcpy(str, "*.mcd"); + + str+= strlen(str) + 1; + strcpy(str, _("DexDrive Memory Card (*.gme)")); + str+= strlen(str) + 1; + strcpy(str, "*.gme"); + + str+= strlen(str) + 1; + strcpy(str, _("DataDeck Memory Card (*.ddf)")); + str+= strlen(str) + 1; + strcpy(str, "*.ddf"); + + str+= strlen(str) + 1; + strcpy(str, _("All Files")); + str+= strlen(str) + 1; + strcpy(str, "*.*"); + + ofn.lStructSize = sizeof(OPENFILENAME); + ofn.hwndOwner = hW; + ofn.lpstrFilter = szFilter; + ofn.lpstrCustomFilter = NULL; + ofn.nMaxCustFilter = 0; + ofn.nFilterIndex = 1; + ofn.lpstrFile = szFileName; + ofn.nMaxFile = MAXPATHLEN; + ofn.lpstrInitialDir = "memcards"; + ofn.lpstrFileTitle = szFileTitle; + ofn.nMaxFileTitle = MAXPATHLEN; + ofn.lpstrTitle = NULL; + ofn.lpstrDefExt = "MCR"; + ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR; + + if (GetOpenFileName ((LPOPENFILENAME)&ofn)) { + Edit_SetText(GetDlgItem(hW,mcd == 1 ? IDC_MCD1 : IDC_MCD2), szFileName); + LoadMcd(mcd, szFileName); + UpdateMcdDlg(); + } +} + +int Open_File_Proc(char *file) { + OPENFILENAME ofn; + char szFileName[MAXPATHLEN]; + char szFileTitle[MAXPATHLEN]; + char szFilter[256]; + + memset(&szFileName, 0, sizeof(szFileName)); + memset(&szFileTitle, 0, sizeof(szFileTitle)); + memset(&szFilter, 0, sizeof(szFilter)); + + ofn.lStructSize = sizeof(OPENFILENAME); + ofn.hwndOwner = gApp.hWnd; + + strcpy(szFilter, _("Psx Exe Format")); + strcatz(szFilter, "*.*"); + + ofn.lpstrFilter = szFilter; + ofn.lpstrCustomFilter = NULL; + ofn.nMaxCustFilter = 0; + ofn.nFilterIndex = 1; + ofn.lpstrFile = szFileName; + ofn.nMaxFile = MAXPATHLEN; + ofn.lpstrInitialDir = NULL; + ofn.lpstrFileTitle = szFileTitle; + ofn.nMaxFileTitle = MAXPATHLEN; + ofn.lpstrTitle = NULL; + ofn.lpstrDefExt = "EXE"; + ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR; + + if (GetOpenFileName ((LPOPENFILENAME)&ofn)) { + strcpy(file, szFileName); + return 1; + } else + return 0; +} + +int Open_Iso_Proc(char *file) { + OPENFILENAME ofn; + char szFileName[MAXPATHLEN]; + char szFileTitle[MAXPATHLEN]; + char szFilter[256]; + char *str; + + memset(&szFileName, 0, sizeof(szFileName)); + memset(&szFileTitle, 0, sizeof(szFileTitle)); + memset(&szFilter, 0, sizeof(szFilter)); + + ofn.lStructSize = sizeof(OPENFILENAME); + ofn.hwndOwner = gApp.hWnd; + + strcpy(szFilter, _("Psx Isos (*.iso;*.mdf;*.img;*.bin;*.cue;*.pbp;*.cbn)")); + str = szFilter + strlen(szFilter) + 1; + strcpy(str, "*.iso;*.mdf;*.img;*.bin;*.cue;*.pbp;*.cbn"); + + str += strlen(str) + 1; + strcpy(str, _("All Files")); + str += strlen(str) + 1; + strcpy(str, "*.*"); + + ofn.lpstrFilter = szFilter; + ofn.lpstrCustomFilter = NULL; + ofn.nMaxCustFilter = 0; + ofn.nFilterIndex = 1; + ofn.lpstrFile = szFileName; + ofn.nMaxFile = MAXPATHLEN; + ofn.lpstrInitialDir = NULL; + ofn.lpstrFileTitle = szFileTitle; + ofn.nMaxFileTitle = MAXPATHLEN; + ofn.lpstrTitle = NULL; + ofn.lpstrDefExt = "ISO"; + ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR; + + if (GetOpenFileName ((LPOPENFILENAME)&ofn)) { + strcpy(file, szFileName); + return 1; + } else + return 0; +} + +#define _ADDSUBMENU(menu, menun, string) \ + submenu[menun] = CreatePopupMenu(); \ + AppendMenu(menu, MF_STRING | MF_POPUP, (UINT)submenu[menun], string); + +#define ADDSUBMENU(menun, string) \ + _ADDSUBMENU(gApp.hMenu, menun, string); + +#define ADDSUBMENUS(submn, menun, string) \ + submenu[menun] = CreatePopupMenu(); \ + InsertMenu(submenu[submn], 0, MF_BYPOSITION | MF_STRING | MF_POPUP, (UINT)submenu[menun], string); + +#define ADDMENUITEM(menun, string, id) \ + item.fType = MFT_STRING; \ + item.fMask = MIIM_STATE | MIIM_TYPE | MIIM_ID; \ + item.fState = MFS_ENABLED; \ + item.wID = id; \ + sprintf(buf, string); \ + InsertMenuItem(submenu[menun], 0, TRUE, &item); + +#define ADDMENUITEMC(menun, string, id) \ + item.fType = MFT_STRING; \ + item.fMask = MIIM_STATE | MIIM_TYPE | MIIM_ID; \ + item.fState = MFS_ENABLED | MFS_CHECKED; \ + item.wID = id; \ + sprintf(buf, string); \ + InsertMenuItem(submenu[menun], 0, TRUE, &item); + +#define ADDSEPARATOR(menun) \ + item.fMask = MIIM_TYPE; \ + item.fType = MFT_SEPARATOR; \ + InsertMenuItem(submenu[menun], 0, TRUE, &item); + +void CreateMainMenu() { + MENUITEMINFO item; + HMENU submenu[256]; + char buf[256]; +#ifdef ENABLE_NLS + char *lang; + int i; +#endif + + item.cbSize = sizeof(MENUITEMINFO); + item.dwTypeData = buf; + item.cch = 256; + + gApp.hMenu = CreateMenu(); + + ADDSUBMENU(0, _("&File")); + ADDMENUITEM(0, _("E&xit"), ID_FILE_EXIT); + ADDSEPARATOR(0); + ADDMENUITEM(0, _("Run &EXE..."), ID_FILE_RUN_EXE); + ADDMENUITEM(0, _("Run &BIOS"), ID_FILE_RUNBIOS); + ADDMENUITEM(0, _("Run &ISO..."), ID_FILE_RUN_ISO); + ADDMENUITEM(0, _("Run &CD"), ID_FILE_RUN_CD); + + ADDSUBMENU(0, _("&Emulator")); + ADDSUBMENUS(0, 1, _("&States")); + ADDSEPARATOR(0); + ADDMENUITEM(0, _("S&witch ISO..."), ID_EMULATOR_SWITCH_ISO); + ADDSEPARATOR(0); + ADDMENUITEM(0, _("S&hutdown"), ID_EMULATOR_SHUTDOWN); + ADDMENUITEM(0, _("Re&set"), ID_EMULATOR_RESET); + ADDMENUITEM(0, _("&Run"), ID_EMULATOR_RUN); + ADDSUBMENUS(1, 3, _("&Save")); + ADDSUBMENUS(1, 2, _("&Load")); + ADDMENUITEM(2, _("&Other..."), ID_FILE_STATES_LOAD_OTHER); + ADDMENUITEM(2, _("Slot &9"), ID_FILE_STATES_LOAD_SLOT9); + ADDMENUITEM(2, _("Slot &8"), ID_FILE_STATES_LOAD_SLOT8); + ADDMENUITEM(2, _("Slot &7"), ID_FILE_STATES_LOAD_SLOT7); + ADDMENUITEM(2, _("Slot &6"), ID_FILE_STATES_LOAD_SLOT6); + ADDMENUITEM(2, _("Slot &5"), ID_FILE_STATES_LOAD_SLOT5); + ADDMENUITEM(2, _("Slot &4"), ID_FILE_STATES_LOAD_SLOT4); + ADDMENUITEM(2, _("Slot &3"), ID_FILE_STATES_LOAD_SLOT3); + ADDMENUITEM(2, _("Slot &2"), ID_FILE_STATES_LOAD_SLOT2); + ADDMENUITEM(2, _("Slot &1"), ID_FILE_STATES_LOAD_SLOT1); + ADDMENUITEM(3, _("&Other..."), ID_FILE_STATES_SAVE_OTHER); + ADDMENUITEM(3, _("Slot &9"), ID_FILE_STATES_SAVE_SLOT9); + ADDMENUITEM(3, _("Slot &8"), ID_FILE_STATES_SAVE_SLOT8); + ADDMENUITEM(3, _("Slot &7"), ID_FILE_STATES_SAVE_SLOT7); + ADDMENUITEM(3, _("Slot &6"), ID_FILE_STATES_SAVE_SLOT6); + ADDMENUITEM(3, _("Slot &5"), ID_FILE_STATES_SAVE_SLOT5); + ADDMENUITEM(3, _("Slot &4"), ID_FILE_STATES_SAVE_SLOT4); + ADDMENUITEM(3, _("Slot &3"), ID_FILE_STATES_SAVE_SLOT3); + ADDMENUITEM(3, _("Slot &2"), ID_FILE_STATES_SAVE_SLOT2); + ADDMENUITEM(3, _("Slot &1"), ID_FILE_STATES_SAVE_SLOT1); + + ADDSUBMENU(0, _("&Configuration")); + ADDMENUITEM(0, _("Cheat &Search..."), ID_CONFIGURATION_CHEATSEARCH); + ADDMENUITEM(0, _("Ch&eat Code..."), ID_CONFIGURATION_CHEATLIST); + ADDSEPARATOR(0); +#ifdef ENABLE_NLS + ADDSUBMENUS(0, 1, _("&Language")); + + if (langs) free(langs); + langs = (_langs*)malloc(sizeof(_langs)); + strcpy(langs[0].lang, "English"); + InitLanguages(); i=1; + while ((lang = GetLanguageNext()) != NULL) { + langs = (_langs*)realloc(langs, sizeof(_langs)*(i+1)); + strcpy(langs[i].lang, lang); + if (!strcmp(Config.Lang, lang)) { + ADDMENUITEMC(1, ParseLang(langs[i].lang), ID_LANGS + i); + } else { + ADDMENUITEM(1, ParseLang(langs[i].lang), ID_LANGS + i); + } + i++; + } + CloseLanguages(); + langsMax = i; + if (!strcmp(Config.Lang, "English")) { + ADDMENUITEMC(1, _("English"), ID_LANGS); + } else { + ADDMENUITEM(1, _("English"), ID_LANGS); + } + ADDSEPARATOR(0); +#endif + ADDMENUITEM(0, _("&Memory cards..."), ID_CONFIGURATION_MEMORYCARDMANAGER); + ADDMENUITEM(0, _("C&PU..."), ID_CONFIGURATION_CPU); + ADDSEPARATOR(0); + ADDMENUITEM(0, _("&NetPlay..."), ID_CONFIGURATION_NETPLAY); + ADDSEPARATOR(0); + ADDMENUITEM(0, _("&Link cable..."), ID_CONFIGURATION_LINKCABLE); + ADDMENUITEM(0, _("&Controllers..."), ID_CONFIGURATION_CONTROLLERS); + ADDMENUITEM(0, _("CD-&ROM..."), ID_CONFIGURATION_CDROM); + ADDMENUITEM(0, _("&Sound..."), ID_CONFIGURATION_SOUND); + ADDMENUITEM(0, _("&Graphics..."), ID_CONFIGURATION_GRAPHICS); + ADDSEPARATOR(0); + ADDMENUITEM(0, _("&Plugins && Bios..."), ID_CONFIGURATION); + + ADDSUBMENU(0, _("&Help")); + ADDMENUITEM(0, _("&About..."), ID_HELP_ABOUT); + + UpdateMenuItems(); +} + +void CreateMainWindow(int nCmdShow) { + WNDCLASS wc; + HWND hWnd; + + wc.lpszClassName = "PCSXR Main"; + wc.lpfnWndProc = MainWndProc; + wc.style = 0; + wc.hInstance = gApp.hInstance; + wc.hIcon = LoadIcon(gApp.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); + wc.hCursor = NULL; + wc.hbrBackground = (HBRUSH)(COLOR_MENUTEXT); + wc.lpszMenuName = 0; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + + RegisterClass(&wc); + + hWnd = CreateWindow("PCSXR Main", + "PCSXR", + WS_CAPTION | WS_POPUPWINDOW | WS_MINIMIZEBOX, + CW_USEDEFAULT, + 0, + 360, + 248, + NULL, + NULL, + gApp.hInstance, + NULL); + + gApp.hWnd = hWnd; + + CreateMainMenu(); + SetMenu(gApp.hWnd, gApp.hMenu); + + if(Config.SaveWindowPos) + SetWindowPos(hWnd, 0, Config.WindowPos[0], Config.WindowPos[1], 0, 0, SWP_NOSIZE | SWP_NOZORDER); + + ShowWindow(hWnd, nCmdShow); +} + +#ifdef ENABLE_NLS + +WIN32_FIND_DATA lFindData; +HANDLE lFind; +int lFirst; + +void InitLanguages() { + lFind = FindFirstFile("Langs\\*", &lFindData); + lFirst = 1; +} + +char *GetLanguageNext() { + if (lFind == INVALID_HANDLE_VALUE) + return NULL; + + for (;;) { + if (lFirst == 0) { + if (FindNextFile(lFind, &lFindData) == FALSE) + return NULL; + } + else + lFirst = 0; + + if (!strcmp(lFindData.cFileName, ".") || + !strcmp(lFindData.cFileName, "..")) + continue; + break; + } + + return lFindData.cFileName; +} + +void CloseLanguages() { + if (lFind != INVALID_HANDLE_VALUE) FindClose(lFind); +} + +void ChangeLanguage(char *lang) { + strcpy(Config.Lang, lang); + SaveConfig(); + LoadConfig(); +} + +#endif + +int SysInit() { + if (Config.PsxOut) OpenConsole(); + + if (EmuInit() == -1) return -1; + +#ifdef EMU_LOG + emuLog = fopen("emuLog.txt","w"); + setvbuf(emuLog, NULL, _IONBF, 0); +#endif + + while (LoadPlugins(0) == -1) { + CancelQuit = 1; + ConfigurePlugins(gApp.hWnd); + CancelQuit = 0; + } + LoadMcds(Config.Mcd1, Config.Mcd2); + + if (Config.Debug) StartDebugger(); + + return 0; +} + +void SysReset() { + EmuReset(); +} + +void SysClose() { + EmuShutdown(); + ReleasePlugins(); + + StopDebugger(); + + if (Config.PsxOut) CloseConsole(); + + if (emuLog != NULL) fclose(emuLog); +} + +void SysPrintf(const char *fmt, ...) { + va_list list; + char msg[512]; + DWORD tmp; + + if (!hConsole) return; + + va_start(list,fmt); + vsprintf(msg,fmt,list); + va_end(list); + + WriteConsole(hConsole, msg, (DWORD)strlen(msg), &tmp, 0); +#ifdef EMU_LOG +#ifndef LOG_STDOUT + if (emuLog != NULL) fprintf(emuLog, "%s", msg); +#endif +#endif +} + +void SysMessage(const char *fmt, ...) { + va_list list; + char tmp[512]; + + va_start(list,fmt); + vsprintf(tmp,fmt,list); + va_end(list); + MessageBox(0, tmp, _("Pcsxr Msg"), 0); +} + +static char *err = N_("Error Loading Symbol"); +static int errval; + +void *SysLoadLibrary(const char *lib) { + return LoadLibrary(lib); +} + +void *SysLoadSym(void *lib, const char *sym) { + void *tmp = GetProcAddress((HINSTANCE)lib, sym); + if (tmp == NULL) errval = 1; + else errval = 0; + return tmp; +} + +const char *SysLibError() { + if (errval) { errval = 0; return err; } + return NULL; +} + +void SysCloseLibrary(void *lib) { + FreeLibrary((HINSTANCE)lib); +} + +void SysUpdate() { + MSG msg; + + while (PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE)) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } +} + +void SysRunGui() { + RestoreWindow(); + RunGui(); +} + +void UpdateMenuItems() { + if (CdromId[0] != '\0') { // Emulating... + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_NETPLAY, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_LINKCABLE, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_CONTROLLERS, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_CDROM, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_SOUND, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_GRAPHICS, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION, MF_BYCOMMAND | MF_GRAYED); + if (!UsingIso()) { + EnableMenuItem(gApp.hMenu, ID_EMULATOR_SWITCH_ISO, MF_BYCOMMAND | MF_GRAYED); + } + + ResetMenuSlots(); + } else { // GUI... + EnableMenuItem(gApp.hMenu, ID_EMULATOR_RESET, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_EMULATOR_RUN, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_EMULATOR_SHUTDOWN, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_EMULATOR_SWITCH_ISO, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_SLOT1, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_SLOT2, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_SLOT3, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_SLOT4, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_SLOT5, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_SLOT6, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_SLOT7, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_SLOT8, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_SLOT9, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_OTHER, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_SAVE_SLOT1, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_SAVE_SLOT2, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_SAVE_SLOT3, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_SAVE_SLOT4, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_SAVE_SLOT5, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_SAVE_SLOT6, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_SAVE_SLOT7, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_SAVE_SLOT8, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_SAVE_SLOT9, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_SAVE_OTHER, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_CHEATSEARCH, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_NETPLAY, MF_BYCOMMAND | MF_ENABLED); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_LINKCABLE, MF_BYCOMMAND | MF_ENABLED); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_CONTROLLERS, MF_BYCOMMAND | MF_ENABLED); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_CDROM, MF_BYCOMMAND | ( Config.Cdr[0] != '\0' ? MF_ENABLED : MF_GRAYED )); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_SOUND, MF_BYCOMMAND | MF_ENABLED); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_GRAPHICS, MF_BYCOMMAND | MF_ENABLED); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION, MF_BYCOMMAND | MF_ENABLED); + } + +#ifndef ENABLE_SIO1API + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_LINKCABLE, MF_BYCOMMAND | MF_GRAYED); +#endif +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/intl/bindtextdom.c pcsxr-unstable-1.9.94+svn98108/win32/intl/bindtextdom.c --- pcsxr-unstable-1.9.94+svn97809/win32/intl/bindtextdom.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/intl/bindtextdom.c 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,245 @@ +/* Implementation of the bindtextdomain(3) function + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#include "intlconfig.h" + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif + +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif +#include "gettext.h" +#include "gettextP.h" + +/* @@ end of prolog @@ */ + +/* Contains the default location of the message catalogs. */ +extern const char _nl_default_dirname[]; + +/* List with bindings of specific domains. */ +extern struct binding *_nl_domain_bindings; + + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define BINDTEXTDOMAIN __bindtextdomain +# ifndef strdup +# define strdup(str) __strdup (str) +# endif +#else +# define BINDTEXTDOMAIN bindtextdomain__ +#endif + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +char * +BINDTEXTDOMAIN (domainname, dirname_IN) /* FRANCO */ + const char *domainname; + const char *dirname_IN; +{ + struct binding *binding; + /*FRANCO*/ + char *dirname_MOD,*pos; + const char *dirname; + size_t len; + dirname_MOD=NULL; + pos=NULL; + dirname=dirname_IN; + len=strlen(dirname); + if((len>0) && (pos=strchr(dirname,'\\'))){ /* SUBST DOS LIKE \ into UNIX like / */ +#if defined _LIBC || defined HAVE_STRDUP + dirname_MOD = strdup (dirname); + if (dirname_MOD == NULL) + return NULL; +#else + size_t len1 = strlen (dirname) + 1; + dirname_MOD = (char *) malloc (len1); + if (dirname_MOD == NULL) + return NULL; + memcpy (dirname_MOD, dirname, len1); +#endif + dirname=dirname_MOD; + pos=dirname_MOD; + while( pos=strchr(pos,'\\')){ + *pos='/'; + } + }/*FRANCO END*/ + + /* Some sanity checks. */ + if (domainname == NULL || domainname[0] == '\0'){ + if(dirname_MOD)free(dirname_MOD); /*FRANCO*/ + return NULL; + } + + for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) + { + int compare = strcmp (domainname, binding->domainname); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It is not in the list. */ + binding = NULL; + break; + } + } + + if (dirname == NULL) + /* The current binding has be to returned. */ + return binding == NULL ? (char *) _nl_default_dirname : binding->dirname; + + if (binding != NULL) + { + /* The domain is already bound. If the new value and the old + one are equal we simply do nothing. Otherwise replace the + old binding. */ + if (strcmp (dirname, binding->dirname) != 0) + { + char *new_dirname; + + if (strcmp (dirname, _nl_default_dirname) == 0) + new_dirname = (char *) _nl_default_dirname; + else + { +#if defined _LIBC || defined HAVE_STRDUP + new_dirname = strdup (dirname); + if (new_dirname == NULL){ + if(dirname_MOD)free(dirname_MOD); /*FRANCO*/ + return NULL; + } +#else + size_t len = strlen (dirname) + 1; + new_dirname = (char *) malloc (len); + if (new_dirname == NULL){ + if(dirname_MOD)free(dirname_MOD); /*FRANCO*/ + return NULL; + } + + memcpy (new_dirname, dirname, len); +#endif + } + + if (binding->dirname != _nl_default_dirname) + free (binding->dirname); + + binding->dirname = new_dirname; + } + } + else + { + /* We have to create a new binding. */ +#if !defined _LIBC && !defined HAVE_STRDUP + size_t len; +#endif + struct binding *new_binding = + (struct binding *) malloc (sizeof (*new_binding)); + + if (new_binding == NULL){ + if(dirname_MOD)free(dirname_MOD); /*FRANCO*/ + return NULL; + } + +#if defined _LIBC || defined HAVE_STRDUP + new_binding->domainname = strdup (domainname); + if (new_binding->domainname == NULL){ + if(dirname_MOD)free(dirname_MOD); /*FRANCO*/ + return NULL; + } +#else + len = strlen (domainname) + 1; + new_binding->domainname = (char *) malloc (len); + if (new_binding->domainname == NULL){ + if(dirname_MOD)free(dirname_MOD); /*FRANCO*/ + return NULL; + } + memcpy (new_binding->domainname, domainname, len); +#endif + + if (strcmp (dirname, _nl_default_dirname) == 0) + new_binding->dirname = (char *) _nl_default_dirname; + else + { +#if defined _LIBC || defined HAVE_STRDUP + new_binding->dirname = strdup (dirname); + if (new_binding->dirname == NULL){ + if(dirname_MOD)free(dirname_MOD); /*FRANCO*/ + return NULL; + } +#else + len = strlen (dirname) + 1; + new_binding->dirname = (char *) malloc (len); + if (new_binding->dirname == NULL){ + if(dirname_MOD)free(dirname_MOD); /*FRANCO*/ + return NULL; + } + memcpy (new_binding->dirname, dirname, len); +#endif + } + + /* Now enqueue it. */ + if (_nl_domain_bindings == NULL + || strcmp (domainname, _nl_domain_bindings->domainname) < 0) + { + new_binding->next = _nl_domain_bindings; + _nl_domain_bindings = new_binding; + } + else + { + binding = _nl_domain_bindings; + while (binding->next != NULL + && strcmp (domainname, binding->next->domainname) > 0) + binding = binding->next; + + new_binding->next = binding->next; + binding->next = new_binding; + } + + binding = new_binding; + } + + if(dirname_MOD)free(dirname_MOD); /*FRANCO*/ + + return binding->dirname; +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__bindtextdomain, bindtextdomain); +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/intl/dcgettext.c pcsxr-unstable-1.9.94+svn98108/win32/intl/dcgettext.c --- pcsxr-unstable-1.9.94+svn97809/win32/intl/dcgettext.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/intl/dcgettext.c 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,622 @@ +/* Implementation of the dcgettext(3) function. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#include "intlconfig.h" + +#include + +#ifdef __GNUC__ +# define alloca __builtin_alloca +# define HAVE_ALLOCA 1 +#else +# if defined HAVE_ALLOCA_H || defined _LIBC +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca +char *alloca (); +# endif +# endif +# endif +#endif + +#include +#ifndef errno +extern int errno; +#endif +#ifndef __set_errno +# define __set_errno(val) errno = (val) +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +char *getenv (); +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# include +#else +# include +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#if defined HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#include "gettext.h" +#include "gettextP.h" +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif +#include "hash-string.h" + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ +# define getcwd __getcwd +# ifndef stpcpy +# define stpcpy __stpcpy +# endif +#else +# if !defined HAVE_GETCWD +char *getwd (); +# define getcwd(buf, max) getwd (buf) +# else +char *getcwd (); +# endif +# ifndef HAVE_STPCPY +static char *stpcpy PARAMS ((char *dest, const char *src)); +# endif +#endif + +/* Amount to increase buffer size by in each try. */ +#define PATH_INCR 32 + +/* The following is from pathmax.h. */ +/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define + PATH_MAX but might cause redefinition warnings when sys/param.h is + later included (as on MORE/BSD 4.3). */ +#if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__)) +# include +#endif + +#ifndef _POSIX_PATH_MAX +# define _POSIX_PATH_MAX 255 +#endif + +#if !defined(PATH_MAX) && defined(_PC_PATH_MAX) +# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX)) +#endif + +/* Don't include sys/param.h if it already has been. */ +#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN) +# include +#endif + +#if !defined(PATH_MAX) && defined(MAXPATHLEN) +# define PATH_MAX MAXPATHLEN +#endif + +#ifndef PATH_MAX +# define PATH_MAX _POSIX_PATH_MAX +#endif + +/* XPG3 defines the result of `setlocale (category, NULL)' as: + ``Directs `setlocale()' to query `category' and return the current + setting of `local'.'' + However it does not specify the exact format. And even worse: POSIX + defines this not at all. So we can use this feature only on selected + system (e.g. those using GNU C Library). */ +#ifdef _LIBC +# define HAVE_LOCALE_NULL +#endif + +/* Name of the default domain used for gettext(3) prior any call to + textdomain(3). The default value for this is "messages". */ +const char _nl_default_default_domain[] = "messages"; + +/* Value used as the default domain for gettext(3). */ +const char *_nl_current_default_domain = _nl_default_default_domain; + +/* Contains the default location of the message catalogs. */ +const char _nl_default_dirname[] = GNULOCALEDIR; + +/* List with bindings of specific domains created by bindtextdomain() + calls. */ +struct binding *_nl_domain_bindings; + +/* Prototypes for local functions. */ +static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file, + const char *msgid)) internal_function; +static const char *category_to_name PARAMS ((int category)) internal_function; +static const char *guess_category_value PARAMS ((int category, + const char *categoryname)) + internal_function; + + +/* For those loosing systems which don't have `alloca' we have to add + some additional code emulating it. */ +#ifdef HAVE_ALLOCA +/* Nothing has to be done. */ +# define ADD_BLOCK(list, address) /* nothing */ +# define FREE_BLOCKS(list) /* nothing */ +#else +struct block_list +{ + void *address; + struct block_list *next; +}; +# define ADD_BLOCK(list, addr) \ + do { \ + struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ + /* If we cannot get a free block we cannot add the new element to \ + the list. */ \ + if (newp != NULL) { \ + newp->address = (addr); \ + newp->next = (list); \ + (list) = newp; \ + } \ + } while (0) +# define FREE_BLOCKS(list) \ + do { \ + while (list != NULL) { \ + struct block_list *old = list; \ + list = list->next; \ + free (old); \ + } \ + } while (0) +# undef alloca +# define alloca(size) (malloc (size)) +#endif /* have alloca */ + + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define DCGETTEXT __dcgettext +#else +# define DCGETTEXT dcgettext__ +#endif + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +char * +DCGETTEXT (domainname, msgid, category) + const char *domainname; + const char *msgid; + int category; +{ +#ifndef HAVE_ALLOCA + struct block_list *block_list = NULL; +#endif + struct loaded_l10nfile *domain; + struct binding *binding; + const char *categoryname; + const char *categoryvalue; + char *dirname, *xdomainname; + char *single_locale; + char *retval; + int saved_errno = errno; + + /* If no real MSGID is given return NULL. */ + if (msgid == NULL) + return NULL; + + /* If DOMAINNAME is NULL, we are interested in the default domain. If + CATEGORY is not LC_MESSAGES this might not make much sense but the + defintion left this undefined. */ + if (domainname == NULL) + domainname = _nl_current_default_domain; + + /* First find matching binding. */ + for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) + { + int compare = strcmp (domainname, binding->domainname); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It is not in the list. */ + binding = NULL; + break; + } + } + + if (binding == NULL) + dirname = (char *) _nl_default_dirname; + else if (binding->dirname[0] == '/' || binding->dirname[1] == ':' ) /*FRANCO f�r win32*/ + dirname = binding->dirname; + else + { + /* We have a relative path. Make it absolute now. */ + size_t dirname_len = strlen (binding->dirname) + 1; + size_t path_max; + char *ret; + + path_max = (unsigned) PATH_MAX; + path_max += 2; /* The getcwd docs say to do this. */ + + dirname = (char *) alloca (path_max + dirname_len); + ADD_BLOCK (block_list, dirname); + + __set_errno (0); + while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE) + { + path_max += PATH_INCR; + dirname = (char *) alloca (path_max + dirname_len); + ADD_BLOCK (block_list, dirname); + __set_errno (0); + } + + if (ret == NULL) + { + /* We cannot get the current working directory. Don't signal an + error but simply return the default string. */ + FREE_BLOCKS (block_list); + __set_errno (saved_errno); + return (char *) msgid; + } + + stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname); + } + + /* Now determine the symbolic name of CATEGORY and its value. */ + categoryname = category_to_name (category); + categoryvalue = guess_category_value (category, categoryname); + + xdomainname = (char *) alloca (strlen (categoryname) + + strlen (domainname) + 5); + ADD_BLOCK (block_list, xdomainname); + + stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"), + domainname), + ".mo"); + + /* Creating working area. */ + single_locale = (char *) alloca (strlen (categoryvalue) + 1); + ADD_BLOCK (block_list, single_locale); + + + /* Search for the given string. This is a loop because we perhaps + got an ordered list of languages to consider for th translation. */ + while (1) + { + /* Make CATEGORYVALUE point to the next element of the list. */ + while (categoryvalue[0] != '\0' && categoryvalue[0] == ';') /* FRANCO changed : to ; */ + ++categoryvalue; + if (categoryvalue[0] == '\0') + { + /* The whole contents of CATEGORYVALUE has been searched but + no valid entry has been found. We solve this situation + by implicitly appending a "C" entry, i.e. no translation + will take place. */ + single_locale[0] = 'C'; + single_locale[1] = '\0'; + } + else + { + char *cp = single_locale; + while (categoryvalue[0] != '\0' && categoryvalue[0] != ';')/* FRANCO changed : to ; */ + *cp++ = *categoryvalue++; + *cp = '\0'; + } + + /* If the current locale value is C (or POSIX) we don't load a + domain. Return the MSGID. */ + if (strcmp (single_locale, "C") == 0 + || strcmp (single_locale, "POSIX") == 0) + { + FREE_BLOCKS (block_list); + __set_errno (saved_errno); + return (char *) msgid; + } + + + /* Find structure describing the message catalog matching the + DOMAINNAME and CATEGORY. */ + domain = _nl_find_domain (dirname, single_locale, xdomainname); + + if (domain != NULL) + { + retval = find_msg (domain, msgid); + + if (retval == NULL) + { + int cnt; + + for (cnt = 0; domain->successor[cnt] != NULL; ++cnt) + { + retval = find_msg (domain->successor[cnt], msgid); + + if (retval != NULL) + break; + } + } + + if (retval != NULL) + { + FREE_BLOCKS (block_list); + __set_errno (saved_errno); + return retval; + } + } + } + /* NOTREACHED */ +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__dcgettext, dcgettext); +#endif + + +static char * +internal_function +find_msg (domain_file, msgid) + struct loaded_l10nfile *domain_file; + const char *msgid; +{ + size_t top, act, bottom; + struct loaded_domain *domain; + + if (domain_file->decided == 0) + _nl_load_domain (domain_file); + + if (domain_file->data == NULL) + return NULL; + + domain = (struct loaded_domain *) domain_file->data; + + /* Locate the MSGID and its translation. */ + if (domain->hash_size > 2 && domain->hash_tab != NULL) + { + /* Use the hashing table. */ + nls_uint32 len = strlen (msgid); + nls_uint32 hash_val = hash_string (msgid); + nls_uint32 idx = hash_val % domain->hash_size; + nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); + nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]); + + if (nstr == 0) + /* Hash table entry is empty. */ + return NULL; + + if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len + && strcmp (msgid, + domain->data + W (domain->must_swap, + domain->orig_tab[nstr - 1].offset)) == 0) + return (char *) domain->data + W (domain->must_swap, + domain->trans_tab[nstr - 1].offset); + + while (1) + { + if (idx >= domain->hash_size - incr) + idx -= domain->hash_size - incr; + else + idx += incr; + + nstr = W (domain->must_swap, domain->hash_tab[idx]); + if (nstr == 0) + /* Hash table entry is empty. */ + return NULL; + + if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len + && strcmp (msgid, + domain->data + W (domain->must_swap, + domain->orig_tab[nstr - 1].offset)) + == 0) + return (char *) domain->data + + W (domain->must_swap, domain->trans_tab[nstr - 1].offset); + } + /* NOTREACHED */ + } + + /* Now we try the default method: binary search in the sorted + array of messages. */ + bottom = 0; + top = domain->nstrings; + while (bottom < top) + { + int cmp_val; + + act = (bottom + top) / 2; + cmp_val = strcmp (msgid, domain->data + + W (domain->must_swap, + domain->orig_tab[act].offset)); + if (cmp_val < 0) + top = act; + else if (cmp_val > 0) + bottom = act + 1; + else + break; + } + + /* If an translation is found return this. */ + return bottom >= top ? NULL : (char *) domain->data + + W (domain->must_swap, + domain->trans_tab[act].offset); +} + + +/* Return string representation of locale CATEGORY. */ +static const char * +internal_function +category_to_name (category) + int category; +{ + const char *retval; + + switch (category) + { +#ifdef LC_COLLATE + case LC_COLLATE: + retval = "LC_COLLATE"; + break; +#endif +#ifdef LC_CTYPE + case LC_CTYPE: + retval = "LC_CTYPE"; + break; +#endif +#ifdef LC_MONETARY + case LC_MONETARY: + retval = "LC_MONETARY"; + break; +#endif +#ifdef LC_NUMERIC + case LC_NUMERIC: + retval = "LC_NUMERIC"; + break; +#endif +#ifdef LC_TIME + case LC_TIME: + retval = "LC_TIME"; + break; +#endif +#ifdef LC_MESSAGES + case LC_MESSAGES: + retval = "LC_MESSAGES"; + break; +#endif +#ifdef LC_RESPONSE + case LC_RESPONSE: + retval = "LC_RESPONSE"; + break; +#endif +#ifdef LC_ALL + case LC_ALL: + /* This might not make sense but is perhaps better than any other + value. */ + retval = "LC_ALL"; + break; +#endif + default: + /* If you have a better idea for a default value let me know. */ + retval = "LC_XXX"; + } + + return retval; +} + +/* Guess value of current locale from value of the environment variables. */ +static const char * +internal_function +guess_category_value (category, categoryname) + int category; + const char *categoryname; +{ + const char *retval; + + /* The highest priority value is the `LANGUAGE' environment + variable. This is a GNU extension. */ + retval = getenv ("LANGUAGE"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* `LANGUAGE' is not set. So we have to proceed with the POSIX + methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some + systems this can be done by the `setlocale' function itself. */ +#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL + return setlocale (category, NULL); +#else + /* Setting of LC_ALL overwrites all other. */ + retval = getenv ("LC_ALL"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* Next comes the name of the desired category. */ + retval = getenv (categoryname); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* Last possibility is the LANG environment variable. */ + retval = getenv ("LANG"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* We use C as the default domain. POSIX says this is implementation + defined. */ + return "C"; +#endif +} + +/* @@ begin of epilog @@ */ + +/* We don't want libintl.a to depend on any other library. So we + avoid the non-standard function stpcpy. In GNU C Library this + function is available, though. Also allow the symbol HAVE_STPCPY + to be defined. */ +#if !_LIBC && !HAVE_STPCPY +static char * +stpcpy (dest, src) + char *dest; + const char *src; +{ + while ((*dest++ = *src++) != '\0') + /* Do nothing. */ ; + return dest - 1; +} +#endif + + +#ifdef _LIBC +/* If we want to free all resources we have to do some work at + program's end. */ +static void __attribute__ ((unused)) +free_mem (void) +{ + struct binding *runp; + + for (runp = _nl_domain_bindings; runp != NULL; runp = runp->next) + { + free (runp->domainname); + if (runp->dirname != _nl_default_dirname) + /* Yes, this is a pointer comparison. */ + free (runp->dirname); + } + + if (_nl_current_default_domain != _nl_default_default_domain) + /* Yes, again a pointer comparison. */ + free ((char *) _nl_current_default_domain); +} + +text_set_element (__libc_subfreeres, free_mem); +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/intl/dgettext.c pcsxr-unstable-1.9.94+svn98108/win32/intl/dgettext.c --- pcsxr-unstable-1.9.94+svn97809/win32/intl/dgettext.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/intl/dgettext.c 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,57 @@ +/* Implementation of the dgettext(3) function + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#include + +#if defined HAVE_LOCALE_H || defined _LIBC +# include +#endif + +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif + +/* @@ end of prolog @@ */ + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define DGETTEXT __dgettext +# define DCGETTEXT __dcgettext +#else +# define DGETTEXT dgettext__ +# define DCGETTEXT dcgettext__ +#endif + +/* Look up MSGID in the DOMAINNAME message catalog of the current + LC_MESSAGES locale. */ +char * +DGETTEXT (domainname, msgid) + const char *domainname; + const char *msgid; +{ + return DCGETTEXT (domainname, msgid, LC_MESSAGES); +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__dgettext, dgettext); +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/intl/explodename.c pcsxr-unstable-1.9.94+svn98108/win32/intl/explodename.c --- pcsxr-unstable-1.9.94+svn97809/win32/intl/explodename.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/intl/explodename.c 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,186 @@ +/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Contributed by Ulrich Drepper , 1995. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#include "intlconfig.h" + +#if defined STDC_HEADERS || defined _LIBC +# include +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# include +#else +# include +#endif +#include + +#include "loadinfo.h" + +/* On some strange systems still no definition of NULL is found. Sigh! */ +#ifndef NULL +# if defined __STDC__ && __STDC__ +# define NULL ((void *) 0) +# else +# define NULL 0 +# endif +#endif + +/* @@ end of prolog @@ */ + +int +_nl_explode_name (name, language, modifier, territory, codeset, + normalized_codeset, special, sponsor, revision) + char *name; + const char **language; + const char **modifier; + const char **territory; + const char **codeset; + const char **normalized_codeset; + const char **special; + const char **sponsor; + const char **revision; +{ + enum { undecided, xpg, cen } syntax; + char *cp; + int mask; + + *modifier = NULL; + *territory = NULL; + *codeset = NULL; + *normalized_codeset = NULL; + *special = NULL; + *sponsor = NULL; + *revision = NULL; + + /* Now we determine the single parts of the locale name. First + look for the language. Termination symbols are `_' and `@' if + we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ + mask = 0; + syntax = undecided; + *language = cp = name; + while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@' + && cp[0] != '+' && cp[0] != ',') + ++cp; + + if (*language == cp) + /* This does not make sense: language has to be specified. Use + this entry as it is without exploding. Perhaps it is an alias. */ + cp = strchr (*language, '\0'); + else if (cp[0] == '_') + { + /* Next is the territory. */ + cp[0] = '\0'; + *territory = ++cp; + + while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@' + && cp[0] != '+' && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= TERRITORY; + + if (cp[0] == '.') + { + /* Next is the codeset. */ + syntax = xpg; + cp[0] = '\0'; + *codeset = ++cp; + + while (cp[0] != '\0' && cp[0] != '@') + ++cp; + + mask |= XPG_CODESET; + + if (*codeset != cp && (*codeset)[0] != '\0') + { + *normalized_codeset = _nl_normalize_codeset (*codeset, + cp - *codeset); + if (strcmp (*codeset, *normalized_codeset) == 0) + free ((char *) *normalized_codeset); + else + mask |= XPG_NORM_CODESET; + } + } + } + + if (cp[0] == '@' || (syntax != xpg && cp[0] == '+')) + { + /* Next is the modifier. */ + syntax = cp[0] == '@' ? xpg : cen; + cp[0] = '\0'; + *modifier = ++cp; + + while (syntax == cen && cp[0] != '\0' && cp[0] != '+' + && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= XPG_MODIFIER | CEN_AUDIENCE; + } + + if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_')) + { + syntax = cen; + + if (cp[0] == '+') + { + /* Next is special application (CEN syntax). */ + cp[0] = '\0'; + *special = ++cp; + + while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= CEN_SPECIAL; + } + + if (cp[0] == ',') + { + /* Next is sponsor (CEN syntax). */ + cp[0] = '\0'; + *sponsor = ++cp; + + while (cp[0] != '\0' && cp[0] != '_') + ++cp; + + mask |= CEN_SPONSOR; + } + + if (cp[0] == '_') + { + /* Next is revision (CEN syntax). */ + cp[0] = '\0'; + *revision = ++cp; + + mask |= CEN_REVISION; + } + } + + /* For CEN syntax values it might be important to have the + separator character in the file name, not for XPG syntax. */ + if (syntax == xpg) + { + if (*territory != NULL && (*territory)[0] == '\0') + mask &= ~TERRITORY; + + if (*codeset != NULL && (*codeset)[0] == '\0') + mask &= ~XPG_CODESET; + + if (*modifier != NULL && (*modifier)[0] == '\0') + mask &= ~XPG_MODIFIER; + } + + return mask; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/intl/finddomain.c pcsxr-unstable-1.9.94+svn98108/win32/intl/finddomain.c --- pcsxr-unstable-1.9.94+svn97809/win32/intl/finddomain.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/intl/finddomain.c 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,214 @@ +/* Handle list of needed message catalogs + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#include "intlconfig.h" + +#include +#include +#include +#include + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#if defined HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#include "gettext.h" +#include "gettextP.h" +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif + +/* @@ end of prolog @@ */ +/* List of already loaded domains. */ +static struct loaded_l10nfile *_nl_loaded_domains; + + +/* Return a data structure describing the message catalog described by + the DOMAINNAME and CATEGORY parameters with respect to the currently + established bindings. */ +struct loaded_l10nfile * +internal_function +_nl_find_domain (dirname, locale, domainname) + const char *dirname; + char *locale; + const char *domainname; +{ + struct loaded_l10nfile *retval; + const char *language; + const char *modifier; + const char *territory; + const char *codeset; + const char *normalized_codeset; + const char *special; + const char *sponsor; + const char *revision; + const char *alias_value; + int mask; + + /* LOCALE can consist of up to four recognized parts for the XPG syntax: + + language[_territory[.codeset]][@modifier] + + and six parts for the CEN syntax: + + language[_territory][+audience][+special][,[sponsor][_revision]] + + Beside the first part all of them are allowed to be missing. If + the full specified locale is not found, the less specific one are + looked for. The various parts will be stripped off according to + the following order: + (1) revision + (2) sponsor + (3) special + (4) codeset + (5) normalized codeset + (6) territory + (7) audience/modifier + */ + + /* If we have already tested for this locale entry there has to + be one data set in the list of loaded domains. */ + retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, + strlen (dirname) + 1, 0, locale, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, domainname, 0); + if (retval != NULL) + { + /* We know something about this locale. */ + int cnt; + + if (retval->decided == 0) + _nl_load_domain (retval); + + if (retval->data != NULL) + return retval; + + for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) + { + if (retval->successor[cnt]->decided == 0) + _nl_load_domain (retval->successor[cnt]); + + if (retval->successor[cnt]->data != NULL) + break; + } + return cnt >= 0 ? retval : NULL; + /* NOTREACHED */ + } + + /* See whether the locale value is an alias. If yes its value + *overwrites* the alias name. No test for the original value is + done. */ + alias_value = _nl_expand_alias (locale); + if (alias_value != NULL) + { +#if defined _LIBC || defined HAVE_STRDUP + locale = strdup (alias_value); + if (locale == NULL) + return NULL; +#else + size_t len = strlen (alias_value) + 1; + locale = (char *) malloc (len); + if (locale == NULL) + return NULL; + + memcpy (locale, alias_value, len); +#endif + } + + /* Now we determine the single parts of the locale name. First + look for the language. Termination symbols are `_' and `@' if + we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ + mask = _nl_explode_name (locale, &language, &modifier, &territory, + &codeset, &normalized_codeset, &special, + &sponsor, &revision); + + /* Create all possible locale entries which might be interested in + generalization. */ + retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, + strlen (dirname) + 1, mask, language, territory, + codeset, normalized_codeset, modifier, special, + sponsor, revision, domainname, 1); + if (retval == NULL) + /* This means we are out of core. */ + return NULL; + + if (retval->decided == 0) + _nl_load_domain (retval); + if (retval->data == NULL) + { + int cnt; + for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) + { + if (retval->successor[cnt]->decided == 0) + _nl_load_domain (retval->successor[cnt]); + if (retval->successor[cnt]->data != NULL) + break; + } + } + + /* The room for an alias was dynamically allocated. Free it now. */ + if (alias_value != NULL) + free (locale); + + return retval; +} + + +#ifdef _LIBC +static void __attribute__ ((unused)) +free_mem (void) +{ + struct loaded_l10nfile *runp = _nl_loaded_domains; + + while (runp != NULL) + { + struct loaded_l10nfile *here = runp; + if (runp->data != NULL) + _nl_unload_domain ((struct loaded_domain *) runp->data); + runp = runp->next; + free (here); + } +} + +text_set_element (__libc_subfreeres, free_mem); +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/intl/gettext.c pcsxr-unstable-1.9.94+svn98108/win32/intl/gettext.c --- pcsxr-unstable-1.9.94+svn97809/win32/intl/gettext.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/intl/gettext.c 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,86 @@ +/* Implementation of gettext(3) function. + Copyright (C) 1995, 1997 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#include "intlconfig.h" + +#ifdef _LIBC +# define __need_NULL +# include +#else +# ifdef STDC_HEADERS +# include /* Just for NULL. */ +# else +# ifdef HAVE_STRING_H +# include +# else +# define NULL ((void *) 0) +# endif +# endif +#endif + +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif + +/* @@ end of prolog @@ */ + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define GETTEXT __gettext +# define DGETTEXT __dgettext +#else +# define GETTEXT gettext__ +# define DGETTEXT dgettext__ +#endif + +#include // Added by Wei Mingzhi 5-4-2010 + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +char * +GETTEXT (msgid) + const char *msgid; +{ +// return DGETTEXT (NULL, msgid); + + // 5-24-2010 Wei Mingzhi + // Hack for UTF-8 support + char *t = DGETTEXT(NULL, msgid); + char buf[16384]; + static char bufout[16384]; + + if (MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)t, -1, (LPWSTR)buf, sizeof(buf)) == 0) { + return t; + } + + if (WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)buf, -1, (LPSTR)bufout, sizeof(bufout), NULL, NULL) == 0) { + return t; + } + + return bufout; +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__gettext, gettext); +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/intl/gettext.h pcsxr-unstable-1.9.94+svn98108/win32/intl/gettext.h --- pcsxr-unstable-1.9.94+svn97809/win32/intl/gettext.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/intl/gettext.h 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,105 @@ +/* Internal header for GNU gettext internationalization functions. + Copyright (C) 1995, 1997 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program; see the file COPYING. If not, + write to the Free Software Foundation, Inc., 51 Franklin Street, + Fifth Floor, Boston, MA 02110-1301 USA. */ + +#ifndef _GETTEXT_H +#define _GETTEXT_H 1 + +#include + +#if HAVE_LIMITS_H || _LIBC +# include +#endif + +/* @@ end of prolog @@ */ + +/* The magic number of the GNU message catalog format. */ +#define _MAGIC 0x950412de +#define _MAGIC_SWAPPED 0xde120495 + +/* Revision number of the currently used .mo (binary) file format. */ +#define MO_REVISION_NUMBER 0 + +/* The following contortions are an attempt to use the C preprocessor + to determine an unsigned integral type that is 32 bits wide. An + alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but + doing that would require that the configure script compile and *run* + the resulting executable. Locally running cross-compiled executables + is usually not possible. */ + +#if __STDC__ +# define UINT_MAX_32_BITS 4294967295U +#else +# define UINT_MAX_32_BITS 0xFFFFFFFF +#endif + +/* If UINT_MAX isn't defined, assume it's a 32-bit type. + This should be valid for all systems GNU cares about because + that doesn't include 16-bit systems, and only modern systems + (that certainly have ) have 64+-bit integral types. */ + +#ifndef UINT_MAX +# define UINT_MAX UINT_MAX_32_BITS +#endif + +#if UINT_MAX == UINT_MAX_32_BITS +typedef unsigned nls_uint32; +#else +# if USHRT_MAX == UINT_MAX_32_BITS +typedef unsigned short nls_uint32; +# else +# if ULONG_MAX == UINT_MAX_32_BITS +typedef unsigned long nls_uint32; +# else + /* The following line is intended to throw an error. Using #error is + not portable enough. */ + "Cannot determine unsigned 32-bit data type." +# endif +# endif +#endif + + +/* Header for binary .mo file format. */ +struct mo_file_header +{ + /* The magic number. */ + nls_uint32 magic; + /* The revision number of the file format. */ + nls_uint32 revision; + /* The number of strings pairs. */ + nls_uint32 nstrings; + /* Offset of table with start offsets of original strings. */ + nls_uint32 orig_tab_offset; + /* Offset of table with start offsets of translation strings. */ + nls_uint32 trans_tab_offset; + /* Size of hashing table. */ + nls_uint32 hash_tab_size; + /* Offset of first hashing entry. */ + nls_uint32 hash_tab_offset; +}; + +struct string_desc +{ + /* Length of addressed string. */ + nls_uint32 length; + /* Offset of string in file. */ + nls_uint32 offset; +}; + +/* @@ begin of epilog @@ */ + +#endif /* gettext.h */ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/intl/gettextP.h pcsxr-unstable-1.9.94+svn98108/win32/intl/gettextP.h --- pcsxr-unstable-1.9.94+svn97809/win32/intl/gettextP.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/intl/gettextP.h 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,89 @@ +/* Header describing internals of gettext library + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#ifndef _GETTEXTP_H +#define _GETTEXTP_H + +#include "loadinfo.h" + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +#ifndef internal_function +# define internal_function +#endif + +#ifndef W +# define W(flag, data) ((flag) ? SWAP (data) : (data)) +#endif + + +#ifdef _LIBC +# include +# define SWAP(i) bswap_32 (i) +#else +static nls_uint32 SWAP PARAMS ((nls_uint32 i)); + +static inline nls_uint32 +SWAP (i) + nls_uint32 i; +{ + return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); +} +#endif + + +struct loaded_domain +{ + const char *data; + int use_mmap; + size_t mmap_size; + int must_swap; + nls_uint32 nstrings; + struct string_desc *orig_tab; + struct string_desc *trans_tab; + nls_uint32 hash_size; + nls_uint32 *hash_tab; +}; + +struct binding +{ + struct binding *next; + char *domainname; + char *dirname; +}; + +struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname, + char *__locale, + const char *__domainname)) + internal_function; +void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain)) + internal_function; +void _nl_unload_domain PARAMS ((struct loaded_domain *__domain)) + internal_function; + +/* @@ begin of epilog @@ */ + +#endif /* gettextP.h */ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/intl/hash-string.h pcsxr-unstable-1.9.94+svn98108/win32/intl/hash-string.h --- pcsxr-unstable-1.9.94+svn97809/win32/intl/hash-string.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/intl/hash-string.h 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,59 @@ +/* Implements a string hashing function. + Copyright (C) 1995, 1997 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with the this program; see the file COPYING. If not, + write to the Free Software Foundation, Inc., 51 Franklin Street, + Fifth Floor, Boston, MA 02110-1301 USA. */ + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ +# define PARAMS(Args) Args +# else +# define PARAMS(Args) () +# endif +#endif + +/* We assume to have `unsigned long int' value with at least 32 bits. */ +#define HASHWORDBITS 32 + + +/* Defines the so called `hashpjw' function by P.J. Weinberger + [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, + 1986, 1987 Bell Telephone Laboratories, Inc.] */ +static unsigned long hash_string PARAMS ((const char *__str_param)); + +static inline unsigned long +hash_string (str_param) + const char *str_param; +{ + unsigned long int hval, g; + const char *str = str_param; + + /* Compute the hash value for the given string. */ + hval = 0; + while (*str != '\0') + { + hval <<= 4; + hval += (unsigned long) *str++; + g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4)); + if (g != 0) + { + hval ^= g >> (HASHWORDBITS - 8); + hval ^= g; + } + } + return hval; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/intl/intl-compat.c pcsxr-unstable-1.9.94+svn98108/win32/intl/intl-compat.c --- pcsxr-unstable-1.9.94+svn97809/win32/intl/intl-compat.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/intl/intl-compat.c 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,74 @@ +/* intl-compat.c - Stub functions to call gettext functions from GNU gettext + Library. + Copyright (C) 1995 Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#include "intlconfig.h" + +#include "libgettext.h" + +/* @@ end of prolog @@ */ + + +#undef gettext +#undef dgettext +#undef dcgettext +#undef textdomain +#undef bindtextdomain + + +char * +bindtextdomain (domainname, dirname) + const char *domainname; + const char *dirname; +{ + return bindtextdomain__ (domainname, dirname); +} + + +char * +dcgettext (domainname, msgid, category) + const char *domainname; + const char *msgid; + int category; +{ + return dcgettext__ (domainname, msgid, category); +} + + +char * +dgettext (domainname, msgid) + const char *domainname; + const char *msgid; +{ + return dgettext__ (domainname, msgid); +} + + +char * +gettext (msgid) + const char *msgid; +{ + return gettext__ (msgid); +} + + +char * +textdomain (domainname) + const char *domainname; +{ + return textdomain__ (domainname); +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/intl/intlconfig.h pcsxr-unstable-1.9.94+svn98108/win32/intl/intlconfig.h --- pcsxr-unstable-1.9.94+svn97809/win32/intl/intlconfig.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/intl/intlconfig.h 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,248 @@ +/* config.h. Generated automatically by configure. */ +/* config.h.in. Generated automatically from configure.in by autoheader. */ +/* Special definitions, processed by autoheader. + Copyright (C) 1995, 1996, 1997 Free Software Foundation. + Ulrich Drepper , 1995. */ + +/* Default value for alignment of strings in .mo file. */ +#define DEFAULT_OUTPUT_ALIGNMENT 1 + +#ifndef PARAMS +# if __STDC__ +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + + +/* Define if using alloca.c. */ +/* #undef C_ALLOCA */ + +/* Define to empty if the keyword does not work. */ +/* #undef const */ + +/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. + This function is required for alloca.c support on those systems. */ +/* #undef CRAY_STACKSEG_END */ + +/* Define if you have alloca, as a function or macro. */ +/* #define HAVE_ALLOCA 1 */ + +/* Define if you have and it should be used (not on Ultrix). */ +/* #undef HAVE_ALLOCA_H */ + +/* Define if you don't have vprintf but do have _doprnt. */ +/* #undef HAVE_DOPRNT */ + +/* Define if you have a working `mmap' system call. */ +/* #undef HAVE_MMAP */ + +/* Define if you have the vprintf function. */ +#define HAVE_VPRINTF 1 + +/* Define as __inline if that's what the C compiler calls it. */ +/* #undef inline */ + +/* Define to `long' if doesn't define. */ +/* #undef off_t */ + +/* Define if you need to in order for stat and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to `unsigned' if doesn't define. */ +/* #undef size_t */ + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown + */ +/* #undef STACK_DIRECTION */ + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to the name of the distribution. */ +/* #define PACKAGE "gettext" */ + +/* Define to the version of the distribution. */ +/* #define VERSION "0.10.35" */ + +/* Define if defines ptrdiff_t. */ +#define HAVE_PTRDIFF_T 1 + +/* Define if your locale.h file contains LC_MESSAGES. */ +/* #undef HAVE_LC_MESSAGES */ + +/* Define if you have the parse_printf_format function. */ +/* #undef HAVE_PARSE_PRINTF_FORMAT */ + +/* Define to 1 if NLS is requested. */ +/* #undef ENABLE_NLS */ + +/* Define as 1 if you have catgets and don't want to use GNU gettext. */ +/* #undef HAVE_CATGETS */ + +/* Define as 1 if you have gettext and don't want to use GNU gettext. */ +/* #undef HAVE_GETTEXT */ + +/* Define as 1 if you have the stpcpy function. */ +/* #undef HAVE_STPCPY */ + +/* Define if you have the __argz_count function. */ +/* #undef HAVE___ARGZ_COUNT */ + +/* Define if you have the __argz_next function. */ +/* #undef HAVE___ARGZ_NEXT */ + +/* Define if you have the __argz_stringify function. */ +/* #undef HAVE___ARGZ_STRINGIFY */ + +/* Define if you have the dcgettext function. */ +/* #undef HAVE_DCGETTEXT */ + +/* Define if you have the getcwd function. */ +#define HAVE_GETCWD 1 + +/* Define if you have the getdelim function. */ +/* #undef HAVE_GETDELIM */ + +/* Define if you have the getline function. */ +/* #undef HAVE_GETLINE */ + +/* Define if you have the getpagesize function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define if you have the mblen function. */ +#define HAVE_MBLEN 1 + +/* Define if you have the memcpy function. */ +#define HAVE_MEMCPY 1 + +/* Define if you have the memmove function. */ +#define HAVE_MEMMOVE 1 + +/* Define if you have the memset function. */ +#define HAVE_MEMSET 1 + +/* Define if you have the munmap function. */ +/* #undef HAVE_MUNMAP */ + +/* Define if you have the putenv function. */ +#define HAVE_PUTENV 1 + +/* Define if you have the setenv function. */ +/* #undef HAVE_SETENV */ + +/* Define if you have the setlocale function. */ +#define HAVE_SETLOCALE 1 + +/* Define if you have the stpcpy function. */ +/* #undef HAVE_STPCPY */ + +/* Define if you have the stpncpy function. */ +/* #undef HAVE_STPNCPY */ + +/* Define if you have the strcasecmp function. */ +/* #define HAVE_STRCASECMP 1 */ + +/* Define if you have the strchr function. */ +#define HAVE_STRCHR 1 + +/* Define if you have the strcspn function. */ +#define HAVE_STRCSPN 1 + +/* Define if you have the strdup function. */ +#define HAVE_STRDUP 1 + +/* Define if you have the strerror function. */ +#define HAVE_STRERROR 1 + +/* Define if you have the strncasecmp function. */ +#define HAVE_STRNCASECMP 1 + +/* Define if you have the strstr function. */ +#define HAVE_STRSTR 1 + +/* Define if you have the strtoul function. */ +#define HAVE_STRTOUL 1 + +/* Define if you have the uname function. */ +/* #undef HAVE_UNAME */ + +/* Define if you have the vasprintf function. */ +/* #undef HAVE_VASPRINTF */ + +/* Define if you have the header file. */ +/* #undef HAVE_ARGZ_H */ + +/* Define if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define if you have the header file. */ +#define HAVE_MALLOC_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_NL_TYPES_H */ + +/* Define if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_PARAM_H */ + +/* Define if you have the header file. */ +/* #define HAVE_UNISTD_H 1 */ + +/* Define if you have the header file. */ +#define HAVE_VALUES_H 1 + +/* Define if you have the i library (-li). */ +/* #undef HAVE_LIBI */ + +/* We don't test for the basename function but still want to use the + version in the libc when compiling for a system using glibc. */ +#ifdef __GNU_LIBRARY__ +# define HAVE_BASENAME 1 +#endif + +/* On GNU systems we want to use the extensions. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + + +/* A file name cannot consist of any character possible. INVALID_PATH_CHAR + contains the characters not allowed. */ +#ifndef MSDOS +# define INVALID_PATH_CHAR "\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37 \177/" +#else +/* Something like this for MSDOG. */ +# define INVALID_PATH_CHAR "\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37 \177\\:." +#endif + +/* Length from which starting on warnings about too long strings are given. + Several systems have limits for strings itself, more have problems with + strings in their tools (important here: gencat). 1024 bytes is a + conservative limit. Because many translation let the message size grow + (German translations are always bigger) choose a length < 1024. */ +#define WARN_ID_LEN 900 + +/* This is the page width for the message_print function. It should + not be set to more than 79 characters (Emacs users will appreciate + it). It is used to wrap the msgid and msgstr strings, and also to + wrap the file position (#:) comments. */ +#define PAGE_WIDTH 79 + +#define GNULOCALEDIR "./Langs" +#define LOCALE_ALIAS_PATH GNULOCALEDIR + +#ifdef _MSC_VER +#pragma warning (disable:4996) +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/intl/l10nflist.c pcsxr-unstable-1.9.94+svn98108/win32/intl/l10nflist.c --- pcsxr-unstable-1.9.94+svn97809/win32/intl/l10nflist.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/intl/l10nflist.c 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,408 @@ +/* Handle list of needed message catalogs + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Contributed by Ulrich Drepper , 1995. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#include "intlconfig.h" + +#if defined HAVE_STRING_H || defined _LIBC +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#if defined _LIBC || defined HAVE_ARGZ_H +# include +#endif +#include +#include + +#if defined STDC_HEADERS || defined _LIBC +# include +#endif + +#include "loadinfo.h" + +/* On some strange systems still no definition of NULL is found. Sigh! */ +#ifndef NULL +# if defined __STDC__ && __STDC__ +# define NULL ((void *) 0) +# else +# define NULL 0 +# endif +#endif + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ +# ifndef stpcpy +# define stpcpy(dest, src) __stpcpy(dest, src) +# endif +#else +# ifndef HAVE_STPCPY +static char *stpcpy PARAMS ((char *dest, const char *src)); +# endif +#endif + +/* Define function which are usually not available. */ + +#if !defined _LIBC && !defined HAVE___ARGZ_COUNT +/* Returns the number of strings in ARGZ. */ +static size_t argz_count__ PARAMS ((const char *argz, size_t len)); + +static size_t +argz_count__ (argz, len) + const char *argz; + size_t len; +{ + size_t count = 0; + while (len > 0) + { + size_t part_len = strlen (argz); + argz += part_len + 1; + len -= part_len + 1; + count++; + } + return count; +} +# undef __argz_count +# define __argz_count(argz, len) argz_count__ (argz, len) +#endif /* !_LIBC && !HAVE___ARGZ_COUNT */ + +#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY +/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's + except the last into the character SEP. */ +static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep)); + +static void +argz_stringify__ (argz, len, sep) + char *argz; + size_t len; + int sep; +{ + while (len > 0) + { + size_t part_len = strlen (argz); + argz += part_len; + len -= part_len + 1; + if (len > 0) + *argz++ = sep; + } +} +# undef __argz_stringify +# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep) +#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */ + +#if !defined _LIBC && !defined HAVE___ARGZ_NEXT +static char *argz_next__ PARAMS ((char *argz, size_t argz_len, + const char *entry)); + +static char * +argz_next__ (argz, argz_len, entry) + char *argz; + size_t argz_len; + const char *entry; +{ + if (entry) + { + if (entry < argz + argz_len) + entry = strchr (entry, '\0') + 1; + + return entry >= argz + argz_len ? NULL : (char *) entry; + } + else + if (argz_len > 0) + return argz; + else + return 0; +} +# undef __argz_next +# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry) +#endif /* !_LIBC && !HAVE___ARGZ_NEXT */ + + +/* Return number of bits set in X. */ +static int pop PARAMS ((int x)); + +static inline int +pop (x) + int x; +{ + /* We assume that no more than 16 bits are used. */ + x = ((x & ~0x5555) >> 1) + (x & 0x5555); + x = ((x & ~0x3333) >> 2) + (x & 0x3333); + x = ((x >> 4) + x) & 0x0f0f; + x = ((x >> 8) + x) & 0xff; + + return x; +} + + +struct loaded_l10nfile * +_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language, + territory, codeset, normalized_codeset, modifier, special, + sponsor, revision, filename, do_allocate) + struct loaded_l10nfile **l10nfile_list; + const char *dirlist; + size_t dirlist_len; + int mask; + const char *language; + const char *territory; + const char *codeset; + const char *normalized_codeset; + const char *modifier; + const char *special; + const char *sponsor; + const char *revision; + const char *filename; + int do_allocate; +{ + char *abs_filename; + struct loaded_l10nfile *last = NULL; + struct loaded_l10nfile *retval; + char *cp; + size_t entries; + int cnt; + + /* Allocate room for the full file name. */ + abs_filename = (char *) malloc (dirlist_len + + strlen (language) + + ((mask & TERRITORY) != 0 + ? strlen (territory) + 1 : 0) + + ((mask & XPG_CODESET) != 0 + ? strlen (codeset) + 1 : 0) + + ((mask & XPG_NORM_CODESET) != 0 + ? strlen (normalized_codeset) + 1 : 0) + + (((mask & XPG_MODIFIER) != 0 + || (mask & CEN_AUDIENCE) != 0) + ? strlen (modifier) + 1 : 0) + + ((mask & CEN_SPECIAL) != 0 + ? strlen (special) + 1 : 0) + + (((mask & CEN_SPONSOR) != 0 + || (mask & CEN_REVISION) != 0) + ? (1 + ((mask & CEN_SPONSOR) != 0 + ? strlen (sponsor) + 1 : 0) + + ((mask & CEN_REVISION) != 0 + ? strlen (revision) + 1 : 0)) : 0) + + 1 + strlen (filename) + 1); + + if (abs_filename == NULL) + return NULL; + + retval = NULL; + last = NULL; + + /* Construct file name. */ + memcpy (abs_filename, dirlist, dirlist_len); + __argz_stringify (abs_filename, dirlist_len, ';'); /*FRANCO changed : to ; for win32*/ + cp = abs_filename + (dirlist_len - 1); + *cp++ = '/'; + cp = stpcpy (cp, language); + + if ((mask & TERRITORY) != 0) + { + *cp++ = '_'; + cp = stpcpy (cp, territory); + } + if ((mask & XPG_CODESET) != 0) + { + *cp++ = '.'; + cp = stpcpy (cp, codeset); + } + if ((mask & XPG_NORM_CODESET) != 0) + { + *cp++ = '.'; + cp = stpcpy (cp, normalized_codeset); + } + if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0) + { + /* This component can be part of both syntaces but has different + leading characters. For CEN we use `+', else `@'. */ + *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@'; + cp = stpcpy (cp, modifier); + } + if ((mask & CEN_SPECIAL) != 0) + { + *cp++ = '+'; + cp = stpcpy (cp, special); + } + if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0) + { + *cp++ = ','; + if ((mask & CEN_SPONSOR) != 0) + cp = stpcpy (cp, sponsor); + if ((mask & CEN_REVISION) != 0) + { + *cp++ = '_'; + cp = stpcpy (cp, revision); + } + } + + *cp++ = '/'; + stpcpy (cp, filename); + + /* Look in list of already loaded domains whether it is already + available. */ + last = NULL; + for (retval = *l10nfile_list; retval != NULL; retval = retval->next) + if (retval->filename != NULL) + { + int compare = strcmp (retval->filename, abs_filename); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It's not in the list. */ + retval = NULL; + break; + } + + last = retval; + } + + if (retval != NULL || do_allocate == 0) + { + free (abs_filename); + return retval; + } + + retval = (struct loaded_l10nfile *) + malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len) + * (1 << pop (mask)) + * sizeof (struct loaded_l10nfile *))); + if (retval == NULL) + return NULL; + + retval->filename = abs_filename; + retval->decided = (__argz_count (dirlist, dirlist_len) != 1 + || ((mask & XPG_CODESET) != 0 + && (mask & XPG_NORM_CODESET) != 0)); + retval->data = NULL; + + if (last == NULL) + { + retval->next = *l10nfile_list; + *l10nfile_list = retval; + } + else + { + retval->next = last->next; + last->next = retval; + } + + entries = 0; + /* If the DIRLIST is a real list the RETVAL entry corresponds not to + a real file. So we have to use the DIRLIST separation mechanism + of the inner loop. */ + cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask; + for (; cnt >= 0; --cnt) + if ((cnt & ~mask) == 0 + && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0) + && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0)) + { + /* Iterate over all elements of the DIRLIST. */ + char *dir = NULL; + + while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir)) + != NULL) + retval->successor[entries++] + = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt, + language, territory, codeset, + normalized_codeset, modifier, special, + sponsor, revision, filename, 1); + } + retval->successor[entries] = NULL; + + return retval; +} + +/* Normalize codeset name. There is no standard for the codeset + names. Normalization allows the user to use any of the common + names. */ +const char * +_nl_normalize_codeset (codeset, name_len) + const unsigned char *codeset; + size_t name_len; +{ + int len = 0; + int only_digit = 1; + char *retval; + char *wp; + size_t cnt; + + for (cnt = 0; cnt < name_len; ++cnt) + if (isalnum (codeset[cnt])) + { + ++len; + + if (isalpha (codeset[cnt])) + only_digit = 0; + } + + retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1); + + if (retval != NULL) + { + if (only_digit) + wp = stpcpy (retval, "iso"); + else + wp = retval; + + for (cnt = 0; cnt < name_len; ++cnt) + if (isalpha (codeset[cnt])) + *wp++ = tolower (codeset[cnt]); + else if (isdigit (codeset[cnt])) + *wp++ = codeset[cnt]; + + *wp = '\0'; + } + + return (const char *) retval; +} + + +/* @@ begin of epilog @@ */ + +/* We don't want libintl.a to depend on any other library. So we + avoid the non-standard function stpcpy. In GNU C Library this + function is available, though. Also allow the symbol HAVE_STPCPY + to be defined. */ +#if !_LIBC && !HAVE_STPCPY +static char * +stpcpy (dest, src) + char *dest; + const char *src; +{ + while ((*dest++ = *src++) != '\0') + /* Do nothing. */ ; + return dest - 1; +} +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/intl/libgettext.h pcsxr-unstable-1.9.94+svn98108/win32/intl/libgettext.h --- pcsxr-unstable-1.9.94+svn97809/win32/intl/libgettext.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/intl/libgettext.h 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,182 @@ +/* Message catalogs for internationalization. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +/* Because on some systems (e.g. Solaris) we sometimes have to include + the systems libintl.h as well as this file we have more complex + include protection above. But the systems header might perhaps also + define _LIBINTL_H and therefore we have to protect the definition here. */ + +#if !defined _LIBINTL_H || !defined _LIBGETTEXT_H +#ifndef _LIBINTL_H +# define _LIBINTL_H 1 +#endif +#define _LIBGETTEXT_H 1 + +/* We define an additional symbol to signal that we use the GNU + implementation of gettext. */ +#define __USE_GNU_GETTEXT 1 + +#include + +#if HAVE_LOCALE_H +# include +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ || defined __cplusplus +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +#ifndef NULL +# if !defined __cplusplus || defined __GNUC__ +# define NULL ((void *) 0) +# else +# define NULL (0) +# endif +#endif + +#if !HAVE_LC_MESSAGES +/* This value determines the behaviour of the gettext() and dgettext() + function. But some system does not have this defined. Define it + to a default value. */ +# define LC_MESSAGES (-1) +#endif + + +/* Declarations for gettext-using-catgets interface. Derived from + Jim Meyering's libintl.h. */ +struct _msg_ent +{ + const char *_msg; + int _msg_number; +}; + + +#if HAVE_CATGETS +/* These two variables are defined in the automatically by po-to-tbl.sed + generated file `cat-id-tbl.c'. */ +extern const struct _msg_ent _msg_tbl[]; +extern int _msg_tbl_length; +#endif + + +/* For automatical extraction of messages sometimes no real + translation is needed. Instead the string itself is the result. */ +#define gettext_noop(Str) (Str) + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +extern char *gettext PARAMS ((const char *__msgid)); +extern char *gettext__ PARAMS ((const char *__msgid)); + +/* Look up MSGID in the DOMAINNAME message catalog for the current + LC_MESSAGES locale. */ +extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid)); +extern char *dgettext__ PARAMS ((const char *__domainname, + const char *__msgid)); + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid, + int __category)); +extern char *dcgettext__ PARAMS ((const char *__domainname, + const char *__msgid, int __category)); + + +/* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +extern char *textdomain PARAMS ((const char *__domainname)); +extern char *textdomain__ PARAMS ((const char *__domainname)); + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +extern char *bindtextdomain PARAMS ((const char *__domainname, + const char *__dirname)); +extern char *bindtextdomain__ PARAMS ((const char *__domainname, + const char *__dirname)); + +#if ENABLE_NLS + +/* Solaris 2.3 has the gettext function but dcgettext is missing. + So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4 + has dcgettext. */ +# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT) + +# define gettext(Msgid) \ + dgettext (NULL, Msgid) + +# define dgettext(Domainname, Msgid) \ + dcgettext (Domainname, Msgid, LC_MESSAGES) + +# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7 +/* This global variable is defined in loadmsgcat.c. We need a sign, + whether a new catalog was loaded, which can be associated with all + translations. */ +extern int _nl_msg_cat_cntr; + +# define dcgettext(Domainname, Msgid, Category) \ + (__extension__ \ + ({ \ + char *__result; \ + if (__builtin_constant_p (Msgid)) \ + { \ + static char *__translation__; \ + static int __catalog_counter__; \ + if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \ + { \ + __translation__ = \ + dcgettext__ (Domainname, Msgid, Category); \ + __catalog_counter__ = _nl_msg_cat_cntr; \ + } \ + __result = __translation__; \ + } \ + else \ + __result = dcgettext__ (Domainname, Msgid, Category); \ + __result; \ + })) +# endif +# endif + +#else + +# define gettext(Msgid) (Msgid) +# define dgettext(Domainname, Msgid) (Msgid) +# define dcgettext(Domainname, Msgid, Category) (Msgid) +# define textdomain(Domainname) ((char *) Domainname) +# define bindtextdomain(Domainname, Dirname) ((char *) Dirname) + +#endif + +/* @@ begin of epilog @@ */ + +#ifdef __cplusplus +} +#endif + +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/intl/libintl.h pcsxr-unstable-1.9.94+svn98108/win32/intl/libintl.h --- pcsxr-unstable-1.9.94+svn97809/win32/intl/libintl.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/intl/libintl.h 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,112 @@ +/* This file is part of a Windows32 DLL Interface to: + GNU gettext - internationalization aids + Copyright (C) 1996, 1998 Free Software Foundation, Inc. + + This file was written by Franco Bez + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +/* REPLACEMENT FOR ORIGINAL LIBINTL.H for use with Windows32 */ + +#if !defined(__LIBINTL_H_INCLUDED) +#define __LIBINTL_H_INCLUDED + +#if defined(__cplusplus) +extern "C" { +#endif + +/* See if we allready know what we want static or dll linkage or none at all*/ +#if defined DONT_USE_GETTEXT || ( defined USE_SAFE_GETTEXT_DLL && defined USE_GETTEXT_STATIC ) || ( defined USE_GETTEXT_DLL && defined USE_SAFE_GETTEXT_DLL ) || ( defined USE_GETTEXT_DLL && defined USE_GETTEXT_STATIC ) +/* TWO IS HARDLY POSSIBLE */ +#undef USE_GETTEXT_DLL +#undef USE_GETTEXT_STATIC +#undef USE_SAFE_GETTEXT_DLL +#endif /* MORE THAN ONE - OR NONE AT ALL */ + +#if !defined USE_GETTEXT_DLL && !defined USE_SAFE_GETTEXT_DLL && !defined USE_GETTEXT_STATIC && !defined DONT_USE_GETTEXT +/* not explicitly defined so try to guess it - + if GNUC is used - we use static linkage by default + because at the moment this is the only plattform + for which a static lib is available + else we use the DLL built with GNUC */ +# define USE_GETTEXT_STATIC +#endif /* NONE */ + +/* NOW ONLY ONE OF + DONT_USE_GETTEXT , USE_GETTEXT_DLL , USE_SAFE_GETTEXT_DLL , USE_GETTEXT_STATIC + IS DEFINED */ + +#if defined USE_GETTEXT_DLL +/* exported functions in DLL gnu_gettext.dll + you should link with import library + -lgnu_gettext (for mingw32) OR gnu_gettext.lib (MSVC) */ +__declspec(dllimport) char *gettext(const char *__msgid); +__declspec(dllimport) char *dgettext(const char *__domainname,const char *__msgid); +__declspec(dllimport) char *dcgettext(const char *__domainname,const char *__msgid, int __category); +__declspec(dllimport) char *textdomain(const char *__domainname); +__declspec(dllimport) char *bindtextdomain(const char *__domainname,const char *__dirname); +/* calling _putenv from within the DLL */ +__declspec(dllexport) int gettext_putenv(const char *envstring); +#endif /* DLL */ + +#if defined USE_SAFE_GETTEXT_DLL +/* Uses DLL gnu_gettext.dll ONLY if present, otherwise NO translation will take place + you should link with "safe_gettext_dll.o -lstdc++" see README for safe_gettext_dll for Details */ +/* The safe gettext functions */ +extern char *gettext(const char *szMsgId); +extern char *dgettext(const char *szDomain,const char *szMsgId); +extern char *dcgettext(const char *szDomain,const char *szMsgId,int iCategory); +extern char *textdomain(const char *szDomain); +extern char *bindtextdomain(const char *szDomain,const char *szDirectory); +/* calling _putenv from within the DLL */ +extern int gettext_putenv(const char *envstring); +#endif /* SAFE DLL */ + +#if defined USE_GETTEXT_STATIC +/* exported functions in static library libintl.a + and supporting macros + you should link with -lintl (mingw32) */ +extern char *gettext__(const char *__msgid); +extern char *dgettext__(const char *__domainname,const char *__msgid); +extern char *dcgettext__(const char *__domainname,const char *__msgid, int __category); +extern char *textdomain__(const char *__domainname); +extern char *bindtextdomain__(const char *__domainname,const char *__dirname); +#define gettext(szMsgId) gettext__(szMsgId) +#define dgettext(szDomain,szMsgId) dgettext__(szDomain,szMsgId) +#define dcgettext(szDomain,szMsgId,iCategory) dcgettext__(szDomain,szMsgId,iCategory) +#define textdomain(szDomain) textdomain__(szDomain) +#define bindtextdomain(szDomain,szDirectory) bindtextdomain__(szDomain,szDirectory) +// dummy - for static linkage - calling _putenv from within the DLL +#define gettext_putenv(a) _putenv(a) +#endif /* STATIC */ + +#if defined DONT_USE_GETTEXT +/* DON'T USE GETTEXT AT ALL + MAKROS TO MAKE CODE COMPILE WELL, BUT GETTEXT WILL NOT BE USESD +*/ +# define gettext(Msgid) (Msgid) +# define dgettext(Domainname, Msgid) (Msgid) +# define dcgettext(Domainname, Msgid, Category) (Msgid) +# define textdomain(Domainname) ((char *) Domainname) +# define bindtextdomain(Domainname, Dirname) ((char *) Dirname) +// dummy - for static linkage - calling _putenv from within the DLL +# define gettext_putenv(a) _putenv(a) +#endif /* DON'T USE AT ALL */ + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#endif /*!defined(__LIBINTL_H_INCLUDED)*/ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/intl/loadinfo.h pcsxr-unstable-1.9.94+svn98108/win32/intl/loadinfo.h --- pcsxr-unstable-1.9.94+svn97809/win32/intl/loadinfo.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/intl/loadinfo.h 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,76 @@ +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1996. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#ifndef PARAMS +# if __STDC__ +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +/* Encoding of locale name parts. */ +#define CEN_REVISION 1 +#define CEN_SPONSOR 2 +#define CEN_SPECIAL 4 +#define XPG_NORM_CODESET 8 +#define XPG_CODESET 16 +#define TERRITORY 32 +#define CEN_AUDIENCE 64 +#define XPG_MODIFIER 128 + +#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE) +#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER) + + +struct loaded_l10nfile +{ + const char *filename; + int decided; + + const void *data; + + struct loaded_l10nfile *next; + struct loaded_l10nfile *successor[1]; +}; + + +extern const char *_nl_normalize_codeset PARAMS ((const unsigned char *codeset, + size_t name_len)); + +extern struct loaded_l10nfile * +_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list, + const char *dirlist, size_t dirlist_len, int mask, + const char *language, const char *territory, + const char *codeset, + const char *normalized_codeset, + const char *modifier, const char *special, + const char *sponsor, const char *revision, + const char *filename, int do_allocate)); + + +extern const char *_nl_expand_alias PARAMS ((const char *name)); + +extern int _nl_explode_name PARAMS ((char *name, const char **language, + const char **modifier, + const char **territory, + const char **codeset, + const char **normalized_codeset, + const char **special, + const char **sponsor, + const char **revision)); diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/intl/loadmsgcat.c pcsxr-unstable-1.9.94+svn98108/win32/intl/loadmsgcat.c --- pcsxr-unstable-1.9.94+svn97809/win32/intl/loadmsgcat.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/intl/loadmsgcat.c 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,227 @@ +/* Load needed message catalogs. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#include "intlconfig.h" + +#include +#include +#include + +#if defined STDC_HEADERS || defined _LIBC +# include +#endif + +#if defined HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC +# include +#endif + +#ifdef _WIN32 +#include +#ifdef _MSC_VER +#pragma warning (disable:4018) +#endif +#endif + +#include "gettext.h" +#include "gettextP.h" + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ISO C functions. This is required by the standard + because some ISO C functions will require linking with this object + file and the name space must not be polluted. */ +# define open __open +# define close __close +# define read __read +# define mmap __mmap +# define munmap __munmap +#endif + +/* We need a sign, whether a new catalog was loaded, which can be associated + with all translations. This is important if the translations are + cached by one of GCC's features. */ +int _nl_msg_cat_cntr = 0; + + +/* Load the message catalogs specified by FILENAME. If it is no valid + message catalog do nothing. */ +void +internal_function +_nl_load_domain (domain_file) + struct loaded_l10nfile *domain_file; +{ + int fd; + size_t size; + struct stat st; + struct mo_file_header *data = (struct mo_file_header *) -1; +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + int use_mmap = 0; +#endif + struct loaded_domain *domain; + + domain_file->decided = 1; + domain_file->data = NULL; + + /* If the record does not represent a valid locale the FILENAME + might be NULL. This can happen when according to the given + specification the locale file name is different for XPG and CEN + syntax. */ + if (domain_file->filename == NULL) + return; + + /* Try to open the addressed file. */ + fd = open (domain_file->filename, O_RDONLY | O_BINARY); /*FRANCO - binary*/ + if (fd == -1) + return; + + /* We must know about the size of the file. */ + if (fstat (fd, &st) != 0 + || (size = (size_t) st.st_size) != st.st_size + || size < sizeof (struct mo_file_header)) + { + /* Something went wrong. */ + close (fd); + return; + } + +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + /* Now we are ready to load the file. If mmap() is available we try + this first. If not available or it failed we try to load it. */ + data = (struct mo_file_header *) mmap (NULL, size, PROT_READ, + MAP_PRIVATE, fd, 0); + + if (data != (struct mo_file_header *) -1) + { + /* mmap() call was successful. */ + close (fd); + use_mmap = 1; + } +#endif + + /* If the data is not yet available (i.e. mmap'ed) we try to load + it manually. */ + if (data == (struct mo_file_header *) -1) + { + size_t to_read; + char *read_ptr; + + data = (struct mo_file_header *) malloc (size); + if (data == NULL) + return; + + to_read = size; + read_ptr = (char *) data; + do + { + long int nb = (long int) read (fd, read_ptr, to_read); + if (nb == -1) + { + close (fd); + return; + } + + read_ptr += nb; + to_read -= nb; + } + while (to_read > 0); + + close (fd); + } + + /* Using the magic number we can test whether it really is a message + catalog file. */ + if (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED) + { + /* The magic number is wrong: not a message catalog file. */ +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + if (use_mmap) + munmap ((caddr_t) data, size); + else +#endif + free (data); + return; + } + + domain_file->data + = (struct loaded_domain *) malloc (sizeof (struct loaded_domain)); + if (domain_file->data == NULL) + return; + + domain = (struct loaded_domain *) domain_file->data; + domain->data = (char *) data; +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + domain->use_mmap = use_mmap; +#endif + domain->mmap_size = size; + domain->must_swap = data->magic != _MAGIC; + + /* Fill in the information about the available tables. */ + switch (W (domain->must_swap, data->revision)) + { + case 0: + domain->nstrings = W (domain->must_swap, data->nstrings); + domain->orig_tab = (struct string_desc *) + ((char *) data + W (domain->must_swap, data->orig_tab_offset)); + domain->trans_tab = (struct string_desc *) + ((char *) data + W (domain->must_swap, data->trans_tab_offset)); + domain->hash_size = W (domain->must_swap, data->hash_tab_size); + domain->hash_tab = (nls_uint32 *) + ((char *) data + W (domain->must_swap, data->hash_tab_offset)); + break; + default: + /* This is an illegal revision. */ +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + if (use_mmap) + munmap ((caddr_t) data, size); + else +#endif + free (data); + free (domain); + domain_file->data = NULL; + return; + } + + /* Show that one domain is changed. This might make some cached + translations invalid. */ + ++_nl_msg_cat_cntr; +} + + +#ifdef _LIBC +void +internal_function +_nl_unload_domain (domain) + struct loaded_domain *domain; +{ + if (domain->use_mmap) + munmap ((caddr_t) domain->data, domain->mmap_size); + else + free ((void *) domain->data); + + free (domain); +} +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/intl/localealias.c pcsxr-unstable-1.9.94+svn98108/win32/intl/localealias.c --- pcsxr-unstable-1.9.94+svn97809/win32/intl/localealias.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/intl/localealias.c 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,426 @@ +/* Handle aliases for locale names. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#include "intlconfig.h" + +#include +#include +#include + +#ifdef __GNUC__ +# define alloca __builtin_alloca +# define HAVE_ALLOCA 1 +#else +# if defined HAVE_ALLOCA_H || defined _LIBC +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca +char *alloca (); +# endif +# endif +# endif +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +char *getenv (); +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#include "gettext.h" +#include "gettextP.h" + +#ifdef _MSC_VER +#pragma warning (disable:4113) +#endif + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ +# define strcasecmp __strcasecmp + +# define mempcpy __mempcpy +# define HAVE_MEMPCPY 1 + +/* We need locking here since we can be called from different places. */ +# include + +__libc_lock_define_initialized (static, lock); +#endif + + +/* For those loosing systems which don't have `alloca' we have to add + some additional code emulating it. */ +#ifdef HAVE_ALLOCA +/* Nothing has to be done. */ +# define ADD_BLOCK(list, address) /* nothing */ +# define FREE_BLOCKS(list) /* nothing */ +#else +struct block_list +{ + void *address; + struct block_list *next; +}; +# define ADD_BLOCK(list, addr) \ + do { \ + struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ + /* If we cannot get a free block we cannot add the new element to \ + the list. */ \ + if (newp != NULL) { \ + newp->address = (addr); \ + newp->next = (list); \ + (list) = newp; \ + } \ + } while (0) +# define FREE_BLOCKS(list) \ + do { \ + while (list != NULL) { \ + struct block_list *old = list; \ + list = list->next; \ + free (old); \ + } \ + } while (0) +# undef alloca +# define alloca(size) (malloc (size)) +#endif /* have alloca */ + + +struct alias_map +{ + const char *alias; + const char *value; +}; + + +static char *string_space = NULL; +static size_t string_space_act = 0; +static size_t string_space_max = 0; +static struct alias_map *map; +static size_t nmap = 0; +static size_t maxmap = 0; + + +/* Prototypes for local functions. */ +static size_t read_alias_file PARAMS ((const char *fname, int fname_len)) + internal_function; +static void extend_alias_table PARAMS ((void)); +static int alias_compare PARAMS ((const struct alias_map *map1, + const struct alias_map *map2)); + + +const char * +_nl_expand_alias (name) + const char *name; +{ + static const char *locale_alias_path = LOCALE_ALIAS_PATH; + struct alias_map *retval; + const char *result = NULL; + size_t added; + +#ifdef _LIBC + __libc_lock_lock (lock); +#endif + + do + { + struct alias_map item; + + item.alias = name; + + if (nmap > 0) + retval = (struct alias_map *) bsearch (&item, map, nmap, + sizeof (struct alias_map), + (int (*) PARAMS ((const void *, + const void *)) + ) alias_compare); + else + retval = NULL; + + /* We really found an alias. Return the value. */ + if (retval != NULL) + { + result = retval->value; + break; + } + + /* Perhaps we can find another alias file. */ + added = 0; + while (added == 0 && locale_alias_path[0] != '\0') + { + const char *start; + + while (locale_alias_path[0] == ';')/*FRANCO changed : to ; for win32*/ + ++locale_alias_path; + start = locale_alias_path; + + while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ';')/*FRANCO changed : to ; for win32*/ + ++locale_alias_path; + + if (start < locale_alias_path) + added = read_alias_file (start, locale_alias_path - start); + } + } + while (added != 0); + +#ifdef _LIBC + __libc_lock_unlock (lock); +#endif + + return result; +} + + +static size_t +internal_function +read_alias_file (fname, fname_len) + const char *fname; + int fname_len; +{ +#ifndef HAVE_ALLOCA + struct block_list *block_list = NULL; +#endif + FILE *fp; + char *full_fname; + size_t added; + static const char aliasfile[] = "/locale.alias"; + + full_fname = (char *) alloca (fname_len + sizeof aliasfile); + ADD_BLOCK (block_list, full_fname); +#ifdef HAVE_MEMPCPY + mempcpy (mempcpy (full_fname, fname, fname_len), + aliasfile, sizeof aliasfile); +#else + memcpy (full_fname, fname, fname_len); + memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile); +#endif + + fp = fopen (full_fname, "r"); + if (fp == NULL) + { + FREE_BLOCKS (block_list); + return 0; + } + + added = 0; + while (!feof (fp)) + { + /* It is a reasonable approach to use a fix buffer here because + a) we are only interested in the first two fields + b) these fields must be usable as file names and so must not + be that long + */ + unsigned char buf[BUFSIZ]; + unsigned char *alias; + unsigned char *value; + unsigned char *cp; + + if (fgets (buf, sizeof buf, fp) == NULL) + /* EOF reached. */ + break; + + /* Possibly not the whole line fits into the buffer. Ignore + the rest of the line. */ + if (strchr (buf, '\n') == NULL) + { + char altbuf[BUFSIZ]; + do + if (fgets (altbuf, sizeof altbuf, fp) == NULL) + /* Make sure the inner loop will be left. The outer loop + will exit at the `feof' test. */ + break; + while (strchr (altbuf, '\n') == NULL); + } + + cp = buf; + /* Ignore leading white space. */ + while (isspace (cp[0])) + ++cp; + + /* A leading '#' signals a comment line. */ + if (cp[0] != '\0' && cp[0] != '#') + { + alias = cp++; + while (cp[0] != '\0' && !isspace (cp[0])) + ++cp; + /* Terminate alias name. */ + if (cp[0] != '\0') + *cp++ = '\0'; + + /* Now look for the beginning of the value. */ + while (isspace (cp[0])) + ++cp; + + if (cp[0] != '\0') + { + size_t alias_len; + size_t value_len; + + value = cp++; + while (cp[0] != '\0' && !isspace (cp[0])) + ++cp; + /* Terminate value. */ + if (cp[0] == '\n') + { + /* This has to be done to make the following test + for the end of line possible. We are looking for + the terminating '\n' which do not overwrite here. */ + *cp++ = '\0'; + *cp = '\n'; + } + else if (cp[0] != '\0') + *cp++ = '\0'; + + if (nmap >= maxmap) + extend_alias_table (); + + alias_len = strlen (alias) + 1; + value_len = strlen (value) + 1; + + if (string_space_act + alias_len + value_len > string_space_max) + { + /* Increase size of memory pool. */ + size_t new_size = (string_space_max + + (alias_len + value_len > 1024 + ? alias_len + value_len : 1024)); + char *new_pool = (char *) realloc (string_space, new_size); + if (new_pool == NULL) + { + FREE_BLOCKS (block_list); + return added; + } + string_space = new_pool; + string_space_max = new_size; + } + + map[nmap].alias = memcpy (&string_space[string_space_act], + alias, alias_len); + string_space_act += alias_len; + + map[nmap].value = memcpy (&string_space[string_space_act], + value, value_len); + string_space_act += value_len; + + ++nmap; + ++added; + } + } + } + + /* Should we test for ferror()? I think we have to silently ignore + errors. --drepper */ + fclose (fp); + + if (added > 0) + qsort (map, nmap, sizeof (struct alias_map), + (int (*) PARAMS ((const void *, const void *))) alias_compare); + + FREE_BLOCKS (block_list); + return added; +} + + +static void +extend_alias_table () +{ + size_t new_size; + struct alias_map *new_map; + + new_size = maxmap == 0 ? 100 : 2 * maxmap; + new_map = (struct alias_map *) realloc (map, (new_size + * sizeof (struct alias_map))); + if (new_map == NULL) + /* Simply don't extend: we don't have any more core. */ + return; + + map = new_map; + maxmap = new_size; +} + + +#ifdef _LIBC +static void __attribute__ ((unused)) +free_mem (void) +{ + if (string_space != NULL) + free (string_space); + if (map != NULL) + free (map); +} +text_set_element (__libc_subfreeres, free_mem); +#endif + + +static int +alias_compare (map1, map2) + const struct alias_map *map1; + const struct alias_map *map2; +{ +#if defined _LIBC || defined HAVE_STRCASECMP + return strcasecmp (map1->alias, map2->alias); +#else + const unsigned char *p1 = (const unsigned char *) map1->alias; + const unsigned char *p2 = (const unsigned char *) map2->alias; + unsigned char c1, c2; + + if (p1 == p2) + return 0; + + do + { + /* I know this seems to be odd but the tolower() function in + some systems libc cannot handle nonalpha characters. */ + c1 = isupper (*p1) ? tolower (*p1) : *p1; + c2 = isupper (*p2) ? tolower (*p2) : *p2; + if (c1 == '\0') + break; + ++p1; + ++p2; + } + while (c1 == c2); + + return c1 - c2; +#endif +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/intl/textdomain.c pcsxr-unstable-1.9.94+svn98108/win32/intl/textdomain.c --- pcsxr-unstable-1.9.94+svn97809/win32/intl/textdomain.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/intl/textdomain.c 2016-06-30 16:53:26.000000000 +0000 @@ -0,0 +1,106 @@ +/* Implementation of the textdomain(3) function. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#include "intlconfig.h" + +#if defined STDC_HEADERS || defined _LIBC +# include +#endif + +#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif + +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif + +/* @@ end of prolog @@ */ + +/* Name of the default text domain. */ +extern const char _nl_default_default_domain[]; + +/* Default text domain in which entries for gettext(3) are to be found. */ +extern const char *_nl_current_default_domain; + + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define TEXTDOMAIN __textdomain +# ifndef strdup +# define strdup(str) __strdup (str) +# endif +#else +# define TEXTDOMAIN textdomain__ +#endif + +/* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +char * +TEXTDOMAIN (domainname) + const char *domainname; +{ + char *old; + + /* A NULL pointer requests the current setting. */ + if (domainname == NULL) + return (char *) _nl_current_default_domain; + + old = (char *) _nl_current_default_domain; + + /* If domain name is the null string set to default domain "messages". */ + if (domainname[0] == '\0' + || strcmp (domainname, _nl_default_default_domain) == 0) + _nl_current_default_domain = _nl_default_default_domain; + else + { + /* If the following malloc fails `_nl_current_default_domain' + will be NULL. This value will be returned and so signals we + are out of core. */ +#if defined _LIBC || defined HAVE_STRDUP + _nl_current_default_domain = strdup (domainname); +#else + size_t len = strlen (domainname) + 1; + char *cp = (char *) malloc (len); + if (cp != NULL) + memcpy (cp, domainname, len); + _nl_current_default_domain = cp; +#endif + } + + if (old != _nl_default_default_domain) + free (old); + + return (char *) _nl_current_default_domain; +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__textdomain, textdomain); +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/pcsxr.dev pcsxr-unstable-1.9.94+svn98108/win32/pcsxr.dev --- pcsxr-unstable-1.9.94+svn97809/win32/pcsxr.dev 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/pcsxr.dev 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,1209 @@ +[Project] +FileName=pcsxr.dev +Name=pcsxr +Ver=1 +IsCpp=1 +Type=0 +Compiler=-D__GNUWIN32__ -march=pentiumpro -D_M_IX86=600 -W -finline-functions -fomit-frame-pointer -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -D__WIN32__ -DPCSXR_VERSION=\"1.5\" -D__i386__ -DENABLE_NLS -DPACKAGE=\"pcsxr\" -Dinline=__inline___@@_ +CppCompiler=-D__GNUWIN32__ -march=pentiumpro -D_M_IX86=600 -W -finline-functions -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -D__WIN32__ -D_MSC_VER_ -DPCSXR_VERSION=\"1.5\" -D__i386__ -DENABLE_NLS -DPACKAGE=\"pcsxr\"_@@_ +Includes=.;./zlib;../libpcsxcore;./glue;./gui;./intl +Linker=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lcomctl32 -lwsock32_@@_ +Libs= +UnitCount=116 +Folders=glue,glue/sys,gui,intl,libpcsxcore,libpcsxcore/ix86,zlib +ObjFiles= +PrivateResource=pcsxr_private.rc +ResourceIncludes= +MakeIncludes= +Icon= +ExeOutput= +ObjectOutput= +OverrideOutput=0 +OverrideOutputName=pcsxr.exe +HostApplication= +CommandLine= +UseCustomMakefile=0 +CustomMakefile= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0010000001001000000100 + +[Unit1] +FileName=..\libpcsxcore\ix86\iGte.h +Folder=libpcsxcore/ix86 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit2] +FileName=..\libpcsxcore\ix86\iR3000A.c +Folder=libpcsxcore/ix86 +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit3] +FileName=..\libpcsxcore\ix86\ix86.c +Folder=libpcsxcore/ix86 +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit4] +FileName=..\libpcsxcore\ix86\ix86.h +Folder=libpcsxcore/ix86 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit5] +FileName=..\libpcsxcore\cdrom.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit6] +FileName=..\libpcsxcore\cdrom.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit7] +FileName=..\libpcsxcore\coff.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit8] +FileName=..\libpcsxcore\debug.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit9] +FileName=..\libpcsxcore\decode_xa.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit10] +FileName=..\libpcsxcore\decode_xa.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit11] +FileName=..\libpcsxcore\disr3000a.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit12] +FileName=..\libpcsxcore\gte.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit13] +FileName=..\libpcsxcore\gte.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit14] +FileName=..\libpcsxcore\mdec.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit15] +FileName=..\libpcsxcore\mdec.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit16] +FileName=..\libpcsxcore\misc.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit17] +FileName=..\libpcsxcore\misc.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit18] +FileName=..\libpcsxcore\plugins.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit19] +FileName=..\libpcsxcore\plugins.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit20] +FileName=..\libpcsxcore\psemu_plugin_defs.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit21] +FileName=..\libpcsxcore\psxbios.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit22] +FileName=..\libpcsxcore\psxbios.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit23] +FileName=..\libpcsxcore\psxcommon.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit24] +FileName=..\libpcsxcore\psxcounters.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit25] +FileName=..\libpcsxcore\psxcounters.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit26] +FileName=..\libpcsxcore\psxdma.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit27] +FileName=..\libpcsxcore\psxdma.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit28] +FileName=..\libpcsxcore\psxhle.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit29] +FileName=..\libpcsxcore\psxhle.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit30] +FileName=..\libpcsxcore\psxhw.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit31] +FileName=..\libpcsxcore\psxhw.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit32] +FileName=..\libpcsxcore\psxinterpreter.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit33] +FileName=..\libpcsxcore\psxmem.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit34] +FileName=..\libpcsxcore\psxmem.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit35] +FileName=..\libpcsxcore\r3000a.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit36] +FileName=..\libpcsxcore\r3000a.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit37] +FileName=..\libpcsxcore\sio.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit38] +FileName=..\libpcsxcore\sio.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit39] +FileName=..\libpcsxcore\spu.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit40] +FileName=..\libpcsxcore\spu.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit41] +FileName=..\libpcsxcore\system.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit42] +FileName=gui\about.bmp +Folder=gui +Compile=0 +CompileCpp=0 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit43] +FileName=gui\AboutDlg.c +Folder=gui +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit44] +FileName=gui\AboutDlg.h +Folder=gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit45] +FileName=gui\pcsxr.ico +Folder=gui +Compile=0 +CompileCpp=0 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit46] +FileName=gui\ConfigurePlugins.c +Folder=gui +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit47] +FileName=gui\NoPic.h +Folder=gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit48] +FileName=gui\pcsxr.bmp +Folder=gui +Compile=0 +CompileCpp=0 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit49] +FileName=gui\pcsxr.exe.manifest +Folder=gui +Compile=0 +CompileCpp=0 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit51] +FileName=gui\plugin.h +Folder=gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit52] +FileName=gui\Win32.h +Folder=gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit53] +FileName=gui\WndMain.c +Folder=gui +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit54] +FileName=zlib\adler32.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit55] +FileName=zlib\compress.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit56] +FileName=zlib\crc32.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit57] +FileName=zlib\deflate.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit58] +FileName=zlib\deflate.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit59] +FileName=zlib\gzio.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit60] +FileName=zlib\infblock.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit61] +FileName=zlib\infblock.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit62] +FileName=zlib\infcodes.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit63] +FileName=zlib\infcodes.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit64] +FileName=zlib\inffast.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit65] +FileName=zlib\inffast.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit66] +FileName=zlib\inffixed.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit67] +FileName=zlib\inflate.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit68] +FileName=zlib\inftrees.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit69] +FileName=zlib\inftrees.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit70] +FileName=zlib\infutil.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit71] +FileName=zlib\infutil.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit72] +FileName=zlib\trees.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit73] +FileName=zlib\trees.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit74] +FileName=zlib\uncompr.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit75] +FileName=zlib\zconf.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit76] +FileName=zlib\zlib.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit77] +FileName=zlib\zutil.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit78] +FileName=zlib\zutil.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit79] +FileName=glue\sys\mman.h +Folder=glue/sys +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit80] +FileName=glue\stdint.h +Folder=glue +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit81] +FileName=intl\bindtextdom.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit82] +FileName=intl\intlconfig.h +Folder=intl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit83] +FileName=intl\dcgettext.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit84] +FileName=intl\dgettext.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit85] +FileName=intl\explodename.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit86] +FileName=intl\finddomain.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit87] +FileName=intl\gettext.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit88] +FileName=intl\gettext.h +Folder=intl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit89] +FileName=intl\gettextP.h +Folder=intl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit90] +FileName=intl\l10nflist.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit91] +FileName=intl\libgettext.h +Folder=intl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit92] +FileName=intl\libintl.h +Folder=intl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit93] +FileName=intl\loadinfo.h +Folder=intl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit94] +FileName=intl\loadmsgcat.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit95] +FileName=intl\localealias.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit96] +FileName=intl\textdomain.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit97] +FileName=config.h +Folder= +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit98] +FileName=intl\intl-compat.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c intl-compat.c -o intl-compat.o $(CFLAGS) + +[Unit99] +FileName=intl\hash-string.h +Folder=intl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=0.1 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename=pcsxr.exe +ProductName=pcsxr +ProductVersion=0.1 +AutoIncBuildNr=0 + +[Unit50] +FileName=gui\plugin.c +CompileCpp=0 +Folder=gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit102] +FileName=..\libpcsxcore\cdriso.h +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= +CompileCpp=1 + +[Unit101] +FileName=pcsxr.rc +CompileCpp=1 +Folder=pcsxr +Compile=1 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit100] +FileName=resource.h +CompileCpp=1 +Folder=pcsxr +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit103] +FileName=..\libpcsxcore\cdriso.c +CompileCpp=0 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c cdriso.c -o cdriso.o $(CFLAGS) + +[Unit104] +FileName=..\libpcsxcore\cheat.h +CompileCpp=1 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit105] +FileName=..\libpcsxcore\cheat.c +CompileCpp=0 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c cheat.c -o cheat.o $(CFLAGS) + +[Unit106] +FileName=gui\CheatDlg.c +CompileCpp=0 +Folder=gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c CheatDlg.c -o CheatDlg.o $(CFLAGS) + +[Unit107] +FileName=..\libpcsxcore\socket.h +CompileCpp=1 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit108] +FileName=..\libpcsxcore\debug.c +CompileCpp=0 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c debug.c -o debug.o $(CFLAGS) + +[Unit109] +FileName=..\libpcsxcore\socket.c +CompileCpp=0 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c socket.c -o socket.o $(CFLAGS) + +[Unit110] +FileName=..\libpcsxcore\ppf.h +CompileCpp=1 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit111] +FileName=..\libpcsxcore\ppf.c +CompileCpp=0 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c ppf.c -o ppf.o $(CFLAGS) + +[Unit112] +FileName=..\libpcsxcore\psxcommon.c +CompileCpp=0 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c psxcommon.c -o psxcommon.o $(CFLAGS) + +[Unit113] +FileName=..\libpcsxcore\gte_divider.h +CompileCpp=1 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit114] +FileName=..\libpcsxcore\sjisfont.h +CompileCpp=1 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit115] +FileName=..\libpcsxcore\gpu.c +CompileCpp=0 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c gpu.c -o gpu.o $(CFLAGS) + +[Unit116] +FileName=..\libpcsxcore\gpu.h +CompileCpp=1 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/pcsxr.rc pcsxr-unstable-1.9.94+svn98108/win32/pcsxr.rc --- pcsxr-unstable-1.9.94+svn97809/win32/pcsxr.rc 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/pcsxr.rc 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,417 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "080404b0" + BEGIN + VALUE "CompanyName", "http://pcsxr.codeplex.com/" + VALUE "FileDescription", "Playstation Emulator based on PCSX-df" + VALUE "FileVersion", "1, 9, 95, 0" + VALUE "InternalName", "pcsxr" + VALUE "LegalCopyright", "Copyright (c) 2013" + VALUE "OriginalFilename", "pcsxr.exe" + VALUE "ProductName", "PCSX-Reloaded" + VALUE "ProductVersion", "1, 9, 95, 0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x804, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_MCDCONF DIALOGEX 0, 0, 407, 197 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Memcard Manager" +FONT 8, "MS Sans Serif", 0, 0, 0x0 +BEGIN + DEFPUSHBUTTON "OK",IDOK,285,175,50,14 + PUSHBUTTON "Cancel",IDCANCEL,345,175,50,14 + EDITTEXT IDC_MCD1,10,155,160,14,ES_AUTOHSCROLL + EDITTEXT IDC_MCD2,235,155,160,14,ES_AUTOHSCROLL + PUSHBUTTON "Select Mcd",IDC_MCDSEL1,10,135,50,14 + PUSHBUTTON "Select Mcd",IDC_MCDSEL2,235,135,50,14 + GROUPBOX "Memory Card 2",IDC_FRAMEMCD2,230,5,170,125 + PUSHBUTTON "Format Mcd",IDC_FORMAT1,65,135,50,14 + GROUPBOX "Memory Card 1",IDC_FRAMEMCD1,5,5,170,125 + PUSHBUTTON "Format Mcd",IDC_FORMAT2,290,135,50,14 + CONTROL "List3",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,10,15,160,110 + CONTROL "List3",IDC_LIST2,"SysListView32",LVS_REPORT | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,235,15,160,110 + PUSHBUTTON "Reload Mcd",IDC_RELOAD1,120,135,50,14 + PUSHBUTTON "Reload Mcd",IDC_RELOAD2,345,135,50,14 + PUSHBUTTON "-> Copy ->",IDC_COPYTO2,180,30,45,14 + PUSHBUTTON "<- Copy <-",IDC_COPYTO1,180,50,45,14 + PUSHBUTTON "Paste",IDC_PASTE,180,70,45,14 + PUSHBUTTON "<- Un/Delete",IDC_DELETE1,180,90,45,14 + PUSHBUTTON "Un/Delete ->",IDC_DELETE2,180,110,45,14 +END + +ABOUT_DIALOG DIALOGEX 0, 0, 332, 209 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,134,187,50,14 + CTEXT "PCSXR EMU\nVersion x.x",IDC_PCSXR_ABOUT_TEXT,22,10,112,15,0,WS_EX_TRANSPARENT + CTEXT "PCSXR a psx emulator...",IDC_PCSXR_ABOUT_AUTHORS,10,35,135,63,0,WS_EX_TRANSPARENT + CTEXT "Greets to...",IDC_PCSXR_ABOUT_GREETS,45,110,232,65 + CONTROL 113,IDC_STATIC,"Static",SS_BITMAP | WS_BORDER,155,10,171,101 + GROUPBOX "",IDC_STATIC,5,25,145,77 + GROUPBOX "",IDC_STATIC,43,100,234,79 +END + +IDD_CPUCONF DIALOGEX 0, 0, 232, 311 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Cpu Config" +FONT 8, "MS Sans Serif", 0, 0, 0x0 +BEGIN + DEFPUSHBUTTON "OK",IDOK,51,289,50,14 + PUSHBUTTON "Cancel",IDCANCEL,120,289,50,14 + GROUPBOX "Misc Options",IDC_MISCOPT,5,5,220,236 + CONTROL "Disable Xa Decoding",IDC_XA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,15,205,10 + CONTROL "Sio Irq Always Enabled",IDC_SIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,30,205,10 + CONTROL "Spu Irq Always Enabled",IDC_SPUIRQ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,45,205,10 + CONTROL "Black && White Movies",IDC_MDEC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,60,205,10 + CONTROL "Disable Cd Audio",IDC_CDDA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,75,205,10 + CONTROL "Slow Boot",IDC_SLOWBOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,90,205,10 + CONTROL "Enable Console Output",IDC_PSXOUT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,105,205,10 + CONTROL "Enable Interpreter Cpu",IDC_CPU,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,120,205,10 + CONTROL "Enable Debugger",IDC_DEBUG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,135,205,10 + CONTROL "Parasite Eve 2, Vandal Hearts 1/2 Fix",IDC_RCNTFIX, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,150,205,10 + CONTROL "InuYasha Sengoku Battle Fix",IDC_VSYNCWA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,165,205,10 + CONTROL "Widescreen (GTE Hack)",IDC_WIDESCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,180,205,10 + GROUPBOX "Select Psx System Type",IDC_SELPSX,5,246,220,35 + CONTROL "Autodetect",IDC_PSXAUTO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,260,80,10 + COMBOBOX IDC_PSXTYPES,105,260,53,50,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + CONTROL "Hide cursor",IDC_HIDECURSOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,195,205,10 + CONTROL "Save window position",IDC_SAVEWINDOWPOS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,210,205,10 + CONTROL "Compatibility hacks (Raystorm/VH-D/MML/Cart World/...)",IDC_HACKFIX, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,225,205,10 +END + +IDD_NETPLAY DIALOG 0, 0, 165, 95 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "NetPlay Configuration" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,55,75,50,14 + PUSHBUTTON "Cancel",IDCANCEL,110,75,50,14 + COMBOBOX IDC_LISTNET,10,15,145,74,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Configure...",IDC_CONFIGNET,10,35,45,12 + PUSHBUTTON "Test...",IDC_TESTNET,60,35,45,12 + PUSHBUTTON "About...",IDC_ABOUTNET,110,35,45,12 + RTEXT "NetPlay",IDC_NETPLAY,50,5,41,10,SS_CENTERIMAGE + CTEXT "Note: The NetPlay Plugin Directory should be the same as the other Plugins.",IDC_NETPLAYNOTE,10,50,145,19 +END + +IDD_CONNECT DIALOG 0, 0, 112, 31 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Connecting..." +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "Please wait while connecting... /",IDC_CONNECTSTR,5,10,104,8 +END + +IDD_CONFIG DIALOGEX 0, 0, 322, 187 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Configuration" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + COMBOBOX IDC_LISTGPU,10,10,145,74,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Configure...",IDC_CONFIGGPU,10,30,45,12 + PUSHBUTTON "Test...",IDC_TESTGPU,60,30,45,12 + PUSHBUTTON "About...",IDC_ABOUTGPU,110,30,45,12 + COMBOBOX IDC_LISTSPU,165,10,145,74,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Configure...",IDC_CONFIGSPU,165,30,45,12 + PUSHBUTTON "Test...",IDC_TESTSPU,215,30,45,12 + PUSHBUTTON "About...",IDC_ABOUTSPU,265,30,43,12 + COMBOBOX IDC_LISTCDR,10,100,145,74,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Configure...",IDC_CONFIGCDR,10,120,43,12 + PUSHBUTTON "Test...",IDC_TESTCDR,60,120,45,12 + PUSHBUTTON "About...",IDC_ABOUTCDR,110,120,45,12 + COMBOBOX IDC_LISTBIOS,10,147,145,74,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + DEFPUSHBUTTON "OK",IDOK,205,166,50,14 + PUSHBUTTON "Cancel",IDCANCEL,260,166,50,14 + CTEXT "Graphics",IDC_GRAPHICS,10,0,145,10,SS_CENTERIMAGE + CTEXT "Sound",IDC_SOUND,165,0,144,10,SS_CENTERIMAGE + CTEXT "Cdrom",IDC_CDROM,10,90,144,10,SS_CENTERIMAGE + CTEXT "Bios",IDC_BIOS,11,136,146,10,SS_CENTERIMAGE + COMBOBOX IDC_LISTPAD1,10,55,145,74,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Configure...",IDC_CONFIGPAD1,10,75,45,12 + PUSHBUTTON "Test...",IDC_TESTPAD1,60,75,45,12 + PUSHBUTTON "About...",IDC_ABOUTPAD1,110,75,45,12 + CTEXT "Second Controller",IDC_SECONDCONTROLLER,164,45,144,10,SS_CENTERIMAGE + COMBOBOX IDC_LISTPAD2,165,55,145,74,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Configure...",IDC_CONFIGPAD2,165,75,45,12 + PUSHBUTTON "Test...",IDC_TESTPAD2,215,75,45,12 + PUSHBUTTON "About...",IDC_ABOUTPAD2,265,75,45,12 + CTEXT "First Controller",IDC_FIRSTCONTROLLER,11,45,138,10,SS_CENTERIMAGE + PUSHBUTTON "Set Bios Directory",IDC_BIOSDIR,102,166,89,14 + PUSHBUTTON "Set Plugins Directory",IDC_PLUGINSDIR,10,166,89,14 + COMBOBOX IDC_LISTSIO1,165,100,145,74,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Configure...",IDC_CONFIGSIO1,165,119,43,12 + PUSHBUTTON "Test...",IDC_TESTSIO1,215,119,45,12 + PUSHBUTTON "About...",IDC_ABOUTSIO1,265,119,45,12 + CTEXT "Link cable",IDC_LINKCABLE,165,89,144,10,SS_CENTERIMAGE +END + +IDD_CHEATLIST DIALOGEX 0, 0, 392, 201 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Edit Cheat Codes" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + PUSHBUTTON "&Close",IDCANCEL,324,180,61,14 + CONTROL "List2",IDC_CODELIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,7,312,187 + PUSHBUTTON "&Enable/Disable",IDC_TOGGLECODE,324,7,61,14 + PUSHBUTTON "&Add Code",IDC_ADDCODE,324,32,61,14 + PUSHBUTTON "&Edit Code",IDC_EDITCODE,324,50,61,14 + PUSHBUTTON "&Remove Code",IDC_REMOVECODE,324,68,61,14 + PUSHBUTTON "&Load...",IDC_LOADCODE,324,96,61,14 + PUSHBUTTON "&Save As...",IDC_SAVECODE,324,114,61,14 +END + +IDD_CHEATSEARCH DIALOGEX 0, 0, 280, 214 +STYLE DS_SETFONT | DS_SETFOREGROUND | WS_POPUP | WS_CAPTION +CAPTION "Cheat Search" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + LTEXT "Search For:",IDC_LABEL_SEARCHFOR,7,9,51,8,0,WS_EX_TRANSPARENT + COMBOBOX IDC_SEARCHFOR,60,7,80,224,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Data Type:",IDC_LABEL_DATATYPE,7,26,51,8,0,WS_EX_TRANSPARENT + COMBOBOX IDC_DATATYPE,60,24,80,224,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Data Base:",IDC_LABEL_DATABASE,147,26,44,8,0,WS_EX_TRANSPARENT + COMBOBOX IDC_DATABASE,194,24,81,224,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Value:",IDC_LABEL_VALUE,7,43,50,8,0,WS_EX_TRANSPARENT + EDITTEXT IDC_VALUEFROM,60,41,80,12,ES_AUTOHSCROLL + RTEXT "To",IDC_LABEL_TO,144,43,45,8,0,WS_EX_TRANSPARENT + EDITTEXT IDC_VALUETO,194,41,80,12,ES_AUTOHSCROLL + LTEXT "Addresses Found : 0",IDC_LABEL_RESULTSFOUND,7,180,263,8,0,WS_EX_TRANSPARENT + LISTBOX IDC_RESLIST,6,62,199,112,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "&Freeze",IDC_FREEZE,213,63,62,17,WS_DISABLED + PUSHBUTTON "&Modify",IDC_MODIFY,213,86,62,17,WS_DISABLED + PUSHBUTTON "&Copy",IDC_COPY,213,109,62,17,WS_DISABLED + DEFPUSHBUTTON "&Search",IDC_SEARCH,8,194,86,14 + PUSHBUTTON "&New Search",IDC_NEWSEARCH,98,194,86,14 + PUSHBUTTON "C&lose",IDCANCEL,188,194,86,14 + EDITTEXT 10000,0,1000,10,10,ES_AUTOHSCROLL | NOT WS_BORDER | NOT WS_TABSTOP +END + +IDD_CHEATEDIT DIALOGEX 0, 0, 242, 161 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Edit Cheat Code" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,126,143,50,14 + PUSHBUTTON "Cancel",IDCANCEL,185,143,50,14 + LTEXT "Description:",IDC_LABEL_DESCR,7,6,39,8 + LTEXT "Cheat Code:",IDC_LABEL_CODE,6,40,42,8 + EDITTEXT IDC_DESCR,6,17,232,14,ES_AUTOHSCROLL + EDITTEXT IDC_CODE,6,52,231,84,ES_MULTILINE | ES_UPPERCASE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN +END + +IDD_CHEATVALEDIT DIALOGEX 0, 0, 162, 57 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Enter New Value" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,25,40,50,14 + PUSHBUTTON "Cancel",IDCANCEL,87,40,50,14 + LTEXT "Address:",IDC_LABEL_ADDRESS,7,7,30,8 + LTEXT "Value:",IDC_LABEL_VALUE,8,24,30,8 + EDITTEXT IDC_ADDRESS,41,4,113,12,ES_AUTOHSCROLL | WS_DISABLED + EDITTEXT IDC_VALUE,41,22,113,12,ES_AUTOHSCROLL +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_MCDCONF, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 400 + TOPMARGIN, 7 + BOTTOMMARGIN, 190 + END + + ABOUT_DIALOG, DIALOG + BEGIN + RIGHTMARGIN, 310 + BOTTOMMARGIN, 201 + END + + IDD_CPUCONF, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 225 + TOPMARGIN, 7 + BOTTOMMARGIN, 287 + END + + IDD_NETPLAY, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 158 + TOPMARGIN, 7 + BOTTOMMARGIN, 88 + END + + IDD_CONNECT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 105 + TOPMARGIN, 7 + BOTTOMMARGIN, 24 + END + + IDD_CONFIG, DIALOG + BEGIN + BOTTOMMARGIN, 173 + END + + IDD_CHEATLIST, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 385 + TOPMARGIN, 7 + BOTTOMMARGIN, 194 + END + + IDD_CHEATSEARCH, DIALOG + BEGIN + END + + IDD_CHEATEDIT, DIALOG + BEGIN + END + + IDD_CHEATVALEDIT, DIALOG + BEGIN + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_APP_ICON ICON "gui\\pcsxr.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +SPLASH_LOGO BITMAP "gui\\about.bmp" +MAIN_LOGO BITMAP "gui\\pcsxr.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// RT_MANIFEST +// + +1 RT_MANIFEST "gui\\pcsxr.exe.manifest" +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Greek (Greece) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ELL) +LANGUAGE LANG_GREEK, SUBLANG_DEFAULT +#pragma code_page(1253) + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // Greek (Greece) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/pcsxr.sln pcsxr-unstable-1.9.94+svn98108/win32/pcsxr.sln --- pcsxr-unstable-1.9.94+svn97809/win32/pcsxr.sln 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/pcsxr.sln 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,50 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DFSound", "plugins\dfsound\DFSound.vcxproj", "{DB25BF63-9B9E-4A40-A45E-BBBA49AD6F22}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DFXVideo", "plugins\dfxvideo\DFXVideo.vcxproj", "{30F06328-DD64-4030-AF7A-19FBC74CF298}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SSSPSXpad", "plugins\PadSSSPSX\PadSSSPSX.vcxproj", "{0639CDF3-8C1F-47F4-A760-F5568194A083}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpuPeopsOpenGL", "plugins\peopsxgl\gpuPeopsOpenGL.vcxproj", "{726BDE88-F2AD-4666-A4BC-5858F973976E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pcsxr", "pcsxr.vcxproj", "{9EEA62F5-46DC-4C07-AFE1-F72F9D6B9E3E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bladesio1", "plugins\bladesio1\bladesio1.vcxproj", "{F57B00CD-8399-4683-901E-11FA09727AE5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DB25BF63-9B9E-4A40-A45E-BBBA49AD6F22}.Debug|Win32.ActiveCfg = Debug|Win32 + {DB25BF63-9B9E-4A40-A45E-BBBA49AD6F22}.Debug|Win32.Build.0 = Debug|Win32 + {DB25BF63-9B9E-4A40-A45E-BBBA49AD6F22}.Release|Win32.ActiveCfg = Release|Win32 + {DB25BF63-9B9E-4A40-A45E-BBBA49AD6F22}.Release|Win32.Build.0 = Release|Win32 + {30F06328-DD64-4030-AF7A-19FBC74CF298}.Debug|Win32.ActiveCfg = Debug|Win32 + {30F06328-DD64-4030-AF7A-19FBC74CF298}.Debug|Win32.Build.0 = Debug|Win32 + {30F06328-DD64-4030-AF7A-19FBC74CF298}.Release|Win32.ActiveCfg = Release|Win32 + {30F06328-DD64-4030-AF7A-19FBC74CF298}.Release|Win32.Build.0 = Release|Win32 + {0639CDF3-8C1F-47F4-A760-F5568194A083}.Debug|Win32.ActiveCfg = Debug|Win32 + {0639CDF3-8C1F-47F4-A760-F5568194A083}.Debug|Win32.Build.0 = Debug|Win32 + {0639CDF3-8C1F-47F4-A760-F5568194A083}.Release|Win32.ActiveCfg = Release|Win32 + {0639CDF3-8C1F-47F4-A760-F5568194A083}.Release|Win32.Build.0 = Release|Win32 + {726BDE88-F2AD-4666-A4BC-5858F973976E}.Debug|Win32.ActiveCfg = Debug|Win32 + {726BDE88-F2AD-4666-A4BC-5858F973976E}.Debug|Win32.Build.0 = Debug|Win32 + {726BDE88-F2AD-4666-A4BC-5858F973976E}.Release|Win32.ActiveCfg = Release|Win32 + {726BDE88-F2AD-4666-A4BC-5858F973976E}.Release|Win32.Build.0 = Release|Win32 + {9EEA62F5-46DC-4C07-AFE1-F72F9D6B9E3E}.Debug|Win32.ActiveCfg = Debug|Win32 + {9EEA62F5-46DC-4C07-AFE1-F72F9D6B9E3E}.Debug|Win32.Build.0 = Debug|Win32 + {9EEA62F5-46DC-4C07-AFE1-F72F9D6B9E3E}.Release|Win32.ActiveCfg = Release|Win32 + {9EEA62F5-46DC-4C07-AFE1-F72F9D6B9E3E}.Release|Win32.Build.0 = Release|Win32 + {F57B00CD-8399-4683-901E-11FA09727AE5}.Debug|Win32.ActiveCfg = Debug|Win32 + {F57B00CD-8399-4683-901E-11FA09727AE5}.Debug|Win32.Build.0 = Debug|Win32 + {F57B00CD-8399-4683-901E-11FA09727AE5}.Release|Win32.ActiveCfg = Release|Win32 + {F57B00CD-8399-4683-901E-11FA09727AE5}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/pcsxr.vcxproj pcsxr-unstable-1.9.94+svn98108/win32/pcsxr.vcxproj --- pcsxr-unstable-1.9.94+svn97809/win32/pcsxr.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/pcsxr.vcxproj 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,481 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {9EEA62F5-46DC-4C07-AFE1-F72F9D6B9E3E} + pcsxr + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + .\Debug\ + .\Debug\ + false + false + .\Release\ + .\Release\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/pcsxr.tlb + + + + + /Zm200 %(AdditionalOptions) + Disabled + ../;./zlib;../libpcsxcore;./glue;./;./gui;./intl;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;__WIN32__;__i386__;PCSXR_VERSION="1.5";ENABLE_NLS;PACKAGE="pcsxr";inline=;ENABLE_SIO1API=1;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + .\Debug/pcsxr.pch + .\Debug/ + .\Debug/ + .\Debug/ + true + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0408 + + + odbc32.lib;odbccp32.lib;comctl32.lib;wsock32.lib;%(AdditionalDependencies) + $(SolutionDir)$(Configuration)\pcsxr.exe + true + true + .\Debug/pcsxr.pdb + Windows + MachineX86 + + + true + .\Debug/pcsxr.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/pcsxr.tlb + + + + + /Zm200 %(AdditionalOptions) + MaxSpeed + AnySuitable + ../;./zlib;../libpcsxcore;./glue;./;./gui;./intl;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;__WIN32__;_MSC_VER_;PCSXR_VERSION="1.5";__i386__;ENABLE_NLS;PACKAGE="pcsxr";inline=__forceinline;ENABLE_SIO1API=1;%(PreprocessorDefinitions) + true + MultiThreaded + 16Bytes + true + .\Release/pcsxr.pch + .\Release/ + .\Release/ + .\Release/ + true + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0408 + + + odbc32.lib;odbccp32.lib;comctl32.lib;wsock32.lib;%(AdditionalDependencies) + .\Release/pcsxr.exe + true + Windows + MachineX86 + + + true + .\Release/pcsxr.bsc + + + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/pcsxr.vcxproj.filters pcsxr-unstable-1.9.94+svn98108/win32/pcsxr.vcxproj.filters --- pcsxr-unstable-1.9.94+svn97809/win32/pcsxr.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/pcsxr.vcxproj.filters 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,378 @@ + + + + + {ec95fe4a-9af2-4149-9084-07a8af1455ed} + + + {fbc09cea-5b71-484b-94da-16bb339e13be} + + + {86fc40af-6bfa-43ae-8648-bac5191a5ce1} + + + {014c7814-ebe0-443e-bdf1-0e07fe0508f6} + + + {d3639188-eb44-4961-9d3c-fd2189b4c22f} + + + {b78acda2-160b-446b-be41-2048d552068d} + + + {2fc9bc1d-cd0d-4c0e-a6ff-d26d53d52434} + + + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore\ix86 + + + libpcsxcore\ix86 + + + gui + + + gui + + + gui + + + gui + + + gui + + + intl + + + intl + + + intl + + + intl + + + intl + + + intl + + + intl + + + intl + + + intl + + + intl + + + intl + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore + + + libpcsxcore\ix86 + + + libpcsxcore\ix86 + + + gui + + + gui + + + gui + + + gui + + + glue + + + glue\sys + + + intl + + + intl + + + intl + + + intl + + + intl + + + intl + + + intl + + + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + zlib + + + + + gui + + + gui + + + gui + + + + + gui + + + + + + \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/pcsxr.vcxproj.user pcsxr-unstable-1.9.94+svn98108/win32/pcsxr.vcxproj.user --- pcsxr-unstable-1.9.94+svn97809/win32/pcsxr.vcxproj.user 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/pcsxr.vcxproj.user 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/bladesio1.def pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/bladesio1.def --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/bladesio1.def 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/bladesio1.def 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,47 @@ +; Declares the module parameters for the DLL. + +LIBRARY "bladesio1" + +EXPORTS + ; Explicit exports can go here + PSEgetLibType @2 + PSEgetLibName @3 + PSEgetLibVersion @4 + SIO1configure @5 + SIO1about @6 + SIO1test @7 + SIO1init @8 + SIO1shutdown @9 + SIO1open @10 + SIO1close @11 + + SIO1pause @12 + SIO1resume @13 + SIO1keypressed @14 + + SIO1writeData8 @15 + SIO1writeData16 @16 + SIO1writeData32 @17 + SIO1writeStat16 @18 + SIO1writeStat32 @19 + SIO1writeMode16 @20 + SIO1writeMode32 @21 + SIO1writeCtrl16 @22 + SIO1writeCtrl32 @23 + SIO1writeBaud16 @24 + SIO1writeBaud32 @25 + + SIO1readData8 @26 + SIO1readData16 @27 + SIO1readData32 @28 + SIO1readStat16 @29 + SIO1readStat32 @30 + SIO1readMode16 @31 + SIO1readMode32 @32 + SIO1readCtrl16 @33 + SIO1readCtrl32 @34 + SIO1readBaud16 @35 + SIO1readBaud32 @36 + + SIO1update @37 + SIO1registerCallback @38 diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/bladesio1.rc pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/bladesio1.rc --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/bladesio1.rc 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/bladesio1.rc 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,199 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// Use MFC if available +// +#if defined(_MFC_VER) +#include "afxres.h" +#else +#include "WinResrc.h" +#include +#endif + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Polish (Poland) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_PLK) +LANGUAGE LANG_POLISH, SUBLANG_DEFAULT +#pragma code_page(1250) + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#define _AFX_NO_SPLITTER_RESOURCES\r\n" + "#define _AFX_NO_OLE_RESOURCES\r\n" + "#define _AFX_NO_TRACKER_RESOURCES\r\n" + "#define _AFX_NO_PROPERTY_RESOURCES\r\n" + "\r\n" + "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#endif\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // Polish (Poland) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Neutral resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#pragma code_page(1251) + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUT DIALOGEX 0, 0, 177, 52 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,63,30,44,14 + LTEXT "Version :",IDC_STATIC,5,5,37,9 + LTEXT "Coded by :",IDC_STATIC,5,16,42,9 + LTEXT "1.0",IDC_STATIC,52,6,25,9 + LTEXT "edgbla",IDC_STATIC,53,16,26,9 + LTEXT "",IDC_STATIC,91,16,76,9 +END + +IDD_CFGDLG DIALOGEX 0, 0, 253, 163 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Link Cable Configuration" +FONT 8, "MS Sans Serif", 0, 0, 0x0 +BEGIN + DEFPUSHBUTTON "OK",IDOK,151,142,45,14 + PUSHBUTTON "Cancel",IDCANCEL,201,142,45,14 + GROUPBOX "General settings",IDC_STATIC,7,2,239,135 + CONTROL "Disabled",IDC_DISABLED,"Button",BS_AUTORADIOBUTTON,14,75,87,10 + CONTROL "Server (Player 1)",IDC_SERVER,"Button",BS_AUTORADIOBUTTON,14,88,89,10 + CONTROL "Client (Player 2)",IDC_CLIENT,"Button",BS_AUTORADIOBUTTON,14,102,89,10 + LTEXT "Port number:",IDC_STATIC,15,120,63,8 + EDITTEXT IDC_IP,106,100,101,14,ES_AUTOHSCROLL + EDITTEXT IDC_PORT,106,118,40,14,ES_AUTOHSCROLL + LTEXT "Select here if you'll be Server (Player1) or Client (Player2).",IDC_STATIC,15,15,223,8 + LTEXT "If you select Server you must Copy your IP address",IDC_STATIC,15,26,223,8 + LTEXT "to the Clipboard and paste if (Ctrl+V) wherever the Client can see it.",IDC_STATIC,15,37,222,8 + LTEXT "If you selected Client please enter the IP address the Server",IDC_STATIC,15,48,223,8 + LTEXT "gave to you in the IP Address Control.",IDC_STATIC,15,59,221,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_ABOUT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 170 + TOPMARGIN, 7 + BOTTOMMARGIN, 45 + END + + IDD_CFGDLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 246 + TOPMARGIN, 7 + BOTTOMMARGIN, 156 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,1,0 + PRODUCTVERSION 1,0,1,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "FileDescription", "bladesio1" + VALUE "FileVersion", "1.0.1.0" + VALUE "InternalName", "bladesio1" + VALUE "OriginalFilename", "bladesio1.dll" + VALUE "ProductName", "bladesio1" + VALUE "ProductVersion", "1.0.1.0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // Neutral resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#define _AFX_NO_SPLITTER_RESOURCES +#define _AFX_NO_OLE_RESOURCES +#define _AFX_NO_TRACKER_RESOURCES +#define _AFX_NO_PROPERTY_RESOURCES + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/bladesio1.sln pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/bladesio1.sln --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/bladesio1.sln 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/bladesio1.sln 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bladesio1", "bladesio1.vcxproj", "{F57B00CD-8399-4683-901E-11FA09727AE5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F57B00CD-8399-4683-901E-11FA09727AE5}.Debug|Win32.ActiveCfg = Debug|Win32 + {F57B00CD-8399-4683-901E-11FA09727AE5}.Debug|Win32.Build.0 = Debug|Win32 + {F57B00CD-8399-4683-901E-11FA09727AE5}.Release|Win32.ActiveCfg = Release|Win32 + {F57B00CD-8399-4683-901E-11FA09727AE5}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/bladesio1.vcxproj pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/bladesio1.vcxproj --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/bladesio1.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/bladesio1.vcxproj 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,182 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {F57B00CD-8399-4683-901E-11FA09727AE5} + bladesio1 + + + + DynamicLibrary + false + + + DynamicLibrary + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + .\Release\ + .\Release\ + false + .\Debug\ + .\Debug\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/bladesio1.tlb + + + + + MaxSpeed + OnlyExplicitInline + .\;.\winsrc;..\..\..\plugins\bladesio1;..\..\..\libpcsxcore;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + .\Release/bladesio1.pch + .\Release/ + .\Release/ + .\Release/ + true + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0407 + + + winmm.lib;ws2_32.lib;%(AdditionalDependencies) + .\Release/bladesio1.dll + true + .\bladesio1.def + .\Release/bladesio1.pdb + Windows + false + + + .\Release/bladesio1.lib + MachineX86 + + + true + .\Release/bladesio1.bsc + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/bladesio1.tlb + + + + + Disabled + .\;.\winsrc;..\..\..\plugins\bladesio1;..\..\..\libpcsxcore;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + .\Debug/bladesio1.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0407 + + + winmm.lib;ws2_32.lib;%(AdditionalDependencies) + $(SolutionDir)$(Configuration)\bladesio1.dll + true + .\bladesio1.def + true + .\Debug/bladesio1.pdb + Windows + false + + + .\Debug/bladesio1.lib + MachineX86 + + + true + .\Debug/bladesio1.bsc + + + + + + + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/bladesio1.vcxproj.filters pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/bladesio1.vcxproj.filters --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/bladesio1.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/bladesio1.vcxproj.filters 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,55 @@ + + + + + {b54538cc-5b42-4480-adf8-44c08f01d6c6} + + + {394ea6fd-453d-4665-ac08-c0c5d867918b} + + + + + winsrc + + + bladesio1 + + + bladesio1 + + + bladesio1 + + + winsrc + + + + + + bladesio1 + + + bladesio1 + + + bladesio1 + + + winsrc + + + bladesio1 + + + winsrc + + + + + + + + + \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/bladesio1.vcxproj.user pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/bladesio1.vcxproj.user --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/bladesio1.vcxproj.user 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/bladesio1.vcxproj.user 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/resource.h pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/resource.h --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/resource.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/resource.h 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,57 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by bladesio1.rc +// +#define IDC_SETS1 3 +#define IDC_SETS2 4 +#define IDOK2 5 +#define IDD_DIALOG1 130 +#define IDD_ABOUT 130 +#define IDD_CFGDLG 131 +#define IDC_XAVOLUME 1004 +#define IDC_ENABXA 1005 +#define IDC_XAPITCH 1006 +#define IDC_XABLOCK 1007 +#define IDC_USETIMER 1007 +#define IDC_CMIXRATE 1008 +#define IDC_USEIRQ 1008 +#define IDC_USEREVERB 1008 +#define IDC_CMODE 1009 +#define IDC_VOLUME 1009 +#define IDC_CFILTER 1010 +#define IDC_IRQWAIT 1010 +#define IDC_CQUALITY 1011 +#define IDC_DEBUGMODE 1011 +#define IDC_CDSOUND 1012 +#define IDC_INTERPOL 1012 +#define IDC_PLAYALWAYS 1013 +#define IDC_RECORDMODE 1013 +#define IDC_IGNOREPITCH 1014 +#define IDC_DISSTEREO 1014 +#define IDC_AMPLIF 1015 +#define IDC_IRQDECODE 1015 +#define IDC_VENVELOPE 1016 +#define IDC_VOL1 1016 +#define IDC_REVERB 1017 +#define IDC_VOL2 1017 +#define IDC_VOL3 1018 +#define IDC_VOL4 1019 +#define IDC_XA 1133 +#define IDC_FREQRESPONSE 1136 +#define IDC_DISABLED 1137 +#define IDC_SERVER 1138 +#define IDC_CLIENT 1139 +#define IDC_IP 1141 +#define IDC_EDIT2 1145 +#define IDC_PORT 1145 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 144 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1146 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/winsrc/cfg-winapi.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/winsrc/cfg-winapi.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/winsrc/cfg-winapi.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/winsrc/cfg-winapi.c 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,138 @@ +/*************************************************************************** + * Copyright (C) 2013 by Blade_Arma * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + ***************************************************************************/ + +#include "stdafx.h" +#include "typedefs.h" +#include "cfg-winapi.h" +#include "sio1.h" + +/***************************************************************************/ + +void settingsRead() { + HKEY myKey; + DWORD temp; + DWORD type; + DWORD size; + + settings.player = PLAYER_DISABLED; + strcpy(settings.ip, "127.0.0.1"); + settings.port = 33307; + + if(RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Vision Thing\\PSEmu Pro\\SIO1\\bladesio1",0,KEY_ALL_ACCESS,&myKey) == ERROR_SUCCESS) { + size = 4; + if(RegQueryValueEx(myKey, "player", 0, &type, (LPBYTE)&temp, &size) == ERROR_SUCCESS) + settings.player = (int)temp; + size = sizeof(settings.ip); + RegQueryValueEx(myKey, "ip", 0, &type, (LPBYTE)settings.ip, &size); + size = 4; + if(RegQueryValueEx(myKey, "port", 0, &type, (LPBYTE)&temp, &size) == ERROR_SUCCESS) + settings.port = (int)temp; + + RegCloseKey(myKey); + } +} + +void settingsWrite() { + HKEY myKey; + DWORD myDisp; + DWORD temp; + + RegCreateKeyEx(HKEY_CURRENT_USER, "Software\\Vision Thing\\PSEmu Pro\\SIO1\\bladesio1", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &myKey, &myDisp); + temp = settings.player; + RegSetValueEx(myKey, "player", 0, REG_DWORD, (LPBYTE)&temp, sizeof(temp)); + RegCreateKeyEx(HKEY_CURRENT_USER,"Software\\Vision Thing\\PSEmu Pro\\SIO1\\bladesio1", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &myKey, &myDisp); + RegSetValueEx(myKey, "ip", 0, REG_SZ, (BYTE*)settings.ip, strlen(settings.ip)); + RegCreateKeyEx(HKEY_CURRENT_USER,"Software\\Vision Thing\\PSEmu Pro\\SIO1\\bladesio1", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &myKey, &myDisp); + temp = settings.port; + RegSetValueEx(myKey, "port", 0, REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + + RegCloseKey(myKey); +} + +/***************************************************************************/ + +BOOL OnInitSio1Dialog(HWND hW) { + char str[32]; + + settingsRead(); + + CheckRadioButton(hW, IDC_DISABLED, IDC_CLIENT, IDC_DISABLED + settings.player); + SetDlgItemText(hW, IDC_IP, settings.ip); + sprintf(str, "%i", settings.port); + SetDlgItemText(hW, IDC_PORT, str); + + return TRUE; +} + +void OnSio1OK(HWND hW) { + char str[32]; + + if(IsDlgButtonChecked(hW,IDC_DISABLED)) + settings.player = 0; + if(IsDlgButtonChecked(hW,IDC_SERVER)) + settings.player = 1; + if(IsDlgButtonChecked(hW,IDC_CLIENT)) + settings.player = 2; + GetDlgItemText(hW,IDC_IP, settings.ip, sizeof(settings.ip)); + GetDlgItemText(hW,IDC_PORT, str, sizeof(str)); + settings.port = atoi(str); + + settingsWrite(); + + EndDialog(hW,TRUE); +} + +void OnSio1Cancel(HWND hW) { + EndDialog(hW,FALSE); +} + +BOOL CALLBACK Sio1DlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + switch(uMsg) { + case WM_INITDIALOG: + return OnInitSio1Dialog(hW); + case WM_COMMAND: { + switch(LOWORD(wParam)) { + case IDCANCEL: + OnSio1Cancel(hW); + return TRUE; + case IDOK: + OnSio1OK(hW); + return TRUE; + } + } + } + + return FALSE; +} + +BOOL CALLBACK AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + switch(uMsg) { + case WM_COMMAND: { + switch(LOWORD(wParam)) { + case IDOK: + EndDialog(hW,TRUE); + return TRUE; + } + } + } + + return FALSE; +} + +/***************************************************************************/ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/winsrc/cfg-winapi.h pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/winsrc/cfg-winapi.h --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/winsrc/cfg-winapi.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/winsrc/cfg-winapi.h 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,32 @@ +/*************************************************************************** + * Copyright (C) 2013 by Blade_Arma * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + ***************************************************************************/ + +#ifndef _CFG_H_ +#define _CFG_H_ + +#include + +/***************************************************************************/ + +extern BOOL CALLBACK Sio1DlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); +extern BOOL CALLBACK AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); + +/***************************************************************************/ + +#endif // _CFG_H_ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/winsrc/stdafx.h pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/winsrc/stdafx.h --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/winsrc/stdafx.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/winsrc/stdafx.h 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,32 @@ +/*************************************************************************** + * Copyright (C) 2013 by Blade_Arma * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + ***************************************************************************/ + +#ifndef _STDAFX_H_ +#define _STDAFX_H_ + +#include +#include +#include + +#include +#include "resource.h" + +extern HINSTANCE hInst; + +#endif // _STDAFX_H_ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/winsrc/winmain.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/winsrc/winmain.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/bladesio1/winsrc/winmain.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/bladesio1/winsrc/winmain.c 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,27 @@ +/*************************************************************************** + * Copyright (C) 2013 by Blade_Arma * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + ***************************************************************************/ + +#include + +HINSTANCE hInst = NULL; + +BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { + hInst = (HINSTANCE)hModule; + return TRUE; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/DFSound.def pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/DFSound.def --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/DFSound.def 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/DFSound.def 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,45 @@ +; Declares the module parameters for the DLL. + +LIBRARY "DFSound" + +EXPORTS + ; Explicit exports can go here + PSEgetLibType @2 + PSEgetLibName @3 + PSEgetLibVersion @4 + SPUconfigure @5 + SPUabout @6 + SPUinit @7 + SPUshutdown @8 + SPUtest @9 + SPUopen @10 + SPUclose @11 + + SPUplayADPCMchannel @12 + SPUwriteRegister @13 + SPUreadRegister @14 + SPUregisterCallback @15 + + SPUwriteDMA @16 + SPUreadDMA @17 + SPUregisterCDDAVolume @18 + SPUwriteDMAMem @19 + SPUreadDMAMem @20 + SPUfreeze @21 + ;SPUupdate @22 + SPUasync @23 + + SPUplayCDDAchannel @24 + + SPUgetOne @25 + SPUputOne @26 + SPUplaySample @27 + SPUsetAddr @28 + SPUsetPitch @29 + SPUsetVolumeL @30 + SPUsetVolumeR @31 + SPUstartChannels1 @32 + SPUstartChannels2 @33 + SPUstopChannels1 @34 + SPUstopChannels2 @35 + SPUplaySector @36 diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/DFSound.dev pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/DFSound.dev --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/DFSound.dev 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/DFSound.dev 2016-06-30 16:53:26.000000000 +0000 @@ -0,0 +1,369 @@ +[Project] +FileName=DFSound.dev +Name=DFSound +Ver=1 +IsCpp=1 +Type=3 +Compiler=-W -DWIN32 -DNDEBUG -D_WINDOWS_@@_ +CppCompiler=-W -DWIN32 -DNDEBUG -D_WINDOWS_@@_ +Includes=.\\;.\winsrc;..\..\..\plugins\dfsound;..\..\glue;..\..\..\libpcsxcore +Linker=--enable-stdcall-fixup -ldsound -lwinmm -luser32 -lgdi32 -ladvapi32 -def DFSound.def_@@_ +Libs= +UnitCount=31 +Folders=dfsound,winsrc +ObjFiles= +PrivateResource=DFSound_private.rc +ResourceIncludes= +MakeIncludes= +Icon= +ExeOutput= +ObjectOutput= +OverrideOutput=0 +OverrideOutputName=DFSound.exe +HostApplication= +CommandLine= +UseCustomMakefile=0 +CustomMakefile= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0010000001001000010100 + +[Unit1] +FileName=winsrc\cfg.c +Folder=winsrc +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit2] +FileName=winsrc\debug.c +Folder=winsrc +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit3] +FileName=winsrc\debug.h +Folder=winsrc +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit4] +FileName=winsrc\dsound.c +Folder=winsrc +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit5] +FileName=winsrc\dsound.h +Folder=winsrc +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit6] +FileName=winsrc\psemu.c +Folder=winsrc +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit7] +FileName=winsrc\record.c +Folder=winsrc +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit8] +FileName=winsrc\record.h +Folder=winsrc +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit9] +FileName=winsrc\winmain.c +Folder=winsrc +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit10] +FileName=..\..\..\plugins\dfsound\adsr.c +Folder=dfsound +Compile=0 +CompileCpp=0 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c adsr.c -o adsr.o $(CFLAGS) + +[Unit11] +FileName=..\..\..\plugins\dfsound\adsr.h +Folder=dfsound +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit12] +FileName=..\..\..\plugins\dfsound\dma.c +Folder=dfsound +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit13] +FileName=..\..\..\plugins\dfsound\dma.h +Folder=dfsound +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit14] +FileName=..\..\..\plugins\dfsound\dsoundoss.h +Folder=dfsound +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit15] +FileName=..\..\..\plugins\dfsound\externals.h +Folder=dfsound +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit16] +FileName=..\..\..\plugins\dfsound\externals.c +Folder=dfsound +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit17] +FileName=..\..\..\plugins\dfsound\freeze.c +Folder=dfsound +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit18] +FileName=..\..\..\plugins\dfsound\gauss_i.h +Folder=dfsound +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit19] +FileName=..\..\..\plugins\dfsound\psemuxa.h +Folder=dfsound +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit20] +FileName=..\..\..\plugins\dfsound\registers.c +Folder=dfsound +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit21] +FileName=..\..\..\plugins\dfsound\registers.h +Folder=dfsound +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit22] +FileName=..\..\..\plugins\dfsound\regs.h +Folder=dfsound +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit23] +FileName=..\..\..\plugins\dfsound\reverb.c +Folder=dfsound +Compile=0 +CompileCpp=0 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c reverb.c -o reverb.o $(CFLAGS) + +[Unit24] +FileName=..\..\..\plugins\dfsound\reverb.h +Folder=dfsound +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit25] +FileName=..\..\..\plugins\dfsound\spu.c +Folder=dfsound +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit26] +FileName=..\..\..\plugins\dfsound\spu.h +Folder=dfsound +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit27] +FileName=..\..\..\plugins\dfsound\stdafx.h +Folder=dfsound +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit28] +FileName=..\..\..\plugins\dfsound\xa.c +Folder=dfsound +Compile=0 +CompileCpp=0 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c xa.c -o xa.o $(CFLAGS) + +[Unit29] +FileName=..\..\..\plugins\dfsound\xa.h +Folder=dfsound +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit30] +FileName=DFSound.def +Folder= +Compile=0 +CompileCpp=0 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit31] +FileName=DFSound.rc +Folder=Resources +Compile=1 +CompileCpp=1 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit32] +FileName=resource.h +Folder= +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=0.1 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename=DFSound.exe +ProductName=DFSound +ProductVersion=0.1 +AutoIncBuildNr=0 + diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/DFSound.rc pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/DFSound.rc --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/DFSound.rc 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/DFSound.rc 2016-06-30 16:53:26.000000000 +0000 @@ -0,0 +1,417 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// Use MFC if available +// +#if defined(_MFC_VER) +#include "afxres.h" +#else +#include "WinResrc.h" +#include +#endif + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Neutral resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#pragma code_page(936) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUT DIALOGEX 0, 0, 239, 175 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,98,155,44,14 + RTEXT "Version :",IDC_STATIC,5,5,74,9 + RTEXT "Based on :",IDC_STATIC,5,16,74,9 + RTEXT "Coded by :",IDC_STATIC,5,27,74,9 + RTEXT "Pete's EMail :",IDC_STATIC,5,40,74,9 + RTEXT "Pete's homepage :",IDC_STATIC,5,51,74,9 + LTEXT "1.0",IDC_STATIC,82,5,154,9 + LTEXT "P.E.Op.S DSound PSX SPU Audio Driver",IDC_STATIC,81,16,154,9 + LTEXT "Pete Bernert and the P.E.Op.S. team",IDC_STATIC,81,27,154,9 + LTEXT "BlackDove@addcom.de",IDC_STATIC,81,40,154,9 + LTEXT "http://www.pbernert.com",IDC_STATIC,81,51,154,9 + CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,9,107,218,41,WS_EX_DLGMODALFRAME + RTEXT "Greetings to:",IDC_STATIC,16,116,45,9 + LTEXT "_Demo_, Null2, Iori, Andy, Ben, Bilgerat, linuzappz and everybody else who is trying to create nice psx emu sounds :)",IDC_STATIC,65,116,153,27 + RTEXT "P.E.Op.S. homepage :",IDC_STATIC,5,91,74,9 + LTEXT "https://sourceforge.net/projects/peops/",IDC_STATIC,81,91,154,9 + RTEXT "linuzappz :",IDC_STATIC,10,63,69,10 + LTEXT "http://www.pcsx.net",IDC_STATIC,81,63,142,10 + RTEXT "kode54 :",IDC_STATIC,10,75,69,10 + LTEXT "http://home.earthlink.net/~kode54/",IDC_STATIC,81,75,142,10 +END + +IDD_CFGDLG DIALOGEX 0, 0, 253, 217 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Configure the P.E.Op.S. DSound PSX SPU Audio Driver..." +FONT 8, "MS Sans Serif", 0, 0, 0x0 +BEGIN + COMBOBOX IDC_USETIMER,54,14,186,44,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_VOLUME,54,30,186,62,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_USEREVERB,54,46,186,44,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_INTERPOL,54,62,186,62,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "Change XA speed, if it is played too fast (more cpu power needed)",IDC_XAPITCH, + "Button",BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | WS_TABSTOP,13,97,225,10 + CONTROL "SPU IRQ - wait for CPU action (Valkyrie Profile && MGS + SPUasync)",IDC_IRQWAIT, + "Button",BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | WS_TABSTOP,13,128,231,10 + CONTROL "Mono sound mode (for slower PCs/sound cards)",IDC_DISSTEREO, + "Button",BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | WS_TABSTOP,13,140,229,10 + CONTROL "Enable developer debug mode",IDC_DEBUGMODE,"Button",BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | WS_TABSTOP,13,164,229,10 + CONTROL "Enable sound recording window",IDC_RECORDMODE,"Button",BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | WS_TABSTOP,13,177,229,10 + DEFPUSHBUTTON "OK",IDOK,51,196,45,14 + PUSHBUTTON "Cancel",IDCANCEL,157,196,45,14 + RTEXT "Volume:",IDC_STATIC,22,32,29,10,SS_CENTERIMAGE + GROUPBOX "General settings",IDC_STATIC,4,2,245,81 + GROUPBOX "XA music",IDC_STATIC,4,85,245,27 + GROUPBOX "Misc",IDC_STATIC,4,115,245,77 + RTEXT "Reverb:",IDC_STATIC,22,48,29,10,SS_CENTERIMAGE + RTEXT "Mode:",IDC_STATIC,20,16,29,10,SS_CENTERIMAGE + RTEXT "Interpolation:",IDC_STATIC,8,64,43,10,SS_CENTERIMAGE + CONTROL "Enable frequency response - output filter",IDC_FREQRESPONSE, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,152,224,10 +END + +IDD_DEBUG DIALOG 0, 0, 397, 314 +STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Sound debug screen" +FONT 8, "MS Sans Serif" +BEGIN + GROUPBOX "XA",IDC_STATIC,201,249,92,61 + LTEXT "",IDC_SAREA,4,12,150,288,WS_BORDER + CONTROL "",IDC_MUTE1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,14,9,9 + CONTROL "1",IDC_CHAN1,"Button",BS_AUTORADIOBUTTON,168,14,22,9 + CONTROL "",IDC_MUTE2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,26,9,9 + CONTROL "2",IDC_CHAN2,"Button",BS_AUTORADIOBUTTON,168,26,22,9 + CONTROL "",IDC_MUTE3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,38,9,9 + CONTROL "3",IDC_CHAN3,"Button",BS_AUTORADIOBUTTON,168,38,22,9 + CONTROL "",IDC_MUTE4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,50,9,9 + CONTROL "4",IDC_CHAN4,"Button",BS_AUTORADIOBUTTON,168,50,22,9 + CONTROL "",IDC_MUTE5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,62,9,9 + CONTROL "5",IDC_CHAN5,"Button",BS_AUTORADIOBUTTON,168,62,22,9 + CONTROL "",IDC_MUTE6,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,74,9,9 + CONTROL "6",IDC_CHAN6,"Button",BS_AUTORADIOBUTTON,168,74,22,9 + CONTROL "",IDC_MUTE7,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,86,9,9 + CONTROL "7",IDC_CHAN7,"Button",BS_AUTORADIOBUTTON,168,86,22,9 + CONTROL "",IDC_MUTE8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,98,9,9 + CONTROL "8",IDC_CHAN8,"Button",BS_AUTORADIOBUTTON,168,98,22,9 + CONTROL "",IDC_MUTE9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,110,9,9 + CONTROL "9",IDC_CHAN9,"Button",BS_AUTORADIOBUTTON,168,110,22,9 + CONTROL "",IDC_MUTE10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,122,9,9 + CONTROL "10",IDC_CHAN10,"Button",BS_AUTORADIOBUTTON,168,122,22,9 + CONTROL "",IDC_MUTE11,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,134,9,9 + CONTROL "11",IDC_CHAN11,"Button",BS_AUTORADIOBUTTON,168,134,22,9 + CONTROL "",IDC_MUTE12,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,146,9,9 + CONTROL "12",IDC_CHAN12,"Button",BS_AUTORADIOBUTTON,168,146,22,9 + CONTROL "",IDC_MUTE13,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,158,9,9 + CONTROL "13",IDC_CHAN13,"Button",BS_AUTORADIOBUTTON,168,158,22,9 + CONTROL "",IDC_MUTE14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,170,9,9 + CONTROL "14",IDC_CHAN14,"Button",BS_AUTORADIOBUTTON,168,170,22,9 + CONTROL "",IDC_MUTE15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,182,9,9 + CONTROL "15",IDC_CHAN15,"Button",BS_AUTORADIOBUTTON,168,182,22,9 + CONTROL "",IDC_MUTE16,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,194,9,9 + CONTROL "16",IDC_CHAN16,"Button",BS_AUTORADIOBUTTON,168,194,22,9 + CONTROL "",IDC_MUTE17,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,206,9,9 + CONTROL "17",IDC_CHAN17,"Button",BS_AUTORADIOBUTTON,168,206,22,9 + CONTROL "",IDC_MUTE18,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,218,9,9 + CONTROL "18",IDC_CHAN18,"Button",BS_AUTORADIOBUTTON,168,218,22,9 + CONTROL "",IDC_MUTE19,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,230,9,9 + CONTROL "19",IDC_CHAN19,"Button",BS_AUTORADIOBUTTON,168,230,22,9 + CONTROL "",IDC_MUTE20,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,242,9,9 + CONTROL "20",IDC_CHAN20,"Button",BS_AUTORADIOBUTTON,168,242,22,9 + CONTROL "",IDC_MUTE21,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,254,9,9 + CONTROL "21",IDC_CHAN21,"Button",BS_AUTORADIOBUTTON,168,254,22,9 + CONTROL "",IDC_MUTE22,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,266,9,9 + CONTROL "22",IDC_CHAN22,"Button",BS_AUTORADIOBUTTON,168,266,22,9 + CONTROL "",IDC_MUTE23,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,278,9,9 + CONTROL "23",IDC_CHAN23,"Button",BS_AUTORADIOBUTTON,168,278,22,9 + CONTROL "",IDC_MUTE24,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,290,9,9 + CONTROL "24",IDC_CHAN24,"Button",BS_AUTORADIOBUTTON,168,290,22,9 + LTEXT "Streams",IDC_STATIC,6,2,55,8 + CTEXT "Mute/Select",IDC_STATIC,144,2,55,8 + LTEXT "",IDC_ADSR,208,25,176,55,WS_BORDER + RTEXT "Attack:",IDC_STATIC,221,84,30,9 + RTEXT "Decay:",IDC_STATIC,221,95,30,9 + RTEXT "Sustain:",IDC_STATIC,221,106,30,9 + RTEXT "Release:",IDC_STATIC,221,117,30,9 + LTEXT "---",IDC_SADSR1,254,84,44,9 + LTEXT "---",IDC_SADSR2,254,95,44,9 + LTEXT "---",IDC_SADSR3,254,106,44,9 + LTEXT "---",IDC_SADSR4,254,117,42,9 + RTEXT "Sustain level:",IDC_STATIC,302,84,44,9 + LTEXT "---",IDC_SADSR5,349,84,38,9 + RTEXT "Sustain inc.:",IDC_STATIC,302,95,44,9 + LTEXT "---",IDC_SADSR6,349,95,38,9 + RTEXT "Channel:",IDC_STATIC,204,2,30,8 + GROUPBOX "ADSR channel info",IDC_STATIC,201,14,190,119 + LTEXT "1",IDC_CHANNUM,238,2,33,8 + CONTROL 136,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_REALSIZEIMAGE,208,83,11,10 + CONTROL 137,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_REALSIZEIMAGE,208,94,11,10 + CONTROL 138,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_REALSIZEIMAGE,208,105,11,10 + CONTROL 139,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_REALSIZEIMAGE,208,116,11,10 + CONTROL 140,IDC_STATIC,"Static",SS_BITMAP | SS_REALSIZEIMAGE,4,302,150,8 + PUSHBUTTON "M0",IDC_MUTEOFF,157,300,15,10 + PUSHBUTTON "M1",IDC_MUTEON,174,300,15,10 + GROUPBOX "Generic channel info",IDC_STATIC,201,134,190,114 + RTEXT "On:",IDC_STATIC,210,146,41,9 + RTEXT "Stop:",IDC_STATIC,210,157,41,9 + RTEXT "Reverb:",IDC_STATIC,210,190,41,9 + RTEXT "Start pos:",IDC_STATIC,301,146,35,9 + RTEXT "Curr pos:",IDC_STATIC,301,157,35,9 + RTEXT "Loop pos:",IDC_STATIC,301,168,35,9 + RTEXT "Act freq:",IDC_STATIC,300,223,35,9 + RTEXT "Used freq:",IDC_STATIC,300,234,35,9 + RTEXT "Right vol:",IDC_STATIC,300,190,35,9 + RTEXT "Left vol:",IDC_STATIC,300,201,35,9 + RTEXT "Rvb active:",IDC_STATIC,210,201,41,9 + RTEXT "Rvb offset:",IDC_STATIC,210,223,41,9 + RTEXT "Rvb repeat:",IDC_STATIC,210,234,41,9 + RTEXT "Noise:",IDC_STATIC,210,168,41,9 + RTEXT "FMod:",IDC_STATIC,210,179,41,9 + RTEXT "Rvb number:",IDC_STATIC,210,212,41,9 + RTEXT "Irq addr.:",IDC_STATIC,300,262,35,9 + RTEXT "Curr adsr vol.:",IDC_STATIC,302,106,44,9 + LTEXT "---",IDC_SADSR7,349,106,38,9 + LTEXT "---",IDC_CI1,254,146,39,9 + LTEXT "---",IDC_CI2,254,157,39,9 + LTEXT "---",IDC_CI3,254,168,39,9 + LTEXT "---",IDC_CI4,254,179,39,9 + LTEXT "---",IDC_CI5,254,190,39,9 + LTEXT "---",IDC_CI6,254,201,39,9 + LTEXT "---",IDC_CI7,254,212,39,9 + LTEXT "---",IDC_CI8,254,223,39,9 + LTEXT "---",IDC_CI9,254,234,39,9 + LTEXT "---",IDC_CI10,339,146,46,9 + GROUPBOX "Spu states",IDC_STATIC,297,249,94,61 + LTEXT "---",IDC_CI11,339,157,46,9 + LTEXT "---",IDC_CI12,339,168,46,9 + LTEXT "---",IDC_CI13,339,190,23,9 + LTEXT "---",IDC_CI14,339,201,22,9 + LTEXT "---",IDC_CI15,339,223,46,9 + LTEXT "---",IDC_CI16,339,234,46,9 + LTEXT "---",IDC_STA1,339,262,46,9 + RTEXT "Raw envelope:",IDC_STATIC,296,117,50,9 + LTEXT "---",IDC_SADSR8,349,117,38,9 + RTEXT "Ctrl:",IDC_STATIC,300,273,35,9 + LTEXT "---",IDC_STA2,340,273,46,9 + RTEXT "Stat:",IDC_STATIC,300,284,35,9 + LTEXT "---",IDC_STA3,340,284,46,9 + RTEXT "Spu mem:",IDC_STATIC,300,295,35,9 + LTEXT "---",IDC_STA4,340,295,46,9 + RTEXT "Freq:",IDC_STATIC,204,258,31,9 + RTEXT "Stereo:",IDC_STATIC,204,268,31,9 + RTEXT "Samples:",IDC_STATIC,204,278,31,9 + RTEXT "Buffered:",IDC_STATIC,204,288,31,9 + LTEXT "---",IDC_XA1,239,258,46,9 + LTEXT "---",IDC_XA2,239,268,17,9 + LTEXT "---",IDC_XA3,239,278,46,9 + LTEXT "---",IDC_XA4,239,288,46,9 + LTEXT "---",IDC_CI17,367,190,18,9 + LTEXT "---",IDC_CI18,367,201,18,9 + LTEXT "---",IDC_XA5,239,298,22,9 + LTEXT "---",IDC_XA6,266,298,22,9 + RTEXT "Volume:",IDC_STATIC,204,298,31,9 +END + +IDD_RECORD DIALOG 0, 0, 248, 18 +STYLE DS_SETFONT | DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "P.E.Op.S. sound recording" +FONT 8, "MS Sans Serif" +BEGIN + RTEXT "Filename:",IDC_STATIC,3,5,33,9 + EDITTEXT IDC_WAVFILE,41,3,134,12,ES_AUTOHSCROLL + PUSHBUTTON "Start recording",IDC_RECORD,180,3,61,12 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_ABOUT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 232 + TOPMARGIN, 7 + BOTTOMMARGIN, 168 + END + + IDD_CFGDLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 246 + TOPMARGIN, 7 + BOTTOMMARGIN, 210 + END + + IDD_DEBUG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 390 + TOPMARGIN, 7 + BOTTOMMARGIN, 307 + END + + IDD_RECORD, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 241 + TOPMARGIN, 7 + BOTTOMMARGIN, 11 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,9,0 + PRODUCTVERSION 1,0,9,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Based on P.E.Op.S. DSound PSX SPU Audio driver by Pete Bernert and the P.E.Op.S. team" + VALUE "FileDescription", "DFSound" + VALUE "FileVersion", "1, 0, 9, 0" + VALUE "InternalName", "DFSound" + VALUE "OriginalFilename", "DFSound.DLL" + VALUE "ProductName", "DFSound" + VALUE "ProductVersion", "1, 0, 9, 0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // Neutral resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Polish resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_PLK) +#ifdef _WIN32 +LANGUAGE LANG_POLISH, SUBLANG_DEFAULT +#pragma code_page(1250) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#define _AFX_NO_SPLITTER_RESOURCES\r\n" + "#define _AFX_NO_OLE_RESOURCES\r\n" + "#define _AFX_NO_TRACKER_RESOURCES\r\n" + "#define _AFX_NO_PROPERTY_RESOURCES\r\n" + "\r\n" + "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#endif\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // Polish resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// German (Germany) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU) +#ifdef _WIN32 +LANGUAGE LANG_GERMAN, SUBLANG_GERMAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_BITMAP1 BITMAP "res\\bitmap1.bmp" +IDB_BITMAP2 BITMAP "res\\bitmap2.bmp" +IDB_BITMAP3 BITMAP "res\\bitmap3.bmp" +IDB_BITMAP4 BITMAP "res\\bitmap4.bmp" +IDB_BITMAP5 BITMAP "res\\bitmap5.bmp" +#endif // German (Germany) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#define _AFX_NO_SPLITTER_RESOURCES +#define _AFX_NO_OLE_RESOURCES +#define _AFX_NO_TRACKER_RESOURCES +#define _AFX_NO_PROPERTY_RESOURCES + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/DFSound.vcxproj pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/DFSound.vcxproj --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/DFSound.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/DFSound.vcxproj 2016-06-30 16:53:26.000000000 +0000 @@ -0,0 +1,263 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {DB25BF63-9B9E-4A40-A45E-BBBA49AD6F22} + DFSound + + + + DynamicLibrary + false + + + DynamicLibrary + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + .\Release\ + .\Release\ + false + .\Debug\ + .\Debug\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/DFSound.tlb + + + + + MaxSpeed + OnlyExplicitInline + .\;.\winsrc;..\..\..\plugins\dfsound;..\..\glue;..\..\..\libpcsxcore;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + .\Release/DFSound.pch + .\Release/ + .\Release/ + .\Release/ + true + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0407 + + + dsound.lib;winmm.lib;%(AdditionalDependencies) + .\Release/DFSound.dll + true + .\DFSound.def + .\Release/DFSound.pdb + Windows + false + + + .\Release/DFSound.lib + MachineX86 + + + true + .\Release/DFSound.bsc + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/DFSound.tlb + + + + + Disabled + .\;.\winsrc;..\..\..\plugins\dfsound;..\..\glue;..\..\..\libpcsxcore;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + .\Debug/DFSound.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0407 + + + dsound.lib;winmm.lib;%(AdditionalDependencies) + $(SolutionDir)$(Configuration)\DFSound.dll + true + .\DFSound.def + true + .\Debug/DFSound.pdb + Windows + false + + + .\Debug/DFSound.lib + MachineX86 + + + true + .\Debug/DFSound.bsc + + + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + true + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + true + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + true + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/DFSound.vcxproj.filters pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/DFSound.vcxproj.filters --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/DFSound.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/DFSound.vcxproj.filters 2016-06-30 16:53:26.000000000 +0000 @@ -0,0 +1,109 @@ + + + + + {7f60c61a-63bd-4623-97da-50b7c5934d07} + + + {de115a9f-f76e-4f24-a883-2ad4be594713} + + + + + winsrc + + + winsrc + + + winsrc + + + winsrc + + + winsrc + + + winsrc + + + dfsound + + + dfsound + + + dfsound + + + dfsound + + + dfsound + + + dfsound + + + dfsound + + + dfsound + + + + + winsrc + + + winsrc + + + winsrc + + + dfsound + + + dfsound + + + dfsound + + + dfsound + + + dfsound + + + dfsound + + + dfsound + + + dfsound + + + dfsound + + + dfsound + + + dfsound + + + dfsound + + + + + + + + + + \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/DFSound.vcxproj.user pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/DFSound.vcxproj.user --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/DFSound.vcxproj.user 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/DFSound.vcxproj.user 2016-06-30 16:53:26.000000000 +0000 @@ -0,0 +1,3 @@ + + + \ No newline at end of file Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/res/bitmap1.bmp and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/res/bitmap1.bmp differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/res/bitmap2.bmp and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/res/bitmap2.bmp differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/res/bitmap3.bmp and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/res/bitmap3.bmp differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/res/bitmap4.bmp and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/res/bitmap4.bmp differ Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/res/bitmap5.bmp and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/res/bitmap5.bmp differ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/resource.h pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/resource.h --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/resource.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/resource.h 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,149 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by DFSound.rc +// +#define IDC_SETS1 3 +#define IDC_SETS2 4 +#define IDOK2 5 +#define IDD_DIALOG1 130 +#define IDD_ABOUT 130 +#define IDD_CFGDLG 131 +#define IDD_DEBUG 135 +#define IDB_BITMAP1 136 +#define IDB_BITMAP2 137 +#define IDB_BITMAP3 138 +#define IDB_BITMAP4 139 +#define IDB_BITMAP5 140 +#define IDD_RECORD 141 +#define IDC_XAVOLUME 1004 +#define IDC_ENABXA 1005 +#define IDC_XAPITCH 1006 +#define IDC_XABLOCK 1007 +#define IDC_USETIMER 1007 +#define IDC_CMIXRATE 1008 +#define IDC_USEIRQ 1008 +#define IDC_USEREVERB 1008 +#define IDC_CMODE 1009 +#define IDC_VOLUME 1009 +#define IDC_CFILTER 1010 +#define IDC_IRQWAIT 1010 +#define IDC_CQUALITY 1011 +#define IDC_DEBUGMODE 1011 +#define IDC_CDSOUND 1012 +#define IDC_INTERPOL 1012 +#define IDC_PLAYALWAYS 1013 +#define IDC_RECORDMODE 1013 +#define IDC_IGNOREPITCH 1014 +#define IDC_DISSTEREO 1014 +#define IDC_AMPLIF 1015 +#define IDC_IRQDECODE 1015 +#define IDC_VENVELOPE 1016 +#define IDC_VOL1 1016 +#define IDC_REVERB 1017 +#define IDC_VOL2 1017 +#define IDC_VOL3 1018 +#define IDC_VOL4 1019 +#define IDC_SAREA 1022 +#define IDC_ADSR 1023 +#define IDC_MUTE1 1047 +#define IDC_MUTE2 1048 +#define IDC_MUTE3 1049 +#define IDC_MUTE4 1050 +#define IDC_MUTE5 1051 +#define IDC_MUTE6 1052 +#define IDC_MUTE7 1053 +#define IDC_MUTE8 1054 +#define IDC_MUTE9 1055 +#define IDC_MUTE10 1056 +#define IDC_MUTE11 1057 +#define IDC_MUTE12 1058 +#define IDC_MUTE13 1059 +#define IDC_MUTE14 1060 +#define IDC_MUTE15 1061 +#define IDC_MUTE16 1062 +#define IDC_MUTE17 1063 +#define IDC_MUTE18 1064 +#define IDC_MUTE19 1065 +#define IDC_MUTE20 1066 +#define IDC_MUTE21 1067 +#define IDC_MUTE22 1068 +#define IDC_MUTE23 1069 +#define IDC_MUTE24 1070 +#define IDC_CHAN1 1071 +#define IDC_CHAN2 1072 +#define IDC_CHAN3 1073 +#define IDC_CHAN4 1074 +#define IDC_CHAN5 1075 +#define IDC_CHAN6 1076 +#define IDC_CHAN7 1077 +#define IDC_CHAN8 1078 +#define IDC_CHAN9 1079 +#define IDC_CHAN10 1080 +#define IDC_CHAN11 1081 +#define IDC_CHAN12 1082 +#define IDC_CHAN13 1083 +#define IDC_CHAN14 1084 +#define IDC_CHAN15 1085 +#define IDC_CHAN16 1086 +#define IDC_CHAN17 1087 +#define IDC_CHAN18 1088 +#define IDC_CHAN19 1089 +#define IDC_CHAN20 1090 +#define IDC_CHAN21 1091 +#define IDC_CHAN22 1092 +#define IDC_CHAN23 1093 +#define IDC_CHAN24 1094 +#define IDC_SADSR1 1096 +#define IDC_SADSR2 1097 +#define IDC_SADSR3 1098 +#define IDC_SADSR4 1099 +#define IDC_SADSR5 1100 +#define IDC_SADSR6 1101 +#define IDC_CHANNUM 1102 +#define IDC_MUTEOFF 1103 +#define IDC_MUTEON 1104 +#define IDC_SADSR7 1105 +#define IDC_CI1 1106 +#define IDC_CI2 1107 +#define IDC_CI3 1108 +#define IDC_CI4 1109 +#define IDC_CI5 1110 +#define IDC_CI6 1111 +#define IDC_CI7 1112 +#define IDC_CI8 1113 +#define IDC_CI9 1114 +#define IDC_CI10 1115 +#define IDC_CI11 1116 +#define IDC_CI12 1117 +#define IDC_CI13 1118 +#define IDC_CI14 1119 +#define IDC_CI15 1120 +#define IDC_CI16 1121 +#define IDC_STA1 1122 +#define IDC_SADSR8 1123 +#define IDC_STA2 1124 +#define IDC_STA3 1125 +#define IDC_STA4 1126 +#define IDC_XA1 1127 +#define IDC_XA2 1128 +#define IDC_XA3 1129 +#define IDC_XA4 1130 +#define IDC_CI17 1131 +#define IDC_CI18 1132 +#define IDC_XA 1133 +#define IDC_WAVFILE 1134 +#define IDC_XA5 1135 +#define IDC_RECORD 1135 +#define IDC_XA6 1136 +#define IDC_FREQRESPONSE 1136 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 144 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1137 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/winsrc/cfg.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/winsrc/cfg.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/winsrc/cfg.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/winsrc/cfg.c 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,267 @@ +/*************************************************************************** + cfg.c - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "stdafx.h" + +#define _IN_CFG + +#include "externals.h" + +//////////////////////////////////////////////////////////////////////// +// WINDOWS CONFIG/ABOUT HANDLING +//////////////////////////////////////////////////////////////////////// + +#include "resource.h" + +//////////////////////////////////////////////////////////////////////// +// simple about dlg handler +//////////////////////////////////////////////////////////////////////// + +BOOL CALLBACK AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch(uMsg) + { + case WM_COMMAND: + { + switch(LOWORD(wParam)) + {case IDOK: EndDialog(hW,TRUE);return TRUE;} + } + } + return FALSE; +} + +//////////////////////////////////////////////////////////////////////// +// READ CONFIG: from win registry +//////////////////////////////////////////////////////////////////////// + +void ReadConfig(void) +{ + HKEY myKey; + DWORD temp; + DWORD type; + DWORD size; + + iVolume=1; // init vars + iXAPitch=1; + iUseTimer=2; + iSPUIRQWait=1; + iDebugMode=0; + iRecordMode=0; + iUseReverb=2; + iUseInterpolation=2; + iDisStereo=0; + iFreqResponse=0; + + if (RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Vision Thing\\PSEmu Pro\\SPU\\DFSound",0,KEY_ALL_ACCESS,&myKey)==ERROR_SUCCESS) + { + size = 4; + if(RegQueryValueEx(myKey,"Volume",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iVolume=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"XAPitch",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iXAPitch=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"UseTimer",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iUseTimer=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"SPUIRQWait",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iSPUIRQWait=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"FreqResponse",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iFreqResponse=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"DebugMode",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iDebugMode=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"RecordMode",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iRecordMode=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"UseReverb",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iUseReverb=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"UseInterpolation",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iUseInterpolation=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"DisStereo",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iDisStereo=(int)temp; + + RegCloseKey(myKey); + } + + if(iUseTimer>2) iUseTimer=2; // some checks + if(iVolume<1) iVolume=1; + if(iVolume>5) iVolume=5; +} + +//////////////////////////////////////////////////////////////////////// +// WRITE CONFIG: in win registry +//////////////////////////////////////////////////////////////////////// + +void WriteConfig(void) +{ + HKEY myKey; + DWORD myDisp; + DWORD temp; + + RegCreateKeyEx(HKEY_CURRENT_USER,"Software\\Vision Thing\\PSEmu Pro\\SPU\\DFSound",0,NULL,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL,&myKey,&myDisp); + temp=iVolume; + RegSetValueEx(myKey,"Volume",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iXAPitch; + RegSetValueEx(myKey,"XAPitch",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iUseTimer; + RegSetValueEx(myKey,"UseTimer",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iSPUIRQWait; + RegSetValueEx(myKey,"SPUIRQWait",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iFreqResponse; + RegSetValueEx(myKey,"FreqResponse",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iDebugMode; + RegSetValueEx(myKey,"DebugMode",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iRecordMode; + RegSetValueEx(myKey,"RecordMode",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iUseReverb; + RegSetValueEx(myKey,"UseReverb",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iUseInterpolation; + RegSetValueEx(myKey,"UseInterpolation",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iDisStereo; + RegSetValueEx(myKey,"DisStereo",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + + RegCloseKey(myKey); +} + +//////////////////////////////////////////////////////////////////////// +// INIT WIN CFG DIALOG +//////////////////////////////////////////////////////////////////////// + +BOOL OnInitDSoundDialog(HWND hW) +{ + HWND hWC; + + ReadConfig(); + + if(iXAPitch) CheckDlgButton(hW,IDC_XAPITCH,TRUE); + + hWC=GetDlgItem(hW,IDC_VOLUME); + ComboBox_AddString(hWC, "None"); + ComboBox_AddString(hWC, "Low"); + ComboBox_AddString(hWC, "Medium"); + ComboBox_AddString(hWC, "Loud"); + ComboBox_AddString(hWC, "Loudest"); + ComboBox_SetCurSel(hWC,5-iVolume); + + if(iSPUIRQWait) CheckDlgButton(hW,IDC_IRQWAIT,TRUE); + if(iDebugMode) CheckDlgButton(hW,IDC_DEBUGMODE,TRUE); + if(iRecordMode) CheckDlgButton(hW,IDC_RECORDMODE,TRUE); + if(iDisStereo) CheckDlgButton(hW,IDC_DISSTEREO,TRUE); + if(iFreqResponse) CheckDlgButton(hW,IDC_FREQRESPONSE,TRUE); + + hWC=GetDlgItem(hW,IDC_USETIMER); + ComboBox_AddString(hWC, "Fast mode (thread, less compatible spu timing)"); + ComboBox_AddString(hWC, "High compatibility mode (timer event, slower)"); + ComboBox_AddString(hWC, "Use SPUasync (must be supported by the emu)"); + ComboBox_SetCurSel(hWC,iUseTimer); + + hWC=GetDlgItem(hW,IDC_USEREVERB); + ComboBox_AddString(hWC, "No reverb (fastest)"); + ComboBox_AddString(hWC, "Simple reverb (fakes the most common effects)"); + ComboBox_AddString(hWC, "PSX reverb (best quality)"); + ComboBox_SetCurSel(hWC,iUseReverb); + + hWC=GetDlgItem(hW,IDC_INTERPOL); + ComboBox_AddString(hWC, "None (fastest)"); + ComboBox_AddString(hWC, "Simple interpolation"); + ComboBox_AddString(hWC, "Gaussian interpolation (good quality)"); + ComboBox_AddString(hWC, "Cubic interpolation (better treble)"); + ComboBox_SetCurSel(hWC,iUseInterpolation); + + return TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// WIN CFG DLG OK +//////////////////////////////////////////////////////////////////////// + +void OnDSoundOK(HWND hW) +{ + HWND hWC; + + if(IsDlgButtonChecked(hW,IDC_XAPITCH)) + iXAPitch=1; else iXAPitch=0; + + hWC=GetDlgItem(hW,IDC_VOLUME); + iVolume=5-ComboBox_GetCurSel(hWC); + + hWC=GetDlgItem(hW,IDC_USETIMER); + iUseTimer=ComboBox_GetCurSel(hWC); + + hWC=GetDlgItem(hW,IDC_USEREVERB); + iUseReverb=ComboBox_GetCurSel(hWC); + + hWC=GetDlgItem(hW,IDC_INTERPOL); + iUseInterpolation=ComboBox_GetCurSel(hWC); + + if(IsDlgButtonChecked(hW,IDC_IRQWAIT)) + iSPUIRQWait=1; else iSPUIRQWait=0; + + if(IsDlgButtonChecked(hW,IDC_DEBUGMODE)) + iDebugMode=1; else iDebugMode=0; + + if(IsDlgButtonChecked(hW,IDC_RECORDMODE)) + iRecordMode=1; else iRecordMode=0; + + if(IsDlgButtonChecked(hW,IDC_DISSTEREO)) + iDisStereo=1; else iDisStereo=0; + + if(IsDlgButtonChecked(hW,IDC_FREQRESPONSE)) + iFreqResponse=1; else iFreqResponse=0; + + WriteConfig(); // write registry + + EndDialog(hW,TRUE); +} + +//////////////////////////////////////////////////////////////////////// +// WIN CFG DLG CANCEL +//////////////////////////////////////////////////////////////////////// + +void OnDSoundCancel(HWND hW) +{ + EndDialog(hW,FALSE); +} + +//////////////////////////////////////////////////////////////////////// +// WIN CFG PROC +//////////////////////////////////////////////////////////////////////// + +BOOL CALLBACK DSoundDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch(uMsg) + { + case WM_INITDIALOG: + return OnInitDSoundDialog(hW); + + case WM_COMMAND: + { + switch(LOWORD(wParam)) + { + case IDCANCEL: OnDSoundCancel(hW);return TRUE; + case IDOK: OnDSoundOK(hW); return TRUE; + } + } + } + return FALSE; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/winsrc/debug.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/winsrc/debug.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/winsrc/debug.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/winsrc/debug.c 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,372 @@ +/*************************************************************************** + debug.c - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +//*************************************************************************// +// History of changes: +// +// 2004/09/18 - Pete +// - corrected ADSRX value display +// +// 2003/01/06 - Pete +// - added Neil's ADSR timings +// +// 2002/05/15 - Pete +// - generic cleanup for the Peops release +// +//*************************************************************************// + +#include "stdafx.h" + +#define _IN_DEBUG + +#include "externals.h" + +//////////////////////////////////////////////////////////////////////// +// WINDOWS DEBUG DIALOG HANDLING +//////////////////////////////////////////////////////////////////////// + +#ifdef _WINDOWS + +#include "resource.h" + +//#define SMALLDEBUG +//#include + +//////////////////////////////////////////////////////////////////////// +// display debug infos + +const COLORREF crStreamCol[]={ + RGB( 0, 0, 0), + RGB(255,255,255), + RGB(128, 0,128), + RGB( 0,128, 0), + RGB( 0, 0,255), + RGB(255, 0, 0) + }; + +const COLORREF crAdsrCol[] ={ + RGB( 0, 0, 0), + RGB(255, 0, 0), + RGB( 0,255, 0), + RGB(255, 0,255), + RGB( 0, 0,255), + RGB( 0, 0, 0), + }; + +HBRUSH hBStream[6]; // brushes for stream lines +HPEN hPAdsr[6]; // pens for adsr lines +int iSelChannel=0; // user selected channel + +//////////////////////////////////////////////////////////////////////// +// display the sound data waves: no subclassing used, so the +// area will not be redrawn... but faster that way, and good enuff +// for debugging purposes + +void DisplayStreamInfos(HWND hW) +{ + HWND hWS=GetDlgItem(hW,IDC_SAREA); + HDC hdc;RECT r;HBRUSH hBO;int ch,dy,i,j,id; + + //----------------------------------------------------// + + GetClientRect(hWS,&r); // get size of stream display + hdc=GetDC(hWS); // device context + r.right--; // leave the right border intact + ScrollDC(hdc,-1,0,&r,&r,NULL,NULL); // scroll one pixel to the left + + //----------------------------------------------------// + + hBO=SelectObject(hdc,hBStream[0]); // clean the right border + PatBlt(hdc,r.right-1,0,1,r.bottom,PATCOPY); + + //----------------------------------------------------// + + dy=r.bottom/MAXCHAN; // size of one channel area + + for(ch=0;ch get one channel data (-32k ... 32k) + j=(dy*j)/32768; if(j==0) j=1; // -> adjust to display coords + i=(dy/2)+(ch*r.bottom/MAXCHAN)-j/2; // -> position where to paint it + + + + if (s_chan[ch].iMute) id=1; // -> get color id + else if(s_chan[ch].bNoise) id=2; + else if(s_chan[ch].bFMod==2) id=3; + else if(s_chan[ch].bFMod==1) id=4; + else id=5; + + SelectObject(hdc,hBStream[id]); // -> select the brush + PatBlt(hdc,r.right-1,i,1,j,PATCOPY); // -> paint the value line + } + + if(ch) SetPixel(hdc,r.right-1, // -> not first line? + ch*r.bottom/MAXCHAN,RGB(0,0,0)); // --> draw the line (one dot scrolled to the left) + } + + //----------------------------------------------------// + + SelectObject(hdc,hBO); // repair brush + + ReleaseDC(hWS,hdc); // release context +} + +//////////////////////////////////////////////////////////////////////// +// display adsr lines: also no subclassing for repainting used + +void DisplayADSRInfos(HWND hW) +{ + HWND hWS=GetDlgItem(hW,IDC_ADSR); + HDC hdc;RECT r;HBRUSH hBO;char szB[16]; + int ch=iSelChannel,dx,dy,dm,dn,ia,id,is,ir; + + //----------------------------------------------------// get display size + + GetClientRect(hWS,&r); + hdc=GetDC(hWS); + + //----------------------------------------------------// clean the area + + hBO=SelectObject(hdc,hBStream[0]); + PatBlt(hdc,0,0,r.right,r.bottom,PATCOPY); + r.left++;r.right-=2;r.top++;r.bottom-=2; // shrink the display rect for better optics + + //----------------------------------------------------// + + ia=min(s_chan[ch].ADSR.AttackTime,10000); // get adsr, but limit it for drawing + id=min(s_chan[ch].ADSR.DecayTime,10000); + is=min(s_chan[ch].ADSR.SustainTime,10000); + ir=min(s_chan[ch].ADSR.ReleaseTime,10000); + + dx=ia+id+is+ir; // get the dx in (limited) adsr units + + // set the real values to the info statics + SetDlgItemInt(hW,IDC_SADSR1,s_chan[ch].ADSRX.AttackRate^0x7f,FALSE); + SetDlgItemInt(hW,IDC_SADSR2,(s_chan[ch].ADSRX.DecayRate^0x1f)/4,FALSE); + SetDlgItemInt(hW,IDC_SADSR3,s_chan[ch].ADSRX.SustainRate^0x7f,FALSE); + SetDlgItemInt(hW,IDC_SADSR4,(s_chan[ch].ADSRX.ReleaseRate^0x1f)/4,FALSE); + SetDlgItemInt(hW,IDC_SADSR5,s_chan[ch].ADSRX.SustainLevel>>27,FALSE); + + SetDlgItemInt(hW,IDC_SADSR6,s_chan[ch].ADSRX.SustainIncrease,TRUE); + SetDlgItemInt(hW,IDC_SADSR7,s_chan[ch].ADSRX.lVolume,TRUE); + wsprintf(szB,"%08lx",s_chan[ch].ADSRX.EnvelopeVol); + SetDlgItemText(hW,IDC_SADSR8,szB); + + if(dx) // something to draw? + { + HPEN hPO=SelectObject(hdc,hPAdsr[1]); // sel A pen + dn=r.left; + MoveToEx(hdc,dn,r.bottom,NULL); // move to bottom left corner + + dn+=(ia*r.right)/dx; // calc A x line pos + LineTo(hdc,dn,r.top); // line to AxPos,top + + SelectObject(hdc,hPAdsr[2]); // sel D pen + dn+=(id*r.right)/dx; // calc D x line pos + dy=r.top+((1024-s_chan[ch].ADSR.SustainLevel)* // calc the D y pos + r.bottom)/1024; // (our S level is ranged from 0 to 1024) + LineTo(hdc,dn,dy); // line to DxPos,SLevel + + SelectObject(hdc,hPAdsr[3]); // sel S pen + if(s_chan[ch].ADSR.SustainTime>10000) dm=1; // we have to fake the S values... S will + else // inc/decrease until channel stop... + if(s_chan[ch].ADSR.SustainTime==0) dm=0; // we dunno here when this will happen, + else dm=21-(((s_chan[ch].ADSR.SustainTime/500))); // so we do some more ore less angled line, + dy=dy-(s_chan[ch].ADSR.SustainModeDec*dm); // roughly depending on the S Time + if(dy>r.bottom) dy=r.bottom; + if(dyfreq,TRUE); + SetDlgItemInt(hW,IDC_XA2,xapGlobal->stereo,TRUE); + SetDlgItemInt(hW,IDC_XA3,xapGlobal->nsamples,TRUE); +} + +//////////////////////////////////////////////////////////////////////// +// display everything (called in dialog timer for value refreshing) + +void DisplayDebugInfos(HWND hW) +{ + DisplayStreamInfos(hW); + DisplayADSRInfos(hW); + DisplayChannelInfos(hW); +} + +//////////////////////////////////////////////////////////////////////// +// main debug dlg handler + +BOOL CALLBACK DebugDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch(uMsg) + { + //--------------------------------------------------// init + case WM_INITDIALOG: + { + int i; + ShowCursor(TRUE); // mmm... who is hiding it? main emu? tsts + iSelChannel=0; // sel first channel + CheckRadioButton(hW,IDC_CHAN1,IDC_CHAN24,IDC_CHAN1); + // create brushes/pens + hBStream[0]=CreateSolidBrush(GetSysColor(COLOR_3DFACE)); + hPAdsr[0]=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DFACE)); + for(i=1;i<6;i++) + { + hBStream[i]=CreateSolidBrush(crStreamCol[i]); + hPAdsr[i]=CreatePen(PS_SOLID,0,crAdsrCol[i]); + } + SetTimer(hW,999,50,NULL); // now create update timer + return TRUE; + } + //--------------------------------------------------// destroy + case WM_DESTROY: + { + int i; + KillTimer(hW,999); // first kill timer + for(i=0;i<6;i++) // then kill brushes/pens + { + DeleteObject(hBStream[i]); + DeleteObject(hPAdsr[i]); + } + }break; + //--------------------------------------------------// timer + case WM_TIMER: + { + if(wParam==999) DisplayDebugInfos(hW); // update all values + }break; + //--------------------------------------------------// command + case WM_COMMAND: + { + if(wParam==IDCANCEL) iDebugMode=2; // cancel? raise flag for destroying the dialog + + if(wParam>=IDC_MUTE1 && wParam<=IDC_MUTE24) // mute clicked? + { + if(IsDlgButtonChecked(hW,wParam)) // -> mute/unmute it + s_chan[wParam-IDC_MUTE1].iMute=1; + else s_chan[wParam-IDC_MUTE1].iMute=0; + } + // all mute/unmute + if(wParam==IDC_MUTEOFF) SendMessage(hW,WM_MUTE,0,0); + if(wParam==IDC_MUTEON) SendMessage(hW,WM_MUTE,1,0); + + if(wParam>=IDC_CHAN1 && wParam<=IDC_CHAN24) // sel channel + { + if(IsDlgButtonChecked(hW,wParam)) + { + iSelChannel=wParam-IDC_CHAN1; + SetDlgItemInt(hW,IDC_CHANNUM,iSelChannel+1,FALSE); + } + } + }break; + //--------------------------------------------------// mute + case WM_MUTE: + { // will be called by the mute/unmute all button and on savestate load + int i; + for(i=IDC_MUTE1;i<=IDC_MUTE24;i++) + { + CheckDlgButton(hW,i,wParam); + if(wParam) s_chan[i-IDC_MUTE1].iMute=1; + else s_chan[i-IDC_MUTE1].iMute=0; + } + }break; + //--------------------------------------------------// size + case WM_SIZE: + if(wParam==SIZE_MINIMIZED) SetFocus(hWMain); // if we get minimized, set the foxus to the main window + break; + //--------------------------------------------------// setcursor + case WM_SETCURSOR: + { + SetCursor(LoadCursor(NULL,IDC_ARROW)); // force the arrow + return TRUE; + } + //--------------------------------------------------// + } + return FALSE; +} + +//////////////////////////////////////////////////////////////////////// + +#endif \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/winsrc/debug.h pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/winsrc/debug.h --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/winsrc/debug.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/winsrc/debug.h 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,29 @@ +/*************************************************************************** + debug.h - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +//*************************************************************************// +// History of changes: +// +// 2002/05/15 - Pete +// - generic cleanup for the Peops release +// +//*************************************************************************// + +#ifdef _WINDOWS +BOOL CALLBACK DebugDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/winsrc/dsound.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/winsrc/dsound.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/winsrc/dsound.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/winsrc/dsound.c 2016-06-30 16:53:24.000000000 +0000 @@ -0,0 +1,280 @@ +/*************************************************************************** + dsound.c - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +//*************************************************************************// +// History of changes: +// +// 2003/01/12 - Pete +// - added recording funcs +// +// 2002/05/15 - Pete +// - generic cleanup for the Peops release +// +//*************************************************************************// + +#include "stdafx.h" + +#define _IN_DSOUND + +#include "externals.h" + +#ifdef _WINDOWS + +#include + +#include "record.h" + +//////////////////////////////////////////////////////////////////////// +// dsound globals +//////////////////////////////////////////////////////////////////////// + +LPDIRECTSOUND lpDS; +LPDIRECTSOUNDBUFFER lpDSBP = NULL; +LPDIRECTSOUNDBUFFER lpDSB = NULL; +DSBUFFERDESC dsbd; +DSBUFFERDESC dsbdesc; +DSCAPS dscaps; +DSBCAPS dsbcaps; + +unsigned long LastWrite=0xffffffff; +unsigned long LastPlay=0; + +//////////////////////////////////////////////////////////////////////// +// SETUP SOUND +//////////////////////////////////////////////////////////////////////// + +void SetupSound(void) +{ + HRESULT dsval;WAVEFORMATEX pcmwf; + + dsval = DirectSoundCreate(NULL,&lpDS,NULL); + if(dsval!=DS_OK) + { + MessageBox(hWMain,"DirectSoundCreate!","Error",MB_OK); + return; + } + + if(DS_OK!=IDirectSound_SetCooperativeLevel(lpDS,hWMain, DSSCL_PRIORITY)) + { + if(DS_OK!=IDirectSound_SetCooperativeLevel(lpDS,hWMain, DSSCL_NORMAL)) + { + MessageBox(hWMain,"SetCooperativeLevel!","Error",MB_OK); + return; + } + } + + memset(&dsbd,0,sizeof(DSBUFFERDESC)); + dsbd.dwSize = 20; // NT4 hack! sizeof(dsbd); + dsbd.dwFlags = DSBCAPS_PRIMARYBUFFER; + dsbd.dwBufferBytes = 0; + dsbd.lpwfxFormat = NULL; + + dsval=IDirectSound_CreateSoundBuffer(lpDS,&dsbd,&lpDSBP,NULL); + if(dsval!=DS_OK) + { + MessageBox(hWMain, "CreateSoundBuffer (Primary)", "Error",MB_OK); + return; + } + + memset(&pcmwf, 0, sizeof(WAVEFORMATEX)); + pcmwf.wFormatTag = WAVE_FORMAT_PCM; + + if(iDisStereo) {pcmwf.nChannels = 1; pcmwf.nBlockAlign = 2;} + else {pcmwf.nChannels = 2; pcmwf.nBlockAlign = 4;} + + pcmwf.nSamplesPerSec = 44100; + + pcmwf.nAvgBytesPerSec = pcmwf.nSamplesPerSec * pcmwf.nBlockAlign; + pcmwf.wBitsPerSample = 16; + + dsval=IDirectSoundBuffer_SetFormat(lpDSBP,&pcmwf); + if(dsval!=DS_OK) + { + MessageBox(hWMain, "SetFormat!", "Error",MB_OK); + return; + } + + dscaps.dwSize = sizeof(DSCAPS); + dsbcaps.dwSize = sizeof(DSBCAPS); + IDirectSound_GetCaps(lpDS,&dscaps); + IDirectSoundBuffer_GetCaps(lpDSBP,&dsbcaps); + + memset(&dsbdesc, 0, sizeof(DSBUFFERDESC)); + dsbdesc.dwSize = 20; // NT4 hack! sizeof(DSBUFFERDESC); + dsbdesc.dwFlags = DSBCAPS_LOCSOFTWARE | DSBCAPS_STICKYFOCUS | DSBCAPS_GETCURRENTPOSITION2; + dsbdesc.dwBufferBytes = SOUNDSIZE; + dsbdesc.lpwfxFormat = (LPWAVEFORMATEX)&pcmwf; + + dsval=IDirectSound_CreateSoundBuffer(lpDS,&dsbdesc,&lpDSB,NULL); + if(dsval!=DS_OK) + { + MessageBox(hWMain,"CreateSoundBuffer (Secondary)", "Error",MB_OK); + return; + } + + dsval=IDirectSoundBuffer_Play(lpDSBP,0,0,DSBPLAY_LOOPING); + if(dsval!=DS_OK) + { + MessageBox(hWMain,"Play (Primary)","Error",MB_OK); + return; + } + + dsval=IDirectSoundBuffer_Play(lpDSB,0,0,DSBPLAY_LOOPING); + if(dsval!=DS_OK) + { + MessageBox(hWMain,"Play (Secondary)","Error",MB_OK); + return; + } +} + +//////////////////////////////////////////////////////////////////////// +// REMOVE SOUND +//////////////////////////////////////////////////////////////////////// + +void RemoveSound(void) +{ + int iRes; + + if(iDoRecord) RecordStop(); + + if(lpDSB!=NULL) + { + IDirectSoundBuffer_Stop(lpDSB); + iRes=IDirectSoundBuffer_Release(lpDSB); + // FF says such a loop is bad... Demo says it's good... Pete doesn't care + while(iRes!=0) iRes=IDirectSoundBuffer_Release(lpDSB); + lpDSB=NULL; + } + + if(lpDSBP!=NULL) + { + IDirectSoundBuffer_Stop(lpDSBP); + iRes=IDirectSoundBuffer_Release(lpDSBP); + // FF says such a loop is bad... Demo says it's good... Pete doesn't care + while(iRes!=0) iRes=IDirectSoundBuffer_Release(lpDSBP); + lpDSBP=NULL; + } + + if(lpDS!=NULL) + { + iRes=IDirectSound_Release(lpDS); + // FF says such a loop is bad... Demo says it's good... Pete doesn't care + while(iRes!=0) iRes=IDirectSound_Release(lpDS); + lpDS=NULL; + } + +} + +//////////////////////////////////////////////////////////////////////// +// GET BYTES BUFFERED +//////////////////////////////////////////////////////////////////////// + +unsigned long SoundGetBytesBuffered(void) +{ + unsigned long cplay,cwrite; + + if(LastWrite==0xffffffff) return 0; + + IDirectSoundBuffer_GetCurrentPosition(lpDSB,&cplay,&cwrite); + + if(cplay>SOUNDSIZE) return SOUNDSIZE; + + if(cplay>2; + + lpSS=(unsigned long *)pSound; + while(dw) {*lpSD++=*lpSS++;dw--;} + + if(lpvPtr2) + { + lpSD=(unsigned long *)lpvPtr2; + dw=dwBytes2>>2; + while(dw) {*lpSD++=*lpSS++;dw--;} + } + + IDirectSoundBuffer_Unlock(lpDSB,lpvPtr1,dwBytes1,lpvPtr2,dwBytes2); + + LastWrite+=lBytes; + if(LastWrite>=SOUNDSIZE) LastWrite-=SOUNDSIZE; + LastPlay=cplay; +} + +#endif + + + diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/winsrc/dsound.h pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/winsrc/dsound.h --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/winsrc/dsound.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/winsrc/dsound.h 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,1211 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __WINE_DSOUND_H +#define __WINE_DSOUND_H + +#ifndef DIRECTSOUND_VERSION +#define DIRECTSOUND_VERSION 0x0900 +#endif + +#define COM_NO_WINDOWS_H +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif /* defined(__cplusplus) */ + +#ifndef WINELIB_NAME_AW +#ifdef UNICODE +#define WINELIB_NAME_AW(func) func##W +#else +#define WINELIB_NAME_AW(func) func##A +#endif +#endif + +#ifndef DECL_WINELIB_TYPE_AW +#define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type; +#endif + +#ifndef DWORD_PTR +#define DWORD_PTR unsigned long +#endif + +#ifndef DX_SHARED_DEFINES + +typedef float D3DVALUE, *LPD3DVALUE; + +#ifndef D3DCOLOR_DEFINED +typedef DWORD D3DCOLOR, *LPD3DCOLOR; +#define D3DCOLOR_DEFINED +#endif + +#ifndef D3DVECTOR_DEFINED +typedef struct _D3DVECTOR { + float x; + float y; + float z; +} D3DVECTOR; +#define D3DVECTOR_DEFINED +#endif + +#ifndef LPD3DVECTOR_DEFINED +typedef D3DVECTOR *LPD3DVECTOR; +#define LPD3DVECTOR_DEFINED +#endif + +#define DX_SHARED_DEFINES +#endif /* DX_SHARED_DEFINES */ + +/***************************************************************************** + * Predeclare the interfaces + */ +DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00); +DEFINE_GUID(CLSID_DirectSound8, 0x3901cc3f, 0x84b5, 0x4fa4, 0xba, 0x35, 0xaa, 0x81, 0x72, 0xb8, 0xa0, 0x9b); +DEFINE_GUID(CLSID_DirectSoundCapture, 0xb0210780, 0x89cd, 0x11d0, 0xaf, 0x08, 0x00, 0xa0, 0xc9, 0x25, 0xcd, 0x16); +DEFINE_GUID(CLSID_DirectSoundCapture8, 0xe4bcac13, 0x7f99, 0x4908, 0x9a, 0x8e, 0x74, 0xe3, 0xbf, 0x24, 0xb6, 0xe1); +DEFINE_GUID(CLSID_DirectSoundFullDuplex,0xfea4300c, 0x7959, 0x4147, 0xb2, 0x6a, 0x23, 0x77, 0xb9, 0xe7, 0xa9, 0x1d); + +DEFINE_GUID(IID_IDirectSound, 0x279AFA83,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); +typedef struct IDirectSound *LPDIRECTSOUND,**LPLPDIRECTSOUND; + +DEFINE_GUID(IID_IDirectSound8, 0xC50A7E93,0xF395,0x4834,0x9E,0xF6,0x7F,0xA9,0x9D,0xE5,0x09,0x66); +typedef struct IDirectSound8 *LPDIRECTSOUND8,**LPLPDIRECTSOUND8; + +DEFINE_GUID(IID_IDirectSoundBuffer, 0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); +typedef struct IDirectSoundBuffer *LPDIRECTSOUNDBUFFER,**LPLPDIRECTSOUNDBUFFER; + +DEFINE_GUID(IID_IDirectSoundBuffer8, 0x6825A449,0x7524,0x4D82,0x92,0x0F,0x50,0xE3,0x6A,0xB3,0xAB,0x1E); +typedef struct IDirectSoundBuffer8 *LPDIRECTSOUNDBUFFER8,**LPLPDIRECTSOUNDBUFFER8; + +DEFINE_GUID(IID_IDirectSoundNotify, 0xB0210783,0x89cd,0x11d0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16); +typedef struct IDirectSoundNotify *LPDIRECTSOUNDNOTIFY,**LPLPDIRECTSOUNDNOTIFY; +#define IID_IDirectSoundNotify8 IID_IDirectSoundNotify + +DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); +typedef struct IDirectSound3DListener *LPDIRECTSOUND3DLISTENER,**LPLPDIRECTSOUND3DLISTENER; + +DEFINE_GUID(IID_IDirectSound3DBuffer, 0x279AFA86,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); +typedef struct IDirectSound3DBuffer *LPDIRECTSOUND3DBUFFER,**LPLPDIRECTSOUND3DBUFFER; + +DEFINE_GUID(IID_IDirectSoundCapture, 0xB0210781,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16); +typedef struct IDirectSoundCapture *LPDIRECTSOUNDCAPTURE,**LPLPDIRECTSOUNDCAPTURE; +#define IID_IDirectSoundCapture8 IID_IDirectSoundCapture +typedef struct IDirectSoundCapture IDirectSoundCapture8,*LPDIRECTSOUNDCAPTURE8,**LPLPDIRECTSOUNDCAPTURE8; + +DEFINE_GUID(IID_IDirectSoundCaptureBuffer,0xB0210782,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16); +typedef struct IDirectSoundCaptureBuffer *LPDIRECTSOUNDCAPTUREBUFFER,**LPLPDIRECTSOUNDCAPTUREBUFFER; + +DEFINE_GUID(IID_IDirectSoundCaptureBuffer8,0x00990DF4,0x0DBB,0x4872,0x83,0x3E,0x6D,0x30,0x3E,0x80,0xAE,0xB6); +typedef struct IDirectSoundCaptureBuffer8 *LPDIRECTSOUNDCAPTUREBUFFER8,**LPLPDIRECTSOUNDCAPTUREBUFFER8; + +DEFINE_GUID(IID_IDirectSoundFullDuplex, 0xEDCB4C7A,0xDAAB,0x4216,0xA4,0x2E,0x6C,0x50,0x59,0x6D,0xDC,0x1D); +typedef struct IDirectSoundFullDuplex *LPDIRECTSOUNDFULLDUPLEX,**LPLPDIRECTSOUNDFULLDUPLEX; +#define IID_IDirectSoundFullDuplex8 IID_IDirectSoundFullDuplex + +DEFINE_GUID(DSDEVID_DefaultPlayback, 0xDEF00000,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03); +DEFINE_GUID(DSDEVID_DefaultCapture, 0xDEF00001,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03); +DEFINE_GUID(DSDEVID_DefaultVoicePlayback,0xDEF00002,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03); +DEFINE_GUID(DSDEVID_DefaultVoiceCapture, 0xDEF00003,0x9C6D,0x47ED,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03); + +DEFINE_GUID(DSDEVID_WinePlayback, 0x40316A1D,0x605B,0xD611,0x87,0xC6,0x00,0x80,0xAD,0x00,0x02,0xFE); + +#define _FACDS 0x878 +#define MAKE_DSHRESULT(code) MAKE_HRESULT(1,_FACDS,code) + +#define DS_OK 0 +#define DS_NO_VIRTUALIZATION MAKE_HRESULT(0, _FACDS, 10) +#define DS_INCOMPLETE MAKE_HRESULT(0, _FACDS, 20) +#define DSERR_ALLOCATED MAKE_DSHRESULT(10) +#define DSERR_CONTROLUNAVAIL MAKE_DSHRESULT(30) +#define DSERR_INVALIDPARAM E_INVALIDARG +#define DSERR_INVALIDCALL MAKE_DSHRESULT(50) +#define DSERR_GENERIC E_FAIL +#define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70) +#define DSERR_OUTOFMEMORY E_OUTOFMEMORY +#define DSERR_BADFORMAT MAKE_DSHRESULT(100) +#define DSERR_UNSUPPORTED E_NOTIMPL +#define DSERR_NODRIVER MAKE_DSHRESULT(120) +#define DSERR_ALREADYINITIALIZED MAKE_DSHRESULT(130) +#define DSERR_NOAGGREGATION CLASS_E_NOAGGREGATION +#define DSERR_BUFFERLOST MAKE_DSHRESULT(150) +#define DSERR_OTHERAPPHASPRIO MAKE_DSHRESULT(160) +#define DSERR_UNINITIALIZED MAKE_DSHRESULT(170) +#define DSERR_NOINTERFACE E_NOINTERFACE +#define DSERR_ACCESSDENIED E_ACCESSDENIED +#define DSERR_BUFFERTOOSMALL MAKE_DSHRESULT(180) +#define DSERR_DS8_REQUIRED MAKE_DSHRESULT(190) +#define DSERR_SENDLOOP MAKE_DSHRESULT(200) +#define DSERR_BADSENDBUFFERGUID MAKE_DSHRESULT(210) +#define DSERR_FXUNAVAILABLE MAKE_DSHRESULT(220) +#define DSERR_OBJECTNOTFOUND MAKE_DSHRESULT(4449) + +#define DSCAPS_PRIMARYMONO 0x00000001 +#define DSCAPS_PRIMARYSTEREO 0x00000002 +#define DSCAPS_PRIMARY8BIT 0x00000004 +#define DSCAPS_PRIMARY16BIT 0x00000008 +#define DSCAPS_CONTINUOUSRATE 0x00000010 +#define DSCAPS_EMULDRIVER 0x00000020 +#define DSCAPS_CERTIFIED 0x00000040 +#define DSCAPS_SECONDARYMONO 0x00000100 +#define DSCAPS_SECONDARYSTEREO 0x00000200 +#define DSCAPS_SECONDARY8BIT 0x00000400 +#define DSCAPS_SECONDARY16BIT 0x00000800 + +#define DSSCL_NORMAL 1 +#define DSSCL_PRIORITY 2 +#define DSSCL_EXCLUSIVE 3 +#define DSSCL_WRITEPRIMARY 4 + +typedef struct _DSCAPS +{ + DWORD dwSize; + DWORD dwFlags; + DWORD dwMinSecondarySampleRate; + DWORD dwMaxSecondarySampleRate; + DWORD dwPrimaryBuffers; + DWORD dwMaxHwMixingAllBuffers; + DWORD dwMaxHwMixingStaticBuffers; + DWORD dwMaxHwMixingStreamingBuffers; + DWORD dwFreeHwMixingAllBuffers; + DWORD dwFreeHwMixingStaticBuffers; + DWORD dwFreeHwMixingStreamingBuffers; + DWORD dwMaxHw3DAllBuffers; + DWORD dwMaxHw3DStaticBuffers; + DWORD dwMaxHw3DStreamingBuffers; + DWORD dwFreeHw3DAllBuffers; + DWORD dwFreeHw3DStaticBuffers; + DWORD dwFreeHw3DStreamingBuffers; + DWORD dwTotalHwMemBytes; + DWORD dwFreeHwMemBytes; + DWORD dwMaxContigFreeHwMemBytes; + DWORD dwUnlockTransferRateHwBuffers; + DWORD dwPlayCpuOverheadSwBuffers; + DWORD dwReserved1; + DWORD dwReserved2; +} DSCAPS,*LPDSCAPS; +typedef const DSCAPS *LPCDSCAPS; + +#define DSBPLAY_LOOPING 0x00000001 +#define DSBPLAY_LOCHARDWARE 0x00000002 +#define DSBPLAY_LOCSOFTWARE 0x00000004 +#define DSBPLAY_TERMINATEBY_TIME 0x00000008 +#define DSBPLAY_TERMINATEBY_DISTANCE 0x000000010 +#define DSBPLAY_TERMINATEBY_PRIORITY 0x000000020 + +#define DSBSTATUS_PLAYING 0x00000001 +#define DSBSTATUS_BUFFERLOST 0x00000002 +#define DSBSTATUS_LOOPING 0x00000004 +#define DSBSTATUS_LOCHARDWARE 0x00000008 +#define DSBSTATUS_LOCSOFTWARE 0x00000010 +#define DSBSTATUS_TERMINATED 0x00000020 + +#define DSBLOCK_FROMWRITECURSOR 0x00000001 +#define DSBLOCK_ENTIREBUFFER 0x00000002 + +#define DSBCAPS_PRIMARYBUFFER 0x00000001 +#define DSBCAPS_STATIC 0x00000002 +#define DSBCAPS_LOCHARDWARE 0x00000004 +#define DSBCAPS_LOCSOFTWARE 0x00000008 +#define DSBCAPS_CTRL3D 0x00000010 +#define DSBCAPS_CTRLFREQUENCY 0x00000020 +#define DSBCAPS_CTRLPAN 0x00000040 +#define DSBCAPS_CTRLVOLUME 0x00000080 +#define DSBCAPS_CTRLDEFAULT 0x000000E0 /* Pan + volume + frequency. */ +#define DSBCAPS_CTRLPOSITIONNOTIFY 0x00000100 +#define DSBCAPS_CTRLFX 0x00000200 +#define DSBCAPS_CTRLALL 0x000001F0 /* All control capabilities */ +#define DSBCAPS_STICKYFOCUS 0x00004000 +#define DSBCAPS_GLOBALFOCUS 0x00008000 +#define DSBCAPS_GETCURRENTPOSITION2 0x00010000 /* More accurate play cursor under emulation*/ +#define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000 +#define DSBCAPS_LOCDEFER 0x00040000 + +#define DSBSIZE_MIN 4 +#define DSBSIZE_MAX 0xFFFFFFF +#define DSBPAN_LEFT -10000 +#define DSBPAN_CENTER 0 +#define DSBPAN_RIGHT 10000 +#define DSBVOLUME_MAX 0 +#define DSBVOLUME_MIN -10000 +#define DSBFREQUENCY_MIN 100 +#define DSBFREQUENCY_MAX 200000 +#define DSBFREQUENCY_ORIGINAL 0 + +typedef struct _DSBCAPS +{ + DWORD dwSize; + DWORD dwFlags; + DWORD dwBufferBytes; + DWORD dwUnlockTransferRate; + DWORD dwPlayCpuOverhead; +} DSBCAPS,*LPDSBCAPS; +typedef const DSBCAPS *LPCDSBCAPS; + +#define DSSCL_NORMAL 1 +#define DSSCL_PRIORITY 2 +#define DSSCL_EXCLUSIVE 3 +#define DSSCL_WRITEPRIMARY 4 + +typedef struct _DSEFFECTDESC +{ + DWORD dwSize; + DWORD dwFlags; + GUID guidDSFXClass; + DWORD_PTR dwReserved1; + DWORD_PTR dwReserved2; +} DSEFFECTDESC,*LPDSEFFECTDESC; +typedef const DSEFFECTDESC *LPCDSEFFECTDESC; + +#define DSFX_LOCHARDWARE 0x00000001 +#define DSFX_LOCSOFTWARE 0x00000002 + +enum +{ + DSFXR_PRESENT, + DSFXR_LOCHARDWARE, + DSFXR_LOCSOFTWARE, + DSFXR_UNALLOCATED, + DSFXR_FAILED, + DSFXR_UNKNOWN, + DSFXR_SENDLOOP +}; + +typedef struct _DSBUFFERDESC1 +{ + DWORD dwSize; + DWORD dwFlags; + DWORD dwBufferBytes; + DWORD dwReserved; + LPWAVEFORMATEX lpwfxFormat; +} DSBUFFERDESC1,*LPDSBUFFERDESC1; +typedef const DSBUFFERDESC1 *LPCDSBUFFERDESC1; + +typedef struct _DSBUFFERDESC +{ + DWORD dwSize; + DWORD dwFlags; + DWORD dwBufferBytes; + DWORD dwReserved; + LPWAVEFORMATEX lpwfxFormat; + GUID guid3DAlgorithm; +} DSBUFFERDESC,*LPDSBUFFERDESC; +typedef const DSBUFFERDESC *LPCDSBUFFERDESC; + +typedef struct _DSBPOSITIONNOTIFY +{ + DWORD dwOffset; + HANDLE hEventNotify; +} DSBPOSITIONNOTIFY,*LPDSBPOSITIONNOTIFY; +typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY; + +#define DSSPEAKER_HEADPHONE 1 +#define DSSPEAKER_MONO 2 +#define DSSPEAKER_QUAD 3 +#define DSSPEAKER_STEREO 4 +#define DSSPEAKER_SURROUND 5 +#define DSSPEAKER_5POINT1 6 +#define DSSPEAKER_7POINT1 7 + +#define DSSPEAKER_GEOMETRY_MIN 0x00000005 /* 5 degrees */ +#define DSSPEAKER_GEOMETRY_NARROW 0x0000000A /* 10 degrees */ +#define DSSPEAKER_GEOMETRY_WIDE 0x00000014 /* 20 degrees */ +#define DSSPEAKER_GEOMETRY_MAX 0x000000B4 /* 180 degrees */ + +#define DSSPEAKER_COMBINED(c, g) ((DWORD)(((BYTE)(c)) | ((DWORD)((BYTE)(g))) << 16)) +#define DSSPEAKER_CONFIG(a) ((BYTE)(a)) +#define DSSPEAKER_GEOMETRY(a) ((BYTE)(((DWORD)(a) >> 16) & 0x00FF)) + +#define DS_CERTIFIED 0x00000000 +#define DS_UNCERTIFIED 0x00000001 + +typedef struct _DSCEFFECTDESC +{ + DWORD dwSize; + DWORD dwFlags; + GUID guidDSCFXClass; + GUID guidDSCFXInstance; + DWORD dwReserved1; + DWORD dwReserved2; +} DSCEFFECTDESC, *LPDSCEFFECTDESC; +typedef const DSCEFFECTDESC *LPCDSCEFFECTDESC; + +#define DSCFX_LOCHARDWARE 0x00000001 +#define DSCFX_LOCSOFTWARE 0x00000002 + +#define DSCFXR_LOCHARDWARE 0x00000010 +#define DSCFXR_LOCSOFTWARE 0x00000020 + +typedef struct _DSCBUFFERDESC1 +{ + DWORD dwSize; + DWORD dwFlags; + DWORD dwBufferBytes; + DWORD dwReserved; + LPWAVEFORMATEX lpwfxFormat; +} DSCBUFFERDESC1, *LPDSCBUFFERDESC1; + +typedef struct _DSCBUFFERDESC +{ + DWORD dwSize; + DWORD dwFlags; + DWORD dwBufferBytes; + DWORD dwReserved; + LPWAVEFORMATEX lpwfxFormat; + DWORD dwFXCount; + LPDSCEFFECTDESC lpDSCFXDesc; +} DSCBUFFERDESC, *LPDSCBUFFERDESC; +typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC; + +typedef struct _DSCCAPS +{ + DWORD dwSize; + DWORD dwFlags; + DWORD dwFormats; + DWORD dwChannels; +} DSCCAPS, *LPDSCCAPS; +typedef const DSCCAPS *LPCDSCCAPS; + +typedef struct _DSCBCAPS +{ + DWORD dwSize; + DWORD dwFlags; + DWORD dwBufferBytes; + DWORD dwReserved; +} DSCBCAPS, *LPDSCBCAPS; +typedef const DSCBCAPS *LPCDSCBCAPS; + +#define DSCCAPS_EMULDRIVER DSCAPS_EMULDRIVER +#define DSCCAPS_CERTIFIED DSCAPS_CERTIFIED +#define DSCCAPS_MULTIPLECAPTURE 0x00000001 + +#define DSCBCAPS_WAVEMAPPED 0x80000000 +#define DSCBCAPS_CTRLFX 0x00000200 + +#define DSCBLOCK_ENTIREBUFFER 0x00000001 +#define DSCBSTART_LOOPING 0x00000001 +#define DSCBPN_OFFSET_STOP 0xffffffff + +#define DSCBSTATUS_CAPTURING 0x00000001 +#define DSCBSTATUS_LOOPING 0x00000002 + +#ifndef __LPCGUID_DEFINED__ +#define __LPCGUID_DEFINED__ +typedef const GUID *LPCGUID; +#endif + +typedef BOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID,LPCWSTR,LPCWSTR,LPVOID); +typedef BOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID,LPCSTR,LPCSTR,LPVOID); +DECL_WINELIB_TYPE_AW(LPDSENUMCALLBACK) + +extern HRESULT WINAPI DirectSoundCreate(LPCGUID lpGUID,LPDIRECTSOUND *ppDS,LPUNKNOWN pUnkOuter); +extern HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA, LPVOID); +extern HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW, LPVOID); +#define DirectSoundEnumerate WINELIB_NAME_AW(DirectSoundEnumerate) +extern HRESULT WINAPI DirectSoundCaptureCreate(LPCGUID lpGUID, LPDIRECTSOUNDCAPTURE *ppDSC, LPUNKNOWN pUnkOuter); +extern HRESULT WINAPI DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA, LPVOID); +extern HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW, LPVOID); +#define DirectSoundCaptureEnumerate WINELIB_NAME_AW(DirectSoundCaptureEnumerate) + +extern HRESULT WINAPI DirectSoundCreate8(LPCGUID lpGUID,LPDIRECTSOUND8 *ppDS8,LPUNKNOWN pUnkOuter); +extern HRESULT WINAPI DirectSoundCaptureCreate8(LPCGUID lpGUID, LPDIRECTSOUNDCAPTURE8 *ppDSC8, LPUNKNOWN pUnkOuter); +extern HRESULT WINAPI DirectSoundFullDuplexCreate(LPCGUID pcGuidCaptureDevice, LPCGUID pcGuidRenderDevice, + LPCDSCBUFFERDESC pcDSCBufferDesc, LPCDSBUFFERDESC pcDSBufferDesc, HWND hWnd, DWORD dwLevel, + LPDIRECTSOUNDFULLDUPLEX *ppDSFD, LPDIRECTSOUNDCAPTUREBUFFER8 *ppDSCBuffer8, LPDIRECTSOUNDBUFFER8 *ppDSBuffer8, LPUNKNOWN pUnkOuter); +#define DirectSoundFullDuplexCreate8 DirectSoundFullDuplexCreate +extern HRESULT WINAPI GetDeviceID(LPCGUID lpGuidSrc, LPGUID lpGuidDest); + + +/***************************************************************************** + * IDirectSound interface + */ +#define INTERFACE IDirectSound +DECLARE_INTERFACE_(IDirectSound,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectSound methods ***/ + STDMETHOD(CreateSoundBuffer)(THIS_ LPCDSBUFFERDESC lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER lplpDirectSoundBuffer, IUnknown *pUnkOuter) PURE; + STDMETHOD(GetCaps)(THIS_ LPDSCAPS lpDSCaps) PURE; + STDMETHOD(DuplicateSoundBuffer)(THIS_ LPDIRECTSOUNDBUFFER lpDsbOriginal, LPLPDIRECTSOUNDBUFFER lplpDsbDuplicate) PURE; + STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwLevel) PURE; + STDMETHOD(Compact)(THIS) PURE; + STDMETHOD(GetSpeakerConfig)(THIS_ LPDWORD lpdwSpeakerConfig) PURE; + STDMETHOD(SetSpeakerConfig)(THIS_ DWORD dwSpeakerConfig) PURE; + STDMETHOD(Initialize)(THIS_ LPCGUID lpcGuid) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectSound_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectSound_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectSound_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectSound methods ***/ +#define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->lpVtbl->CreateSoundBuffer(p,a,b,c) +#define IDirectSound_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b) +#define IDirectSound_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b) +#define IDirectSound_Compact(p) (p)->lpVtbl->Compact(p) +#define IDirectSound_GetSpeakerConfig(p,a) (p)->lpVtbl->GetSpeakerConfig(p,a) +#define IDirectSound_SetSpeakerConfig(p,a) (p)->lpVtbl->SetSpeakerConfig(p,a) +#define IDirectSound_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#else +/*** IUnknown methods ***/ +#define IDirectSound_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectSound_AddRef(p) (p)->AddRef() +#define IDirectSound_Release(p) (p)->Release() +/*** IDirectSound methods ***/ +#define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->CreateSoundBuffer(a,b,c) +#define IDirectSound_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b) +#define IDirectSound_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) +#define IDirectSound_Compact(p) (p)->Compact() +#define IDirectSound_GetSpeakerConfig(p,a) (p)->GetSpeakerConfig(a) +#define IDirectSound_SetSpeakerConfig(p,a) (p)->SetSpeakerConfig(a) +#define IDirectSound_Initialize(p,a) (p)->Initialize(a) +#endif + + +/***************************************************************************** + * IDirectSound8 interface + */ +#define INTERFACE IDirectSound8 +DECLARE_INTERFACE_(IDirectSound8,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectSound8 methods ***/ + STDMETHOD(CreateSoundBuffer)(THIS_ LPCDSBUFFERDESC lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER lplpDirectSoundBuffer, IUnknown *pUnkOuter) PURE; + STDMETHOD(GetCaps)(THIS_ LPDSCAPS lpDSCaps) PURE; + STDMETHOD(DuplicateSoundBuffer)(THIS_ LPDIRECTSOUNDBUFFER lpDsbOriginal, LPLPDIRECTSOUNDBUFFER lplpDsbDuplicate) PURE; + STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwLevel) PURE; + STDMETHOD(Compact)(THIS) PURE; + STDMETHOD(GetSpeakerConfig)(THIS_ LPDWORD lpdwSpeakerConfig) PURE; + STDMETHOD(SetSpeakerConfig)(THIS_ DWORD dwSpeakerConfig) PURE; + STDMETHOD(Initialize)(THIS_ LPCGUID lpcGuid) PURE; + STDMETHOD(VerifyCertification)(THIS_ LPDWORD pdwCertified) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectSound8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectSound8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectSound8_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectSound methods ***/ +#define IDirectSound8_CreateSoundBuffer(p,a,b,c) (p)->lpVtbl->CreateSoundBuffer(p,a,b,c) +#define IDirectSound8_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectSound8_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b) +#define IDirectSound8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b) +#define IDirectSound8_Compact(p) (p)->lpVtbl->Compact(p) +#define IDirectSound8_GetSpeakerConfig(p,a) (p)->lpVtbl->GetSpeakerConfig(p,a) +#define IDirectSound8_SetSpeakerConfig(p,a) (p)->lpVtbl->SetSpeakerConfig(p,a) +#define IDirectSound8_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +/*** IDirectSound8 methods ***/ +#define IDirectSound8_VerifyCertification(p,a) (p)->lpVtbl->VerifyCertification(p,a) +#else +/*** IUnknown methods ***/ +#define IDirectSound8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectSound8_AddRef(p) (p)->AddRef() +#define IDirectSound8_Release(p) (p)->Release() +/*** IDirectSound methods ***/ +#define IDirectSound8_CreateSoundBuffer(p,a,b,c) (p)->CreateSoundBuffer(a,b,c) +#define IDirectSound8_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectSound8_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b) +#define IDirectSound8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) +#define IDirectSound8_Compact(p) (p)->Compact() +#define IDirectSound8_GetSpeakerConfig(p,a) (p)->GetSpeakerConfig(a) +#define IDirectSound8_SetSpeakerConfig(p,a) (p)->SetSpeakerConfig(a) +#define IDirectSound8_Initialize(p,a) (p)->Initialize(a) +/*** IDirectSound8 methods ***/ +#define IDirectSound8_VerifyCertification(p,a) (p)->VerifyCertification(a) +#endif + + +/***************************************************************************** + * IDirectSoundBuffer interface + */ +#define INTERFACE IDirectSoundBuffer +DECLARE_INTERFACE_(IDirectSoundBuffer,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectSoundBuffer methods ***/ + STDMETHOD(GetCaps)(THIS_ LPDSBCAPS lpDSBufferCaps) PURE; + STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor) PURE; + STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE; + STDMETHOD(GetVolume)(THIS_ LPLONG lplVolume) PURE; + STDMETHOD(GetPan)(THIS_ LPLONG lplpan) PURE; + STDMETHOD(GetFrequency)(THIS_ LPDWORD lpdwFrequency) PURE; + STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE; + STDMETHOD(Initialize)(THIS_ LPDIRECTSOUND lpDirectSound, LPCDSBUFFERDESC lpcDSBufferDesc) PURE; + STDMETHOD(Lock)(THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1, LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE; + STDMETHOD(Play)(THIS_ DWORD dwReserved1, DWORD dwReserved2, DWORD dwFlags) PURE; + STDMETHOD(SetCurrentPosition)(THIS_ DWORD dwNewPosition) PURE; + STDMETHOD(SetFormat)(THIS_ LPCWAVEFORMATEX lpcfxFormat) PURE; + STDMETHOD(SetVolume)(THIS_ LONG lVolume) PURE; + STDMETHOD(SetPan)(THIS_ LONG lPan) PURE; + STDMETHOD(SetFrequency)(THIS_ DWORD dwFrequency) PURE; + STDMETHOD(Stop)(THIS) PURE; + STDMETHOD(Unlock)(THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioPtr2) PURE; + STDMETHOD(Restore)(THIS) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectSoundBuffer_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectSoundBuffer_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectSoundBuffer methods ***/ +#define IDirectSoundBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b) +#define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c) +#define IDirectSoundBuffer_GetVolume(p,a) (p)->lpVtbl->GetVolume(p,a) +#define IDirectSoundBuffer_GetPan(p,a) (p)->lpVtbl->GetPan(p,a) +#define IDirectSoundBuffer_GetFrequency(p,a) (p)->lpVtbl->GetFrequency(p,a) +#define IDirectSoundBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a) +#define IDirectSoundBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g) +#define IDirectSoundBuffer_Play(p,a,b,c) (p)->lpVtbl->Play(p,a,b,c) +#define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->lpVtbl->SetCurrentPosition(p,a) +#define IDirectSoundBuffer_SetFormat(p,a) (p)->lpVtbl->SetFormat(p,a) +#define IDirectSoundBuffer_SetVolume(p,a) (p)->lpVtbl->SetVolume(p,a) +#define IDirectSoundBuffer_SetPan(p,a) (p)->lpVtbl->SetPan(p,a) +#define IDirectSoundBuffer_SetFrequency(p,a) (p)->lpVtbl->SetFrequency(p,a) +#define IDirectSoundBuffer_Stop(p) (p)->lpVtbl->Stop(p) +#define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d) +#define IDirectSoundBuffer_Restore(p) (p)->lpVtbl->Restore(p) +#else +/*** IUnknown methods ***/ +#define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectSoundBuffer_AddRef(p) (p)->AddRef() +#define IDirectSoundBuffer_Release(p) (p)->Release() +/*** IDirectSoundBuffer methods ***/ +#define IDirectSoundBuffer_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b) +#define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c) +#define IDirectSoundBuffer_GetVolume(p,a) (p)->GetVolume(a) +#define IDirectSoundBuffer_GetPan(p,a) (p)->GetPan(a) +#define IDirectSoundBuffer_GetFrequency(p,a) (p)->GetFrequency(a) +#define IDirectSoundBuffer_GetStatus(p,a) (p)->GetStatus(a) +#define IDirectSoundBuffer_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g) +#define IDirectSoundBuffer_Play(p,a,b,c) (p)->Play(a,b,c) +#define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->SetCurrentPosition(a) +#define IDirectSoundBuffer_SetFormat(p,a) (p)->SetFormat(a) +#define IDirectSoundBuffer_SetVolume(p,a) (p)->SetVolume(a) +#define IDirectSoundBuffer_SetPan(p,a) (p)->SetPan(a) +#define IDirectSoundBuffer_SetFrequency(p,a) (p)->SetFrequency(a) +#define IDirectSoundBuffer_Stop(p) (p)->Stop() +#define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d) +#define IDirectSoundBuffer_Restore(p) (p)->Restore() +#endif + + +/***************************************************************************** + * IDirectSoundBuffer8 interface + */ +#define INTERFACE IDirectSoundBuffer8 +DECLARE_INTERFACE_(IDirectSoundBuffer8,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectSoundBuffer8 methods ***/ + STDMETHOD(GetCaps)(THIS_ LPDSBCAPS lpDSBufferCaps) PURE; + STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor) PURE; + STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE; + STDMETHOD(GetVolume)(THIS_ LPLONG lplVolume) PURE; + STDMETHOD(GetPan)(THIS_ LPLONG lplpan) PURE; + STDMETHOD(GetFrequency)(THIS_ LPDWORD lpdwFrequency) PURE; + STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE; + STDMETHOD(Initialize)(THIS_ LPDIRECTSOUND lpDirectSound, LPCDSBUFFERDESC lpcDSBufferDesc) PURE; + STDMETHOD(Lock)(THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1, LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE; + STDMETHOD(Play)(THIS_ DWORD dwReserved1, DWORD dwReserved2, DWORD dwFlags) PURE; + STDMETHOD(SetCurrentPosition)(THIS_ DWORD dwNewPosition) PURE; + STDMETHOD(SetFormat)(THIS_ LPCWAVEFORMATEX lpcfxFormat) PURE; + STDMETHOD(SetVolume)(THIS_ LONG lVolume) PURE; + STDMETHOD(SetPan)(THIS_ LONG lPan) PURE; + STDMETHOD(SetFrequency)(THIS_ DWORD dwFrequency) PURE; + STDMETHOD(Stop)(THIS) PURE; + STDMETHOD(Unlock)(THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioPtr2) PURE; + STDMETHOD(Restore)(THIS) PURE; + STDMETHOD(SetFX)(THIS_ DWORD dwEffectsCount, LPDSEFFECTDESC pDSFXDesc, LPDWORD pdwResultCodes) PURE; + STDMETHOD(AcquireResources)(THIS_ DWORD dwFlags, DWORD dwEffectsCount, LPDWORD pdwResultCodes) PURE; + STDMETHOD(GetObjectInPath)(THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectSoundBuffer8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectSoundBuffer8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectSoundBuffer8_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectSoundBuffer methods ***/ +#define IDirectSoundBuffer8_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectSoundBuffer8_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b) +#define IDirectSoundBuffer8_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c) +#define IDirectSoundBuffer8_GetVolume(p,a) (p)->lpVtbl->GetVolume(p,a) +#define IDirectSoundBuffer8_GetPan(p,a) (p)->lpVtbl->GetPan(p,a) +#define IDirectSoundBuffer8_GetFrequency(p,a) (p)->lpVtbl->GetFrequency(p,a) +#define IDirectSoundBuffer8_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a) +#define IDirectSoundBuffer8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g) +#define IDirectSoundBuffer8_Play(p,a,b,c) (p)->lpVtbl->Play(p,a,b,c) +#define IDirectSoundBuffer8_SetCurrentPosition(p,a) (p)->lpVtbl->SetCurrentPosition(p,a) +#define IDirectSoundBuffer8_SetFormat(p,a) (p)->lpVtbl->SetFormat(p,a) +#define IDirectSoundBuffer8_SetVolume(p,a) (p)->lpVtbl->SetVolume(p,a) +#define IDirectSoundBuffer8_SetPan(p,a) (p)->lpVtbl->SetPan(p,a) +#define IDirectSoundBuffer8_SetFrequency(p,a) (p)->lpVtbl->SetFrequency(p,a) +#define IDirectSoundBuffer8_Stop(p) (p)->lpVtbl->Stop(p) +#define IDirectSoundBuffer8_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d) +#define IDirectSoundBuffer8_Restore(p) (p)->lpVtbl->Restore(p) +/*** IDirectSoundBuffer8 methods ***/ +#define IDirectSoundBuffer8_SetFX(p,a,b,c) (p)->lpVtbl->SetFX(p,a,b,c) +#define IDirectSoundBuffer8_AcquireResources(p,a,b,c) (p)->lpVtbl->AcquireResources(p,a,b,c) +#define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d) +#else +/*** IUnknown methods ***/ +#define IDirectSoundBuffer8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectSoundBuffer8_AddRef(p) (p)->AddRef() +#define IDirectSoundBuffer8_Release(p) (p)->Release() +/*** IDirectSoundBuffer methods ***/ +#define IDirectSoundBuffer8_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectSoundBuffer8_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b) +#define IDirectSoundBuffer8_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c) +#define IDirectSoundBuffer8_GetVolume(p,a) (p)->GetVolume(a) +#define IDirectSoundBuffer8_GetPan(p,a) (p)->GetPan(a) +#define IDirectSoundBuffer8_GetFrequency(p,a) (p)->GetFrequency(a) +#define IDirectSoundBuffer8_GetStatus(p,a) (p)->GetStatus(a) +#define IDirectSoundBuffer8_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g) +#define IDirectSoundBuffer8_Play(p,a,b,c) (p)->Play(a,b,c) +#define IDirectSoundBuffer8_SetCurrentPosition(p,a) (p)->SetCurrentPosition(a) +#define IDirectSoundBuffer8_SetFormat(p,a) (p)->SetFormat(a) +#define IDirectSoundBuffer8_SetVolume(p,a) (p)->SetVolume(a) +#define IDirectSoundBuffer8_SetPan(p,a) (p)->SetPan(a) +#define IDirectSoundBuffer8_SetFrequency(p,a) (p)->SetFrequency(a) +#define IDirectSoundBuffer8_Stop(p) (p)->Stop() +#define IDirectSoundBuffer8_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d) +#define IDirectSoundBuffer8_Restore(p) (p)->Restore() +/*** IDirectSoundBuffer8 methods ***/ +#define IDirectSoundBuffer8_SetFX(p,a,b,c) (p)->SetFX(a,b,c) +#define IDirectSoundBuffer8_AcquireResources(p,a,b,c) (p)->AcquireResources(a,b,c) +#define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d) +#endif + + +/***************************************************************************** + * IDirectSoundCapture interface + */ +#define INTERFACE IDirectSoundCapture +DECLARE_INTERFACE_(IDirectSoundCapture,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectSoundCapture methods ***/ + STDMETHOD(CreateCaptureBuffer)(THIS_ LPCDSCBUFFERDESC lpcDSCBufferDesc,LPDIRECTSOUNDCAPTUREBUFFER *lplpDSCaptureBuffer, LPUNKNOWN pUnk) PURE; + STDMETHOD(GetCaps)(THIS_ LPDSCCAPS lpDSCCaps) PURE; + STDMETHOD(Initialize)(THIS_ LPCGUID lpcGUID) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectSoundCapture_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectSoundCapture_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectSoundCapture_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectSoundCapture methods ***/ +#define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->lpVtbl->CreateCaptureBuffer(p,a,b,c) +#define IDirectSoundCapture_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectSoundCapture_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#else +/*** IUnknown methods ***/ +#define IDirectSoundCapture_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectSoundCapture_AddRef(p) (p)->AddRef() +#define IDirectSoundCapture_Release(p) (p)->Release() +/*** IDirectSoundCapture methods ***/ +#define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->CreateCaptureBuffer(a,b,c) +#define IDirectSoundCapture_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectSoundCapture_Initialize(p,a) (p)->Initialize(a) +#endif + +/***************************************************************************** + * IDirectSoundCaptureBuffer interface + */ +#define INTERFACE IDirectSoundCaptureBuffer +DECLARE_INTERFACE_(IDirectSoundCaptureBuffer,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectSoundCaptureBuffer methods ***/ + STDMETHOD(GetCaps)(THIS_ LPDSCBCAPS lpDSCBCaps) PURE; + STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCapturePosition,LPDWORD lpdwReadPosition) PURE; + STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE; + STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE; + STDMETHOD(Initialize)(THIS_ LPDIRECTSOUNDCAPTURE lpDSC, LPCDSCBUFFERDESC lpcDSCBDesc) PURE; + STDMETHOD(Lock)(THIS_ DWORD dwReadCusor, DWORD dwReadBytes, LPVOID *lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID *lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE; + STDMETHOD(Start)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(Stop)(THIS) PURE; + STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioBytes2) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectSoundCaptureBuffer_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectSoundCaptureBuffer_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectSoundCaptureBuffer methods ***/ +#define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b) +#define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c) +#define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a) +#define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g) +#define IDirectSoundCaptureBuffer_Start(p,a) (p)->lpVtbl->Start(p,a) +#define IDirectSoundCaptureBuffer_Stop(p) (p)->lpVtbl->Stop(p) +#define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d) +#else +/*** IUnknown methods ***/ +#define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectSoundCaptureBuffer_AddRef(p) (p)->AddRef() +#define IDirectSoundCaptureBuffer_Release(p) (p)->Release() +/*** IDirectSoundCaptureBuffer methods ***/ +#define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b) +#define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c) +#define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->GetStatus(a) +#define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g) +#define IDirectSoundCaptureBuffer_Start(p,a) (p)->Start(a) +#define IDirectSoundCaptureBuffer_Stop(p) (p)->Stop() +#define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d) +#endif + +/***************************************************************************** + * IDirectSoundCaptureBuffer8 interface + */ +#define INTERFACE IDirectSoundCaptureBuffer8 +DECLARE_INTERFACE_(IDirectSoundCaptureBuffer8,IDirectSoundCaptureBuffer) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectSoundCaptureBuffer methods ***/ + STDMETHOD(GetCaps)(THIS_ LPDSCBCAPS lpDSCBCaps) PURE; + STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCapturePosition,LPDWORD lpdwReadPosition) PURE; + STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE; + STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE; + STDMETHOD(Initialize)(THIS_ LPDIRECTSOUNDCAPTURE lpDSC, LPCDSCBUFFERDESC lpcDSCBDesc) PURE; + STDMETHOD(Lock)(THIS_ DWORD dwReadCusor, DWORD dwReadBytes, LPVOID *lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID *lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE; + STDMETHOD(Start)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(Stop)(THIS) PURE; + STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioBytes2) PURE; + /*** IDirectSoundCaptureBuffer8 methods ***/ + STDMETHOD(GetObjectInPath)(THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE; + STDMETHOD(GetFXStatus)(THIS_ DWORD dwFXCount, LPDWORD pdwFXStatus) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectSoundCaptureBuffer8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectSoundCaptureBuffer8_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectSoundCaptureBuffer methods ***/ +#define IDirectSoundCaptureBuffer8_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b) +#define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c) +#define IDirectSoundCaptureBuffer8_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a) +#define IDirectSoundCaptureBuffer8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g) +#define IDirectSoundCaptureBuffer8_Start(p,a) (p)->lpVtbl->Start(p,a) +#define IDirectSoundCaptureBuffer8_Stop(p) (p)->lpVtbl->Stop(p) +#define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d) +/*** IDirectSoundCaptureBuffer8 methods ***/ +#define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d) +#define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b) (p)->lpVtbl->GetFXStatus(p,a,b) +#else +/*** IUnknown methods ***/ +#define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectSoundCaptureBuffer8_AddRef(p) (p)->AddRef() +#define IDirectSoundCaptureBuffer8_Release(p) (p)->Release() +/*** IDirectSoundCaptureBuffer methods ***/ +#define IDirectSoundCaptureBuffer8_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b) +#define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c) +#define IDirectSoundCaptureBuffer8_GetStatus(p,a) (p)->GetStatus(a) +#define IDirectSoundCaptureBuffer8_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g) +#define IDirectSoundCaptureBuffer8_Start(p,a) (p)->Start(a) +#define IDirectSoundCaptureBuffer8_Stop(p) (p)->Stop() +#define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d) +/*** IDirectSoundCaptureBuffer8 methods ***/ +#define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d) +#define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b) (p)->GetFXStatus(a,b) +#endif + +/***************************************************************************** + * IDirectSoundNotify interface + */ +#define WINE_NOBUFFER 0x80000000 + +#define DSBPN_OFFSETSTOP -1 + +#define INTERFACE IDirectSoundNotify +DECLARE_INTERFACE_(IDirectSoundNotify,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectSoundNotify methods ***/ + STDMETHOD(SetNotificationPositions)(THIS_ DWORD cPositionNotifies, LPCDSBPOSITIONNOTIFY lpcPositionNotifies) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectSoundNotify_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectSoundNotify_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectSoundNotify_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectSoundNotify methods ***/ +#define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->lpVtbl->SetNotificationPositions(p,a,b) +#else +/*** IUnknown methods ***/ +#define IDirectSoundNotify_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectSoundNotify_AddRef(p) (p)->AddRef() +#define IDirectSoundNotify_Release(p) (p)->Release() +/*** IDirectSoundNotify methods ***/ +#define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->SetNotificationPositions(a,b) +#endif + + +/***************************************************************************** + * IDirectSound3DListener interface + */ +#define DS3DMODE_NORMAL 0x00000000 +#define DS3DMODE_HEADRELATIVE 0x00000001 +#define DS3DMODE_DISABLE 0x00000002 + +#define DS3D_IMMEDIATE 0x00000000 +#define DS3D_DEFERRED 0x00000001 + +#define DS3D_MINDISTANCEFACTOR FLT_MIN +#define DS3D_MAXDISTANCEFACTOR FLT_MAX +#define DS3D_DEFAULTDISTANCEFACTOR 1.0f + +#define DS3D_MINROLLOFFFACTOR 0.0f +#define DS3D_MAXROLLOFFFACTOR 10.0f +#define DS3D_DEFAULTROLLOFFFACTOR 1.0f + +#define DS3D_MINDOPPLERFACTOR 0.0f +#define DS3D_MAXDOPPLERFACTOR 10.0f +#define DS3D_DEFAULTDOPPLERFACTOR 1.0f + +#define DS3D_DEFAULTMINDISTANCE 1.0f +#define DS3D_DEFAULTMAXDISTANCE 1000000000.0f + +#define DS3D_MINCONEANGLE 0 +#define DS3D_MAXCONEANGLE 360 +#define DS3D_DEFAULTCONEANGLE 360 + +#define DS3D_DEFAULTCONEOUTSIDEVOLUME DSBVOLUME_MAX + +typedef struct _DS3DLISTENER { + DWORD dwSize; + D3DVECTOR vPosition; + D3DVECTOR vVelocity; + D3DVECTOR vOrientFront; + D3DVECTOR vOrientTop; + D3DVALUE flDistanceFactor; + D3DVALUE flRolloffFactor; + D3DVALUE flDopplerFactor; +} DS3DLISTENER, *LPDS3DLISTENER; + +typedef const DS3DLISTENER *LPCDS3DLISTENER; + +#define INTERFACE IDirectSound3DListener +DECLARE_INTERFACE_(IDirectSound3DListener,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectSound3DListener methods ***/ + STDMETHOD(GetAllParameters)(THIS_ LPDS3DLISTENER lpListener) PURE; + STDMETHOD(GetDistanceFactor)(THIS_ LPD3DVALUE lpflDistanceFactor) PURE; + STDMETHOD(GetDopplerFactor)(THIS_ LPD3DVALUE lpflDopplerFactor) PURE; + STDMETHOD(GetOrientation)(THIS_ LPD3DVECTOR lpvOrientFront, LPD3DVECTOR lpvOrientTop) PURE; + STDMETHOD(GetPosition)(THIS_ LPD3DVECTOR lpvPosition) PURE; + STDMETHOD(GetRolloffFactor)(THIS_ LPD3DVALUE lpflRolloffFactor) PURE; + STDMETHOD(GetVelocity)(THIS_ LPD3DVECTOR lpvVelocity) PURE; + STDMETHOD(SetAllParameters)(THIS_ LPCDS3DLISTENER lpcListener, DWORD dwApply) PURE; + STDMETHOD(SetDistanceFactor)(THIS_ D3DVALUE flDistanceFactor, DWORD dwApply) PURE; + STDMETHOD(SetDopplerFactor)(THIS_ D3DVALUE flDopplerFactor, DWORD dwApply) PURE; + STDMETHOD(SetOrientation)(THIS_ D3DVALUE xFront, D3DVALUE yFront, D3DVALUE zFront, D3DVALUE xTop, D3DVALUE yTop, D3DVALUE zTop, DWORD dwApply) PURE; + STDMETHOD(SetPosition)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE; + STDMETHOD(SetRolloffFactor)(THIS_ D3DVALUE flRolloffFactor, DWORD dwApply) PURE; + STDMETHOD(SetVelocity)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE; + STDMETHOD(CommitDeferredSettings)(THIS) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectSound3DListener_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectSound3DListener_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectSound3DListener_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectSound3DListener methods ***/ +#define IDirectSound3DListener_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) +#define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->lpVtbl->GetDistanceFactor(p,a) +#define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->lpVtbl->GetDopplerFactor(p,a) +#define IDirectSound3DListener_GetOrientation(p,a,b) (p)->lpVtbl->GetOrientation(p,a,b) +#define IDirectSound3DListener_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a) +#define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->lpVtbl->GetRolloffFactor(p,a) +#define IDirectSound3DListener_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a) +#define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b) +#define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->lpVtbl->SetDistanceFactor(p,a,b) +#define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->lpVtbl->SetDopplerFactor(p,a,b) +#define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->lpVtbl->SetOrientation(p,a,b,c,d,e,f,g) +#define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d) +#define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->lpVtbl->SetRolloffFactor(p,a,b) +#define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d) +#define IDirectSound3DListener_CommitDeferredSettings(p) (p)->lpVtbl->CommitDeferredSettings(p) +#else +/*** IUnknown methods ***/ +#define IDirectSound3DListener_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectSound3DListener_AddRef(p) (p)->AddRef() +#define IDirectSound3DListener_Release(p) (p)->Release() +/*** IDirectSound3DListener methods ***/ +#define IDirectSound3DListener_GetAllParameters(p,a) (p)->GetAllParameters(a) +#define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->GetDistanceFactor(a) +#define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->GetDopplerFactor(a) +#define IDirectSound3DListener_GetOrientation(p,a,b) (p)->GetOrientation(a,b) +#define IDirectSound3DListener_GetPosition(p,a) (p)->GetPosition(a) +#define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->GetRolloffFactor(a) +#define IDirectSound3DListener_GetVelocity(p,a) (p)->GetVelocity(a) +#define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b) +#define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->SetDistanceFactor(a,b) +#define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->SetDopplerFactor(a,b) +#define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->SetOrientation(a,b,c,d,e,f,g) +#define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d) +#define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->SetRolloffFactor(a,b) +#define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d) +#define IDirectSound3DListener_CommitDeferredSettings(p) (p)->CommitDeferredSettings() +#endif + + +/***************************************************************************** + * IDirectSound3DBuffer interface + */ +typedef struct _DS3DBUFFER { + DWORD dwSize; + D3DVECTOR vPosition; + D3DVECTOR vVelocity; + DWORD dwInsideConeAngle; + DWORD dwOutsideConeAngle; + D3DVECTOR vConeOrientation; + LONG lConeOutsideVolume; + D3DVALUE flMinDistance; + D3DVALUE flMaxDistance; + DWORD dwMode; +} DS3DBUFFER, *LPDS3DBUFFER; + +typedef const DS3DBUFFER *LPCDS3DBUFFER; + +#define INTERFACE IDirectSound3DBuffer +DECLARE_INTERFACE_(IDirectSound3DBuffer,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectSound3DBuffer methods ***/ + STDMETHOD(GetAllParameters)(THIS_ LPDS3DBUFFER lpDs3dBuffer) PURE; + STDMETHOD(GetConeAngles)(THIS_ LPDWORD lpdwInsideConeAngle, LPDWORD lpdwOutsideConeAngle) PURE; + STDMETHOD(GetConeOrientation)(THIS_ LPD3DVECTOR lpvOrientation) PURE; + STDMETHOD(GetConeOutsideVolume)(THIS_ LPLONG lplConeOutsideVolume) PURE; + STDMETHOD(GetMaxDistance)(THIS_ LPD3DVALUE lpflMaxDistance) PURE; + STDMETHOD(GetMinDistance)(THIS_ LPD3DVALUE lpflMinDistance) PURE; + STDMETHOD(GetMode)(THIS_ LPDWORD lpwdMode) PURE; + STDMETHOD(GetPosition)(THIS_ LPD3DVECTOR lpvPosition) PURE; + STDMETHOD(GetVelocity)(THIS_ LPD3DVECTOR lpvVelocity) PURE; + STDMETHOD(SetAllParameters)(THIS_ LPCDS3DBUFFER lpcDs3dBuffer, DWORD dwApply) PURE; + STDMETHOD(SetConeAngles)(THIS_ DWORD dwInsideConeAngle, DWORD dwOutsideConeAngle, DWORD dwApply) PURE; + STDMETHOD(SetConeOrientation)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE; + STDMETHOD(SetConeOutsideVolume)(THIS_ LONG lConeOutsideVolume, DWORD dwApply) PURE; + STDMETHOD(SetMaxDistance)(THIS_ D3DVALUE flMaxDistance, DWORD dwApply) PURE; + STDMETHOD(SetMinDistance)(THIS_ D3DVALUE flMinDistance, DWORD dwApply) PURE; + STDMETHOD(SetMode)(THIS_ DWORD dwMode, DWORD dwApply) PURE; + STDMETHOD(SetPosition)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE; + STDMETHOD(SetVelocity)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectSound3DBuffer_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectSound3DBuffer_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectSound3DBuffer methods ***/ +#define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) +#define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->lpVtbl->GetConeAngles(p,a,b) +#define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->lpVtbl->GetConeOrientation(p,a) +#define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->lpVtbl->GetConeOutsideVolume(p,a) +#define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->lpVtbl->GetMaxDistance(p,a) +#define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->lpVtbl->GetMinDistance(p,a) +#define IDirectSound3DBuffer_GetMode(p,a) (p)->lpVtbl->GetMode(p,a) +#define IDirectSound3DBuffer_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a) +#define IDirectSound3DBuffer_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a) +#define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b) +#define IDirectSound3DBuffer_SetConeAngles(p,a,b,c) (p)->lpVtbl->SetConeAngles(p,a,b,c) +#define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->lpVtbl->SetConeOrientation(p,a,b,c,d) +#define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) (p)->lpVtbl->SetConeOutsideVolume(p,a,b) +#define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->lpVtbl->SetMaxDistance(p,a,b) +#define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->lpVtbl->SetMinDistance(p,a,b) +#define IDirectSound3DBuffer_SetMode(p,a,b) (p)->lpVtbl->SetMode(p,a,b) +#define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d) +#define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d) +#else +/*** IUnknown methods ***/ +#define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectSound3DBuffer_AddRef(p) (p)->AddRef() +#define IDirectSound3DBuffer_Release(p) (p)->Release() +/*** IDirectSound3DBuffer methods ***/ +#define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->GetAllParameters(a) +#define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->GetConeAngles(a,b) +#define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->GetConeOrientation(a) +#define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->GetConeOutsideVolume(a) +#define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->GetMaxDistance(a) +#define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->GetMinDistance(a) +#define IDirectSound3DBuffer_GetMode(p,a) (p)->GetMode(a) +#define IDirectSound3DBuffer_GetPosition(p,a) (p)->GetPosition(a) +#define IDirectSound3DBuffer_GetVelocity(p,a) (p)->GetVelocity(a) +#define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b) +#define IDirectSound3DBuffer_SetConeAngles(p,a,b,c) (p)->SetConeAngles(a,b,c) +#define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->SetConeOrientation(a,b,c,d) +#define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) (p)->SetConeOutsideVolume(a,b) +#define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->SetMaxDistance(a,b) +#define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->SetMinDistance(a,b) +#define IDirectSound3DBuffer_SetMode(p,a,b) (p)->SetMode(a,b) +#define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d) +#define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d) +#endif + +/***************************************************************************** + * IKsPropertySet interface + */ +#ifndef _IKsPropertySet_ +#define _IKsPropertySet_ + +typedef struct IKsPropertySet *LPKSPROPERTYSET; + +DEFINE_GUID(IID_IKsPropertySet,0x31EFAC30,0x515C,0x11D0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93); + +#define KSPROPERTY_SUPPORT_GET 1 +#define KSPROPERTY_SUPPORT_SET 2 + +#define INTERFACE IKsPropertySet +DECLARE_INTERFACE_(IKsPropertySet,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IKsPropertySet methods ***/ + STDMETHOD(Get)(THIS_ REFGUID rgid,ULONG x1,LPVOID p1,ULONG x2,LPVOID p2,ULONG x3,ULONG *px4) PURE; + STDMETHOD(Set)(THIS_ REFGUID rgid,ULONG x1,LPVOID p1,ULONG x2,LPVOID p2,ULONG x3) PURE; + STDMETHOD(QuerySupport)(THIS_ REFGUID rgid,ULONG x1,ULONG *px2) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IKsPropertySet_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IKsPropertySet_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IKsPropertySet_Release(p) (p)->lpVtbl->Release(p) +/*** IKsPropertySet methods ***/ +#define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->lpVtbl->Get(p,a,b,c,d,e,f,g) +#define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->lpVtbl->Set(p,a,b,c,d,e,f) +#define IKsPropertySet_QuerySupport(p,a,b,c) (p)->lpVtbl->QuerySupport(p,a,b,c) +#else +/*** IUnknown methods ***/ +#define IKsPropertySet_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IKsPropertySet_AddRef(p) (p)->AddRef() +#define IKsPropertySet_Release(p) (p)->Release() +/*** IKsPropertySet methods ***/ +#define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->Get(a,b,c,d,e,f,g) +#define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->Set(a,b,c,d,e,f) +#define IKsPropertySet_QuerySupport(p,a,b,c) (p)->QuerySupport(a,b,c) +#endif + +#endif /* _IKsPropertySet_ */ + +/***************************************************************************** + * IDirectSoundFullDuplex interface + */ +#define INTERFACE IDirectSoundFullDuplex +DECLARE_INTERFACE_(IDirectSoundFullDuplex,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectSoundFullDuplex methods ***/ + STDMETHOD(Initialize)(THIS_ LPCGUID pCaptureGuid,LPCGUID pRendererGuid,LPCDSCBUFFERDESC lpDscBufferDesc,LPCDSBUFFERDESC lpDsBufferDesc,HWND hWnd,DWORD dwLevel,LPLPDIRECTSOUNDCAPTUREBUFFER8 lplpDirectSoundCaptureBuffer8,LPLPDIRECTSOUNDBUFFER8 lplpDirectSoundBuffer8) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectSoundFullDuplex_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectSoundFullDuplex_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectSoundFullDuplex_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectSoundFullDuplex methods ***/ +#define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Initialize(p,a,b,c,d,e,f,g,h) +#else +/*** IUnknown methods ***/ +#define IDirectSoundFullDuplex_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectSoundFullDuplex_AddRef(p) (p)->AddRef() +#define IDirectSoundFullDuplex_Release(p) (p)->Release() +/*** IDirectSoundFullDuplex methods ***/ +#define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) (p)->Initialize(a,b,c,d,e,f,g,h) +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* defined(__cplusplus) */ + +#endif /* __WINE_DSOUND_H */ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/winsrc/psemu.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/winsrc/psemu.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/winsrc/psemu.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/winsrc/psemu.c 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,101 @@ +/*************************************************************************** + psemu.c - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +// These ancient stuff are still necessary for epsxe, so keep these but only for +// Windows port -Whistler + +#include "stdafx.h" + +#define _IN_PSEMU + +#include "externals.h" +#include "regs.h" +#include "dma.h" + +//////////////////////////////////////////////////////////////////////// +// OLD, SOMEWHAT (BUT NOT MUCH) SUPPORTED PSEMUPRO FUNCS +//////////////////////////////////////////////////////////////////////// + +unsigned short CALLBACK SPUgetOne(unsigned long val) +{ + if(spuAddr!=0xffffffff) + { + return SPUreadDMA(); + } + if(val>=512*1024) val=512*1024-1; + return spuMem[val>>1]; +} + +void CALLBACK SPUputOne(unsigned long val,unsigned short data) +{ + if(spuAddr!=0xffffffff) + { + SPUwriteDMA(data); + return; + } + if(val>=512*1024) val=512*1024-1; + spuMem[val>>1] = data; +} + +void CALLBACK SPUplaySample(unsigned char ch) +{ +} + +void CALLBACK SPUsetAddr(unsigned char ch, unsigned short waddr) +{ + s_chan[ch].pStart=spuMemC+((unsigned long) waddr<<3); +} + +void CALLBACK SPUsetPitch(unsigned char ch, unsigned short pitch) +{ + SetPitch(ch,pitch); +} + +void CALLBACK SPUsetVolumeL(unsigned char ch, short vol) +{ + SetVolumeR(ch,vol); +} + +void CALLBACK SPUsetVolumeR(unsigned char ch, short vol) +{ + SetVolumeL(ch,vol); +} + +void CALLBACK SPUstartChannels1(unsigned short channels) +{ + SoundOn(0,16,channels); +} + +void CALLBACK SPUstartChannels2(unsigned short channels) +{ + SoundOn(16,24,channels); +} + +void CALLBACK SPUstopChannels1(unsigned short channels) +{ + SoundOff(0,16,channels); +} + +void CALLBACK SPUstopChannels2(unsigned short channels) +{ + SoundOff(16,24,channels); +} + +void CALLBACK SPUplaySector(unsigned long mode, unsigned char * p) +{ +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/winsrc/record.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/winsrc/record.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/winsrc/record.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/winsrc/record.c 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,188 @@ +/*************************************************************************** + spu.c - description + ------------------- + begin : Sun Jan 12 2003 + copyright : (C) 2003 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +//*************************************************************************// +// History of changes: +// +// 2003/03/01 - Pete +// - added mono mode +// +// 2003/01/12 - Pete +// - added recording funcs (win version only) +// +//*************************************************************************// + +#include "stdafx.h" + +#ifdef _WINDOWS + +#include +#include "resource.h" +#include "externals.h" + +#define _IN_RECORD + +#include "record.h" + +//////////////////////////////////////////////////////////////////////// + +int iDoRecord=0; +HMMIO hWaveFile=NULL; +MMCKINFO mmckMain; +MMCKINFO mmckData; +char szFileName[256]; + +//////////////////////////////////////////////////////////////////////// + +void RecordStart() +{ + WAVEFORMATEX pcmwf; + + // setup header in the same format as our directsound stream + memset(&pcmwf,0,sizeof(WAVEFORMATEX)); + pcmwf.wFormatTag = WAVE_FORMAT_PCM; + + if(iDisStereo) + { + pcmwf.nChannels = 1; + pcmwf.nBlockAlign = 2; + } + else + { + pcmwf.nChannels = 2; + pcmwf.nBlockAlign = 4; + } + + pcmwf.nSamplesPerSec = 44100; + pcmwf.nAvgBytesPerSec = pcmwf.nSamplesPerSec * pcmwf.nBlockAlign; + pcmwf.wBitsPerSample = 16; + + // create file + hWaveFile=mmioOpen(szFileName,NULL,MMIO_CREATE|MMIO_WRITE|MMIO_EXCLUSIVE | MMIO_ALLOCBUF); + if(!hWaveFile) return; + + // setup WAVE, fmt and data chunks + memset(&mmckMain,0,sizeof(MMCKINFO)); + mmckMain.fccType = mmioFOURCC('W','A','V','E'); + + mmioCreateChunk(hWaveFile,&mmckMain,MMIO_CREATERIFF); + + memset(&mmckData,0,sizeof(MMCKINFO)); + mmckData.ckid = mmioFOURCC('f','m','t',' '); + mmckData.cksize = sizeof(WAVEFORMATEX); + + mmioCreateChunk(hWaveFile,&mmckData,0); + mmioWrite(hWaveFile,(char*)&pcmwf,sizeof(WAVEFORMATEX)); + mmioAscend(hWaveFile,&mmckData,0); + + mmckData.ckid = mmioFOURCC('d','a','t','a'); + mmioCreateChunk(hWaveFile,&mmckData,0); +} + +//////////////////////////////////////////////////////////////////////// + +void RecordStop() +{ + // first some check, if recording is running + iDoRecord=0; + if(!hWaveFile) return; + + // now finish writing & close the wave file + mmioAscend(hWaveFile,&mmckData,0); + mmioAscend(hWaveFile,&mmckMain,0); + mmioClose(hWaveFile,0); + + // init var + hWaveFile=NULL; +} + +//////////////////////////////////////////////////////////////////////// + +void RecordBuffer(unsigned char* pSound,long lBytes) +{ + // write the samples + if(hWaveFile) mmioWrite(hWaveFile,pSound,lBytes); +} + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + +BOOL CALLBACK RecordDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch(uMsg) + { + //--------------------------------------------------// init + case WM_INITDIALOG: + { + SetDlgItemText(hW,IDC_WAVFILE,"C:\\PEOPS.WAV"); // init filename edit + ShowCursor(TRUE); // mmm... who is hiding it? main emu? tsts + return TRUE; + } + //--------------------------------------------------// destroy + case WM_DESTROY: + { + RecordStop(); + }break; + //--------------------------------------------------// command + case WM_COMMAND: + { + if(wParam==IDCANCEL) iRecordMode=2; // cancel? raise flag for destroying the dialog + + if(wParam==IDC_RECORD) // record start/stop? + { + if(IsWindowEnabled(GetDlgItem(hW,IDC_WAVFILE))) // not started yet (edit is not disabled): + { + GetDlgItemText(hW,IDC_WAVFILE,szFileName,255);// get filename + + RecordStart(); // start recording + + if(hWaveFile) // start was ok? + { // -> disable filename edit, change text, raise flag + EnableWindow(GetDlgItem(hW,IDC_WAVFILE),FALSE); + SetDlgItemText(hW,IDC_RECORD,"Stop recording"); + iDoRecord=1; + } + else MessageBeep(0xFFFFFFFF); // error starting recording? BEEP + } + else // stop recording? + { + RecordStop(); // -> just do it + EnableWindow(GetDlgItem(hW,IDC_WAVFILE),TRUE);// -> enable filename edit again + SetDlgItemText(hW,IDC_RECORD,"Start recording"); + } + SetFocus(hWMain); + } + }break; + //--------------------------------------------------// size + case WM_SIZE: + if(wParam==SIZE_MINIMIZED) SetFocus(hWMain); // if we get minimized, set the foxus to the main window + break; + //--------------------------------------------------// setcursor + case WM_SETCURSOR: + { + SetCursor(LoadCursor(NULL,IDC_ARROW)); // force the arrow + return TRUE; + } + //--------------------------------------------------// + } + return FALSE; +} + +//////////////////////////////////////////////////////////////////////// +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/winsrc/record.h pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/winsrc/record.h --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/winsrc/record.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/winsrc/record.h 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,11 @@ +#ifndef _RECORD_H_ +#define _RECORD_H_ + +#ifdef _WINDOWS +void RecordStart(); +void RecordBuffer(unsigned char* pSound,long lBytes); +void RecordStop(); +BOOL CALLBACK RecordDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); +#endif + +#endif \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/winsrc/winmain.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/winsrc/winmain.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfsound/winsrc/winmain.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfsound/winsrc/winmain.c 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,34 @@ +/*************************************************************************** + spuPeopsSound.c - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +// winmain.c : Defines the entry point for the DLL application. +// + +#include "stdafx.h" + +HINSTANCE hInst = NULL; + +BOOL APIENTRY DllMain( HANDLE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + hInst=(HINSTANCE)hModule; + return TRUE; +} + diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/DFXVideo.def pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/DFXVideo.def --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/DFXVideo.def 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/DFXVideo.def 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,58 @@ +; gpuPeopsSoft.def : Declares the module parameters for the DLL. + +LIBRARY "DFXVideo" + +EXPORTS + ; Explicit exports can go here + PSEgetLibType @2 + PSEgetLibName @3 + PSEgetLibVersion @4 + GPUinit @5 + GPUshutdown @6 + GPUopen @7 + GPUclose @8 + GPUconfigure @9 + GPUabout @10 + GPUtest @11 + GPUwriteData @12 + GPUwriteStatus @13 + GPUreadData @14 + GPUreadStatus @15 + GPUdmaChain @16 + GPUgetMode @17 + GPUsetMode @18 + GPUupdateLace @19 + GPUmakeSnapshot @20 + GPUwriteDataMem @21 + GPUreadDataMem @22 + GPUdisplayText @23 + GPUdisplayFlags @24 + GPUfreeze @25 + GPUshowScreenPic @26 + GPUgetScreenPic @27 + + GPUcursor @28 + GPUsetfix @29 + + ZN_GPUdisplayFlags @30 + ZN_GPUmakeSnapshot @31 + ZN_GPUinit @32 + ZN_GPUopen @33 + ZN_GPUclose @34 + ZN_GPUshutdown @35 + ZN_GPUupdateLace @36 + ZN_GPUreadStatus @37 + ZN_GPUwriteStatus @38 + ZN_GPUdmaSliceOut @39 + ZN_GPUreadData @40 + ZN_GPUsetMode @41 + ZN_GPUgetMode @42 + ZN_GPUdmaSliceIn @43 + ZN_GPUwriteData @44 + ZN_GPUdmaChain @45 + ZN_GPUtest @46 + ZN_GPUfreeze @47 + ZN_GPUgetScreenPic @48 + ZN_GPUshowScreenPic @49 + + GPUvisualVibration @50 diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/DFXVideo.dev pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/DFXVideo.dev --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/DFXVideo.dev 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/DFXVideo.dev 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,379 @@ +[Project] +FileName=DFXVideo.dev +Name=DFXVideo +Ver=1 +IsCpp=1 +Type=3 +Compiler=-W -DWIN32 -DNDEBUG -D_WINDOWS -D__i386___@@_ +CppCompiler=-W -DWIN32 -DNDEBUG -D_WINDOWS -D__i386___@@_ +Includes=.\\;.\winsrc;..\..;..\..\glue;..\..\..\plugins\dfxvideo;..\..\..\libpcsxcore +Linker=-luser32 -lgdi32 -lwinmm -ladvapi32 -lvfw32 -def DFXVideo.def --enable-stdcall-fixup_@@_ +Libs= +UnitCount=33 +Folders=dfxvideo,winsrc,winsrc/directx +ObjFiles= +PrivateResource=DFXVideo_private.rc +ResourceIncludes= +MakeIncludes= +Icon= +ExeOutput= +ObjectOutput= +OverrideOutput=0 +OverrideOutputName=DFXVideo.exe +HostApplication= +CommandLine= +UseCustomMakefile=0 +CustomMakefile= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0010000001001000000100 + +[Unit1] +FileName=winsrc\d3d.h +Folder=winsrc/directx +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit2] +FileName=winsrc\d3dcaps.h +Folder=winsrc/directx +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit3] +FileName=winsrc\d3dtypes.h +Folder=winsrc/directx +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit4] +FileName=winsrc\ddraw.h +Folder=winsrc/directx +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit5] +FileName=winsrc\dxguid.c +Folder=winsrc/directx +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit6] +FileName=winsrc\cfg.c +Folder=winsrc +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit7] +FileName=winsrc\draw.c +Folder=winsrc +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit8] +FileName=winsrc\fps.c +Folder=winsrc +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit9] +FileName=winsrc\key.c +Folder=winsrc +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit10] +FileName=winsrc\record.c +Folder=winsrc +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit11] +FileName=winsrc\record.h +Folder=winsrc +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit12] +FileName=winsrc\winmain.c +Folder=winsrc +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit13] +FileName=..\..\..\plugins\dfxvideo\cfg.h +Folder=dfxvideo +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit14] +FileName=..\..\..\plugins\dfxvideo\draw.h +Folder=dfxvideo +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit15] +FileName=..\..\..\plugins\dfxvideo\externals.h +Folder=dfxvideo +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit16] +FileName=..\..\..\plugins\dfxvideo\fps.h +Folder=dfxvideo +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit17] +FileName=..\..\..\plugins\dfxvideo\gpu.c +Folder=dfxvideo +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit18] +FileName=..\..\..\plugins\dfxvideo\gpu.h +Folder=dfxvideo +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit19] +FileName=..\..\..\plugins\dfxvideo\hq2x.h +Folder=dfxvideo +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit20] +FileName=..\..\..\plugins\dfxvideo\hq3x.h +Folder=dfxvideo +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit21] +FileName=..\..\..\plugins\dfxvideo\interp.h +Folder=dfxvideo +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit22] +FileName=..\..\..\plugins\dfxvideo\key.h +Folder=dfxvideo +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit23] +FileName=..\..\..\plugins\dfxvideo\menu.c +Folder=dfxvideo +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit24] +FileName=..\..\..\plugins\dfxvideo\menu.h +Folder=dfxvideo +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit25] +FileName=..\..\..\plugins\dfxvideo\prim.c +Folder=dfxvideo +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit26] +FileName=..\..\..\plugins\dfxvideo\prim.h +Folder=dfxvideo +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit27] +FileName=..\..\..\plugins\dfxvideo\soft.c +Folder=dfxvideo +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit28] +FileName=..\..\..\plugins\dfxvideo\soft.h +Folder=dfxvideo +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit29] +FileName=..\..\..\plugins\dfxvideo\swap.h +Folder=dfxvideo +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit30] +FileName=..\..\..\plugins\dfxvideo\zn.c +Folder=dfxvideo +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit31] +FileName=DFXVideo.def +Folder= +Compile=0 +CompileCpp=0 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit32] +FileName=DFXVideo.rc +Folder=Resources +Compile=1 +CompileCpp=1 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit33] +FileName=resource.h +Folder= +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=0.1 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename=DFXVideo.exe +ProductName=DFXVideo +ProductVersion=0.1 +AutoIncBuildNr=0 + diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/DFXVideo.rc pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/DFXVideo.rc --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/DFXVideo.rc 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/DFXVideo.rc 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,569 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// Use MFC if available +// +#if defined(_MFC_VER) +#include "afxres.h" +#else +#include "WinResrc.h" +#include +#endif + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Neutral resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#pragma code_page(936) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_GPU BITMAP DISCARDABLE "res\\gpu.bmp" +#endif // Neutral resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#define _AFX_NO_SPLITTER_RESOURCES\r\n" + "#define _AFX_NO_OLE_RESOURCES\r\n" + "#define _AFX_NO_TRACKER_RESOURCES\r\n" + "#define _AFX_NO_PROPERTY_RESOURCES\r\n" + "\r\n" + "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#endif\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,17,0,0 + PRODUCTVERSION 1,17,0,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "\0" + VALUE "CompanyName", "\0" + VALUE "FileDescription", "Based on P.E.Op.S. gpu soft plugin\0" + VALUE "FileVersion", "1, 17, 0, 0\0" + VALUE "InternalName", "DFXVideo\0" + VALUE "LegalCopyright", "GPL\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "DFXVideo.DLL\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "DFXVideo\0" + VALUE "ProductVersion", "1, 17, 0, 0\0" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_CFGSOFT DIALOGEX 0, 0, 291, 292 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Configure the DirectDraw Renderer..." +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + PUSHBUTTON "Select device...",IDC_SELDEV,7,3,60,12 + CONTROL "Fullscreen mode",IDC_DISPMODE1,"Button", + BS_AUTORADIOBUTTON,10,28,67,10 + CONTROL "Window mode",IDC_DISPMODE2,"Button",BS_AUTORADIOBUTTON, + 10,43,63,10 + COMBOBOX IDC_RESOLUTION,78,27,102,64,CBS_DROPDOWNLIST | CBS_SORT | + WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COLDEPTH,225,27,52,64,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + EDITTEXT IDC_WINX,103,43,36,12,ES_AUTOHSCROLL + EDITTEXT IDC_WINY,151,43,36,12,ES_AUTOHSCROLL + COMBOBOX IDC_NOSTRETCH,78,61,199,100,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_DITHER,78,77,199,100,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + CONTROL "Transparent FPS display",IDC_TRANSPARENT,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,13,107,93,10 + CONTROL "Show FPS display on startup",IDC_SHOWFPS,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,13,118,104,10 + PUSHBUTTON "...",IDC_KEYCONFIG,216,111,11,10,0,WS_EX_STATICEDGE + CONTROL "Use FPS limit",IDC_USELIMIT,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,24,130,61,10 + CONTROL "Use Frame skipping",IDC_USESKIPPING,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,24,141,81,10 + CONTROL "Auto-detect FPS/Frame skipping limit",IDC_FRAMEAUTO, + "Button",BS_AUTORADIOBUTTON | WS_GROUP,143,129,135,11 + CONTROL "FPS limit (10-200) :",IDC_FRAMEMANUELL,"Button", + BS_AUTORADIOBUTTON,143,140,72,11 + EDITTEXT IDC_FRAMELIM,218,140,28,12,ES_AUTOHSCROLL + COMBOBOX IDC_SCANLINES,78,167,199,64,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + CONTROL "Use system memory - slower with most cards, disables auto-screen-filtering", + IDC_SYSMEMORY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13, + 184,260,10 + CONTROL "Wait for VSYNC - synchronize screen update with monitor refresh rate", + IDC_VSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,195, + 256,10 + CONTROL "Stop screen saver - disables screen savers/power-saving (n.a. in W95/NT4!)", + IDC_STOPSAVER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13, + 206,263,10 + CONTROL "Debug mode - enables some debugging features (n.a. with all cards)", + IDC_DEBUGMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13, + 217,263,10 + CONTROL "Activate special game fixes",IDC_GAMEFIX,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,13,228,101,10 + PUSHBUTTON "...",IDC_SELFIX,121,228,11,10,0,WS_EX_STATICEDGE + PUSHBUTTON "...",IDC_RECORDING,121,241,11,10,0,WS_EX_STATICEDGE + PUSHBUTTON "Fast",IDC_DEF1,10,267,35,14 + PUSHBUTTON "Nice",IDC_DEF2,49,267,35,14 + DEFPUSHBUTTON "OK",IDOK,97,267,50,14 + PUSHBUTTON "Cancel",IDCANCEL,153,267,50,14 + PUSHBUTTON "Copy settings\n to clipboard",IDC_CLIPBOARD,210,261,77, + 26,BS_MULTILINE,WS_EX_STATICEDGE + LTEXT "Primary",IDC_DEVICETXT,72,5,211,10 + GROUPBOX "Resolution && Colors",IDC_STATIC,4,17,283,78 + RTEXT "Color depth:",IDC_STATIC,182,28,39,10,SS_CENTERIMAGE + RTEXT "Size:",IDC_STATIC,74,44,26,9 + RTEXT "Stretching:",IDC_STATIC,26,63,48,9 + RTEXT "Scanline mode:",IDC_STATIC,9,169,61,8 + RTEXT "Recording options:",IDC_STATIC,55,241,61,10, + SS_CENTERIMAGE + CTEXT "x",IDC_STATIC,141,44,8,9 + GROUPBOX "Framerate",IDC_STATIC,4,96,283,60 + LTEXT "FPS",IDC_STATIC,250,142,20,9 + GROUPBOX "Options",IDC_STATIC,4,157,283,99 + GROUPBOX "Default settings",IDC_STATIC,4,257,87,30 + RTEXT "Key configuration:",IDC_STATIC,152,111,59,10, + SS_CENTERIMAGE + EDITTEXT IDC_CLPEDIT,204,278,6,8,ES_MULTILINE | ES_AUTOVSCROLL | + ES_AUTOHSCROLL | NOT WS_VISIBLE + RTEXT "Dithering:",IDC_STATIC,26,79,48,9 +END + +IDD_DEVICE DIALOG DISCARDABLE 0, 0, 186, 82 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION +CAPTION "Select device..." +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,24,63,50,14 + PUSHBUTTON "Cancel",IDCANCEL,112,63,50,14 + COMBOBOX IDC_DEVICE,7,7,167,64,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + CONTROL "Adjust gamma (fullscreen modes only)",IDC_USEGAMMA, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,28,156,9 + SCROLLBAR IDC_GAMMA,55,42,68,10 + RTEXT "Dark",IDC_STATIC,30,43,21,8 + LTEXT "Bright",IDC_STATIC,127,43,28,8 +END + +IDD_ABOUT DIALOG DISCARDABLE 0, 0, 258, 194 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION +CAPTION "About the P.E.Op.S. PSX DirectDraw Soft Renderer..." +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,103,176,50,14 + RTEXT "Version:",IDC_STATIC,17,6,49,10 + RTEXT "Coded by:",IDC_STATIC,17,29,49,10 + RTEXT "Pete's EMail:",IDC_STATIC,17,41,49,10 + LTEXT "1.17",IDC_STATIC,69,6,159,10 + LTEXT "Pete Bernert and the P.E.Op.S. team",IDC_STATIC,69,29, + 159,10 + LTEXT "BlackDove@addcom.de",IDC_STATIC,69,41,159,10 + LTEXT "http://www.pbernert.com",IDC_STATIC,82,95,142,10 + RTEXT "Release date:",IDC_STATIC,17,17,49,10 + LTEXT "12.06.2005",IDC_STATIC,69,17,159,10 + LTEXT "The P.E.Op.S. SoftGPU team:",IDC_STATIC,9,82,103,10 + CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME | SS_SUNKEN,4,76, + 249,94 + RTEXT "P.E.Op.S. page:",IDC_STATIC,9,56,57,10 + LTEXT "https://sourceforge.net/projects/peops",IDC_STATIC,69, + 56,159,10 + LTEXT "- Pete Bernert",IDC_STATIC,13,95,69,10 + LTEXT "- Lewpy",IDC_STATIC,13,106,69,10 + LTEXT "- lu_zero",IDC_STATIC,13,117,69,10 + LTEXT "- linuzappz",IDC_STATIC,13,128,69,10 + LTEXT "- Darko Matesic",IDC_STATIC,13,139,69,10 + LTEXT "http://mrdario.tripod.com",IDC_STATIC,82,139,142,10 + LTEXT "http://www.pcsx.net",IDC_STATIC,82,128,142,10 + LTEXT "http://lewpy.psxemu.com/",IDC_STATIC,82,106,142,10 + LTEXT "http://brsk.virtualave.net/lu_zero/",IDC_STATIC,82,117, + 142,10 + LTEXT "- syo",IDC_STATIC,13,150,69,10 + LTEXT "http://www.geocities.co.jp/SiliconValley-Bay/2072/", + IDC_STATIC,82,150,167,10 +END + +IDD_FIXES DIALOG DISCARDABLE 0, 0, 285, 218 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION +CAPTION "Special game fixes..." +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "Odd/even bit hack",IDC_FIX1,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,34,30,100,10 + CONTROL "Expand screen width",IDC_FIX2,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,34,45,91,10 + CONTROL "Ignore black brightness color",IDC_FIX3,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,34,60,106,10 + CONTROL "Disable coord check",IDC_FIX4,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,34,75,85,10 + CONTROL "Use low-res fps timer",IDC_FIX5,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,34,90,101,10 + CONTROL "Use PC fps calculation",IDC_FIX6,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,34,105,91,10 + CONTROL "Lazy screen updates",IDC_FIX7,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,34,120,91,10 + CONTROL "Use old frame skipping",IDC_FIX8,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,34,135,91,10 + CONTROL "Repeated flat tex triangles",IDC_FIX9,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,34,150,97,10 + CONTROL "Draw tex-quads as triangles",IDC_FIX10,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,34,165,100,10 + DEFPUSHBUTTON "OK",IDOK,66,199,50,14 + PUSHBUTTON "Cancel",IDCANCEL,169,199,50,14 + LTEXT "Activate the following options only if you want to play one of the listed games (or if your game is showing similar glitches)!", + IDC_STATIC,8,4,245,22 + LTEXT "Needed with epsxe 1.5.2 and older",IDC_STATIC,145,30, + 135,9,SS_CENTERIMAGE + LTEXT "Shows the full area in Capcom 2D fighters",IDC_STATIC, + 145,45,136,9,SS_CENTERIMAGE + LTEXT "Fixes black screens in Lunar",IDC_STATIC,145,60,134,9, + SS_CENTERIMAGE + LTEXT "Old compatibility mode",IDC_STATIC,145,75,135,9, + SS_CENTERIMAGE + LTEXT "For buggy motherboard chipsets",IDC_STATIC,145,90,133,9, + SS_CENTERIMAGE + LTEXT "Better fps limitation with some games",IDC_STATIC,145, + 105,129,9,SS_CENTERIMAGE + LTEXT "Maybe faster, needed for Pandemonium2",IDC_STATIC,145, + 120,139,9,SS_CENTERIMAGE + RTEXT "0x0001:",IDC_STATIC,1,30,28,9,SS_CENTERIMAGE + RTEXT "0x0002:",IDC_STATIC,1,45,28,9,SS_CENTERIMAGE + RTEXT "0x0004:",IDC_STATIC,1,60,28,9,SS_CENTERIMAGE + RTEXT "0x0008:",IDC_STATIC,1,75,28,9,SS_CENTERIMAGE + RTEXT "0x0010:",IDC_STATIC,1,90,28,9,SS_CENTERIMAGE + RTEXT "0x0020:",IDC_STATIC,1,105,28,9,SS_CENTERIMAGE + RTEXT "0x0040:",IDC_STATIC,1,120,28,9,SS_CENTERIMAGE + LTEXT "Skips only every second frame",IDC_STATIC,145,135,139,9, + SS_CENTERIMAGE + RTEXT "0x0080:",IDC_STATIC,1,135,28,9,SS_CENTERIMAGE + LTEXT "Needed by Dark Forces",IDC_STATIC,145,150,139,9, + SS_CENTERIMAGE + RTEXT "0x0100:",IDC_STATIC,1,150,28,9,SS_CENTERIMAGE + LTEXT "Slightly distorted textures can happen",IDC_STATIC,145, + 165,139,9,SS_CENTERIMAGE + RTEXT "0x0200:",IDC_STATIC,1,165,28,9,SS_CENTERIMAGE + CONTROL "Fake 'gpu busy' states",IDC_FIX11,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,34,180,100,10 + LTEXT "Toggles busy flags after drawing",IDC_STATIC,145,180, + 139,9,SS_CENTERIMAGE + RTEXT "0x0400:",IDC_STATIC,1,180,28,9,SS_CENTERIMAGE +END + +IDD_KEYS DIALOG DISCARDABLE 0, 0, 186, 220 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION +CAPTION "GPU key configuration" +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Default keys",IDC_DEFAULT,107,6,61,13 + COMBOBOX IDC_KEY1,108,25,61,62,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_KEY2,108,41,61,62,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_KEY3,108,57,61,62,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_KEY4,108,73,61,62,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_KEY5,108,89,61,62,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_KEY6,108,105,61,62,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_KEY7,108,121,61,62,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_KEY8,108,137,61,62,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_KEY9,108,153,61,62,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_KEY10,108,169,61,62,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + DEFPUSHBUTTON "OK",IDOK,20,197,50,14 + PUSHBUTTON "Cancel",IDCANCEL,115,197,50,14 + RTEXT "Show/hide gpu menu:",IDC_STATIC,4,26,100,9, + SS_CENTERIMAGE + RTEXT "Show/hide gpu infos:",IDC_STATIC,4,42,100,9, + SS_CENTERIMAGE + RTEXT "Toggle selected option up:",IDC_STATIC,4,58,100,9, + SS_CENTERIMAGE + RTEXT "Toggle selected option down:",IDC_STATIC,4,74,100,9, + SS_CENTERIMAGE + RTEXT "Select previous option:",IDC_STATIC,4,90,100,9, + SS_CENTERIMAGE + RTEXT "Select next option:",IDC_STATIC,4,106,100,9, + SS_CENTERIMAGE + RTEXT "Start/stop recording:",IDC_STATIC,4,122,100,9, + SS_CENTERIMAGE + RTEXT "Toggle wait VSYNC:",IDC_STATIC,4,138,100,9, + SS_CENTERIMAGE + RTEXT "Fast forward frame skipping:",IDC_STATIC,4,154,100,9, + SS_CENTERIMAGE + RTEXT "Debug mode: toggle vram view:",IDC_STATIC,4,170,100,9, + SS_CENTERIMAGE +END + +IDD_RECORDING DIALOG DISCARDABLE 0, 0, 215, 158 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Recording Options" +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "Standard Video Size",IDC_REC_MODE1,"Button", + BS_AUTORADIOBUTTON | WS_GROUP,25,36,80,12 + COMBOBOX IDC_VIDEO_SIZE,115,37,65,60,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + CONTROL "Custom Video Size",IDC_REC_MODE2,"Button", + BS_AUTORADIOBUTTON,25,51,80,12 + EDITTEXT IDC_REC_WIDTH,115,51,25,12,ES_AUTOHSCROLL + CTEXT "x",IDC_STATIC,141,51,12,12,SS_CENTERIMAGE + EDITTEXT IDC_REC_HEIGHT,155,51,25,12,ES_AUTOHSCROLL + RTEXT "Frame Rate Scale:",IDC_STATIC,45,69,60,12, + SS_CENTERIMAGE | NOT WS_GROUP + COMBOBOX IDC_FRAME_RATE,115,69,30,60,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + CONTROL "16 bit Compression:",IDC_COMPRESSION1,"Button", + BS_AUTORADIOBUTTON | WS_GROUP,21,86,165,12 + CONTROL "24 bit Compression:",IDC_COMPRESSION2,"Button", + BS_AUTORADIOBUTTON,21,101,165,12 + PUSHBUTTON "Configure",IDC_RECCFG,77,116,50,12 + DEFPUSHBUTTON "OK",IDOK,24,137,50,14 + PUSHBUTTON "Cancel",IDCANCEL,133,137,50,14 + LTEXT "You can start/stop the video recording using the 'recording' key (see key configuration)!\nThe video will be stored in the 'Demo' sub-directory.", + IDC_STATIC,5,3,203,27 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_CFGSOFT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 284 + TOPMARGIN, 7 + BOTTOMMARGIN, 280 + END + + IDD_DEVICE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + TOPMARGIN, 7 + BOTTOMMARGIN, 75 + END + + IDD_ABOUT, DIALOG + BEGIN + LEFTMARGIN, 7 + TOPMARGIN, 7 + BOTTOMMARGIN, 189 + END + + IDD_FIXES, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 278 + TOPMARGIN, 7 + BOTTOMMARGIN, 200 + END + + IDD_KEYS, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + TOPMARGIN, 7 + BOTTOMMARGIN, 190 + END + + IDD_RECORDING, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 208 + TOPMARGIN, 7 + BOTTOMMARGIN, 151 + END +END +#endif // APSTUDIO_INVOKED + +#ifdef _MSC_VER + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog Info +// + +IDD_CFGSOFT DLGINIT +BEGIN + IDC_RESOLUTION, 0x403, 1, 0 +"\000" + IDC_NOSTRETCH, 0x403, 10, 0 +0x3436, 0x2030, 0x2078, 0x3834, 0x0030, + IDC_NOSTRETCH, 0x403, 10, 0 +0x3038, 0x2030, 0x2078, 0x3036, 0x0030, + IDC_NOSTRETCH, 0x403, 11, 0 +0x3031, 0x3432, 0x7820, 0x3720, 0x3836, "\000" + IDC_NOSTRETCH, 0x403, 11, 0 +0x3131, 0x3235, 0x7820, 0x3820, 0x3436, "\000" + IDC_NOSTRETCH, 0x403, 12, 0 +0x3231, 0x3038, 0x7820, 0x3120, 0x3230, 0x0034, + IDC_NOSTRETCH, 0x403, 12, 0 +0x3631, 0x3030, 0x7820, 0x3120, 0x3032, 0x0030, + IDC_DITHER, 0x403, 10, 0 +0x3436, 0x2030, 0x2078, 0x3834, 0x0030, + IDC_DITHER, 0x403, 10, 0 +0x3038, 0x2030, 0x2078, 0x3036, 0x0030, + IDC_DITHER, 0x403, 11, 0 +0x3031, 0x3432, 0x7820, 0x3720, 0x3836, "\000" + IDC_DITHER, 0x403, 11, 0 +0x3131, 0x3235, 0x7820, 0x3820, 0x3436, "\000" + IDC_DITHER, 0x403, 12, 0 +0x3231, 0x3038, 0x7820, 0x3120, 0x3230, 0x0034, + IDC_DITHER, 0x403, 12, 0 +0x3631, 0x3030, 0x7820, 0x3120, 0x3032, 0x0030, + IDC_SCANLINES, 0x403, 10, 0 +0x3436, 0x2030, 0x2078, 0x3834, 0x0030, + IDC_SCANLINES, 0x403, 10, 0 +0x3038, 0x2030, 0x2078, 0x3036, 0x0030, + IDC_SCANLINES, 0x403, 11, 0 +0x3031, 0x3432, 0x7820, 0x3720, 0x3836, "\000" + IDC_SCANLINES, 0x403, 11, 0 +0x3131, 0x3235, 0x7820, 0x3820, 0x3436, "\000" + IDC_SCANLINES, 0x403, 12, 0 +0x3231, 0x3038, 0x7820, 0x3120, 0x3230, 0x0034, + IDC_SCANLINES, 0x403, 12, 0 +0x3631, 0x3030, 0x7820, 0x3120, 0x3032, 0x0030, + 0 +END + +IDD_DEVICE DLGINIT +BEGIN + IDC_DEVICE, 0x403, 11, 0 +0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000" + IDC_DEVICE, 0x403, 12, 0 +0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034, + IDC_DEVICE, 0x403, 12, 0 +0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031, + IDC_DEVICE, 0x403, 12, 0 +0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038, + 0 +END + +#endif + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_INFO0 "FL - Frame limitation:\n[Off] - Speed as fast as possible\n[On-1] - Limits speed to manual value\n[On-2] - Limits speed to auto-detected value." + IDS_INFO1 "FS - Frame skipping:\n[Off] - No frames get skipped\n[On] - Tries to speed up the game by skipping frames. Can cause glitches!" + IDS_INFO2 "GF - Special game fixes:\n[Off] - Turn off all fixes\n[On] - Turn on all activated fixes. You have to select the fixes you want to use in the gpu config." +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#define _AFX_NO_SPLITTER_RESOURCES +#define _AFX_NO_OLE_RESOURCES +#define _AFX_NO_TRACKER_RESOURCES +#define _AFX_NO_PROPERTY_RESOURCES + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/DFXVideo.vcxproj pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/DFXVideo.vcxproj --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/DFXVideo.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/DFXVideo.vcxproj 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,261 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {30F06328-DD64-4030-AF7A-19FBC74CF298} + DFXVideo + + + + DynamicLibrary + false + + + DynamicLibrary + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + .\Release\ + .\Release\ + false + .\Debug\ + .\Debug\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/DFXVideo.tlb + + + + + MaxSpeed + OnlyExplicitInline + .\;.\winsrc;..\..;..\..\glue;..\..\..\plugins\dfxvideo;..\..\..\libpcsxcore;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;__i386__;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + .\Release/DFXVideo.pch + .\Release/ + .\Release/ + .\Release/ + true + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0407 + + + winmm.lib;vfw32.lib;%(AdditionalDependencies) + .\Release/DFXVideo.dll + true + .\DFXVideo.def + .\Release/DFXVideo.pdb + Windows + false + + + .\Release/DFXVideo.lib + MachineX86 + + + true + .\Release/DFXVideo.bsc + + + rem copy release\DFXVideo.dll d:\emus\epsxe\plugins +rem copy release\DFXVideo.dll d:\emus\zinc\renderer.znc + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/DFXVideo.tlb + + + + + Disabled + .\;.\winsrc;..\..\glue;..\..\..\plugins\dfxvideo;..\..\..\libpcsxcore;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + .\Debug/DFXVideo.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0407 + + + winmm.lib;vfw32.lib;%(AdditionalDependencies) + $(SolutionDir)$(Configuration)\DFXVideo.dll + true + .\DFXVideo.def + true + .\Debug/DFXVideo.pdb + Windows + false + + + .\Debug/DFXVideo.lib + MachineX86 + + + true + .\Debug/DFXVideo.bsc + + + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/DFXVideo.vcxproj.filters pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/DFXVideo.vcxproj.filters --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/DFXVideo.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/DFXVideo.vcxproj.filters 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,115 @@ + + + + + {afc9ce0e-17fa-434b-8647-6f5a06a36ed6} + + + {cc13db17-9136-4f07-8ddb-981412cb060b} + + + {435c6684-c400-40cc-a3b8-29f69899e0e6} + + + + + winsrc + + + winsrc + + + winsrc + + + winsrc + + + winsrc + + + winsrc + + + winsrc\directx + + + dfxvideo + + + dfxvideo + + + dfxvideo + + + dfxvideo + + + dfxvideo + + + + + winsrc + + + winsrc\directx + + + winsrc\directx + + + winsrc\directx + + + winsrc\directx + + + dfxvideo + + + dfxvideo + + + dfxvideo + + + dfxvideo + + + dfxvideo + + + dfxvideo + + + dfxvideo + + + dfxvideo + + + dfxvideo + + + dfxvideo + + + dfxvideo + + + dfxvideo + + + dfxvideo + + + + + + + + + + \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/DFXVideo.vcxproj.user pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/DFXVideo.vcxproj.user --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/DFXVideo.vcxproj.user 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/DFXVideo.vcxproj.user 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,3 @@ + + + \ No newline at end of file Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/res/gpu.bmp and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/res/gpu.bmp differ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/resource.h pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/resource.h --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/resource.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/resource.h 2016-06-30 16:53:25.000000000 +0000 @@ -0,0 +1,143 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by DFXVideo.rc +// +#define IDS_INFO0 1 +#define IDS_INFO1 2 +#define IDS_INFO2 3 +#define IDC_DEFAULT 3 +#define IDC_DEF1 127 +#define IDC_DEF2 128 +#define IDD_DEVICE 133 +#define IDD_ABOUT 135 +#define IDD_FIXES 136 +#define IDB_GPU 137 +#define IDD_KEYS 138 +#define IDD_RECORDING 139 +#define IDC_CURSOR1 142 +#define IDD_CFGDLG 500 +#define IDD_CFGSOFT 501 +#define IDC_KEY1 1030 +#define IDC_KEY2 1031 +#define IDC_KEY3 1032 +#define IDC_KEY4 1033 +#define IDC_KEY5 1034 +#define IDC_KEY6 1035 +#define IDC_KEY7 1036 +#define IDC_KEY8 1037 +#define IDC_KEY9 1038 +#define IDC_KEY10 1039 +#define IDC_CLIPBOARD 1040 +#define IDC_CLPEDIT 1041 +#define IDC_TEXWINDOWS 2001 +#define IDC_TEXFIX 2002 +#define IDC_TEXLINEAR 2003 +#define IDC_RESOLUTION 2004 +#define IDC_DRAWDITHER 2005 +#define IDC_SCANLINES 2005 +#define IDC_CACHESIZE 2006 +#define IDC_COLDEPTH 2006 +#define IDC_CACHETXT 2007 +#define IDC_NOSTRETCH 2007 +#define IDC_USELINES 2008 +#define IDC_USEMASK 2008 +#define IDC_DITHER 2008 +#define IDC_COLORDEPTH 2009 +#define IDC_CHANGEDESK 2010 +#define IDC_GAMEFIX 2010 +#define IDC_USELIMIT 2011 +#define IDC_FRAMELIMIT 2012 +#define IDC_USESKIPPING 2012 +#define IDC_FRAMEAUTO 2013 +#define IDC_FRAMEMANUELL 2014 +#define IDC_ADVBLEND 2015 +#define IDC_DELAYEDFB 2015 +#define IDC_SHOWFPS 2015 +#define IDC_OFFSCREEN 2016 +#define IDC_SYSMEMORY 2016 +#define IDC_OPAQUE 2017 +#define IDC_STOPSAVER 2017 +#define IDC_TEXQUALITY 2018 +#define IDC_QUALTXT 2019 +#define IDC_USESKIP 2020 +#define IDC_QUALTXT2 2020 +#define IDC_DEVICE 2020 +#define IDC_DISPMODE1 2021 +#define IDC_DISPMODE2 2022 +#define IDC_SUBCACHE 2023 +#define IDC_WINDOWFREE 2024 +#define IDC_EXTCOLCHECK 2024 +#define IDC_TEXUSE 2024 +#define IDC_WINDOWAUTO 2025 +#define IDC_USETEXPRIO 2025 +#define IDC_WINX 2026 +#define IDC_WINY 2027 +#define IDC_SELDEV 2028 +#define IDC_DEVICETXT 2029 +#define IDC_DB1 2030 +#define IDC_FILTERTYPE 2030 +#define IDC_DB2 2031 +#define IDC_QUALTXT3 2031 +#define IDC_DB3 2032 +#define IDC_EXTCOL 2033 +#define IDC_FRAMELIM 2034 +#define IDC_SELFIX 2037 +#define IDC_USEGAMMA 2037 +#define IDC_FIX1 2038 +#define IDC_KEYCONFIG 2038 +#define IDC_FIX2 2039 +#define IDC_RECORDING 2039 +#define IDC_FIX3 2040 +#define IDC_FIX4 2041 +#define IDC_FIX5 2042 +#define IDC_FIX6 2043 +#define IDC_FIX7 2044 +#define IDC_FIX8 2045 +#define IDC_FIX9 2046 +#define IDC_FIX10 2047 +#define IDC_FIX11 2048 +#define IDC_FIX12 2049 +#define IDC_FIX13 2050 +#define IDC_FIX14 2051 +#define IDC_FIX15 2052 +#define IDC_FIX16 2053 +#define IDC_FIX17 2054 +#define IDC_FIX18 2055 +#define IDC_FIX19 2056 +#define IDC_FIX20 2057 +#define IDC_FIX21 2058 +#define IDC_FIX22 2059 +#define IDC_FIX23 2060 +#define IDC_FIX24 2061 +#define IDC_FIX25 2062 +#define IDC_FIX26 2063 +#define IDC_FIX27 2064 +#define IDC_FIX28 2065 +#define IDC_FIX29 2066 +#define IDC_FIX30 2067 +#define IDC_FIX31 2068 +#define IDC_FIX32 2069 +#define IDC_GAMMA 2070 +#define IDC_REC_MODE1 2071 +#define IDC_REC_MODE2 2072 +#define IDC_VIDEO_SIZE 2073 +#define IDC_REC_WIDTH 2074 +#define IDC_REC_HEIGHT 2075 +#define IDC_FRAME_RATE 2076 +#define IDC_COMPRESSION1 2077 +#define IDC_COMPRESSION2 2078 +#define IDC_RECCFG 2079 +#define IDC_VSYNC 2080 +#define IDC_TRANSPARENT 2081 +#define IDC_DEBUGMODE 2082 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 143 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 2083 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/cfg.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/cfg.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/cfg.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/cfg.c 2016-06-30 16:53:26.000000000 +0000 @@ -0,0 +1,1296 @@ +/*************************************************************************** + cfg.c - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define _IN_CFG + +#include "externals.h" +#include "cfg.h" +#include "gpu.h" +#include "record.h" + +///////////////////////////////////////////////////////////////////////////// +// globals + +char szKeyDefaults[11]={VK_DELETE,VK_INSERT,VK_HOME,VK_END,VK_PRIOR,VK_NEXT,VK_MULTIPLY,VK_SUBTRACT,VK_ADD,VK_F12,0x00}; +char szDevName[128]; + +//////////////////////////////////////////////////////////////////////// +// prototypes + +BOOL OnInitCfgDialog(HWND hW); +void OnCfgOK(HWND hW); +BOOL OnInitSoftDialog(HWND hW); +void OnSoftOK(HWND hW); +void OnCfgCancel(HWND hW); +void OnCfgDef1(HWND hW); +void OnCfgDef2(HWND hW); +void OnBugFixes(HWND hW); + +void OnRecording(HWND hW); + +void SelectDev(HWND hW); +BOOL bTestModes(void); +void OnKeyConfig(HWND hW); +void GetSettings(HWND hW); +void OnClipboard(HWND hW); +void DoDevEnum(HWND hW); +char * pGetConfigInfos(int iCfg); + +//////////////////////////////////////////////////////////////////////// +// funcs + +BOOL CALLBACK SoftDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch(uMsg) + { + case WM_INITDIALOG: + return OnInitSoftDialog(hW); + + case WM_COMMAND: + { + switch(LOWORD(wParam)) + { + case IDC_DISPMODE1: + { + CheckDlgButton(hW,IDC_DISPMODE2,FALSE); + return TRUE; + } + case IDC_DISPMODE2: + { + CheckDlgButton(hW,IDC_DISPMODE1,FALSE); + return TRUE; + } + case IDC_DEF1: OnCfgDef1(hW); return TRUE; + case IDC_DEF2: OnCfgDef2(hW); return TRUE; + case IDC_SELFIX: OnBugFixes(hW); return TRUE; + case IDC_KEYCONFIG: OnKeyConfig(hW); return TRUE; + case IDC_SELDEV: SelectDev(hW); return TRUE; + case IDCANCEL: OnCfgCancel(hW); return TRUE; + case IDOK: OnSoftOK(hW); return TRUE; + case IDC_CLIPBOARD: OnClipboard(hW); return TRUE; + + case IDC_RECORDING: OnRecording(hW); return TRUE; + } + } + } + return FALSE; +} + +//////////////////////////////////////////////////////////////////////// +// init dlg +//////////////////////////////////////////////////////////////////////// + +void ComboBoxAddRes(HWND hWC,char * cs) +{ + int i=ComboBox_FindString(hWC,-1,cs); + if(i!=CB_ERR) return; + ComboBox_AddString(hWC,cs); +} + +BOOL OnInitSoftDialog(HWND hW) +{ + HWND hWC;char cs[256];int i;DEVMODE dv; + + ReadConfig(); // read registry stuff + + if(szDevName[0]) + SetDlgItemText(hW,IDC_DEVICETXT,szDevName); + + hWC=GetDlgItem(hW,IDC_RESOLUTION); + + memset(&dv,0,sizeof(DEVMODE)); + dv.dmSize=sizeof(DEVMODE); + i=0; + + while(EnumDisplaySettings(NULL,i,&dv)) + { + wsprintf(cs,"%4d x %4d - default",dv.dmPelsWidth,dv.dmPelsHeight); + ComboBoxAddRes(hWC,cs); + if(dv.dmDisplayFrequency > 40 && dv.dmDisplayFrequency < 200 ) + { + wsprintf(cs,"%4d x %4d , %4d Hz",dv.dmPelsWidth,dv.dmPelsHeight,dv.dmDisplayFrequency); + ComboBoxAddRes(hWC,cs); + } + i++; + } + + ComboBoxAddRes(hWC," 320 x 200 - default"); + ComboBoxAddRes(hWC," 320 x 240 - default"); + ComboBoxAddRes(hWC," 400 x 300 - default"); + ComboBoxAddRes(hWC," 512 x 384 - default"); + ComboBoxAddRes(hWC," 640 x 480 - default"); + ComboBoxAddRes(hWC," 800 x 600 - default"); + ComboBoxAddRes(hWC,"1024 x 768 - default"); + ComboBoxAddRes(hWC,"1152 x 864 - default"); + ComboBoxAddRes(hWC,"1280 x 1024 - default"); + ComboBoxAddRes(hWC,"1600 x 1200 - default"); + + if(iRefreshRate) + wsprintf(cs,"%4d x %4d , %4d Hz",iResX,iResY,iRefreshRate); + else wsprintf(cs,"%4d x %4d - default",iResX,iResY); + + i=ComboBox_FindString(hWC,-1,cs); + if(i==CB_ERR) i=0; + ComboBox_SetCurSel(hWC,i); + + hWC=GetDlgItem(hW,IDC_COLDEPTH); + ComboBox_AddString(hWC,"16 Bit"); + ComboBox_AddString(hWC,"32 Bit"); + wsprintf(cs,"%d Bit",iColDepth); // resolution + i=ComboBox_FindString(hWC,-1,cs); + if(i==CB_ERR) i=0; + ComboBox_SetCurSel(hWC,i); + + hWC=GetDlgItem(hW,IDC_SCANLINES); + ComboBox_AddString(hWC,"Scanlines disabled"); + ComboBox_AddString(hWC,"Scanlines enabled (standard)"); + ComboBox_AddString(hWC,"Scanlines enabled (double blitting - nVidia fix)"); + ComboBox_SetCurSel(hWC,iUseScanLines); + + SetDlgItemInt(hW,IDC_WINX,LOWORD(iWinSize),FALSE); // window size + SetDlgItemInt(hW,IDC_WINY,HIWORD(iWinSize),FALSE); + + if(UseFrameLimit) CheckDlgButton(hW,IDC_USELIMIT,TRUE); + if(UseFrameSkip) CheckDlgButton(hW,IDC_USESKIPPING,TRUE); + if(iWindowMode) CheckRadioButton(hW,IDC_DISPMODE1,IDC_DISPMODE2,IDC_DISPMODE2); + else CheckRadioButton(hW,IDC_DISPMODE1,IDC_DISPMODE2,IDC_DISPMODE1); + if(iSysMemory) CheckDlgButton(hW,IDC_SYSMEMORY,TRUE); + if(iStopSaver) CheckDlgButton(hW,IDC_STOPSAVER,TRUE); + if(iUseFixes) CheckDlgButton(hW,IDC_GAMEFIX,TRUE); + if(iShowFPS) CheckDlgButton(hW,IDC_SHOWFPS,TRUE); + if(bVsync) CheckDlgButton(hW,IDC_VSYNC,TRUE); + if(bTransparent) CheckDlgButton(hW,IDC_TRANSPARENT,TRUE); + if(iDebugMode) CheckDlgButton(hW,IDC_DEBUGMODE,TRUE); + + hWC=GetDlgItem(hW,IDC_NOSTRETCH); // streching + ComboBox_AddString(hWC,"Stretch to full window size"); + ComboBox_AddString(hWC,"1:1 (faster with some cards)"); + ComboBox_AddString(hWC,"Scale to window size, keep aspect ratio"); + ComboBox_AddString(hWC,"2xSaI stretching (needs a fast cpu)"); + ComboBox_AddString(hWC,"2xSaI unstretched (needs a fast cpu)"); + ComboBox_AddString(hWC,"Super2xSaI stretching (needs a very fast cpu)"); + ComboBox_AddString(hWC,"Super2xSaI unstretched (needs a very fast cpu)"); + ComboBox_AddString(hWC,"SuperEagle stretching (needs a fast cpu)"); + ComboBox_AddString(hWC,"SuperEagle unstretched (needs a fast cpu)"); + ComboBox_AddString(hWC,"Scale2x stretching (needs a fast cpu)"); + ComboBox_AddString(hWC,"Scale2x unstretched (needs a fast cpu)"); + ComboBox_AddString(hWC,"HQ2X unstretched (needs a fast cpu)"); + ComboBox_AddString(hWC,"HQ2X streched (needs a fast cpu)"); + ComboBox_AddString(hWC,"Scale3x stretching (needs a fast cpu)"); + ComboBox_AddString(hWC,"Scale3x unstretched (needs a fast cpu)"); + ComboBox_AddString(hWC,"HQ3X unstretched (needs a fast cpu)"); + ComboBox_SetCurSel(hWC,iUseNoStretchBlt); + + hWC=GetDlgItem(hW,IDC_DITHER); // dithering + ComboBox_AddString(hWC,"No dithering (fastest)"); + ComboBox_AddString(hWC,"Game dependend dithering (slow)"); + ComboBox_AddString(hWC,"Always dither g-shaded polygons (slowest)"); + ComboBox_SetCurSel(hWC,iUseDither); + + if(iFrameLimit==2) // frame limit wrapper + CheckDlgButton(hW,IDC_FRAMEAUTO,TRUE); + else CheckDlgButton(hW,IDC_FRAMEMANUELL,TRUE); + + sprintf(cs,"%.1f",fFrameRate); + SetDlgItemText(hW,IDC_FRAMELIM,cs); // set frame rate + + return TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// on ok: take vals +//////////////////////////////////////////////////////////////////////// + +void GetSettings(HWND hW) +{ + HWND hWC;char cs[256];int i,j;char * p; + + hWC=GetDlgItem(hW,IDC_RESOLUTION); // get resolution + i=ComboBox_GetCurSel(hWC); + ComboBox_GetLBText(hWC,i,cs); + iResX=atol(cs); + p=strchr(cs,'x'); + iResY=atol(p+1); + p=strchr(cs,','); // added by syo + if(p) iRefreshRate=atol(p+1); // get refreshrate + else iRefreshRate=0; + + hWC=GetDlgItem(hW,IDC_COLDEPTH); // get color depth + i=ComboBox_GetCurSel(hWC); + ComboBox_GetLBText(hWC,i,cs); + iColDepth=atol(cs); + + hWC=GetDlgItem(hW,IDC_SCANLINES); // scanlines + iUseScanLines=ComboBox_GetCurSel(hWC); + + i=GetDlgItemInt(hW,IDC_WINX,NULL,FALSE); // get win size + if(i<50) i=50; if(i>20000) i=20000; + j=GetDlgItemInt(hW,IDC_WINY,NULL,FALSE); + if(j<50) j=50; if(j>20000) j=20000; + iWinSize=MAKELONG(i,j); + + if(IsDlgButtonChecked(hW,IDC_DISPMODE2)) // win mode + iWindowMode=1; else iWindowMode=0; + + if(IsDlgButtonChecked(hW,IDC_USELIMIT)) // fps limit + UseFrameLimit=1; else UseFrameLimit=0; + + if(IsDlgButtonChecked(hW,IDC_USESKIPPING)) // fps skip + UseFrameSkip=1; else UseFrameSkip=0; + + if(IsDlgButtonChecked(hW,IDC_GAMEFIX)) // game fix + iUseFixes=1; else iUseFixes=0; + + if(IsDlgButtonChecked(hW,IDC_SYSMEMORY)) // use system memory + iSysMemory=1; else iSysMemory=0; + + if(IsDlgButtonChecked(hW,IDC_STOPSAVER)) // stop screen saver + iStopSaver=1; else iStopSaver=0; + + if(IsDlgButtonChecked(hW,IDC_VSYNC)) // wait VSYNC + bVsync=bVsync_Key=TRUE; else bVsync=bVsync_Key=FALSE; + + if(IsDlgButtonChecked(hW,IDC_TRANSPARENT)) // transparent menu + bTransparent=TRUE; else bTransparent=FALSE; + + if(IsDlgButtonChecked(hW,IDC_SHOWFPS)) // show fps + iShowFPS=1; else iShowFPS=0; + + if(IsDlgButtonChecked(hW,IDC_DEBUGMODE)) // debug mode + iDebugMode=1; else iDebugMode=0; + + hWC=GetDlgItem(hW,IDC_NOSTRETCH); + iUseNoStretchBlt=ComboBox_GetCurSel(hWC); + + hWC=GetDlgItem(hW,IDC_DITHER); + iUseDither=ComboBox_GetCurSel(hWC); + + if(IsDlgButtonChecked(hW,IDC_FRAMEAUTO)) // frame rate + iFrameLimit=2; + else iFrameLimit=1; + + GetDlgItemText(hW,IDC_FRAMELIM,cs,255); + fFrameRate=(float)atof(cs); + if(fFrameRate<10.0f) fFrameRate=10.0f; + if(fFrameRate>200.0f) fFrameRate=200.0f; +} + +void OnSoftOK(HWND hW) +{ + GetSettings(hW); + + if(!iWindowMode && !bTestModes()) // check fullscreen sets + { + MessageBox(hW,"Resolution/color depth not supported!","Error",MB_ICONERROR|MB_OK); + return; + } + + WriteConfig(); // write registry + + EndDialog(hW,TRUE); +} + +//////////////////////////////////////////////////////////////////////// +// on clipboard button +//////////////////////////////////////////////////////////////////////// + +void OnClipboard(HWND hW) +{ + HWND hWE=GetDlgItem(hW,IDC_CLPEDIT); + char * pB; + GetSettings(hW); + pB=pGetConfigInfos(1); + + if(pB) + { + SetDlgItemText(hW,IDC_CLPEDIT,pB); + SendMessage(hWE,EM_SETSEL,0,-1); + SendMessage(hWE,WM_COPY,0,0); + free(pB); + MessageBox(hW,"Configuration info successfully copied to the clipboard\nJust use the PASTE function in another program to retrieve the data!","Copy Info",MB_ICONINFORMATION|MB_OK); + } +} + +//////////////////////////////////////////////////////////////////////// +// Cancel +//////////////////////////////////////////////////////////////////////// + +void OnCfgCancel(HWND hW) +{ + EndDialog(hW,FALSE); +} + +//////////////////////////////////////////////////////////////////////// +// Bug fixes +//////////////////////////////////////////////////////////////////////// + +BOOL CALLBACK BugFixesDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch(uMsg) + { + case WM_INITDIALOG: + { + int i; + + for(i=0;i<32;i++) + { + if(dwCfgFixes&(1<sizeof(RECORD_COMPRESSION_STATE1)) + { + memset(&RECORD_COMPRESSION1,0,sizeof(RECORD_COMPRESSION1)); + memset(&RECORD_COMPRESSION_STATE1,0,sizeof(RECORD_COMPRESSION_STATE1)); + RECORD_COMPRESSION1.cbSize = sizeof(RECORD_COMPRESSION1); + } + else + { + if(RECORD_COMPRESSION1.lpState!=RECORD_COMPRESSION_STATE1) + memcpy(RECORD_COMPRESSION_STATE1,RECORD_COMPRESSION1.lpState,RECORD_COMPRESSION1.cbState); + } + RECORD_COMPRESSION1.lpState = RECORD_COMPRESSION_STATE1; + } + else + { + BITMAPINFOHEADER bitmap = {40,640,480,1,24,0,640*480*3,2048,2048,0,0}; + if(!ICCompressorChoose(hW,ICMF_CHOOSE_DATARATE|ICMF_CHOOSE_KEYFRAME,&bitmap,NULL,&RECORD_COMPRESSION2,"24 bit Compression")) return TRUE; + if(RECORD_COMPRESSION2.cbState>sizeof(RECORD_COMPRESSION_STATE2)) + { + memset(&RECORD_COMPRESSION2,0,sizeof(RECORD_COMPRESSION2)); + memset(&RECORD_COMPRESSION_STATE2,0,sizeof(RECORD_COMPRESSION_STATE2)); + RECORD_COMPRESSION2.cbSize = sizeof(RECORD_COMPRESSION2); + } + else + { + if(RECORD_COMPRESSION2.lpState!=RECORD_COMPRESSION_STATE2) + memcpy(RECORD_COMPRESSION_STATE2,RECORD_COMPRESSION2.lpState,RECORD_COMPRESSION2.cbState); + } + RECORD_COMPRESSION2.lpState = RECORD_COMPRESSION_STATE2; + } + RefreshCodec(hW); + return TRUE; + } + case IDCANCEL: EndDialog(hW,FALSE);return TRUE; + + case IDOK: + { + HWND hWC; + if(IsDlgButtonChecked(hW,IDC_REC_MODE1)) RECORD_RECORDING_MODE = 0; + else RECORD_RECORDING_MODE = 1; + hWC = GetDlgItem(hW,IDC_VIDEO_SIZE); + RECORD_VIDEO_SIZE = ComboBox_GetCurSel(hWC); + RECORD_RECORDING_WIDTH = GetDlgItemInt(hW,IDC_REC_WIDTH,NULL,FALSE); + RECORD_RECORDING_HEIGHT = GetDlgItemInt(hW,IDC_REC_HEIGHT,NULL,FALSE); + hWC = GetDlgItem(hW,IDC_FRAME_RATE); + RECORD_FRAME_RATE_SCALE = ComboBox_GetCurSel(hWC); + if(IsDlgButtonChecked(hW,IDC_COMPRESSION1)) RECORD_COMPRESSION_MODE = 0; + else RECORD_COMPRESSION_MODE = 1; + EndDialog(hW,TRUE); + return TRUE; + } + } + } + } + return FALSE; +} + +void OnRecording(HWND hW) +{ + DialogBox(hInst,MAKEINTRESOURCE(IDD_RECORDING), + hW,(DLGPROC)RecordingDlgProc); + +} + + +//////////////////////////////////////////////////////////////////////// +// default 1: fast +//////////////////////////////////////////////////////////////////////// + +void OnCfgDef1(HWND hW) +{ + HWND hWC; + + hWC=GetDlgItem(hW,IDC_RESOLUTION); + ComboBox_SetCurSel(hWC,1); + hWC=GetDlgItem(hW,IDC_COLDEPTH); + ComboBox_SetCurSel(hWC,0); + hWC=GetDlgItem(hW,IDC_SCANLINES); + ComboBox_SetCurSel(hWC,0); + CheckDlgButton(hW,IDC_USELIMIT,FALSE); + CheckDlgButton(hW,IDC_USESKIPPING,TRUE); + CheckRadioButton(hW,IDC_DISPMODE1,IDC_DISPMODE2,IDC_DISPMODE1); + CheckDlgButton(hW,IDC_FRAMEAUTO,FALSE); + CheckDlgButton(hW,IDC_FRAMEMANUELL,TRUE); + CheckDlgButton(hW,IDC_SHOWFPS,FALSE); + hWC=GetDlgItem(hW,IDC_NOSTRETCH); + ComboBox_SetCurSel(hWC,1); + hWC=GetDlgItem(hW,IDC_DITHER); + ComboBox_SetCurSel(hWC,0); + SetDlgItemInt(hW,IDC_FRAMELIM,200,FALSE); + SetDlgItemInt(hW,IDC_WINX,320,FALSE); + SetDlgItemInt(hW,IDC_WINY,240,FALSE); + CheckDlgButton(hW,IDC_VSYNC,FALSE); + CheckDlgButton(hW,IDC_TRANSPARENT,TRUE); + CheckDlgButton(hW,IDC_DEBUGMODE,FALSE); +} + +//////////////////////////////////////////////////////////////////////// +// default 2: nice +//////////////////////////////////////////////////////////////////////// + +void OnCfgDef2(HWND hW) +{ + HWND hWC; + + hWC=GetDlgItem(hW,IDC_RESOLUTION); + ComboBox_SetCurSel(hWC,2); + hWC=GetDlgItem(hW,IDC_COLDEPTH); + ComboBox_SetCurSel(hWC,0); + hWC=GetDlgItem(hW,IDC_SCANLINES); + ComboBox_SetCurSel(hWC,0); + CheckDlgButton(hW,IDC_USELIMIT,TRUE); + CheckDlgButton(hW,IDC_USESKIPPING,FALSE); + CheckRadioButton(hW,IDC_DISPMODE1,IDC_DISPMODE2,IDC_DISPMODE1); + CheckDlgButton(hW,IDC_FRAMEAUTO,TRUE); + CheckDlgButton(hW,IDC_FRAMEMANUELL,FALSE); + CheckDlgButton(hW,IDC_SHOWFPS,FALSE); + CheckDlgButton(hW,IDC_VSYNC,FALSE); + CheckDlgButton(hW,IDC_TRANSPARENT,TRUE); + CheckDlgButton(hW,IDC_DEBUGMODE,FALSE); + hWC=GetDlgItem(hW,IDC_NOSTRETCH); + ComboBox_SetCurSel(hWC,0); + hWC=GetDlgItem(hW,IDC_DITHER); + ComboBox_SetCurSel(hWC,2); + + SetDlgItemInt(hW,IDC_FRAMELIM,200,FALSE); + SetDlgItemInt(hW,IDC_WINX,640,FALSE); + SetDlgItemInt(hW,IDC_WINY,480,FALSE); +} + +//////////////////////////////////////////////////////////////////////// +// read registry +//////////////////////////////////////////////////////////////////////// + +void ReadConfig(void) +{ + HKEY myKey; + DWORD temp; + DWORD type; + DWORD size; + + // predefines + iResX=640;iResY=480; + iColDepth=16; + iWindowMode=0; + UseFrameLimit=1; + UseFrameSkip=0; + iFrameLimit=2; + fFrameRate=200.0f; + iWinSize=MAKELONG(640,480); + dwCfgFixes=0; + iUseFixes=0; + iUseGammaVal=2048; + iUseScanLines=0; + iUseNoStretchBlt=0; + iUseDither=0; + iShowFPS=0; + iSysMemory=0; + iStopSaver=1; + bVsync=FALSE; + bTransparent=FALSE; + iRefreshRate=0; + iDebugMode=0; + lstrcpy(szGPUKeys,szKeyDefaults); + + memset(szDevName,0,128); + memset(&guiDev,0,sizeof(GUID)); + + // standard Windows psx config (registry) + if(RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Vision Thing\\PSEmu Pro\\GPU\\DFXVideo",0,KEY_ALL_ACCESS,&myKey)==ERROR_SUCCESS) + { + size = 4; + if(RegQueryValueEx(myKey,"ResX",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iResX=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"ResY",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iResY=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"RefreshRate",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iRefreshRate=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"WinSize",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iWinSize=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"WindowMode",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iWindowMode=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"ColDepth",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iColDepth=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"UseFrameLimit",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + UseFrameLimit=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"UseFrameSkip",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + UseFrameSkip=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"FrameLimit",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iFrameLimit=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"CfgFixes",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + dwCfgFixes=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"UseFixes",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iUseFixes=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"UseScanLines",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iUseScanLines=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"ShowFPS",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iShowFPS=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"UseNoStrechBlt",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iUseNoStretchBlt=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"UseDither",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iUseDither=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"UseGamma",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iUseGammaVal=(int)temp; + if(!iFrameLimit) {UseFrameLimit=0;UseFrameSkip=0;iFrameLimit=2;} + + // try to get the float framerate... if none: take int framerate + fFrameRate=0.0f; + size = 4; + if(RegQueryValueEx(myKey,"FrameRateFloat",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + fFrameRate=*((float *)(&temp)); + if(fFrameRate==0.0f) + { + fFrameRate=200.0f; + size = 4; + if(RegQueryValueEx(myKey,"FrameRate",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + fFrameRate=(float)temp; + } + + size = 4; + if(RegQueryValueEx(myKey,"UseSysMemory",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iSysMemory=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"StopSaver",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iStopSaver=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"WaitVSYNC",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + bVsync=bVsync_Key=(BOOL)temp; + size = 4; + if(RegQueryValueEx(myKey,"Transparent",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + bTransparent=(BOOL)temp; + size = 4; + if(RegQueryValueEx(myKey,"DebugMode",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iDebugMode=(BOOL)temp; + size=11; + RegQueryValueEx(myKey,"GPUKeys",0,&type,(LPBYTE)&szGPUKeys,&size); + size=128; + RegQueryValueEx(myKey,"DeviceName",0,&type,(LPBYTE)szDevName,&size); + size=sizeof(GUID); + RegQueryValueEx(myKey,"GuiDev",0,&type,(LPBYTE)&guiDev,&size); + +// +// Recording options +// +#define GetDWORD(xa,xb) size=4;if(RegQueryValueEx(myKey,xa,0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) xb=(unsigned long)temp; +#define GetBINARY(xa,xb) size=sizeof(xb);RegQueryValueEx(myKey,xa,0,&type,(LPBYTE)&xb,&size); + + GetDWORD("RecordingMode", RECORD_RECORDING_MODE); + GetDWORD("RecordingVideoSize", RECORD_VIDEO_SIZE); + GetDWORD("RecordingWidth", RECORD_RECORDING_WIDTH); + GetDWORD("RecordingHeight", RECORD_RECORDING_HEIGHT); + GetDWORD("RecordingFrameRateScale", RECORD_FRAME_RATE_SCALE); + GetDWORD("RecordingCompressionMode", RECORD_COMPRESSION_MODE); + GetBINARY("RecordingCompression1", RECORD_COMPRESSION1); + GetBINARY("RecordingCompressionState1", RECORD_COMPRESSION_STATE1); + GetBINARY("RecordingCompression2", RECORD_COMPRESSION2); + GetBINARY("RecordingCompressionState2", RECORD_COMPRESSION_STATE2); + + if(RECORD_RECORDING_WIDTH>1024) RECORD_RECORDING_WIDTH = 1024; + if(RECORD_RECORDING_HEIGHT>768) RECORD_RECORDING_HEIGHT = 768; + if(RECORD_VIDEO_SIZE>2) RECORD_VIDEO_SIZE = 2; + if(RECORD_FRAME_RATE_SCALE>7) RECORD_FRAME_RATE_SCALE = 7; + if(RECORD_COMPRESSION1.cbSize != sizeof(RECORD_COMPRESSION1)) + { + memset(&RECORD_COMPRESSION1,0,sizeof(RECORD_COMPRESSION1)); + RECORD_COMPRESSION1.cbSize = sizeof(RECORD_COMPRESSION1); + } + RECORD_COMPRESSION1.lpState = RECORD_COMPRESSION_STATE1; + if(RECORD_COMPRESSION2.cbSize != sizeof(RECORD_COMPRESSION2)) + { + memset(&RECORD_COMPRESSION2,0,sizeof(RECORD_COMPRESSION2)); + RECORD_COMPRESSION2.cbSize = sizeof(RECORD_COMPRESSION2); + } + RECORD_COMPRESSION2.lpState = RECORD_COMPRESSION_STATE2; + +// +// end of recording options +// + + RegCloseKey(myKey); + } + + if(!iColDepth) iColDepth=32; + if(iUseFixes) dwActFixes=dwCfgFixes; + SetFixes(); + + if(iUseGammaVal<0 || iUseGammaVal>1536) iUseGammaVal=2048; +} + +//////////////////////////////////////////////////////////////////////// + +void ReadWinSizeConfig(void) +{ + HKEY myKey; + DWORD temp; + DWORD type; + DWORD size; + + iResX=640;iResY=480; + iWinSize=MAKELONG(320,240); + + if (RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Vision Thing\\PSEmu Pro\\GPU\\DFXVideo",0,KEY_ALL_ACCESS,&myKey)==ERROR_SUCCESS) + { + size = 4; + if(RegQueryValueEx(myKey,"ResX",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iResX=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"ResY",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iResY=(int)temp; + size = 4; + if(RegQueryValueEx(myKey,"WinSize",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS) + iWinSize=(int)temp; + + RegCloseKey(myKey); + } +} + +//////////////////////////////////////////////////////////////////////// +// write registry +//////////////////////////////////////////////////////////////////////// + +void WriteConfig(void) +{ + HKEY myKey; + DWORD myDisp; + DWORD temp; + + RegCreateKeyEx(HKEY_CURRENT_USER,"Software\\Vision Thing\\PSEmu Pro\\GPU\\DFXVideo",0,NULL,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL,&myKey,&myDisp); + temp=iResX; + RegSetValueEx(myKey,"ResX",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iResY; + RegSetValueEx(myKey,"ResY",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iRefreshRate; + RegSetValueEx(myKey,"RefreshRate",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iWinSize; + RegSetValueEx(myKey,"WinSize",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iWindowMode; + RegSetValueEx(myKey,"WindowMode",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iColDepth; + RegSetValueEx(myKey,"ColDepth",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=UseFrameLimit; + RegSetValueEx(myKey,"UseFrameLimit",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=UseFrameSkip; + RegSetValueEx(myKey,"UseFrameSkip",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=dwCfgFixes; + RegSetValueEx(myKey,"CfgFixes",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iUseFixes; + RegSetValueEx(myKey,"UseFixes",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iUseScanLines; + RegSetValueEx(myKey,"UseScanLines",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iShowFPS; + RegSetValueEx(myKey,"ShowFPS",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iUseNoStretchBlt; + RegSetValueEx(myKey,"UseNoStrechBlt",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iUseDither; + RegSetValueEx(myKey,"UseDither",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iFrameLimit; + RegSetValueEx(myKey,"FrameLimit",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iUseGammaVal; + RegSetValueEx(myKey,"UseGamma",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=(DWORD)fFrameRate; + RegSetValueEx(myKey,"FrameRate",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=*((DWORD *)&fFrameRate); + RegSetValueEx(myKey,"FrameRateFloat",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=bVsync; + RegSetValueEx(myKey,"WaitVSYNC",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=bTransparent; + RegSetValueEx(myKey,"Transparent",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iSysMemory; + RegSetValueEx(myKey,"UseSysMemory",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iStopSaver; + RegSetValueEx(myKey,"StopSaver",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + temp=iDebugMode; + RegSetValueEx(myKey,"DebugMode",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp)); + RegSetValueEx(myKey,"GPUKeys",0,REG_BINARY,(LPBYTE)szGPUKeys,11); + RegSetValueEx(myKey,"DeviceName",0,REG_BINARY,(LPBYTE)szDevName,128); + RegSetValueEx(myKey,"GuiDev",0,REG_BINARY,(LPBYTE)&guiDev,sizeof(GUID)); + +// +// Recording options +// +if(RECORD_COMPRESSION1.cbState>sizeof(RECORD_COMPRESSION_STATE1) || RECORD_COMPRESSION1.lpState!=RECORD_COMPRESSION_STATE1) + { + memset(&RECORD_COMPRESSION1,0,sizeof(RECORD_COMPRESSION1)); + memset(&RECORD_COMPRESSION_STATE1,0,sizeof(RECORD_COMPRESSION_STATE1)); + RECORD_COMPRESSION1.cbSize = sizeof(RECORD_COMPRESSION1); + RECORD_COMPRESSION1.lpState = RECORD_COMPRESSION_STATE1; + } +if(RECORD_COMPRESSION2.cbState>sizeof(RECORD_COMPRESSION_STATE2) || RECORD_COMPRESSION2.lpState!=RECORD_COMPRESSION_STATE2) + { + memset(&RECORD_COMPRESSION2,0,sizeof(RECORD_COMPRESSION2)); + memset(&RECORD_COMPRESSION_STATE2,0,sizeof(RECORD_COMPRESSION_STATE2)); + RECORD_COMPRESSION2.cbSize = sizeof(RECORD_COMPRESSION2); + RECORD_COMPRESSION2.lpState = RECORD_COMPRESSION_STATE2; + } + +#define SetDWORD(xa,xb) RegSetValueEx(myKey,xa,0,REG_DWORD,(LPBYTE)&xb,sizeof(xb)); +#define SetBINARY(xa,xb) RegSetValueEx(myKey,xa,0,REG_BINARY,(LPBYTE)&xb,sizeof(xb)); + +SetDWORD("RecordingMode", RECORD_RECORDING_MODE); +SetDWORD("RecordingVideoSize", RECORD_VIDEO_SIZE); +SetDWORD("RecordingWidth", RECORD_RECORDING_WIDTH); +SetDWORD("RecordingHeight", RECORD_RECORDING_HEIGHT); +SetDWORD("RecordingFrameRateScale", RECORD_FRAME_RATE_SCALE); +SetDWORD("RecordingCompressionMode", RECORD_COMPRESSION_MODE); +SetBINARY("RecordingCompression1", RECORD_COMPRESSION1); +SetBINARY("RecordingCompressionState1", RECORD_COMPRESSION_STATE1); +SetBINARY("RecordingCompression2", RECORD_COMPRESSION2); +SetBINARY("RecordingCompressionState2", RECORD_COMPRESSION_STATE2); +// +// +// + RegCloseKey(myKey); +} + +//////////////////////////////////////////////////////////////////////// + +HWND gHWND; + +static HRESULT WINAPI Enum3DDevicesCallback( GUID* pGUID, LPSTR strDesc, + LPSTR strName, LPD3DDEVICEDESC pHALDesc, + LPD3DDEVICEDESC pHELDesc, LPVOID pvContext ) +{ + BOOL IsHardware; + + // Check params + if( NULL==pGUID || NULL==pHALDesc || NULL==pHELDesc) + return D3DENUMRET_CANCEL; + + // Handle specific device GUIDs. NullDevice renders nothing + if( IsEqualGUID( pGUID, &IID_IDirect3DNullDevice ) ) + return D3DENUMRET_OK; + + IsHardware = ( 0 != pHALDesc->dwFlags ); + if(!IsHardware) return D3DENUMRET_OK; + + bDeviceOK=TRUE; + + return D3DENUMRET_OK; +} + +static BOOL WINAPI DirectDrawEnumCallbackEx( GUID FAR* pGUID, LPSTR strDesc, + LPSTR strName, VOID* pV, + HMONITOR hMonitor ) +{ + // Use the GUID to create the DirectDraw object, so that information + // can be extracted from it. + + LPDIRECTDRAW pDD; + LPDIRECTDRAW4 g_pDD; + LPDIRECT3D3 pD3D; + HRESULT (WINAPI *pDDrawCreateFn)(GUID *,LPDIRECTDRAW *,IUnknown *); + + pDDrawCreateFn = (LPVOID)GetProcAddress( hDDrawDLL, "DirectDrawCreate" ); + + if( pDDrawCreateFn == NULL || FAILED( pDDrawCreateFn( pGUID, &pDD, 0L ) ) ) + { + return D3DENUMRET_OK; + } + + // Query the DirectDraw driver for access to Direct3D. + if( FAILED(IDirectDraw_QueryInterface(pDD, &IID_IDirectDraw4, (VOID**)&g_pDD))) + { + IDirectDraw_Release(pDD); + return D3DENUMRET_OK; + } + IDirectDraw_Release(pDD); + + // Query the DirectDraw driver for access to Direct3D. + + if( FAILED( IDirectDraw4_QueryInterface(g_pDD,&IID_IDirect3D3, (VOID**)&pD3D))) + { + IDirectDraw4_Release(g_pDD); + return D3DENUMRET_OK; + } + + bDeviceOK=FALSE; + + // Now, enumerate all the 3D devices + IDirect3D3_EnumDevices(pD3D,Enum3DDevicesCallback,NULL); + + if(bDeviceOK) + { + HWND hWC=GetDlgItem(gHWND,IDC_DEVICE); + int i=ComboBox_AddString(hWC,strDesc); + GUID * g=(GUID *)malloc(sizeof(GUID)); + if(NULL != pGUID) *g=*pGUID; + else memset(g,0,sizeof(GUID)); + ComboBox_SetItemData(hWC,i,g); + } + + IDirect3D3_Release(pD3D); + IDirectDraw4_Release(g_pDD); + return DDENUMRET_OK; +} + +//----------------------------------------------------------------------------- + +static BOOL WINAPI DirectDrawEnumCallback( GUID FAR* pGUID, LPSTR strDesc, + LPSTR strName, VOID* pV) +{ + return DirectDrawEnumCallbackEx( pGUID, strDesc, strName, NULL, NULL ); +} + +//----------------------------------------------------------------------------- + +void DoDevEnum(HWND hW) +{ + LPDIRECTDRAWENUMERATEEX pDDrawEnumFn; + + gHWND=hW; + + pDDrawEnumFn = (LPVOID)GetProcAddress(hDDrawDLL, "DirectDrawEnumerateExA"); + + if (pDDrawEnumFn != NULL) + pDDrawEnumFn( DirectDrawEnumCallbackEx, NULL, + DDENUM_ATTACHEDSECONDARYDEVICES | + DDENUM_DETACHEDSECONDARYDEVICES | + DDENUM_NONDISPLAYDEVICES ); +} + +//////////////////////////////////////////////////////////////////////// + +void FreeGui(HWND hW) +{ + int i,iCnt; + HWND hWC=GetDlgItem(hW,IDC_DEVICE); + iCnt=ComboBox_GetCount(hWC); + for(i=0;iddpfPixelFormat.dwRGBBitCount==(unsigned int)iColDepth && + pddsd->dwWidth==(unsigned int)iResX && + pddsd->dwHeight==(unsigned int)iResY) + { + bDeviceOK=TRUE; + return DDENUMRET_CANCEL; + } + + return DDENUMRET_OK; +} + +//////////////////////////////////////////////////////////////////////// + +BOOL bTestModes(void) +{ + LPDIRECTDRAW pDD; + LPDIRECTDRAW4 g_pDD; + HRESULT (WINAPI *pDDrawCreateFn)(GUID *,LPDIRECTDRAW *,IUnknown *); + + GUID FAR * guid=0; + int i;unsigned char * c=(unsigned char *)&guiDev; + for(i=0;i + +typedef struct _D3DTRANSFORMCAPS { + DWORD dwSize; + DWORD dwCaps; +} D3DTRANSFORMCAPS, *LPD3DTRANSFORMCAPS; + +#define D3DTRANSFORMCAPS_CLIP 0x00000001L + +typedef struct _D3DLIGHTINGCAPS { + DWORD dwSize; + DWORD dwCaps; + DWORD dwLightingModel; + DWORD dwNumLights; +} D3DLIGHTINGCAPS, *LPD3DLIGHTINGCAPS; + +#define D3DLIGHTINGMODEL_RGB 0x00000001 +#define D3DLIGHTINGMODEL_MONO 0x00000002 + +#define D3DLIGHTCAPS_POINT 0x00000001 +#define D3DLIGHTCAPS_SPOT 0x00000002 +#define D3DLIGHTCAPS_DIRECTIONAL 0x00000004 +#define D3DLIGHTCAPS_PARALLELPOINT 0x00000008 +#define D3DLIGHTCAPS_GLSPOT 0x00000010 + +typedef struct _D3dPrimCaps { + DWORD dwSize; + DWORD dwMiscCaps; + DWORD dwRasterCaps; + DWORD dwZCmpCaps; + DWORD dwSrcBlendCaps; + DWORD dwDestBlendCaps; + DWORD dwAlphaCmpCaps; + DWORD dwShadeCaps; + DWORD dwTextureCaps; + DWORD dwTextureFilterCaps; + DWORD dwTextureBlendCaps; + DWORD dwTextureAddressCaps; + DWORD dwStippleWidth; + DWORD dwStippleHeight; +} D3DPRIMCAPS, *LPD3DPRIMCAPS; + +#define D3DPMISCCAPS_MASKPLANES 0x00000001 +#define D3DPMISCCAPS_MASKZ 0x00000002 +#define D3DPMISCCAPS_LINEPATTERNREP 0x00000004 +#define D3DPMISCCAPS_CONFORMANT 0x00000008 +#define D3DPMISCCAPS_CULLNONE 0x00000010 +#define D3DPMISCCAPS_CULLCW 0x00000020 +#define D3DPMISCCAPS_CULLCCW 0x00000040 + +#define D3DPRASTERCAPS_DITHER 0x00000001 +#define D3DPRASTERCAPS_ROP2 0x00000002 +#define D3DPRASTERCAPS_XOR 0x00000004 +#define D3DPRASTERCAPS_PAT 0x00000008 +#define D3DPRASTERCAPS_ZTEST 0x00000010 +#define D3DPRASTERCAPS_SUBPIXEL 0x00000020 +#define D3DPRASTERCAPS_SUBPIXELX 0x00000040 +#define D3DPRASTERCAPS_FOGVERTEX 0x00000080 +#define D3DPRASTERCAPS_FOGTABLE 0x00000100 +#define D3DPRASTERCAPS_STIPPLE 0x00000200 +#define D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT 0x00000400 +#define D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT 0x00000800 +#define D3DPRASTERCAPS_ANTIALIASEDGES 0x00001000 +#define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000 +#define D3DPRASTERCAPS_ZBIAS 0x00004000 +#define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000 +#define D3DPRASTERCAPS_FOGRANGE 0x00010000 +#define D3DPRASTERCAPS_ANISOTROPY 0x00020000 +#define D3DPRASTERCAPS_WBUFFER 0x00040000 +#define D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT 0x00080000 +#define D3DPRASTERCAPS_WFOG 0x00100000 +#define D3DPRASTERCAPS_ZFOG 0x00200000 + +#define D3DPCMPCAPS_NEVER 0x00000001 +#define D3DPCMPCAPS_LESS 0x00000002 +#define D3DPCMPCAPS_EQUAL 0x00000004 +#define D3DPCMPCAPS_LESSEQUAL 0x00000008 +#define D3DPCMPCAPS_GREATER 0x00000010 +#define D3DPCMPCAPS_NOTEQUAL 0x00000020 +#define D3DPCMPCAPS_GREATEREQUAL 0x00000040 +#define D3DPCMPCAPS_ALWAYS 0x00000080 + +#define D3DPBLENDCAPS_ZERO 0x00000001 +#define D3DPBLENDCAPS_ONE 0x00000002 +#define D3DPBLENDCAPS_SRCCOLOR 0x00000004 +#define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008 +#define D3DPBLENDCAPS_SRCALPHA 0x00000010 +#define D3DPBLENDCAPS_INVSRCALPHA 0x00000020 +#define D3DPBLENDCAPS_DESTALPHA 0x00000040 +#define D3DPBLENDCAPS_INVDESTALPHA 0x00000080 +#define D3DPBLENDCAPS_DESTCOLOR 0x00000100 +#define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200 +#define D3DPBLENDCAPS_SRCALPHASAT 0x00000400 +#define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800 +#define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000 + +#define D3DPSHADECAPS_COLORFLATMONO 0x00000001 +#define D3DPSHADECAPS_COLORFLATRGB 0x00000002 +#define D3DPSHADECAPS_COLORGOURAUDMONO 0x00000004 +#define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008 +#define D3DPSHADECAPS_COLORPHONGMONO 0x00000010 +#define D3DPSHADECAPS_COLORPHONGRGB 0x00000020 + +#define D3DPSHADECAPS_SPECULARFLATMONO 0x00000040 +#define D3DPSHADECAPS_SPECULARFLATRGB 0x00000080 +#define D3DPSHADECAPS_SPECULARGOURAUDMONO 0x00000100 +#define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200 +#define D3DPSHADECAPS_SPECULARPHONGMONO 0x00000400 +#define D3DPSHADECAPS_SPECULARPHONGRGB 0x00000800 + +#define D3DPSHADECAPS_ALPHAFLATBLEND 0x00001000 +#define D3DPSHADECAPS_ALPHAFLATSTIPPLED 0x00002000 +#define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000 +#define D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED 0x00008000 +#define D3DPSHADECAPS_ALPHAPHONGBLEND 0x00010000 +#define D3DPSHADECAPS_ALPHAPHONGSTIPPLED 0x00020000 + +#define D3DPSHADECAPS_FOGFLAT 0x00040000 +#define D3DPSHADECAPS_FOGGOURAUD 0x00080000 +#define D3DPSHADECAPS_FOGPHONG 0x00100000 + +#define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001 +#define D3DPTEXTURECAPS_POW2 0x00000002 +#define D3DPTEXTURECAPS_ALPHA 0x00000004 +#define D3DPTEXTURECAPS_TRANSPARENCY 0x00000008 +#define D3DPTEXTURECAPS_BORDER 0x00000010 +#define D3DPTEXTURECAPS_SQUAREONLY 0x00000020 +#define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040 +#define D3DPTEXTURECAPS_ALPHAPALETTE 0x00000080 +#define D3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100L +/* yes actually 0x00000200 is unused - or at least unreleased */ +#define D3DPTEXTURECAPS_PROJECTED 0x00000400 +#define D3DPTEXTURECAPS_CUBEMAP 0x00000800 +#define D3DPTEXTURECAPS_COLORKEYBLEND 0x00001000 + +#define D3DPTFILTERCAPS_NEAREST 0x00000001 +#define D3DPTFILTERCAPS_LINEAR 0x00000002 +#define D3DPTFILTERCAPS_MIPNEAREST 0x00000004 +#define D3DPTFILTERCAPS_MIPLINEAR 0x00000008 +#define D3DPTFILTERCAPS_LINEARMIPNEAREST 0x00000010 +#define D3DPTFILTERCAPS_LINEARMIPLINEAR 0x00000020 +/* yes - missing numbers */ +#define D3DPTFILTERCAPS_MINFPOINT 0x00000100 +#define D3DPTFILTERCAPS_MINFLINEAR 0x00000200 +#define D3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400 +/* yes - missing numbers */ +#define D3DPTFILTERCAPS_MIPFPOINT 0x00010000 +#define D3DPTFILTERCAPS_MIPFLINEAR 0x00020000 +/* yes - missing numbers */ +#define D3DPTFILTERCAPS_MAGFPOINT 0x01000000 +#define D3DPTFILTERCAPS_MAGFLINEAR 0x02000000 +#define D3DPTFILTERCAPS_MAGFANISOTROPIC 0x04000000 +#define D3DPTFILTERCAPS_MAGFAFLATCUBIC 0x08000000 +#define D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC 0x10000000 + +#define D3DPTBLENDCAPS_DECAL 0x00000001 +#define D3DPTBLENDCAPS_MODULATE 0x00000002 +#define D3DPTBLENDCAPS_DECALALPHA 0x00000004 +#define D3DPTBLENDCAPS_MODULATEALPHA 0x00000008 +#define D3DPTBLENDCAPS_DECALMASK 0x00000010 +#define D3DPTBLENDCAPS_MODULATEMASK 0x00000020 +#define D3DPTBLENDCAPS_COPY 0x00000040 +#define D3DPTBLENDCAPS_ADD 0x00000080 + +#define D3DPTADDRESSCAPS_WRAP 0x00000001 +#define D3DPTADDRESSCAPS_MIRROR 0x00000002 +#define D3DPTADDRESSCAPS_CLAMP 0x00000004 +#define D3DPTADDRESSCAPS_BORDER 0x00000008 +#define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010 + + +typedef struct _D3DDeviceDesc { + DWORD dwSize; + DWORD dwFlags; + D3DCOLORMODEL dcmColorModel; + DWORD dwDevCaps; + D3DTRANSFORMCAPS dtcTransformCaps; + BOOL bClipping; + D3DLIGHTINGCAPS dlcLightingCaps; + D3DPRIMCAPS dpcLineCaps; + D3DPRIMCAPS dpcTriCaps; + DWORD dwDeviceRenderBitDepth; + DWORD dwDeviceZBufferBitDepth; + DWORD dwMaxBufferSize; + DWORD dwMaxVertexCount; + + DWORD dwMinTextureWidth,dwMinTextureHeight; + DWORD dwMaxTextureWidth,dwMaxTextureHeight; + DWORD dwMinStippleWidth,dwMaxStippleWidth; + DWORD dwMinStippleHeight,dwMaxStippleHeight; + + DWORD dwMaxTextureRepeat; + DWORD dwMaxTextureAspectRatio; + DWORD dwMaxAnisotropy; + + D3DVALUE dvGuardBandLeft; + D3DVALUE dvGuardBandTop; + D3DVALUE dvGuardBandRight; + D3DVALUE dvGuardBandBottom; + + D3DVALUE dvExtentsAdjust; + DWORD dwStencilCaps; + + DWORD dwFVFCaps; + DWORD dwTextureOpCaps; + WORD wMaxTextureBlendStages; + WORD wMaxSimultaneousTextures; +} D3DDEVICEDESC,*LPD3DDEVICEDESC; +#define D3DDEVICEDESCSIZE (sizeof(D3DDEVICEDESC)) + +typedef struct _D3DDeviceDesc7 { + DWORD dwDevCaps; + D3DPRIMCAPS dpcLineCaps; + D3DPRIMCAPS dpcTriCaps; + DWORD dwDeviceRenderBitDepth; + DWORD dwDeviceZBufferBitDepth; + + DWORD dwMinTextureWidth, dwMinTextureHeight; + DWORD dwMaxTextureWidth, dwMaxTextureHeight; + + DWORD dwMaxTextureRepeat; + DWORD dwMaxTextureAspectRatio; + DWORD dwMaxAnisotropy; + + D3DVALUE dvGuardBandLeft; + D3DVALUE dvGuardBandTop; + D3DVALUE dvGuardBandRight; + D3DVALUE dvGuardBandBottom; + + D3DVALUE dvExtentsAdjust; + DWORD dwStencilCaps; + DWORD dwFVFCaps; + DWORD dwTextureOpCaps; + WORD wMaxTextureBlendStages; + WORD wMaxSimultaneousTextures; + + DWORD dwMaxActiveLights; + D3DVALUE dvMaxVertexW; + GUID deviceGUID; + + WORD wMaxUserClipPlanes; + WORD wMaxVertexBlendMatrices; + + DWORD dwVertexProcessingCaps; + + DWORD dwReserved1; + DWORD dwReserved2; + DWORD dwReserved3; + DWORD dwReserved4; +} D3DDEVICEDESC7, *LPD3DDEVICEDESC7; +#define D3DDEVICEDESC7SIZE (sizeof(D3DDEVICEDESC7)) + +#define D3DDD_COLORMODEL 0x00000001 +#define D3DDD_DEVCAPS 0x00000002 +#define D3DDD_TRANSFORMCAPS 0x00000004 +#define D3DDD_LIGHTINGCAPS 0x00000008 +#define D3DDD_BCLIPPING 0x00000010 +#define D3DDD_LINECAPS 0x00000020 +#define D3DDD_TRICAPS 0x00000040 +#define D3DDD_DEVICERENDERBITDEPTH 0x00000080 +#define D3DDD_DEVICEZBUFFERBITDEPTH 0x00000100 +#define D3DDD_MAXBUFFERSIZE 0x00000200 +#define D3DDD_MAXVERTEXCOUNT 0x00000400 + +#define D3DDEVCAPS_FLOATTLVERTEX 0x00000001 +#define D3DDEVCAPS_SORTINCREASINGZ 0x00000002 +#define D3DDEVCAPS_SORTDECREASINGZ 0X00000004 +#define D3DDEVCAPS_SORTEXACT 0x00000008 +#define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010 +#define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020 +#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040 +#define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080 +#define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100 +#define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200 +#define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400 +#define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800 +#define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000 +#define D3DDEVCAPS_DRAWPRIMITIVES2 0x00002000 +#define D3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x00004000 +#define D3DDEVCAPS_DRAWPRIMITIVES2EX 0x00008000 +#define D3DDEVCAPS_HWTRANSFORMANDLIGHT 0x00010000 +#define D3DDEVCAPS_CANBLTSYSTONONLOCAL 0x00020000 +#define D3DDEVCAPS_HWRASTERIZATION 0x00080000 + +#define D3DSTENCILCAPS_KEEP 0x00000001 +#define D3DSTENCILCAPS_ZERO 0x00000002 +#define D3DSTENCILCAPS_REPLACE 0x00000004 +#define D3DSTENCILCAPS_INCRSAT 0x00000008 +#define D3DSTENCILCAPS_DECRSAT 0x00000010 +#define D3DSTENCILCAPS_INVERT 0x00000020 +#define D3DSTENCILCAPS_INCR 0x00000040 +#define D3DSTENCILCAPS_DECR 0x00000080 + +#define D3DTEXOPCAPS_DISABLE 0x00000001 +#define D3DTEXOPCAPS_SELECTARG1 0x00000002 +#define D3DTEXOPCAPS_SELECTARG2 0x00000004 +#define D3DTEXOPCAPS_MODULATE 0x00000008 +#define D3DTEXOPCAPS_MODULATE2X 0x00000010 +#define D3DTEXOPCAPS_MODULATE4X 0x00000020 +#define D3DTEXOPCAPS_ADD 0x00000040 +#define D3DTEXOPCAPS_ADDSIGNED 0x00000080 +#define D3DTEXOPCAPS_ADDSIGNED2X 0x00000100 +#define D3DTEXOPCAPS_SUBTRACT 0x00000200 +#define D3DTEXOPCAPS_ADDSMOOTH 0x00000400 +#define D3DTEXOPCAPS_BLENDDIFFUSEALPHA 0x00000800 +#define D3DTEXOPCAPS_BLENDTEXTUREALPHA 0x00001000 +#define D3DTEXOPCAPS_BLENDFACTORALPHA 0x00002000 +#define D3DTEXOPCAPS_BLENDTEXTUREALPHAPM 0x00004000 +#define D3DTEXOPCAPS_BLENDCURRENTALPHA 0x00008000 +#define D3DTEXOPCAPS_PREMODULATE 0x00010000 +#define D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR 0x00020000 +#define D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA 0x00040000 +#define D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR 0x00080000 +#define D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA 0x00100000 +#define D3DTEXOPCAPS_BUMPENVMAP 0x00200000 +#define D3DTEXOPCAPS_BUMPENVMAPLUMINANCE 0x00400000 +#define D3DTEXOPCAPS_DOTPRODUCT3 0x00800000 + +#define D3DFVFCAPS_TEXCOORDCOUNTMASK 0x0000FFFF +#define D3DFVFCAPS_DONOTSTRIPELEMENTS 0x00080000 + +#define D3DVTXPCAPS_TEXGEN 0x00000001 +#define D3DVTXPCAPS_MATERIALSOURCE7 0x00000002 +#define D3DVTXPCAPS_VERTEXFOG 0x00000004 +#define D3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008 +#define D3DVTXPCAPS_POSITIONALLIGHTS 0x00000010 +#define D3DVTXPCAPS_LOCALVIEWER 0x00000020 + +typedef HRESULT (CALLBACK *LPD3DENUMDEVICESCALLBACK)(LPGUID lpGuid,LPSTR lpDeviceDescription,LPSTR lpDeviceName,LPD3DDEVICEDESC,LPD3DDEVICEDESC,LPVOID); +typedef HRESULT (CALLBACK *LPD3DENUMDEVICESCALLBACK7)(LPSTR lpDeviceDescription, LPSTR lpDeviceName, LPD3DDEVICEDESC7, LPVOID); + +#define D3DFDS_COLORMODEL 0x00000001 +#define D3DFDS_GUID 0x00000002 +#define D3DFDS_HARDWARE 0x00000004 +#define D3DFDS_TRIANGLES 0x00000008 +#define D3DFDS_LINES 0x00000010 +#define D3DFDS_MISCCAPS 0x00000020 +#define D3DFDS_RASTERCAPS 0x00000040 +#define D3DFDS_ZCMPCAPS 0x00000080 +#define D3DFDS_ALPHACMPCAPS 0x00000100 +#define D3DFDS_SRCBLENDCAPS 0x00000200 +#define D3DFDS_DSTBLENDCAPS 0x00000400 +#define D3DFDS_SHADECAPS 0x00000800 +#define D3DFDS_TEXTURECAPS 0x00001000 +#define D3DFDS_TEXTUREFILTERCAPS 0x00002000 +#define D3DFDS_TEXTUREBLENDCAPS 0x00004000 +#define D3DFDS_TEXTUREADDRESSCAPS 0x00008000 + +typedef struct _D3DFINDDEVICESEARCH { + DWORD dwSize; + DWORD dwFlags; + BOOL bHardware; + D3DCOLORMODEL dcmColorModel; + GUID guid; + DWORD dwCaps; + D3DPRIMCAPS dpcPrimCaps; +} D3DFINDDEVICESEARCH,*LPD3DFINDDEVICESEARCH; + +typedef struct _D3DFINDDEVICERESULT { + DWORD dwSize; + GUID guid; + D3DDEVICEDESC ddHwDesc; + D3DDEVICEDESC ddSwDesc; +} D3DFINDDEVICERESULT,*LPD3DFINDDEVICERESULT; + +typedef struct _D3DExecuteBufferDesc { + DWORD dwSize; + DWORD dwFlags; + DWORD dwCaps; + DWORD dwBufferSize; + LPVOID lpData; +} D3DEXECUTEBUFFERDESC, *LPD3DEXECUTEBUFFERDESC; + +#define D3DDEB_BUFSIZE 0x00000001 +#define D3DDEB_CAPS 0x00000002 +#define D3DDEB_LPDATA 0x00000004 + +#define D3DDEBCAPS_SYSTEMMEMORY 0x00000001 +#define D3DDEBCAPS_VIDEOMEMORY 0x00000002 +#define D3DDEBCAPS_MEM (D3DDEBCAPS_SYSTEMMEMORY|D3DDEBCAPS_VIDEOMEMORY) /* = 0x3 */ + +typedef struct _D3DDEVINFO_TEXTUREMANAGER { + BOOL bThrashing; + DWORD dwApproxBytesDownloaded; + DWORD dwNumEvicts; + DWORD dwNumVidCreates; + DWORD dwNumTexturesUsed; + DWORD dwNumUsedTexInVid; + DWORD dwWorkingSet; + DWORD dwWorkingSetBytes; + DWORD dwTotalManaged; + DWORD dwTotalBytes; + DWORD dwLastPri; +} D3DDEVINFO_TEXTUREMANAGER, *LPD3DDEVINFO_TEXTUREMANAGER; + +typedef struct _D3DDEVINFO_TEXTURING { + DWORD dwNumLoads; + DWORD dwApproxBytesLoaded; + DWORD dwNumPreLoads; + DWORD dwNumSet; + DWORD dwNumCreates; + DWORD dwNumDestroys; + DWORD dwNumSetPriorities; + DWORD dwNumSetLODs; + DWORD dwNumLocks; + DWORD dwNumGetDCs; +} D3DDEVINFO_TEXTURING, *LPD3DDEVINFO_TEXTURING; + + + +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/d3d.h pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/d3d.h --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/d3d.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/d3d.h 2016-06-30 16:53:26.000000000 +0000 @@ -0,0 +1,1530 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __WINE_D3D_H +#define __WINE_D3D_H + +#include + +#define COM_NO_WINDOWS_H +#include +#include /* must precede d3dcaps.h */ +#include + +/***************************************************************************** + * Predeclare the interfaces + */ +DEFINE_GUID(IID_IDirect3D, 0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56); +DEFINE_GUID(IID_IDirect3D2, 0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a); +DEFINE_GUID(IID_IDirect3D3, 0xbb223240,0xe72b,0x11d0,0xa9,0xb4,0x00,0xaa,0x00,0xc0,0x99,0x3e); +DEFINE_GUID(IID_IDirect3D7, 0xf5049e77,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8); + +DEFINE_GUID(IID_IDirect3DRampDevice, 0xF2086B20,0x259F,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56); +DEFINE_GUID(IID_IDirect3DRGBDevice, 0xA4665C60,0x2673,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56); +DEFINE_GUID(IID_IDirect3DHALDevice, 0x84E63dE0,0x46AA,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E); +DEFINE_GUID(IID_IDirect3DMMXDevice, 0x881949a1,0xd6f3,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29); +DEFINE_GUID(IID_IDirect3DRefDevice, 0x50936643,0x13e9,0x11d1,0x89,0xaa,0x00,0xa0,0xc9,0x05,0x41,0x29); +DEFINE_GUID(IID_IDirect3DTnLHalDevice, 0xf5049e78,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8); +DEFINE_GUID(IID_IDirect3DNullDevice, 0x8767df22,0xbacc,0x11d1,0x89,0x69,0x00,0xa0,0xc9,0x06,0x29,0xa8); + +DEFINE_GUID(IID_IDirect3DDevice, 0x64108800,0x957d,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29); +DEFINE_GUID(IID_IDirect3DDevice2, 0x93281501,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29); +DEFINE_GUID(IID_IDirect3DDevice3, 0xb0ab3b60,0x33d7,0x11d1,0xa9,0x81,0x00,0xc0,0x4f,0xd7,0xb1,0x74); +DEFINE_GUID(IID_IDirect3DDevice7, 0xf5049e79,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8); + +DEFINE_GUID(IID_IDirect3DTexture, 0x2CDCD9E0,0x25A0,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56); +DEFINE_GUID(IID_IDirect3DTexture2, 0x93281502,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29); + +DEFINE_GUID(IID_IDirect3DLight, 0x4417C142,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E); + +DEFINE_GUID(IID_IDirect3DMaterial, 0x4417C144,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E); +DEFINE_GUID(IID_IDirect3DMaterial2, 0x93281503,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29); +DEFINE_GUID(IID_IDirect3DMaterial3, 0xca9c46f4,0xd3c5,0x11d1,0xb7,0x5a,0x00,0x60,0x08,0x52,0xb3,0x12); + +DEFINE_GUID(IID_IDirect3DExecuteBuffer, 0x4417C145,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E); + +DEFINE_GUID(IID_IDirect3DViewport, 0x4417C146,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E); +DEFINE_GUID(IID_IDirect3DViewport2, 0x93281500,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29); +DEFINE_GUID(IID_IDirect3DViewport3, 0xb0ab3b61,0x33d7,0x11d1,0xa9,0x81,0x00,0xc0,0x4f,0xd7,0xb1,0x74); + +DEFINE_GUID(IID_IDirect3DVertexBuffer, 0x7a503555,0x4a83,0x11d1,0xa5,0xdb,0x00,0xa0,0xc9,0x03,0x67,0xf8); +DEFINE_GUID(IID_IDirect3DVertexBuffer7, 0xf5049e7d,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8); + + +typedef struct IDirect3D *LPDIRECT3D; +typedef struct IDirect3D2 *LPDIRECT3D2; +typedef struct IDirect3D3 *LPDIRECT3D3; +typedef struct IDirect3D7 *LPDIRECT3D7; + +typedef struct IDirect3DLight *LPDIRECT3DLIGHT; + +typedef struct IDirect3DDevice *LPDIRECT3DDEVICE; +typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2; +typedef struct IDirect3DDevice3 *LPDIRECT3DDEVICE3; +typedef struct IDirect3DDevice7 *LPDIRECT3DDEVICE7; + +typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT; +typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2; +typedef struct IDirect3DViewport3 *LPDIRECT3DVIEWPORT3; + +typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL; +typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2; +typedef struct IDirect3DMaterial3 *LPDIRECT3DMATERIAL3; + +typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE; +typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2; + +typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER; + +typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER; +typedef struct IDirect3DVertexBuffer7 *LPDIRECT3DVERTEXBUFFER7; + +/* ******************************************************************** + Error Codes + ******************************************************************** */ +#define D3D_OK DD_OK +#define D3DERR_BADMAJORVERSION MAKE_DDHRESULT(700) +#define D3DERR_BADMINORVERSION MAKE_DDHRESULT(701) +#define D3DERR_INVALID_DEVICE MAKE_DDHRESULT(705) +#define D3DERR_INITFAILED MAKE_DDHRESULT(706) +#define D3DERR_DEVICEAGGREGATED MAKE_DDHRESULT(707) +#define D3DERR_EXECUTE_CREATE_FAILED MAKE_DDHRESULT(710) +#define D3DERR_EXECUTE_DESTROY_FAILED MAKE_DDHRESULT(711) +#define D3DERR_EXECUTE_LOCK_FAILED MAKE_DDHRESULT(712) +#define D3DERR_EXECUTE_UNLOCK_FAILED MAKE_DDHRESULT(713) +#define D3DERR_EXECUTE_LOCKED MAKE_DDHRESULT(714) +#define D3DERR_EXECUTE_NOT_LOCKED MAKE_DDHRESULT(715) +#define D3DERR_EXECUTE_FAILED MAKE_DDHRESULT(716) +#define D3DERR_EXECUTE_CLIPPED_FAILED MAKE_DDHRESULT(717) +#define D3DERR_TEXTURE_NO_SUPPORT MAKE_DDHRESULT(720) +#define D3DERR_TEXTURE_CREATE_FAILED MAKE_DDHRESULT(721) +#define D3DERR_TEXTURE_DESTROY_FAILED MAKE_DDHRESULT(722) +#define D3DERR_TEXTURE_LOCK_FAILED MAKE_DDHRESULT(723) +#define D3DERR_TEXTURE_UNLOCK_FAILED MAKE_DDHRESULT(724) +#define D3DERR_TEXTURE_LOAD_FAILED MAKE_DDHRESULT(725) +#define D3DERR_TEXTURE_SWAP_FAILED MAKE_DDHRESULT(726) +#define D3DERR_TEXTURE_LOCKED MAKE_DDHRESULT(727) +#define D3DERR_TEXTURE_NOT_LOCKED MAKE_DDHRESULT(728) +#define D3DERR_TEXTURE_GETSURF_FAILED MAKE_DDHRESULT(729) +#define D3DERR_MATRIX_CREATE_FAILED MAKE_DDHRESULT(730) +#define D3DERR_MATRIX_DESTROY_FAILED MAKE_DDHRESULT(731) +#define D3DERR_MATRIX_SETDATA_FAILED MAKE_DDHRESULT(732) +#define D3DERR_MATRIX_GETDATA_FAILED MAKE_DDHRESULT(733) +#define D3DERR_SETVIEWPORTDATA_FAILED MAKE_DDHRESULT(734) +#define D3DERR_INVALIDCURRENTVIEWPORT MAKE_DDHRESULT(735) +#define D3DERR_INVALIDPRIMITIVETYPE MAKE_DDHRESULT(736) +#define D3DERR_INVALIDVERTEXTYPE MAKE_DDHRESULT(737) +#define D3DERR_TEXTURE_BADSIZE MAKE_DDHRESULT(738) +#define D3DERR_INVALIDRAMPTEXTURE MAKE_DDHRESULT(739) +#define D3DERR_MATERIAL_CREATE_FAILED MAKE_DDHRESULT(740) +#define D3DERR_MATERIAL_DESTROY_FAILED MAKE_DDHRESULT(741) +#define D3DERR_MATERIAL_SETDATA_FAILED MAKE_DDHRESULT(742) +#define D3DERR_MATERIAL_GETDATA_FAILED MAKE_DDHRESULT(743) +#define D3DERR_INVALIDPALETTE MAKE_DDHRESULT(744) +#define D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY MAKE_DDHRESULT(745) +#define D3DERR_ZBUFF_NEEDS_VIDEOMEMORY MAKE_DDHRESULT(746) +#define D3DERR_SURFACENOTINVIDMEM MAKE_DDHRESULT(747) +#define D3DERR_LIGHT_SET_FAILED MAKE_DDHRESULT(750) +#define D3DERR_LIGHTHASVIEWPORT MAKE_DDHRESULT(751) +#define D3DERR_LIGHTNOTINTHISVIEWPORT MAKE_DDHRESULT(752) +#define D3DERR_SCENE_IN_SCENE MAKE_DDHRESULT(760) +#define D3DERR_SCENE_NOT_IN_SCENE MAKE_DDHRESULT(761) +#define D3DERR_SCENE_BEGIN_FAILED MAKE_DDHRESULT(762) +#define D3DERR_SCENE_END_FAILED MAKE_DDHRESULT(763) +#define D3DERR_INBEGIN MAKE_DDHRESULT(770) +#define D3DERR_NOTINBEGIN MAKE_DDHRESULT(771) +#define D3DERR_NOVIEWPORTS MAKE_DDHRESULT(772) +#define D3DERR_VIEWPORTDATANOTSET MAKE_DDHRESULT(773) +#define D3DERR_VIEWPORTHASNODEVICE MAKE_DDHRESULT(774) +#define D3DERR_NOCURRENTVIEWPORT MAKE_DDHRESULT(775) +#define D3DERR_INVALIDVERTEXFORMAT MAKE_DDHRESULT(2048) +#define D3DERR_COLORKEYATTACHED MAKE_DDHRESULT(2050) +#define D3DERR_VERTEXBUFFEROPTIMIZED MAKE_DDHRESULT(2060) +#define D3DERR_VBUF_CREATE_FAILED MAKE_DDHRESULT(2061) +#define D3DERR_VERTEXBUFFERLOCKED MAKE_DDHRESULT(2062) +#define D3DERR_VERTEXBUFFERUNLOCKFAILED MAKE_DDHRESULT(2063) +#define D3DERR_ZBUFFER_NOTPRESENT MAKE_DDHRESULT(2070) +#define D3DERR_STENCILBUFFER_NOTPRESENT MAKE_DDHRESULT(2071) + +#define D3DERR_WRONGTEXTUREFORMAT MAKE_DDHRESULT(2072) +#define D3DERR_UNSUPPORTEDCOLOROPERATION MAKE_DDHRESULT(2073) +#define D3DERR_UNSUPPORTEDCOLORARG MAKE_DDHRESULT(2074) +#define D3DERR_UNSUPPORTEDALPHAOPERATION MAKE_DDHRESULT(2075) +#define D3DERR_UNSUPPORTEDALPHAARG MAKE_DDHRESULT(2076) +#define D3DERR_TOOMANYOPERATIONS MAKE_DDHRESULT(2077) +#define D3DERR_CONFLICTINGTEXTUREFILTER MAKE_DDHRESULT(2078) +#define D3DERR_UNSUPPORTEDFACTORVALUE MAKE_DDHRESULT(2079) +#define D3DERR_CONFLICTINGRENDERSTATE MAKE_DDHRESULT(2081) +#define D3DERR_UNSUPPORTEDTEXTUREFILTER MAKE_DDHRESULT(2082) +#define D3DERR_TOOMANYPRIMITIVES MAKE_DDHRESULT(2083) +#define D3DERR_INVALIDMATRIX MAKE_DDHRESULT(2084) +#define D3DERR_TOOMANYVERTICES MAKE_DDHRESULT(2085) +#define D3DERR_CONFLICTINGTEXTUREPALETTE MAKE_DDHRESULT(2086) + +#define D3DERR_INVALIDSTATEBLOCK MAKE_DDHRESULT(2100) +#define D3DERR_INBEGINSTATEBLOCK MAKE_DDHRESULT(2101) +#define D3DERR_NOTINBEGINSTATEBLOCK MAKE_DDHRESULT(2102) + +/* ******************************************************************** + Enums + ******************************************************************** */ +#define D3DNEXT_NEXT 0x01l +#define D3DNEXT_HEAD 0x02l +#define D3DNEXT_TAIL 0x04l + +#define D3DDP_WAIT 0x00000001l +#define D3DDP_OUTOFORDER 0x00000002l +#define D3DDP_DONOTCLIP 0x00000004l +#define D3DDP_DONOTUPDATEEXTENTS 0x00000008l +#define D3DDP_DONOTLIGHT 0x00000010l + +/* ******************************************************************** + Types and structures + ******************************************************************** */ +typedef DWORD D3DVIEWPORTHANDLE, *LPD3DVIEWPORTHANDLE; + + +/***************************************************************************** + * IDirect3D interface + */ +#define INTERFACE IDirect3D +DECLARE_INTERFACE_(IDirect3D,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3D methods ***/ + STDMETHOD(Initialize)(THIS_ REFIID riid) PURE; + STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback, LPVOID lpUserArg) PURE; + STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT *lplpDirect3DLight, IUnknown *pUnkOuter) PURE; + STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL *lplpDirect3DMaterial, IUnknown *pUnkOuter) PURE; + STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT *lplpD3DViewport, IUnknown *pUnkOuter) PURE; + STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH lpD3DDFS, LPD3DFINDDEVICERESULT lplpD3DDevice) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3D_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3D_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3D_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3D methods ***/ +#define IDirect3D_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirect3D_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b) +#define IDirect3D_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b) +#define IDirect3D_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b) +#define IDirect3D_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b) +#define IDirect3D_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b) +#else +/*** IUnknown methods ***/ +#define IDirect3D_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3D_AddRef(p) (p)->AddRef() +#define IDirect3D_Release(p) (p)->Release() +/*** IDirect3D methods ***/ +#define IDirect3D_Initialize(p,a) (p)->Initialize(a) +#define IDirect3D_EnumDevices(p,a,b) (p)->EnumDevices(a,b) +#define IDirect3D_CreateLight(p,a,b) (p)->CreateLight(a,b) +#define IDirect3D_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b) +#define IDirect3D_CreateViewport(p,a,b) (p)->CreateViewport(a,b) +#define IDirect3D_FindDevice(p,a,b) (p)->FindDevice(a,b) +#endif + + +/***************************************************************************** + * IDirect3D2 interface + */ +#define INTERFACE IDirect3D2 +DECLARE_INTERFACE_(IDirect3D2,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3D2 methods ***/ + STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback, LPVOID lpUserArg) PURE; + STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT *lplpDirect3DLight, IUnknown *pUnkOuter) PURE; + STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL2 *lplpDirect3DMaterial2, IUnknown *pUnkOuter) PURE; + STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT2 *lplpD3DViewport2, IUnknown *pUnkOuter) PURE; + STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH lpD3DDFS, LPD3DFINDDEVICERESULT lpD3DFDR) PURE; + STDMETHOD(CreateDevice)(THIS_ REFCLSID rclsid, LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DDEVICE2 *lplpD3DDevice2) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3D2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3D2_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3D2_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3D2 methods ***/ +#define IDirect3D2_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b) +#define IDirect3D2_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b) +#define IDirect3D2_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b) +#define IDirect3D2_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b) +#define IDirect3D2_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b) +#define IDirect3D2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c) +#else +/*** IUnknown methods ***/ +#define IDirect3D2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3D2_AddRef(p) (p)->AddRef() +#define IDirect3D2_Release(p) (p)->Release() +/*** IDirect3D2 methods ***/ +#define IDirect3D2_EnumDevices(p,a,b) (p)->EnumDevices(a,b) +#define IDirect3D2_CreateLight(p,a,b) (p)->CreateLight(a,b) +#define IDirect3D2_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b) +#define IDirect3D2_CreateViewport(p,a,b) (p)->CreateViewport(a,b) +#define IDirect3D2_FindDevice(p,a,b) (p)->FindDevice(a,b) +#define IDirect3D2_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c) +#endif + + +/***************************************************************************** + * IDirect3D3 interface + */ +#define INTERFACE IDirect3D3 +DECLARE_INTERFACE_(IDirect3D3,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3D3 methods ***/ + STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback, LPVOID lpUserArg) PURE; + STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT *lplpDirect3DLight, IUnknown *pUnkOuter) PURE; + STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL3 *lplpDirect3DMaterial3, IUnknown *pUnkOuter) PURE; + STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT3 *lplpD3DViewport3, IUnknown *pUnkOuter) PURE; + STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH lpD3DDFS, LPD3DFINDDEVICERESULT lpD3DFDR) PURE; + STDMETHOD(CreateDevice)(THIS_ REFCLSID rclsid,LPDIRECTDRAWSURFACE4 lpDDS, LPDIRECT3DDEVICE3 *lplpD3DDevice3,LPUNKNOWN lpUnk) PURE; + STDMETHOD(CreateVertexBuffer)(THIS_ LPD3DVERTEXBUFFERDESC lpD3DVertBufDesc,LPDIRECT3DVERTEXBUFFER *lplpD3DVertBuf,DWORD dwFlags,LPUNKNOWN lpUnk) PURE; + STDMETHOD(EnumZBufferFormats)(THIS_ REFCLSID riidDevice,LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback,LPVOID lpContext) PURE; + STDMETHOD(EvictManagedTextures)(THIS) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3D3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3D3_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3D3_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3D3 methods ***/ +#define IDirect3D3_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b) +#define IDirect3D3_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b) +#define IDirect3D3_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b) +#define IDirect3D3_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b) +#define IDirect3D3_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b) +#define IDirect3D3_CreateDevice(p,a,b,c,d) (p)->lpVtbl->CreateDevice(p,a,b,c,d) +#define IDirect3D3_CreateVertexBuffer(p,a,b,c,d) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c,d) +#define IDirect3D3_EnumZBufferFormats(p,a,b,c) (p)->lpVtbl->EnumZBufferFormats(p,a,b,c) +#define IDirect3D3_EvictManagedTextures(p) (p)->lpVtbl->EvictManagedTextures(p) +#else +/*** IUnknown methods ***/ +#define IDirect3D3_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3D3_AddRef(p) (p)->AddRef() +#define IDirect3D3_Release(p) (p)->Release() +/*** IDirect3D3 methods ***/ +#define IDirect3D3_EnumDevices(p,a,b) (p)->EnumDevices(a,b) +#define IDirect3D3_CreateLight(p,a,b) (p)->CreateLight(a,b) +#define IDirect3D3_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b) +#define IDirect3D3_CreateViewport(p,a,b) (p)->CreateViewport(a,b) +#define IDirect3D3_FindDevice(p,a,b) (p)->FindDevice(a,b) +#define IDirect3D3_CreateDevice(p,a,b,c,d) (p)->CreateDevice(a,b,c,d) +#define IDirect3D3_CreateVertexBuffer(p,a,b,c,d) (p)->CreateVertexBuffer(a,b,c,d) +#define IDirect3D3_EnumZBufferFormats(p,a,b,c) (p)->EnumZBufferFormats(a,b,c) +#define IDirect3D3_EvictManagedTextures(p) (p)->EvictManagedTextures() +#endif + +/***************************************************************************** + * IDirect3D7 interface + */ +#define INTERFACE IDirect3D7 +DECLARE_INTERFACE_(IDirect3D7,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3D7 methods ***/ + STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK7 lpEnumDevicesCallback, LPVOID lpUserArg) PURE; + STDMETHOD(CreateDevice)(THIS_ REFCLSID rclsid,LPDIRECTDRAWSURFACE7 lpDDS, LPDIRECT3DDEVICE7 *lplpD3DDevice) PURE; + STDMETHOD(CreateVertexBuffer)(THIS_ LPD3DVERTEXBUFFERDESC lpD3DVertBufDesc,LPDIRECT3DVERTEXBUFFER7 *lplpD3DVertBuf,DWORD dwFlags) PURE; + STDMETHOD(EnumZBufferFormats)(THIS_ REFCLSID riidDevice,LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback,LPVOID lpContext) PURE; + STDMETHOD(EvictManagedTextures)(THIS) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3D7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3D7_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3D7_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3D3 methods ***/ +#define IDirect3D7_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b) +#define IDirect3D7_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c) +#define IDirect3D7_CreateVertexBuffer(p,a,b,c) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c) +#define IDirect3D7_EnumZBufferFormats(p,a,b,c) (p)->lpVtbl->EnumZBufferFormats(p,a,b,c) +#define IDirect3D7_EvictManagedTextures(p) (p)->lpVtbl->EvictManagedTextures(p) +#else +/*** IUnknown methods ***/ +#define IDirect3D7_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3D7_AddRef(p) (p)->AddRef() +#define IDirect3D7_Release(p) (p)->Release() +/*** IDirect3D3 methods ***/ +#define IDirect3D7_EnumDevices(p,a,b) (p)->EnumDevices(a,b) +#define IDirect3D7_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c) +#define IDirect3D7_CreateVertexBuffer(p,a,b,c) (p)->CreateVertexBuffer(a,b,c) +#define IDirect3D7_EnumZBufferFormats(p,a,b,c) (p)->EnumZBufferFormats(a,b,c) +#define IDirect3D7_EvictManagedTextures(p) (p)->EvictManagedTextures() +#endif + + +/***************************************************************************** + * IDirect3DLight interface + */ +#define INTERFACE IDirect3DLight +DECLARE_INTERFACE_(IDirect3DLight,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3DLight methods ***/ + STDMETHOD(Initialize)(THIS_ LPDIRECT3D lpDirect3D) PURE; + STDMETHOD(SetLight)(THIS_ LPD3DLIGHT lpLight) PURE; + STDMETHOD(GetLight)(THIS_ LPD3DLIGHT lpLight) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3DLight_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DLight_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DLight_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3DLight methods ***/ +#define IDirect3DLight_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirect3DLight_SetLight(p,a) (p)->lpVtbl->SetLight(p,a) +#define IDirect3DLight_GetLight(p,a) (p)->lpVtbl->GetLight(p,a) +#else +/*** IUnknown methods ***/ +#define IDirect3DLight_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DLight_AddRef(p) (p)->AddRef() +#define IDirect3DLight_Release(p) (p)->Release() +/*** IDirect3DLight methods ***/ +#define IDirect3DLight_Initialize(p,a) (p)->Initialize(a) +#define IDirect3DLight_SetLight(p,a) (p)->SetLight(a) +#define IDirect3DLight_GetLight(p,a) (p)->GetLight(a) +#endif + + +/***************************************************************************** + * IDirect3DMaterial interface + */ +#define INTERFACE IDirect3DMaterial +DECLARE_INTERFACE_(IDirect3DMaterial,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3DMaterial methods ***/ + STDMETHOD(Initialize)(THIS_ LPDIRECT3D lpDirect3D) PURE; + STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL lpMat) PURE; + STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL lpMat) PURE; + STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE lpDirect3DDevice, LPD3DMATERIALHANDLE lpHandle) PURE; + STDMETHOD(Reserve)(THIS) PURE; + STDMETHOD(Unreserve)(THIS) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3DMaterial_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DMaterial_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DMaterial_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3DMaterial methods ***/ +#define IDirect3DMaterial_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirect3DMaterial_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a) +#define IDirect3DMaterial_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a) +#define IDirect3DMaterial_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b) +#define IDirect3DMaterial_Reserve(p) (p)->lpVtbl->Reserve(p) +#define IDirect3DMaterial_Unreserve(p) (p)->lpVtbl->Unreserve(p) +#else +/*** IUnknown methods ***/ +#define IDirect3DMaterial_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DMaterial_AddRef(p) (p)->AddRef() +#define IDirect3DMaterial_Release(p) (p)->Release() +/*** IDirect3DMaterial methods ***/ +#define IDirect3DMaterial_Initialize(p,a) (p)->Initialize(a) +#define IDirect3DMaterial_SetMaterial(p,a) (p)->SetMaterial(a) +#define IDirect3DMaterial_GetMaterial(p,a) (p)->GetMaterial(a) +#define IDirect3DMaterial_GetHandle(p,a,b) (p)->GetHandle(a,b) +#define IDirect3DMaterial_Reserve(p) (p)->Reserve() +#define IDirect3DMaterial_Unreserve(p) (p)->Unreserve() +#endif + + +/***************************************************************************** + * IDirect3DMaterial2 interface + */ +#define INTERFACE IDirect3DMaterial2 +DECLARE_INTERFACE_(IDirect3DMaterial2,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3DMaterial2 methods ***/ + STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL lpMat) PURE; + STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL lpMat) PURE; + STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE2 lpDirect3DDevice2, LPD3DMATERIALHANDLE lpHandle) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3DMaterial2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DMaterial2_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DMaterial2_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3DMaterial2 methods ***/ +#define IDirect3DMaterial2_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a) +#define IDirect3DMaterial2_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a) +#define IDirect3DMaterial2_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b) +#else +/*** IUnknown methods ***/ +#define IDirect3DMaterial2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DMaterial2_AddRef(p) (p)->AddRef() +#define IDirect3DMaterial2_Release(p) (p)->Release() +/*** IDirect3DMaterial2 methods ***/ +#define IDirect3DMaterial2_SetMaterial(p,a) (p)->SetMaterial(a) +#define IDirect3DMaterial2_GetMaterial(p,a) (p)->GetMaterial(a) +#define IDirect3DMaterial2_GetHandle(p,a,b) (p)->GetHandle(a,b) +#endif + + +/***************************************************************************** + * IDirect3DMaterial3 interface + */ +#define INTERFACE IDirect3DMaterial3 +DECLARE_INTERFACE_(IDirect3DMaterial3,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3DMaterial3 methods ***/ + STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL lpMat) PURE; + STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL lpMat) PURE; + STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE3 lpDirect3DDevice3, LPD3DMATERIALHANDLE lpHandle) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3DMaterial3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DMaterial3_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DMaterial3_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3DMaterial3 methods ***/ +#define IDirect3DMaterial3_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a) +#define IDirect3DMaterial3_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a) +#define IDirect3DMaterial3_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b) +#else +/*** IUnknown methods ***/ +#define IDirect3DMaterial3_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DMaterial3_AddRef(p) (p)->AddRef() +#define IDirect3DMaterial3_Release(p) (p)->Release() +/*** IDirect3DMaterial3 methods ***/ +#define IDirect3DMaterial3_SetMaterial(p,a) (p)->SetMaterial(a) +#define IDirect3DMaterial3_GetMaterial(p,a) (p)->GetMaterial(a) +#define IDirect3DMaterial3_GetHandle(p,a,b) (p)->GetHandle(a,b) +#endif + + +/***************************************************************************** + * IDirect3DTexture interface + */ +#define INTERFACE IDirect3DTexture +DECLARE_INTERFACE_(IDirect3DTexture,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3DTexture methods ***/ + STDMETHOD(Initialize)(THIS_ LPDIRECT3DDEVICE lpDirect3DDevice, LPDIRECTDRAWSURFACE lpDDSurface) PURE; + STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE lpDirect3DDevice, LPD3DTEXTUREHANDLE lpHandle) PURE; + STDMETHOD(PaletteChanged)(THIS_ DWORD dwStart, DWORD dwCount) PURE; + STDMETHOD(Load)(THIS_ LPDIRECT3DTEXTURE lpD3DTexture) PURE; + STDMETHOD(Unload)(THIS) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3DTexture_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DTexture_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DTexture_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3DTexture methods ***/ +#define IDirect3DTexture_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirect3DTexture_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b) +#define IDirect3DTexture_PaletteChanged(p,a,b) (p)->lpVtbl->PaletteChanged(p,a,b) +#define IDirect3DTexture_Load(p,a) (p)->lpVtbl->Load(p,a) +#define IDirect3DTexture_Unload(p) (p)->lpVtbl->Unload(p) +#else +/*** IUnknown methods ***/ +#define IDirect3DTexture_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DTexture_AddRef(p) (p)->AddRef() +#define IDirect3DTexture_Release(p) (p)->Release() +/*** IDirect3DTexture methods ***/ +#define IDirect3DTexture_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirect3DTexture_GetHandle(p,a,b) (p)->GetHandle(a,b) +#define IDirect3DTexture_PaletteChanged(p,a,b) (p)->PaletteChanged(a,b) +#define IDirect3DTexture_Load(p,a) (p)->Load(a) +#define IDirect3DTexture_Unload(p) (p)->Unload() +#endif + + +/***************************************************************************** + * IDirect3DTexture2 interface + */ +#define INTERFACE IDirect3DTexture2 +DECLARE_INTERFACE_(IDirect3DTexture2,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3DTexture2 methods ***/ + STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE2 lpDirect3DDevice2, LPD3DTEXTUREHANDLE lpHandle) PURE; + STDMETHOD(PaletteChanged)(THIS_ DWORD dwStart, DWORD dwCount) PURE; + STDMETHOD(Load)(THIS_ LPDIRECT3DTEXTURE2 lpD3DTexture2) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3DTexture2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DTexture2_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DTexture2_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3DTexture2 methods ***/ +#define IDirect3DTexture2_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b) +#define IDirect3DTexture2_PaletteChanged(p,a,b) (p)->lpVtbl->PaletteChanged(p,a,b) +#define IDirect3DTexture2_Load(p,a) (p)->lpVtbl->Load(p,a) +#else +/*** IUnknown methods ***/ +#define IDirect3DTexture2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DTexture2_AddRef(p) (p)->AddRef() +#define IDirect3DTexture2_Release(p) (p)->Release() +/*** IDirect3DTexture2 methods ***/ +#define IDirect3DTexture2_GetHandle(p,a,b) (p)->GetHandle(a,b) +#define IDirect3DTexture2_PaletteChanged(p,a,b) (p)->PaletteChanged(a,b) +#define IDirect3DTexture2_Load(p,a) (p)->Load(a) +#endif + + +/***************************************************************************** + * IDirect3DViewport interface + */ +#define INTERFACE IDirect3DViewport +DECLARE_INTERFACE_(IDirect3DViewport,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3DViewport methods ***/ + STDMETHOD(Initialize)(THIS_ LPDIRECT3D lpDirect3D) PURE; + STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT lpData) PURE; + STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT lpData) PURE; + STDMETHOD(TransformVertices)(THIS_ DWORD dwVertexCount, LPD3DTRANSFORMDATA lpData, DWORD dwFlags, LPDWORD lpOffScreen) PURE; + STDMETHOD(LightElements)(THIS_ DWORD dwElementCount, LPD3DLIGHTDATA lpData) PURE; + STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE hMat) PURE; + STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE lphMat, LPBOOL lpValid) PURE; + STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE lpDDSurface) PURE; + STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE *lplpDDSurface, LPBOOL lpValid) PURE; + STDMETHOD(Clear)(THIS_ DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags) PURE; + STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight) PURE; + STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight) PURE; + STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight, LPDIRECT3DLIGHT *lplpDirect3DLight, DWORD dwFlags) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3DViewport_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DViewport_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DViewport_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3DViewport methods ***/ +#define IDirect3DViewport_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirect3DViewport_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a) +#define IDirect3DViewport_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a) +#define IDirect3DViewport_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d) +#define IDirect3DViewport_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b) +#define IDirect3DViewport_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a) +#define IDirect3DViewport_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b) +#define IDirect3DViewport_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a) +#define IDirect3DViewport_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b) +#define IDirect3DViewport_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c) +#define IDirect3DViewport_AddLight(p,a) (p)->lpVtbl->AddLight(p,a) +#define IDirect3DViewport_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a) +#define IDirect3DViewport_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c) +#else +/*** IUnknown methods ***/ +#define IDirect3DViewport_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DViewport_AddRef(p) (p)->AddRef() +#define IDirect3DViewport_Release(p) (p)->Release() +/*** IDirect3DViewport methods ***/ +#define IDirect3DViewport_Initialize(p,a) (p)->Initialize(a) +#define IDirect3DViewport_GetViewport(p,a) (p)->GetViewport(a) +#define IDirect3DViewport_SetViewport(p,a) (p)->SetViewport(a) +#define IDirect3DViewport_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d) +#define IDirect3DViewport_LightElements(p,a,b) (p)->LightElements(a,b) +#define IDirect3DViewport_SetBackground(p,a) (p)->SetBackground(a) +#define IDirect3DViewport_GetBackground(p,a,b) (p)->GetBackground(a,b) +#define IDirect3DViewport_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a) +#define IDirect3DViewport_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b) +#define IDirect3DViewport_Clear(p,a,b,c) (p)->Clear(a,b,c) +#define IDirect3DViewport_AddLight(p,a) (p)->AddLight(a) +#define IDirect3DViewport_DeleteLight(p,a) (p)->DeleteLight(a) +#define IDirect3DViewport_NextLight(p,a,b,c) (p)->NextLight(a,b,c) +#endif + + +/***************************************************************************** + * IDirect3DViewport2 interface + */ +#define INTERFACE IDirect3DViewport2 +DECLARE_INTERFACE_(IDirect3DViewport2,IDirect3DViewport) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3DViewport methods ***/ + STDMETHOD(Initialize)(THIS_ LPDIRECT3D lpDirect3D) PURE; + STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT lpData) PURE; + STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT lpData) PURE; + STDMETHOD(TransformVertices)(THIS_ DWORD dwVertexCount, LPD3DTRANSFORMDATA lpData, DWORD dwFlags, LPDWORD lpOffScreen) PURE; + STDMETHOD(LightElements)(THIS_ DWORD dwElementCount, LPD3DLIGHTDATA lpData) PURE; + STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE hMat) PURE; + STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE lphMat, LPBOOL lpValid) PURE; + STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE lpDDSurface) PURE; + STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE *lplpDDSurface, LPBOOL lpValid) PURE; + STDMETHOD(Clear)(THIS_ DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags) PURE; + STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight) PURE; + STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight) PURE; + STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight, LPDIRECT3DLIGHT *lplpDirect3DLight, DWORD dwFlags) PURE; + /*** IDirect3DViewport2 methods ***/ + STDMETHOD(GetViewport2)(THIS_ LPD3DVIEWPORT2 lpData) PURE; + STDMETHOD(SetViewport2)(THIS_ LPD3DVIEWPORT2 lpData) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3DViewport2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DViewport2_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DViewport2_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3Viewport methods ***/ +#define IDirect3DViewport2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirect3DViewport2_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a) +#define IDirect3DViewport2_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a) +#define IDirect3DViewport2_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d) +#define IDirect3DViewport2_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b) +#define IDirect3DViewport2_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a) +#define IDirect3DViewport2_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b) +#define IDirect3DViewport2_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a) +#define IDirect3DViewport2_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b) +#define IDirect3DViewport2_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c) +#define IDirect3DViewport2_AddLight(p,a) (p)->lpVtbl->AddLight(p,a) +#define IDirect3DViewport2_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a) +#define IDirect3DViewport2_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c) +/*** IDirect3DViewport2 methods ***/ +#define IDirect3DViewport2_GetViewport2(p,a) (p)->lpVtbl->GetViewport2(p,a) +#define IDirect3DViewport2_SetViewport2(p,a) (p)->lpVtbl->SetViewport2(p,a) +#else +/*** IUnknown methods ***/ +#define IDirect3DViewport2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DViewport2_AddRef(p) (p)->AddRef() +#define IDirect3DViewport2_Release(p) (p)->Release() +/*** IDirect3Viewport methods ***/ +#define IDirect3DViewport2_Initialize(p,a) (p)->Initialize(a) +#define IDirect3DViewport2_GetViewport(p,a) (p)->GetViewport(a) +#define IDirect3DViewport2_SetViewport(p,a) (p)->SetViewport(a) +#define IDirect3DViewport2_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d) +#define IDirect3DViewport2_LightElements(p,a,b) (p)->LightElements(a,b) +#define IDirect3DViewport2_SetBackground(p,a) (p)->SetBackground(a) +#define IDirect3DViewport2_GetBackground(p,a,b) (p)->GetBackground(a,b) +#define IDirect3DViewport2_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a) +#define IDirect3DViewport2_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b) +#define IDirect3DViewport2_Clear(p,a,b,c) (p)->Clear(a,b,c) +#define IDirect3DViewport2_AddLight(p,a) (p)->AddLight(a) +#define IDirect3DViewport2_DeleteLight(p,a) (p)->DeleteLight(a) +#define IDirect3DViewport2_NextLight(p,a,b,c) (p)->NextLight(a,b,c) +/*** IDirect3DViewport2 methods ***/ +#define IDirect3DViewport2_GetViewport2(p,a) (p)->GetViewport2(a) +#define IDirect3DViewport2_SetViewport2(p,a) (p)->SetViewport2(a) +#endif + +/***************************************************************************** + * IDirect3DViewport3 interface + */ +#define INTERFACE IDirect3DViewport3 +DECLARE_INTERFACE_(IDirect3DViewport3,IDirect3DViewport2) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3DViewport methods ***/ + STDMETHOD(Initialize)(THIS_ LPDIRECT3D lpDirect3D) PURE; + STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT lpData) PURE; + STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT lpData) PURE; + STDMETHOD(TransformVertices)(THIS_ DWORD dwVertexCount, LPD3DTRANSFORMDATA lpData, DWORD dwFlags, LPDWORD lpOffScreen) PURE; + STDMETHOD(LightElements)(THIS_ DWORD dwElementCount, LPD3DLIGHTDATA lpData) PURE; + STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE hMat) PURE; + STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE lphMat, LPBOOL lpValid) PURE; + STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE lpDDSurface) PURE; + STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE *lplpDDSurface, LPBOOL lpValid) PURE; + STDMETHOD(Clear)(THIS_ DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags) PURE; + STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight) PURE; + STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight) PURE; + STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight, LPDIRECT3DLIGHT *lplpDirect3DLight, DWORD dwFlags) PURE; + /*** IDirect3DViewport2 methods ***/ + STDMETHOD(GetViewport2)(THIS_ LPD3DVIEWPORT2 lpData) PURE; + STDMETHOD(SetViewport2)(THIS_ LPD3DVIEWPORT2 lpData) PURE; + /*** IDirect3DViewport3 methods ***/ + STDMETHOD(SetBackgroundDepth2)(THIS_ LPDIRECTDRAWSURFACE4 lpDDS) PURE; + STDMETHOD(GetBackgroundDepth2)(THIS_ LPDIRECTDRAWSURFACE4 *lplpDDS,LPBOOL lpValid) PURE; + STDMETHOD(Clear2)(THIS_ DWORD dwCount,LPD3DRECT lpRects,DWORD dwFlags,DWORD dwColor,D3DVALUE dvZ,DWORD dwStencil) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3DViewport3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DViewport3_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DViewport3_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3Viewport methods ***/ +#define IDirect3DViewport3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirect3DViewport3_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a) +#define IDirect3DViewport3_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a) +#define IDirect3DViewport3_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d) +#define IDirect3DViewport3_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b) +#define IDirect3DViewport3_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a) +#define IDirect3DViewport3_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b) +#define IDirect3DViewport3_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a) +#define IDirect3DViewport3_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b) +#define IDirect3DViewport3_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c) +#define IDirect3DViewport3_AddLight(p,a) (p)->lpVtbl->AddLight(p,a) +#define IDirect3DViewport3_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a) +#define IDirect3DViewport3_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c) +/*** IDirect3DViewport2 methods ***/ +#define IDirect3DViewport3_GetViewport2(p,a) (p)->lpVtbl->GetViewport2(p,a) +#define IDirect3DViewport3_SetViewport2(p,a) (p)->lpVtbl->SetViewport2(p,a) +/*** IDirect3DViewport3 methods ***/ +#define IDirect3DViewport3_SetBackgroundDepth2(p,a) (p)->lpVtbl->SetBackgroundDepth2(p,a) +#define IDirect3DViewport3_GetBackgroundDepth2(p,a,b) (p)->lpVtbl->GetBackgroundDepth2(p,a,b) +#define IDirect3DViewport3_Clear2(p,a,b,c,d,e,f) (p)->lpVtbl->Clear2(p,a,b,c,d,e,f) +#else +/*** IUnknown methods ***/ +#define IDirect3DViewport3_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DViewport3_AddRef(p) (p)->AddRef() +#define IDirect3DViewport3_Release(p) (p)->Release() +/*** IDirect3Viewport methods ***/ +#define IDirect3DViewport3_Initialize(p,a) (p)->Initialize(a) +#define IDirect3DViewport3_GetViewport(p,a) (p)->GetViewport(a) +#define IDirect3DViewport3_SetViewport(p,a) (p)->SetViewport(a) +#define IDirect3DViewport3_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d) +#define IDirect3DViewport3_LightElements(p,a,b) (p)->LightElements(a,b) +#define IDirect3DViewport3_SetBackground(p,a) (p)->SetBackground(a) +#define IDirect3DViewport3_GetBackground(p,a,b) (p)->GetBackground(a,b) +#define IDirect3DViewport3_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a) +#define IDirect3DViewport3_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b) +#define IDirect3DViewport3_Clear(p,a,b,c) (p)->Clear(a,b,c) +#define IDirect3DViewport3_AddLight(p,a) (p)->AddLight(a) +#define IDirect3DViewport3_DeleteLight(p,a) (p)->DeleteLight(a) +#define IDirect3DViewport3_NextLight(p,a,b,c) (p)->NextLight(a,b,c) +/*** IDirect3DViewport2 methods ***/ +#define IDirect3DViewport3_GetViewport2(p,a) (p)->GetViewport2(a) +#define IDirect3DViewport3_SetViewport2(p,a) (p)->SetViewport2(a) +/*** IDirect3DViewport3 methods ***/ +#define IDirect3DViewport3_SetBackgroundDepth2(p,a) (p)->SetBackgroundDepth2(a) +#define IDirect3DViewport3_GetBackgroundDepth2(p,a,b) (p)->GetBackgroundDepth2(a,b) +#define IDirect3DViewport3_Clear2(p,a,b,c,d,e,f) (p)->Clear2(a,b,c,d,e,f) +#endif + + + +/***************************************************************************** + * IDirect3DExecuteBuffer interface + */ +#define INTERFACE IDirect3DExecuteBuffer +DECLARE_INTERFACE_(IDirect3DExecuteBuffer,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3DExecuteBuffer methods ***/ + STDMETHOD(Initialize)(THIS_ LPDIRECT3DDEVICE lpDirect3DDevice, LPD3DEXECUTEBUFFERDESC lpDesc) PURE; + STDMETHOD(Lock)(THIS_ LPD3DEXECUTEBUFFERDESC lpDesc) PURE; + STDMETHOD(Unlock)(THIS) PURE; + STDMETHOD(SetExecuteData)(THIS_ LPD3DEXECUTEDATA lpData) PURE; + STDMETHOD(GetExecuteData)(THIS_ LPD3DEXECUTEDATA lpData) PURE; + STDMETHOD(Validate)(THIS_ LPDWORD lpdwOffset, LPD3DVALIDATECALLBACK lpFunc, LPVOID lpUserArg, DWORD dwReserved) PURE; + STDMETHOD(Optimize)(THIS_ DWORD dwDummy) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3DExecuteBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DExecuteBuffer_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DExecuteBuffer_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3DExecuteBuffer methods ***/ +#define IDirect3DExecuteBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirect3DExecuteBuffer_Lock(p,a) (p)->lpVtbl->Lock(p,a) +#define IDirect3DExecuteBuffer_Unlock(p) (p)->lpVtbl->Unlock(p) +#define IDirect3DExecuteBuffer_SetExecuteData(p,a) (p)->lpVtbl->SetExecuteData(p,a) +#define IDirect3DExecuteBuffer_GetExecuteData(p,a) (p)->lpVtbl->GetExecuteData(p,a) +#define IDirect3DExecuteBuffer_Validate(p,a,b,c,d) (p)->lpVtbl->Validate(p,a,b,c,d) +#define IDirect3DExecuteBuffer_Optimize(p,a) (p)->lpVtbl->Optimize(p,a) +#else +/*** IUnknown methods ***/ +#define IDirect3DExecuteBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DExecuteBuffer_AddRef(p) (p)->AddRef() +#define IDirect3DExecuteBuffer_Release(p) (p)->Release() +/*** IDirect3DExecuteBuffer methods ***/ +#define IDirect3DExecuteBuffer_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirect3DExecuteBuffer_Lock(p,a) (p)->Lock(a) +#define IDirect3DExecuteBuffer_Unlock(p) (p)->Unlock() +#define IDirect3DExecuteBuffer_SetExecuteData(p,a) (p)->SetExecuteData(a) +#define IDirect3DExecuteBuffer_GetExecuteData(p,a) (p)->GetExecuteData(a) +#define IDirect3DExecuteBuffer_Validate(p,a,b,c,d) (p)->Validate(a,b,c,d) +#define IDirect3DExecuteBuffer_Optimize(p,a) (p)->Optimize(a) +#endif + + +/***************************************************************************** + * IDirect3DDevice interface + */ +#define INTERFACE IDirect3DDevice +DECLARE_INTERFACE_(IDirect3DDevice,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3DDevice methods ***/ + STDMETHOD(Initialize)(THIS_ LPDIRECT3D lpDirect3D, LPGUID lpGUID, LPD3DDEVICEDESC lpD3DDVDesc) PURE; + STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC lpD3DHWDevDesc, LPD3DDEVICEDESC lpD3DHELDevDesc) PURE; + STDMETHOD(SwapTextureHandles)(THIS_ LPDIRECT3DTEXTURE lpD3Dtex1, LPDIRECT3DTEXTURE lpD3DTex2) PURE; + STDMETHOD(CreateExecuteBuffer)(THIS_ LPD3DEXECUTEBUFFERDESC lpDesc, LPDIRECT3DEXECUTEBUFFER *lplpDirect3DExecuteBuffer, IUnknown *pUnkOuter) PURE; + STDMETHOD(GetStats)(THIS_ LPD3DSTATS lpD3DStats) PURE; + STDMETHOD(Execute)(THIS_ LPDIRECT3DEXECUTEBUFFER lpDirect3DExecuteBuffer, LPDIRECT3DVIEWPORT lpDirect3DViewport, DWORD dwFlags) PURE; + STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT lpDirect3DViewport) PURE; + STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT lpDirect3DViewport) PURE; + STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT lpDirect3DViewport, LPDIRECT3DVIEWPORT *lplpDirect3DViewport, DWORD dwFlags) PURE; + STDMETHOD(Pick)(THIS_ LPDIRECT3DEXECUTEBUFFER lpDirect3DExecuteBuffer, LPDIRECT3DVIEWPORT lpDirect3DViewport, DWORD dwFlags, LPD3DRECT lpRect) PURE; + STDMETHOD(GetPickRecords)(THIS_ LPDWORD lpCount, LPD3DPICKRECORD lpD3DPickRec) PURE; + STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK lpD3DEnumTextureProc, LPVOID lpArg) PURE; + STDMETHOD(CreateMatrix)(THIS_ LPD3DMATRIXHANDLE lpD3DMatHandle) PURE; + STDMETHOD(SetMatrix)(THIS_ D3DMATRIXHANDLE D3DMatHandle, LPD3DMATRIX lpD3DMatrix) PURE; + STDMETHOD(GetMatrix)(THIS_ D3DMATRIXHANDLE D3DMatHandle, LPD3DMATRIX lpD3DMatrix) PURE; + STDMETHOD(DeleteMatrix)(THIS_ D3DMATRIXHANDLE D3DMatHandle) PURE; + STDMETHOD(BeginScene)(THIS) PURE; + STDMETHOD(EndScene)(THIS) PURE; + STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D *lplpDirect3D) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3DDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DDevice_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DDevice_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3DDevice methods ***/ +#define IDirect3DDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c) +#define IDirect3DDevice_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) +#define IDirect3DDevice_SwapTextureHandles(p,a,b) (p)->lpVtbl->SwapTextureHandles(p,a,b) +#define IDirect3DDevice_CreateExecuteBuffer(p,a,b,c) (p)->lpVtbl->CreateExecuteBuffer(p,a,b,c) +#define IDirect3DDevice_GetStats(p,a) (p)->lpVtbl->GetStats(p,a) +#define IDirect3DDevice_Execute(p,a,b,c) (p)->lpVtbl->Execute(p,a,b,c) +#define IDirect3DDevice_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a) +#define IDirect3DDevice_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a) +#define IDirect3DDevice_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c) +#define IDirect3DDevice_Pick(p,a,b,c,d) (p)->lpVtbl->Pick(p,a,b,c,d) +#define IDirect3DDevice_GetPickRecords(p,a,b) (p)->lpVtbl->GetPickRecords(p,a,b) +#define IDirect3DDevice_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b) +#define IDirect3DDevice_CreateMatrix(p,a) (p)->lpVtbl->CreateMatrix(p,a) +#define IDirect3DDevice_SetMatrix(p,a,b) (p)->lpVtbl->SetMatrix(p,a,b) +#define IDirect3DDevice_GetMatrix(p,a,b) (p)->lpVtbl->GetMatrix(p,a,b) +#define IDirect3DDevice_DeleteMatrix(p,a) (p)->lpVtbl->DeleteMatrix(p,a) +#define IDirect3DDevice_BeginScene(p) (p)->lpVtbl->BeginScene(p) +#define IDirect3DDevice_EndScene(p) (p)->lpVtbl->EndScene(p) +#define IDirect3DDevice_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a) +#else +/*** IUnknown methods ***/ +#define IDirect3DDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DDevice_AddRef(p) (p)->AddRef() +#define IDirect3DDevice_Release(p) (p)->Release() +/*** IDirect3DDevice methods ***/ +#define IDirect3DDevice_Initialize(p,a,b,c) (p)->Initialize(a,b,c) +#define IDirect3DDevice_GetCaps(p,a,b) (p)->GetCaps(a,b) +#define IDirect3DDevice_SwapTextureHandles(p,a,b) (p)->SwapTextureHandles(a,b) +#define IDirect3DDevice_CreateExecuteBuffer(p,a,b,c) (p)->CreateExecuteBuffer(a,b,c) +#define IDirect3DDevice_GetStats(p,a) (p)->GetStats(a) +#define IDirect3DDevice_Execute(p,a,b,c) (p)->Execute(a,b,c) +#define IDirect3DDevice_AddViewport(p,a) (p)->AddViewport(a) +#define IDirect3DDevice_DeleteViewport(p,a) (p)->DeleteViewport(a) +#define IDirect3DDevice_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c) +#define IDirect3DDevice_Pick(p,a,b,c,d) (p)->Pick(a,b,c,d) +#define IDirect3DDevice_GetPickRecords(p,a,b) (p)->GetPickRecords(a,b) +#define IDirect3DDevice_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b) +#define IDirect3DDevice_CreateMatrix(p,a) (p)->CreateMatrix(a) +#define IDirect3DDevice_SetMatrix(p,a,b) (p)->SetMatrix(a,b) +#define IDirect3DDevice_GetMatrix(p,a,b) (p)->GetMatrix(a,b) +#define IDirect3DDevice_DeleteMatrix(p,a) (p)->DeleteMatrix(a) +#define IDirect3DDevice_BeginScene(p) (p)->BeginScene() +#define IDirect3DDevice_EndScene(p) (p)->EndScene() +#define IDirect3DDevice_GetDirect3D(p,a) (p)->GetDirect3D(a) +#endif + + +/***************************************************************************** + * IDirect3DDevice2 interface + */ +#define INTERFACE IDirect3DDevice2 +DECLARE_INTERFACE_(IDirect3DDevice2,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3DDevice2 methods ***/ + STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC lpD3DHWDevDesc, LPD3DDEVICEDESC lpD3DHELDevDesc) PURE; + STDMETHOD(SwapTextureHandles)(THIS_ LPDIRECT3DTEXTURE2 lpD3DTex1, LPDIRECT3DTEXTURE2 lpD3DTex2) PURE; + STDMETHOD(GetStats)(THIS_ LPD3DSTATS lpD3DStats) PURE; + STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT2 lpDirect3DViewport2) PURE; + STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT2 lpDirect3DViewport2) PURE; + STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT2 lpDirect3DViewport2, LPDIRECT3DVIEWPORT2 *lplpDirect3DViewport2, DWORD dwFlags) PURE; + STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK lpD3DEnumTextureProc, LPVOID lpArg) PURE; + STDMETHOD(BeginScene)(THIS) PURE; + STDMETHOD(EndScene)(THIS) PURE; + STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D2 *lplpDirect3D2) PURE; + /*** DrawPrimitive API ***/ + STDMETHOD(SetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT2 lpDirect3DViewport2) PURE; + STDMETHOD(GetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT2 *lplpDirect3DViewport2) PURE; + STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE lpNewRenderTarget, DWORD dwFlags) PURE; + STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE *lplpRenderTarget) PURE; + STDMETHOD(Begin)(THIS_ D3DPRIMITIVETYPE d3dpt,D3DVERTEXTYPE dwVertexTypeDesc,DWORD dwFlags) PURE; + STDMETHOD(BeginIndexed)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, D3DVERTEXTYPE d3dvtVertexType, LPVOID lpvVertices, DWORD dwNumVertices, DWORD dwFlags) PURE; + STDMETHOD(Vertex)(THIS_ LPVOID lpVertexType) PURE; + STDMETHOD(Index)(THIS_ WORD wVertexIndex) PURE; + STDMETHOD(End)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, LPDWORD lpdwRenderState) PURE; + STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, DWORD dwRenderState) PURE; + STDMETHOD(GetLightState)(THIS_ D3DLIGHTSTATETYPE dwLightStateType, LPDWORD lpdwLightState) PURE; + STDMETHOD(SetLightState)(THIS_ D3DLIGHTSTATETYPE dwLightStateType, DWORD dwLightState) PURE; + STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE; + STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE; + STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE; + STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, D3DVERTEXTYPE d3dvtVertexType, LPVOID lpvVertices, DWORD dwVertexCount, DWORD dwFlags) PURE; + STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, D3DVERTEXTYPE d3dvtVertexType, LPVOID lpvVertices, DWORD dwVertexCount, LPWORD dwIndices, DWORD dwIndexCount, DWORD dwFlags) PURE; + STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS lpD3DClipStatus) PURE; + STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS lpD3DClipStatus) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3DDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DDevice2_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DDevice2_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3DDevice2 methods ***/ +#define IDirect3DDevice2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) +#define IDirect3DDevice2_SwapTextureHandles(p,a,b) (p)->lpVtbl->SwapTextureHandles(p,a,b) +#define IDirect3DDevice2_GetStats(p,a) (p)->lpVtbl->GetStats(p,a) +#define IDirect3DDevice2_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a) +#define IDirect3DDevice2_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a) +#define IDirect3DDevice2_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c) +#define IDirect3DDevice2_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b) +#define IDirect3DDevice2_BeginScene(p) (p)->lpVtbl->BeginScene(p) +#define IDirect3DDevice2_EndScene(p) (p)->lpVtbl->EndScene(p) +#define IDirect3DDevice2_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a) +#define IDirect3DDevice2_SetCurrentViewport(p,a) (p)->lpVtbl->SetCurrentViewport(p,a) +#define IDirect3DDevice2_GetCurrentViewport(p,a) (p)->lpVtbl->GetCurrentViewport(p,a) +#define IDirect3DDevice2_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b) +#define IDirect3DDevice2_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a) +#define IDirect3DDevice2_Begin(p,a,b,c) (p)->lpVtbl->Begin(p,a,b,c) +#define IDirect3DDevice2_BeginIndexed(p,a,b,c,d,e) (p)->lpVtbl->BeginIndexed(p,a,b,c,d,e) +#define IDirect3DDevice2_Vertex(p,a) (p)->lpVtbl->Vertex(p,a) +#define IDirect3DDevice2_Index(p,a) (p)->lpVtbl->Index(p,a) +#define IDirect3DDevice2_End(p,a) (p)->lpVtbl->End(p,a) +#define IDirect3DDevice2_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b) +#define IDirect3DDevice2_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b) +#define IDirect3DDevice2_GetLightState(p,a,b) (p)->lpVtbl->GetLightState(p,a,b) +#define IDirect3DDevice2_SetLightState(p,a,b) (p)->lpVtbl->SetLightState(p,a,b) +#define IDirect3DDevice2_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b) +#define IDirect3DDevice2_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b) +#define IDirect3DDevice2_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b) +#define IDirect3DDevice2_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e) +#define IDirect3DDevice2_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g) +#define IDirect3DDevice2_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a) +#define IDirect3DDevice2_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a) +#else +/*** IUnknown methods ***/ +#define IDirect3DDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DDevice2_AddRef(p) (p)->AddRef() +#define IDirect3DDevice2_Release(p) (p)->Release() +/*** IDirect3DDevice2 methods ***/ +#define IDirect3DDevice2_GetCaps(p,a,b) (p)->GetCaps(a,b) +#define IDirect3DDevice2_SwapTextureHandles(p,a,b) (p)->SwapTextureHandles(a,b) +#define IDirect3DDevice2_GetStats(p,a) (p)->GetStats(a) +#define IDirect3DDevice2_AddViewport(p,a) (p)->AddViewport(a) +#define IDirect3DDevice2_DeleteViewport(p,a) (p)->DeleteViewport(a) +#define IDirect3DDevice2_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c) +#define IDirect3DDevice2_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b) +#define IDirect3DDevice2_BeginScene(p) (p)->BeginScene() +#define IDirect3DDevice2_EndScene(p) (p)->EndScene() +#define IDirect3DDevice2_GetDirect3D(p,a) (p)->GetDirect3D(a) +#define IDirect3DDevice2_SetCurrentViewport(p,a) (p)->SetCurrentViewport(a) +#define IDirect3DDevice2_GetCurrentViewport(p,a) (p)->GetCurrentViewport(a) +#define IDirect3DDevice2_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b) +#define IDirect3DDevice2_GetRenderTarget(p,a) (p)->GetRenderTarget(a) +#define IDirect3DDevice2_Begin(p,a,b,c) (p)->Begin(a,b,c) +#define IDirect3DDevice2_BeginIndexed(p,a,b,c,d,e) (p)->BeginIndexed(a,b,c,d,e) +#define IDirect3DDevice2_Vertex(p,a) (p)->Vertex(a) +#define IDirect3DDevice2_Index(p,a) (p)->Index(a) +#define IDirect3DDevice2_End(p,a) (p)->End(a) +#define IDirect3DDevice2_GetRenderState(p,a,b) (p)->GetRenderState(a,b) +#define IDirect3DDevice2_SetRenderState(p,a,b) (p)->SetRenderState(a,b) +#define IDirect3DDevice2_GetLightState(p,a,b) (p)->GetLightState(a,b) +#define IDirect3DDevice2_SetLightState(p,a,b) (p)->SetLightState(a,b) +#define IDirect3DDevice2_SetTransform(p,a,b) (p)->SetTransform(a,b) +#define IDirect3DDevice2_GetTransform(p,a,b) (p)->GetTransform(a,b) +#define IDirect3DDevice2_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b) +#define IDirect3DDevice2_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e) +#define IDirect3DDevice2_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g) +#define IDirect3DDevice2_SetClipStatus(p,a) (p)->SetClipStatus(a) +#define IDirect3DDevice2_GetClipStatus(p,a) (p)->GetClipStatus(a) +#endif + +/***************************************************************************** + * IDirect3DDevice3 interface + */ +#define INTERFACE IDirect3DDevice3 +DECLARE_INTERFACE_(IDirect3DDevice3,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3DDevice3 methods ***/ + STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC lpD3DHWDevDesc, LPD3DDEVICEDESC lpD3DHELDevDesc) PURE; + STDMETHOD(GetStats)(THIS_ LPD3DSTATS lpD3DStats) PURE; + STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT3 lpDirect3DViewport3) PURE; + STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT3 lpDirect3DViewport3) PURE; + STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT3 lpDirect3DViewport3, LPDIRECT3DVIEWPORT3 *lplpDirect3DViewport3, DWORD dwFlags) PURE; + STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMPIXELFORMATSCALLBACK lpD3DEnumPixelProc, LPVOID lpArg) PURE; + STDMETHOD(BeginScene)(THIS) PURE; + STDMETHOD(EndScene)(THIS) PURE; + STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D3 *lplpDirect3D3) PURE; + /*** DrawPrimitive API ***/ + STDMETHOD(SetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT3 lpDirect3DViewport3) PURE; + STDMETHOD(GetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT3 *lplpDirect3DViewport3) PURE; + STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE4 lpNewRenderTarget, DWORD dwFlags) PURE; + STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE4 *lplpRenderTarget) PURE; + STDMETHOD(Begin)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,DWORD dwVertexTypeDesc, DWORD dwFlags) PURE; + STDMETHOD(BeginIndexed)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,DWORD d3dvtVertexType, LPVOID lpvVertices, DWORD dwNumVertices, DWORD dwFlags) PURE; + STDMETHOD(Vertex)(THIS_ LPVOID lpVertexType) PURE; + STDMETHOD(Index)(THIS_ WORD wVertexIndex) PURE; + STDMETHOD(End)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, LPDWORD lpdwRenderState) PURE; + STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, DWORD dwRenderState) PURE; + STDMETHOD(GetLightState)(THIS_ D3DLIGHTSTATETYPE dwLightStateType, LPDWORD lpdwLightState) PURE; + STDMETHOD(SetLightState)(THIS_ D3DLIGHTSTATETYPE dwLightStateType, DWORD dwLightState) PURE; + STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE; + STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE; + STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE; + STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, DWORD d3dvtVertexType, LPVOID lpvVertices, DWORD dwVertexCount, DWORD dwFlags) PURE; + STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, DWORD d3dvtVertexType, LPVOID lpvVertices, DWORD dwVertexCount, LPWORD dwIndices, DWORD dwIndexCount, DWORD dwFlags) PURE; + STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS lpD3DClipStatus) PURE; + STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS lpD3DClipStatus) PURE; + STDMETHOD(DrawPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,DWORD dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData,DWORD dwVertexCount,DWORD dwFlags) PURE; + STDMETHOD(DrawIndexedPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,DWORD dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData,DWORD dwVertexCount,LPWORD lpIndex,DWORD dwIndexCount,DWORD dwFlags) PURE; + STDMETHOD(DrawPrimitiveVB)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER lpD3DVertexBuf,DWORD dwStartVertex,DWORD dwNumVertices,DWORD dwFlags) PURE; + STDMETHOD(DrawIndexedPrimitiveVB)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER lpD3DVertexBuf,LPWORD lpwIndices,DWORD dwIndexCount,DWORD dwFlags) PURE; + STDMETHOD(ComputeSphereVisibility)(THIS_ LPD3DVECTOR lpCenters,LPD3DVALUE lpRadii,DWORD dwNumSpheres,DWORD dwFlags,LPDWORD lpdwReturnValues) PURE; + STDMETHOD(GetTexture)(THIS_ DWORD dwStage,LPDIRECT3DTEXTURE2 *lplpTexture2) PURE; + STDMETHOD(SetTexture)(THIS_ DWORD dwStage,LPDIRECT3DTEXTURE2 lpTexture2) PURE; + STDMETHOD(GetTextureStageState)(THIS_ DWORD dwStage,D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,LPDWORD lpdwState) PURE; + STDMETHOD(SetTextureStageState)(THIS_ DWORD dwStage,D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,DWORD dwState) PURE; + STDMETHOD(ValidateDevice)(THIS_ LPDWORD lpdwPasses) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3DDevice3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DDevice3_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DDevice3_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3DDevice3 methods ***/ +#define IDirect3DDevice3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) +#define IDirect3DDevice3_GetStats(p,a) (p)->lpVtbl->GetStats(p,a) +#define IDirect3DDevice3_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a) +#define IDirect3DDevice3_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a) +#define IDirect3DDevice3_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c) +#define IDirect3DDevice3_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b) +#define IDirect3DDevice3_BeginScene(p) (p)->lpVtbl->BeginScene(p) +#define IDirect3DDevice3_EndScene(p) (p)->lpVtbl->EndScene(p) +#define IDirect3DDevice3_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a) +#define IDirect3DDevice3_SetCurrentViewport(p,a) (p)->lpVtbl->SetCurrentViewport(p,a) +#define IDirect3DDevice3_GetCurrentViewport(p,a) (p)->lpVtbl->GetCurrentViewport(p,a) +#define IDirect3DDevice3_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b) +#define IDirect3DDevice3_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a) +#define IDirect3DDevice3_Begin(p,a,b,c) (p)->lpVtbl->Begin(p,a,b,c) +#define IDirect3DDevice3_BeginIndexed(p,a,b,c,d,e) (p)->lpVtbl->BeginIndexed(p,a,b,c,d,e) +#define IDirect3DDevice3_Vertex(p,a) (p)->lpVtbl->Vertex(p,a) +#define IDirect3DDevice3_Index(p,a) (p)->lpVtbl->Index(p,a) +#define IDirect3DDevice3_End(p,a) (p)->lpVtbl->End(p,a) +#define IDirect3DDevice3_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b) +#define IDirect3DDevice3_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b) +#define IDirect3DDevice3_GetLightState(p,a,b) (p)->lpVtbl->GetLightState(p,a,b) +#define IDirect3DDevice3_SetLightState(p,a,b) (p)->lpVtbl->SetLightState(p,a,b) +#define IDirect3DDevice3_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b) +#define IDirect3DDevice3_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b) +#define IDirect3DDevice3_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b) +#define IDirect3DDevice3_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e) +#define IDirect3DDevice3_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g) +#define IDirect3DDevice3_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a) +#define IDirect3DDevice3_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a) +#define IDirect3DDevice3_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveStrided(p,a,b,c,d,e) +#define IDirect3DDevice3_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) +#define IDirect3DDevice3_DrawPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveVB(p,a,b,c,d,e) +#define IDirect3DDevice3_DrawIndexedPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawIndexedPrimitiveVB(p,a,b,c,d,e) +#define IDirect3DDevice3_ComputeSphereVisibility(p,a,b,c,d,e) (p)->lpVtbl->ComputeSphereVisibility(p,a,b,c,d,e) +#define IDirect3DDevice3_GetTexture(p,a,b) (p)->lpVtbl->GetTexture(p,a,b) +#define IDirect3DDevice3_SetTexture(p,a,b) (p)->lpVtbl->SetTexture(p,a,b) +#define IDirect3DDevice3_GetTextureStageState(p,a,b,c) (p)->lpVtbl->GetTextureStageState(p,a,b,c) +#define IDirect3DDevice3_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureStageState(p,a,b,c) +#define IDirect3DDevice3_ValidateDevice(p,a) (p)->lpVtbl->ValidateDevice(p,a) +#else +/*** IUnknown methods ***/ +#define IDirect3DDevice3_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DDevice3_AddRef(p) (p)->AddRef() +#define IDirect3DDevice3_Release(p) (p)->Release() +/*** IDirect3DDevice3 methods ***/ +#define IDirect3DDevice3_GetCaps(p,a,b) (p)->GetCaps(a,b) +#define IDirect3DDevice3_GetStats(p,a) (p)->GetStats(a) +#define IDirect3DDevice3_AddViewport(p,a) (p)->AddViewport(a) +#define IDirect3DDevice3_DeleteViewport(p,a) (p)->DeleteViewport(a) +#define IDirect3DDevice3_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c) +#define IDirect3DDevice3_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b) +#define IDirect3DDevice3_BeginScene(p) (p)->BeginScene() +#define IDirect3DDevice3_EndScene(p) (p)->EndScene() +#define IDirect3DDevice3_GetDirect3D(p,a) (p)->GetDirect3D(a) +#define IDirect3DDevice3_SetCurrentViewport(p,a) (p)->SetCurrentViewport(a) +#define IDirect3DDevice3_GetCurrentViewport(p,a) (p)->GetCurrentViewport(a) +#define IDirect3DDevice3_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b) +#define IDirect3DDevice3_GetRenderTarget(p,a) (p)->GetRenderTarget(a) +#define IDirect3DDevice3_Begin(p,a,b,c) (p)->Begin(a,b,c) +#define IDirect3DDevice3_BeginIndexed(p,a,b,c,d,e) (p)->BeginIndexed(a,b,c,d,e) +#define IDirect3DDevice3_Vertex(p,a) (p)->Vertex(a) +#define IDirect3DDevice3_Index(p,a) (p)->Index(a) +#define IDirect3DDevice3_End(p,a) (p)->End(a) +#define IDirect3DDevice3_GetRenderState(p,a,b) (p)->GetRenderState(a,b) +#define IDirect3DDevice3_SetRenderState(p,a,b) (p)->SetRenderState(a,b) +#define IDirect3DDevice3_GetLightState(p,a,b) (p)->GetLightState(a,b) +#define IDirect3DDevice3_SetLightState(p,a,b) (p)->SetLightState(a,b) +#define IDirect3DDevice3_SetTransform(p,a,b) (p)->SetTransform(a,b) +#define IDirect3DDevice3_GetTransform(p,a,b) (p)->GetTransform(a,b) +#define IDirect3DDevice3_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b) +#define IDirect3DDevice3_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e) +#define IDirect3DDevice3_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g) +#define IDirect3DDevice3_SetClipStatus(p,a) (p)->SetClipStatus(a) +#define IDirect3DDevice3_GetClipStatus(p,a) (p)->GetClipStatus(a) +#define IDirect3DDevice3_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->DrawPrimitiveStrided(a,b,c,d,e) +#define IDirect3DDevice3_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveStrided(a,b,c,d,e,f,g) +#define IDirect3DDevice3_DrawPrimitiveVB(p,a,b,c,d,e) (p)->DrawPrimitiveVB(a,b,c,d,e) +#define IDirect3DDevice3_DrawIndexedPrimitiveVB(p,a,b,c,d,e) (p)->DrawIndexedPrimitiveVB(a,b,c,d,e) +#define IDirect3DDevice3_ComputeSphereVisibility(p,a,b,c,d,e) (p)->ComputeSphereVisibility(a,b,c,d,e) +#define IDirect3DDevice3_GetTexture(p,a,b) (p)->GetTexture(a,b) +#define IDirect3DDevice3_SetTexture(p,a,b) (p)->SetTexture(a,b) +#define IDirect3DDevice3_GetTextureStageState(p,a,b,c) (p)->GetTextureStageState(a,b,c) +#define IDirect3DDevice3_SetTextureStageState(p,a,b,c) (p)->SetTextureStageState(a,b,c) +#define IDirect3DDevice3_ValidateDevice(p,a) (p)->ValidateDevice(a) +#endif + +/***************************************************************************** + * IDirect3DDevice7 interface + */ +#define INTERFACE IDirect3DDevice7 +DECLARE_INTERFACE_(IDirect3DDevice7,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3DDevice7 methods ***/ + STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC7 lpD3DHELDevDesc) PURE; + STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMPIXELFORMATSCALLBACK lpD3DEnumPixelProc, LPVOID lpArg) PURE; + STDMETHOD(BeginScene)(THIS) PURE; + STDMETHOD(EndScene)(THIS) PURE; + STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D7 *lplpDirect3D3) PURE; + STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE7 lpNewRenderTarget,DWORD dwFlags) PURE; + STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE7 *lplpRenderTarget) PURE; + STDMETHOD(Clear)(THIS_ DWORD dwCount,LPD3DRECT lpRects,DWORD dwFlags,D3DCOLOR dwColor,D3DVALUE dvZ,DWORD dwStencil) PURE; + STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE; + STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE; + STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT7 lpData) PURE; + STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType,LPD3DMATRIX lpD3DMatrix) PURE; + STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT7 lpData) PURE; + STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL7 lpMat) PURE; + STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL7 lpMat) PURE; + STDMETHOD(SetLight)(THIS_ DWORD dwLightIndex,LPD3DLIGHT7 lpLight) PURE; + STDMETHOD(GetLight)(THIS_ DWORD dwLightIndex,LPD3DLIGHT7 lpLight) PURE; + STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, DWORD dwRenderState) PURE; + STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, LPDWORD lpdwRenderState) PURE; + STDMETHOD(BeginStateBlock)(THIS) PURE; + STDMETHOD(EndStateBlock)(THIS_ LPDWORD lpdwBlockHandle) PURE; + STDMETHOD(PreLoad)(THIS_ LPDIRECTDRAWSURFACE7 lpddsTexture) PURE; + STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, DWORD d3dvtVertexType, LPVOID lpvVertices, DWORD dwVertexCount, DWORD dwFlags) PURE; + STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, DWORD d3dvtVertexType, LPVOID lpvVertices, DWORD dwVertexCount, LPWORD dwIndices, DWORD dwIndexCount, DWORD dwFlags) PURE; + STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS lpD3DClipStatus) PURE; + STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS lpD3DClipStatus) PURE; + STDMETHOD(DrawPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,DWORD dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData,DWORD dwVertexCount,DWORD dwFlags) PURE; + STDMETHOD(DrawIndexedPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,DWORD dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData,DWORD dwVertexCount,LPWORD lpIndex,DWORD dwIndexCount,DWORD dwFlags) PURE; + STDMETHOD(DrawPrimitiveVB)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER7 lpD3DVertexBuf,DWORD dwStartVertex,DWORD dwNumVertices,DWORD dwFlags) PURE; + STDMETHOD(DrawIndexedPrimitiveVB)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER7 lpD3DVertexBuf,DWORD dwStartVertex,DWORD dwNumVertices,LPWORD lpwIndices,DWORD dwIndexCount,DWORD dwFlags) PURE; + STDMETHOD(ComputeSphereVisibility)(THIS_ LPD3DVECTOR lpCenters,LPD3DVALUE lpRadii,DWORD dwNumSpheres,DWORD dwFlags,LPDWORD lpdwReturnValues) PURE; + STDMETHOD(GetTexture)(THIS_ DWORD dwStage,LPDIRECTDRAWSURFACE7 *lpTexture) PURE; + STDMETHOD(SetTexture)(THIS_ DWORD dwStage,LPDIRECTDRAWSURFACE7 lpTexture) PURE; + STDMETHOD(GetTextureStageState)(THIS_ DWORD dwStage,D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,LPDWORD lpdwState) PURE; + STDMETHOD(SetTextureStageState)(THIS_ DWORD dwStage,D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,DWORD dwState) PURE; + STDMETHOD(ValidateDevice)(THIS_ LPDWORD lpdwPasses) PURE; + STDMETHOD(ApplyStateBlock)(THIS_ DWORD dwBlockHandle) PURE; + STDMETHOD(CaptureStateBlock)(THIS_ DWORD dwBlockHandle) PURE; + STDMETHOD(DeleteStateBlock)(THIS_ DWORD dwBlockHandle) PURE; + STDMETHOD(CreateStateBlock)(THIS_ D3DSTATEBLOCKTYPE d3dsbType,LPDWORD lpdwBlockHandle) PURE; + STDMETHOD(Load)(THIS_ LPDIRECTDRAWSURFACE7 lpDestTex,LPPOINT lpDestPoint,LPDIRECTDRAWSURFACE7 lpSrcTex,LPRECT lprcSrcRect,DWORD dwFlags) PURE; + STDMETHOD(LightEnable)(THIS_ DWORD dwLightIndex,BOOL bEnable) PURE; + STDMETHOD(GetLightEnable)(THIS_ DWORD dwLightIndex,BOOL *pbEnable) PURE; + STDMETHOD(SetClipPlane)(THIS_ DWORD dwIndex,D3DVALUE *pPlaneEquation) PURE; + STDMETHOD(GetClipPlane)(THIS_ DWORD dwIndex,D3DVALUE *pPlaneEquation) PURE; + STDMETHOD(GetInfo)(THIS_ DWORD dwDevInfoID,LPVOID pDevInfoStruct,DWORD dwSize) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3DDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DDevice7_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DDevice7_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3DDevice7 methods ***/ +#define IDirect3DDevice7_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirect3DDevice7_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b) +#define IDirect3DDevice7_BeginScene(p) (p)->lpVtbl->BeginScene(p) +#define IDirect3DDevice7_EndScene(p) (p)->lpVtbl->EndScene(p) +#define IDirect3DDevice7_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a) +#define IDirect3DDevice7_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b) +#define IDirect3DDevice7_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a) +#define IDirect3DDevice7_Clear(p,a,b,c,d,e,f) (p)->lpVtbl->Clear(p,a,b,c,d,e,f) +#define IDirect3DDevice7_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b) +#define IDirect3DDevice7_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b) +#define IDirect3DDevice7_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a) +#define IDirect3DDevice7_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b) +#define IDirect3DDevice7_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a) +#define IDirect3DDevice7_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a) +#define IDirect3DDevice7_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a) +#define IDirect3DDevice7_SetLight(p,a,b) (p)->lpVtbl->SetLight(p,a,b) +#define IDirect3DDevice7_GetLight(p,a,b) (p)->lpVtbl->GetLight(p,a,b) +#define IDirect3DDevice7_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b) +#define IDirect3DDevice7_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b) +#define IDirect3DDevice7_BeginStateBlock(p) (p)->lpVtbl->BeginStateBlock(p) +#define IDirect3DDevice7_EndStateBlock(p,a) (p)->lpVtbl->EndStateBlock(p,a) +#define IDirect3DDevice7_PreLoad(p,a) (p)->lpVtbl->PreLoad(p,a) +#define IDirect3DDevice7_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e) +#define IDirect3DDevice7_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g) +#define IDirect3DDevice7_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a) +#define IDirect3DDevice7_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a) +#define IDirect3DDevice7_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveStrided(p,a,b,c,d,e) +#define IDirect3DDevice7_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) +#define IDirect3DDevice7_DrawPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveVB(p,a,b,c,d,e) +#define IDirect3DDevice7_DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g) +#define IDirect3DDevice7_ComputeSphereVisibility(p,a,b,c,d,e) (p)->lpVtbl->ComputeSphereVisibility(p,a,b,c,d,e) +#define IDirect3DDevice7_GetTexture(p,a,b) (p)->lpVtbl->GetTexture(p,a,b) +#define IDirect3DDevice7_SetTexture(p,a,b) (p)->lpVtbl->SetTexture(p,a,b) +#define IDirect3DDevice7_GetTextureStageState(p,a,b,c) (p)->lpVtbl->GetTextureStageState(p,a,b,c) +#define IDirect3DDevice7_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureStageState(p,a,b,c) +#define IDirect3DDevice7_ValidateDevice(p,a) (p)->lpVtbl->ValidateDevice(p,a) +#define IDirect3DDevice7_ApplyStateBlock(p,a) (p)->lpVtbl->ApplyStateBlock(p,a) +#define IDirect3DDevice7_CaptureStateBlock(p,a) (p)->lpVtbl->CaptureStateBlock(p,a) +#define IDirect3DDevice7_DeleteStateBlock(p,a) (p)->lpVtbl->DeleteStateBlock(p,a) +#define IDirect3DDevice7_CreateStateBlock(p,a,b) (p)->lpVtbl->CreateStateBlock(p,a,b) +#define IDirect3DDevice7_Load(p,a,b,c,d,e) (p)->lpVtbl->Load(p,a,b,c,d,e) +#define IDirect3DDevice7_LightEnable(p,a,b) (p)->lpVtbl->LightEnable(p,a,b) +#define IDirect3DDevice7_GetLightEnable(p,a,b) (p)->lpVtbl->GetLightEnable(p,a,b) +#define IDirect3DDevice7_SetClipPlane(p,a,b) (p)->lpVtbl->SetClipPlane(p,a,b) +#define IDirect3DDevice7_GetClipPlane(p,a,b) (p)->lpVtbl->GetClipPlane(p,a,b) +#define IDirect3DDevice7_GetInfo(p,a,b,c) (p)->lpVtbl->GetInfo(p,a,b,c) +#else +/*** IUnknown methods ***/ +#define IDirect3DDevice7_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DDevice7_AddRef(p) (p)->AddRef() +#define IDirect3DDevice7_Release(p) (p)->Release() +/*** IDirect3DDevice7 methods ***/ +#define IDirect3DDevice7_GetCaps(p,a) (p)->GetCaps(a) +#define IDirect3DDevice7_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b) +#define IDirect3DDevice7_BeginScene(p) (p)->BeginScene() +#define IDirect3DDevice7_EndScene(p) (p)->EndScene() +#define IDirect3DDevice7_GetDirect3D(p,a) (p)->GetDirect3D(a) +#define IDirect3DDevice7_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b) +#define IDirect3DDevice7_GetRenderTarget(p,a) (p)->GetRenderTarget(a) +#define IDirect3DDevice7_Clear(p,a,b,c,d,e,f) (p)->Clear(a,b,c,d,e,f) +#define IDirect3DDevice7_SetTransform(p,a,b) (p)->SetTransform(a,b) +#define IDirect3DDevice7_GetTransform(p,a,b) (p)->GetTransform(a,b) +#define IDirect3DDevice7_SetViewport(p,a) (p)->SetViewport(a) +#define IDirect3DDevice7_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b) +#define IDirect3DDevice7_GetViewport(p,a) (p)->GetViewport(a) +#define IDirect3DDevice7_SetMaterial(p,a) (p)->SetMaterial(a) +#define IDirect3DDevice7_GetMaterial(p,a) (p)->GetMaterial(a) +#define IDirect3DDevice7_SetLight(p,a,b) (p)->SetLight(a,b) +#define IDirect3DDevice7_GetLight(p,a,b) (p)->GetLight(a,b) +#define IDirect3DDevice7_SetRenderState(p,a,b) (p)->SetRenderState(a,b) +#define IDirect3DDevice7_GetRenderState(p,a,b) (p)->GetRenderState(a,b) +#define IDirect3DDevice7_BeginStateBlock(p) (p)->BeginStateBlock() +#define IDirect3DDevice7_EndStateBlock(p,a) (p)->EndStateBlock(a) +#define IDirect3DDevice7_PreLoad(p,a) (p)->PreLoad(a) +#define IDirect3DDevice7_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e) +#define IDirect3DDevice7_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g) +#define IDirect3DDevice7_SetClipStatus(p,a) (p)->SetClipStatus(a) +#define IDirect3DDevice7_GetClipStatus(p,a) (p)->GetClipStatus(a) +#define IDirect3DDevice7_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->DrawPrimitiveStrided(a,b,c,d,e) +#define IDirect3DDevice7_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveStrided(a,b,c,d,e,f,g) +#define IDirect3DDevice7_DrawPrimitiveVB(p,a,b,c,d,e) (p)->DrawPrimitiveVB(a,b,c,d,e) +#define IDirect3DDevice7_DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveVB(a,b,c,d,e,f,g) +#define IDirect3DDevice7_ComputeSphereVisibility(p,a,b,c,d,e) (p)->ComputeSphereVisibility(a,b,c,d,e) +#define IDirect3DDevice7_GetTexture(p,a,b) (p)->GetTexture(a,b) +#define IDirect3DDevice7_SetTexture(p,a,b) (p)->SetTexture(a,b) +#define IDirect3DDevice7_GetTextureStageState(p,a,b,c) (p)->GetTextureStageState(a,b,c) +#define IDirect3DDevice7_SetTextureStageState(p,a,b,c) (p)->SetTextureStageState(a,b,c) +#define IDirect3DDevice7_ValidateDevice(p,a) (p)->ValidateDevice(a) +#define IDirect3DDevice7_ApplyStateBlock(p,a) (p)->ApplyStateBlock(a) +#define IDirect3DDevice7_CaptureStateBlock(p,a) (p)->CaptureStateBlock(a) +#define IDirect3DDevice7_DeleteStateBlock(p,a) (p)->DeleteStateBlock(a) +#define IDirect3DDevice7_CreateStateBlock(p,a,b) (p)->CreateStateBlock(a,b) +#define IDirect3DDevice7_Load(p,a,b,c,d,e) (p)->Load(a,b,c,d,e) +#define IDirect3DDevice7_LightEnable(p,a,b) (p)->LightEnable(a,b) +#define IDirect3DDevice7_GetLightEnable(p,a,b) (p)->GetLightEnable(a,b) +#define IDirect3DDevice7_SetClipPlane(p,a,b) (p)->SetClipPlane(a,b) +#define IDirect3DDevice7_GetClipPlane(p,a,b) (p)->GetClipPlane(a,b) +#define IDirect3DDevice7_GetInfo(p,a,b,c) (p)->GetInfo(a,b,c) +#endif + + + +/***************************************************************************** + * IDirect3DVertexBuffer interface + */ +#define INTERFACE IDirect3DVertexBuffer +DECLARE_INTERFACE_(IDirect3DVertexBuffer,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3DVertexBuffer methods ***/ + STDMETHOD(Lock)(THIS_ DWORD dwFlags,LPVOID *lplpData,LPDWORD lpdwSize) PURE; + STDMETHOD(Unlock)(THIS) PURE; + STDMETHOD(ProcessVertices)(THIS_ DWORD dwVertexOp,DWORD dwDestIndex,DWORD dwCount,LPDIRECT3DVERTEXBUFFER lpSrcBuffer,DWORD dwSrcIndex,LPDIRECT3DDEVICE3 lpD3DDevice,DWORD dwFlags) PURE; + STDMETHOD(GetVertexBufferDesc)(THIS_ LPD3DVERTEXBUFFERDESC lpD3DVertexBufferDesc) PURE; + STDMETHOD(Optimize)(THIS_ LPDIRECT3DDEVICE3 lpD3DDevice,DWORD dwFlags) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3DVertexBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DVertexBuffer_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DVertexBuffer_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3DVertexBuffer methods ***/ +#define IDirect3DVertexBuffer_Lock(p,a,b,c) (p)->lpVtbl->Lock(p,a,b,c) +#define IDirect3DVertexBuffer_Unlock(p) (p)->lpVtbl->Unlock(p) +#define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f,g) +#define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a) (p)->lpVtbl->GetVertexBufferDesc(p,a) +#define IDirect3DVertexBuffer_Optimize(p,a,b) (p)->lpVtbl->Optimize(p,a,b) +#else +/*** IUnknown methods ***/ +#define IDirect3DVertexBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DVertexBuffer_AddRef(p) (p)->AddRef() +#define IDirect3DVertexBuffer_Release(p) (p)->Release() +/*** IDirect3DVertexBuffer methods ***/ +#define IDirect3DVertexBuffer_Lock(p,a,b,c) (p)->Lock(a,b,c) +#define IDirect3DVertexBuffer_Unlock(p) (p)->Unlock() +#define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) (p)->ProcessVertices(a,b,c,d,e,f,g) +#define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a) (p)->GetVertexBufferDesc(a) +#define IDirect3DVertexBuffer_Optimize(p,a,b) (p)->Optimize(a,b) +#endif + +/***************************************************************************** + * IDirect3DVertexBuffer7 interface + */ +#define INTERFACE IDirect3DVertexBuffer7 +DECLARE_INTERFACE_(IDirect3DVertexBuffer7,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3DVertexBuffer7 methods ***/ + STDMETHOD(Lock)(THIS_ DWORD dwFlags,LPVOID *lplpData,LPDWORD lpdwSize) PURE; + STDMETHOD(Unlock)(THIS) PURE; + STDMETHOD(ProcessVertices)(THIS_ DWORD dwVertexOp,DWORD dwDestIndex,DWORD dwCount,LPDIRECT3DVERTEXBUFFER7 lpSrcBuffer,DWORD dwSrcIndex,LPDIRECT3DDEVICE7 lpD3DDevice,DWORD dwFlags) PURE; + STDMETHOD(GetVertexBufferDesc)(THIS_ LPD3DVERTEXBUFFERDESC lpD3DVertexBufferDesc) PURE; + STDMETHOD(Optimize)(THIS_ LPDIRECT3DDEVICE7 lpD3DDevice,DWORD dwFlags) PURE; + STDMETHOD(ProcessVerticesStrided)(THIS_ DWORD dwVertexOp,DWORD dwDestIndex,DWORD dwCount,LPD3DDRAWPRIMITIVESTRIDEDDATA lpStrideData,DWORD dwVertexTypeDesc,LPDIRECT3DDEVICE7 lpD3DDevice,DWORD dwFlags) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3DVertexBuffer7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DVertexBuffer7_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DVertexBuffer7_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3DVertexBuffer7 methods ***/ +#define IDirect3DVertexBuffer7_Lock(p,a,b,c) (p)->lpVtbl->Lock(p,a,b,c) +#define IDirect3DVertexBuffer7_Unlock(p) (p)->lpVtbl->Unlock(p) +#define IDirect3DVertexBuffer7_ProcessVertices(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f,g) +#define IDirect3DVertexBuffer7_GetVertexBufferDesc(p,a) (p)->lpVtbl->GetVertexBufferDesc(p,a) +#define IDirect3DVertexBuffer7_Optimize(p,a,b) (p)->lpVtbl->Optimize(p,a,b) +#define IDirect3DVertexBuffer7_ProcessVerticesStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVerticesStrided(p,a,b,c,d,e,f,g) +#else +/*** IUnknown methods ***/ +#define IDirect3DVertexBuffer7_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DVertexBuffer7_AddRef(p) (p)->AddRef() +#define IDirect3DVertexBuffer7_Release(p) (p)->Release() +/*** IDirect3DVertexBuffer7 methods ***/ +#define IDirect3DVertexBuffer7_Lock(p,a,b,c) (p)->Lock(a,b,c) +#define IDirect3DVertexBuffer7_Unlock(p) (p)->Unlock() +#define IDirect3DVertexBuffer7_ProcessVertices(p,a,b,c,d,e,f,g) (p)->ProcessVertices(a,b,c,d,e,f,g) +#define IDirect3DVertexBuffer7_GetVertexBufferDesc(p,a) (p)->GetVertexBufferDesc(a) +#define IDirect3DVertexBuffer7_Optimize(p,a,b) (p)->Optimize(a,b) +#define IDirect3DVertexBuffer7_ProcessVerticesStrided(p,a,b,c,d,e,f,g) (p)->ProcessVerticesStrided(a,b,c,d,e,f,g) +#endif + +#endif /* __WINE_D3D_H */ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/d3dtypes.h pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/d3dtypes.h --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/d3dtypes.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/d3dtypes.h 2016-06-30 16:53:26.000000000 +0000 @@ -0,0 +1,1361 @@ +/* + * Copyright (C) 2000 Peter Hunnisett + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* FIXME: Need to add C++ code for certain structs for headers - this is going to be a problem + if WINE continues to only use C code - I suppose that we could always inline in + the header file to get around that little problem... */ +/* FIXME: We need to implement versioning on everything directx 5 and up if these headers + are going to be generically useful for directx stuff */ + +#ifndef __WINE_D3DTYPES_H +#define __WINE_D3DTYPES_H + +#ifndef __WINESRC__ +# include +#endif + +#include +#include + +#define D3DVALP(val, prec) ((float)(val)) +#define D3DVAL(val) ((float)(val)) +#define D3DDivide(a, b) (float)((double) (a) / (double) (b)) +#define D3DMultiply(a, b) ((a) * (b)) + +typedef LONG D3DFIXED; + + +#ifndef RGB_MAKE +#define CI_GETALPHA(ci) ((ci) >> 24) +#define CI_GETINDEX(ci) (((ci) >> 8) & 0xffff) +#define CI_GETFRACTION(ci) ((ci) & 0xff) +#define CI_ROUNDINDEX(ci) CI_GETINDEX((ci) + 0x80) +#define CI_MASKALPHA(ci) ((ci) & 0xffffff) +#define CI_MAKE(a, i, f) (((a) << 24) | ((i) << 8) | (f)) + +#define RGBA_GETALPHA(rgb) ((rgb) >> 24) +#define RGBA_GETRED(rgb) (((rgb) >> 16) & 0xff) +#define RGBA_GETGREEN(rgb) (((rgb) >> 8) & 0xff) +#define RGBA_GETBLUE(rgb) ((rgb) & 0xff) +#define RGBA_MAKE(r, g, b, a) ((D3DCOLOR) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b))) + +#define D3DRGB(r, g, b) \ + (0xff000000 | ( ((LONG)((r) * 255)) << 16) | (((LONG)((g) * 255)) << 8) | (LONG)((b) * 255)) +#define D3DRGBA(r, g, b, a) \ + ( (((LONG)((a) * 255)) << 24) | (((LONG)((r) * 255)) << 16) \ + | (((LONG)((g) * 255)) << 8) | (LONG)((b) * 255) \ + ) + +#define RGB_GETRED(rgb) (((rgb) >> 16) & 0xff) +#define RGB_GETGREEN(rgb) (((rgb) >> 8) & 0xff) +#define RGB_GETBLUE(rgb) ((rgb) & 0xff) +#define RGBA_SETALPHA(rgba, x) (((x) << 24) | ((rgba) & 0x00ffffff)) +#define RGB_MAKE(r, g, b) ((D3DCOLOR) (((r) << 16) | ((g) << 8) | (b))) +#define RGBA_TORGB(rgba) ((D3DCOLOR) ((rgba) & 0xffffff)) +#define RGB_TORGBA(rgb) ((D3DCOLOR) ((rgb) | 0xff000000)) + +#endif + +#define D3DENUMRET_CANCEL DDENUMRET_CANCEL +#define D3DENUMRET_OK DDENUMRET_OK + +typedef HRESULT (CALLBACK *LPD3DVALIDATECALLBACK)(LPVOID lpUserArg, DWORD dwOffset); +typedef HRESULT (CALLBACK *LPD3DENUMTEXTUREFORMATSCALLBACK)(LPDDSURFACEDESC lpDdsd, LPVOID lpContext); +typedef HRESULT (CALLBACK *LPD3DENUMPIXELFORMATSCALLBACK)(LPDDPIXELFORMAT lpDDPixFmt, LPVOID lpContext); + +#ifndef DX_SHARED_DEFINES + +typedef float D3DVALUE,*LPD3DVALUE; + +#ifndef D3DCOLOR_DEFINED +typedef DWORD D3DCOLOR, *LPD3DCOLOR; +#define D3DCOLOR_DEFINED +#endif + +#ifndef D3DVECTOR_DEFINED +typedef struct _D3DVECTOR { + union { + D3DVALUE x; + D3DVALUE dvX; + } DUMMYUNIONNAME1; + union { + D3DVALUE y; + D3DVALUE dvY; + } DUMMYUNIONNAME2; + union { + D3DVALUE z; + D3DVALUE dvZ; + } DUMMYUNIONNAME3; +#if defined(__cplusplus) && defined(D3D_OVERLOADS) + /* the definitions for these methods are in d3dvec.inl */ +public: + /*** constructors ***/ + _D3DVECTOR() {} + _D3DVECTOR(D3DVALUE f); + _D3DVECTOR(D3DVALUE _x, D3DVALUE _y, D3DVALUE _z); + _D3DVECTOR(const D3DVALUE f[3]); + + /*** assignment operators ***/ + _D3DVECTOR& operator += (const _D3DVECTOR& v); + _D3DVECTOR& operator -= (const _D3DVECTOR& v); + _D3DVECTOR& operator *= (const _D3DVECTOR& v); + _D3DVECTOR& operator /= (const _D3DVECTOR& v); + _D3DVECTOR& operator *= (D3DVALUE s); + _D3DVECTOR& operator /= (D3DVALUE s); + + /*** unary operators ***/ + friend _D3DVECTOR operator + (const _D3DVECTOR& v); + friend _D3DVECTOR operator - (const _D3DVECTOR& v); + + /*** binary operators ***/ + friend _D3DVECTOR operator + (const _D3DVECTOR& v1, const _D3DVECTOR& v2); + friend _D3DVECTOR operator - (const _D3DVECTOR& v1, const _D3DVECTOR& v2); + + friend _D3DVECTOR operator * (const _D3DVECTOR& v, D3DVALUE s); + friend _D3DVECTOR operator * (D3DVALUE s, const _D3DVECTOR& v); + friend _D3DVECTOR operator / (const _D3DVECTOR& v, D3DVALUE s); + + friend D3DVALUE SquareMagnitude(const _D3DVECTOR& v); + friend D3DVALUE Magnitude(const _D3DVECTOR& v); + + friend _D3DVECTOR Normalize(const _D3DVECTOR& v); + + friend D3DVALUE DotProduct(const _D3DVECTOR& v1, const _D3DVECTOR& v2); + friend _D3DVECTOR CrossProduct(const _D3DVECTOR& v1, const _D3DVECTOR& v2); +#endif +} D3DVECTOR,*LPD3DVECTOR; +#define D3DVECTOR_DEFINED +#endif + +#define DX_SHARED_DEFINES +#endif /* DX_SHARED_DEFINES */ + +typedef DWORD D3DMATERIALHANDLE, *LPD3DMATERIALHANDLE; +typedef DWORD D3DTEXTUREHANDLE, *LPD3DTEXTUREHANDLE; +typedef DWORD D3DMATRIXHANDLE, *LPD3DMATRIXHANDLE; + +typedef struct _D3DCOLORVALUE { + union { + D3DVALUE r; + D3DVALUE dvR; + } DUMMYUNIONNAME1; + union { + D3DVALUE g; + D3DVALUE dvG; + } DUMMYUNIONNAME2; + union { + D3DVALUE b; + D3DVALUE dvB; + } DUMMYUNIONNAME3; + union { + D3DVALUE a; + D3DVALUE dvA; + } DUMMYUNIONNAME4; +} D3DCOLORVALUE,*LPD3DCOLORVALUE; + +typedef struct _D3DRECT { + union { + LONG x1; + LONG lX1; + } DUMMYUNIONNAME1; + union { + LONG y1; + LONG lY1; + } DUMMYUNIONNAME2; + union { + LONG x2; + LONG lX2; + } DUMMYUNIONNAME3; + union { + LONG y2; + LONG lY2; + } DUMMYUNIONNAME4; +} D3DRECT, *LPD3DRECT; + +typedef struct _D3DHVERTEX { + DWORD dwFlags; + union { + D3DVALUE hx; + D3DVALUE dvHX; + } DUMMYUNIONNAME1; + union { + D3DVALUE hy; + D3DVALUE dvHY; + } DUMMYUNIONNAME2; + union { + D3DVALUE hz; + D3DVALUE dvHZ; + } DUMMYUNIONNAME3; +} D3DHVERTEX, *LPD3DHVERTEX; + +/* + * Transformed/lit vertices + */ +typedef struct _D3DTLVERTEX { + union { + D3DVALUE sx; + D3DVALUE dvSX; + } DUMMYUNIONNAME1; + union { + D3DVALUE sy; + D3DVALUE dvSY; + } DUMMYUNIONNAME2; + union { + D3DVALUE sz; + D3DVALUE dvSZ; + } DUMMYUNIONNAME3; + union { + D3DVALUE rhw; + D3DVALUE dvRHW; + } DUMMYUNIONNAME4; + union { + D3DCOLOR color; + D3DCOLOR dcColor; + } DUMMYUNIONNAME5; + union { + D3DCOLOR specular; + D3DCOLOR dcSpecular; + } DUMMYUNIONNAME6; + union { + D3DVALUE tu; + D3DVALUE dvTU; + } DUMMYUNIONNAME7; + union { + D3DVALUE tv; + D3DVALUE dvTV; + } DUMMYUNIONNAME8; +#if defined(__cplusplus) && defined(D3D_OVERLOADS) +public: + _D3DTLVERTEX() {} + _D3DTLVERTEX(const D3DVECTOR& v, float _rhw, D3DCOLOR _color, D3DCOLOR _specular, float _tu, float _tv) { + sx = v.x; sy = v.y; sz = v.z; rhw = _rhw; + color = _color; specular = _specular; + tu = _tu; tv = _tv; + } +#endif +} D3DTLVERTEX, *LPD3DTLVERTEX; + +typedef struct _D3DLVERTEX { + union { + D3DVALUE x; + D3DVALUE dvX; + } DUMMYUNIONNAME1; + union { + D3DVALUE y; + D3DVALUE dvY; + } DUMMYUNIONNAME2; + union { + D3DVALUE z; + D3DVALUE dvZ; + } DUMMYUNIONNAME3; + DWORD dwReserved; + union { + D3DCOLOR color; + D3DCOLOR dcColor; + } DUMMYUNIONNAME4; + union { + D3DCOLOR specular; + D3DCOLOR dcSpecular; + } DUMMYUNIONNAME5; + union { + D3DVALUE tu; + D3DVALUE dvTU; + } DUMMYUNIONNAME6; + union { + D3DVALUE tv; + D3DVALUE dvTV; + } DUMMYUNIONNAME7; +} D3DLVERTEX, *LPD3DLVERTEX; + +typedef struct _D3DVERTEX { + union { + D3DVALUE x; + D3DVALUE dvX; + } DUMMYUNIONNAME1; + union { + D3DVALUE y; + D3DVALUE dvY; + } DUMMYUNIONNAME2; + union { + D3DVALUE z; + D3DVALUE dvZ; + } DUMMYUNIONNAME3; + union { + D3DVALUE nx; + D3DVALUE dvNX; + } DUMMYUNIONNAME4; + union { + D3DVALUE ny; + D3DVALUE dvNY; + } DUMMYUNIONNAME5; + union { + D3DVALUE nz; + D3DVALUE dvNZ; + } DUMMYUNIONNAME6; + union { + D3DVALUE tu; + D3DVALUE dvTU; + } DUMMYUNIONNAME7; + union { + D3DVALUE tv; + D3DVALUE dvTV; + } DUMMYUNIONNAME8; +#if defined(__cplusplus) && defined(D3D_OVERLOADS) +public: + _D3DVERTEX() {} + _D3DVERTEX(const D3DVECTOR& v, const D3DVECTOR& n, float _tu, float _tv) { + x = v.x; y = v.y; z = v.z; + nx = n.x; ny = n.y; nz = n.z; + tu = _tu; tv = _tv; + } +#endif +} D3DVERTEX, *LPD3DVERTEX; + +typedef struct _D3DMATRIX { + D3DVALUE _11, _12, _13, _14; + D3DVALUE _21, _22, _23, _24; + D3DVALUE _31, _32, _33, _34; + D3DVALUE _41, _42, _43, _44; +#if defined(__cplusplus) && defined(D3D_OVERLOADS) + _D3DMATRIX() { } + + /* This is different from MS, but avoids anonymous structs. */ + D3DVALUE &operator () (int r, int c) + { return ((D3DVALUE [4][4])&_11)[r][c]; } + const D3DVALUE &operator() (int r, int c) const + { return ((const D3DVALUE [4][4])&_11)[r][c]; } +#endif +} D3DMATRIX, *LPD3DMATRIX; + +#if defined(__cplusplus) && defined(D3D_OVERLOADS) +#include +#endif + +typedef struct _D3DVIEWPORT { + DWORD dwSize; + DWORD dwX; + DWORD dwY; + DWORD dwWidth; + DWORD dwHeight; + D3DVALUE dvScaleX; + D3DVALUE dvScaleY; + D3DVALUE dvMaxX; + D3DVALUE dvMaxY; + D3DVALUE dvMinZ; + D3DVALUE dvMaxZ; +} D3DVIEWPORT, *LPD3DVIEWPORT; + +typedef struct _D3DVIEWPORT2 { + DWORD dwSize; + DWORD dwX; + DWORD dwY; + DWORD dwWidth; + DWORD dwHeight; + D3DVALUE dvClipX; + D3DVALUE dvClipY; + D3DVALUE dvClipWidth; + D3DVALUE dvClipHeight; + D3DVALUE dvMinZ; + D3DVALUE dvMaxZ; +} D3DVIEWPORT2, *LPD3DVIEWPORT2; + +typedef struct _D3DVIEWPORT7 { + DWORD dwX; + DWORD dwY; + DWORD dwWidth; + DWORD dwHeight; + D3DVALUE dvMinZ; + D3DVALUE dvMaxZ; +} D3DVIEWPORT7, *LPD3DVIEWPORT7; + +#define D3DMAXUSERCLIPPLANES 32 + +#define D3DCLIPPLANE0 (1 << 0) +#define D3DCLIPPLANE1 (1 << 1) +#define D3DCLIPPLANE2 (1 << 2) +#define D3DCLIPPLANE3 (1 << 3) +#define D3DCLIPPLANE4 (1 << 4) +#define D3DCLIPPLANE5 (1 << 5) + +#define D3DCLIP_LEFT 0x00000001 +#define D3DCLIP_RIGHT 0x00000002 +#define D3DCLIP_TOP 0x00000004 +#define D3DCLIP_BOTTOM 0x00000008 +#define D3DCLIP_FRONT 0x00000010 +#define D3DCLIP_BACK 0x00000020 +#define D3DCLIP_GEN0 0x00000040 +#define D3DCLIP_GEN1 0x00000080 +#define D3DCLIP_GEN2 0x00000100 +#define D3DCLIP_GEN3 0x00000200 +#define D3DCLIP_GEN4 0x00000400 +#define D3DCLIP_GEN5 0x00000800 + +#define D3DSTATUS_CLIPUNIONLEFT D3DCLIP_LEFT +#define D3DSTATUS_CLIPUNIONRIGHT D3DCLIP_RIGHT +#define D3DSTATUS_CLIPUNIONTOP D3DCLIP_TOP +#define D3DSTATUS_CLIPUNIONBOTTOM D3DCLIP_BOTTOM +#define D3DSTATUS_CLIPUNIONFRONT D3DCLIP_FRONT +#define D3DSTATUS_CLIPUNIONBACK D3DCLIP_BACK +#define D3DSTATUS_CLIPUNIONGEN0 D3DCLIP_GEN0 +#define D3DSTATUS_CLIPUNIONGEN1 D3DCLIP_GEN1 +#define D3DSTATUS_CLIPUNIONGEN2 D3DCLIP_GEN2 +#define D3DSTATUS_CLIPUNIONGEN3 D3DCLIP_GEN3 +#define D3DSTATUS_CLIPUNIONGEN4 D3DCLIP_GEN4 +#define D3DSTATUS_CLIPUNIONGEN5 D3DCLIP_GEN5 + +#define D3DSTATUS_CLIPINTERSECTIONLEFT 0x00001000 +#define D3DSTATUS_CLIPINTERSECTIONRIGHT 0x00002000 +#define D3DSTATUS_CLIPINTERSECTIONTOP 0x00004000 +#define D3DSTATUS_CLIPINTERSECTIONBOTTOM 0x00008000 +#define D3DSTATUS_CLIPINTERSECTIONFRONT 0x00010000 +#define D3DSTATUS_CLIPINTERSECTIONBACK 0x00020000 +#define D3DSTATUS_CLIPINTERSECTIONGEN0 0x00040000 +#define D3DSTATUS_CLIPINTERSECTIONGEN1 0x00080000 +#define D3DSTATUS_CLIPINTERSECTIONGEN2 0x00100000 +#define D3DSTATUS_CLIPINTERSECTIONGEN3 0x00200000 +#define D3DSTATUS_CLIPINTERSECTIONGEN4 0x00400000 +#define D3DSTATUS_CLIPINTERSECTIONGEN5 0x00800000 +#define D3DSTATUS_ZNOTVISIBLE 0x01000000 + +#define D3DSTATUS_CLIPUNIONALL ( \ + D3DSTATUS_CLIPUNIONLEFT | \ + D3DSTATUS_CLIPUNIONRIGHT | \ + D3DSTATUS_CLIPUNIONTOP | \ + D3DSTATUS_CLIPUNIONBOTTOM | \ + D3DSTATUS_CLIPUNIONFRONT | \ + D3DSTATUS_CLIPUNIONBACK | \ + D3DSTATUS_CLIPUNIONGEN0 | \ + D3DSTATUS_CLIPUNIONGEN1 | \ + D3DSTATUS_CLIPUNIONGEN2 | \ + D3DSTATUS_CLIPUNIONGEN3 | \ + D3DSTATUS_CLIPUNIONGEN4 | \ + D3DSTATUS_CLIPUNIONGEN5 \ + ) + +#define D3DSTATUS_CLIPINTERSECTIONALL ( \ + D3DSTATUS_CLIPINTERSECTIONLEFT | \ + D3DSTATUS_CLIPINTERSECTIONRIGHT | \ + D3DSTATUS_CLIPINTERSECTIONTOP | \ + D3DSTATUS_CLIPINTERSECTIONBOTTOM | \ + D3DSTATUS_CLIPINTERSECTIONFRONT | \ + D3DSTATUS_CLIPINTERSECTIONBACK | \ + D3DSTATUS_CLIPINTERSECTIONGEN0 | \ + D3DSTATUS_CLIPINTERSECTIONGEN1 | \ + D3DSTATUS_CLIPINTERSECTIONGEN2 | \ + D3DSTATUS_CLIPINTERSECTIONGEN3 | \ + D3DSTATUS_CLIPINTERSECTIONGEN4 | \ + D3DSTATUS_CLIPINTERSECTIONGEN5 \ + ) + +#define D3DSTATUS_DEFAULT ( \ + D3DSTATUS_CLIPINTERSECTIONALL | \ + D3DSTATUS_ZNOTVISIBLE) + +#define D3DTRANSFORM_CLIPPED 0x00000001 +#define D3DTRANSFORM_UNCLIPPED 0x00000002 + +typedef struct _D3DTRANSFORMDATA { + DWORD dwSize; + LPVOID lpIn; + DWORD dwInSize; + LPVOID lpOut; + DWORD dwOutSize; + LPD3DHVERTEX lpHOut; + DWORD dwClip; + DWORD dwClipIntersection; + DWORD dwClipUnion; + D3DRECT drExtent; +} D3DTRANSFORMDATA, *LPD3DTRANSFORMDATA; + +typedef struct _D3DLIGHTINGELEMENT { + D3DVECTOR dvPosition; + D3DVECTOR dvNormal; +} D3DLIGHTINGELEMENT, *LPD3DLIGHTINGELEMENT; + +typedef struct _D3DMATERIAL { + DWORD dwSize; + union { + D3DCOLORVALUE diffuse; + D3DCOLORVALUE dcvDiffuse; + } DUMMYUNIONNAME; + union { + D3DCOLORVALUE ambient; + D3DCOLORVALUE dcvAmbient; + } DUMMYUNIONNAME1; + union { + D3DCOLORVALUE specular; + D3DCOLORVALUE dcvSpecular; + } DUMMYUNIONNAME2; + union { + D3DCOLORVALUE emissive; + D3DCOLORVALUE dcvEmissive; + } DUMMYUNIONNAME3; + union { + D3DVALUE power; + D3DVALUE dvPower; + } DUMMYUNIONNAME4; + D3DTEXTUREHANDLE hTexture; + DWORD dwRampSize; +} D3DMATERIAL, *LPD3DMATERIAL; + +typedef struct _D3DMATERIAL7 { + union { + D3DCOLORVALUE diffuse; + D3DCOLORVALUE dcvDiffuse; + } DUMMYUNIONNAME; + union { + D3DCOLORVALUE ambient; + D3DCOLORVALUE dcvAmbient; + } DUMMYUNIONNAME1; + union { + D3DCOLORVALUE specular; + D3DCOLORVALUE dcvSpecular; + } DUMMYUNIONNAME2; + union { + D3DCOLORVALUE emissive; + D3DCOLORVALUE dcvEmissive; + } DUMMYUNIONNAME3; + union { + D3DVALUE power; + D3DVALUE dvPower; + } DUMMYUNIONNAME4; +} D3DMATERIAL7, *LPD3DMATERIAL7; + +typedef enum { + D3DLIGHT_POINT = 1, + D3DLIGHT_SPOT = 2, + D3DLIGHT_DIRECTIONAL = 3, + D3DLIGHT_PARALLELPOINT = 4, + D3DLIGHT_GLSPOT = 5, + D3DLIGHT_FORCE_DWORD = 0x7fffffff +} D3DLIGHTTYPE; + +typedef struct _D3DLIGHT { + DWORD dwSize; + D3DLIGHTTYPE dltType; + D3DCOLORVALUE dcvColor; + D3DVECTOR dvPosition; + D3DVECTOR dvDirection; + D3DVALUE dvRange; + D3DVALUE dvFalloff; + D3DVALUE dvAttenuation0; + D3DVALUE dvAttenuation1; + D3DVALUE dvAttenuation2; + D3DVALUE dvTheta; + D3DVALUE dvPhi; +} D3DLIGHT,*LPD3DLIGHT; + +typedef struct _D3DLIGHT7 { + D3DLIGHTTYPE dltType; + D3DCOLORVALUE dcvDiffuse; + D3DCOLORVALUE dcvSpecular; + D3DCOLORVALUE dcvAmbient; + D3DVECTOR dvPosition; + D3DVECTOR dvDirection; + D3DVALUE dvRange; + D3DVALUE dvFalloff; + D3DVALUE dvAttenuation0; + D3DVALUE dvAttenuation1; + D3DVALUE dvAttenuation2; + D3DVALUE dvTheta; + D3DVALUE dvPhi; +} D3DLIGHT7, *LPD3DLIGHT7; + +#define D3DLIGHT_ACTIVE 0x00000001 +#define D3DLIGHT_NO_SPECULAR 0x00000002 +#define D3DLIGHT_ALL (D3DLIGHT_ACTIVE | D3DLIGHT_NO_SPECULAR) /* 0x3 */ + +#define D3DLIGHT_RANGE_MAX ((float)sqrt(FLT_MAX)) + +typedef struct _D3DLIGHT2 { + DWORD dwSize; + D3DLIGHTTYPE dltType; + D3DCOLORVALUE dcvColor; + D3DVECTOR dvPosition; + D3DVECTOR dvDirection; + D3DVALUE dvRange; + D3DVALUE dvFalloff; + D3DVALUE dvAttenuation0; + D3DVALUE dvAttenuation1; + D3DVALUE dvAttenuation2; + D3DVALUE dvTheta; + D3DVALUE dvPhi; + DWORD dwFlags; +} D3DLIGHT2, *LPD3DLIGHT2; + +typedef struct _D3DLIGHTDATA { + DWORD dwSize; + LPD3DLIGHTINGELEMENT lpIn; + DWORD dwInSize; + LPD3DTLVERTEX lpOut; + DWORD dwOutSize; +} D3DLIGHTDATA, *LPD3DLIGHTDATA; + +#define D3DCOLOR_MONO 1 +#define D3DCOLOR_RGB 2 + +typedef DWORD D3DCOLORMODEL; + + +#define D3DCLEAR_TARGET 0x00000001 +#define D3DCLEAR_ZBUFFER 0x00000002 +#define D3DCLEAR_STENCIL 0x00000004 + +typedef enum _D3DOPCODE { + D3DOP_POINT = 1, + D3DOP_LINE = 2, + D3DOP_TRIANGLE = 3, + D3DOP_MATRIXLOAD = 4, + D3DOP_MATRIXMULTIPLY = 5, + D3DOP_STATETRANSFORM = 6, + D3DOP_STATELIGHT = 7, + D3DOP_STATERENDER = 8, + D3DOP_PROCESSVERTICES = 9, + D3DOP_TEXTURELOAD = 10, + D3DOP_EXIT = 11, + D3DOP_BRANCHFORWARD = 12, + D3DOP_SPAN = 13, + D3DOP_SETSTATUS = 14, + + D3DOP_FORCE_DWORD = 0x7fffffff +} D3DOPCODE; + +typedef struct _D3DINSTRUCTION { + BYTE bOpcode; + BYTE bSize; + WORD wCount; +} D3DINSTRUCTION, *LPD3DINSTRUCTION; + +typedef struct _D3DTEXTURELOAD { + D3DTEXTUREHANDLE hDestTexture; + D3DTEXTUREHANDLE hSrcTexture; +} D3DTEXTURELOAD, *LPD3DTEXTURELOAD; + +typedef struct _D3DPICKRECORD { + BYTE bOpcode; + BYTE bPad; + DWORD dwOffset; + D3DVALUE dvZ; +} D3DPICKRECORD, *LPD3DPICKRECORD; + +typedef enum { + D3DSHADE_FLAT = 1, + D3DSHADE_GOURAUD = 2, + D3DSHADE_PHONG = 3, + D3DSHADE_FORCE_DWORD = 0x7fffffff +} D3DSHADEMODE; + +typedef enum { + D3DFILL_POINT = 1, + D3DFILL_WIREFRAME = 2, + D3DFILL_SOLID = 3, + D3DFILL_FORCE_DWORD = 0x7fffffff +} D3DFILLMODE; + +typedef struct _D3DLINEPATTERN { + WORD wRepeatFactor; + WORD wLinePattern; +} D3DLINEPATTERN; + +typedef enum { + D3DFILTER_NEAREST = 1, + D3DFILTER_LINEAR = 2, + D3DFILTER_MIPNEAREST = 3, + D3DFILTER_MIPLINEAR = 4, + D3DFILTER_LINEARMIPNEAREST = 5, + D3DFILTER_LINEARMIPLINEAR = 6, + D3DFILTER_FORCE_DWORD = 0x7fffffff +} D3DTEXTUREFILTER; + +typedef enum { + D3DBLEND_ZERO = 1, + D3DBLEND_ONE = 2, + D3DBLEND_SRCCOLOR = 3, + D3DBLEND_INVSRCCOLOR = 4, + D3DBLEND_SRCALPHA = 5, + D3DBLEND_INVSRCALPHA = 6, + D3DBLEND_DESTALPHA = 7, + D3DBLEND_INVDESTALPHA = 8, + D3DBLEND_DESTCOLOR = 9, + D3DBLEND_INVDESTCOLOR = 10, + D3DBLEND_SRCALPHASAT = 11, + D3DBLEND_BOTHSRCALPHA = 12, + D3DBLEND_BOTHINVSRCALPHA = 13, + D3DBLEND_FORCE_DWORD = 0x7fffffff +} D3DBLEND; + +typedef enum { + D3DTBLEND_DECAL = 1, + D3DTBLEND_MODULATE = 2, + D3DTBLEND_DECALALPHA = 3, + D3DTBLEND_MODULATEALPHA = 4, + D3DTBLEND_DECALMASK = 5, + D3DTBLEND_MODULATEMASK = 6, + D3DTBLEND_COPY = 7, + D3DTBLEND_ADD = 8, + D3DTBLEND_FORCE_DWORD = 0x7fffffff +} D3DTEXTUREBLEND; + +typedef enum _D3DTEXTUREADDRESS { + D3DTADDRESS_WRAP = 1, + D3DTADDRESS_MIRROR = 2, + D3DTADDRESS_CLAMP = 3, + D3DTADDRESS_BORDER = 4, + D3DTADDRESS_FORCE_DWORD = 0x7fffffff +} D3DTEXTUREADDRESS; + +typedef enum { + D3DCULL_NONE = 1, + D3DCULL_CW = 2, + D3DCULL_CCW = 3, + D3DCULL_FORCE_DWORD = 0x7fffffff +} D3DCULL; + +typedef enum { + D3DCMP_NEVER = 1, + D3DCMP_LESS = 2, + D3DCMP_EQUAL = 3, + D3DCMP_LESSEQUAL = 4, + D3DCMP_GREATER = 5, + D3DCMP_NOTEQUAL = 6, + D3DCMP_GREATEREQUAL = 7, + D3DCMP_ALWAYS = 8, + D3DCMP_FORCE_DWORD = 0x7fffffff +} D3DCMPFUNC; + +typedef enum _D3DSTENCILOP { + D3DSTENCILOP_KEEP = 1, + D3DSTENCILOP_ZERO = 2, + D3DSTENCILOP_REPLACE = 3, + D3DSTENCILOP_INCRSAT = 4, + D3DSTENCILOP_DECRSAT = 5, + D3DSTENCILOP_INVERT = 6, + D3DSTENCILOP_INCR = 7, + D3DSTENCILOP_DECR = 8, + D3DSTENCILOP_FORCE_DWORD = 0x7fffffff +} D3DSTENCILOP; + +typedef enum _D3DFOGMODE { + D3DFOG_NONE = 0, + D3DFOG_EXP = 1, + D3DFOG_EXP2 = 2, + D3DFOG_LINEAR = 3, + D3DFOG_FORCE_DWORD = 0x7fffffff +} D3DFOGMODE; + +typedef enum _D3DZBUFFERTYPE { + D3DZB_FALSE = 0, + D3DZB_TRUE = 1, + D3DZB_USEW = 2, + D3DZB_FORCE_DWORD = 0x7fffffff +} D3DZBUFFERTYPE; + +typedef enum _D3DANTIALIASMODE { + D3DANTIALIAS_NONE = 0, + D3DANTIALIAS_SORTDEPENDENT = 1, + D3DANTIALIAS_SORTINDEPENDENT = 2, + D3DANTIALIAS_FORCE_DWORD = 0x7fffffff +} D3DANTIALIASMODE; + +typedef enum { + D3DVT_VERTEX = 1, + D3DVT_LVERTEX = 2, + D3DVT_TLVERTEX = 3, + D3DVT_FORCE_DWORD = 0x7fffffff +} D3DVERTEXTYPE; + +typedef enum { + D3DPT_POINTLIST = 1, + D3DPT_LINELIST = 2, + D3DPT_LINESTRIP = 3, + D3DPT_TRIANGLELIST = 4, + D3DPT_TRIANGLESTRIP = 5, + D3DPT_TRIANGLEFAN = 6, + D3DPT_FORCE_DWORD = 0x7fffffff +} D3DPRIMITIVETYPE; + +#define D3DSTATE_OVERRIDE_BIAS 256 + +#define D3DSTATE_OVERRIDE(type) (D3DRENDERSTATETYPE)(((DWORD) (type) + D3DSTATE_OVERRIDE_BIAS)) + +typedef enum _D3DTRANSFORMSTATETYPE { + D3DTRANSFORMSTATE_WORLD = 1, + D3DTRANSFORMSTATE_VIEW = 2, + D3DTRANSFORMSTATE_PROJECTION = 3, + D3DTRANSFORMSTATE_WORLD1 = 4, + D3DTRANSFORMSTATE_WORLD2 = 5, + D3DTRANSFORMSTATE_WORLD3 = 6, + D3DTRANSFORMSTATE_TEXTURE0 = 16, + D3DTRANSFORMSTATE_TEXTURE1 = 17, + D3DTRANSFORMSTATE_TEXTURE2 = 18, + D3DTRANSFORMSTATE_TEXTURE3 = 19, + D3DTRANSFORMSTATE_TEXTURE4 = 20, + D3DTRANSFORMSTATE_TEXTURE5 = 21, + D3DTRANSFORMSTATE_TEXTURE6 = 22, + D3DTRANSFORMSTATE_TEXTURE7 = 23, + D3DTRANSFORMSTATE_FORCE_DWORD = 0x7fffffff +} D3DTRANSFORMSTATETYPE; + +typedef enum { + D3DLIGHTSTATE_MATERIAL = 1, + D3DLIGHTSTATE_AMBIENT = 2, + D3DLIGHTSTATE_COLORMODEL = 3, + D3DLIGHTSTATE_FOGMODE = 4, + D3DLIGHTSTATE_FOGSTART = 5, + D3DLIGHTSTATE_FOGEND = 6, + D3DLIGHTSTATE_FOGDENSITY = 7, + D3DLIGHTSTATE_COLORVERTEX = 8, + D3DLIGHTSTATE_FORCE_DWORD = 0x7fffffff +} D3DLIGHTSTATETYPE; + +typedef enum { + D3DRENDERSTATE_TEXTUREHANDLE = 1, + D3DRENDERSTATE_ANTIALIAS = 2, + D3DRENDERSTATE_TEXTUREADDRESS = 3, + D3DRENDERSTATE_TEXTUREPERSPECTIVE = 4, + D3DRENDERSTATE_WRAPU = 5, + D3DRENDERSTATE_WRAPV = 6, + D3DRENDERSTATE_ZENABLE = 7, + D3DRENDERSTATE_FILLMODE = 8, + D3DRENDERSTATE_SHADEMODE = 9, + D3DRENDERSTATE_LINEPATTERN = 10, + D3DRENDERSTATE_MONOENABLE = 11, + D3DRENDERSTATE_ROP2 = 12, + D3DRENDERSTATE_PLANEMASK = 13, + D3DRENDERSTATE_ZWRITEENABLE = 14, + D3DRENDERSTATE_ALPHATESTENABLE = 15, + D3DRENDERSTATE_LASTPIXEL = 16, + D3DRENDERSTATE_TEXTUREMAG = 17, + D3DRENDERSTATE_TEXTUREMIN = 18, + D3DRENDERSTATE_SRCBLEND = 19, + D3DRENDERSTATE_DESTBLEND = 20, + D3DRENDERSTATE_TEXTUREMAPBLEND = 21, + D3DRENDERSTATE_CULLMODE = 22, + D3DRENDERSTATE_ZFUNC = 23, + D3DRENDERSTATE_ALPHAREF = 24, + D3DRENDERSTATE_ALPHAFUNC = 25, + D3DRENDERSTATE_DITHERENABLE = 26, + D3DRENDERSTATE_ALPHABLENDENABLE = 27, + D3DRENDERSTATE_FOGENABLE = 28, + D3DRENDERSTATE_SPECULARENABLE = 29, + D3DRENDERSTATE_ZVISIBLE = 30, + D3DRENDERSTATE_SUBPIXEL = 31, + D3DRENDERSTATE_SUBPIXELX = 32, + D3DRENDERSTATE_STIPPLEDALPHA = 33, + D3DRENDERSTATE_FOGCOLOR = 34, + D3DRENDERSTATE_FOGTABLEMODE = 35, + D3DRENDERSTATE_FOGTABLESTART = 36, + D3DRENDERSTATE_FOGTABLEEND = 37, + D3DRENDERSTATE_FOGTABLEDENSITY = 38, + D3DRENDERSTATE_FOGSTART = 36, + D3DRENDERSTATE_FOGEND = 37, + D3DRENDERSTATE_FOGDENSITY = 38, + D3DRENDERSTATE_STIPPLEENABLE = 39, + D3DRENDERSTATE_EDGEANTIALIAS = 40, + D3DRENDERSTATE_COLORKEYENABLE = 41, + D3DRENDERSTATE_BORDERCOLOR = 43, + D3DRENDERSTATE_TEXTUREADDRESSU = 44, + D3DRENDERSTATE_TEXTUREADDRESSV = 45, + D3DRENDERSTATE_MIPMAPLODBIAS = 46, + D3DRENDERSTATE_ZBIAS = 47, + D3DRENDERSTATE_RANGEFOGENABLE = 48, + D3DRENDERSTATE_ANISOTROPY = 49, + D3DRENDERSTATE_FLUSHBATCH = 50, + D3DRENDERSTATE_TRANSLUCENTSORTINDEPENDENT = 51, + + D3DRENDERSTATE_STENCILENABLE = 52, + D3DRENDERSTATE_STENCILFAIL = 53, + D3DRENDERSTATE_STENCILZFAIL = 54, + D3DRENDERSTATE_STENCILPASS = 55, + D3DRENDERSTATE_STENCILFUNC = 56, + D3DRENDERSTATE_STENCILREF = 57, + D3DRENDERSTATE_STENCILMASK = 58, + D3DRENDERSTATE_STENCILWRITEMASK = 59, + D3DRENDERSTATE_TEXTUREFACTOR = 60, + + D3DRENDERSTATE_STIPPLEPATTERN00 = 64, + D3DRENDERSTATE_STIPPLEPATTERN01 = 65, + D3DRENDERSTATE_STIPPLEPATTERN02 = 66, + D3DRENDERSTATE_STIPPLEPATTERN03 = 67, + D3DRENDERSTATE_STIPPLEPATTERN04 = 68, + D3DRENDERSTATE_STIPPLEPATTERN05 = 69, + D3DRENDERSTATE_STIPPLEPATTERN06 = 70, + D3DRENDERSTATE_STIPPLEPATTERN07 = 71, + D3DRENDERSTATE_STIPPLEPATTERN08 = 72, + D3DRENDERSTATE_STIPPLEPATTERN09 = 73, + D3DRENDERSTATE_STIPPLEPATTERN10 = 74, + D3DRENDERSTATE_STIPPLEPATTERN11 = 75, + D3DRENDERSTATE_STIPPLEPATTERN12 = 76, + D3DRENDERSTATE_STIPPLEPATTERN13 = 77, + D3DRENDERSTATE_STIPPLEPATTERN14 = 78, + D3DRENDERSTATE_STIPPLEPATTERN15 = 79, + D3DRENDERSTATE_STIPPLEPATTERN16 = 80, + D3DRENDERSTATE_STIPPLEPATTERN17 = 81, + D3DRENDERSTATE_STIPPLEPATTERN18 = 82, + D3DRENDERSTATE_STIPPLEPATTERN19 = 83, + D3DRENDERSTATE_STIPPLEPATTERN20 = 84, + D3DRENDERSTATE_STIPPLEPATTERN21 = 85, + D3DRENDERSTATE_STIPPLEPATTERN22 = 86, + D3DRENDERSTATE_STIPPLEPATTERN23 = 87, + D3DRENDERSTATE_STIPPLEPATTERN24 = 88, + D3DRENDERSTATE_STIPPLEPATTERN25 = 89, + D3DRENDERSTATE_STIPPLEPATTERN26 = 90, + D3DRENDERSTATE_STIPPLEPATTERN27 = 91, + D3DRENDERSTATE_STIPPLEPATTERN28 = 92, + D3DRENDERSTATE_STIPPLEPATTERN29 = 93, + D3DRENDERSTATE_STIPPLEPATTERN30 = 94, + D3DRENDERSTATE_STIPPLEPATTERN31 = 95, + + D3DRENDERSTATE_WRAP0 = 128, + D3DRENDERSTATE_WRAP1 = 129, + D3DRENDERSTATE_WRAP2 = 130, + D3DRENDERSTATE_WRAP3 = 131, + D3DRENDERSTATE_WRAP4 = 132, + D3DRENDERSTATE_WRAP5 = 133, + D3DRENDERSTATE_WRAP6 = 134, + D3DRENDERSTATE_WRAP7 = 135, + D3DRENDERSTATE_CLIPPING = 136, + D3DRENDERSTATE_LIGHTING = 137, + D3DRENDERSTATE_EXTENTS = 138, + D3DRENDERSTATE_AMBIENT = 139, + D3DRENDERSTATE_FOGVERTEXMODE = 140, + D3DRENDERSTATE_COLORVERTEX = 141, + D3DRENDERSTATE_LOCALVIEWER = 142, + D3DRENDERSTATE_NORMALIZENORMALS = 143, + D3DRENDERSTATE_COLORKEYBLENDENABLE = 144, + D3DRENDERSTATE_DIFFUSEMATERIALSOURCE = 145, + D3DRENDERSTATE_SPECULARMATERIALSOURCE = 146, + D3DRENDERSTATE_AMBIENTMATERIALSOURCE = 147, + D3DRENDERSTATE_EMISSIVEMATERIALSOURCE = 148, + D3DRENDERSTATE_VERTEXBLEND = 151, + D3DRENDERSTATE_CLIPPLANEENABLE = 152, + + D3DRENDERSTATE_FORCE_DWORD = 0x7fffffff + + /* FIXME: We have some retired values that are being reused for DirectX 7 */ +} D3DRENDERSTATETYPE; + +typedef enum _D3DMATERIALCOLORSOURCE +{ + D3DMCS_MATERIAL = 0, + D3DMCS_COLOR1 = 1, + D3DMCS_COLOR2 = 2, + D3DMCS_FORCE_DWORD = 0x7fffffff +} D3DMATERIALCOLORSOURCE; + +#define D3DRENDERSTATE_BLENDENABLE D3DRENDERSTATE_ALPHABLENDENABLE +#define D3DRENDERSTATE_WRAPBIAS 128UL +#define D3DWRAP_U 0x00000001L +#define D3DWRAP_V 0x00000002L + +#define D3DWRAPCOORD_0 0x00000001L +#define D3DWRAPCOORD_1 0x00000002L +#define D3DWRAPCOORD_2 0x00000004L +#define D3DWRAPCOORD_3 0x00000008L + +#define D3DRENDERSTATE_STIPPLEPATTERN(y) (D3DRENDERSTATE_STIPPLEPATTERN00 + (y)) + +typedef struct _D3DSTATE { + union { + D3DTRANSFORMSTATETYPE dtstTransformStateType; + D3DLIGHTSTATETYPE dlstLightStateType; + D3DRENDERSTATETYPE drstRenderStateType; + } DUMMYUNIONNAME1; + union { + DWORD dwArg[1]; + D3DVALUE dvArg[1]; + } DUMMYUNIONNAME2; +} D3DSTATE, *LPD3DSTATE; + +typedef struct _D3DMATRIXLOAD { + D3DMATRIXHANDLE hDestMatrix; + D3DMATRIXHANDLE hSrcMatrix; +} D3DMATRIXLOAD, *LPD3DMATRIXLOAD; + +typedef struct _D3DMATRIXMULTIPLY { + D3DMATRIXHANDLE hDestMatrix; + D3DMATRIXHANDLE hSrcMatrix1; + D3DMATRIXHANDLE hSrcMatrix2; +} D3DMATRIXMULTIPLY, *LPD3DMATRIXMULTIPLY; + +typedef struct _D3DPROCESSVERTICES { + DWORD dwFlags; + WORD wStart; + WORD wDest; + DWORD dwCount; + DWORD dwReserved; +} D3DPROCESSVERTICES, *LPD3DPROCESSVERTICES; + +#define D3DPROCESSVERTICES_TRANSFORMLIGHT 0x00000000L +#define D3DPROCESSVERTICES_TRANSFORM 0x00000001L +#define D3DPROCESSVERTICES_COPY 0x00000002L +#define D3DPROCESSVERTICES_OPMASK 0x00000007L + +#define D3DPROCESSVERTICES_UPDATEEXTENTS 0x00000008L +#define D3DPROCESSVERTICES_NOCOLOR 0x00000010L + +typedef enum _D3DTEXTURESTAGESTATETYPE +{ + D3DTSS_COLOROP = 1, + D3DTSS_COLORARG1 = 2, + D3DTSS_COLORARG2 = 3, + D3DTSS_ALPHAOP = 4, + D3DTSS_ALPHAARG1 = 5, + D3DTSS_ALPHAARG2 = 6, + D3DTSS_BUMPENVMAT00 = 7, + D3DTSS_BUMPENVMAT01 = 8, + D3DTSS_BUMPENVMAT10 = 9, + D3DTSS_BUMPENVMAT11 = 10, + D3DTSS_TEXCOORDINDEX = 11, + D3DTSS_ADDRESS = 12, + D3DTSS_ADDRESSU = 13, + D3DTSS_ADDRESSV = 14, + D3DTSS_BORDERCOLOR = 15, + D3DTSS_MAGFILTER = 16, + D3DTSS_MINFILTER = 17, + D3DTSS_MIPFILTER = 18, + D3DTSS_MIPMAPLODBIAS = 19, + D3DTSS_MAXMIPLEVEL = 20, + D3DTSS_MAXANISOTROPY = 21, + D3DTSS_BUMPENVLSCALE = 22, + D3DTSS_BUMPENVLOFFSET = 23, + D3DTSS_TEXTURETRANSFORMFLAGS = 24, + D3DTSS_FORCE_DWORD = 0x7fffffff +} D3DTEXTURESTAGESTATETYPE; + +#define D3DTSS_TCI_PASSTHRU 0x00000000 +#define D3DTSS_TCI_CAMERASPACENORMAL 0x00010000 +#define D3DTSS_TCI_CAMERASPACEPOSITION 0x00020000 +#define D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR 0x00030000 + +typedef enum _D3DTEXTUREOP +{ + D3DTOP_DISABLE = 1, + D3DTOP_SELECTARG1 = 2, + D3DTOP_SELECTARG2 = 3, + + D3DTOP_MODULATE = 4, + D3DTOP_MODULATE2X = 5, + D3DTOP_MODULATE4X = 6, + + D3DTOP_ADD = 7, + D3DTOP_ADDSIGNED = 8, + D3DTOP_ADDSIGNED2X = 9, + D3DTOP_SUBTRACT = 10, + D3DTOP_ADDSMOOTH = 11, + + D3DTOP_BLENDDIFFUSEALPHA = 12, + D3DTOP_BLENDTEXTUREALPHA = 13, + D3DTOP_BLENDFACTORALPHA = 14, + D3DTOP_BLENDTEXTUREALPHAPM = 15, + D3DTOP_BLENDCURRENTALPHA = 16, + + D3DTOP_PREMODULATE = 17, + D3DTOP_MODULATEALPHA_ADDCOLOR = 18, + D3DTOP_MODULATECOLOR_ADDALPHA = 19, + D3DTOP_MODULATEINVALPHA_ADDCOLOR = 20, + D3DTOP_MODULATEINVCOLOR_ADDALPHA = 21, + + D3DTOP_BUMPENVMAP = 22, + D3DTOP_BUMPENVMAPLUMINANCE = 23, + D3DTOP_DOTPRODUCT3 = 24, + + D3DTOP_FORCE_DWORD = 0x7fffffff +} D3DTEXTUREOP; + +#define D3DTA_SELECTMASK 0x0000000f +#define D3DTA_DIFFUSE 0x00000000 +#define D3DTA_CURRENT 0x00000001 +#define D3DTA_TEXTURE 0x00000002 +#define D3DTA_TFACTOR 0x00000003 +#define D3DTA_SPECULAR 0x00000004 +#define D3DTA_COMPLEMENT 0x00000010 +#define D3DTA_ALPHAREPLICATE 0x00000020 + +typedef enum _D3DTEXTUREMAGFILTER +{ + D3DTFG_POINT = 1, + D3DTFG_LINEAR = 2, + D3DTFG_FLATCUBIC = 3, + D3DTFG_GAUSSIANCUBIC = 4, + D3DTFG_ANISOTROPIC = 5, + D3DTFG_FORCE_DWORD = 0x7fffffff +} D3DTEXTUREMAGFILTER; + +typedef enum _D3DTEXTUREMINFILTER +{ + D3DTFN_POINT = 1, + D3DTFN_LINEAR = 2, + D3DTFN_ANISOTROPIC = 3, + D3DTFN_FORCE_DWORD = 0x7fffffff +} D3DTEXTUREMINFILTER; + +typedef enum _D3DTEXTUREMIPFILTER +{ + D3DTFP_NONE = 1, + D3DTFP_POINT = 2, + D3DTFP_LINEAR = 3, + D3DTFP_FORCE_DWORD = 0x7fffffff +} D3DTEXTUREMIPFILTER; + +#define D3DTRIFLAG_START 0x00000000L +#define D3DTRIFLAG_STARTFLAT(len) (len) +#define D3DTRIFLAG_ODD 0x0000001eL +#define D3DTRIFLAG_EVEN 0x0000001fL + +#define D3DTRIFLAG_EDGEENABLE1 0x00000100L +#define D3DTRIFLAG_EDGEENABLE2 0x00000200L +#define D3DTRIFLAG_EDGEENABLE3 0x00000400L +#define D3DTRIFLAG_EDGEENABLETRIANGLE \ + (D3DTRIFLAG_EDGEENABLE1 | D3DTRIFLAG_EDGEENABLE2 | D3DTRIFLAG_EDGEENABLE3) + +typedef struct _D3DTRIANGLE { + union { + WORD v1; + WORD wV1; + } DUMMYUNIONNAME1; + union { + WORD v2; + WORD wV2; + } DUMMYUNIONNAME2; + union { + WORD v3; + WORD wV3; + } DUMMYUNIONNAME3; + WORD wFlags; +} D3DTRIANGLE, *LPD3DTRIANGLE; + +typedef struct _D3DLINE { + union { + WORD v1; + WORD wV1; + } DUMMYUNIONNAME1; + union { + WORD v2; + WORD wV2; + } DUMMYUNIONNAME2; +} D3DLINE, *LPD3DLINE; + +typedef struct _D3DSPAN { + WORD wCount; + WORD wFirst; +} D3DSPAN, *LPD3DSPAN; + +typedef struct _D3DPOINT { + WORD wCount; + WORD wFirst; +} D3DPOINT, *LPD3DPOINT; + +typedef struct _D3DBRANCH { + DWORD dwMask; + DWORD dwValue; + BOOL bNegate; + DWORD dwOffset; +} D3DBRANCH, *LPD3DBRANCH; + +typedef struct _D3DSTATUS { + DWORD dwFlags; + DWORD dwStatus; + D3DRECT drExtent; +} D3DSTATUS, *LPD3DSTATUS; + +#define D3DSETSTATUS_STATUS 0x00000001L +#define D3DSETSTATUS_EXTENTS 0x00000002L +#define D3DSETSTATUS_ALL (D3DSETSTATUS_STATUS | D3DSETSTATUS_EXTENTS) + +typedef struct _D3DCLIPSTATUS { + DWORD dwFlags; + DWORD dwStatus; + float minx, maxx; + float miny, maxy; + float minz, maxz; +} D3DCLIPSTATUS, *LPD3DCLIPSTATUS; + +#define D3DCLIPSTATUS_STATUS 0x00000001L +#define D3DCLIPSTATUS_EXTENTS2 0x00000002L +#define D3DCLIPSTATUS_EXTENTS3 0x00000004L + +typedef struct { + DWORD dwSize; + DWORD dwTrianglesDrawn; + DWORD dwLinesDrawn; + DWORD dwPointsDrawn; + DWORD dwSpansDrawn; + DWORD dwVerticesProcessed; +} D3DSTATS, *LPD3DSTATS; + +#define D3DEXECUTE_CLIPPED 0x00000001l +#define D3DEXECUTE_UNCLIPPED 0x00000002l + +typedef struct _D3DEXECUTEDATA { + DWORD dwSize; + DWORD dwVertexOffset; + DWORD dwVertexCount; + DWORD dwInstructionOffset; + DWORD dwInstructionLength; + DWORD dwHVertexOffset; + D3DSTATUS dsStatus; +} D3DEXECUTEDATA, *LPD3DEXECUTEDATA; + +#define D3DPAL_FREE 0x00 +#define D3DPAL_READONLY 0x40 +#define D3DPAL_RESERVED 0x80 + +typedef struct _D3DVERTEXBUFFERDESC { + DWORD dwSize; + DWORD dwCaps; + DWORD dwFVF; + DWORD dwNumVertices; +} D3DVERTEXBUFFERDESC, *LPD3DVERTEXBUFFERDESC; + +#define D3DVBCAPS_SYSTEMMEMORY 0x00000800l +#define D3DVBCAPS_WRITEONLY 0x00010000l +#define D3DVBCAPS_OPTIMIZED 0x80000000l +#define D3DVBCAPS_DONOTCLIP 0x00000001l + +#define D3DVOP_LIGHT (1 << 10) +#define D3DVOP_TRANSFORM (1 << 0) +#define D3DVOP_CLIP (1 << 2) +#define D3DVOP_EXTENTS (1 << 3) + +#define D3DMAXNUMVERTICES ((1<<16) - 1) + +#define D3DMAXNUMPRIMITIVES ((1<<16) - 1) + +#define D3DPV_DONOTCOPYDATA (1 << 0) + +#define D3DFVF_RESERVED0 0x001 +#define D3DFVF_POSITION_MASK 0x00E +#define D3DFVF_XYZ 0x002 +#define D3DFVF_XYZRHW 0x004 +#define D3DFVF_XYZB1 0x006 +#define D3DFVF_XYZB2 0x008 +#define D3DFVF_XYZB3 0x00a +#define D3DFVF_XYZB4 0x00c +#define D3DFVF_XYZB5 0x00e + +#define D3DFVF_NORMAL 0x010 +#define D3DFVF_RESERVED1 0x020 +#define D3DFVF_DIFFUSE 0x040 +#define D3DFVF_SPECULAR 0x080 +#define D3DFVF_TEXCOUNT_MASK 0xf00 +#define D3DFVF_TEXCOUNT_SHIFT 8 +#define D3DFVF_TEX0 0x000 +#define D3DFVF_TEX1 0x100 +#define D3DFVF_TEX2 0x200 +#define D3DFVF_TEX3 0x300 +#define D3DFVF_TEX4 0x400 +#define D3DFVF_TEX5 0x500 +#define D3DFVF_TEX6 0x600 +#define D3DFVF_TEX7 0x700 +#define D3DFVF_TEX8 0x800 + +#define D3DFVF_RESERVED2 0xf000 + +#define D3DFVF_VERTEX ( D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1 ) +#define D3DFVF_LVERTEX ( D3DFVF_XYZ | D3DFVF_RESERVED1 | D3DFVF_DIFFUSE | \ + D3DFVF_SPECULAR | D3DFVF_TEX1 ) +#define D3DFVF_TLVERTEX ( D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | \ + D3DFVF_TEX1 ) + +typedef struct _D3DDP_PTRSTRIDE { + LPVOID lpvData; + DWORD dwStride; +} D3DDP_PTRSTRIDE; + +#define D3DDP_MAXTEXCOORD 8 + +typedef struct _D3DDRAWPRIMITIVESTRIDEDDATA { + D3DDP_PTRSTRIDE position; + D3DDP_PTRSTRIDE normal; + D3DDP_PTRSTRIDE diffuse; + D3DDP_PTRSTRIDE specular; + D3DDP_PTRSTRIDE textureCoords[D3DDP_MAXTEXCOORD]; +} D3DDRAWPRIMITIVESTRIDEDDATA ,*LPD3DDRAWPRIMITIVESTRIDEDDATA; + +#define D3DVIS_INSIDE_FRUSTUM 0 +#define D3DVIS_INTERSECT_FRUSTUM 1 +#define D3DVIS_OUTSIDE_FRUSTUM 2 +#define D3DVIS_INSIDE_LEFT 0 +#define D3DVIS_INTERSECT_LEFT (1 << 2) +#define D3DVIS_OUTSIDE_LEFT (2 << 2) +#define D3DVIS_INSIDE_RIGHT 0 +#define D3DVIS_INTERSECT_RIGHT (1 << 4) +#define D3DVIS_OUTSIDE_RIGHT (2 << 4) +#define D3DVIS_INSIDE_TOP 0 +#define D3DVIS_INTERSECT_TOP (1 << 6) +#define D3DVIS_OUTSIDE_TOP (2 << 6) +#define D3DVIS_INSIDE_BOTTOM 0 +#define D3DVIS_INTERSECT_BOTTOM (1 << 8) +#define D3DVIS_OUTSIDE_BOTTOM (2 << 8) +#define D3DVIS_INSIDE_NEAR 0 +#define D3DVIS_INTERSECT_NEAR (1 << 10) +#define D3DVIS_OUTSIDE_NEAR (2 << 10) +#define D3DVIS_INSIDE_FAR 0 +#define D3DVIS_INTERSECT_FAR (1 << 12) +#define D3DVIS_OUTSIDE_FAR (2 << 12) + +#define D3DVIS_MASK_FRUSTUM (3 << 0) +#define D3DVIS_MASK_LEFT (3 << 2) +#define D3DVIS_MASK_RIGHT (3 << 4) +#define D3DVIS_MASK_TOP (3 << 6) +#define D3DVIS_MASK_BOTTOM (3 << 8) +#define D3DVIS_MASK_NEAR (3 << 10) +#define D3DVIS_MASK_FAR (3 << 12) + +#define D3DDEVINFOID_TEXTUREMANAGER 1 +#define D3DDEVINFOID_D3DTEXTUREMANAGER 2 +#define D3DDEVINFOID_TEXTURING 3 + +typedef enum _D3DSTATEBLOCKTYPE +{ + D3DSBT_ALL = 1, + D3DSBT_PIXELSTATE = 2, + D3DSBT_VERTEXSTATE = 3, + D3DSBT_FORCE_DWORD = 0xffffffff +} D3DSTATEBLOCKTYPE; + +typedef enum _D3DVERTEXBLENDFLAGS +{ + D3DVBLEND_DISABLE = 0, + D3DVBLEND_1WEIGHT = 1, + D3DVBLEND_2WEIGHTS = 2, + D3DVBLEND_3WEIGHTS = 3, +} D3DVERTEXBLENDFLAGS; + +typedef enum _D3DTEXTURETRANSFORMFLAGS { + D3DTTFF_DISABLE = 0, + D3DTTFF_COUNT1 = 1, + D3DTTFF_COUNT2 = 2, + D3DTTFF_COUNT3 = 3, + D3DTTFF_COUNT4 = 4, + D3DTTFF_PROJECTED = 256, + D3DTTFF_FORCE_DWORD = 0x7fffffff +} D3DTEXTURETRANSFORMFLAGS; + +#define D3DFVF_TEXTUREFORMAT2 0 +#define D3DFVF_TEXTUREFORMAT1 3 +#define D3DFVF_TEXTUREFORMAT3 1 +#define D3DFVF_TEXTUREFORMAT4 2 + +#define D3DFVF_TEXCOORDSIZE3(CoordIndex) (D3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16)) +#define D3DFVF_TEXCOORDSIZE2(CoordIndex) (D3DFVF_TEXTUREFORMAT2) +#define D3DFVF_TEXCOORDSIZE4(CoordIndex) (D3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16)) +#define D3DFVF_TEXCOORDSIZE1(CoordIndex) (D3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16)) + +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/ddraw.h pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/ddraw.h --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/ddraw.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/ddraw.h 2016-06-30 16:53:26.000000000 +0000 @@ -0,0 +1,2697 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __WINE_DDRAW_H +#define __WINE_DDRAW_H + +#define COM_NO_WINDOWS_H +#include + +#ifdef __cplusplus +extern "C" { +#endif /* defined(__cplusplus) */ + +#ifndef DIRECTDRAW_VERSION +#define DIRECTDRAW_VERSION 0x0700 +#endif /* DIRECTDRAW_VERSION */ + +#ifndef WINELIB_NAME_AW +#ifdef UNICODE +#define WINELIB_NAME_AW(func) func##W +#else +#define WINELIB_NAME_AW(func) func##A +#endif +#endif + +#ifndef DECL_WINELIB_TYPE_AW +#define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type; +#endif + +#ifndef DWORD_PTR +#define DWORD_PTR unsigned long +#endif + +/***************************************************************************** + * Predeclare the interfaces + */ +#ifndef __DDRAW_GUID_DEFINED__ +DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 ); +DEFINE_GUID( CLSID_DirectDraw7, 0x3C305196,0x50DB,0x11D3,0x9C,0xFE,0x00,0xC0,0x4F,0xD9,0x30,0xC5 ); +DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 ); +DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 ); +DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 ); +DEFINE_GUID( IID_IDirectDraw3, 0x618f8ad4,0x8b7a,0x11d0,0x8f,0xcc,0x0,0xc0,0x4f,0xd9,0x18,0x9d ); +DEFINE_GUID( IID_IDirectDraw4, 0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 ); +DEFINE_GUID( IID_IDirectDraw7, 0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b ); +DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 ); +DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 ); +DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB ); +DEFINE_GUID( IID_IDirectDrawSurface4, 0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B ); +DEFINE_GUID( IID_IDirectDrawSurface7, 0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b ); +DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 ); +DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 ); +DEFINE_GUID( IID_IDirectDrawColorControl,0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 ); +DEFINE_GUID( IID_IDirectDrawGammaControl,0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E ); +#endif + +typedef struct IDirectDraw *LPDIRECTDRAW; +typedef struct IDirectDraw2 *LPDIRECTDRAW2; +typedef struct IDirectDraw3 *LPDIRECTDRAW3; +typedef struct IDirectDraw4 *LPDIRECTDRAW4; +typedef struct IDirectDraw7 *LPDIRECTDRAW7; +typedef struct IDirectDrawClipper *LPDIRECTDRAWCLIPPER; +typedef struct IDirectDrawPalette *LPDIRECTDRAWPALETTE; +typedef struct IDirectDrawSurface *LPDIRECTDRAWSURFACE; +typedef struct IDirectDrawSurface2 *LPDIRECTDRAWSURFACE2; +typedef struct IDirectDrawSurface3 *LPDIRECTDRAWSURFACE3; +typedef struct IDirectDrawSurface4 *LPDIRECTDRAWSURFACE4; +typedef struct IDirectDrawSurface7 *LPDIRECTDRAWSURFACE7; +typedef struct IDirectDrawColorControl *LPDIRECTDRAWCOLORCONTROL; +typedef struct IDirectDrawGammaControl *LPDIRECTDRAWGAMMACONTROL; + + +#define DDENUMRET_CANCEL 0 +#define DDENUMRET_OK 1 + +#define DD_OK S_OK +#define DD_FALSE S_FALSE + + +#define _FACDD 0x876 +#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) + +#define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 ) +#define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 ) +#define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 ) +#define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 ) +#define DDERR_EXCEPTION MAKE_DDHRESULT( 55 ) +#define DDERR_GENERIC E_FAIL +#define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 ) +#define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 ) +#define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 ) +#define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 ) +#define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 ) +#define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 ) +#define DDERR_INVALIDPARAMS E_INVALIDARG +#define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 ) +#define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 ) +#define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 ) +#define DDERR_NO3D MAKE_DDHRESULT( 170 ) +#define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 ) +#define DDERR_NOSTEREOHARDWARE MAKE_DDHRESULT( 181 ) +#define DDERR_NOSURFACELEFT MAKE_DDHRESULT( 182 ) +#define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 ) +#define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 ) +#define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 ) +#define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 ) +#define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 ) +#define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 ) +#define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 ) +#define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 ) +#define DDERR_NOGDI MAKE_DDHRESULT( 240 ) +#define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 ) +#define DDERR_NOTFOUND MAKE_DDHRESULT( 255 ) +#define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 ) +#define DDERR_OVERLAPPINGRECTS MAKE_DDHRESULT( 270 ) +#define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 ) +#define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 ) +#define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 ) +#define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 ) +#define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 ) +#define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 ) +#define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 ) +#define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 ) +#define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 ) +#define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 ) +#define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 ) +#define DDERR_OUTOFMEMORY E_OUTOFMEMORY +#define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 ) +#define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 ) +#define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 ) +#define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 ) +#define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 ) +#define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 ) +#define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 ) +#define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 ) +#define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 ) +#define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 ) +#define DDERR_SURFACELOST MAKE_DDHRESULT( 450 ) +#define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 ) +#define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 ) +#define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 ) +#define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 ) +#define DDERR_UNSUPPORTED E_NOTIMPL +#define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 ) +#define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 ) +#define DDERR_INVALIDSTREAM MAKE_DDHRESULT( 521 ) +#define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 ) +#define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 ) +#define DDERR_DDSCAPSCOMPLEXREQUIRED MAKE_DDHRESULT( 542 ) +#define DDERR_XALIGN MAKE_DDHRESULT( 560 ) +#define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 ) +#define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 ) +#define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 ) +#define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 ) +#define DDERR_NOEMULATION MAKE_DDHRESULT( 565 ) +#define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 ) +#define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 ) +#define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 ) +#define DDERR_NOHWND MAKE_DDHRESULT( 569 ) +#define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 ) +#define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 ) +#define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 ) +#define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 ) +#define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 ) +#define DDERR_NOBLTHW MAKE_DDHRESULT( 575 ) +#define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 ) +#define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 ) +#define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 ) +#define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 ) +#define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 ) +#define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 ) +#define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 ) +#define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 ) +#define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 ) +#define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 ) +#define DDERR_NODC MAKE_DDHRESULT( 586 ) +#define DDERR_WRONGMODE MAKE_DDHRESULT( 587 ) +#define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 ) +#define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 ) +#define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 ) +#define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 ) +#define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 ) +#define DDERR_NOOPTIMIZEHW MAKE_DDHRESULT( 600 ) +#define DDERR_NOTLOADED MAKE_DDHRESULT( 601 ) +#define DDERR_NOFOCUSWINDOW MAKE_DDHRESULT( 602 ) +#define DDERR_NOTONMIPMAPSUBLEVEL MAKE_DDHRESULT( 603 ) +#define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 ) +#define DDERR_NONONLOCALVIDMEM MAKE_DDHRESULT( 630 ) +#define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 ) +#define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 ) +#define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 ) +#define DDERR_MOREDATA MAKE_DDHRESULT( 690 ) +#define DDERR_EXPIRED MAKE_DDHRESULT( 691 ) +#define DDERR_TESTFINISHED MAKE_DDHRESULT( 692 ) +#define DDERR_NEWMODE MAKE_DDHRESULT( 693 ) +#define DDERR_D3DNOTINITIALIZED MAKE_DDHRESULT( 694 ) +#define DDERR_VIDEONOTACTIVE MAKE_DDHRESULT( 695 ) +#define DDERR_NOMONITORINFORMATION MAKE_DDHRESULT( 696 ) +#define DDERR_NODRIVERSUPPORT MAKE_DDHRESULT( 697 ) +#define DDERR_DEVICEDOESNTOWNSURFACE MAKE_DDHRESULT( 699 ) +#define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED + +/* dwFlags for Blt* */ +#define DDBLT_ALPHADEST 0x00000001 +#define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002 +#define DDBLT_ALPHADESTNEG 0x00000004 +#define DDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008 +#define DDBLT_ALPHAEDGEBLEND 0x00000010 +#define DDBLT_ALPHASRC 0x00000020 +#define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040 +#define DDBLT_ALPHASRCNEG 0x00000080 +#define DDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100 +#define DDBLT_ASYNC 0x00000200 +#define DDBLT_COLORFILL 0x00000400 +#define DDBLT_DDFX 0x00000800 +#define DDBLT_DDROPS 0x00001000 +#define DDBLT_KEYDEST 0x00002000 +#define DDBLT_KEYDESTOVERRIDE 0x00004000 +#define DDBLT_KEYSRC 0x00008000 +#define DDBLT_KEYSRCOVERRIDE 0x00010000 +#define DDBLT_ROP 0x00020000 +#define DDBLT_ROTATIONANGLE 0x00040000 +#define DDBLT_ZBUFFER 0x00080000 +#define DDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000 +#define DDBLT_ZBUFFERDESTOVERRIDE 0x00200000 +#define DDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000 +#define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000 +#define DDBLT_WAIT 0x01000000 +#define DDBLT_DEPTHFILL 0x02000000 +#define DDBLT_DONOTWAIT 0x08000000 + +/* dwTrans for BltFast */ +#define DDBLTFAST_NOCOLORKEY 0x00000000 +#define DDBLTFAST_SRCCOLORKEY 0x00000001 +#define DDBLTFAST_DESTCOLORKEY 0x00000002 +#define DDBLTFAST_WAIT 0x00000010 +#define DDBLTFAST_DONOTWAIT 0x00000020 + +/* dwFlags for Flip */ +#define DDFLIP_WAIT 0x00000001 +#define DDFLIP_EVEN 0x00000002 /* only valid for overlay */ +#define DDFLIP_ODD 0x00000004 /* only valid for overlay */ +#define DDFLIP_NOVSYNC 0x00000008 +#define DDFLIP_STEREO 0x00000010 +#define DDFLIP_DONOTWAIT 0x00000020 +#define DDFLIP_INTERVAL2 0x02000000 +#define DDFLIP_INTERVAL3 0x03000000 +#define DDFLIP_INTERVAL4 0x04000000 + + +/* dwFlags for GetBltStatus */ +#define DDGBS_CANBLT 0x00000001 +#define DDGBS_ISBLTDONE 0x00000002 + +/* dwFlags for IDirectDrawSurface7::GetFlipStatus */ +#define DDGFS_CANFLIP 1L +#define DDGFS_ISFLIPDONE 2L + +/* dwFlags for IDirectDrawSurface7::SetPrivateData */ +#define DDSPD_IUNKNOWNPOINTER 1L +#define DDSPD_VOLATILE 2L + +/* DDSCAPS.dwCaps */ +/* reserved1, was 3d capable */ +#define DDSCAPS_RESERVED1 0x00000001 +/* surface contains alpha information */ +#define DDSCAPS_ALPHA 0x00000002 +/* this surface is a backbuffer */ +#define DDSCAPS_BACKBUFFER 0x00000004 +/* complex surface structure */ +#define DDSCAPS_COMPLEX 0x00000008 +/* part of surface flipping structure */ +#define DDSCAPS_FLIP 0x00000010 +/* this surface is the frontbuffer surface */ +#define DDSCAPS_FRONTBUFFER 0x00000020 +/* this is a plain offscreen surface */ +#define DDSCAPS_OFFSCREENPLAIN 0x00000040 +/* overlay */ +#define DDSCAPS_OVERLAY 0x00000080 +/* palette objects can be created and attached to us */ +#define DDSCAPS_PALETTE 0x00000100 +/* primary surface (the one the user looks at currently)(right eye)*/ +#define DDSCAPS_PRIMARYSURFACE 0x00000200 +/* primary surface for left eye */ +#define DDSCAPS_PRIMARYSURFACELEFT 0x00000400 +/* surface exists in systemmemory */ +#define DDSCAPS_SYSTEMMEMORY 0x00000800 +/* surface can be used as a texture */ +#define DDSCAPS_TEXTURE 0x00001000 +/* surface may be destination for 3d rendering */ +#define DDSCAPS_3DDEVICE 0x00002000 +/* surface exists in videomemory */ +#define DDSCAPS_VIDEOMEMORY 0x00004000 +/* surface changes immediately visible */ +#define DDSCAPS_VISIBLE 0x00008000 +/* write only surface */ +#define DDSCAPS_WRITEONLY 0x00010000 +/* zbuffer surface */ +#define DDSCAPS_ZBUFFER 0x00020000 +/* has its own DC */ +#define DDSCAPS_OWNDC 0x00040000 +/* surface should be able to receive live video */ +#define DDSCAPS_LIVEVIDEO 0x00080000 +/* should be able to have a hw codec decompress stuff into it */ +#define DDSCAPS_HWCODEC 0x00100000 +/* mode X (320x200 or 320x240) surface */ +#define DDSCAPS_MODEX 0x00200000 +/* one mipmap surface (1 level) */ +#define DDSCAPS_MIPMAP 0x00400000 +#define DDSCAPS_RESERVED2 0x00800000 +/* memory allocation delayed until Load() */ +#define DDSCAPS_ALLOCONLOAD 0x04000000 +/* Indicates that the surface will receive data from a video port */ +#define DDSCAPS_VIDEOPORT 0x08000000 +/* surface is in local videomemory */ +#define DDSCAPS_LOCALVIDMEM 0x10000000 +/* surface is in nonlocal videomemory */ +#define DDSCAPS_NONLOCALVIDMEM 0x20000000 +/* surface is a standard VGA mode surface (NOT ModeX) */ +#define DDSCAPS_STANDARDVGAMODE 0x40000000 +/* optimized? surface */ +#define DDSCAPS_OPTIMIZED 0x80000000 + +typedef struct _DDSCAPS { + DWORD dwCaps; /* capabilities of surface wanted */ +} DDSCAPS,*LPDDSCAPS; + +/* DDSCAPS2.dwCaps2 */ +/* indicates the surface will receive data from a video port using + deinterlacing hardware. */ +#define DDSCAPS2_HARDWAREDEINTERLACE 0x00000002 +/* indicates the surface will be locked very frequently. */ +#define DDSCAPS2_HINTDYNAMIC 0x00000004 +/* indicates surface can be re-ordered or retiled on load() */ +#define DDSCAPS2_HINTSTATIC 0x00000008 +/* indicates surface to be managed by directdraw/direct3D */ +#define DDSCAPS2_TEXTUREMANAGE 0x00000010 +/* reserved bits */ +#define DDSCAPS2_RESERVED1 0x00000020 +#define DDSCAPS2_RESERVED2 0x00000040 +/* indicates surface will never be locked again */ +#define DDSCAPS2_OPAQUE 0x00000080 +/* set at CreateSurface() time to indicate antialiasing will be used */ +#define DDSCAPS2_HINTANTIALIASING 0x00000100 +/* set at CreateSurface() time to indicate cubic environment map */ +#define DDSCAPS2_CUBEMAP 0x00000200 +/* face flags for cube maps */ +#define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400 +#define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800 +#define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000 +#define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000 +#define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000 +#define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000 +/* specifies all faces of a cube for CreateSurface() */ +#define DDSCAPS2_CUBEMAP_ALLFACES ( DDSCAPS2_CUBEMAP_POSITIVEX |\ + DDSCAPS2_CUBEMAP_NEGATIVEX |\ + DDSCAPS2_CUBEMAP_POSITIVEY |\ + DDSCAPS2_CUBEMAP_NEGATIVEY |\ + DDSCAPS2_CUBEMAP_POSITIVEZ |\ + DDSCAPS2_CUBEMAP_NEGATIVEZ ) +/* set for mipmap sublevels on DirectX7 and later. ignored by CreateSurface() */ +#define DDSCAPS2_MIPMAPSUBLEVEL 0x00010000 +/* indicates texture surface to be managed by Direct3D *only* */ +#define DDSCAPS2_D3DTEXTUREMANAGE 0x00020000 +/* indicates managed surface that can safely be lost */ +#define DDSCAPS2_DONOTPERSIST 0x00040000 +/* indicates surface is part of a stereo flipping chain */ +#define DDSCAPS2_STEREOSURFACELEFT 0x00080000 + +typedef struct _DDSCAPS2 { + DWORD dwCaps; /* capabilities of surface wanted */ + DWORD dwCaps2; /* additional capabilities */ + DWORD dwCaps3; /* reserved capabilities */ + DWORD dwCaps4; /* more reserved capabilities */ +} DDSCAPS2,*LPDDSCAPS2; + +#define DD_ROP_SPACE (256/32) /* space required to store ROP array */ + +typedef struct _DDCAPS_DX7 /* DirectX 7 version of caps struct */ +{ + DWORD dwSize; /* size of the DDDRIVERCAPS structure */ + DWORD dwCaps; /* driver specific capabilities */ + DWORD dwCaps2; /* more driver specific capabilities */ + DWORD dwCKeyCaps; /* color key capabilities of the surface */ + DWORD dwFXCaps; /* driver specific stretching and effects capabilities */ + DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */ + DWORD dwPalCaps; /* palette capabilities */ + DWORD dwSVCaps; /* stereo vision capabilities */ + DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */ + DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */ + DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */ + DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */ + DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */ + DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */ + DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */ + DWORD dwVidMemTotal; /* total amount of video memory */ + DWORD dwVidMemFree; /* amount of free video memory */ + DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */ + DWORD dwCurrVisibleOverlays; /* current number of visible overlays */ + DWORD dwNumFourCCCodes; /* number of four cc codes */ + DWORD dwAlignBoundarySrc; /* source rectangle alignment */ + DWORD dwAlignSizeSrc; /* source rectangle byte size */ + DWORD dwAlignBoundaryDest; /* dest rectangle alignment */ + DWORD dwAlignSizeDest; /* dest rectangle byte size */ + DWORD dwAlignStrideAlign; /* stride alignment */ + DWORD dwRops[DD_ROP_SPACE]; /* ROPs supported */ + DDSCAPS ddsOldCaps; /* old DDSCAPS - superseded for DirectX6+ */ + DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwReserved1; + DWORD dwReserved2; + DWORD dwReserved3; + DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */ + DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */ + DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */ + DWORD dwSVBRops[DD_ROP_SPACE];/* ROPs supported for System->Vmem blts */ + DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */ + DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */ + DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */ + DWORD dwVSBRops[DD_ROP_SPACE];/* ROPs supported for Vmem->System blts */ + DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */ + DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */ + DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */ + DWORD dwSSBRops[DD_ROP_SPACE];/* ROPs supported for System->System blts */ + DWORD dwMaxVideoPorts; /* maximum number of usable video ports */ + DWORD dwCurrVideoPorts; /* current number of video ports used */ + DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */ + DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */ + DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */ + DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */ + DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */ + DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPs supported for non-local->local blts */ + DDSCAPS2 ddsCaps; /* surface capabilities */ +} DDCAPS_DX7,*LPDDCAPS_DX7; + +typedef struct _DDCAPS_DX6 /* DirectX 6 version of caps struct */ +{ + DWORD dwSize; /* size of the DDDRIVERCAPS structure */ + DWORD dwCaps; /* driver specific capabilities */ + DWORD dwCaps2; /* more driver specific capabilities */ + DWORD dwCKeyCaps; /* color key capabilities of the surface */ + DWORD dwFXCaps; /* driver specific stretching and effects capabilities */ + DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */ + DWORD dwPalCaps; /* palette capabilities */ + DWORD dwSVCaps; /* stereo vision capabilities */ + DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */ + DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */ + DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */ + DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */ + DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */ + DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */ + DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */ + DWORD dwVidMemTotal; /* total amount of video memory */ + DWORD dwVidMemFree; /* amount of free video memory */ + DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */ + DWORD dwCurrVisibleOverlays; /* current number of visible overlays */ + DWORD dwNumFourCCCodes; /* number of four cc codes */ + DWORD dwAlignBoundarySrc; /* source rectangle alignment */ + DWORD dwAlignSizeSrc; /* source rectangle byte size */ + DWORD dwAlignBoundaryDest; /* dest rectangle alignment */ + DWORD dwAlignSizeDest; /* dest rectangle byte size */ + DWORD dwAlignStrideAlign; /* stride alignment */ + DWORD dwRops[DD_ROP_SPACE]; /* ROPs supported */ + DDSCAPS ddsOldCaps; /* old DDSCAPS - superseded for DirectX6+ */ + DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwReserved1; + DWORD dwReserved2; + DWORD dwReserved3; + DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */ + DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */ + DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */ + DWORD dwSVBRops[DD_ROP_SPACE];/* ROPs supported for System->Vmem blts */ + DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */ + DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */ + DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */ + DWORD dwVSBRops[DD_ROP_SPACE];/* ROPs supported for Vmem->System blts */ + DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */ + DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */ + DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */ + DWORD dwSSBRops[DD_ROP_SPACE];/* ROPs supported for System->System blts */ + DWORD dwMaxVideoPorts; /* maximum number of usable video ports */ + DWORD dwCurrVideoPorts; /* current number of video ports used */ + DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */ + DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */ + DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */ + DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */ + DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */ + DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPs supported for non-local->local blts */ + /* and one new member for DirectX 6 */ + DDSCAPS2 ddsCaps; /* surface capabilities */ +} DDCAPS_DX6,*LPDDCAPS_DX6; + +typedef struct _DDCAPS_DX5 /* DirectX5 version of caps struct */ +{ + DWORD dwSize; /* size of the DDDRIVERCAPS structure */ + DWORD dwCaps; /* driver specific capabilities */ + DWORD dwCaps2; /* more driver specific capabilities */ + DWORD dwCKeyCaps; /* color key capabilities of the surface */ + DWORD dwFXCaps; /* driver specific stretching and effects capabilities */ + DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */ + DWORD dwPalCaps; /* palette capabilities */ + DWORD dwSVCaps; /* stereo vision capabilities */ + DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */ + DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */ + DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */ + DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */ + DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */ + DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */ + DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */ + DWORD dwVidMemTotal; /* total amount of video memory */ + DWORD dwVidMemFree; /* amount of free video memory */ + DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */ + DWORD dwCurrVisibleOverlays; /* current number of visible overlays */ + DWORD dwNumFourCCCodes; /* number of four cc codes */ + DWORD dwAlignBoundarySrc; /* source rectangle alignment */ + DWORD dwAlignSizeSrc; /* source rectangle byte size */ + DWORD dwAlignBoundaryDest; /* dest rectangle alignment */ + DWORD dwAlignSizeDest; /* dest rectangle byte size */ + DWORD dwAlignStrideAlign; /* stride alignment */ + DWORD dwRops[DD_ROP_SPACE]; /* ROPs supported */ + DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */ + DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwReserved1; + DWORD dwReserved2; + DWORD dwReserved3; + DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */ + DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */ + DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */ + DWORD dwSVBRops[DD_ROP_SPACE];/* ROPs supported for System->Vmem blts */ + DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */ + DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */ + DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */ + DWORD dwVSBRops[DD_ROP_SPACE];/* ROPs supported for Vmem->System blts */ + DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */ + DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */ + DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */ + DWORD dwSSBRops[DD_ROP_SPACE];/* ROPs supported for System->System blts */ + /* the following are the new DirectX 5 members */ + DWORD dwMaxVideoPorts; /* maximum number of usable video ports */ + DWORD dwCurrVideoPorts; /* current number of video ports used */ + DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */ + DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */ + DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */ + DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */ + DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */ + DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPs supported for non-local->local blts */ +} DDCAPS_DX5,*LPDDCAPS_DX5; + +typedef struct _DDCAPS_DX3 /* DirectX3 version of caps struct */ +{ + DWORD dwSize; /* size of the DDDRIVERCAPS structure */ + DWORD dwCaps; /* driver specific capabilities */ + DWORD dwCaps2; /* more driver specific capabilities */ + DWORD dwCKeyCaps; /* color key capabilities of the surface */ + DWORD dwFXCaps; /* driver specific stretching and effects capabilities */ + DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */ + DWORD dwPalCaps; /* palette capabilities */ + DWORD dwSVCaps; /* stereo vision capabilities */ + DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */ + DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */ + DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */ + DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */ + DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */ + DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */ + DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */ + DWORD dwVidMemTotal; /* total amount of video memory */ + DWORD dwVidMemFree; /* amount of free video memory */ + DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */ + DWORD dwCurrVisibleOverlays; /* current number of visible overlays */ + DWORD dwNumFourCCCodes; /* number of four cc codes */ + DWORD dwAlignBoundarySrc; /* source rectangle alignment */ + DWORD dwAlignSizeSrc; /* source rectangle byte size */ + DWORD dwAlignBoundaryDest; /* dest rectangle alignment */ + DWORD dwAlignSizeDest; /* dest rectangle byte size */ + DWORD dwAlignStrideAlign; /* stride alignment */ + DWORD dwRops[DD_ROP_SPACE]; /* ROPs supported */ + DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */ + DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ + DWORD dwReserved1; + DWORD dwReserved2; + DWORD dwReserved3; + DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */ + DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */ + DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */ + DWORD dwSVBRops[DD_ROP_SPACE];/* ROPs supported for System->Vmem blts */ + DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */ + DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */ + DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */ + DWORD dwVSBRops[DD_ROP_SPACE];/* ROPs supported for Vmem->System blts */ + DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */ + DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */ + DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */ + DWORD dwSSBRops[DD_ROP_SPACE];/* ROPs supported for System->System blts */ + DWORD dwReserved4; + DWORD dwReserved5; + DWORD dwReserved6; +} DDCAPS_DX3,*LPDDCAPS_DX3; + +/* set caps struct according to DIRECTDRAW_VERSION */ + +#if DIRECTDRAW_VERSION <= 0x300 +typedef DDCAPS_DX3 DDCAPS; +#elif DIRECTDRAW_VERSION <= 0x500 +typedef DDCAPS_DX5 DDCAPS; +#elif DIRECTDRAW_VERSION <= 0x600 +typedef DDCAPS_DX6 DDCAPS; +#else +typedef DDCAPS_DX7 DDCAPS; +#endif + +typedef DDCAPS *LPDDCAPS; + +/* DDCAPS.dwCaps */ +#define DDCAPS_3D 0x00000001 +#define DDCAPS_ALIGNBOUNDARYDEST 0x00000002 +#define DDCAPS_ALIGNSIZEDEST 0x00000004 +#define DDCAPS_ALIGNBOUNDARYSRC 0x00000008 +#define DDCAPS_ALIGNSIZESRC 0x00000010 +#define DDCAPS_ALIGNSTRIDE 0x00000020 +#define DDCAPS_BLT 0x00000040 +#define DDCAPS_BLTQUEUE 0x00000080 +#define DDCAPS_BLTFOURCC 0x00000100 +#define DDCAPS_BLTSTRETCH 0x00000200 +#define DDCAPS_GDI 0x00000400 +#define DDCAPS_OVERLAY 0x00000800 +#define DDCAPS_OVERLAYCANTCLIP 0x00001000 +#define DDCAPS_OVERLAYFOURCC 0x00002000 +#define DDCAPS_OVERLAYSTRETCH 0x00004000 +#define DDCAPS_PALETTE 0x00008000 +#define DDCAPS_PALETTEVSYNC 0x00010000 +#define DDCAPS_READSCANLINE 0x00020000 +#define DDCAPS_STEREOVIEW 0x00040000 +#define DDCAPS_VBI 0x00080000 +#define DDCAPS_ZBLTS 0x00100000 +#define DDCAPS_ZOVERLAYS 0x00200000 +#define DDCAPS_COLORKEY 0x00400000 +#define DDCAPS_ALPHA 0x00800000 +#define DDCAPS_COLORKEYHWASSIST 0x01000000 +#define DDCAPS_NOHARDWARE 0x02000000 +#define DDCAPS_BLTCOLORFILL 0x04000000 +#define DDCAPS_BANKSWITCHED 0x08000000 +#define DDCAPS_BLTDEPTHFILL 0x10000000 +#define DDCAPS_CANCLIP 0x20000000 +#define DDCAPS_CANCLIPSTRETCHED 0x40000000 +#define DDCAPS_CANBLTSYSMEM 0x80000000 + +/* DDCAPS.dwCaps2 */ +#define DDCAPS2_CERTIFIED 0x00000001 +#define DDCAPS2_NO2DDURING3DSCENE 0x00000002 +#define DDCAPS2_VIDEOPORT 0x00000004 +#define DDCAPS2_AUTOFLIPOVERLAY 0x00000008 +#define DDCAPS2_CANBOBINTERLEAVED 0x00000010 +#define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020 +#define DDCAPS2_COLORCONTROLOVERLAY 0x00000040 +#define DDCAPS2_COLORCONTROLPRIMARY 0x00000080 +#define DDCAPS2_CANDROPZ16BIT 0x00000100 +#define DDCAPS2_NONLOCALVIDMEM 0x00000200 +#define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400 +#define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800 +#define DDCAPS2_WIDESURFACES 0x00001000 +#define DDCAPS2_CANFLIPODDEVEN 0x00002000 +#define DDCAPS2_CANBOBHARDWARE 0x00004000 +#define DDCAPS2_COPYFOURCC 0x00008000 +#define DDCAPS2_PRIMARYGAMMA 0x00020000 +#define DDCAPS2_CANRENDERWINDOWED 0x00080000 +#define DDCAPS2_CANCALIBRATEGAMMA 0x00100000 +#define DDCAPS2_FLIPINTERVAL 0x00200000 +#define DDCAPS2_FLIPNOVSYNC 0x00400000 +#define DDCAPS2_CANMANAGETEXTURE 0x00800000 +#define DDCAPS2_TEXMANINNONLOCALVIDMEM 0x01000000 +#define DDCAPS2_STEREO 0x02000000 +#define DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL 0x04000000 + + +/* Set/Get Colour Key Flags */ +#define DDCKEY_COLORSPACE 0x00000001 /* Struct is single colour space */ +#define DDCKEY_DESTBLT 0x00000002 /* To be used as dest for blt */ +#define DDCKEY_DESTOVERLAY 0x00000004 /* To be used as dest for CK overlays */ +#define DDCKEY_SRCBLT 0x00000008 /* To be used as src for blt */ +#define DDCKEY_SRCOVERLAY 0x00000010 /* To be used as src for CK overlays */ + +typedef struct _DDCOLORKEY +{ + DWORD dwColorSpaceLowValue;/* low boundary of color space that is to + * be treated as Color Key, inclusive + */ + DWORD dwColorSpaceHighValue;/* high boundary of color space that is + * to be treated as Color Key, inclusive + */ +} DDCOLORKEY,*LPDDCOLORKEY; + +/* ddCKEYCAPS bits */ +#define DDCKEYCAPS_DESTBLT 0x00000001 +#define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002 +#define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004 +#define DDCKEYCAPS_DESTBLTYUV 0x00000008 +#define DDCKEYCAPS_DESTOVERLAY 0x00000010 +#define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020 +#define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040 +#define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080 +#define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100 +#define DDCKEYCAPS_SRCBLT 0x00000200 +#define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400 +#define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800 +#define DDCKEYCAPS_SRCBLTYUV 0x00001000 +#define DDCKEYCAPS_SRCOVERLAY 0x00002000 +#define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000 +#define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000 +#define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000 +#define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000 +#define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000 + +typedef struct _DDPIXELFORMAT { + DWORD dwSize; /* 0: size of structure */ + DWORD dwFlags; /* 4: pixel format flags */ + DWORD dwFourCC; /* 8: (FOURCC code) */ + union { + DWORD dwRGBBitCount; /* C: how many bits per pixel */ + DWORD dwYUVBitCount; /* C: how many bits per pixel */ + DWORD dwZBufferBitDepth; /* C: how many bits for z buffers */ + DWORD dwAlphaBitDepth; /* C: how many bits for alpha channels*/ + DWORD dwLuminanceBitCount; + DWORD dwBumpBitCount; + }; + union { + DWORD dwRBitMask; /* 10: mask for red bit*/ + DWORD dwYBitMask; /* 10: mask for Y bits*/ + DWORD dwStencilBitDepth; + DWORD dwLuminanceBitMask; + DWORD dwBumpDuBitMask; + }; + union { + DWORD dwGBitMask; /* 14: mask for green bits*/ + DWORD dwUBitMask; /* 14: mask for U bits*/ + DWORD dwZBitMask; + DWORD dwBumpDvBitMask; + }; + union { + DWORD dwBBitMask; /* 18: mask for blue bits*/ + DWORD dwVBitMask; /* 18: mask for V bits*/ + DWORD dwStencilBitMask; + DWORD dwBumpLuminanceBitMask; + }; + union { + DWORD dwRGBAlphaBitMask; /* 1C: mask for alpha channel */ + DWORD dwYUVAlphaBitMask; /* 1C: mask for alpha channel */ + DWORD dwLuminanceAlphaBitMask; + DWORD dwRGBZBitMask; /* 1C: mask for Z channel */ + DWORD dwYUVZBitMask; /* 1C: mask for Z channel */ + }; + /* 20: next structure */ +} DDPIXELFORMAT,*LPDDPIXELFORMAT; + +#define MAKEFOURCC(ch0, ch1, ch2, ch3) \ + ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \ + ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 )) + +/* DDCAPS.dwFXCaps */ +#define DDFXCAPS_BLTALPHA 0x00000001 +#define DDFXCAPS_OVERLAYALPHA 0x00000004 +#define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010 +#define DDFXCAPS_BLTARITHSTRETCHY 0x00000020 +#define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040 +#define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080 +#define DDFXCAPS_BLTROTATION 0x00000100 +#define DDFXCAPS_BLTROTATION90 0x00000200 +#define DDFXCAPS_BLTSHRINKX 0x00000400 +#define DDFXCAPS_BLTSHRINKXN 0x00000800 +#define DDFXCAPS_BLTSHRINKY 0x00001000 +#define DDFXCAPS_BLTSHRINKYN 0x00002000 +#define DDFXCAPS_BLTSTRETCHX 0x00004000 +#define DDFXCAPS_BLTSTRETCHXN 0x00008000 +#define DDFXCAPS_BLTSTRETCHY 0x00010000 +#define DDFXCAPS_BLTSTRETCHYN 0x00020000 +#define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000 +#define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008 +#define DDFXCAPS_OVERLAYSHRINKX 0x00080000 +#define DDFXCAPS_OVERLAYSHRINKXN 0x00100000 +#define DDFXCAPS_OVERLAYSHRINKY 0x00200000 +#define DDFXCAPS_OVERLAYSHRINKYN 0x00400000 +#define DDFXCAPS_OVERLAYSTRETCHX 0x00800000 +#define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000 +#define DDFXCAPS_OVERLAYSTRETCHY 0x02000000 +#define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000 +#define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000 +#define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000 + +#define DDFXCAPS_OVERLAYFILTER DDFXCAPS_OVERLAYARITHSTRETCHY + +/* DDCAPS.dwFXAlphaCaps */ +#define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001 +#define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002 +#define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004 +#define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008 +#define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010 +#define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020 +#define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040 +#define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080 +#define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100 +#define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200 + +/* DDCAPS.dwPalCaps */ +#define DDPCAPS_4BIT 0x00000001 +#define DDPCAPS_8BITENTRIES 0x00000002 +#define DDPCAPS_8BIT 0x00000004 +#define DDPCAPS_INITIALIZE 0x00000008 +#define DDPCAPS_PRIMARYSURFACE 0x00000010 +#define DDPCAPS_PRIMARYSURFACELEFT 0x00000020 +#define DDPCAPS_ALLOW256 0x00000040 +#define DDPCAPS_VSYNC 0x00000080 +#define DDPCAPS_1BIT 0x00000100 +#define DDPCAPS_2BIT 0x00000200 +#define DDPCAPS_ALPHA 0x00000400 + +/* DDCAPS.dwSVCaps */ +/* the first 4 of these are now obsolete */ +#if DIRECTDRAW_VERSION >= 0x700 /* FIXME: I'm not sure when this switch occurred */ +#define DDSVCAPS_RESERVED1 0x00000001 +#define DDSVCAPS_RESERVED2 0x00000002 +#define DDSVCAPS_RESERVED3 0x00000004 +#define DDSVCAPS_RESERVED4 0x00000008 +#else +#define DDSVCAPS_ENIGMA 0x00000001 +#define DDSVCAPS_FLICKER 0x00000002 +#define DDSVCAPS_REDBLUE 0x00000004 +#define DDSVCAPS_SPLIT 0x00000008 +#endif +#define DDSVCAPS_STEREOSEQUENTIAL 0x00000010 + +/* BitDepths */ +#define DDBD_1 0x00004000 +#define DDBD_2 0x00002000 +#define DDBD_4 0x00001000 +#define DDBD_8 0x00000800 +#define DDBD_16 0x00000400 +#define DDBD_24 0x00000200 +#define DDBD_32 0x00000100 + +/* DDOVERLAYFX.dwDDFX */ +#define DDOVERFX_ARITHSTRETCHY 0x00000001 +#define DDOVERFX_MIRRORLEFTRIGHT 0x00000002 +#define DDOVERFX_MIRRORUPDOWN 0x00000004 + +/* UpdateOverlay flags */ +#define DDOVER_ALPHADEST 0x00000001 +#define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002 +#define DDOVER_ALPHADESTNEG 0x00000004 +#define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008 +#define DDOVER_ALPHAEDGEBLEND 0x00000010 +#define DDOVER_ALPHASRC 0x00000020 +#define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040 +#define DDOVER_ALPHASRCNEG 0x00000080 +#define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100 +#define DDOVER_HIDE 0x00000200 +#define DDOVER_KEYDEST 0x00000400 +#define DDOVER_KEYDESTOVERRIDE 0x00000800 +#define DDOVER_KEYSRC 0x00001000 +#define DDOVER_KEYSRCOVERRIDE 0x00002000 +#define DDOVER_SHOW 0x00004000 +#define DDOVER_ADDDIRTYRECT 0x00008000 +#define DDOVER_REFRESHDIRTYRECTS 0x00010000 +#define DDOVER_REFRESHALL 0x00020000 +#define DDOVER_DDFX 0x00080000 +#define DDOVER_AUTOFLIP 0x00100000 +#define DDOVER_BOB 0x00200000 +#define DDOVER_OVERRIDEBOBWEAVE 0x00400000 +#define DDOVER_INTERLEAVED 0x00800000 + +/* DDCOLORKEY.dwFlags */ +#define DDPF_ALPHAPIXELS 0x00000001 +#define DDPF_ALPHA 0x00000002 +#define DDPF_FOURCC 0x00000004 +#define DDPF_PALETTEINDEXED4 0x00000008 +#define DDPF_PALETTEINDEXEDTO8 0x00000010 +#define DDPF_PALETTEINDEXED8 0x00000020 +#define DDPF_RGB 0x00000040 +#define DDPF_COMPRESSED 0x00000080 +#define DDPF_RGBTOYUV 0x00000100 +#define DDPF_YUV 0x00000200 +#define DDPF_ZBUFFER 0x00000400 +#define DDPF_PALETTEINDEXED1 0x00000800 +#define DDPF_PALETTEINDEXED2 0x00001000 +#define DDPF_ZPIXELS 0x00002000 +#define DDPF_STENCILBUFFER 0x00004000 +#define DDPF_ALPHAPREMULT 0x00008000 +#define DDPF_LUMINANCE 0x00020000 +#define DDPF_BUMPLUMINANCE 0x00040000 +#define DDPF_BUMPDUDV 0x00080000 + +/* SetCooperativeLevel dwFlags */ +#define DDSCL_FULLSCREEN 0x00000001 +#define DDSCL_ALLOWREBOOT 0x00000002 +#define DDSCL_NOWINDOWCHANGES 0x00000004 +#define DDSCL_NORMAL 0x00000008 +#define DDSCL_EXCLUSIVE 0x00000010 +#define DDSCL_ALLOWMODEX 0x00000040 +#define DDSCL_SETFOCUSWINDOW 0x00000080 +#define DDSCL_SETDEVICEWINDOW 0x00000100 +#define DDSCL_CREATEDEVICEWINDOW 0x00000200 +#define DDSCL_MULTITHREADED 0x00000400 +#define DDSCL_FPUSETUP 0x00000800 +#define DDSCL_FPUPRESERVE 0x00001000 + + +/* DDSURFACEDESC.dwFlags */ +#define DDSD_CAPS 0x00000001 +#define DDSD_HEIGHT 0x00000002 +#define DDSD_WIDTH 0x00000004 +#define DDSD_PITCH 0x00000008 +#define DDSD_BACKBUFFERCOUNT 0x00000020 +#define DDSD_ZBUFFERBITDEPTH 0x00000040 +#define DDSD_ALPHABITDEPTH 0x00000080 +#define DDSD_LPSURFACE 0x00000800 +#define DDSD_PIXELFORMAT 0x00001000 +#define DDSD_CKDESTOVERLAY 0x00002000 +#define DDSD_CKDESTBLT 0x00004000 +#define DDSD_CKSRCOVERLAY 0x00008000 +#define DDSD_CKSRCBLT 0x00010000 +#define DDSD_MIPMAPCOUNT 0x00020000 +#define DDSD_REFRESHRATE 0x00040000 +#define DDSD_LINEARSIZE 0x00080000 +#define DDSD_TEXTURESTAGE 0x00100000 +#define DDSD_FVF 0x00200000 +#define DDSD_SRCVBHANDLE 0x00400000 +#define DDSD_DEPTH 0x00800000 +#define DDSD_ALL 0x00fff9ee + +/* EnumSurfaces flags */ +#define DDENUMSURFACES_ALL 0x00000001 +#define DDENUMSURFACES_MATCH 0x00000002 +#define DDENUMSURFACES_NOMATCH 0x00000004 +#define DDENUMSURFACES_CANBECREATED 0x00000008 +#define DDENUMSURFACES_DOESEXIST 0x00000010 + +/* SetDisplayMode flags */ +#define DDSDM_STANDARDVGAMODE 0x00000001 + +/* EnumDisplayModes flags */ +#define DDEDM_REFRESHRATES 0x00000001 +#define DDEDM_STANDARDVGAMODES 0x00000002 + +/* WaitForVerticalDisplay flags */ + +#define DDWAITVB_BLOCKBEGIN 0x00000001 +#define DDWAITVB_BLOCKBEGINEVENT 0x00000002 +#define DDWAITVB_BLOCKEND 0x00000004 + +typedef struct _DDSURFACEDESC +{ + DWORD dwSize; /* 0: size of the DDSURFACEDESC structure*/ + DWORD dwFlags; /* 4: determines what fields are valid*/ + DWORD dwHeight; /* 8: height of surface to be created*/ + DWORD dwWidth; /* C: width of input surface*/ + union { + LONG lPitch; /* 10: distance to start of next line (return value only)*/ + DWORD dwLinearSize; + }; + DWORD dwBackBufferCount;/* 14: number of back buffers requested*/ + union { + DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/ + DWORD dwZBufferBitDepth;/*18: depth of Z buffer requested*/ + DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/ + }; + DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/ + DWORD dwReserved; /* 20:reserved*/ + LPVOID lpSurface; /* 24:pointer to the associated surface memory*/ + DDCOLORKEY ddckCKDestOverlay;/* 28: CK for dest overlay use*/ + DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/ + DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/ + DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/ + DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/ + DDSCAPS ddsCaps; /* 68: direct draw surface caps */ +} DDSURFACEDESC,*LPDDSURFACEDESC; + +typedef struct _DDSURFACEDESC2 +{ + DWORD dwSize; /* 0: size of the DDSURFACEDESC2 structure*/ + DWORD dwFlags; /* 4: determines what fields are valid*/ + DWORD dwHeight; /* 8: height of surface to be created*/ + DWORD dwWidth; /* C: width of input surface*/ + union { + LONG lPitch; /*10: distance to start of next line (return value only)*/ + DWORD dwLinearSize; /*10: formless late-allocated optimized surface size */ + }; + DWORD dwBackBufferCount;/* 14: number of back buffers requested*/ + union { + DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/ + DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/ + DWORD dwSrcVBHandle;/* 18:source used in VB::Optimize */ + }; + DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/ + DWORD dwReserved; /* 20:reserved*/ + LPVOID lpSurface; /* 24:pointer to the associated surface memory*/ + union { + DDCOLORKEY ddckCKDestOverlay; /* 28: CK for dest overlay use*/ + DWORD dwEmptyFaceColor; /* 28: color for empty cubemap faces */ + }; + DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/ + DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/ + DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/ + + union { + DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/ + DWORD dwFVF; /* 48: vertex format description of vertex buffers */ + }; + DDSCAPS2 ddsCaps; /* 68: DDraw surface caps */ + DWORD dwTextureStage; /* 78: stage in multitexture cascade */ +} DDSURFACEDESC2,*LPDDSURFACEDESC2; + +/* DDCOLORCONTROL.dwFlags */ +#define DDCOLOR_BRIGHTNESS 0x00000001 +#define DDCOLOR_CONTRAST 0x00000002 +#define DDCOLOR_HUE 0x00000004 +#define DDCOLOR_SATURATION 0x00000008 +#define DDCOLOR_SHARPNESS 0x00000010 +#define DDCOLOR_GAMMA 0x00000020 +#define DDCOLOR_COLORENABLE 0x00000040 + +typedef struct { + DWORD dwSize; + DWORD dwFlags; + LONG lBrightness; + LONG lContrast; + LONG lHue; + LONG lSaturation; + LONG lSharpness; + LONG lGamma; + LONG lColorEnable; + DWORD dwReserved1; +} DDCOLORCONTROL,*LPDDCOLORCONTROL; + +typedef struct { + WORD red[256]; + WORD green[256]; + WORD blue[256]; +} DDGAMMARAMP,*LPDDGAMMARAMP; + +typedef BOOL (CALLBACK *LPDDENUMCALLBACKA)(GUID *, LPSTR, LPSTR, LPVOID); +typedef BOOL (CALLBACK *LPDDENUMCALLBACKW)(GUID *, LPWSTR, LPWSTR, LPVOID); +DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACK) + +typedef HRESULT (CALLBACK *LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID); +typedef HRESULT (CALLBACK *LPDDENUMMODESCALLBACK2)(LPDDSURFACEDESC2, LPVOID); +typedef HRESULT (CALLBACK *LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID); +typedef HRESULT (CALLBACK *LPDDENUMSURFACESCALLBACK2)(LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2, LPVOID); +typedef HRESULT (CALLBACK *LPDDENUMSURFACESCALLBACK7)(LPDIRECTDRAWSURFACE7, LPDDSURFACEDESC2, LPVOID); + +typedef BOOL (CALLBACK *LPDDENUMCALLBACKEXA)(GUID *, LPSTR, LPSTR, LPVOID, HMONITOR); +typedef BOOL (CALLBACK *LPDDENUMCALLBACKEXW)(GUID *, LPWSTR, LPWSTR, LPVOID, HMONITOR); +DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACKEX) + +HRESULT WINAPI DirectDrawEnumerateA(LPDDENUMCALLBACKA,LPVOID); +HRESULT WINAPI DirectDrawEnumerateW(LPDDENUMCALLBACKW,LPVOID); +#define DirectDrawEnumerate WINELIB_NAME_AW(DirectDrawEnumerate) + +HRESULT WINAPI DirectDrawEnumerateExA( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags); +HRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags); +#define DirectDrawEnumerateEx WINELIB_NAME_AW(DirectDrawEnumerateEx) + +typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXA)( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags); +typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXW)( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags); +DECL_WINELIB_TYPE_AW(LPDIRECTDRAWENUMERATEEX) + +/* flags for DirectDrawEnumerateEx */ +#define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001 +#define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002 +#define DDENUM_NONDISPLAYDEVICES 0x00000004 + +/* flags for DirectDrawCreate or IDirectDraw::Initialize */ +#define DDCREATE_HARDWAREONLY 1L +#define DDCREATE_EMULATIONONLY 2L + +typedef struct _DDBLTFX +{ + DWORD dwSize; /* size of structure */ + DWORD dwDDFX; /* FX operations */ + DWORD dwROP; /* Win32 raster operations */ + DWORD dwDDROP; /* Raster operations new for DirectDraw */ + DWORD dwRotationAngle; /* Rotation angle for blt */ + DWORD dwZBufferOpCode; /* ZBuffer compares */ + DWORD dwZBufferLow; /* Low limit of Z buffer */ + DWORD dwZBufferHigh; /* High limit of Z buffer */ + DWORD dwZBufferBaseDest; /* Destination base value */ + DWORD dwZDestConstBitDepth; /* Bit depth used to specify Z constant for destination */ + union + { + DWORD dwZDestConst; /* Constant to use as Z buffer for dest */ + LPDIRECTDRAWSURFACE lpDDSZBufferDest; /* Surface to use as Z buffer for dest */ + }; + DWORD dwZSrcConstBitDepth; /* Bit depth used to specify Z constant for source */ + union + { + DWORD dwZSrcConst; /* Constant to use as Z buffer for src */ + LPDIRECTDRAWSURFACE lpDDSZBufferSrc; /* Surface to use as Z buffer for src */ + }; + DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */ + DWORD dwAlphaEdgeBlend; /* Alpha for edge blending */ + DWORD dwReserved; + DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */ + union + { + DWORD dwAlphaDestConst; /* Constant to use as Alpha Channel */ + LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as Alpha Channel */ + }; + DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */ + union + { + DWORD dwAlphaSrcConst; /* Constant to use as Alpha Channel */ + LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as Alpha Channel */ + }; + union + { + DWORD dwFillColor; /* color in RGB or Palettized */ + DWORD dwFillDepth; /* depth value for z-buffer */ + DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */ + LPDIRECTDRAWSURFACE lpDDSPattern; /* Surface to use as pattern */ + }; + DDCOLORKEY ddckDestColorkey; /* DestColorkey override */ + DDCOLORKEY ddckSrcColorkey; /* SrcColorkey override */ +} DDBLTFX,*LPDDBLTFX; + +/* dwDDFX */ +/* arithmetic stretching along y axis */ +#define DDBLTFX_ARITHSTRETCHY 0x00000001 +/* mirror on y axis */ +#define DDBLTFX_MIRRORLEFTRIGHT 0x00000002 +/* mirror on x axis */ +#define DDBLTFX_MIRRORUPDOWN 0x00000004 +/* do not tear */ +#define DDBLTFX_NOTEARING 0x00000008 +/* 180 degrees clockwise rotation */ +#define DDBLTFX_ROTATE180 0x00000010 +/* 270 degrees clockwise rotation */ +#define DDBLTFX_ROTATE270 0x00000020 +/* 90 degrees clockwise rotation */ +#define DDBLTFX_ROTATE90 0x00000040 +/* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */ +#define DDBLTFX_ZBUFFERRANGE 0x00000080 +/* add dwZBufferBaseDest to every source z value before compare */ +#define DDBLTFX_ZBUFFERBASEDEST 0x00000100 + +typedef struct _DDOVERLAYFX +{ + DWORD dwSize; /* size of structure */ + DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */ + DWORD dwAlphaEdgeBlend; /* Constant to use as alpha for edge blend */ + DWORD dwReserved; + DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */ + union + { + DWORD dwAlphaDestConst; /* Constant to use as alpha channel for dest */ + LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as alpha channel for dest */ + }; + DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */ + union + { + DWORD dwAlphaSrcConst; /* Constant to use as alpha channel for src */ + LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as alpha channel for src */ + }; + DDCOLORKEY dckDestColorkey; /* DestColorkey override */ + DDCOLORKEY dckSrcColorkey; /* DestColorkey override */ + DWORD dwDDFX; /* Overlay FX */ + DWORD dwFlags; /* flags */ +} DDOVERLAYFX,*LPDDOVERLAYFX; + +typedef struct _DDBLTBATCH +{ + LPRECT lprDest; + LPDIRECTDRAWSURFACE lpDDSSrc; + LPRECT lprSrc; + DWORD dwFlags; + LPDDBLTFX lpDDBltFx; +} DDBLTBATCH,*LPDDBLTBATCH; + +#define MAX_DDDEVICEID_STRING 512 + +#define DDGDI_GETHOSTIDENTIFIER 1 + +typedef struct tagDDDEVICEIDENTIFIER { + char szDriver[MAX_DDDEVICEID_STRING]; + char szDescription[MAX_DDDEVICEID_STRING]; + LARGE_INTEGER liDriverVersion; + DWORD dwVendorId; + DWORD dwDeviceId; + DWORD dwSubSysId; + DWORD dwRevision; + GUID guidDeviceIdentifier; +} DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER; + +typedef struct tagDDDEVICEIDENTIFIER2 { + char szDriver[MAX_DDDEVICEID_STRING]; /* user readable driver name */ + char szDescription[MAX_DDDEVICEID_STRING]; /* user readable description */ + LARGE_INTEGER liDriverVersion; /* driver version */ + DWORD dwVendorId; /* vendor ID, zero if unknown */ + DWORD dwDeviceId; /* chipset ID, zero if unknown */ + DWORD dwSubSysId; /* board ID, zero if unknown */ + DWORD dwRevision; /* chipset version, zero if unknown */ + GUID guidDeviceIdentifier; /* unique ID for this driver/chipset combination */ + DWORD dwWHQLLevel; /* Windows Hardware Quality Lab certification level */ +} DDDEVICEIDENTIFIER2, * LPDDDEVICEIDENTIFIER2; + +/***************************************************************************** + * IDirectDrawPalette interface + */ +#undef INTERFACE +#define INTERFACE IDirectDrawPalette +DECLARE_INTERFACE_(IDirectDrawPalette,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectDrawPalette methods ***/ + STDMETHOD(GetCaps)(THIS_ LPDWORD lpdwCaps) PURE; + STDMETHOD(GetEntries)(THIS_ DWORD dwFlags, DWORD dwBase, DWORD dwNumEntries, LPPALETTEENTRY lpEntries) PURE; + STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, DWORD dwFlags, LPPALETTEENTRY lpDDColorTable) PURE; + STDMETHOD(SetEntries)(THIS_ DWORD dwFlags, DWORD dwStartingEntry, DWORD dwCount, LPPALETTEENTRY lpEntries) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectDrawPalette_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectDrawPalette_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDrawPalette_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectDrawPalette methods ***/ +#define IDirectDrawPalette_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectDrawPalette_GetEntries(p,a,b,c,d) (p)->lpVtbl->GetEntries(p,a,b,c,d) +#define IDirectDrawPalette_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c) +#define IDirectDrawPalette_SetEntries(p,a,b,c,d) (p)->lpVtbl->SetEntries(p,a,b,c,d) +#else +/*** IUnknown methods ***/ +#define IDirectDrawPalette_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectDrawPalette_AddRef(p) (p)->AddRef() +#define IDirectDrawPalette_Release(p) (p)->Release() +/*** IDirectDrawPalette methods ***/ +#define IDirectDrawPalette_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectDrawPalette_GetEntries(p,a,b,c,d) (p)->GetEntries(a,b,c,d) +#define IDirectDrawPalette_Initialize(p,a,b,c) (p)->Initialize(a,b,c) +#define IDirectDrawPalette_SetEntries(p,a,b,c,d) (p)->SetEntries(a,b,c,d) +#endif + + +/***************************************************************************** + * IDirectDrawClipper interface + */ +#define INTERFACE IDirectDrawClipper +DECLARE_INTERFACE_(IDirectDrawClipper,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectDrawClipper methods ***/ + STDMETHOD(GetClipList)(THIS_ LPRECT lpRect, LPRGNDATA lpClipList, LPDWORD lpdwSize) PURE; + STDMETHOD(GetHWnd)(THIS_ HWND *lphWnd) PURE; + STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, DWORD dwFlags) PURE; + STDMETHOD(IsClipListChanged)(THIS_ BOOL *lpbChanged) PURE; + STDMETHOD(SetClipList)(THIS_ LPRGNDATA lpClipList, DWORD dwFlags) PURE; + STDMETHOD(SetHWnd)(THIS_ DWORD dwFlags, HWND hWnd) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectDrawClipper_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectDrawClipper_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDrawClipper_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectDrawClipper methods ***/ +#define IDirectDrawClipper_GetClipList(p,a,b,c) (p)->lpVtbl->GetClipList(p,a,b,c) +#define IDirectDrawClipper_GetHWnd(p,a) (p)->lpVtbl->GetHWnd(p,a) +#define IDirectDrawClipper_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectDrawClipper_IsClipListChanged(p,a) (p)->lpVtbl->IsClipListChanged(p,a) +#define IDirectDrawClipper_SetClipList(p,a,b) (p)->lpVtbl->SetClipList(p,a,b) +#define IDirectDrawClipper_SetHWnd(p,a,b) (p)->lpVtbl->SetHWnd(p,a,b) +#else +/*** IUnknown methods ***/ +#define IDirectDrawClipper_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectDrawClipper_AddRef(p) (p)->AddRef() +#define IDirectDrawClipper_Release(p) (p)->Release() +/*** IDirectDrawClipper methods ***/ +#define IDirectDrawClipper_GetClipList(p,a,b,c) (p)->GetClipList(a,b,c) +#define IDirectDrawClipper_GetHWnd(p,a) (p)->GetHWnd(a) +#define IDirectDrawClipper_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectDrawClipper_IsClipListChanged(p,a) (p)->IsClipListChanged(a) +#define IDirectDrawClipper_SetClipList(p,a,b) (p)->SetClipList(a,b) +#define IDirectDrawClipper_SetHWnd(p,a,b) (p)->SetHWnd(a,b) +#endif + + +/***************************************************************************** + * IDirectDraw interface + */ +#define INTERFACE IDirectDraw +DECLARE_INTERFACE_(IDirectDraw,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectDraw methods ***/ + STDMETHOD(Compact)(THIS) PURE; + STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER *lplpDDClipper, IUnknown *pUnkOuter) PURE; + STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE *lplpDDPalette, IUnknown *pUnkOuter) PURE; + STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc, LPDIRECTDRAWSURFACE *lplpDDSurface, IUnknown *pUnkOuter) PURE; + STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDSurface, LPDIRECTDRAWSURFACE *lplpDupDDSurface) PURE; + STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK lpEnumModesCallback) PURE; + STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE; + STDMETHOD(FlipToGDISurface)(THIS) PURE; + STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE; + STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE; + STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE; + STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE *lplpGDIDDSurface) PURE; + STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE; + STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE; + STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE; + STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE; + STDMETHOD(RestoreDisplayMode)(THIS) PURE; + STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE; + STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP) PURE; + STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectDraw_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectDraw_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDraw_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectDraw methods ***/ +#define IDirectDraw_Compact(p) (p)->lpVtbl->Compact(p) +#define IDirectDraw_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c) +#define IDirectDraw_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d) +#define IDirectDraw_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c) +#define IDirectDraw_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b) +#define IDirectDraw_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d) +#define IDirectDraw_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d) +#define IDirectDraw_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p) +#define IDirectDraw_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) +#define IDirectDraw_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a) +#define IDirectDraw_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b) +#define IDirectDraw_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a) +#define IDirectDraw_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a) +#define IDirectDraw_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a) +#define IDirectDraw_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a) +#define IDirectDraw_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirectDraw_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p) +#define IDirectDraw_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b) +#define IDirectDraw_SetDisplayMode(p,a,b,c) (p)->lpVtbl->SetDisplayMode(p,a,b,c) +#define IDirectDraw_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b) +#else +/*** IUnknown methods ***/ +#define IDirectDraw_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectDraw_AddRef(p) (p)->AddRef() +#define IDirectDraw_Release(p) (p)->Release() +/*** IDirectDraw methods ***/ +#define IDirectDraw_Compact(p) (p)->Compact() +#define IDirectDraw_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c) +#define IDirectDraw_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d) +#define IDirectDraw_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c) +#define IDirectDraw_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b) +#define IDirectDraw_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d) +#define IDirectDraw_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d) +#define IDirectDraw_FlipToGDISurface(p) (p)->FlipToGDISurface() +#define IDirectDraw_GetCaps(p,a,b) (p)->GetCaps(a,b) +#define IDirectDraw_GetDisplayMode(p,a) (p)->GetDisplayMode(a) +#define IDirectDraw_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b) +#define IDirectDraw_GetGDISurface(p,a) (p)->GetGDISurface(a) +#define IDirectDraw_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a) +#define IDirectDraw_GetScanLine(p,a) (p)->GetScanLine(a) +#define IDirectDraw_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a) +#define IDirectDraw_Initialize(p,a) (p)->Initialize(a) +#define IDirectDraw_RestoreDisplayMode(p) (p)->RestoreDisplayMode() +#define IDirectDraw_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) +#define IDirectDraw_SetDisplayMode(p,a,b,c) (p)->SetDisplayMode(a,b,c) +#define IDirectDraw_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b) +#endif + + +/* flags for Lock() */ +#define DDLOCK_SURFACEMEMORYPTR 0x00000000 +#define DDLOCK_WAIT 0x00000001 +#define DDLOCK_EVENT 0x00000002 +#define DDLOCK_READONLY 0x00000010 +#define DDLOCK_WRITEONLY 0x00000020 +#define DDLOCK_NOSYSLOCK 0x00000800 +#define DDLOCK_NOOVERWRITE 0x00001000 +#define DDLOCK_DISCARDCONTENTS 0x00002000 + + +/***************************************************************************** + * IDirectDraw2 interface + */ +/* Note: IDirectDraw2 cannot derive from IDirectDraw because the number of + * arguments of SetDisplayMode has changed ! + */ +#define INTERFACE IDirectDraw2 +DECLARE_INTERFACE_(IDirectDraw2,IUnknown) +{ + /*** IUnknown methods ***/ +/*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; +/*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE; +/*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectDraw2 methods ***/ +/*0c*/ STDMETHOD(Compact)(THIS) PURE; +/*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER *lplpDDClipper, IUnknown *pUnkOuter) PURE; +/*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE *lplpDDPalette, IUnknown *pUnkOuter) PURE; +/*18*/ STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc, LPDIRECTDRAWSURFACE *lplpDDSurface, IUnknown *pUnkOuter) PURE; +/*1c*/ STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDSurface, LPDIRECTDRAWSURFACE *lplpDupDDSurface) PURE; +/*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK lpEnumModesCallback) PURE; +/*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE; +/*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE; +/*2c*/ STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE; +/*30*/ STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE; +/*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE; +/*38*/ STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE *lplpGDIDDSurface) PURE; +/*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE; +/*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE; +/*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE; +/*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE; +/*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE; +/*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE; +/*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE; +/*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE; + /* added in v2 */ +/*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectDraw2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectDraw2_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDraw2_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectDraw methods ***/ +#define IDirectDraw2_Compact(p) (p)->lpVtbl->Compact(p) +#define IDirectDraw2_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c) +#define IDirectDraw2_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d) +#define IDirectDraw2_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c) +#define IDirectDraw2_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b) +#define IDirectDraw2_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d) +#define IDirectDraw2_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d) +#define IDirectDraw2_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p) +#define IDirectDraw2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) +#define IDirectDraw2_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a) +#define IDirectDraw2_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b) +#define IDirectDraw2_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a) +#define IDirectDraw2_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a) +#define IDirectDraw2_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a) +#define IDirectDraw2_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a) +#define IDirectDraw2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirectDraw2_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p) +#define IDirectDraw2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b) +#define IDirectDraw2_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e) +#define IDirectDraw2_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b) +/*** IDirectDraw2 methods ***/ +#define IDirectDraw2_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c) +#else +/*** IUnknown methods ***/ +#define IDirectDraw2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectDraw2_AddRef(p) (p)->AddRef() +#define IDirectDraw2_Release(p) (p)->Release() +/*** IDirectDraw methods ***/ +#define IDirectDraw2_Compact(p) (p)->Compact() +#define IDirectDraw2_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c) +#define IDirectDraw2_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d) +#define IDirectDraw2_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c) +#define IDirectDraw2_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b) +#define IDirectDraw2_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d) +#define IDirectDraw2_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d) +#define IDirectDraw2_FlipToGDISurface(p) (p)->FlipToGDISurface() +#define IDirectDraw2_GetCaps(p,a,b) (p)->GetCaps(a,b) +#define IDirectDraw2_GetDisplayMode(p,a) (p)->GetDisplayMode(a) +#define IDirectDraw2_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b) +#define IDirectDraw2_GetGDISurface(p,a) (p)->GetGDISurface(a) +#define IDirectDraw2_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a) +#define IDirectDraw2_GetScanLine(p,a) (p)->GetScanLine(a) +#define IDirectDraw2_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a) +#define IDirectDraw2_Initialize(p,a) (p)->Initialize(a) +#define IDirectDraw2_RestoreDisplayMode(p) (p)->RestoreDisplayMode() +#define IDirectDraw2_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) +#define IDirectDraw2_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e) +#define IDirectDraw2_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b) +/*** IDirectDraw2 methods ***/ +#define IDirectDraw2_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c) +#endif + + +/***************************************************************************** + * IDirectDraw3 interface + */ +#define INTERFACE IDirectDraw3 +DECLARE_INTERFACE_(IDirectDraw3,IUnknown) +{ + /*** IUnknown methods ***/ +/*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; +/*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE; +/*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectDraw2 methods ***/ +/*0c*/ STDMETHOD(Compact)(THIS) PURE; +/*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER *lplpDDClipper, IUnknown *pUnkOuter) PURE; +/*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE *lplpDDPalette, IUnknown *pUnkOuter) PURE; +/*18*/ STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc, LPDIRECTDRAWSURFACE *lplpDDSurface, IUnknown *pUnkOuter) PURE; +/*1c*/ STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDSurface, LPDIRECTDRAWSURFACE *lplpDupDDSurface) PURE; +/*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK lpEnumModesCallback) PURE; +/*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE; +/*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE; +/*2c*/ STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE; +/*30*/ STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE; +/*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE; +/*38*/ STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE *lplpGDIDDSurface) PURE; +/*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE; +/*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE; +/*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE; +/*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE; +/*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE; +/*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE; +/*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE; +/*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE; + /* added in v2 */ +/*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE; + /* added in v3 */ +/*60*/ STDMETHOD(GetSurfaceFromDC)(THIS_ HDC hdc, LPDIRECTDRAWSURFACE *pSurf) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectDraw3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectDraw3_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDraw3_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectDraw methods ***/ +#define IDirectDraw3_Compact(p) (p)->lpVtbl->Compact(p) +#define IDirectDraw3_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c) +#define IDirectDraw3_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d) +#define IDirectDraw3_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c) +#define IDirectDraw3_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b) +#define IDirectDraw3_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d) +#define IDirectDraw3_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d) +#define IDirectDraw3_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p) +#define IDirectDraw3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) +#define IDirectDraw3_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a) +#define IDirectDraw3_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b) +#define IDirectDraw3_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a) +#define IDirectDraw3_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a) +#define IDirectDraw3_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a) +#define IDirectDraw3_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a) +#define IDirectDraw3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirectDraw3_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p) +#define IDirectDraw3_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b) +#define IDirectDraw3_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e) +#define IDirectDraw3_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b) +/*** IDirectDraw2 methods ***/ +#define IDirectDraw3_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c) +/*** IDirectDraw3 methods ***/ +#define IDirectDraw3_GetSurfaceFromDC(p,a,b) (p)->lpVtbl->GetSurfaceFromDC(p,a,b) +#else +/*** IUnknown methods ***/ +#define IDirectDraw3_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectDraw3_AddRef(p) (p)->AddRef() +#define IDirectDraw3_Release(p) (p)->Release() +/*** IDirectDraw methods ***/ +#define IDirectDraw3_Compact(p) (p)->Compact() +#define IDirectDraw3_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c) +#define IDirectDraw3_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d) +#define IDirectDraw3_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c) +#define IDirectDraw3_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b) +#define IDirectDraw3_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d) +#define IDirectDraw3_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d) +#define IDirectDraw3_FlipToGDISurface(p) (p)->FlipToGDISurface() +#define IDirectDraw3_GetCaps(p,a,b) (p)->GetCaps(a,b) +#define IDirectDraw3_GetDisplayMode(p,a) (p)->GetDisplayMode(a) +#define IDirectDraw3_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b) +#define IDirectDraw3_GetGDISurface(p,a) (p)->GetGDISurface(a) +#define IDirectDraw3_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a) +#define IDirectDraw3_GetScanLine(p,a) (p)->GetScanLine(a) +#define IDirectDraw3_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a) +#define IDirectDraw3_Initialize(p,a) (p)->Initialize(a) +#define IDirectDraw3_RestoreDisplayMode(p) (p)->RestoreDisplayMode() +#define IDirectDraw3_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) +#define IDirectDraw3_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e) +#define IDirectDraw3_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b) +/*** IDirectDraw2 methods ***/ +#define IDirectDraw3_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c) +/*** IDirectDraw3 methods ***/ +#define IDirectDraw3_GetSurfaceFromDC(p,a,b) (p)->GetSurfaceFromDC(a,b) +#endif + + +/***************************************************************************** + * IDirectDraw4 interface + */ +#define INTERFACE IDirectDraw4 +DECLARE_INTERFACE_(IDirectDraw4,IUnknown) +{ + /*** IUnknown methods ***/ +/*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; +/*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE; +/*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectDraw4 methods ***/ +/*0c*/ STDMETHOD(Compact)(THIS) PURE; +/*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER *lplpDDClipper, IUnknown *pUnkOuter) PURE; +/*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE *lplpDDPalette, IUnknown *pUnkOuter) PURE; +/*18*/ STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc, LPDIRECTDRAWSURFACE4 *lplpDDSurface, IUnknown *pUnkOuter) PURE; +/*1c*/ STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE4 lpDDSurface, LPDIRECTDRAWSURFACE4 *lplpDupDDSurface) PURE; +/*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK2 lpEnumModesCallback) PURE; +/*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK2 lpEnumSurfacesCallback) PURE; +/*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE; +/*2c*/ STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE; +/*30*/ STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE; +/*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE; +/*38*/ STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE4 *lplpGDIDDSurface) PURE; +/*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE; +/*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE; +/*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE; +/*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE; +/*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE; +/*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE; +/*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE; +/*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE; + /* added in v2 */ +/*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2 lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE; + /* added in v4 */ +/*60*/ STDMETHOD(GetSurfaceFromDC)(THIS_ HDC hdc, LPDIRECTDRAWSURFACE4 *pSurf) PURE; +/*64*/ STDMETHOD(RestoreAllSurfaces)(THIS) PURE; +/*68*/ STDMETHOD(TestCooperativeLevel)(THIS) PURE; +/*6c*/ STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER pDDDI, DWORD dwFlags) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectDraw4_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectDraw4_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDraw4_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectDraw methods ***/ +#define IDirectDraw4_Compact(p) (p)->lpVtbl->Compact(p) +#define IDirectDraw4_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c) +#define IDirectDraw4_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d) +#define IDirectDraw4_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c) +#define IDirectDraw4_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b) +#define IDirectDraw4_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d) +#define IDirectDraw4_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d) +#define IDirectDraw4_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p) +#define IDirectDraw4_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) +#define IDirectDraw4_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a) +#define IDirectDraw4_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b) +#define IDirectDraw4_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a) +#define IDirectDraw4_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a) +#define IDirectDraw4_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a) +#define IDirectDraw4_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a) +#define IDirectDraw4_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirectDraw4_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p) +#define IDirectDraw4_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b) +#define IDirectDraw4_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e) +#define IDirectDraw4_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b) +/*** IDirectDraw2 methods ***/ +#define IDirectDraw4_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c) +/*** IDirectDraw4 methods ***/ +#define IDirectDraw4_GetSurfaceFromDC(p,a,b) (p)->lpVtbl->GetSurfaceFromDC(p,a,b) +#define IDirectDraw4_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p) +#define IDirectDraw4_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p) +#define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b) +#else +/*** IUnknown methods ***/ +#define IDirectDraw4_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectDraw4_AddRef(p) (p)->AddRef() +#define IDirectDraw4_Release(p) (p)->Release() +/*** IDirectDraw methods ***/ +#define IDirectDraw4_Compact(p) (p)->Compact() +#define IDirectDraw4_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c) +#define IDirectDraw4_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d) +#define IDirectDraw4_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c) +#define IDirectDraw4_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b) +#define IDirectDraw4_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d) +#define IDirectDraw4_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d) +#define IDirectDraw4_FlipToGDISurface(p) (p)->FlipToGDISurface() +#define IDirectDraw4_GetCaps(p,a,b) (p)->GetCaps(a,b) +#define IDirectDraw4_GetDisplayMode(p,a) (p)->GetDisplayMode(a) +#define IDirectDraw4_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b) +#define IDirectDraw4_GetGDISurface(p,a) (p)->GetGDISurface(a) +#define IDirectDraw4_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a) +#define IDirectDraw4_GetScanLine(p,a) (p)->GetScanLine(a) +#define IDirectDraw4_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a) +#define IDirectDraw4_Initialize(p,a) (p)->Initialize(a) +#define IDirectDraw4_RestoreDisplayMode(p) (p)->RestoreDisplayMode() +#define IDirectDraw4_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) +#define IDirectDraw4_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e) +#define IDirectDraw4_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b) +/*** IDirectDraw2 methods ***/ +#define IDirectDraw4_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c) +/*** IDirectDraw4 methods ***/ +#define IDirectDraw4_GetSurfaceFromDC(p,a,b) (p)->GetSurfaceFromDC(a,b) +#define IDirectDraw4_RestoreAllSurfaces(pc) (p)->RestoreAllSurfaces() +#define IDirectDraw4_TestCooperativeLevel(p) (p)->TestCooperativeLevel() +#define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b) +#endif + + +/***************************************************************************** + * IDirectDraw7 interface + */ +/* Note: IDirectDraw7 cannot derive from IDirectDraw4; it is even documented + * as not interchangeable with earlier DirectDraw interfaces. + */ +#define INTERFACE IDirectDraw7 +DECLARE_INTERFACE_(IDirectDraw7,IUnknown) +{ + /*** IUnknown methods ***/ +/*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; +/*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE; +/*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectDraw7 methods ***/ +/*0c*/ STDMETHOD(Compact)(THIS) PURE; +/*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER *lplpDDClipper, IUnknown *pUnkOuter) PURE; +/*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE *lplpDDPalette, IUnknown *pUnkOuter) PURE; +/*18*/ STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc, LPDIRECTDRAWSURFACE7 *lplpDDSurface, IUnknown *pUnkOuter) PURE; +/*1c*/ STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE7 lpDDSurface, LPDIRECTDRAWSURFACE7 *lplpDupDDSurface) PURE; +/*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK2 lpEnumModesCallback) PURE; +/*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpEnumSurfacesCallback) PURE; +/*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE; +/*2c*/ STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE; +/*30*/ STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE; +/*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE; +/*38*/ STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE7 *lplpGDIDDSurface) PURE; +/*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE; +/*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE; +/*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE; +/*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE; +/*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE; +/*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE; +/*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE; +/*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE; + /* added in v2 */ +/*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2 lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE; + /* added in v4 */ +/*60*/ STDMETHOD(GetSurfaceFromDC)(THIS_ HDC hdc, LPDIRECTDRAWSURFACE7 *pSurf) PURE; +/*64*/ STDMETHOD(RestoreAllSurfaces)(THIS) PURE; +/*68*/ STDMETHOD(TestCooperativeLevel)(THIS) PURE; +/*6c*/ STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER2 pDDDI, DWORD dwFlags) PURE; + /* added in v7 */ +/*70*/ STDMETHOD(StartModeTest)(THIS_ LPSIZE pModes, DWORD dwNumModes, DWORD dwFlags) PURE; +/*74*/ STDMETHOD(EvaluateMode)(THIS_ DWORD dwFlags, DWORD *pTimeout) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectDraw7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectDraw7_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDraw7_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectDraw methods ***/ +#define IDirectDraw7_Compact(p) (p)->lpVtbl->Compact(p) +#define IDirectDraw7_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c) +#define IDirectDraw7_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d) +#define IDirectDraw7_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c) +#define IDirectDraw7_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b) +#define IDirectDraw7_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d) +#define IDirectDraw7_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d) +#define IDirectDraw7_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p) +#define IDirectDraw7_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) +#define IDirectDraw7_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a) +#define IDirectDraw7_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b) +#define IDirectDraw7_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a) +#define IDirectDraw7_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a) +#define IDirectDraw7_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a) +#define IDirectDraw7_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a) +#define IDirectDraw7_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirectDraw7_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p) +#define IDirectDraw7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b) +#define IDirectDraw7_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e) +#define IDirectDraw7_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b) +/*** added in IDirectDraw2 ***/ +#define IDirectDraw7_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c) +/*** added in IDirectDraw4 ***/ +#define IDirectDraw7_GetSurfaceFromDC(p,a,b) (p)->lpVtbl->GetSurfaceFromDC(p,a,b) +#define IDirectDraw7_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p) +#define IDirectDraw7_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p) +#define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b) +/*** added in IDirectDraw 7 ***/ +#define IDirectDraw7_StartModeTest(p,a,b,c) (p)->lpVtbl->StartModeTest(p,a,b,c) +#define IDirectDraw7_EvaluateMode(p,a,b) (p)->lpVtbl->EvaluateMode(p,a,b) +#else +/*** IUnknown methods ***/ +#define IDirectDraw7_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectDraw7_AddRef(p) (p)->AddRef() +#define IDirectDraw7_Release(p) (p)->Release() +/*** IDirectDraw methods ***/ +#define IDirectDraw7_Compact(p) (p)->Compact() +#define IDirectDraw7_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c) +#define IDirectDraw7_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d) +#define IDirectDraw7_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c) +#define IDirectDraw7_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b) +#define IDirectDraw7_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d) +#define IDirectDraw7_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d) +#define IDirectDraw7_FlipToGDISurface(p) (p)->FlipToGDISurface() +#define IDirectDraw7_GetCaps(p,a,b) (p)->GetCaps(a,b) +#define IDirectDraw7_GetDisplayMode(p,a) (p)->GetDisplayMode(a) +#define IDirectDraw7_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b) +#define IDirectDraw7_GetGDISurface(p,a) (p)->GetGDISurface(a) +#define IDirectDraw7_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a) +#define IDirectDraw7_GetScanLine(p,a) (p)->GetScanLine(a) +#define IDirectDraw7_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a) +#define IDirectDraw7_Initialize(p,a) (p)->Initialize(a) +#define IDirectDraw7_RestoreDisplayMode(p) (p)->RestoreDisplayMode() +#define IDirectDraw7_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) +#define IDirectDraw7_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e) +#define IDirectDraw7_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b) +/*** added in IDirectDraw2 ***/ +#define IDirectDraw7_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c) +/*** added in IDirectDraw4 ***/ +#define IDirectDraw7_GetSurfaceFromDC(p,a,b) (p)->GetSurfaceFromDC(a,b) +#define IDirectDraw7_RestoreAllSurfaces(p) (p)->RestoreAllSurfaces() +#define IDirectDraw7_TestCooperativeLevel(p) (p)->TestCooperativeLevel() +#define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b) +/*** added in IDirectDraw 7 ***/ +#define IDirectDraw7_StartModeTest(p,a,b,c) (p)->StartModeTest(a,b,c) +#define IDirectDraw7_EvaluateMode(p,a,b) (p)->EvaluateMode(a,b) +#endif + + +/***************************************************************************** + * IDirectDrawSurface interface + */ +#define INTERFACE IDirectDrawSurface +DECLARE_INTERFACE_(IDirectDrawSurface,IUnknown) +{ + /*** IUnknown methods ***/ +/*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; +/*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE; +/*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectDrawSurface methods ***/ +/*0c*/ STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDSAttachedSurface) PURE; +/*10*/ STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE; +/*14*/ STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE; +/*18*/ STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE; +/*1c*/ STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE; +/*20*/ STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE lpDDSAttachedSurface) PURE; +/*24*/ STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE; +/*28*/ STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE; +/*2c*/ STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE lpDDSurfaceTargetOverride, DWORD dwFlags) PURE; +/*30*/ STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE *lplpDDAttachedSurface) PURE; +/*34*/ STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE; +/*38*/ STDMETHOD(GetCaps)(THIS_ LPDDSCAPS lpDDSCaps) PURE; +/*3c*/ STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER *lplpDDClipper) PURE; +/*40*/ STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; +/*44*/ STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE; +/*48*/ STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE; +/*4c*/ STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE; +/*50*/ STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE *lplpDDPalette) PURE; +/*54*/ STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE; +/*58*/ STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE; +/*5c*/ STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc) PURE; +/*60*/ STDMETHOD(IsLost)(THIS) PURE; +/*64*/ STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE; +/*68*/ STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE; +/*6c*/ STDMETHOD(Restore)(THIS) PURE; +/*70*/ STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE; +/*74*/ STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; +/*78*/ STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE; +/*7c*/ STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE; +/*80*/ STDMETHOD(Unlock)(THIS_ LPVOID lpSurfaceData) PURE; +/*84*/ STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE; +/*88*/ STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE; +/*8c*/ STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE lpDDSReference) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectDrawSurface_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectDrawSurface_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDrawSurface_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectDrawSurface methods ***/ +#define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a) +#define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a) +#define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e) +#define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c) +#define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e) +#define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b) +#define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b) +#define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c) +#define IDirectDrawSurface_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b) +#define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b) +#define IDirectDrawSurface_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a) +#define IDirectDrawSurface_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectDrawSurface_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a) +#define IDirectDrawSurface_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b) +#define IDirectDrawSurface_GetDC(p,a) (p)->lpVtbl->GetDC(p,a) +#define IDirectDrawSurface_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a) +#define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b) +#define IDirectDrawSurface_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a) +#define IDirectDrawSurface_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a) +#define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a) +#define IDirectDrawSurface_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectDrawSurface_IsLost(p) (p)->lpVtbl->IsLost(p) +#define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d) +#define IDirectDrawSurface_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a) +#define IDirectDrawSurface_Restore(p) (p)->lpVtbl->Restore(p) +#define IDirectDrawSurface_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a) +#define IDirectDrawSurface_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b) +#define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b) +#define IDirectDrawSurface_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a) +#define IDirectDrawSurface_Unlock(p,a) (p)->lpVtbl->Unlock(p,a) +#define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e) +#define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a) +#define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b) +#else +/*** IUnknown methods ***/ +#define IDirectDrawSurface_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectDrawSurface_AddRef(p) (p)->AddRef() +#define IDirectDrawSurface_Release(p) (p)->Release() +/*** IDirectDrawSurface methods ***/ +#define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a) +#define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a) +#define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e) +#define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c) +#define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e) +#define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b) +#define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b) +#define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c) +#define IDirectDrawSurface_Flip(p,a,b) (p)->Flip(a,b) +#define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b) +#define IDirectDrawSurface_GetBltStatus(p,a) (p)->GetBltStatus(a) +#define IDirectDrawSurface_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectDrawSurface_GetClipper(p,a) (p)->GetClipper(a) +#define IDirectDrawSurface_GetColorKey(p,a,b) (p)->GetColorKey(a,b) +#define IDirectDrawSurface_GetDC(p,a) (p)->GetDC(a) +#define IDirectDrawSurface_GetFlipStatus(p,a) (p)->GetFlipStatus(a) +#define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b) +#define IDirectDrawSurface_GetPalette(p,a) (p)->GetPalette(a) +#define IDirectDrawSurface_GetPixelFormat(p,a) (p)->GetPixelFormat(a) +#define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a) +#define IDirectDrawSurface_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectDrawSurface_IsLost(p) (p)->IsLost() +#define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d) +#define IDirectDrawSurface_ReleaseDC(p,a) (p)->ReleaseDC(a) +#define IDirectDrawSurface_Restore(p) (p)->Restore() +#define IDirectDrawSurface_SetClipper(p,a) (p)->SetClipper(a) +#define IDirectDrawSurface_SetColorKey(p,a,b) (p)->SetColorKey(a,b) +#define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b) +#define IDirectDrawSurface_SetPalette(p,a) (p)->SetPalette(a) +#define IDirectDrawSurface_Unlock(p,a) (p)->Unlock(a) +#define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e) +#define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a) +#define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b) +#endif + + +/***************************************************************************** + * IDirectDrawSurface2 interface + */ +/* Cannot inherit from IDirectDrawSurface because the LPDIRECTDRAWSURFACE parameters + * have been converted to LPDIRECTDRAWSURFACE2. + */ +#define INTERFACE IDirectDrawSurface2 +DECLARE_INTERFACE_(IDirectDrawSurface2,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectDrawSurface2 methods ***/ + STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2 lpDDSAttachedSurface) PURE; + STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE; + STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE2 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE; + STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE; + STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE2 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE; + STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE2 lpDDSAttachedSurface) PURE; + STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE; + STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE; + STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE; + STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE2 *lplpDDAttachedSurface) PURE; + STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(GetCaps)(THIS_ LPDDSCAPS lpDDSCaps) PURE; + STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER *lplpDDClipper) PURE; + STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; + STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE; + STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE; + STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE *lplpDDPalette) PURE; + STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE; + STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE; + STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc) PURE; + STDMETHOD(IsLost)(THIS) PURE; + STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE; + STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE; + STDMETHOD(Restore)(THIS) PURE; + STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE; + STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; + STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE; + STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE; + STDMETHOD(Unlock)(THIS_ LPVOID lpSurfaceData) PURE; + STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE2 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE; + STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE2 lpDDSReference) PURE; + /* added in v2 */ + STDMETHOD(GetDDInterface)(THIS_ LPVOID *lplpDD) PURE; + STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectDrawSurface2_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDrawSurface2_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectDrawSurface methods (almost) ***/ +#define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a) +#define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a) +#define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e) +#define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c) +#define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e) +#define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b) +#define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b) +#define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c) +#define IDirectDrawSurface2_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b) +#define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b) +#define IDirectDrawSurface2_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a) +#define IDirectDrawSurface2_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectDrawSurface2_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a) +#define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b) +#define IDirectDrawSurface2_GetDC(p,a) (p)->lpVtbl->GetDC(p,a) +#define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a) +#define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b) +#define IDirectDrawSurface2_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a) +#define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a) +#define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a) +#define IDirectDrawSurface2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectDrawSurface2_IsLost(p) (p)->lpVtbl->IsLost(p) +#define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d) +#define IDirectDrawSurface2_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a) +#define IDirectDrawSurface2_Restore(p) (p)->lpVtbl->Restore(p) +#define IDirectDrawSurface2_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a) +#define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b) +#define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b) +#define IDirectDrawSurface2_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a) +#define IDirectDrawSurface2_Unlock(p,a) (p)->lpVtbl->Unlock(p,a) +#define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e) +#define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a) +#define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b) +/*** IDirectDrawSurface2 methods ***/ +#define IDirectDrawSurface2_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a) +#define IDirectDrawSurface2_PageLock(p,a) (p)->lpVtbl->PageLock(p,a) +#define IDirectDrawSurface2_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a) +#else +/*** IUnknown methods ***/ +#define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectDrawSurface2_AddRef(p) (p)->AddRef() +#define IDirectDrawSurface2_Release(p) (p)->Release() +/*** IDirectDrawSurface methods (almost) ***/ +#define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a) +#define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a) +#define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e) +#define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c) +#define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e) +#define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b) +#define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b) +#define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c) +#define IDirectDrawSurface2_Flip(p,a,b) (p)->Flip(a,b) +#define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b) +#define IDirectDrawSurface2_GetBltStatus(p,a) (p)->GetBltStatus(a) +#define IDirectDrawSurface2_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectDrawSurface2_GetClipper(p,a) (p)->GetClipper(a) +#define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->GetColorKey(a,b) +#define IDirectDrawSurface2_GetDC(p,a) (p)->GetDC(a) +#define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->GetFlipStatus(a) +#define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b) +#define IDirectDrawSurface2_GetPalette(p,a) (p)->GetPalette(a) +#define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->GetPixelFormat(a) +#define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a) +#define IDirectDrawSurface2_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectDrawSurface2_IsLost(p) (p)->IsLost() +#define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d) +#define IDirectDrawSurface2_ReleaseDC(p,a) (p)->ReleaseDC(a) +#define IDirectDrawSurface2_Restore(p) (p)->Restore() +#define IDirectDrawSurface2_SetClipper(p,a) (p)->SetClipper(a) +#define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->SetColorKey(a,b) +#define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b) +#define IDirectDrawSurface2_SetPalette(p,a) (p)->SetPalette(a) +#define IDirectDrawSurface2_Unlock(p,a) (p)->Unlock(a) +#define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e) +#define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a) +#define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b) +/*** IDirectDrawSurface2 methods ***/ +#define IDirectDrawSurface2_GetDDInterface(p,a) (p)->GetDDInterface(a) +#define IDirectDrawSurface2_PageLock(p,a) (p)->PageLock(a) +#define IDirectDrawSurface2_PageUnlock(p,a) (p)->PageUnlock(a) +#endif + + +/***************************************************************************** + * IDirectDrawSurface3 interface + */ +/* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters + * have been converted to LPDIRECTDRAWSURFACE3. + */ +#define INTERFACE IDirectDrawSurface3 +DECLARE_INTERFACE_(IDirectDrawSurface3,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectDrawSurface3 methods ***/ + STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3 lpDDSAttachedSurface) PURE; + STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE; + STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE3 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE; + STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE; + STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE3 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE; + STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE3 lpDDSAttachedSurface) PURE; + STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE; + STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE; + STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE; + STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE3 *lplpDDAttachedSurface) PURE; + STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(GetCaps)(THIS_ LPDDSCAPS lpDDSCaps) PURE; + STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER *lplpDDClipper) PURE; + STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; + STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE; + STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE; + STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE *lplpDDPalette) PURE; + STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE; + STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE; + STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc) PURE; + STDMETHOD(IsLost)(THIS) PURE; + STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE; + STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE; + STDMETHOD(Restore)(THIS) PURE; + STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE; + STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; + STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE; + STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE; + STDMETHOD(Unlock)(THIS_ LPVOID lpSurfaceData) PURE; + STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE3 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE; + STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE3 lpDDSReference) PURE; + /* added in v2 */ + STDMETHOD(GetDDInterface)(THIS_ LPVOID *lplpDD) PURE; + STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE; + /* added in v3 */ + STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC lpDDSD, DWORD dwFlags) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectDrawSurface3_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDrawSurface3_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectDrawSurface methods (almost) ***/ +#define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a) +#define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a) +#define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e) +#define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c) +#define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e) +#define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b) +#define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b) +#define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c) +#define IDirectDrawSurface3_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b) +#define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b) +#define IDirectDrawSurface3_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a) +#define IDirectDrawSurface3_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectDrawSurface3_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a) +#define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b) +#define IDirectDrawSurface3_GetDC(p,a) (p)->lpVtbl->GetDC(p,a) +#define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a) +#define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b) +#define IDirectDrawSurface3_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a) +#define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a) +#define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a) +#define IDirectDrawSurface3_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectDrawSurface3_IsLost(p) (p)->lpVtbl->IsLost(p) +#define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d) +#define IDirectDrawSurface3_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a) +#define IDirectDrawSurface3_Restore(p) (p)->lpVtbl->Restore(p) +#define IDirectDrawSurface3_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a) +#define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b) +#define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b) +#define IDirectDrawSurface3_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a) +#define IDirectDrawSurface3_Unlock(p,a) (p)->lpVtbl->Unlock(p,a) +#define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e) +#define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a) +#define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b) +/*** IDirectDrawSurface2 methods ***/ +#define IDirectDrawSurface3_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a) +#define IDirectDrawSurface3_PageLock(p,a) (p)->lpVtbl->PageLock(p,a) +#define IDirectDrawSurface3_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a) +/*** IDirectDrawSurface3 methods ***/ +#define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b) +#else +/*** IUnknown methods ***/ +#define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectDrawSurface3_AddRef(p) (p)->AddRef() +#define IDirectDrawSurface3_Release(p) (p)->Release() +/*** IDirectDrawSurface methods (almost) ***/ +#define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a) +#define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a) +#define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e) +#define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c) +#define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e) +#define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b) +#define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b) +#define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c) +#define IDirectDrawSurface3_Flip(p,a,b) (p)->Flip(a,b) +#define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b) +#define IDirectDrawSurface3_GetBltStatus(p,a) (p)->GetBltStatus(a) +#define IDirectDrawSurface3_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectDrawSurface3_GetClipper(p,a) (p)->GetClipper(a) +#define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->GetColorKey(a,b) +#define IDirectDrawSurface3_GetDC(p,a) (p)->GetDC(a) +#define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->GetFlipStatus(a) +#define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b) +#define IDirectDrawSurface3_GetPalette(p,a) (p)->GetPalette(a) +#define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->GetPixelFormat(a) +#define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a) +#define IDirectDrawSurface3_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectDrawSurface3_IsLost(p) (p)->IsLost() +#define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d) +#define IDirectDrawSurface3_ReleaseDC(p,a) (p)->ReleaseDC(a) +#define IDirectDrawSurface3_Restore(p) (p)->Restore() +#define IDirectDrawSurface3_SetClipper(p,a) (p)->SetClipper(a) +#define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->SetColorKey(a,b) +#define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b) +#define IDirectDrawSurface3_SetPalette(p,a) (p)->SetPalette(a) +#define IDirectDrawSurface3_Unlock(p,a) (p)->Unlock(a) +#define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e) +#define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a) +#define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b) +/*** IDirectDrawSurface2 methods ***/ +#define IDirectDrawSurface3_GetDDInterface(p,a) (p)->GetDDInterface(a) +#define IDirectDrawSurface3_PageLock(p,a) (p)->PageLock(a) +#define IDirectDrawSurface3_PageUnlock(p,a) (p)->PageUnlock(a) +/*** IDirectDrawSurface3 methods ***/ +#define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b) +#endif + + +/***************************************************************************** + * IDirectDrawSurface4 interface + */ +/* Cannot inherit from IDirectDrawSurface2 because DDSCAPS changed to DDSCAPS2. + */ +#define INTERFACE IDirectDrawSurface4 +DECLARE_INTERFACE_(IDirectDrawSurface4,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectDrawSurface4 methods ***/ + STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface) PURE; + STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE; + STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE4 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE; + STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE; + STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE4 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE; + STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface) PURE; + STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK2 lpEnumSurfacesCallback) PURE; + STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK2 lpfnCallback) PURE; + STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE4 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE; + STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2 lpDDSCaps, LPDIRECTDRAWSURFACE4 *lplpDDAttachedSurface) PURE; + STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2 lpDDSCaps) PURE; + STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER *lplpDDClipper) PURE; + STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; + STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE; + STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE; + STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE *lplpDDPalette) PURE; + STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE; + STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE; + STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE; + STDMETHOD(IsLost)(THIS) PURE; + STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC2 lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE; + STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE; + STDMETHOD(Restore)(THIS) PURE; + STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE; + STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; + STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE; + STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE; + STDMETHOD(Unlock)(THIS_ LPRECT lpSurfaceData) PURE; + STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE4 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE; + STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE4 lpDDSReference) PURE; + /* added in v2 */ + STDMETHOD(GetDDInterface)(THIS_ LPVOID *lplpDD) PURE; + STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE; + /* added in v3 */ + STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2 lpDDSD, DWORD dwFlags) PURE; + /* added in v4 */ + STDMETHOD(SetPrivateData)(THIS_ REFGUID tag, LPVOID pData, DWORD cbSize, DWORD dwFlags) PURE; + STDMETHOD(GetPrivateData)(THIS_ REFGUID tag, LPVOID pBuffer, LPDWORD pcbBufferSize) PURE; + STDMETHOD(FreePrivateData)(THIS_ REFGUID tag) PURE; + STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD pValue) PURE; + STDMETHOD(ChangeUniquenessValue)(THIS) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectDrawSurface4_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDrawSurface4_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectDrawSurface (almost) methods ***/ +#define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a) +#define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a) +#define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e) +#define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c) +#define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e) +#define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b) +#define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b) +#define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c) +#define IDirectDrawSurface4_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b) +#define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b) +#define IDirectDrawSurface4_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a) +#define IDirectDrawSurface4_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectDrawSurface4_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a) +#define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b) +#define IDirectDrawSurface4_GetDC(p,a) (p)->lpVtbl->GetDC(p,a) +#define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a) +#define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b) +#define IDirectDrawSurface4_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a) +#define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a) +#define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a) +#define IDirectDrawSurface4_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectDrawSurface4_IsLost(p) (p)->lpVtbl->IsLost(p) +#define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d) +#define IDirectDrawSurface4_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a) +#define IDirectDrawSurface4_Restore(p) (p)->lpVtbl->Restore(p) +#define IDirectDrawSurface4_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a) +#define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b) +#define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b) +#define IDirectDrawSurface4_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a) +#define IDirectDrawSurface4_Unlock(p,a) (p)->lpVtbl->Unlock(p,a) +#define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e) +#define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a) +#define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b) +/*** IDirectDrawSurface2 methods ***/ +#define IDirectDrawSurface4_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a) +#define IDirectDrawSurface4_PageLock(p,a) (p)->lpVtbl->PageLock(p,a) +#define IDirectDrawSurface4_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a) +/*** IDirectDrawSurface3 methods ***/ +#define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b) +/*** IDirectDrawSurface4 methods ***/ +#define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) +#define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) +#define IDirectDrawSurface4_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) +#define IDirectDrawSurface4_GetUniquenessValue(p,a) (p)->lpVtbl->GetUniquenessValue(p,a) +#define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p) +#else +/*** IUnknown methods ***/ +#define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectDrawSurface4_AddRef(p) (p)->AddRef() +#define IDirectDrawSurface4_Release(p) (p)->Release() +/*** IDirectDrawSurface (almost) methods ***/ +#define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a) +#define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a) +#define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e) +#define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c) +#define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e) +#define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b) +#define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b) +#define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c) +#define IDirectDrawSurface4_Flip(p,a,b) (p)->Flip(a,b) +#define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b) +#define IDirectDrawSurface4_GetBltStatus(p,a) (p)->GetBltStatus(a) +#define IDirectDrawSurface4_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectDrawSurface4_GetClipper(p,a) (p)->GetClipper(a) +#define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->GetColorKey(a,b) +#define IDirectDrawSurface4_GetDC(p,a) (p)->GetDC(a) +#define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->GetFlipStatus(a) +#define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b) +#define IDirectDrawSurface4_GetPalette(p,a) (p)->GetPalette(a) +#define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->GetPixelFormat(a) +#define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a) +#define IDirectDrawSurface4_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectDrawSurface4_IsLost(p) (p)->IsLost() +#define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d) +#define IDirectDrawSurface4_ReleaseDC(p,a) (p)->ReleaseDC(a) +#define IDirectDrawSurface4_Restore(p) (p)->Restore() +#define IDirectDrawSurface4_SetClipper(p,a) (p)->SetClipper(a) +#define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->SetColorKey(a,b) +#define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b) +#define IDirectDrawSurface4_SetPalette(p,a) (p)->SetPalette(a) +#define IDirectDrawSurface4_Unlock(p,a) (p)->Unlock(a) +#define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e) +#define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a) +#define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b) +/*** IDirectDrawSurface2 methods ***/ +#define IDirectDrawSurface4_GetDDInterface(p,a) (p)->GetDDInterface(a) +#define IDirectDrawSurface4_PageLock(p,a) (p)->PageLock(a) +#define IDirectDrawSurface4_PageUnlock(p,a) (p)->PageUnlock(a) +/*** IDirectDrawSurface3 methods ***/ +#define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b) +/*** IDirectDrawSurface4 methods ***/ +#define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) +#define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) +#define IDirectDrawSurface4_FreePrivateData(p,a) (p)->FreePrivateData(a) +#define IDirectDrawSurface4_GetUniquenessValue(p,a) (p)->GetUniquenessValue(a) +#define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue() +#endif + + +/***************************************************************************** + * IDirectDrawSurface7 interface + */ +#define INTERFACE IDirectDrawSurface7 +DECLARE_INTERFACE_(IDirectDrawSurface7,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectDrawSurface7 methods ***/ + STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE7 lpDDSAttachedSurface) PURE; + STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT lpRect) PURE; + STDMETHOD(Blt)(THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE7 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE; + STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE; + STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE7 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE; + STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE7 lpDDSAttachedSurface) PURE; + STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpEnumSurfacesCallback) PURE; + STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpfnCallback) PURE; + STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE7 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE; + STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2 lpDDSCaps, LPDIRECTDRAWSURFACE7 *lplpDDAttachedSurface) PURE; + STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2 lpDDSCaps) PURE; + STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER *lplpDDClipper) PURE; + STDMETHOD(GetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; + STDMETHOD(GetDC)(THIS_ HDC *lphDC) PURE; + STDMETHOD(GetFlipStatus)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(GetOverlayPosition)(THIS_ LPLONG lplX, LPLONG lplY) PURE; + STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE *lplpDDPalette) PURE; + STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE; + STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE; + STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE; + STDMETHOD(IsLost)(THIS) PURE; + STDMETHOD(Lock)(THIS_ LPRECT lpDestRect, LPDDSURFACEDESC2 lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE; + STDMETHOD(ReleaseDC)(THIS_ HDC hDC) PURE; + STDMETHOD(Restore)(THIS) PURE; + STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE; + STDMETHOD(SetColorKey)(THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; + STDMETHOD(SetOverlayPosition)(THIS_ LONG lX, LONG lY) PURE; + STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE; + STDMETHOD(Unlock)(THIS_ LPRECT lpSurfaceData) PURE; + STDMETHOD(UpdateOverlay)(THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE7 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE; + STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE7 lpDDSReference) PURE; + /* added in v2 */ + STDMETHOD(GetDDInterface)(THIS_ LPVOID *lplpDD) PURE; + STDMETHOD(PageLock)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(PageUnlock)(THIS_ DWORD dwFlags) PURE; + /* added in v3 */ + STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2 lpDDSD, DWORD dwFlags) PURE; + /* added in v4 */ + STDMETHOD(SetPrivateData)(THIS_ REFGUID tag, LPVOID pData, DWORD cbSize, DWORD dwFlags) PURE; + STDMETHOD(GetPrivateData)(THIS_ REFGUID tag, LPVOID pBuffer, LPDWORD pcbBufferSize) PURE; + STDMETHOD(FreePrivateData)(THIS_ REFGUID tag) PURE; + STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD pValue) PURE; + STDMETHOD(ChangeUniquenessValue)(THIS) PURE; + /* added in v7 */ + STDMETHOD(SetPriority)(THIS_ DWORD prio) PURE; + STDMETHOD(GetPriority)(THIS_ LPDWORD prio) PURE; + STDMETHOD(SetLOD)(THIS_ DWORD lod) PURE; + STDMETHOD(GetLOD)(THIS_ LPDWORD lod) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectDrawSurface7_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDrawSurface7_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectDrawSurface (almost) methods ***/ +#define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a) +#define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a) +#define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e) +#define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c) +#define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e) +#define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b) +#define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b) +#define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c) +#define IDirectDrawSurface7_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b) +#define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b) +#define IDirectDrawSurface7_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a) +#define IDirectDrawSurface7_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectDrawSurface7_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a) +#define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b) +#define IDirectDrawSurface7_GetDC(p,a) (p)->lpVtbl->GetDC(p,a) +#define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a) +#define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b) +#define IDirectDrawSurface7_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a) +#define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a) +#define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a) +#define IDirectDrawSurface7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectDrawSurface7_IsLost(p) (p)->lpVtbl->IsLost(p) +#define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d) +#define IDirectDrawSurface7_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a) +#define IDirectDrawSurface7_Restore(p) (p)->lpVtbl->Restore(p) +#define IDirectDrawSurface7_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a) +#define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b) +#define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b) +#define IDirectDrawSurface7_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a) +#define IDirectDrawSurface7_Unlock(p,a) (p)->lpVtbl->Unlock(p,a) +#define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e) +#define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a) +#define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b) +/*** IDirectDrawSurface2 methods ***/ +#define IDirectDrawSurface7_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a) +#define IDirectDrawSurface7_PageLock(p,a) (p)->lpVtbl->PageLock(p,a) +#define IDirectDrawSurface7_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a) +/*** IDirectDrawSurface3 methods ***/ +#define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b) +/*** IDirectDrawSurface4 methods ***/ +#define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) +#define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) +#define IDirectDrawSurface7_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) +#define IDirectDrawSurface7_GetUniquenessValue(p,a) (p)->lpVtbl->GetUniquenessValue(p,a) +#define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p) +/*** IDirectDrawSurface7 methods ***/ +#define IDirectDrawSurface7_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a) +#define IDirectDrawSurface7_GetPriority(p,a) (p)->lpVtbl->GetPriority(p,a) +#define IDirectDrawSurface7_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a) +#define IDirectDrawSurface7_GetLOD(p,a) (p)->lpVtbl->GetLOD(p,a) +#else +/*** IUnknown methods ***/ +#define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectDrawSurface7_AddRef(p) (p)->AddRef() +#define IDirectDrawSurface7_Release(p) (p)->Release() +/*** IDirectDrawSurface (almost) methods ***/ +#define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a) +#define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a) +#define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e) +#define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c) +#define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e) +#define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b) +#define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b) +#define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c) +#define IDirectDrawSurface7_Flip(p,a,b) (p)->Flip(a,b) +#define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b) +#define IDirectDrawSurface7_GetBltStatus(p,a) (p)->GetBltStatus(a) +#define IDirectDrawSurface7_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectDrawSurface7_GetClipper(p,a) (p)->GetClipper(a) +#define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->GetColorKey(a,b) +#define IDirectDrawSurface7_GetDC(p,a) (p)->GetDC(a) +#define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->GetFlipStatus(a) +#define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b) +#define IDirectDrawSurface7_GetPalette(p,a) (p)->GetPalette(a) +#define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->GetPixelFormat(a) +#define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a) +#define IDirectDrawSurface7_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectDrawSurface7_IsLost(p) (p)->IsLost() +#define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d) +#define IDirectDrawSurface7_ReleaseDC(p,a) (p)->ReleaseDC(a) +#define IDirectDrawSurface7_Restore(p) (p)->Restore() +#define IDirectDrawSurface7_SetClipper(p,a) (p)->SetClipper(a) +#define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->SetColorKey(a,b) +#define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b) +#define IDirectDrawSurface7_SetPalette(p,a) (p)->SetPalette(a) +#define IDirectDrawSurface7_Unlock(p,a) (p)->Unlock(a) +#define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e) +#define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a) +#define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b) +/*** IDirectDrawSurface2 methods ***/ +#define IDirectDrawSurface7_GetDDInterface(p,a) (p)->GetDDInterface(a) +#define IDirectDrawSurface7_PageLock(p,a) (p)->PageLock(a) +#define IDirectDrawSurface7_PageUnlock(p,a) (p)->PageUnlock(a) +/*** IDirectDrawSurface3 methods ***/ +#define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b) +/*** IDirectDrawSurface4 methods ***/ +#define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) +#define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) +#define IDirectDrawSurface7_FreePrivateData(p,a) (p)->FreePrivateData(a) +#define IDirectDrawSurface7_GetUniquenessValue(p,a) (p)->GetUniquenessValue(a) +#define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue() +/*** IDirectDrawSurface7 methods ***/ +#define IDirectDrawSurface7_SetPriority(p,a) (p)->SetPriority(a) +#define IDirectDrawSurface7_GetPriority(p,a) (p)->GetPriority(a) +#define IDirectDrawSurface7_SetLOD(p,a) (p)->SetLOD(a) +#define IDirectDrawSurface7_GetLOD(p,a) (p)->GetLOD(a) +#endif + +/***************************************************************************** + * IDirectDrawColorControl interface + */ +#define INTERFACE IDirectDrawColorControl +DECLARE_INTERFACE_(IDirectDrawColorControl,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectDrawColorControl methods ***/ + STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL lpColorControl) PURE; + STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL lpColorControl) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectDrawColorControl_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectDrawColorControl_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDrawColorControl_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectDrawColorControl methods ***/ +#define IDirectDrawColorControl_GetColorControls(p,a) (p)->lpVtbl->GetColorControls(p,a) +#define IDirectDrawColorControl_SetColorControls(p,a) (p)->lpVtbl->SetColorControls(p,a) +#else +/*** IUnknown methods ***/ +#define IDirectDrawColorControl_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectDrawColorControl_AddRef(p) (p)->AddRef() +#define IDirectDrawColorControl_Release(p) (p)->Release() +/*** IDirectDrawColorControl methods ***/ +#define IDirectDrawColorControl_GetColorControls(p,a) (p)->GetColorControls(a) +#define IDirectDrawColorControl_SetColorControls(p,a) (p)->SetColorControls(a) +#endif + +/***************************************************************************** + * IDirectDrawGammaControl interface + */ +#define INTERFACE IDirectDrawGammaControl +DECLARE_INTERFACE_(IDirectDrawGammaControl,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectDrawGammaControl methods ***/ + STDMETHOD(GetGammaRamp)(THIS_ DWORD dwFlags, LPDDGAMMARAMP lpGammaRamp) PURE; + STDMETHOD(SetGammaRamp)(THIS_ DWORD dwFlags, LPDDGAMMARAMP lpGammaRamp) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectDrawGammaControl_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectDrawGammaControl_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDrawGammaControl_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectDrawGammaControl methods ***/ +#define IDirectDrawGammaControl_GetGammaRamp(p,a,b) (p)->lpVtbl->GetGammaRamp(p,a,b) +#define IDirectDrawGammaControl_SetGammaRamp(p,a,b) (p)->lpVtbl->SetGammaRamp(p,a,b) +#else +/*** IUnknown methods ***/ +#define IDirectDrawGammaControl_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectDrawGammaControl_AddRef(p) (p)->AddRef() +#define IDirectDrawGammaControl_Release(p) (p)->Release() +/*** IDirectDrawGammaControl methods ***/ +#define IDirectDrawGammaControl_GetGammaRamp(p,a,b) (p)->GetGammaRamp(a,b) +#define IDirectDrawGammaControl_SetGammaRamp(p,a,b) (p)->SetGammaRamp(a,b) +#endif + + +HRESULT WINAPI DirectDrawCreate(GUID*,LPDIRECTDRAW*,IUnknown*); +HRESULT WINAPI DirectDrawCreateEx(GUID*,LPVOID*,REFIID,IUnknown*); +HRESULT WINAPI DirectDrawCreateClipper(DWORD,LPDIRECTDRAWCLIPPER*,IUnknown*); + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* defined(__cplusplus) */ + +#endif /* __WINE_DDRAW_H */ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/draw.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/draw.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/draw.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/draw.c 2016-06-30 16:53:26.000000000 +0000 @@ -0,0 +1,4929 @@ +/*************************************************************************** + draw.c - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define _IN_DRAW + +#include "externals.h" +#include "gpu.h" +#include "draw.h" +#include "prim.h" +#include "menu.h" +#include "interp.h" + +//////////////////////////////////////////////////////////////////////////////////// +// misc globals +//////////////////////////////////////////////////////////////////////////////////// + +int iResX; +int iResY; +long lLowerpart; +BOOL bIsFirstFrame = TRUE; +BOOL bCheckMask=FALSE; +unsigned short sSetMask=0; +unsigned long lSetMask=0; +int iDesktopCol=16; +int iShowFPS=0; +int iWinSize; +int iUseScanLines=0; +int iUseNoStretchBlt=0; +int iFastFwd=0; +int iDebugMode=0; +int iFVDisplay=0; +PSXPoint_t ptCursorPoint[8]; +unsigned short usCursorActive=0; + +unsigned int LUT16to32[65536]; +unsigned int RGBtoYUV[65536]; + +// prototypes +void hq2x_32( unsigned char * srcPtr, DWORD srcPitch, unsigned char * dstPtr, int width, int height); +void hq2x( unsigned char * srcPtr, DWORD srcPitch, unsigned char * dstPtr, int width, int height); +void hq3x_16( unsigned char * srcPtr, DWORD srcPitch, unsigned char * dstPtr, int width, int height); +void hq3x_32( unsigned char * srcPtr, DWORD srcPitch, unsigned char * dstPtr, int width, int height); + +//////////////////////////////////////////////////////////////////////// +// generic 2xSaI helpers +//////////////////////////////////////////////////////////////////////// + +void * pSaISmallBuff=NULL; +void * pSaIBigBuff=NULL; + +#define GET_RESULT(A, B, C, D) ((A != C || A != D) - (B != C || B != D)) + +static __inline int GetResult1(DWORD A, DWORD B, DWORD C, DWORD D, DWORD E) +{ + int x = 0; + int y = 0; + int r = 0; + if (A == C) x+=1; else if (B == C) y+=1; + if (A == D) x+=1; else if (B == D) y+=1; + if (x <= 1) r+=1; + if (y <= 1) r-=1; + return r; +} + +static __inline int GetResult2(DWORD A, DWORD B, DWORD C, DWORD D, DWORD E) +{ + int x = 0; + int y = 0; + int r = 0; + if (A == C) x+=1; else if (B == C) y+=1; + if (A == D) x+=1; else if (B == D) y+=1; + if (x <= 1) r-=1; + if (y <= 1) r+=1; + return r; +} + +#define colorMask8 0x00FEFEFE +#define lowPixelMask8 0x00010101 +#define qcolorMask8 0x00FCFCFC +#define qlowpixelMask8 0x00030303 + +#define INTERPOLATE8(A, B) ((((A & colorMask8) >> 1) + ((B & colorMask8) >> 1) + (A & B & lowPixelMask8))) +#define Q_INTERPOLATE8(A, B, C, D) (((((A & qcolorMask8) >> 2) + ((B & qcolorMask8) >> 2) + ((C & qcolorMask8) >> 2) + ((D & qcolorMask8) >> 2) \ + + ((((A & qlowpixelMask8) + (B & qlowpixelMask8) + (C & qlowpixelMask8) + (D & qlowpixelMask8)) >> 2) & qlowpixelMask8)))) + + +void Super2xSaI_ex8(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstBitmap, int width, int height) +{ + DWORD dstPitch = srcPitch<<1; + DWORD srcPitchHalf = srcPitch>>1; + int finWidth = srcPitch>>2; + DWORD line; + DWORD *dP; + DWORD *bP; + int iXA,iXB,iXC,iYA,iYB,iYC,finish; + DWORD color4, color5, color6; + DWORD color1, color2, color3; + DWORD colorA0, colorA1, colorA2, colorA3, + colorB0, colorB1, colorB2, colorB3, + colorS1, colorS2; + DWORD product1a, product1b, + product2a, product2b; + + line = 0; + + { + for (; height; height-=1) + { + bP = (DWORD *)srcPtr; + dP = (DWORD *)(dstBitmap + line*dstPitch); + for (finish = width; finish; finish -= 1 ) + { +//--------------------------------------- B1 B2 +// 4 5 6 S2 +// 1 2 3 S1 +// A1 A2 + if(finish==finWidth) iXA=0; + else iXA=1; + if(finish>4) {iXB=1;iXC=2;} + else + if(finish>3) {iXB=1;iXC=1;} + else {iXB=0;iXC=0;} + if(line==0) {iYA=0;} + else {iYA=finWidth;} + if(height>4) {iYB=finWidth;iYC=srcPitchHalf;} + else + if(height>3) {iYB=finWidth;iYC=finWidth;} + else {iYB=0;iYC=0;} + + colorB0 = *(bP- iYA - iXA); + colorB1 = *(bP- iYA); + colorB2 = *(bP- iYA + iXB); + colorB3 = *(bP- iYA + iXC); + + color4 = *(bP - iXA); + color5 = *(bP); + color6 = *(bP + iXB); + colorS2 = *(bP + iXC); + + color1 = *(bP + iYB - iXA); + color2 = *(bP + iYB); + color3 = *(bP + iYB + iXB); + colorS1= *(bP + iYB + iXC); + + colorA0 = *(bP + iYC - iXA); + colorA1 = *(bP + iYC); + colorA2 = *(bP + iYC + iXB); + colorA3 = *(bP + iYC + iXC); + + if (color2 == color6 && color5 != color3) + { + product2b = product1b = color2; + } + else + if (color5 == color3 && color2 != color6) + { + product2b = product1b = color5; + } + else + if (color5 == color3 && color2 == color6) + { + register int r = 0; + + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (color1&0x00ffffff), (colorA1&0x00ffffff)); + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (color4&0x00ffffff), (colorB1&0x00ffffff)); + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (colorA2&0x00ffffff), (colorS1&0x00ffffff)); + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (colorB2&0x00ffffff), (colorS2&0x00ffffff)); + + if (r > 0) + product2b = product1b = color6; + else + if (r < 0) + product2b = product1b = color5; + else + { + product2b = product1b = INTERPOLATE8(color5, color6); + } + } + else + { + if (color6 == color3 && color3 == colorA1 && color2 != colorA2 && color3 != colorA0) + product2b = Q_INTERPOLATE8 (color3, color3, color3, color2); + else + if (color5 == color2 && color2 == colorA2 && colorA1 != color3 && color2 != colorA3) + product2b = Q_INTERPOLATE8 (color2, color2, color2, color3); + else + product2b = INTERPOLATE8 (color2, color3); + + if (color6 == color3 && color6 == colorB1 && color5 != colorB2 && color6 != colorB0) + product1b = Q_INTERPOLATE8 (color6, color6, color6, color5); + else + if (color5 == color2 && color5 == colorB2 && colorB1 != color6 && color5 != colorB3) + product1b = Q_INTERPOLATE8 (color6, color5, color5, color5); + else + product1b = INTERPOLATE8 (color5, color6); + } + + if (color5 == color3 && color2 != color6 && color4 == color5 && color5 != colorA2) + product2a = INTERPOLATE8(color2, color5); + else + if (color5 == color1 && color6 == color5 && color4 != color2 && color5 != colorA0) + product2a = INTERPOLATE8(color2, color5); + else + product2a = color2; + + if (color2 == color6 && color5 != color3 && color1 == color2 && color2 != colorB2) + product1a = INTERPOLATE8(color2, color5); + else + if (color4 == color2 && color3 == color2 && color1 != color5 && color2 != colorB0) + product1a = INTERPOLATE8(color2, color5); + else + product1a = color5; + + *dP=product1a; + *(dP+1)=product1b; + *(dP+(srcPitchHalf))=product2a; + *(dP+1+(srcPitchHalf))=product2b; + + bP += 1; + dP += 2; + }//end of for ( finish= width etc..) + + line += 2; + srcPtr += srcPitch; + }; //endof: for (; height; height--) + } +} + +//////////////////////////////////////////////////////////////////////// + +void Std2xSaI_ex8(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstBitmap, int width, int height) +{ + DWORD dstPitch = srcPitch<<1; + DWORD srcPitchHalf = srcPitch>>1; + int finWidth = srcPitch>>2; + DWORD line; + DWORD *dP; + DWORD *bP; + int iXA,iXB,iXC,iYA,iYB,iYC,finish; + + DWORD colorA, colorB; + DWORD colorC, colorD, + colorE, colorF, colorG, colorH, + colorI, colorJ, colorK, colorL, + colorM, colorN, colorO, colorP; + DWORD product, product1, product2; + + line = 0; + + { + for (; height; height-=1) + { + bP = (DWORD *)srcPtr; + dP = (DWORD *)(dstBitmap + line*dstPitch); + for (finish = width; finish; finish -= 1 ) + { +//--------------------------------------- +// Map of the pixels: I|E F|J +// G|A B|K +// H|C D|L +// M|N O|P + if(finish==finWidth) iXA=0; + else iXA=1; + if(finish>4) {iXB=1;iXC=2;} + else + if(finish>3) {iXB=1;iXC=1;} + else {iXB=0;iXC=0;} + if(line==0) {iYA=0;} + else {iYA=finWidth;} + if(height>4) {iYB=finWidth;iYC=srcPitchHalf;} + else + if(height>3) {iYB=finWidth;iYC=finWidth;} + else {iYB=0;iYC=0;} + + colorI = *(bP- iYA - iXA); + colorE = *(bP- iYA); + colorF = *(bP- iYA + iXB); + colorJ = *(bP- iYA + iXC); + + colorG = *(bP - iXA); + colorA = *(bP); + colorB = *(bP + iXB); + colorK = *(bP + iXC); + + colorH = *(bP + iYB - iXA); + colorC = *(bP + iYB); + colorD = *(bP + iYB + iXB); + colorL = *(bP + iYB + iXC); + + colorM = *(bP + iYC - iXA); + colorN = *(bP + iYC); + colorO = *(bP + iYC + iXB); + colorP = *(bP + iYC + iXC); + + + if((colorA == colorD) && (colorB != colorC)) + { + if(((colorA == colorE) && (colorB == colorL)) || + ((colorA == colorC) && (colorA == colorF) && + (colorB != colorE) && (colorB == colorJ))) + { + product = colorA; + } + else + { + product = INTERPOLATE8(colorA, colorB); + } + + if(((colorA == colorG) && (colorC == colorO)) || + ((colorA == colorB) && (colorA == colorH) && + (colorG != colorC) && (colorC == colorM))) + { + product1 = colorA; + } + else + { + product1 = INTERPOLATE8(colorA, colorC); + } + product2 = colorA; + } + else + if((colorB == colorC) && (colorA != colorD)) + { + if(((colorB == colorF) && (colorA == colorH)) || + ((colorB == colorE) && (colorB == colorD) && + (colorA != colorF) && (colorA == colorI))) + { + product = colorB; + } + else + { + product = INTERPOLATE8(colorA, colorB); + } + + if(((colorC == colorH) && (colorA == colorF)) || + ((colorC == colorG) && (colorC == colorD) && + (colorA != colorH) && (colorA == colorI))) + { + product1 = colorC; + } + else + { + product1=INTERPOLATE8(colorA, colorC); + } + product2 = colorB; + } + else + if((colorA == colorD) && (colorB == colorC)) + { + if (colorA == colorB) + { + product = colorA; + product1 = colorA; + product2 = colorA; + } + else + { + register int r = 0; + product1 = INTERPOLATE8(colorA, colorC); + product = INTERPOLATE8(colorA, colorB); + + r += GetResult1 (colorA&0x00FFFFFF, colorB&0x00FFFFFF, colorG&0x00FFFFFF, colorE&0x00FFFFFF, colorI&0x00FFFFFF); + r += GetResult2 (colorB&0x00FFFFFF, colorA&0x00FFFFFF, colorK&0x00FFFFFF, colorF&0x00FFFFFF, colorJ&0x00FFFFFF); + r += GetResult2 (colorB&0x00FFFFFF, colorA&0x00FFFFFF, colorH&0x00FFFFFF, colorN&0x00FFFFFF, colorM&0x00FFFFFF); + r += GetResult1 (colorA&0x00FFFFFF, colorB&0x00FFFFFF, colorL&0x00FFFFFF, colorO&0x00FFFFFF, colorP&0x00FFFFFF); + + if (r > 0) + product2 = colorA; + else + if (r < 0) + product2 = colorB; + else + { + product2 = Q_INTERPOLATE8(colorA, colorB, colorC, colorD); + } + } + } + else + { + product2 = Q_INTERPOLATE8(colorA, colorB, colorC, colorD); + + if ((colorA == colorC) && (colorA == colorF) && + (colorB != colorE) && (colorB == colorJ)) + { + product = colorA; + } + else + if ((colorB == colorE) && (colorB == colorD) && (colorA != colorF) && (colorA == colorI)) + { + product = colorB; + } + else + { + product = INTERPOLATE8(colorA, colorB); + } + + if ((colorA == colorB) && (colorA == colorH) && + (colorG != colorC) && (colorC == colorM)) + { + product1 = colorA; + } + else + if ((colorC == colorG) && (colorC == colorD) && + (colorA != colorH) && (colorA == colorI)) + { + product1 = colorC; + } + else + { + product1 = INTERPOLATE8(colorA, colorC); + } + } + +////////////////////////// + + *dP=colorA; + *(dP+1)=product; + *(dP+(srcPitchHalf))=product1; + *(dP+1+(srcPitchHalf))=product2; + + bP += 1; + dP += 2; + }//end of for ( finish= width etc..) + + line += 2; + srcPtr += srcPitch; + }; //endof: for (; height; height--) + } +} + +//////////////////////////////////////////////////////////////////////// + +void SuperEagle_ex8(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstBitmap, int width, int height) +{ + DWORD dstPitch = srcPitch<<1; + DWORD srcPitchHalf = srcPitch>>1; + int finWidth = srcPitch>>2; + DWORD line; + DWORD *dP; + DWORD *bP; + int iXA,iXB,iXC,iYA,iYB,iYC,finish; + DWORD color4, color5, color6; + DWORD color1, color2, color3; + DWORD colorA1, colorA2, + colorB1, colorB2, + colorS1, colorS2; + DWORD product1a, product1b, + product2a, product2b; + + line = 0; + + { + for (; height; height-=1) + { + bP = (DWORD *)srcPtr; + dP = (DWORD *)(dstBitmap + line*dstPitch); + for (finish = width; finish; finish -= 1 ) + { + if(finish==finWidth) iXA=0; + else iXA=1; + if(finish>4) {iXB=1;iXC=2;} + else + if(finish>3) {iXB=1;iXC=1;} + else {iXB=0;iXC=0;} + if(line==0) {iYA=0;} + else {iYA=finWidth;} + if(height>4) {iYB=finWidth;iYC=srcPitchHalf;} + else + if(height>3) {iYB=finWidth;iYC=finWidth;} + else {iYB=0;iYC=0;} + + colorB1 = *(bP- iYA); + colorB2 = *(bP- iYA + iXB); + + color4 = *(bP - iXA); + color5 = *(bP); + color6 = *(bP + iXB); + colorS2 = *(bP + iXC); + + color1 = *(bP + iYB - iXA); + color2 = *(bP + iYB); + color3 = *(bP + iYB + iXB); + colorS1= *(bP + iYB + iXC); + + colorA1 = *(bP + iYC); + colorA2 = *(bP + iYC + iXB); + + if(color2 == color6 && color5 != color3) + { + product1b = product2a = color2; + if((color1 == color2) || + (color6 == colorB2)) + { + product1a = INTERPOLATE8(color2, color5); + product1a = INTERPOLATE8(color2, product1a); + } + else + { + product1a = INTERPOLATE8(color5, color6); + } + + if((color6 == colorS2) || + (color2 == colorA1)) + { + product2b = INTERPOLATE8(color2, color3); + product2b = INTERPOLATE8(color2, product2b); + } + else + { + product2b = INTERPOLATE8(color2, color3); + } + } + else + if (color5 == color3 && color2 != color6) + { + product2b = product1a = color5; + + if ((colorB1 == color5) || + (color3 == colorS1)) + { + product1b = INTERPOLATE8(color5, color6); + product1b = INTERPOLATE8(color5, product1b); + } + else + { + product1b = INTERPOLATE8(color5, color6); + } + + if ((color3 == colorA2) || + (color4 == color5)) + { + product2a = INTERPOLATE8(color5, color2); + product2a = INTERPOLATE8(color5, product2a); + } + else + { + product2a = INTERPOLATE8(color2, color3); + } + } + else + if (color5 == color3 && color2 == color6) + { + register int r = 0; + + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (color1&0x00ffffff), (colorA1&0x00ffffff)); + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (color4&0x00ffffff), (colorB1&0x00ffffff)); + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (colorA2&0x00ffffff), (colorS1&0x00ffffff)); + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (colorB2&0x00ffffff), (colorS2&0x00ffffff)); + + if (r > 0) + { + product1b = product2a = color2; + product1a = product2b = INTERPOLATE8(color5, color6); + } + else + if (r < 0) + { + product2b = product1a = color5; + product1b = product2a = INTERPOLATE8(color5, color6); + } + else + { + product2b = product1a = color5; + product1b = product2a = color2; + } + } + else + { + product2b = product1a = INTERPOLATE8(color2, color6); + product2b = Q_INTERPOLATE8(color3, color3, color3, product2b); + product1a = Q_INTERPOLATE8(color5, color5, color5, product1a); + + product2a = product1b = INTERPOLATE8(color5, color3); + product2a = Q_INTERPOLATE8(color2, color2, color2, product2a); + product1b = Q_INTERPOLATE8(color6, color6, color6, product1b); + } + +//////////////////////////////// + + *dP=product1a; + *(dP+1)=product1b; + *(dP+(srcPitchHalf))=product2a; + *(dP+1+(srcPitchHalf))=product2b; + + bP += 1; + dP += 2; + }//end of for ( finish= width etc..) + + line += 2; + srcPtr += srcPitch; + }; //endof: for (; height; height--) + } +} + +///////////////////////// + +static __inline void scale2x_32_def_whole(unsigned long* dst0, unsigned long* dst1, const unsigned long* src0, const unsigned long* src1, const unsigned long* src2, unsigned count) +{ + // first pixel + if (src0[0] != src2[0] && src1[0] != src1[1]) { + dst0[0] = src1[0] == src0[0] ? src0[0] : src1[0]; + dst0[1] = src1[1] == src0[0] ? src0[0] : src1[0]; + dst1[0] = src1[0] == src2[0] ? src2[0] : src1[0]; + dst1[1] = src1[1] == src2[0] ? src2[0] : src1[0]; + } else { + dst0[0] = src1[0]; + dst0[1] = src1[0]; + dst1[0] = src1[0]; + dst1[1] = src1[0]; + } + ++src0; + ++src1; + ++src2; + dst0 += 2; + dst1 += 2; + + // central pixels + count -= 2; + while (count) { + if (src0[0] != src2[0] && src1[-1] != src1[1]) { + dst0[0] = src1[-1] == src0[0] ? src0[0] : src1[0]; + dst0[1] = src1[1] == src0[0] ? src0[0] : src1[0]; + dst1[0] = src1[-1] == src2[0] ? src2[0] : src1[0]; + dst1[1] = src1[1] == src2[0] ? src2[0] : src1[0]; + } else { + dst0[0] = src1[0]; + dst0[1] = src1[0]; + dst1[0] = src1[0]; + dst1[1] = src1[0]; + } + + ++src0; + ++src1; + ++src2; + dst0 += 2; + dst1 += 2; + --count; + } + + // last pixel + if (src0[0] != src2[0] && src1[-1] != src1[0]) { + dst0[0] = src1[-1] == src0[0] ? src0[0] : src1[0]; + dst0[1] = src1[0] == src0[0] ? src0[0] : src1[0]; + dst1[0] = src1[-1] == src2[0] ? src2[0] : src1[0]; + dst1[1] = src1[0] == src2[0] ? src2[0] : src1[0]; + } else { + dst0[0] = src1[0]; + dst0[1] = src1[0]; + dst1[0] = src1[0]; + dst1[1] = src1[0]; + } +} + +void Scale2x_ex8(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstPtr, int width, int height) +{ + const int dstPitch = srcPitch<<1; + + int count = height; + + unsigned long *dst0 = (unsigned long *)dstPtr; + unsigned long *dst1 = dst0 + (dstPitch >> 2); + + unsigned long *src0 = (unsigned long *)srcPtr; + unsigned long *src1 = src0 + (srcPitch >> 2); + unsigned long *src2 = src1 + (srcPitch >> 2); + scale2x_32_def_whole(dst0, dst1, src0, src0, src1, width); + + count -= 2; + while(count) { + dst0 += dstPitch >> 1; + dst1 += dstPitch >> 1; + scale2x_32_def_whole(dst0, dst1, src0, src0, src1, width); + src0 = src1; + src1 = src2; + src2 += srcPitch >> 2; + --count; + } + dst0 += dstPitch >> 1; + dst1 += dstPitch >> 1; + scale2x_32_def_whole(dst0, dst1, src0, src1, src1, width); + +} + +//////////////////////////////////////////////////////////////////////// + +static __inline void scale3x_32_def_whole(unsigned long* dst0, unsigned long* dst1, unsigned long* dst2, const unsigned long* src0, const unsigned long* src1, const unsigned long* src2, unsigned count) +{ + //first pixel + if (src0[0] != src2[0] && src1[0] != src1[1]) { + dst0[0] = src1[0]; + dst0[1] = (src1[0] == src0[0] && src1[0] != src0[1]) || (src1[1] == src0[0] && src1[0] != src0[0]) ? src0[0] : src1[0]; + dst0[2] = src1[1] == src0[0] ? src1[1] : src1[0]; + dst1[0] = (src1[0] == src0[0] && src1[0] != src2[0]) || (src1[0] == src2[0] && src1[0] != src0[0]) ? src1[0] : src1[0]; + dst1[1] = src1[0]; + dst1[2] = (src1[1] == src0[0] && src1[0] != src2[1]) || (src1[1] == src2[0] && src1[0] != src0[1]) ? src1[1] : src1[0]; + dst2[0] = src1[0]; + dst2[1] = (src1[0] == src2[0] && src1[0] != src2[1]) || (src1[1] == src2[0] && src1[0] != src2[0]) ? src2[0] : src1[0]; + dst2[2] = src1[1] == src2[0] ? src1[1] : src1[0]; + } else { + dst0[0] = src1[0]; + dst0[1] = src1[0]; + dst0[2] = src1[0]; + dst1[0] = src1[0]; + dst1[1] = src1[0]; + dst1[2] = src1[0]; + dst2[0] = src1[0]; + dst2[1] = src1[0]; + dst2[2] = src1[0]; + } + ++src0; + ++src1; + ++src2; + dst0 += 3; + dst1 += 3; + dst2 += 3; + + //central pixels + count -= 2; + while (count) { + if (src0[0] != src2[0] && src1[-1] != src1[1]) { + dst0[0] = src1[-1] == src0[0] ? src1[-1] : src1[0]; + dst0[1] = (src1[-1] == src0[0] && src1[0] != src0[1]) || (src1[1] == src0[0] && src1[0] != src0[-1]) ? src0[0] : src1[0]; + dst0[2] = src1[1] == src0[0] ? src1[1] : src1[0]; + dst1[0] = (src1[-1] == src0[0] && src1[0] != src2[-1]) || (src1[-1] == src2[0] && src1[0] != src0[-1]) ? src1[-1] : src1[0]; + dst1[1] = src1[0]; + dst1[2] = (src1[1] == src0[0] && src1[0] != src2[1]) || (src1[1] == src2[0] && src1[0] != src0[1]) ? src1[1] : src1[0]; + dst2[0] = src1[-1] == src2[0] ? src1[-1] : src1[0]; + dst2[1] = (src1[-1] == src2[0] && src1[0] != src2[1]) || (src1[1] == src2[0] && src1[0] != src2[-1]) ? src2[0] : src1[0]; + dst2[2] = src1[1] == src2[0] ? src1[1] : src1[0]; + } else { + dst0[0] = src1[0]; + dst0[1] = src1[0]; + dst0[2] = src1[0]; + dst1[0] = src1[0]; + dst1[1] = src1[0]; + dst1[2] = src1[0]; + dst2[0] = src1[0]; + dst2[1] = src1[0]; + dst2[2] = src1[0]; + } + + ++src0; + ++src1; + ++src2; + dst0 += 3; + dst1 += 3; + dst2 += 3; + --count; + } + + // last pixel + if (src0[0] != src2[0] && src1[-1] != src1[0]) { + dst0[0] = src1[-1] == src0[0] ? src1[-1] : src1[0]; + dst0[1] = (src1[-1] == src0[0] && src1[0] != src0[0]) || (src1[0] == src0[0] && src1[0] != src0[-1]) ? src0[0] : src1[0]; + dst0[2] = src1[0]; + dst1[0] = (src1[-1] == src0[0] && src1[0] != src2[-1]) || (src1[-1] == src2[0] && src1[0] != src0[-1]) ? src1[-1] : src1[0]; + dst1[1] = src1[0]; + dst1[2] = (src1[0] == src0[0] && src1[0] != src2[0]) || (src1[0] == src2[0] && src1[0] != src0[0]) ? src1[0] : src1[0]; + dst2[0] = src1[-1] == src2[0] ? src1[-1] : src1[0]; + dst2[1] = (src1[-1] == src2[0] && src1[0] != src2[0]) || (src1[0] == src2[0] && src1[0] != src2[-1]) ? src2[0] : src1[0]; + dst2[2] = src1[0]; + } else { + dst0[0] = src1[0]; + dst0[1] = src1[0]; + dst0[2] = src1[0]; + dst1[0] = src1[0]; + dst1[1] = src1[0]; + dst1[2] = src1[0]; + dst2[0] = src1[0]; + dst2[1] = src1[0]; + dst2[2] = src1[0]; + } +} + + +void Scale3x_ex8(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstPtr, int width, int height) +{ + int count = height; + + int dstPitch = srcPitch >> 1; + + + unsigned long *dst0 = (unsigned long *)dstPtr; + unsigned long *dst1 = dst0 + dstPitch; + unsigned long *dst2 = dst1 + dstPitch; + + unsigned long *src0 = (unsigned long *)srcPtr; + unsigned long *src1 = src0 + (srcPitch >> 2); + unsigned long *src2 = src1 + (srcPitch >> 2); + scale3x_32_def_whole(dst0, dst1, dst2, src0, src0, src2, width); + + count -= 2; + while(count) { + dst0 += dstPitch * 3; + dst1 += dstPitch * 3; + dst2 += dstPitch * 3; + + scale3x_32_def_whole(dst0, dst1, dst2, src0, src1, src2, width); + src0 = src1; + src1 = src2; + src2 += srcPitch >> 2; + --count; + } + dst0 += dstPitch * 3; + dst1 += dstPitch * 3; + dst2 += dstPitch * 3; + + scale3x_32_def_whole(dst0, dst1, dst2, src0, src1, src1, width); +} + + +//////////////////////////////////////////////////////////////////////// + +#define colorMask6 0x0000F7DE +#define lowPixelMask6 0x00000821 +#define qcolorMask6 0x0000E79c +#define qlowpixelMask6 0x00001863 + +#define INTERPOLATE6(A, B) ((((A & colorMask6) >> 1) + ((B & colorMask6) >> 1) + (A & B & lowPixelMask6))) +#define Q_INTERPOLATE6(A, B, C, D) (((((A & qcolorMask6) >> 2) + ((B & qcolorMask6) >> 2) + ((C & qcolorMask6) >> 2) + ((D & qcolorMask6) >> 2) \ + + ((((A & qlowpixelMask6) + (B & qlowpixelMask6) + (C & qlowpixelMask6) + (D & qlowpixelMask6)) >> 2) & qlowpixelMask6)))) + +void Super2xSaI_ex6(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstBitmap, int width, int height) +{ + DWORD dstPitch = srcPitch<<1; + int finWidth = srcPitch>>1; + DWORD line; + unsigned short *dP; + unsigned short *bP; + int iXA,iXB,iXC,iYA,iYB,iYC,finish; + DWORD color4, color5, color6; + DWORD color1, color2, color3; + DWORD colorA0, colorA1, colorA2, colorA3, + colorB0, colorB1, colorB2, colorB3, + colorS1, colorS2; + DWORD product1a, product1b, + product2a, product2b; + + line = 0; + + { + for (; height; height-=1) + { + bP = (unsigned short *)srcPtr; + dP = (unsigned short *)(dstBitmap + line*dstPitch); + for (finish = width; finish; finish -= 1 ) + { +//--------------------------------------- B1 B2 +// 4 5 6 S2 +// 1 2 3 S1 +// A1 A2 + if(finish==finWidth) iXA=0; + else iXA=1; + if(finish>4) {iXB=1;iXC=2;} + else + if(finish>3) {iXB=1;iXC=1;} + else {iXB=0;iXC=0;} + if(line==0) iYA=0; + else iYA=finWidth; + if(height>4) {iYB=finWidth;iYC=srcPitch;} + else + if(height>3) {iYB=finWidth;iYC=finWidth;} + else {iYB=0;iYC=0;} + + + colorB0 = *(bP- iYA - iXA); + colorB1 = *(bP- iYA); + colorB2 = *(bP- iYA + iXB); + colorB3 = *(bP- iYA + iXC); + + color4 = *(bP - iXA); + color5 = *(bP); + color6 = *(bP + iXB); + colorS2 = *(bP + iXC); + + color1 = *(bP + iYB - iXA); + color2 = *(bP + iYB); + color3 = *(bP + iYB + iXB); + colorS1= *(bP + iYB + iXC); + + colorA0 = *(bP + iYC - iXA); + colorA1 = *(bP + iYC); + colorA2 = *(bP + iYC + iXB); + colorA3 = *(bP + iYC + iXC); + +//-------------------------------------- + if (color2 == color6 && color5 != color3) + { + product2b = product1b = color2; + } + else + if (color5 == color3 && color2 != color6) + { + product2b = product1b = color5; + } + else + if (color5 == color3 && color2 == color6) + { + register int r = 0; + + r += GET_RESULT ((color6), (color5), (color1), (colorA1)); + r += GET_RESULT ((color6), (color5), (color4), (colorB1)); + r += GET_RESULT ((color6), (color5), (colorA2), (colorS1)); + r += GET_RESULT ((color6), (color5), (colorB2), (colorS2)); + + if (r > 0) + product2b = product1b = color6; + else + if (r < 0) + product2b = product1b = color5; + else + { + product2b = product1b = INTERPOLATE6 (color5, color6); + } + } + else + { + if (color6 == color3 && color3 == colorA1 && color2 != colorA2 && color3 != colorA0) + product2b = Q_INTERPOLATE6 (color3, color3, color3, color2); + else + if (color5 == color2 && color2 == colorA2 && colorA1 != color3 && color2 != colorA3) + product2b = Q_INTERPOLATE6 (color2, color2, color2, color3); + else + product2b = INTERPOLATE6 (color2, color3); + + if (color6 == color3 && color6 == colorB1 && color5 != colorB2 && color6 != colorB0) + product1b = Q_INTERPOLATE6 (color6, color6, color6, color5); + else + if (color5 == color2 && color5 == colorB2 && colorB1 != color6 && color5 != colorB3) + product1b = Q_INTERPOLATE6 (color6, color5, color5, color5); + else + product1b = INTERPOLATE6 (color5, color6); + } + + if (color5 == color3 && color2 != color6 && color4 == color5 && color5 != colorA2) + product2a = INTERPOLATE6 (color2, color5); + else + if (color5 == color1 && color6 == color5 && color4 != color2 && color5 != colorA0) + product2a = INTERPOLATE6(color2, color5); + else + product2a = color2; + + if (color2 == color6 && color5 != color3 && color1 == color2 && color2 != colorB2) + product1a = INTERPOLATE6(color2, color5); + else + if (color4 == color2 && color3 == color2 && color1 != color5 && color2 != colorB0) + product1a = INTERPOLATE6(color2, color5); + else + product1a = color5; + + *dP=(unsigned short)product1a; + *(dP+1)=(unsigned short)product1b; + *(dP+(srcPitch))=(unsigned short)product2a; + *(dP+1+(srcPitch))=(unsigned short)product2b; + + bP += 1; + dP += 2; + }//end of for ( finish= width etc..) + + line += 2; + srcPtr += srcPitch; + }; //endof: for (; height; height--) + } +} + +//////////////////////////////////////////////////////////////////////// + +void Std2xSaI_ex6(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstBitmap, int width, int height) +{ + DWORD dstPitch = srcPitch<<1; + int finWidth = srcPitch>>1; + DWORD line; + unsigned short *dP; + unsigned short *bP; + int iXA,iXB,iXC,iYA,iYB,iYC,finish; + + DWORD colorA, colorB; + DWORD colorC, colorD, + colorE, colorF, colorG, colorH, + colorI, colorJ, colorK, colorL, + colorM, colorN, colorO, colorP; + DWORD product, product1, product2; + + line = 0; + + { + for (; height; height-=1) + { + bP = (unsigned short *)srcPtr; + dP = (unsigned short *)(dstBitmap + line*dstPitch); + for (finish = width; finish; finish -= 1 ) + { +//--------------------------------------- +// Map of the pixels: I|E F|J +// G|A B|K +// H|C D|L +// M|N O|P + if(finish==finWidth) iXA=0; + else iXA=1; + if(finish>4) {iXB=1;iXC=2;} + else + if(finish>3) {iXB=1;iXC=1;} + else {iXB=0;iXC=0;} + if(line==0) iYA=0; + else iYA=finWidth; + if(height>4) {iYB=finWidth;iYC=srcPitch;} + else + if(height>3) {iYB=finWidth;iYC=finWidth;} + else {iYB=0;iYC=0;} + + colorI = *(bP- iYA - iXA); + colorE = *(bP- iYA); + colorF = *(bP- iYA + iXB); + colorJ = *(bP- iYA + iXC); + + colorG = *(bP - iXA); + colorA = *(bP); + colorB = *(bP + iXB); + colorK = *(bP + iXC); + + colorH = *(bP + iYB - iXA); + colorC = *(bP + iYB); + colorD = *(bP + iYB + iXB); + colorL = *(bP + iYB + iXC); + + colorM = *(bP + iYC - iXA); + colorN = *(bP + iYC); + colorO = *(bP + iYC + iXB); + colorP = *(bP + iYC + iXC); + + if((colorA == colorD) && (colorB != colorC)) + { + if(((colorA == colorE) && (colorB == colorL)) || + ((colorA == colorC) && (colorA == colorF) && + (colorB != colorE) && (colorB == colorJ))) + { + product = colorA; + } + else + { + product = INTERPOLATE6(colorA, colorB); + } + + if(((colorA == colorG) && (colorC == colorO)) || + ((colorA == colorB) && (colorA == colorH) && + (colorG != colorC) && (colorC == colorM))) + { + product1 = colorA; + } + else + { + product1 = INTERPOLATE6(colorA, colorC); + } + product2 = colorA; + } + else + if((colorB == colorC) && (colorA != colorD)) + { + if(((colorB == colorF) && (colorA == colorH)) || + ((colorB == colorE) && (colorB == colorD) && + (colorA != colorF) && (colorA == colorI))) + { + product = colorB; + } + else + { + product = INTERPOLATE6(colorA, colorB); + } + + if(((colorC == colorH) && (colorA == colorF)) || + ((colorC == colorG) && (colorC == colorD) && + (colorA != colorH) && (colorA == colorI))) + { + product1 = colorC; + } + else + { + product1=INTERPOLATE6(colorA, colorC); + } + product2 = colorB; + } + else + if((colorA == colorD) && (colorB == colorC)) + { + if (colorA == colorB) + { + product = colorA; + product1 = colorA; + product2 = colorA; + } + else + { + register int r = 0; + product1 = INTERPOLATE6(colorA, colorC); + product = INTERPOLATE6(colorA, colorB); + + r += GetResult1 (colorA, colorB, colorG, colorE, colorI); + r += GetResult2 (colorB, colorA, colorK, colorF, colorJ); + r += GetResult2 (colorB, colorA, colorH, colorN, colorM); + r += GetResult1 (colorA, colorB, colorL, colorO, colorP); + + if (r > 0) + product2 = colorA; + else + if (r < 0) + product2 = colorB; + else + { + product2 = Q_INTERPOLATE6(colorA, colorB, colorC, colorD); + } + } + } + else + { + product2 = Q_INTERPOLATE6(colorA, colorB, colorC, colorD); + + if ((colorA == colorC) && (colorA == colorF) && + (colorB != colorE) && (colorB == colorJ)) + { + product = colorA; + } + else + if ((colorB == colorE) && (colorB == colorD) && (colorA != colorF) && (colorA == colorI)) + { + product = colorB; + } + else + { + product = INTERPOLATE6(colorA, colorB); + } + + if ((colorA == colorB) && (colorA == colorH) && + (colorG != colorC) && (colorC == colorM)) + { + product1 = colorA; + } + else + if ((colorC == colorG) && (colorC == colorD) && + (colorA != colorH) && (colorA == colorI)) + { + product1 = colorC; + } + else + { + product1 = INTERPOLATE6(colorA, colorC); + } + } + + *dP=(unsigned short)colorA; + *(dP+1)=(unsigned short)product; + *(dP+(srcPitch))=(unsigned short)product1; + *(dP+1+(srcPitch))=(unsigned short)product2; + + bP += 1; + dP += 2; + }//end of for ( finish= width etc..) + + line += 2; + srcPtr += srcPitch; + }; //endof: for (; height; height--) + } +} + +//////////////////////////////////////////////////////////////////////// + +void SuperEagle_ex6(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstBitmap, int width, int height) +{ + DWORD dstPitch = srcPitch<<1; + int finWidth = srcPitch>>1; + DWORD line; + unsigned short *dP; + unsigned short *bP; + int iXA,iXB,iXC,iYA,iYB,iYC,finish; + DWORD color4, color5, color6; + DWORD color1, color2, color3; + DWORD colorA1, colorA2, + colorB1, colorB2, + colorS1, colorS2; + DWORD product1a, product1b, + product2a, product2b; + + line = 0; + + { + for (; height; height-=1) + { + bP = (unsigned short *)srcPtr; + dP = (unsigned short *)(dstBitmap + line*dstPitch); + for (finish = width; finish; finish -= 1 ) + { + if(finish==finWidth) iXA=0; + else iXA=1; + if(finish>4) {iXB=1;iXC=2;} + else + if(finish>3) {iXB=1;iXC=1;} + else {iXB=0;iXC=0;} + if(line==0) iYA=0; + else iYA=finWidth; + if(height>4) {iYB=finWidth;iYC=srcPitch;} + else + if(height>3) {iYB=finWidth;iYC=finWidth;} + else {iYB=0;iYC=0;} + + colorB1 = *(bP- iYA); + colorB2 = *(bP- iYA + iXB); + + color4 = *(bP - iXA); + color5 = *(bP); + color6 = *(bP + iXB); + colorS2 = *(bP + iXC); + + color1 = *(bP + iYB - iXA); + color2 = *(bP + iYB); + color3 = *(bP + iYB + iXB); + colorS1= *(bP + iYB + iXC); + + colorA1 = *(bP + iYC); + colorA2 = *(bP + iYC + iXB); + + if(color2 == color6 && color5 != color3) + { + product1b = product2a = color2; + if((color1 == color2) || + (color6 == colorB2)) + { + product1a = INTERPOLATE6(color2, color5); + product1a = INTERPOLATE6(color2, product1a); + } + else + { + product1a = INTERPOLATE6(color5, color6); + } + + if((color6 == colorS2) || + (color2 == colorA1)) + { + product2b = INTERPOLATE6(color2, color3); + product2b = INTERPOLATE6(color2, product2b); + } + else + { + product2b = INTERPOLATE6(color2, color3); + } + } + else + if (color5 == color3 && color2 != color6) + { + product2b = product1a = color5; + + if ((colorB1 == color5) || + (color3 == colorS1)) + { + product1b = INTERPOLATE6(color5, color6); + product1b = INTERPOLATE6(color5, product1b); + } + else + { + product1b = INTERPOLATE6(color5, color6); + } + + if ((color3 == colorA2) || + (color4 == color5)) + { + product2a = INTERPOLATE6(color5, color2); + product2a = INTERPOLATE6(color5, product2a); + } + else + { + product2a = INTERPOLATE6(color2, color3); + } + } + else + if (color5 == color3 && color2 == color6) + { + register int r = 0; + + r += GET_RESULT ((color6), (color5), (color1), (colorA1)); + r += GET_RESULT ((color6), (color5), (color4), (colorB1)); + r += GET_RESULT ((color6), (color5), (colorA2), (colorS1)); + r += GET_RESULT ((color6), (color5), (colorB2), (colorS2)); + + if (r > 0) + { + product1b = product2a = color2; + product1a = product2b = INTERPOLATE6(color5, color6); + } + else + if (r < 0) + { + product2b = product1a = color5; + product1b = product2a = INTERPOLATE6(color5, color6); + } + else + { + product2b = product1a = color5; + product1b = product2a = color2; + } + } + else + { + product2b = product1a = INTERPOLATE6(color2, color6); + product2b = Q_INTERPOLATE6(color3, color3, color3, product2b); + product1a = Q_INTERPOLATE6(color5, color5, color5, product1a); + + product2a = product1b = INTERPOLATE6(color5, color3); + product2a = Q_INTERPOLATE6(color2, color2, color2, product2a); + product1b = Q_INTERPOLATE6(color6, color6, color6, product1b); + } + + *dP=(unsigned short)product1a; + *(dP+1)=(unsigned short)product1b; + *(dP+(srcPitch))=(unsigned short)product2a; + *(dP+1+(srcPitch))=(unsigned short)product2b; + + bP += 1; + dP += 2; + }//end of for ( finish= width etc..) + + line += 2; + srcPtr += srcPitch; + }; //endof: for (; height; height--) + } +} + +//////////////////////////////////////////////////////////////////////// + +#ifndef MAX +#define MAX(a,b) (((a) > (b)) ? (a) : (b)) +#define MIN(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +void Scale2x_ex6_5(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstBitmap, int width, int height) +{ + int looph, loopw; + + unsigned char * srcpix = srcPtr; + unsigned char * dstpix = dstBitmap; + + const int srcpitch = srcPitch; + const int dstpitch = srcPitch<<1; + + unsigned short E0, E1, E2, E3, B, D, E, F, H; + for(looph = 0; looph < height; ++looph) + { + for(loopw = 0; loopw < width; ++ loopw) + { + B = *(unsigned short*)(srcpix + (MAX(0,looph-1)*srcpitch) + (2*loopw)); + D = *(unsigned short*)(srcpix + (looph*srcpitch) + (2*MAX(0,loopw-1))); + E = *(unsigned short*)(srcpix + (looph*srcpitch) + (2*loopw)); + F = *(unsigned short*)(srcpix + (looph*srcpitch) + (2*MIN(width-1,loopw+1))); + H = *(unsigned short*)(srcpix + (MIN(height-1,looph+1)*srcpitch) + (2*loopw)); + + if (B != H && D != F) { + E0 = D == B ? D : E; + E1 = B == F ? F : E; + E2 = D == H ? D : E; + E3 = H == F ? F : E; + } else { + E0 = E; + E1 = E; + E2 = E; + E3 = E; + } + + + *(unsigned short*)(dstpix + looph*2*dstpitch + loopw*2*2) = E0; + *(unsigned short*)(dstpix + looph*2*dstpitch + (loopw*2+1)*2) = E1; + *(unsigned short*)(dstpix + (looph*2+1)*dstpitch + loopw*2*2) = E2; + *(unsigned short*)(dstpix + (looph*2+1)*dstpitch + (loopw*2+1)*2) = E3; + } + } +} + +//////////////////////////////////////////////////////////////////////// +static __inline void scale3x_16_def_whole(unsigned short* dst0, unsigned short *dst1, unsigned short *dst2, const unsigned short *src0, const unsigned short *src1, const unsigned short *src2, unsigned count) +{ + //assert(count >= 2); + + /* first pixel */ + if (src0[0] != src2[0] && src1[0] != src1[1]) { + dst0[0] = src1[0]; + dst0[1] = (src1[0] == src0[0] && src1[0] != src0[1]) || (src1[1] == src0[0] && src1[0] != src0[0]) ? src0[0] : src1[0]; + dst0[2] = src1[1] == src0[0] ? src1[1] : src1[0]; + dst1[0] = (src1[0] == src0[0] && src1[0] != src2[0]) || (src1[0] == src2[0] && src1[0] != src0[0]) ? src1[0] : src1[0]; + dst1[1] = src1[0]; + dst1[2] = (src1[1] == src0[0] && src1[0] != src2[1]) || (src1[1] == src2[0] && src1[0] != src0[1]) ? src1[1] : src1[0]; + dst2[0] = src1[0]; + dst2[1] = (src1[0] == src2[0] && src1[0] != src2[1]) || (src1[1] == src2[0] && src1[0] != src2[0]) ? src2[0] : src1[0]; + dst2[2] = src1[1] == src2[0] ? src1[1] : src1[0]; + } else { + dst0[0] = src1[0]; + dst0[1] = src1[0]; + dst0[2] = src1[0]; + dst1[0] = src1[0]; + dst1[1] = src1[0]; + dst1[2] = src1[0]; + dst2[0] = src1[0]; + dst2[1] = src1[0]; + dst2[2] = src1[0]; + } + ++src0; + ++src1; + ++src2; + dst0 += 3; + dst1 += 3; + dst2 += 3; + + /* central pixels */ + count -= 2; + while (count) { + if (src0[0] != src2[0] && src1[-1] != src1[1]) { + dst0[0] = src1[-1] == src0[0] ? src1[-1] : src1[0]; + dst0[1] = (src1[-1] == src0[0] && src1[0] != src0[1]) || (src1[1] == src0[0] && src1[0] != src0[-1]) ? src0[0] : src1[0]; + dst0[2] = src1[1] == src0[0] ? src1[1] : src1[0]; + dst1[0] = (src1[-1] == src0[0] && src1[0] != src2[-1]) || (src1[-1] == src2[0] && src1[0] != src0[-1]) ? src1[-1] : src1[0]; + dst1[1] = src1[0]; + dst1[2] = (src1[1] == src0[0] && src1[0] != src2[1]) || (src1[1] == src2[0] && src1[0] != src0[1]) ? src1[1] : src1[0]; + dst2[0] = src1[-1] == src2[0] ? src1[-1] : src1[0]; + dst2[1] = (src1[-1] == src2[0] && src1[0] != src2[1]) || (src1[1] == src2[0] && src1[0] != src2[-1]) ? src2[0] : src1[0]; + dst2[2] = src1[1] == src2[0] ? src1[1] : src1[0]; + } else { + dst0[0] = src1[0]; + dst0[1] = src1[0]; + dst0[2] = src1[0]; + dst1[0] = src1[0]; + dst1[1] = src1[0]; + dst1[2] = src1[0]; + dst2[0] = src1[0]; + dst2[1] = src1[0]; + dst2[2] = src1[0]; + } + + ++src0; + ++src1; + ++src2; + dst0 += 3; + dst1 += 3; + dst2 += 3; + --count; + } + + /* last pixel */ + if (src0[0] != src2[0] && src1[-1] != src1[0]) { + dst0[0] = src1[-1] == src0[0] ? src1[-1] : src1[0]; + dst0[1] = (src1[-1] == src0[0] && src1[0] != src0[0]) || (src1[0] == src0[0] && src1[0] != src0[-1]) ? src0[0] : src1[0]; + dst0[2] = src1[0]; + dst1[0] = (src1[-1] == src0[0] && src1[0] != src2[-1]) || (src1[-1] == src2[0] && src1[0] != src0[-1]) ? src1[-1] : src1[0]; + dst1[1] = src1[0]; + dst1[2] = (src1[0] == src0[0] && src1[0] != src2[0]) || (src1[0] == src2[0] && src1[0] != src0[0]) ? src1[0] : src1[0]; + dst2[0] = src1[-1] == src2[0] ? src1[-1] : src1[0]; + dst2[1] = (src1[-1] == src2[0] && src1[0] != src2[0]) || (src1[0] == src2[0] && src1[0] != src2[-1]) ? src2[0] : src1[0]; + dst2[2] = src1[0]; + } else { + dst0[0] = src1[0]; + dst0[1] = src1[0]; + dst0[2] = src1[0]; + dst1[0] = src1[0]; + dst1[1] = src1[0]; + dst1[2] = src1[0]; + dst2[0] = src1[0]; + dst2[1] = src1[0]; + dst2[2] = src1[0]; + } +} + + + +void Scale3x_ex6_5(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstPtr, int width, int height) +{ + int count = height; + int dstPitch = srcPitch; + + unsigned short *dst0 = (unsigned short *)dstPtr; + unsigned short *dst1 = dst0 + dstPitch; + unsigned short *dst2 = dst1 + dstPitch; + + unsigned short *src0 = (unsigned short *)srcPtr; + unsigned short *src1 = src0 + (srcPitch >> 1); + unsigned short *src2 = src1 + (srcPitch >> 1); + scale3x_16_def_whole(dst0, dst1, dst2, src0, src1, src2, count); + + count -= 2; + while(count) { + + dst0 += dstPitch * 3; + dst1 += dstPitch * 3; + dst2 += dstPitch * 3; + + scale3x_16_def_whole(dst0, dst1, dst2, src0, src1, src2, width); + src0 = src1; + src1 = src2; + src2 += srcPitch >> 1; + --count; + } + dst0 += dstPitch * 3; + dst1 += dstPitch * 3; + dst2 += dstPitch * 3; + + scale3x_16_def_whole(dst0, dst1, dst2, src0, src1, src1, width); +} + +//////////////////////////////////////////////////////////////////////// + +/* +#define colorMask5 0x0000F7DE +#define lowPixelMask5 0x00000821 +#define qcolorMask5 0x0000E79c +#define qlowpixelMask5 0x00001863 +*/ + +#define colorMask5 0x00007BDE +#define lowPixelMask5 0x00000421 +#define qcolorMask5 0x0000739c +#define qlowpixelMask5 0x00000C63 + +#define INTERPOLATE5(A, B) ((((A & colorMask5) >> 1) + ((B & colorMask5) >> 1) + (A & B & lowPixelMask5))) +#define Q_INTERPOLATE5(A, B, C, D) (((((A & qcolorMask5) >> 2) + ((B & qcolorMask5) >> 2) + ((C & qcolorMask5) >> 2) + ((D & qcolorMask5) >> 2) \ + + ((((A & qlowpixelMask5) + (B & qlowpixelMask5) + (C & qlowpixelMask5) + (D & qlowpixelMask5)) >> 2) & qlowpixelMask5)))) + +void Super2xSaI_ex5(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstBitmap, int width, int height) +{ + DWORD dstPitch = srcPitch<<1; + int finWidth = srcPitch>>1; + DWORD line; + unsigned short *dP; + unsigned short *bP; + int iXA,iXB,iXC,iYA,iYB,iYC,finish; + DWORD color4, color5, color6; + DWORD color1, color2, color3; + DWORD colorA0, colorA1, colorA2, colorA3, + colorB0, colorB1, colorB2, colorB3, + colorS1, colorS2; + DWORD product1a, product1b, + product2a, product2b; + + line = 0; + + { + for (; height; height-=1) + { + bP = (unsigned short *)srcPtr; + dP = (unsigned short *)(dstBitmap + line*dstPitch); + for (finish = width; finish; finish -= 1 ) + { +//--------------------------------------- B1 B2 +// 4 5 6 S2 +// 1 2 3 S1 +// A1 A2 + if(finish==finWidth) iXA=0; + else iXA=1; + if(finish>4) {iXB=1;iXC=2;} + else + if(finish>3) {iXB=1;iXC=1;} + else {iXB=0;iXC=0;} + if(line==0) iYA=0; + else iYA=finWidth; + if(height>4) {iYB=finWidth;iYC=srcPitch;} + else + if(height>3) {iYB=finWidth;iYC=finWidth;} + else {iYB=0;iYC=0;} + + + colorB0 = *(bP- iYA - iXA); + colorB1 = *(bP- iYA); + colorB2 = *(bP- iYA + iXB); + colorB3 = *(bP- iYA + iXC); + + color4 = *(bP - iXA); + color5 = *(bP); + color6 = *(bP + iXB); + colorS2 = *(bP + iXC); + + color1 = *(bP + iYB - iXA); + color2 = *(bP + iYB); + color3 = *(bP + iYB + iXB); + colorS1= *(bP + iYB + iXC); + + colorA0 = *(bP + iYC - iXA); + colorA1 = *(bP + iYC); + colorA2 = *(bP + iYC + iXB); + colorA3 = *(bP + iYC + iXC); + +//-------------------------------------- + if (color2 == color6 && color5 != color3) + { + product2b = product1b = color2; + } + else + if (color5 == color3 && color2 != color6) + { + product2b = product1b = color5; + } + else + if (color5 == color3 && color2 == color6) + { + register int r = 0; + + r += GET_RESULT ((color6), (color5), (color1), (colorA1)); + r += GET_RESULT ((color6), (color5), (color4), (colorB1)); + r += GET_RESULT ((color6), (color5), (colorA2), (colorS1)); + r += GET_RESULT ((color6), (color5), (colorB2), (colorS2)); + + if (r > 0) + product2b = product1b = color6; + else + if (r < 0) + product2b = product1b = color5; + else + { + product2b = product1b = INTERPOLATE5 (color5, color6); + } + } + else + { + if (color6 == color3 && color3 == colorA1 && color2 != colorA2 && color3 != colorA0) + product2b = Q_INTERPOLATE5 (color3, color3, color3, color2); + else + if (color5 == color2 && color2 == colorA2 && colorA1 != color3 && color2 != colorA3) + product2b = Q_INTERPOLATE5 (color2, color2, color2, color3); + else + product2b = INTERPOLATE5 (color2, color3); + + if (color6 == color3 && color6 == colorB1 && color5 != colorB2 && color6 != colorB0) + product1b = Q_INTERPOLATE5 (color6, color6, color6, color5); + else + if (color5 == color2 && color5 == colorB2 && colorB1 != color6 && color5 != colorB3) + product1b = Q_INTERPOLATE5 (color6, color5, color5, color5); + else + product1b = INTERPOLATE5 (color5, color6); + } + + if (color5 == color3 && color2 != color6 && color4 == color5 && color5 != colorA2) + product2a = INTERPOLATE5 (color2, color5); + else + if (color5 == color1 && color6 == color5 && color4 != color2 && color5 != colorA0) + product2a = INTERPOLATE5(color2, color5); + else + product2a = color2; + + if (color2 == color6 && color5 != color3 && color1 == color2 && color2 != colorB2) + product1a = INTERPOLATE5(color2, color5); + else + if (color4 == color2 && color3 == color2 && color1 != color5 && color2 != colorB0) + product1a = INTERPOLATE5(color2, color5); + else + product1a = color5; + + *dP=(unsigned short)product1a; + *(dP+1)=(unsigned short)product1b; + *(dP+(srcPitch))=(unsigned short)product2a; + *(dP+1+(srcPitch))=(unsigned short)product2b; + + bP += 1; + dP += 2; + }//end of for ( finish= width etc..) + + line += 2; + srcPtr += srcPitch; + }; //endof: for (; height; height--) + } +} + +//////////////////////////////////////////////////////////////////////// + +void Std2xSaI_ex5(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstBitmap, int width, int height) +{ + DWORD dstPitch = srcPitch<<1; + int finWidth = srcPitch>>1; + DWORD line; + unsigned short *dP; + unsigned short *bP; + int iXA,iXB,iXC,iYA,iYB,iYC,finish; + DWORD colorA, colorB; + DWORD colorC, colorD, + colorE, colorF, colorG, colorH, + colorI, colorJ, colorK, colorL, + colorM, colorN, colorO, colorP; + DWORD product, product1, product2; + + line = 0; + + { + for (; height; height-=1) + { + bP = (unsigned short *)srcPtr; + dP = (unsigned short *)(dstBitmap + line*dstPitch); + for (finish = width; finish; finish -= 1 ) + { +//--------------------------------------- +// Map of the pixels: I|E F|J +// G|A B|K +// H|C D|L +// M|N O|P + if(finish==finWidth) iXA=0; + else iXA=1; + if(finish>4) {iXB=1;iXC=2;} + else + if(finish>3) {iXB=1;iXC=1;} + else {iXB=0;iXC=0;} + if(line==0) iYA=0; + else iYA=finWidth; + if(height>4) {iYB=finWidth;iYC=srcPitch;} + else + if(height>3) {iYB=finWidth;iYC=finWidth;} + else {iYB=0;iYC=0;} + + colorI = *(bP- iYA - iXA); + colorE = *(bP- iYA); + colorF = *(bP- iYA + iXB); + colorJ = *(bP- iYA + iXC); + + colorG = *(bP - iXA); + colorA = *(bP); + colorB = *(bP + iXB); + colorK = *(bP + iXC); + + colorH = *(bP + iYB - iXA); + colorC = *(bP + iYB); + colorD = *(bP + iYB + iXB); + colorL = *(bP + iYB + iXC); + + colorM = *(bP + iYC - iXA); + colorN = *(bP + iYC); + colorO = *(bP + iYC + iXB); + colorP = *(bP + iYC + iXC); + + if((colorA == colorD) && (colorB != colorC)) + { + if(((colorA == colorE) && (colorB == colorL)) || + ((colorA == colorC) && (colorA == colorF) && + (colorB != colorE) && (colorB == colorJ))) + { + product = colorA; + } + else + { + product = INTERPOLATE5(colorA, colorB); + } + + if(((colorA == colorG) && (colorC == colorO)) || + ((colorA == colorB) && (colorA == colorH) && + (colorG != colorC) && (colorC == colorM))) + { + product1 = colorA; + } + else + { + product1 = INTERPOLATE5(colorA, colorC); + } + product2 = colorA; + } + else + if((colorB == colorC) && (colorA != colorD)) + { + if(((colorB == colorF) && (colorA == colorH)) || + ((colorB == colorE) && (colorB == colorD) && + (colorA != colorF) && (colorA == colorI))) + { + product = colorB; + } + else + { + product = INTERPOLATE5(colorA, colorB); + } + + if(((colorC == colorH) && (colorA == colorF)) || + ((colorC == colorG) && (colorC == colorD) && + (colorA != colorH) && (colorA == colorI))) + { + product1 = colorC; + } + else + { + product1=INTERPOLATE5(colorA, colorC); + } + product2 = colorB; + } + else + if((colorA == colorD) && (colorB == colorC)) + { + if (colorA == colorB) + { + product = colorA; + product1 = colorA; + product2 = colorA; + } + else + { + register int r = 0; + product1 = INTERPOLATE5(colorA, colorC); + product = INTERPOLATE5(colorA, colorB); + + r += GetResult1 (colorA, colorB, colorG, colorE, colorI); + r += GetResult2 (colorB, colorA, colorK, colorF, colorJ); + r += GetResult2 (colorB, colorA, colorH, colorN, colorM); + r += GetResult1 (colorA, colorB, colorL, colorO, colorP); + + if (r > 0) + product2 = colorA; + else + if (r < 0) + product2 = colorB; + else + { + product2 = Q_INTERPOLATE5(colorA, colorB, colorC, colorD); + } + } + } + else + { + product2 = Q_INTERPOLATE5(colorA, colorB, colorC, colorD); + + if ((colorA == colorC) && (colorA == colorF) && + (colorB != colorE) && (colorB == colorJ)) + { + product = colorA; + } + else + if ((colorB == colorE) && (colorB == colorD) && (colorA != colorF) && (colorA == colorI)) + { + product = colorB; + } + else + { + product = INTERPOLATE5(colorA, colorB); + } + + if ((colorA == colorB) && (colorA == colorH) && + (colorG != colorC) && (colorC == colorM)) + { + product1 = colorA; + } + else + if ((colorC == colorG) && (colorC == colorD) && + (colorA != colorH) && (colorA == colorI)) + { + product1 = colorC; + } + else + { + product1 = INTERPOLATE5(colorA, colorC); + } + } + + *dP=(unsigned short)colorA; + *(dP+1)=(unsigned short)product; + *(dP+(srcPitch))=(unsigned short)product1; + *(dP+1+(srcPitch))=(unsigned short)product2; + + bP += 1; + dP += 2; + }//end of for ( finish= width etc..) + + line += 2; + srcPtr += srcPitch; + }; //endof: for (; height; height--) + } +} + +//////////////////////////////////////////////////////////////////////// + +void SuperEagle_ex5(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstBitmap, int width, int height) +{ + DWORD dstPitch = srcPitch<<1; + int finWidth = srcPitch>>1; + DWORD line; + unsigned short *dP; + unsigned short *bP; + int iXA,iXB,iXC,iYA,iYB,iYC,finish; + DWORD color4, color5, color6; + DWORD color1, color2, color3; + DWORD colorA1, colorA2, + colorB1, colorB2, + colorS1, colorS2; + DWORD product1a, product1b, + product2a, product2b; + + line = 0; + + { + for (; height; height-=1) + { + bP = (unsigned short *)srcPtr; + dP = (unsigned short *)(dstBitmap + line*dstPitch); + for (finish = width; finish; finish -= 1 ) + { + if(finish==finWidth) iXA=0; + else iXA=1; + if(finish>4) {iXB=1;iXC=2;} + else + if(finish>3) {iXB=1;iXC=1;} + else {iXB=0;iXC=0;} + if(line==0) iYA=0; + else iYA=finWidth; + if(height>4) {iYB=finWidth;iYC=srcPitch;} + else + if(height>3) {iYB=finWidth;iYC=finWidth;} + else {iYB=0;iYC=0;} + + colorB1 = *(bP- iYA); + colorB2 = *(bP- iYA + iXB); + + color4 = *(bP - iXA); + color5 = *(bP); + color6 = *(bP + iXB); + colorS2 = *(bP + iXC); + + color1 = *(bP + iYB - iXA); + color2 = *(bP + iYB); + color3 = *(bP + iYB + iXB); + colorS1= *(bP + iYB + iXC); + + colorA1 = *(bP + iYC); + colorA2 = *(bP + iYC + iXB); + + if(color2 == color6 && color5 != color3) + { + product1b = product2a = color2; + if((color1 == color2) || + (color6 == colorB2)) + { + product1a = INTERPOLATE5(color2, color5); + product1a = INTERPOLATE5(color2, product1a); + } + else + { + product1a = INTERPOLATE5(color5, color6); + } + + if((color6 == colorS2) || + (color2 == colorA1)) + { + product2b = INTERPOLATE5(color2, color3); + product2b = INTERPOLATE5(color2, product2b); + } + else + { + product2b = INTERPOLATE5(color2, color3); + } + } + else + if (color5 == color3 && color2 != color6) + { + product2b = product1a = color5; + + if ((colorB1 == color5) || + (color3 == colorS1)) + { + product1b = INTERPOLATE5(color5, color6); + product1b = INTERPOLATE5(color5, product1b); + } + else + { + product1b = INTERPOLATE5(color5, color6); + } + + if ((color3 == colorA2) || + (color4 == color5)) + { + product2a = INTERPOLATE5(color5, color2); + product2a = INTERPOLATE5(color5, product2a); + } + else + { + product2a = INTERPOLATE5(color2, color3); + } + } + else + if (color5 == color3 && color2 == color6) + { + register int r = 0; + + r += GET_RESULT ((color6), (color5), (color1), (colorA1)); + r += GET_RESULT ((color6), (color5), (color4), (colorB1)); + r += GET_RESULT ((color6), (color5), (colorA2), (colorS1)); + r += GET_RESULT ((color6), (color5), (colorB2), (colorS2)); + + if (r > 0) + { + product1b = product2a = color2; + product1a = product2b = INTERPOLATE5(color5, color6); + } + else + if (r < 0) + { + product2b = product1a = color5; + product1b = product2a = INTERPOLATE5(color5, color6); + } + else + { + product2b = product1a = color5; + product1b = product2a = color2; + } + } + else + { + product2b = product1a = INTERPOLATE5(color2, color6); + product2b = Q_INTERPOLATE5(color3, color3, color3, product2b); + product1a = Q_INTERPOLATE5(color5, color5, color5, product1a); + + product2a = product1b = INTERPOLATE5(color5, color3); + product2a = Q_INTERPOLATE5(color2, color2, color2, product2a); + product1b = Q_INTERPOLATE5(color6, color6, color6, product1b); + } + + *dP=(unsigned short)product1a; + *(dP+1)=(unsigned short)product1b; + *(dP+(srcPitch))=(unsigned short)product2a; + *(dP+1+(srcPitch))=(unsigned short)product2b; + + bP += 1; + dP += 2; + }//end of for ( finish= width etc..) + + line += 2; + srcPtr += srcPitch; + }; //endof: for (; height; height--) + } +} + +//////////////////////////////////////////////////////////////////////// +// own swap buffer func (window/fullscreen) +//////////////////////////////////////////////////////////////////////// + +sDX DX; +static DDSURFACEDESC ddsd; +GUID guiDev; +BOOL bDeviceOK; +HWND hWGPU; +int iSysMemory=0; +int iFPSEInterface=0; +int iRefreshRate; +BOOL bVsync=FALSE; +BOOL bVsync_Key=FALSE; + +void (*BlitScreen) (unsigned char *,long,long); +void (*pExtraBltFunc) (void); +void (*p2XSaIFunc) (unsigned char *,DWORD,unsigned char *,int,int); + +//////////////////////////////////////////////////////////////////////// + +static __inline void WaitVBlank(void) +{ + if(bVsync_Key) + { + IDirectDraw2_WaitForVerticalBlank(DX.DD,DDWAITVB_BLOCKBEGIN,0); + } +} + +//////////////////////////////////////////////////////////////////////// + +void BlitScreen32(unsigned char * surf,long x,long y) // BLIT IN 32bit COLOR MODE +{ + unsigned char * pD;unsigned long lu;unsigned short s; + unsigned int startxy; + short row,column; + short dx=(short)PreviousPSXDisplay.Range.x1; + short dy=(short)PreviousPSXDisplay.DisplayMode.y; + + if(iDebugMode && iFVDisplay) + { + dx=1024; + dy=iGPUHeight; + x=0;y=0; + + for(column=0;column>7)&0xf8))&0xffffff)|0xff000000; + } + } + return; + } + + + if(PreviousPSXDisplay.Range.y0) // centering needed? + { + surf+=PreviousPSXDisplay.Range.y0*ddsd.lPitch; + dy-=PreviousPSXDisplay.Range.y0; + } + + surf+=PreviousPSXDisplay.Range.x0<<2; + + if(PSXDisplay.RGB24) + { + if(iFPSEInterface) + { + for(column=0;column>7)&0xf8))&0xffffff)|0xff000000; + } + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void BlitScreen32_2xSaI(unsigned char * surf,long x,long y) // BLIT IN 32bit COLOR MODE +{ + unsigned char * pD;unsigned long lu;unsigned short s; + unsigned int startxy,off1,off2; + short row,column; + short dx=(short)PreviousPSXDisplay.Range.x1; + short dy=(short)PreviousPSXDisplay.DisplayMode.y; + unsigned char * pS=(unsigned char *)pSaISmallBuff; + unsigned long * pS1, * pS2; + + if(PreviousPSXDisplay.DisplayMode.x>512) + {BlitScreen32(surf,x,y);return;} + + if(PreviousPSXDisplay.Range.y0) // centering needed? + { + pS+=PreviousPSXDisplay.Range.y0*2048; + dy-=PreviousPSXDisplay.Range.y0; + } + + pS+=PreviousPSXDisplay.Range.x0<<2; + + if(PSXDisplay.RGB24) + { + if(iFPSEInterface) + { + for(column=0;column>7)&0xf8))&0xffffff)|0xff000000; + } + } + } + + // ok, here we have filled pSaISmallBuff with PreviousPSXDisplay.DisplayMode.x * PreviousPSXDisplay.DisplayMode.y (*4) data + // now do a 2xSai blit to pSaIBigBuff + + p2XSaIFunc((unsigned char *)pSaISmallBuff, 2048, + (unsigned char *)pSaIBigBuff, + PreviousPSXDisplay.DisplayMode.x, + PreviousPSXDisplay.DisplayMode.y); + + // ok, here we have pSaIBigBuff filled with the 2xSai image... + // now transfer it to the surface + + dx=(short)PreviousPSXDisplay.DisplayMode.x<<1; + dy=(short)PreviousPSXDisplay.DisplayMode.y<<1; + off1=(ddsd.lPitch>>2)-dx; + off2=1024-dx; + + pS1=(unsigned long *)surf; + pS2=(unsigned long *)pSaIBigBuff; + + for(column=0;column512) + {BlitScreen32(surf,x,y);return;} + + if(PreviousPSXDisplay.Range.y0) // centering needed? + { + pS+=PreviousPSXDisplay.Range.y0*2048; + dy-=PreviousPSXDisplay.Range.y0; + } + + pS+=PreviousPSXDisplay.Range.x0<<2; + + if(PSXDisplay.RGB24) + { + if(iFPSEInterface) + { + for(column=0;column>7)&0xf8))&0xffffff)|0xff000000; + } + } + } + + // ok, here we have filled pSaISmallBuff with PreviousPSXDisplay.DisplayMode.x * PreviousPSXDisplay.DisplayMode.y (*4) data + // now do a 2xSai blit to pSaIBigBuff + + p2XSaIFunc((unsigned char *)pSaISmallBuff, 2048, + (unsigned char *)pSaIBigBuff, + PreviousPSXDisplay.DisplayMode.x, + PreviousPSXDisplay.DisplayMode.y); + + // ok, here we have pSaIBigBuff filled with the 2xSai image... + // now transfer it to the surface + //CHANGED << 1 to * 3 + + dx=(short)PreviousPSXDisplay.DisplayMode.x * 3; + dy=(short)PreviousPSXDisplay.DisplayMode.y * 3; + + off1=(ddsd.lPitch>>2)-dx; + off2=1024-dx; + + pS1=(unsigned long *)surf; + pS2=(unsigned long *)pSaIBigBuff; + + for(column=0;column>=1; + + LineOffset = 512 - dx; + SurfOffset = (ddsd.lPitch>>2) - dx; + + for(column=0;column>10)&0x1f001f); + } + SRCPtr += LineOffset; + DSTPtr += SurfOffset; + } + return; + } + + if(PreviousPSXDisplay.Range.y0) // centering needed? + { + surf+=PreviousPSXDisplay.Range.y0*ddsd.lPitch; + dy-=PreviousPSXDisplay.Range.y0; + } + + if(PSXDisplay.RGB24) + { + unsigned char * pD;unsigned int startxy; + + surf+=PreviousPSXDisplay.Range.x0<<1; + + if(iFPSEInterface) + { + for(column=0;column>3)); + pD+=3; + } + } + } + else + { + for(column=0;column>3)); + pD+=3; + } + } + } + } + else + { + unsigned short LineOffset,SurfOffset; + unsigned long * SRCPtr = (unsigned long *)(psxVuw + + (y<<10) + x); + unsigned long * DSTPtr = + ((unsigned long *)surf)+(PreviousPSXDisplay.Range.x0>>1); + + dx>>=1; + + LineOffset = 512 - dx; + SurfOffset = (ddsd.lPitch>>2) - dx; + + for(column=0;column>10)&0x1f001f); + } + SRCPtr += LineOffset; + DSTPtr += SurfOffset; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void BlitScreen16_2xSaI(unsigned char * surf,long x,long y) // BLIT IN 16bit COLOR MODE +{ + unsigned long lu; + unsigned short row,column,off1,off2; + unsigned short dx=(unsigned short)PreviousPSXDisplay.Range.x1; + unsigned short dy=(unsigned short)PreviousPSXDisplay.DisplayMode.y; + unsigned char * pS=(unsigned char *)pSaISmallBuff; + unsigned long * pS1, * pS2; + + if(PreviousPSXDisplay.DisplayMode.x>512) + {BlitScreen16(surf,x,y);return;} + + if(PreviousPSXDisplay.Range.y0) // centering needed? + { + pS+=PreviousPSXDisplay.Range.y0*1024; + dy-=PreviousPSXDisplay.Range.y0; + } + + if(PSXDisplay.RGB24) + { + unsigned char * pD;unsigned int startxy; + + pS+=PreviousPSXDisplay.Range.x0<<1; + + if(iFPSEInterface) + { + for(column=0;column>3)); + pD+=3; + } + } + } + else + { + for(column=0;column>3)); + pD+=3; + } + } + } + } + else + { + unsigned short LineOffset,SurfOffset; + unsigned long * SRCPtr = (unsigned long *)(psxVuw + + (y<<10) + x); + unsigned long * DSTPtr = + ((unsigned long *)pS)+(PreviousPSXDisplay.Range.x0>>1); + + dx>>=1; + + LineOffset = 512 - dx; + SurfOffset = 256 - dx; + + for(column=0;column>10)&0x1f001f); + } + SRCPtr += LineOffset; + DSTPtr += SurfOffset; + } + } + + // ok, here we have filled pSaISmallBuff with PreviousPSXDisplay.DisplayMode.x * PreviousPSXDisplay.DisplayMode.y (*4) data + // now do a 2xSai blit to pSaIBigBuff + + p2XSaIFunc((unsigned char *)pSaISmallBuff, 1024, + (unsigned char *)pSaIBigBuff, + PreviousPSXDisplay.DisplayMode.x, + PreviousPSXDisplay.DisplayMode.y); + + // ok, here we have pSaIBigBuff filled with the 2xSai image... + // now transfer it to the surface + + dx=(short)PreviousPSXDisplay.DisplayMode.x; + dy=(short)PreviousPSXDisplay.DisplayMode.y<<1; + off1=(ddsd.lPitch>>2)-dx; + off2=512-dx; + + pS1=(unsigned long *)surf; + pS2=(unsigned long *)pSaIBigBuff; + + for(column=0;column512) + {BlitScreen16(surf,x,y);return;} + + if(PreviousPSXDisplay.Range.y0) // centering needed? + { + pS+=PreviousPSXDisplay.Range.y0*1024; + dy-=PreviousPSXDisplay.Range.y0; + } + + if(PSXDisplay.RGB24) + { + unsigned char * pD;unsigned int startxy; + + pS+=PreviousPSXDisplay.Range.x0<<1; + + if(iFPSEInterface) + { + for(column=0;column>3)); + pD+=3; + } + } + } + else + { + for(column=0;column>3)); + pD+=3; + } + } + } + } + else + { + unsigned short LineOffset,SurfOffset; + unsigned long * SRCPtr = (unsigned long *)(psxVuw + + (y<<10) + x); + unsigned long * DSTPtr = + ((unsigned long *)pS)+(PreviousPSXDisplay.Range.x0>>1); + + dx>>=1; + + LineOffset = 512 - dx; + SurfOffset = 256 - dx; + + for(column=0;column>10)&0x1f001f); + } + SRCPtr += LineOffset; + DSTPtr += SurfOffset; + } + } + + // ok, here we have filled pSaISmallBuff with PreviousPSXDisplay.DisplayMode.x * PreviousPSXDisplay.DisplayMode.y (*4) data + // now do a 2xSai blit to pSaIBigBuff + + p2XSaIFunc((unsigned char *)pSaISmallBuff, 1024, + (unsigned char *)pSaIBigBuff, + PreviousPSXDisplay.DisplayMode.x, + PreviousPSXDisplay.DisplayMode.y); + + // ok, here we have pSaIBigBuff filled with the 2xSai image... + // now transfer it to the surface + + dx=(short)(PreviousPSXDisplay.DisplayMode.x * 1.5); + dy=(short)PreviousPSXDisplay.DisplayMode.y*3; + off1=(ddsd.lPitch>>2)-dx; + off2=512-dx; + + pS1=(unsigned long *)surf; + pS2=(unsigned long *)pSaIBigBuff; + + for(column=0;column>3)); + pD+=3; + } + } + } + else + { + for(column=0;column>3)); + pD+=3; + } + } + } + } + else + { + unsigned short LineOffset,SurfOffset; + unsigned long * SRCPtr = (unsigned long *)(psxVuw + + (y<<10) + x); + + unsigned long * DSTPtr = + ((unsigned long *)surf)+(PreviousPSXDisplay.Range.x0>>1); + + dx>>=1; + + LineOffset = 512 - dx; + SurfOffset = (ddsd.lPitch>>2) - dx; + + for(column=0;column>10)&0x1f001f); + } + SRCPtr += LineOffset; + DSTPtr += SurfOffset; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void BlitScreen15_2xSaI(unsigned char * surf,long x,long y) // BLIT IN 16bit COLOR MODE +{ + unsigned long lu; + unsigned short row,column,off1,off2; + unsigned short dx=(unsigned short)PreviousPSXDisplay.Range.x1; + unsigned short dy=(unsigned short)PreviousPSXDisplay.DisplayMode.y; + unsigned char * pS=(unsigned char *)pSaISmallBuff; + unsigned long * pS1, * pS2; + + if(PreviousPSXDisplay.DisplayMode.x>512) + {BlitScreen15(surf,x,y);return;} + + if(PreviousPSXDisplay.Range.y0) // centering needed? + { + pS+=PreviousPSXDisplay.Range.y0*1024; + dy-=PreviousPSXDisplay.Range.y0; + } + + if(PSXDisplay.RGB24) + { + unsigned char * pD;unsigned int startxy; + + pS+=PreviousPSXDisplay.Range.x0<<1; + + if(iFPSEInterface) + { + for(column=0;column>3)); + pD+=3; + } + } + } + else + { + for(column=0;column>3)); + pD+=3; + } + } + } + } + else + { + unsigned short LineOffset,SurfOffset; + unsigned long * SRCPtr = (unsigned long *)(psxVuw + + (y<<10) + x); + unsigned long * DSTPtr = + ((unsigned long *)pS)+(PreviousPSXDisplay.Range.x0>>1); + + dx>>=1; + + LineOffset = 512 - dx; + SurfOffset = 256 - dx; + + for(column=0;column>10)&0x1f001f); + } + SRCPtr += LineOffset; + DSTPtr += SurfOffset; + } + } + + // ok, here we have filled pSaISmallBuff with PreviousPSXDisplay.DisplayMode.x * PreviousPSXDisplay.DisplayMode.y (*4) data + // now do a 2xSai blit to pSaIBigBuff + + p2XSaIFunc((unsigned char *)pSaISmallBuff, 1024, + (unsigned char *)pSaIBigBuff, + PreviousPSXDisplay.DisplayMode.x, + PreviousPSXDisplay.DisplayMode.y); + + // ok, here we have pSaIBigBuff filled with the 2xSai image... + // now transfer it to the surface + + dx=(short)PreviousPSXDisplay.DisplayMode.x; + dy=(short)PreviousPSXDisplay.DisplayMode.y<<1; + off1=(ddsd.lPitch>>2)-dx; + off2=512-dx; + + pS1=(unsigned long *)surf; + pS2=(unsigned long *)pSaIBigBuff; + + for(column=0;column=3) + { + if(pSaISmallBuff) memset(pSaISmallBuff,0,512*512*4); + } +} + +//////////////////////////////////////////////////////////////////////// + +void DoClearFrontBuffer(void) // CLEAR PRIMARY BUFFER +{ + DDBLTFX ddbltfx; + + ddbltfx.dwSize = sizeof(ddbltfx); + ddbltfx.dwFillColor = 0x00000000; + + IDirectDrawSurface_Blt(DX.DDSPrimary,NULL,NULL,NULL,DDBLT_COLORFILL,&ddbltfx); +} + +//////////////////////////////////////////////////////////////////////// + +void NoStretchedBlit(void) +{ + static int iOldDX=0; + static int iOldDY=0; + + int iDX,iDY; + int iX=iResX-PreviousPSXDisplay.DisplayMode.x; + int iY=iResY-PreviousPSXDisplay.DisplayMode.y; + +/* +float fXS,fYS,fS; +fXS=(float)iResX/(float)PreviousPSXDisplay.DisplayMode.x; +fYS=(float)iResY/(float)PreviousPSXDisplay.DisplayMode.y; +if(fXS=3 &&iUseNoStretchBlt < 13) // 2xsai is twice as big, of course + {dx*=2;dy*=2;} + else if(iUseNoStretchBlt >= 13) + {dx*=3;dy*=3;} + + if(iDesktopCol==32) // 32 bit color depth + { + const unsigned long crCursorColor32[8]={0xffff0000,0xff00ff00,0xff0000ff,0xffff00ff,0xffffff00,0xff00ffff,0xffffffff,0xff7f7f7f}; + + surf+=PreviousPSXDisplay.Range.x0<<2; // -> add x left border + + for(iPlayer=0;iPlayer<8;iPlayer++) // -> loop all possible players + { + if(usCursorActive&(1< player active? + { + const int ty=(ptCursorPoint[iPlayer].y*dy)/256; // -> calculate the cursor pos in the current display + const int tx=(ptCursorPoint[iPlayer].x*dx)/512; + sx=tx-5;if(sx<0) {if(sx&1) sx=1; else sx=0;} + sy=ty-5;if(sy<0) {if(sy&1) sy=1; else sy=0;} + ex=tx+6;if(ex>dx) ex=dx; + ey=ty+6;if(ey>dy) ey=dy; + + for(x=tx,y=sy;y do dotted y line + *((unsigned long *)((surf)+(y*ddsd.lPitch)+x*4))=crCursorColor32[iPlayer]; + for(y=ty,x=sx;x do dotted x line + *((unsigned long *)((surf)+(y*ddsd.lPitch)+x*4))=crCursorColor32[iPlayer]; + } + } + } + else // 16 bit color depth + { + const unsigned short crCursorColor16[8]={0xf800,0x07c0,0x001f,0xf81f,0xffc0,0x07ff,0xffff,0x7bdf}; + + surf+=PreviousPSXDisplay.Range.x0<<1; // -> same stuff as above + + for(iPlayer=0;iPlayer<8;iPlayer++) + { + if(usCursorActive&(1<dx) ex=dx; + ey=ty+6;if(ey>dy) ey=dy; + + for(x=tx,y=sy;y512) g=((g-512)*2)+512; + g=0.5f+((g)/1024.0f); + +// some cards will cheat... so we don't trust the caps here +// if (DD_Caps.dwCaps2 & DDCAPS2_PRIMARYGAMMA) + { + float f;DDGAMMARAMP ramp;int i; + LPDIRECTDRAWGAMMACONTROL DD_Gamma = NULL; + + if FAILED(IDirectDrawSurface_QueryInterface(DX.DDSPrimary,&IID_IDirectDrawGammaControl,(void**)&DD_Gamma)) + return; + + for (i=0;i<256;i++) + { + f=(((float)(i*256))*g); + if(f>65535) f=65535; + ramp.red[i]=ramp.green[i]=ramp.blue[i]=(WORD)f; + } + + IDirectDrawGammaControl_SetGammaRamp(DD_Gamma,0,&ramp); + IDirectDrawGammaControl_Release(DD_Gamma); + } +} + +//////////////////////////////////////////////////////////////////////// +// SCAN LINE STUFF +//////////////////////////////////////////////////////////////////////// + +void SetScanLineList(LPDIRECTDRAWCLIPPER Clipper) +{ + LPRGNDATA lpCL;RECT * pr;int y;POINT Point={0,0}; + + IDirectDrawClipper_SetClipList(Clipper,NULL,0); + + lpCL=(LPRGNDATA)malloc(sizeof(RGNDATAHEADER)+((iResY/2)+1)*sizeof(RECT)); + if(iWindowMode) ClientToScreen(DX.hWnd,&Point); + + lpCL->rdh.dwSize=sizeof(RGNDATAHEADER); + lpCL->rdh.iType=RDH_RECTANGLES; + lpCL->rdh.nCount=iResY/2; + lpCL->rdh.nRgnSize=0; + lpCL->rdh.rcBound.left=Point.x; + lpCL->rdh.rcBound.top=Point.y; + lpCL->rdh.rcBound.bottom=Point.y+iResY; + lpCL->rdh.rcBound.right=Point.x+iResX; + + pr=(RECT *)lpCL->Buffer; + for(y=0;yleft=Point.x; + pr->top=Point.y+y; + pr->right=Point.x+iResX; + pr->bottom=Point.y+y+1; + pr++; + } + + IDirectDrawClipper_SetClipList(Clipper,lpCL,0); + + free(lpCL); +} + +//////////////////////////////////////////////////////////////////////// + +void MoveScanLineArea(HWND hwnd) +{ + LPDIRECTDRAWCLIPPER Clipper;HRESULT h; + DDBLTFX ddbltfx;RECT r; + + if(FAILED(h=IDirectDraw_CreateClipper(DX.DD,0,&Clipper,NULL))) + return; + + IDirectDrawSurface_SetClipper(DX.DDSPrimary,NULL); + + ddbltfx.dwSize = sizeof(ddbltfx); + ddbltfx.dwFillColor = 0x00000000; + + GetClientRect(hwnd,&r); + ClientToScreen(hwnd,(LPPOINT)&r.left); + r.right+=r.left; + r.bottom+=r.top; + + IDirectDrawSurface_Blt(DX.DDSPrimary,&r,NULL,NULL,DDBLT_COLORFILL,&ddbltfx); + + SetScanLineList(Clipper); + + IDirectDrawSurface_SetClipper(DX.DDSPrimary,Clipper); + IDirectDrawClipper_Release(Clipper); +} + +//////////////////////////////////////////////////////////////////////// +// MAIN DIRECT DRAW INIT +//////////////////////////////////////////////////////////////////////// + +BOOL ReStart=FALSE; + +int DXinitialize() +{ + LPDIRECTDRAW DD;int i; + LPDIRECTDRAWCLIPPER Clipper;HRESULT h; + GUID FAR * guid=0; + unsigned char * c; + DDSCAPS ddscaps; + DDBLTFX ddbltfx; + DDPIXELFORMAT dd; + HRESULT (WINAPI *pDDrawCreateFn)(GUID *,LPDIRECTDRAW *,IUnknown *); + + // init some DX vars + DX.hWnd = (HWND)hWGPU; + DX.DDSHelper=0; + DX.DDSScreenPic=0; + + // make guid ! + c=(unsigned char *)&guiDev; + for(i=0;i=3) + ddsd.dwWidth = 1024; + else ddsd.dwWidth = 640; + + if(iUseNoStretchBlt>=3) + ddsd.dwHeight = 1024; + else + { + if(iDebugMode) ddsd.dwHeight = iGPUHeight; + else ddsd.dwHeight = 512; + } + + if(IDirectDraw_CreateSurface(DX.DD,&ddsd, &DX.DDSRender, NULL)) + return 0; + + // check for desktop color depth + dd.dwSize=sizeof(DDPIXELFORMAT); + IDirectDrawSurface_GetPixelFormat(DX.DDSRender,&dd); + + if(dd.dwRBitMask==0x00007c00 && + dd.dwGBitMask==0x000003e0 && + dd.dwBBitMask==0x0000001f) + { + if(iUseNoStretchBlt>=3) + BlitScreen=BlitScreen15_2xSaI; + else BlitScreen=BlitScreen15; + iDesktopCol=15; + } + else + if(dd.dwRBitMask==0x0000f800 && + dd.dwGBitMask==0x000007e0 && + dd.dwBBitMask==0x0000001f) + { + if(iUseNoStretchBlt < 4) + BlitScreen = BlitScreen16; + else if(iUseNoStretchBlt < 13) + BlitScreen = BlitScreen16_2xSaI; + else + BlitScreen = BlitScreen16_3xSaI; + iDesktopCol=16; + } + else + { + if(iUseNoStretchBlt < 4) + BlitScreen = BlitScreen32; + else if(iUseNoStretchBlt < 13) + BlitScreen = BlitScreen32_2xSaI; + else + BlitScreen = BlitScreen32_3xSaI; + iDesktopCol=32; + } + + //////////////////////////////////////////////////////// extra blts + + switch(iUseNoStretchBlt) + { + case 1: + pExtraBltFunc=NoStretchedBlit; + p2XSaIFunc=NULL; + break; + case 2: + pExtraBltFunc=NoStretchedBlitEx; + p2XSaIFunc=NULL; + break; + case 3: + pExtraBltFunc=StretchedBlit2x; + if (iDesktopCol==15) p2XSaIFunc=Std2xSaI_ex5; + else if(iDesktopCol==16) p2XSaIFunc=Std2xSaI_ex6; + else p2XSaIFunc=Std2xSaI_ex8; + break; + case 4: + pExtraBltFunc=NoStretchedBlit2x; + if (iDesktopCol==15) p2XSaIFunc=Std2xSaI_ex5; + else if(iDesktopCol==16) p2XSaIFunc=Std2xSaI_ex6; + else p2XSaIFunc=Std2xSaI_ex8; + break; + case 5: + pExtraBltFunc=StretchedBlit2x; + if (iDesktopCol==15) p2XSaIFunc=Super2xSaI_ex5; + else if(iDesktopCol==16) p2XSaIFunc=Super2xSaI_ex6; + else p2XSaIFunc=Super2xSaI_ex8; + break; + case 6: + pExtraBltFunc=NoStretchedBlit2x; + if (iDesktopCol==15) p2XSaIFunc=Super2xSaI_ex5; + else if(iDesktopCol==16) p2XSaIFunc=Super2xSaI_ex6; + else p2XSaIFunc=Super2xSaI_ex8; + break; + case 7: + pExtraBltFunc=StretchedBlit2x; + if (iDesktopCol==15) p2XSaIFunc=SuperEagle_ex5; + else if(iDesktopCol==16) p2XSaIFunc=SuperEagle_ex6; + else p2XSaIFunc=SuperEagle_ex8; + break; + case 8: + pExtraBltFunc=NoStretchedBlit2x; + if (iDesktopCol==15) p2XSaIFunc=SuperEagle_ex5; + else if(iDesktopCol==16) p2XSaIFunc=SuperEagle_ex6; + else p2XSaIFunc=SuperEagle_ex8; + break; + case 9: + pExtraBltFunc=StretchedBlit2x; + if (iDesktopCol==15) p2XSaIFunc=Scale2x_ex6_5; + else if(iDesktopCol==16) p2XSaIFunc=Scale2x_ex6_5; + else p2XSaIFunc=Scale2x_ex8; + break; + case 10: + pExtraBltFunc=NoStretchedBlit2x; + if (iDesktopCol==15) p2XSaIFunc=Scale2x_ex6_5; + else if(iDesktopCol==16) p2XSaIFunc=Scale2x_ex6_5; + else p2XSaIFunc=Scale2x_ex8; + break; + case 11: + pExtraBltFunc=NoStretchedBlit2x; + if(iDesktopCol==15) p2XSaIFunc=hq2x; + else if(iDesktopCol==16) p2XSaIFunc=hq2x; + else p2XSaIFunc=hq2x_32; + break; + case 12: + pExtraBltFunc=StretchedBlit2x; + if(iDesktopCol==15) p2XSaIFunc=hq2x; + else if(iDesktopCol==16) p2XSaIFunc=hq2x; + else p2XSaIFunc=hq2x_32; + break; + case 13: + pExtraBltFunc=StretchedBlit2x; + if(iDesktopCol==15) p2XSaIFunc=Scale3x_ex6_5; + else if(iDesktopCol==16) p2XSaIFunc=Scale3x_ex6_5; + else p2XSaIFunc=Scale3x_ex8; + break; + case 14: + pExtraBltFunc=NoStretchedBlit3x; + if(iDesktopCol==15) p2XSaIFunc=Scale3x_ex6_5; + else if(iDesktopCol==16) p2XSaIFunc=Scale3x_ex6_5; + else p2XSaIFunc=Scale3x_ex8; + break; + case 15: + pExtraBltFunc=NoStretchedBlit3x; + if (iDesktopCol==15) p2XSaIFunc=hq3x_16; + else if(iDesktopCol==16) p2XSaIFunc=hq3x_16; + else p2XSaIFunc=hq3x_32; + break; + default: + pExtraBltFunc=NULL; + p2XSaIFunc=NULL; + break; + } + + //////////////////////////////////////////////////////// clipper init + + if(FAILED(h=IDirectDraw_CreateClipper(DX.DD,0,&Clipper,NULL))) + return 0; + + if(iUseScanLines) + SetScanLineList(Clipper); + else IDirectDrawClipper_SetHWnd(Clipper,0,DX.hWnd); + + IDirectDrawSurface_SetClipper(DX.DDSPrimary,Clipper); + IDirectDrawClipper_Release(Clipper); + + //////////////////////////////////////////////////////// small screen clean up + + DXSetGamma(); + + ddbltfx.dwSize = sizeof(ddbltfx); + ddbltfx.dwFillColor = 0x00000000; + + IDirectDrawSurface_Blt(DX.DDSPrimary,NULL,NULL,NULL,DDBLT_COLORFILL,&ddbltfx); + IDirectDrawSurface_Blt(DX.DDSRender,NULL,NULL,NULL,DDBLT_COLORFILL,&ddbltfx); + + //////////////////////////////////////////////////////// finish init + + if(iUseNoStretchBlt>=3) + { + pSaISmallBuff=malloc(512*512*4); + memset(pSaISmallBuff,0,512*512*4); + pSaIBigBuff=malloc(1024*1024*4); + memset(pSaIBigBuff,0,1024*1024*4); + } + + bUsingTWin=FALSE; + + InitMenu(); // menu init + + if(iShowFPS) // fps on startup + { + ulKeybits|=KEY_SHOWFPS; + szDispBuf[0]=0; + BuildDispMenu(0); + } + + bIsFirstFrame = FALSE; // done + + return 0; +} + +//////////////////////////////////////////////////////////////////////// +// clean up DX stuff +//////////////////////////////////////////////////////////////////////// + +void DXcleanup() // DX CLEANUP +{ + CloseMenu(); // bye display lists + + if(iUseNoStretchBlt>=3) + { + if(pSaISmallBuff) free(pSaISmallBuff); + pSaISmallBuff=NULL; + if(pSaIBigBuff) free(pSaIBigBuff); + pSaIBigBuff=NULL; + } + + if(!bIsFirstFrame) + { + if(DX.DDSHelper) IDirectDrawSurface_Release(DX.DDSHelper); + DX.DDSHelper=0; + if(DX.DDSScreenPic) IDirectDrawSurface_Release(DX.DDSScreenPic); + DX.DDSScreenPic=0; + IDirectDrawSurface_Release(DX.DDSRender); + IDirectDrawSurface_Release(DX.DDSPrimary); + IDirectDraw_SetCooperativeLevel(DX.DD,DX.hWnd, DDSCL_NORMAL); + IDirectDraw_RestoreDisplayMode(DX.DD); + IDirectDraw_Release(DX.DD); + + ReStart=TRUE; + bIsFirstFrame = TRUE; + } +} + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + +DWORD dwGPUStyle=0; // vars to store some wimdows stuff +HANDLE hGPUMenu=NULL; + +unsigned long ulInitDisplay(void) +{ + HDC hdc;RECT r; + + if(iWindowMode) // win mode? + { + DWORD dw=GetWindowLong(hWGPU, GWL_STYLE); // -> adjust wnd style + dwGPUStyle=dw; + dw&=~WS_THICKFRAME; + dw|=WS_BORDER|WS_CAPTION; + SetWindowLong(hWGPU, GWL_STYLE, dw); + + iResX=LOWORD(iWinSize);iResY=HIWORD(iWinSize); + ShowWindow(hWGPU,SW_SHOWNORMAL); + + if(iUseScanLines) + SetWindowPos(hWGPU,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE); + + MoveWindow(hWGPU, // -> move wnd + GetSystemMetrics(SM_CXFULLSCREEN)/2-iResX/2, + GetSystemMetrics(SM_CYFULLSCREEN)/2-iResY/2, + iResX+GetSystemMetrics(SM_CXFIXEDFRAME)+3, + iResY+GetSystemMetrics(SM_CYFIXEDFRAME)+GetSystemMetrics(SM_CYCAPTION)+3, + TRUE); + UpdateWindow(hWGPU); // -> let windows do some update + } + else // no window mode: + { + DWORD dw=GetWindowLong(hWGPU, GWL_STYLE); // -> adjust wnd style + dwGPUStyle=dw; + hGPUMenu=GetMenu(hWGPU); + + dw&=~(WS_THICKFRAME|WS_BORDER|WS_CAPTION); + SetWindowLong(hWGPU, GWL_STYLE, dw); + SetMenu(hWGPU,NULL); + + ShowWindow(hWGPU,SW_SHOWMAXIMIZED); // -> max mode + } + + r.left=r.top=0;r.right=iResX;r.bottom=iResY; // init bkg with black + hdc = GetDC(hWGPU); + FillRect(hdc,&r,(HBRUSH)GetStockObject(BLACK_BRUSH)); + ReleaseDC(hWGPU, hdc); + + DXinitialize(); // init direct draw (not D3D... oh, well) + + if(!iWindowMode) // fullscreen mode? + ShowWindow(hWGPU,SW_SHOWMAXIMIZED); // -> maximize again (fixes strange DX behavior) + + return 1; +} + +//////////////////////////////////////////////////////////////////////// + +void CloseDisplay(void) +{ + DXcleanup(); // cleanup dx + + SetWindowLong(hWGPU, GWL_STYLE,dwGPUStyle); // repair window + if(hGPUMenu) SetMenu(hWGPU,(HMENU)hGPUMenu); +} + +//////////////////////////////////////////////////////////////////////// + +void CreatePic(unsigned char * pMem) +{ + DDSURFACEDESC xddsd;HRESULT ddrval; + unsigned char * ps;int x,y; + + memset(&xddsd, 0, sizeof(DDSURFACEDESC)); + xddsd.dwSize = sizeof(DDSURFACEDESC); + xddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS; +// xddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; + + if(iSysMemory) + xddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; + else + xddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY; + + xddsd.dwWidth = 128; + xddsd.dwHeight = 96; + + if(IDirectDraw_CreateSurface(DX.DD,&xddsd, &DX.DDSScreenPic, NULL)) + {DX.DDSScreenPic=0;return;} + + ddrval=IDirectDrawSurface_Lock(DX.DDSScreenPic,NULL, &xddsd, DDLOCK_WAIT|DDLOCK_WRITEONLY, NULL); + + if(ddrval==DDERR_SURFACELOST) + { + IDirectDrawSurface_Restore(DX.DDSScreenPic); + } + + if(ddrval!=DD_OK) + { + IDirectDrawSurface_Unlock(DX.DDSScreenPic,&xddsd); + return; + } + + ps=(unsigned char *)xddsd.lpSurface; + + if(iDesktopCol==16) + { + unsigned short s; + for(y=0;y<96;y++) + { + for(x=0;x<128;x++) + { + s=(*(pMem+0))>>3; + s|=((*(pMem+1))&0xfc)<<3; + s|=((*(pMem+2))&0xf8)<<8; + pMem+=3; + *((unsigned short *)(ps+y*xddsd.lPitch+x*2))=s; + } + } + } + else + if(iDesktopCol==15) + { + unsigned short s; + for(y=0;y<96;y++) + { + for(x=0;x<128;x++) + { + s=(*(pMem+0))>>3; + s|=((*(pMem+1))&0xfc)<<2; + s|=((*(pMem+2))&0xf8)<<7; + pMem+=3; + *((unsigned short *)(ps+y*xddsd.lPitch+x*2))=s; + } + } + } + else + if(iDesktopCol==32) + { + unsigned long l; + for(y=0;y<96;y++) + { + for(x=0;x<128;x++) + { + l= *(pMem+0); + l|=(*(pMem+1))<<8; + l|=(*(pMem+2))<<16; + pMem+=3; + *((unsigned long *)(ps+y*xddsd.lPitch+x*4))=l; + } + } + } + + IDirectDrawSurface_Unlock(DX.DDSScreenPic,&xddsd); +} + +/////////////////////////////////////////////////////////////////////////////////////// + +void DestroyPic(void) +{ + if(DX.DDSScreenPic) + { + RECT ScreenRect={iResX-128,0,iResX,96}; + DDBLTFX ddbltfx; + + if(iWindowMode) + { + POINT Point={0,0}; + ClientToScreen(DX.hWnd,&Point); + ScreenRect.left+=Point.x; + ScreenRect.right+=Point.x; + ScreenRect.top+=Point.y; + ScreenRect.bottom+=Point.y; + } + + ddbltfx.dwSize = sizeof(ddbltfx); + ddbltfx.dwFillColor = 0x00000000; + IDirectDrawSurface_Blt(DX.DDSPrimary,&ScreenRect,NULL,NULL,DDBLT_COLORFILL,&ddbltfx); + + IDirectDrawSurface_Release(DX.DDSScreenPic); + DX.DDSScreenPic=0; + } +} + +/////////////////////////////////////////////////////////////////////////////////////// + +void DisplayPic(void) +{ + RECT ScreenRect={iResX-128,0,iResX,96}, + HelperRect={0,0,128,96}; + if(iWindowMode) + { + POINT Point={0,0}; + ClientToScreen(DX.hWnd,&Point); + ScreenRect.left+=Point.x; + ScreenRect.right+=Point.x; + ScreenRect.top+=Point.y; + ScreenRect.bottom+=Point.y; + } + +// ??? eh... no need to wait here! +// WaitVBlank(); + + IDirectDrawSurface_Blt(DX.DDSPrimary,&ScreenRect,DX.DDSScreenPic,&HelperRect, + DDBLT_WAIT,NULL); +} + +/////////////////////////////////////////////////////////////////////////////////////// + +void ShowGpuPic(void) +{ + HRSRC hR;HGLOBAL hG;unsigned long * pRMem; + unsigned char * pMem;int x,y;unsigned long * pDMem; + + // turn off any screen pic, if it does already exist + if(DX.DDSScreenPic) {DestroyPic();return;} + + if(ulKeybits&KEY_SHOWFPS) {ShowTextGpuPic();return;} + + // load and lock the bitmap (lock is kinda obsolete in win32) + hR=FindResource(hInst,MAKEINTRESOURCE(IDB_GPU),RT_BITMAP); + hG=LoadResource(hInst,hR); + + // get long ptr to bmp data + pRMem=((unsigned long *)LockResource(hG))+10; + + // change the data upside-down + pMem=(unsigned char *)malloc(128*96*3); + + for(y=0;y<96;y++) + { + pDMem=(unsigned long *)(pMem+(95-y)*128*3); + for(x=0;x<96;x++) *pDMem++=*pRMem++; + } + + // show the pic + CreatePic(pMem); + + // clean up + free(pMem); + DeleteObject(hG); +} + +//////////////////////////////////////////////////////////////////////// + +void ShowTextGpuPic(void) // CREATE TEXT SCREEN PIC +{ // gets an Text and paints + unsigned char * pMem;BITMAPINFO bmi; // it into a rgb24 bitmap + HDC hdc,hdcMem;HBITMAP hBmp,hBmpMem;HFONT hFontMem; // to display it in the gpu + HBRUSH hBrush,hBrushMem;HPEN hPen,hPenMem; + char szB[256]; + RECT r={0,0,128,96}; // size of bmp... don't change that + COLORREF crFrame = RGB(128,255,128); // some example color inits + COLORREF crBkg = RGB(0,0,0); + COLORREF crText = RGB(0,255,0); + + if(DX.DDSScreenPic) DestroyPic(); + + //----------------------------------------------------// creation of the dc & bitmap + + hdc =GetDC(NULL); // create a dc + hdcMem=CreateCompatibleDC(hdc); + ReleaseDC(NULL,hdc); + + memset(&bmi,0,sizeof(BITMAPINFO)); // create a 24bit dib + bmi.bmiHeader.biSize=sizeof(BITMAPINFOHEADER); + bmi.bmiHeader.biWidth=128; + bmi.bmiHeader.biHeight=-96; + bmi.bmiHeader.biPlanes=1; + bmi.bmiHeader.biBitCount=24; + bmi.bmiHeader.biCompression=BI_RGB; + hBmp=CreateDIBSection(hdcMem,&bmi,DIB_RGB_COLORS, + (void **)&pMem,NULL,0); // pMem will point to 128x96x3 bitmap data + + hBmpMem = (HBITMAP)SelectObject(hdcMem,hBmp); // sel the bmp into the dc + + //----------------------------------------------------// ok, the following is just a drawing example... change it... + // create & select an additional font... whatever you want to paint, paint it in the dc :) + hBrush=CreateSolidBrush(crBkg); + hPen=CreatePen(PS_SOLID,0,crFrame); + + hBrushMem = (HBRUSH)SelectObject(hdcMem,hBrush); + hPenMem = (HPEN)SelectObject(hdcMem,hPen); + hFontMem = (HFONT)SelectObject(hdcMem,hGFont); + + SetTextColor(hdcMem,crText); + SetBkColor(hdcMem,crBkg); + + Rectangle(hdcMem,r.left,r.top,r.right,r.bottom); // our example: fill rect and paint border + InflateRect(&r,-3,-2); // reduce the text area + + LoadString(hInst,IDS_INFO0+iMPos,szB,255); + DrawText(hdcMem,szB,strlen(szB),&r, // paint the text (including clipping and word break) + DT_LEFT|DT_WORDBREAK); + + //----------------------------------------------------// ok, now store the pMem data, or just call the gpu func + + CreatePic(pMem); + + //----------------------------------------------------// finished, now we clean up... needed, or you will get resource leaks :) + + SelectObject(hdcMem,hBmpMem); // sel old mem dc objects + SelectObject(hdcMem,hBrushMem); + SelectObject(hdcMem,hPenMem); + SelectObject(hdcMem,hFontMem); + DeleteDC(hdcMem); // delete mem dcs + DeleteObject(hBmp); + DeleteObject(hBrush); // delete created objects + DeleteObject(hPen); +} + +/////////////////////////////////////////////////////////////////////// + +static void hqx_init(unsigned bits_per_pixel) +{ + interp_set(bits_per_pixel); +} + +static void hq2x_16_def(unsigned short* dst0, unsigned short* dst1, const unsigned short* src0, const unsigned short* src1, const unsigned short* src2, unsigned count) +{ + unsigned i; + + for(i=0;i0) { + c[0] = src0[-1]; + c[3] = src1[-1]; + c[6] = src2[-1]; + } else { + c[0] = c[1]; + c[3] = c[4]; + c[6] = c[7]; + } + + if (i> 1); + unsigned short *src2 = src1 + (srcPitch >> 1); + hqx_init(16); + hq2x_16_def(dst0, dst1, src0, src0, src1, width); + + count -= 2; + while(count) { + dst0 += dstPitch << 1; + dst1 += dstPitch << 1; + hq2x_16_def(dst0, dst1, src0, src1, src2, width); + src0 = src1; + src1 = src2; + src2 += srcPitch >> 1; + --count; + } + dst0 += dstPitch << 1; + dst1 += dstPitch << 1; + hq2x_16_def(dst0, dst1, src0, src1, src1, width); +} + +/////////////////////////////////////////////////////////////////// + +static void hq2x_32_def(unsigned long * dst0, unsigned long * dst1, const unsigned long * src0, const unsigned long * src1, const unsigned long * src2, unsigned count) +{ + unsigned i; + + for(i=0;i0) { + c[0] = src0[-1]; + c[3] = src1[-1]; + c[6] = src2[-1]; + } else { + c[0] = c[1]; + c[3] = c[4]; + c[6] = c[7]; + } + + if (i> 2); + + unsigned long *src0 = (unsigned long *)srcPtr; + unsigned long *src1 = src0 + (srcPitch >> 2); + unsigned long *src2 = src1 + (srcPitch >> 2); + hq2x_32_def(dst0, dst1, src0, src0, src1, width); + + + + count -= 2; + while(count) { + dst0 += dstPitch >> 1; + dst1 += dstPitch >> 1; + hq2x_32_def(dst0, dst1, src0, src1, src2, width); + src0 = src1; + src1 = src2; + src2 += srcPitch >> 2; + --count; + } + dst0 += dstPitch >> 1; + dst1 += dstPitch >> 1; + hq2x_32_def(dst0, dst1, src0, src1, src1, width); +} + +static void hq3x_32_def(unsigned long* dst0, unsigned long* dst1, unsigned long* dst2, const unsigned long* src0, const unsigned long* src1, const unsigned long* src2, unsigned count) +{ + unsigned i; + + for(i=0;i0) { + c[0] = src0[-1]; + c[3] = src1[-1]; + c[6] = src2[-1]; + } else { + c[0] = c[1]; + c[3] = c[4]; + c[6] = c[7]; + } + + if (i> 1; + + unsigned long *dst0 = (unsigned long *)dstPtr; + unsigned long *dst1 = dst0 + dstPitch; + unsigned long *dst2 = dst1 + dstPitch; + + unsigned long *src0 = (unsigned long *)srcPtr; + unsigned long *src1 = src0 + (srcPitch >> 2); + unsigned long *src2 = src1 + (srcPitch >> 2); + hq3x_32_def(dst0, dst1, dst2, src0, src0, src2, width); + + count -= 2; + while(count) { + + dst0 += dstPitch * 3; + dst1 += dstPitch * 3; + dst2 += dstPitch * 3; + + hq3x_32_def(dst0, dst1, dst2, src0, src1, src2, width); + src0 = src1; + src1 = src2; + src2 += srcPitch >> 2; + --count; + } + dst0 += dstPitch * 3; + dst1 += dstPitch * 3; + dst2 += dstPitch * 3; + + + hq3x_32_def(dst0, dst1, dst2, src0, src1, src1, width); + +} + +static void hq3x_16_def(unsigned short* dst0, unsigned short* dst1, unsigned short* dst2, const unsigned short* src0, const unsigned short* src1, const unsigned short* src2, unsigned count) +{ + unsigned i; + + for(i=0;i0) { + c[0] = src0[-1]; + c[3] = src1[-1]; + c[6] = src2[-1]; + } else { + c[0] = c[1]; + c[3] = c[4]; + c[6] = c[7]; + } + + if (i> 1); + unsigned short *src2 = src1 + (srcPitch >> 1); + hqx_init(16); + hq3x_16_def(dst0, dst1, dst2, src0, src0, src2, width); + + count -= 2; + while(count) { + + dst0 += dstPitch * 3; + dst1 += dstPitch * 3; + dst2 += dstPitch * 3; + + hq3x_16_def(dst0, dst1, dst2, src0, src1, src2, width); + src0 = src1; + src1 = src2; + src2 += srcPitch >> 1; + --count; + } + dst0 += dstPitch * 3; + dst1 += dstPitch * 3; + dst2 += dstPitch * 3; + + hq3x_16_def(dst0, dst1, dst2, src0, src1, src1, width); +} + diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/dxguid.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/dxguid.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/dxguid.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/dxguid.c 2016-06-30 16:53:26.000000000 +0000 @@ -0,0 +1,456 @@ +/* + DXGUID.C + + Author: Daniel Guerrero Miralles (daguer@geocities.com) + Version: 1.0.0 + Date: April 27, 1999 + + ABSTRACT: + Source code to generate a library with DirectX GUIDs. For DirectX 6.1 + and earlier versions. + + LEGAL INFORMATION: + This is PUBLIC DOMAIN source code. The source code in this file is + provided "as is", without any warranty, including but not limited to, + fitness for any particular purpose. + + REMARKS: + - This file may have more GUIDs than the original one. It was made by + recollecting GUIDs defined in the DirectX header files. + + TODO: + Nothing. +*/ + +#define INITGUID 1 +#include + +///////////////////////////////////////////////////////////////////// +// File D3D.H: +///////////////////////////////////////////////////////////////////// + +DEFINE_GUID(IID_IDirect3D,0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56); +DEFINE_GUID(IID_IDirect3D2,0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a); +DEFINE_GUID(IID_IDirect3D3,0xbb223240,0xe72b,0x11d0,0xa9,0xb4,0x00,0xaa,0x00,0xc0,0x99,0x3e); +DEFINE_GUID(IID_IDirect3DRampDevice,0xF2086B20,0x259F,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56); +DEFINE_GUID(IID_IDirect3DRGBDevice,0xA4665C60,0x2673,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56); +DEFINE_GUID(IID_IDirect3DHALDevice,0x84E63dE0,0x46AA,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E); +DEFINE_GUID(IID_IDirect3DMMXDevice,0x881949a1,0xd6f3,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29); +DEFINE_GUID(IID_IDirect3DRefDevice,0x50936643,0x13e9,0x11d1,0x89,0xaa,0x0,0xa0,0xc9,0x5,0x41,0x29); +DEFINE_GUID(IID_IDirect3DNullDevice,0x8767df22,0xbacc,0x11d1,0x89,0x69,0x0,0xa0,0xc9,0x6,0x29,0xa8); +DEFINE_GUID(IID_IDirect3DDevice,0x64108800,0x957d,0X11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29); +DEFINE_GUID(IID_IDirect3DDevice2,0x93281501,0x8cf8,0x11d0,0x89,0xab,0x0,0xa0,0xc9,0x5,0x41,0x29); +DEFINE_GUID(IID_IDirect3DDevice3,0xb0ab3b60,0x33d7,0x11d1,0xa9,0x81,0x0,0xc0,0x4f,0xd7,0xb1,0x74); +DEFINE_GUID(IID_IDirect3DTexture,0x2CDCD9E0,0x25A0,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56); +DEFINE_GUID(IID_IDirect3DTexture2,0x93281502,0x8cf8,0x11d0,0x89,0xab,0x0,0xa0,0xc9,0x5,0x41,0x29); +DEFINE_GUID(IID_IDirect3DLight,0x4417C142,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E); +DEFINE_GUID(IID_IDirect3DMaterial,0x4417C144,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E); +DEFINE_GUID(IID_IDirect3DMaterial2,0x93281503,0x8cf8,0x11d0,0x89,0xab,0x0,0xa0,0xc9,0x5,0x41,0x29); +DEFINE_GUID(IID_IDirect3DMaterial3,0xca9c46f4,0xd3c5,0x11d1,0xb7,0x5a,0x0,0x60,0x8,0x52,0xb3,0x12); +DEFINE_GUID(IID_IDirect3DExecuteBuffer,0x4417C145,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E); +DEFINE_GUID(IID_IDirect3DViewport,0x4417C146,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E); +DEFINE_GUID(IID_IDirect3DViewport2,0x93281500,0x8cf8,0x11d0,0x89,0xab,0x0,0xa0,0xc9,0x5,0x41,0x29); +DEFINE_GUID(IID_IDirect3DViewport3,0xb0ab3b61,0x33d7,0x11d1,0xa9,0x81,0x0,0xc0,0x4f,0xd7,0xb1,0x74); +DEFINE_GUID(IID_IDirect3DVertexBuffer,0x7a503555,0x4a83,0x11d1,0xa5,0xdb,0x0,0xa0,0xc9,0x3,0x67,0xf8); + +///////////////////////////////////////////////////////////////////// +// File D3DRM.H: +///////////////////////////////////////////////////////////////////// + + +DEFINE_GUID(IID_IDirect3DRM,0x2bc49361,0x8327,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRM2,0x4516ecc8,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3); +DEFINE_GUID(IID_IDirect3DRM3,0x4516ec83,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3); +DEFINE_GUID(CLSID_CDirect3DRM,0x4516ec41,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3); + +///////////////////////////////////////////////////////////////////// +// File D3DRMOBJ.H: +///////////////////////////////////////////////////////////////////// + +DEFINE_GUID(CLSID_CDirect3DRMDevice,0x4fa3568e,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(CLSID_CDirect3DRMViewport,0x4fa3568f,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(CLSID_CDirect3DRMFrame,0x4fa35690,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(CLSID_CDirect3DRMMesh,0x4fa35691,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(CLSID_CDirect3DRMMeshBuilder,0x4fa35692,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(CLSID_CDirect3DRMFace,0x4fa35693,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(CLSID_CDirect3DRMLight,0x4fa35694,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(CLSID_CDirect3DRMTexture,0x4fa35695,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(CLSID_CDirect3DRMWrap,0x4fa35696,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(CLSID_CDirect3DRMMaterial,0x4fa35697,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(CLSID_CDirect3DRMAnimation,0x4fa35698,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(CLSID_CDirect3DRMAnimationSet,0x4fa35699,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(CLSID_CDirect3DRMUserVisual,0x4fa3569a,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(CLSID_CDirect3DRMShadow,0x4fa3569b,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(CLSID_CDirect3DRMViewportInterpolator,0xde9eaa1,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3); +DEFINE_GUID(CLSID_CDirect3DRMFrameInterpolator,0xde9eaa2,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3); +DEFINE_GUID(CLSID_CDirect3DRMMeshInterpolator,0xde9eaa3,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3); +DEFINE_GUID(CLSID_CDirect3DRMLightInterpolator,0xde9eaa6,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3); +DEFINE_GUID(CLSID_CDirect3DRMMaterialInterpolator,0xde9eaa7,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3); +DEFINE_GUID(CLSID_CDirect3DRMTextureInterpolator,0xde9eaa8,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3); +DEFINE_GUID(CLSID_CDirect3DRMProgressiveMesh,0x4516ec40,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3); +DEFINE_GUID(CLSID_CDirect3DRMClippedVisual,0x5434e72d,0x6d66,0x11d1,0xbb,0xb,0x0,0x0,0xf8,0x75,0x86,0x5a); +DEFINE_GUID(IID_IDirect3DRMObject,0xeb16cb00,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMObject2,0x4516ec7c,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3); +DEFINE_GUID(IID_IDirect3DRMDevice,0xe9e19280,0x6e05,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMDevice2,0x4516ec78,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3); +DEFINE_GUID(IID_IDirect3DRMDevice3,0x549f498b,0xbfeb,0x11d1,0x8e,0xd8,0x0,0xa0,0xc9,0x67,0xa4,0x82); +DEFINE_GUID(IID_IDirect3DRMViewport,0xeb16cb02,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMViewport2,0x4a1b1be6,0xbfed,0x11d1,0x8e,0xd8,0x0,0xa0,0xc9,0x67,0xa4,0x82); +DEFINE_GUID(IID_IDirect3DRMFrame,0xeb16cb03,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMFrame2,0xc3dfbd60,0x3988,0x11d0,0x9e,0xc2,0x0,0x0,0xc0,0x29,0x1a,0xc3); +DEFINE_GUID(IID_IDirect3DRMFrame3,0xff6b7f70,0xa40e,0x11d1,0x91,0xf9,0x0,0x0,0xf8,0x75,0x8e,0x66); +DEFINE_GUID(IID_IDirect3DRMVisual,0xeb16cb04,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMMesh,0xa3a80d01,0x6e12,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMMeshBuilder,0xa3a80d02,0x6e12,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMMeshBuilder2,0x4516ec77,0x8f20,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3); +DEFINE_GUID(IID_IDirect3DRMMeshBuilder3,0x4516ec82,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3); +DEFINE_GUID(IID_IDirect3DRMFace,0xeb16cb07,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMFace2,0x4516ec81,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3); +DEFINE_GUID(IID_IDirect3DRMLight,0xeb16cb08,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMTexture,0xeb16cb09,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMTexture2,0x120f30c0,0x1629,0x11d0,0x94,0x1c,0x0,0x80,0xc8,0xc,0xfa,0x7b); +DEFINE_GUID(IID_IDirect3DRMTexture3,0xff6b7f73,0xa40e,0x11d1,0x91,0xf9,0x0,0x0,0xf8,0x75,0x8e,0x66); +DEFINE_GUID(IID_IDirect3DRMWrap,0xeb16cb0a,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMMaterial,0xeb16cb0b,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMMaterial2,0xff6b7f75,0xa40e,0x11d1,0x91,0xf9,0x0,0x0,0xf8,0x75,0x8e,0x66); +DEFINE_GUID(IID_IDirect3DRMAnimation,0xeb16cb0d,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMAnimation2,0xff6b7f77,0xa40e,0x11d1,0x91,0xf9,0x0,0x0,0xf8,0x75,0x8e,0x66); +DEFINE_GUID(IID_IDirect3DRMAnimationSet,0xeb16cb0e,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMAnimationSet2,0xff6b7f79,0xa40e,0x11d1,0x91,0xf9,0x0,0x0,0xf8,0x75,0x8e,0x66); +DEFINE_GUID(IID_IDirect3DRMObjectArray,0x242f6bc2,0x3849,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3); +DEFINE_GUID(IID_IDirect3DRMDeviceArray,0xeb16cb10,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMViewportArray,0xeb16cb11,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMFrameArray,0xeb16cb12,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMVisualArray,0xeb16cb13,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMLightArray,0xeb16cb14,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMPickedArray,0xeb16cb16,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMFaceArray,0xeb16cb17,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMAnimationArray,0xd5f1cae0,0x4bd7,0x11d1,0xb9,0x74,0x0,0x60,0x8,0x3e,0x45,0xf3); +DEFINE_GUID(IID_IDirect3DRMUserVisual,0x59163de0,0x6d43,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMShadow,0xaf359780,0x6ba3,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1); +DEFINE_GUID(IID_IDirect3DRMShadow2,0x86b44e25,0x9c82,0x11d1,0xbb,0xb,0x0,0xa0,0xc9,0x81,0xa0,0xa6); +DEFINE_GUID(IID_IDirect3DRMInterpolator,0x242f6bc1,0x3849,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3); +DEFINE_GUID(IID_IDirect3DRMProgressiveMesh,0x4516ec79,0x8f20,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3); +DEFINE_GUID(IID_IDirect3DRMPicked2Array,0x4516ec7b,0x8f20,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3); +DEFINE_GUID(IID_IDirect3DRMClippedVisual,0x5434e733,0x6d66,0x11d1,0xbb,0xb,0x0,0x0,0xf8,0x75,0x86,0x5a); + +///////////////////////////////////////////////////////////////////// +// File D3DRMWIN.H: +///////////////////////////////////////////////////////////////////// + +DEFINE_GUID(IID_IDirect3DRMWinDevice,0xc5016cc0,0xd273,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1); + +///////////////////////////////////////////////////////////////////// +// File DDRAW.H: +///////////////////////////////////////////////////////////////////// + +DEFINE_GUID(CLSID_DirectDraw,0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35); +DEFINE_GUID(CLSID_DirectDrawClipper,0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56); +DEFINE_GUID(IID_IDirectDraw,0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); +DEFINE_GUID(IID_IDirectDraw2,0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56); +DEFINE_GUID(IID_IDirectDraw4,0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5); +DEFINE_GUID(IID_IDirectDrawSurface,0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); +DEFINE_GUID(IID_IDirectDrawSurface2,0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27); +DEFINE_GUID(IID_IDirectDrawSurface3,0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB); +DEFINE_GUID(IID_IDirectDrawSurface4,0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B); +DEFINE_GUID(IID_IDirectDrawPalette,0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); +DEFINE_GUID(IID_IDirectDrawClipper,0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); +DEFINE_GUID(IID_IDirectDrawColorControl,0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8); +DEFINE_GUID(IID_IDirectDrawGammaControl,0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E); + +///////////////////////////////////////////////////////////////////// +// File DINPUT.H: +///////////////////////////////////////////////////////////////////// + +DEFINE_GUID(CLSID_DirectInput,0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(CLSID_DirectInputDevice,0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(IID_IDirectInputA,0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(IID_IDirectInputW,0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(IID_IDirectInput2A,0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(IID_IDirectInput2W,0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(IID_IDirectInputDeviceA,0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(IID_IDirectInputDeviceW,0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(IID_IDirectInputDevice2A,0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(IID_IDirectInputDevice2W,0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(IID_IDirectInputEffect,0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_XAxis,0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_YAxis,0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_ZAxis,0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_RxAxis,0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_RyAxis,0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_RzAxis,0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_Slider,0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_Button,0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_Key,0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_POV,0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_Unknown,0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_SysMouse,0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_SysKeyboard,0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_Joystick,0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_ConstantForce,0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_RampForce,0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_Square,0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_Sine,0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_Triangle,0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_SawtoothUp,0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_SawtoothDown,0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_Spring,0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_Damper,0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_Inertia,0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_Friction,0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_CustomForce,0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); + +///////////////////////////////////////////////////////////////////// +// File DMKSCTRL.H: +///////////////////////////////////////////////////////////////////// + +DEFINE_GUID(IID_IKsControl,0x28F54685,0x06FD,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96); +DEFINE_GUID(KSDATAFORMAT_SUBTYPE_MIDI,0x1D262760L,0xE957,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00); +DEFINE_GUID(KSDATAFORMAT_SUBTYPE_DIRECTMUSIC,0x1a82f8bc,0x3f8b,0x11d2,0xb7,0x74,0x00,0x60,0x08,0x33,0x16,0xc1); + +///////////////////////////////////////////////////////////////////// +// File DMUSICC.H: +///////////////////////////////////////////////////////////////////// + +DEFINE_GUID(IID_IReferenceClock,0x56a86897,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); +DEFINE_GUID(CLSID_DirectMusic,0x636b9f10,0x0c7d,0x11d1,0x95,0xb2,0x00,0x20,0xaf,0xdc,0x74,0x21); +DEFINE_GUID(CLSID_DirectMusicCollection,0x480ff4b0,0x28b2,0x11d1,0xbe,0xf7,0x0,0xc0,0x4f,0xbf,0x8f,0xef); +DEFINE_GUID(CLSID_DirectMusicSynth,0x58C2B4D0,0x46E7,0x11D1,0x89,0xAC,0x00,0xA0,0xC9,0x05,0x41,0x29); +DEFINE_GUID(IID_IDirectMusic,0x6536115a,0x7b2d,0x11d2,0xba,0x18,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(IID_IDirectMusicBuffer,0xd2ac2878,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicPort,0x08f2d8c9,0x37c2,0x11d2,0xb9,0xf9,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(IID_IDirectMusicThru,0xced153e7,0x3606,0x11d2,0xb9,0xf9,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(IID_IDirectMusicPortDownload,0xd2ac287a,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicDownload,0xd2ac287b,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicCollection,0xd2ac287c,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicInstrument,0xd2ac287d,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicDownloadedInstrument,0xd2ac287e,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_DMUS_PROP_GM_Hardware,0x178f2f24,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(GUID_DMUS_PROP_GS_Hardware,0x178f2f25,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(GUID_DMUS_PROP_XG_Hardware,0x178f2f26,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(GUID_DMUS_PROP_XG_Capable,0x6496aba1,0x61b0,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6); +DEFINE_GUID(GUID_DMUS_PROP_GS_Capable,0x6496aba2,0x61b0,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6); +DEFINE_GUID(GUID_DMUS_PROP_DLS1,0x178f2f27,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(GUID_DMUS_PROP_SynthSink_DSOUND,0xaa97844,0xc877,0x11d1,0x87,0xc,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_DMUS_PROP_SynthSink_WAVE,0xaa97845,0xc877,0x11d1,0x87,0xc,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_DMUS_PROP_WriteLatency,0x268a0fa0,0x60f2,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6); +DEFINE_GUID(GUID_DMUS_PROP_WritePeriod,0x268a0fa1,0x60f2,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6); +DEFINE_GUID(GUID_DMUS_PROP_MemorySize,0x178f2f28,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(GUID_DMUS_PROP_WavesReverb,0x4cb5622,0x32e5,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6); +DEFINE_GUID(GUID_DMUS_PROP_Effects,0xcda8d611,0x684a,0x11d2,0x87,0x1e,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_DMUS_PROP_LegacyCaps,0xcfa7cdc2,0x00a1,0x11d2,0xaa,0xd5,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(GUID_DMUS_PROP_Volume,0xfedfae25L,0xe46e,0x11d1,0xaa,0xce,0x00,0x00,0xf8,0x75,0xac,0x12); + +///////////////////////////////////////////////////////////////////// +// File DMUSICI.H: +///////////////////////////////////////////////////////////////////// + +DEFINE_GUID(CLSID_DirectMusicPerformance,0xd2ac2881,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicSegment,0xd2ac2882,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicSegmentState,0xd2ac2883,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicGraph,0xd2ac2884,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicTempoTrack,0xd2ac2885,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicSeqTrack,0xd2ac2886,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicSysExTrack,0xd2ac2887,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicTimeSigTrack,0xd2ac2888,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicStyle,0xd2ac288a,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicChordTrack,0xd2ac288b,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicCommandTrack,0xd2ac288c,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicStyleTrack,0xd2ac288d,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicMotifTrack,0xd2ac288e,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicChordMap,0xd2ac288f,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicComposer,0xd2ac2890,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicSignPostTrack,0xf17e8672,0xc3b4,0x11d1,0x87,0xb,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicLoader,0xd2ac2892,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicBandTrack,0xd2ac2894,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicBand,0x79ba9e00,0xb6ee,0x11d1,0x86,0xbe,0x0,0xc0,0x4f,0xbf,0x8f,0xef); +DEFINE_GUID(CLSID_DirectMusicChordMapTrack,0xd2ac2896,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicMuteTrack,0xd2ac2898,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_DirectMusicAllTypes,0xd2ac2893,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_NOTIFICATION_SEGMENT,0xd2ac2899,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_NOTIFICATION_PERFORMANCE,0x81f75bc5,0x4e5d,0x11d2,0xbc,0xc7,0x0,0xa0,0xc9,0x22,0xe6,0xeb); +DEFINE_GUID(GUID_NOTIFICATION_MEASUREANDBEAT,0xd2ac289a,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_NOTIFICATION_CHORD,0xd2ac289b,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_NOTIFICATION_COMMAND,0xd2ac289c,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_CommandParam,0xd2ac289d,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_ChordParam,0xd2ac289e,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_RhythmParam,0xd2ac289f,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_IDirectMusicStyle,0xd2ac28a1,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_TimeSignature,0xd2ac28a4,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_TempoParam,0xd2ac28a5,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_IDirectMusicBand,0xd2ac28ac,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_IDirectMusicChordMap,0xd2ac28ad,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_MuteParam,0xd2ac28af,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_Download,0xd2ac28a7,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_Unload,0xd2ac28a8,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_ConnectToDLSCollection,0x1db1ae6b,0xe92e,0x11d1,0xa8,0xc5,0x0,0xc0,0x4f,0xa3,0x72,0x6e); +DEFINE_GUID(GUID_Enable_Auto_Download,0xd2ac28a9,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_Disable_Auto_Download,0xd2ac28aa,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_Clear_All_Bands,0xd2ac28ab,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_StandardMIDIFile,0x6621075,0xe92e,0x11d1,0xa8,0xc5,0x0,0xc0,0x4f,0xa3,0x72,0x6e); +DEFINE_GUID(GUID_DisableTimeSig,0x45fc707b,0x1db4,0x11d2,0xbc,0xac,0x0,0xa0,0xc9,0x22,0xe6,0xeb); +DEFINE_GUID(GUID_EnableTimeSig,0x45fc707c,0x1db4,0x11d2,0xbc,0xac,0x0,0xa0,0xc9,0x22,0xe6,0xeb); +DEFINE_GUID(GUID_DisableTempo,0x45fc707d,0x1db4,0x11d2,0xbc,0xac,0x0,0xa0,0xc9,0x22,0xe6,0xeb); +DEFINE_GUID(GUID_EnableTempo,0x45fc707e,0x1db4,0x11d2,0xbc,0xac,0x0,0xa0,0xc9,0x22,0xe6,0xeb); +DEFINE_GUID(GUID_PerfMasterTempo,0xd2ac28b0,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_PerfMasterVolume,0xd2ac28b1,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_PerfMasterGrooveLevel,0xd2ac28b2,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_PerfAutoDownload,0xfb09565b,0x3631,0x11d2,0xbc,0xb8,0x0,0xa0,0xc9,0x22,0xe6,0xeb); +DEFINE_GUID(GUID_DefaultGMCollection,0xf17e8673,0xc3b4,0x11d1,0x87,0xb,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicLoader,0x2ffaaca2,0x5dca,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6); +DEFINE_GUID(IID_IDirectMusicGetLoader,0x68a04844,0xd13d,0x11d1,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6); +DEFINE_GUID(IID_IDirectMusicObject,0xd2ac28b5,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicSegment,0xf96029a2,0x4282,0x11d2,0x87,0x17,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicSegmentState,0xa3afdcc7,0xd3ee,0x11d1,0xbc,0x8d,0x0,0xa0,0xc9,0x22,0xe6,0xeb); +DEFINE_GUID(IID_IDirectMusicTrack,0xf96029a1,0x4282,0x11d2,0x87,0x17,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicPerformance,0x7d43d03,0x6523,0x11d2,0x87,0x1d,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicTool,0xd2ac28ba,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicGraph,0x2befc277,0x5497,0x11d2,0xbc,0xcb,0x0,0xa0,0xc9,0x22,0xe6,0xeb); +DEFINE_GUID(IID_IDirectMusicStyle,0xd2ac28bd,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicChordMap,0xd2ac28be,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicComposer,0xd2ac28bf,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicBand,0xd2ac28c0,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd); + +///////////////////////////////////////////////////////////////////// +// File DPLAY.H: +///////////////////////////////////////////////////////////////////// + +DEFINE_GUID(IID_IDirectPlay2,0x2b74f7c0,0x9154,0x11cf,0xa9,0xcd,0x0,0xaa,0x0,0x68,0x86,0xe3); +DEFINE_GUID(IID_IDirectPlay2A,0x9d460580,0xa822,0x11cf,0x96,0xc,0x0,0x80,0xc7,0x53,0x4e,0x82); +DEFINE_GUID(IID_IDirectPlay3,0x133efe40,0x32dc,0x11d0,0x9c,0xfb,0x0,0xa0,0xc9,0xa,0x43,0xcb); +DEFINE_GUID(IID_IDirectPlay3A,0x133efe41,0x32dc,0x11d0,0x9c,0xfb,0x0,0xa0,0xc9,0xa,0x43,0xcb); +DEFINE_GUID(IID_IDirectPlay4,0xab1c530,0x4745,0x11d1,0xa7,0xa1,0x0,0x0,0xf8,0x3,0xab,0xfc); +DEFINE_GUID(IID_IDirectPlay4A,0xab1c531,0x4745,0x11d1,0xa7,0xa1,0x0,0x0,0xf8,0x3,0xab,0xfc); +DEFINE_GUID(CLSID_DirectPlay,0xd1eb6d20,0x8923,0x11d0,0x9d,0x97,0x0,0xa0,0xc9,0xa,0x43,0xcb); +DEFINE_GUID(DPSPGUID_IPX,0x685bc400,0x9d2c,0x11cf,0xa9,0xcd,0x0,0xaa,0x0,0x68,0x86,0xe3); +DEFINE_GUID(DPSPGUID_TCPIP,0x36E95EE0,0x8577,0x11cf,0x96,0xc,0x0,0x80,0xc7,0x53,0x4e,0x82); +DEFINE_GUID(DPSPGUID_SERIAL,0xf1d6860,0x88d9,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e); +DEFINE_GUID(DPSPGUID_MODEM,0x44eaa760,0xcb68,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e); +DEFINE_GUID(IID_IDirectPlay,0x5454e9a0,0xdb65,0x11ce,0x92,0x1c,0x00,0xaa,0x00,0x6c,0x49,0x72); + +///////////////////////////////////////////////////////////////////// +// File DPLOBBY.H: +///////////////////////////////////////////////////////////////////// + +DEFINE_GUID(IID_IDirectPlayLobby,0xaf465c71,0x9588,0x11cf,0xa0,0x20,0x0,0xaa,0x0,0x61,0x57,0xac); +DEFINE_GUID(IID_IDirectPlayLobbyA,0x26c66a70,0xb367,0x11cf,0xa0,0x24,0x0,0xaa,0x0,0x61,0x57,0xac); +DEFINE_GUID(IID_IDirectPlayLobby2,0x194c220,0xa303,0x11d0,0x9c,0x4f,0x0,0xa0,0xc9,0x5,0x42,0x5e); +DEFINE_GUID(IID_IDirectPlayLobby2A,0x1bb4af80,0xa303,0x11d0,0x9c,0x4f,0x0,0xa0,0xc9,0x5,0x42,0x5e); +DEFINE_GUID(IID_IDirectPlayLobby3,0x2db72490,0x652c,0x11d1,0xa7,0xa8,0x0,0x0,0xf8,0x3,0xab,0xfc); +DEFINE_GUID(IID_IDirectPlayLobby3A,0x2db72491,0x652c,0x11d1,0xa7,0xa8,0x0,0x0,0xf8,0x3,0xab,0xfc); +DEFINE_GUID(CLSID_DirectPlayLobby,0x2fe8f810,0xb2a5,0x11d0,0xa7,0x87,0x0,0x0,0xf8,0x3,0xab,0xfc); +DEFINE_GUID(DPLPROPERTY_MessagesSupported,0x762ccda1,0xd916,0x11d0,0xba,0x39,0x0,0xc0,0x4f,0xd7,0xed,0x67); +DEFINE_GUID(DPLPROPERTY_LobbyGuid,0xf56920a0,0xd218,0x11d0,0xba,0x39,0x0,0xc0,0x4f,0xd7,0xed,0x67); +DEFINE_GUID(DPLPROPERTY_PlayerGuid,0xb4319322,0xd20d,0x11d0,0xba,0x39,0x0,0xc0,0x4f,0xd7,0xed,0x67); +DEFINE_GUID(DPLPROPERTY_PlayerScore,0x48784000,0xd219,0x11d0,0xba,0x39,0x0,0xc0,0x4f,0xd7,0xed,0x67); +DEFINE_GUID(DPAID_TotalSize,0x1318f560,0x912c,0x11d0,0x9d,0xaa,0x0,0xa0,0xc9,0xa,0x43,0xcb); +DEFINE_GUID(DPAID_ServiceProvider,0x7d916c0,0xe0af,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e); +DEFINE_GUID(DPAID_LobbyProvider,0x59b95640,0x9667,0x11d0,0xa7,0x7d,0x0,0x0,0xf8,0x3,0xab,0xfc); +DEFINE_GUID(DPAID_Phone,0x78ec89a0,0xe0af,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e); +DEFINE_GUID(DPAID_PhoneW,0xba5a7a70,0x9dbf,0x11d0,0x9c,0xc1,0x0,0xa0,0xc9,0x5,0x42,0x5e); +DEFINE_GUID(DPAID_Modem,0xf6dcc200,0xa2fe,0x11d0,0x9c,0x4f,0x0,0xa0,0xc9,0x5,0x42,0x5e); +DEFINE_GUID(DPAID_ModemW,0x1fd92e0,0xa2ff,0x11d0,0x9c,0x4f,0x0,0xa0,0xc9,0x5,0x42,0x5e); +DEFINE_GUID(DPAID_INet,0xc4a54da0,0xe0af,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e); +DEFINE_GUID(DPAID_INetW,0xe63232a0,0x9dbf,0x11d0,0x9c,0xc1,0x0,0xa0,0xc9,0x5,0x42,0x5e); +DEFINE_GUID(DPAID_INetPort,0xe4524541,0x8ea5,0x11d1,0x8a,0x96,0x0,0x60,0x97,0xb0,0x14,0x11); +DEFINE_GUID(DPAID_ComPort,0xf2f0ce00,0xe0af,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e); + +///////////////////////////////////////////////////////////////////// +// File DSOUND.H: +///////////////////////////////////////////////////////////////////// + +DEFINE_GUID(CLSID_DirectSound,0x47d4d946,0x62e8,0x11cf,0x93,0xbc,0x44,0x45,0x53,0x54,0x0,0x0); +DEFINE_GUID(CLSID_DirectSoundCapture,0xb0210780,0x89cd,0x11d0,0xaf,0x8,0x0,0xa0,0xc9,0x25,0xcd,0x16); +DEFINE_GUID(IID_IDirectSound,0x279AFA83,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); +DEFINE_GUID(IID_IDirectSoundBuffer,0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); +DEFINE_GUID(IID_IDirectSound3DListener,0x279AFA84,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); +DEFINE_GUID(IID_IDirectSound3DBuffer,0x279AFA86,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); +DEFINE_GUID(IID_IDirectSoundCapture,0xb0210781,0x89cd,0x11d0,0xaf,0x8,0x0,0xa0,0xc9,0x25,0xcd,0x16); +DEFINE_GUID(IID_IDirectSoundCaptureBuffer,0xb0210782,0x89cd,0x11d0,0xaf,0x8,0x0,0xa0,0xc9,0x25,0xcd,0x16); +DEFINE_GUID(IID_IDirectSoundNotify,0xb0210783,0x89cd,0x11d0,0xaf,0x8,0x0,0xa0,0xc9,0x25,0xcd,0x16); +DEFINE_GUID(IID_IKsPropertySet,0x31efac30,0x515c,0x11d0,0xa9,0xaa,0x00,0xaa,0x00,0x61,0xbe,0x93); + +///////////////////////////////////////////////////////////////////// +// File DVP.H: +///////////////////////////////////////////////////////////////////// + +DEFINE_GUID(IID_IDDVideoPortContainer,0x6C142760,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); +DEFINE_GUID(IID_IDirectDrawVideoPort,0xB36D93E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56); +DEFINE_GUID(DDVPTYPE_E_HREFH_VREFH,0x54F39980L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8); +DEFINE_GUID(DDVPTYPE_E_HREFH_VREFL,0x92783220L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8); +DEFINE_GUID(DDVPTYPE_E_HREFL_VREFH,0xA07A02E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8); +DEFINE_GUID(DDVPTYPE_E_HREFL_VREFL,0xE09C77E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8); +DEFINE_GUID(DDVPTYPE_CCIR656,0xFCA326A0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8); +DEFINE_GUID(DDVPTYPE_BROOKTREE,0x1352A560L,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8); +DEFINE_GUID(DDVPTYPE_PHILIPS,0x332CF160L,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8); + +///////////////////////////////////////////////////////////////////// +// File DXFILE.H: +///////////////////////////////////////////////////////////////////// + +DEFINE_GUID(CLSID_CDirectXFile,0x4516ec43,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3); +DEFINE_GUID(IID_IDirectXFile,0x3d82ab40,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); +DEFINE_GUID(IID_IDirectXFileEnumObject,0x3d82ab41,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); +DEFINE_GUID(IID_IDirectXFileSaveObject,0x3d82ab42,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); +DEFINE_GUID(IID_IDirectXFileObject,0x3d82ab43,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); +DEFINE_GUID(IID_IDirectXFileData,0x3d82ab44,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); +DEFINE_GUID(IID_IDirectXFileDataReference,0x3d82ab45,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); +DEFINE_GUID(IID_IDirectXFileBinary,0x3d82ab46,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); +DEFINE_GUID(TID_DXFILEHeader,0x3d82ab43,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); + +///////////////////////////////////////////////////////////////////// +// File RMXFGUID.H: +///////////////////////////////////////////////////////////////////// + +DEFINE_GUID(TID_D3DRMInfo,0x2b957100,0x9e9a,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); +DEFINE_GUID(TID_D3DRMMesh,0x3d82ab44,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); +DEFINE_GUID(TID_D3DRMVector,0x3d82ab5e,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); +DEFINE_GUID(TID_D3DRMMeshFace,0x3d82ab5f,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); +DEFINE_GUID(TID_D3DRMMaterial,0x3d82ab4d,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); +DEFINE_GUID(TID_D3DRMMaterialArray,0x35ff44e1,0x6c7c,0x11cf,0x8F,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMFrame,0x3d82ab46,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); +DEFINE_GUID(TID_D3DRMFrameTransformMatrix,0xf6f23f41,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMMeshMaterialList,0xf6f23f42,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMMeshTextureCoords,0xf6f23f40,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMMeshNormals,0xf6f23f43,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMCoords2d,0xf6f23f44,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMMatrix4x4,0xf6f23f45,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMAnimation,0x3d82ab4f,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); +DEFINE_GUID(TID_D3DRMAnimationSet,0x3d82ab50,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); +DEFINE_GUID(TID_D3DRMAnimationKey,0x10dd46a8,0x775b,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xA3); +DEFINE_GUID(TID_D3DRMFloatKeys,0x10dd46a9,0x775b,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xA3); +DEFINE_GUID(TID_D3DRMMaterialAmbientColor,0x01411840,0x7786,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xA3); +DEFINE_GUID(TID_D3DRMMaterialDiffuseColor,0x01411841,0x7786,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xA3); +DEFINE_GUID(TID_D3DRMMaterialSpecularColor,0x01411842,0x7786,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xA3); +DEFINE_GUID(TID_D3DRMMaterialEmissiveColor,0xd3e16e80,0x7835,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMMaterialPower,0x01411843,0x7786,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xA3); +DEFINE_GUID(TID_D3DRMColorRGBA,0x35ff44e0,0x6c7c,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xA3); +DEFINE_GUID(TID_D3DRMColorRGB,0xd3e16e81,0x7835,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMGuid,0xa42790e0,0x7810,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMTextureFilename,0xa42790e1,0x7810,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMTextureReference,0xa42790e2,0x7810,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMIndexedColor,0x1630b820,0x7842,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMMeshVertexColors,0x1630b821,0x7842,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMMaterialWrap,0x4885ae60,0x78e8,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMBoolean,0x537da6a0,0xca37,0x11d0,0x94,0x1c,0x0,0x80,0xc8,0xc,0xfa,0x7b); +DEFINE_GUID(TID_D3DRMMeshFaceWraps,0xed1ec5c0,0xc0a8,0x11d0,0x94,0x1c,0x0,0x80,0xc8,0xc,0xfa,0x7b); +DEFINE_GUID(TID_D3DRMBoolean2d,0x4885ae63,0x78e8,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMTimedFloatKeys,0xf406b180,0x7b3b,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMAnimationOptions,0xe2bf56c0,0x840f,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMFramePosition,0xe2bf56c1,0x840f,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMFrameVelocity,0xe2bf56c2,0x840f,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMFrameRotation,0xe2bf56c3,0x840f,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3); +DEFINE_GUID(TID_D3DRMLight,0x3d82ab4a,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); +DEFINE_GUID(TID_D3DRMCamera,0x3d82ab51,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); +DEFINE_GUID(TID_D3DRMAppData,0xe5745280,0xb24f,0x11cf,0x9d,0xd5,0x0,0xaa,0x0,0xa7,0x1a,0x2f); +DEFINE_GUID(TID_D3DRMLightUmbra,0xaed22740,0xb31f,0x11cf,0x9d,0xd5,0x0,0xaa,0x0,0xa7,0x1a,0x2f); +DEFINE_GUID(TID_D3DRMLightRange,0xaed22742,0xb31f,0x11cf,0x9d,0xd5,0x0,0xaa,0x0,0xa7,0x1a,0x2f); +DEFINE_GUID(TID_D3DRMLightPenumbra,0xaed22741,0xb31f,0x11cf,0x9d,0xd5,0x0,0xaa,0x0,0xa7,0x1a,0x2f); +DEFINE_GUID(TID_D3DRMLightAttenuation,0xa8a98ba0,0xc5e5,0x11cf,0xb9,0x41,0x0,0x80,0xc8,0xc,0xfa,0x7b); +DEFINE_GUID(TID_D3DRMInlineData,0x3a23eea0,0x94b1,0x11d0,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); +DEFINE_GUID(TID_D3DRMUrl,0x3a23eea1,0x94b1,0x11d0,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33); +DEFINE_GUID(TID_D3DRMProgressiveMesh,0x8A63C360,0x997D,0x11d0,0x94,0x1C,0x0,0x80,0xC8,0x0C,0xFA,0x7B); +DEFINE_GUID(TID_D3DRMExternalVisual,0x98116AA0,0xBDBA,0x11d1,0x82,0xC0,0x00,0xA0,0xC9,0x69,0x72,0x71); +DEFINE_GUID(TID_D3DRMStringProperty,0x7f0f21e0,0xbfe1,0x11d1,0x82,0xc0,0x0,0xa0,0xc9,0x69,0x72,0x71); +DEFINE_GUID(TID_D3DRMPropertyBag,0x7f0f21e1,0xbfe1,0x11d1,0x82,0xc0,0x0,0xa0,0xc9,0x69,0x72,0x71); +DEFINE_GUID(TID_D3DRMRightHanded,0x7f5d5ea0,0xd53a,0x11d1,0x82,0xc0,0x0,0xa0,0xc9,0x69,0x72,0x71); diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/fps.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/fps.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/fps.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/fps.c 2016-06-30 16:53:26.000000000 +0000 @@ -0,0 +1,571 @@ +/*************************************************************************** + fps.c - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define _IN_FPS + +#include "externals.h" +#include "fps.h" +#include "gpu.h" + +//////////////////////////////////////////////////////////////////////// +// FPS stuff +//////////////////////////////////////////////////////////////////////// + +LARGE_INTEGER CPUFrequency, PerformanceCounter; + +float fFrameRateHz=0; +DWORD dwFrameRateTicks=16; +float fFrameRate; +int iFrameLimit; +int UseFrameLimit=0; +int UseFrameSkip=0; + +//////////////////////////////////////////////////////////////////////// +// FPS skipping / limit +//////////////////////////////////////////////////////////////////////// + +BOOL bInitCap = TRUE; +float fps_skip = 0; +float fps_cur = 0; + +//////////////////////////////////////////////////////////////////////// + +#define MAXLACE 16 + +void CheckFrameRate(void) +{ + if(UseFrameSkip) // skipping mode? + { + if(!(dwActFixes&0x80)) // not old skipping mode? + { + dwLaceCnt++; // -> store cnt of vsync between frames + if(dwLaceCnt>=MAXLACE && UseFrameLimit) // -> if there are many laces without screen toggling, + { // do std frame limitation + if(dwLaceCnt==MAXLACE) bInitCap=TRUE; + FrameCap(); + } + } + else if(UseFrameLimit) FrameCap(); + calcfps(); // -> calc fps display in skipping mode + } + else // non-skipping mode: + { + if(UseFrameLimit) FrameCap(); // -> do it + if(ulKeybits&KEY_SHOWFPS) calcfps(); // -> and calc fps display + } +} + +//////////////////////////////////////////////////////////////////////// +// WIN VERSION +//////////////////////////////////////////////////////////////////////// + +BOOL IsPerformanceCounter = FALSE; + +void FrameCap (void) // frame limit func +{ + static DWORD curticks, lastticks, _ticks_since_last_update; + static DWORD TicksToWait = 0; + static LARGE_INTEGER CurrentTime; + static LARGE_INTEGER LastTime; + static BOOL SkipNextWait = FALSE; + BOOL Waiting = TRUE; + +//--------------------------------------------------------- + if(bInitCap) + { + bInitCap=FALSE; + if (IsPerformanceCounter) + QueryPerformanceCounter(&LastTime); + lastticks = timeGetTime(); + TicksToWait=0; + return; + } +//--------------------------------------------------------- + + if (IsPerformanceCounter) + { + QueryPerformanceCounter(&CurrentTime); + _ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart; + + //--------------------------------------------------------- + curticks = timeGetTime(); + if(_ticks_since_last_update>(CPUFrequency.LowPart>>1)) + { + if(curticks < lastticks) + _ticks_since_last_update = dwFrameRateTicks+TicksToWait+1; + else _ticks_since_last_update = (CPUFrequency.LowPart * (curticks - lastticks))/1000; + } + //--------------------------------------------------------- + + if ((_ticks_since_last_update > TicksToWait) || + (CurrentTime.LowPart < LastTime.LowPart)) + { + LastTime.HighPart = CurrentTime.HighPart; + LastTime.LowPart = CurrentTime.LowPart; + + lastticks=curticks; + + if((_ticks_since_last_update-TicksToWait) > dwFrameRateTicks) + TicksToWait=0; + else TicksToWait=dwFrameRateTicks-(_ticks_since_last_update-TicksToWait); + } + else + { + while (Waiting) + { + QueryPerformanceCounter(&CurrentTime); + _ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart; + + //--------------------------------------------------------- + curticks = timeGetTime(); + if(_ticks_since_last_update>(CPUFrequency.LowPart>>1)) + { + if(curticks < lastticks) + _ticks_since_last_update = TicksToWait+1; + else _ticks_since_last_update = (CPUFrequency.LowPart * (curticks - lastticks))/1000; + } + //--------------------------------------------------------- + + if ((_ticks_since_last_update > TicksToWait) || + (CurrentTime.LowPart < LastTime.LowPart)) + { + Waiting = FALSE; + + lastticks=curticks; + + LastTime.HighPart = CurrentTime.HighPart; + LastTime.LowPart = CurrentTime.LowPart; + TicksToWait = dwFrameRateTicks; + } + } + } + } + else + { + curticks = timeGetTime(); + _ticks_since_last_update = curticks - lastticks; + + if ((_ticks_since_last_update > TicksToWait) || + (curticks < lastticks)) + { + lastticks = curticks; + + if((_ticks_since_last_update-TicksToWait) > dwFrameRateTicks) + TicksToWait=0; + else TicksToWait=dwFrameRateTicks-(_ticks_since_last_update-TicksToWait); + } + else + { + while (Waiting) + { + curticks = timeGetTime(); + _ticks_since_last_update = curticks - lastticks; + if ((_ticks_since_last_update > TicksToWait) || + (curticks < lastticks)) + { + Waiting = FALSE; + lastticks = curticks; + TicksToWait = dwFrameRateTicks; + } + } + } + } +} + +//////////////////////////////////////////////////////////////////////// + +#define MAXSKIP 120 + +void FrameSkip(void) +{ + static int iNumSkips=0,iAdditionalSkip=0; // number of additional frames to skip + static DWORD dwLastLace=0; // helper var for frame limitation + static DWORD curticks, lastticks, _ticks_since_last_update; + static LARGE_INTEGER CurrentTime; + static LARGE_INTEGER LastTime; + + if(!dwLaceCnt) return; // important: if no updatelace happened, we ignore it completely + + if(iNumSkips) // we are in pure skipping mode? + { + dwLastLace+=dwLaceCnt; // -> calc frame limit helper (number of laces) + bSkipNextFrame = TRUE; // -> we skip next frame as well + iNumSkips--; // -> ok, one done + } + else // ok, no additional skipping has to be done... + { // we check now, if some limitation is needed, or a new skipping has to get started + DWORD dwWaitTime; + + if(bInitCap || bSkipNextFrame) // first time or we skipped before? + { + if(UseFrameLimit && !bInitCap) // frame limit wanted and not first time called? + { + DWORD dwT=_ticks_since_last_update; // -> that's the time of the last drawn frame + dwLastLace+=dwLaceCnt; // -> and that's the number of updatelace since the start of the last drawn frame + + if (IsPerformanceCounter) // -> now we calc the time of the last drawn frame + the time we spent skipping + { + QueryPerformanceCounter(&CurrentTime); + _ticks_since_last_update= dwT+CurrentTime.LowPart - LastTime.LowPart; + } + else + { + curticks = timeGetTime(); + _ticks_since_last_update= dwT+curticks - lastticks; + } + + dwWaitTime=dwLastLace*dwFrameRateTicks; // -> and now we calc the time the real psx would have needed + + if(_ticks_since_last_update we were too fast? + { + if((dwWaitTime-_ticks_since_last_update)> // -> some more security, to prevent + (60*dwFrameRateTicks)) // wrong waiting times + _ticks_since_last_update=dwWaitTime; + + while(_ticks_since_last_update loop until we have reached the real psx time + { // (that's the additional limitation, yup) + if (IsPerformanceCounter) + { + QueryPerformanceCounter(&CurrentTime); + _ticks_since_last_update = dwT+CurrentTime.LowPart - LastTime.LowPart; + } + else + { + curticks = timeGetTime(); + _ticks_since_last_update = dwT+curticks - lastticks; + } + } + } + else // we were still too slow ?!!? + { + if(iAdditionalSkip well, somewhen we really have to stop skipping on very slow systems + { + iAdditionalSkip++; // -> inc our watchdog var + dwLaceCnt=0; // -> reset lace count + if (IsPerformanceCounter) // -> ok, start time of the next frame + QueryPerformanceCounter(&LastTime); + lastticks = timeGetTime(); + return; // -> done, we will skip next frame to get more speed (SkipNextFrame still TRUE) + } + } + } + + bInitCap=FALSE; // -> ok, we have inited the frameskip func + iAdditionalSkip=0; // -> init additional skip + bSkipNextFrame=FALSE; // -> we don't skip the next frame + if (IsPerformanceCounter) // -> we store the start time of the next frame + QueryPerformanceCounter(&LastTime); + lastticks = timeGetTime(); + dwLaceCnt=0; // -> and we start to count the laces + dwLastLace=0; + _ticks_since_last_update=0; + return; // -> done, the next frame will get drawn + } + + bSkipNextFrame=FALSE; // init the frame skip signal to 'no skipping' first + + if (IsPerformanceCounter) // get the current time (we are now at the end of one drawn frame) + { + QueryPerformanceCounter(&CurrentTime); + _ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart; + } + else + { + curticks = timeGetTime(); + _ticks_since_last_update = curticks - lastticks; + } + + dwLastLace=dwLaceCnt; // store curr count (frame limitation helper) + dwWaitTime=dwLaceCnt*dwFrameRateTicks; // calc the 'real psx lace time' + + if(_ticks_since_last_update>dwWaitTime) // hey, we needed way too long for that frame... + { + if(UseFrameLimit) // if limitation, we skip just next frame, + { // and decide after, if we need to do more + iNumSkips=0; + } + else + { + iNumSkips=_ticks_since_last_update/dwWaitTime; // -> calc number of frames to skip to catch up + iNumSkips--; // -> since we already skip next frame, one down + if(iNumSkips>MAXSKIP) iNumSkips=MAXSKIP; // -> well, somewhere we have to draw a line + } + bSkipNextFrame = TRUE; // -> signal for skipping the next frame + } + else // we were faster than real psx? fine :) + if(UseFrameLimit) // frame limit used? so we wait til the 'real psx time' has been reached + { + if(dwLaceCnt>MAXLACE) // -> security check + _ticks_since_last_update=dwWaitTime; + + while(_ticks_since_last_update(CPUFrequency.LowPart>>1)) + _ticks_since_last_update = (CPUFrequency.LowPart * (curticks - lastticks))/1000; + lastticks=curticks; + //--------------------------------------------------// + + if(UseFrameSkip && !UseFrameLimit && _ticks_since_last_update) + fps_skip=min(fps_skip,(((float)CPUFrequency.LowPart) / ((float)_ticks_since_last_update) +1.0f)); + + LastTime.HighPart = CurrentTime.HighPart; + LastTime.LowPart = CurrentTime.LowPart; + } + else + { + curticks = timeGetTime(); + _ticks_since_last_update=curticks-lastticks; + + if(UseFrameSkip && !UseFrameLimit && _ticks_since_last_update) + fps_skip=min(fps_skip,((float)1000/(float)_ticks_since_last_update+1.0f)); + + lastticks = curticks; + } + + if(UseFrameSkip && UseFrameLimit) + { + fpsskip_tck += _ticks_since_last_update; + + if(++fpsskip_cnt==2) + { + if(IsPerformanceCounter) + fps_skip = ((float)CPUFrequency.LowPart) / ((float)fpsskip_tck) *2.0f; + else + fps_skip = (float)2000/(float)fpsskip_tck; + + fps_skip +=6.0f; + + fpsskip_cnt = 0; + fpsskip_tck = 1; + } + } + + fps_tck += _ticks_since_last_update; + + if(++fps_cnt==10) + { + if(IsPerformanceCounter) + fps_cur = ((float)CPUFrequency.LowPart) / ((float)fps_tck) *10.0f; + else + fps_cur = (float)10000/(float)fps_tck; + + fps_cnt = 0; + fps_tck = 1; + + if(UseFrameLimit && fps_cur>fFrameRateHz) // optical adjust ;) avoids flickering fps display + fps_cur=fFrameRateHz; + } +} + +//////////////////////////////////////////////////////////////////////// +// PC FPS skipping / limit +//////////////////////////////////////////////////////////////////////// + +void PCFrameCap (void) +{ + static DWORD curticks, lastticks, _ticks_since_last_update; + static DWORD TicksToWait = 0; + static LARGE_INTEGER CurrentTime; + static LARGE_INTEGER LastTime; + BOOL Waiting = TRUE; + + while (Waiting) + { + if (IsPerformanceCounter) + { + QueryPerformanceCounter(&CurrentTime); + _ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart; + + //------------------------------------------------// + curticks = timeGetTime(); + if(_ticks_since_last_update>(CPUFrequency.LowPart>>1)) + { + if(curticks < lastticks) + _ticks_since_last_update = TicksToWait+1; + else _ticks_since_last_update = (CPUFrequency.LowPart * (curticks - lastticks))/1000; + } + //------------------------------------------------// + + if ((_ticks_since_last_update > TicksToWait) || + (CurrentTime.LowPart < LastTime.LowPart)) + { + Waiting = FALSE; + lastticks=curticks; + LastTime.HighPart = CurrentTime.HighPart; + LastTime.LowPart = CurrentTime.LowPart; + TicksToWait = (unsigned long)(CPUFrequency.LowPart / fFrameRateHz); + } + } + else + { + curticks = timeGetTime(); + _ticks_since_last_update = curticks - lastticks; + if ((_ticks_since_last_update > TicksToWait) || + (curticks < lastticks)) + { + Waiting = FALSE; + lastticks = curticks; + TicksToWait = (1000 / (DWORD)fFrameRateHz); + } + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void PCcalcfps(void) +{ + static DWORD curticks,_ticks_since_last_update,lastticks; + static long fps_cnt = 0; + static float fps_acc = 0; + static LARGE_INTEGER CurrentTime; + static LARGE_INTEGER LastTime; + float CurrentFPS=0; + + if(IsPerformanceCounter) + { + QueryPerformanceCounter(&CurrentTime); + _ticks_since_last_update=CurrentTime.LowPart-LastTime.LowPart; + + //--------------------------------------------------// + curticks = timeGetTime(); + if(_ticks_since_last_update>(CPUFrequency.LowPart>>1)) + _ticks_since_last_update = (CPUFrequency.LowPart * (curticks - lastticks))/1000; + lastticks=curticks; + //--------------------------------------------------// + + if(_ticks_since_last_update) + { + CurrentFPS = ((float)CPUFrequency.LowPart) / ((float)_ticks_since_last_update); + } + else CurrentFPS = 0; + LastTime.HighPart = CurrentTime.HighPart; + LastTime.LowPart = CurrentTime.LowPart; + } + else + { + curticks = timeGetTime(); + if(_ticks_since_last_update=curticks-lastticks) + CurrentFPS=(float)1000/(float)_ticks_since_last_update; + else CurrentFPS = 0; + lastticks = curticks; + } + + fps_acc += CurrentFPS; + + if(++fps_cnt==10) + { + fps_cur = fps_acc / 10; + fps_acc = 0; + fps_cnt = 0; + } + + fps_skip=CurrentFPS+1.0f; +} + +//////////////////////////////////////////////////////////////////////// + +void SetAutoFrameCap(void) +{ + if(iFrameLimit==1) + { + fFrameRateHz = fFrameRate; + if(IsPerformanceCounter) + dwFrameRateTicks=(DWORD)(CPUFrequency.LowPart / fFrameRateHz); + else dwFrameRateTicks=(1000 / (DWORD)fFrameRateHz); + return; + } + + if(dwActFixes&32) + { + if (PSXDisplay.Interlaced) + fFrameRateHz = PSXDisplay.PAL?50.0f:60.0f; + else fFrameRateHz = PSXDisplay.PAL?25.0f:30.0f; + } + else + { + fFrameRateHz = PSXDisplay.PAL?50.0f:59.94f; + if(IsPerformanceCounter) + dwFrameRateTicks=(DWORD)(CPUFrequency.LowPart / fFrameRateHz); + else dwFrameRateTicks=(1000 / (DWORD)fFrameRateHz); + } +} + +//////////////////////////////////////////////////////////////////////// + +void SetFPSHandler(void) +{ + if (QueryPerformanceFrequency (&CPUFrequency)) // timer mode + IsPerformanceCounter = TRUE; + else IsPerformanceCounter = FALSE; +} + +//////////////////////////////////////////////////////////////////////// + +void InitFPS(void) +{ + bInitCap = TRUE; + + if(fFrameRateHz==0) fFrameRateHz=fFrameRate; // set user framerate + + if(IsPerformanceCounter) + dwFrameRateTicks=(DWORD)(CPUFrequency.LowPart / fFrameRateHz); + else dwFrameRateTicks=(1000 / (DWORD)fFrameRateHz); +} + +//////////////////////////////////////////////////////////////////////// diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/key.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/key.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/key.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/key.c 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,137 @@ +/*************************************************************************** + key.c - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define _IN_KEY + +#include "externals.h" +#include "menu.h" +#include "gpu.h" +#include "draw.h" +#include "key.h" + +#include "record.h" + +//////////////////////////////////////////////////////////////////////// +// KeyBoard handler stuff +//////////////////////////////////////////////////////////////////////// + +WNDPROC wpOrgWndProc=0; +unsigned long ulKeybits=0; +char szGPUKeys[11]; + +//////////////////////////////////////////////////////////////////////// +// keyboard handler +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUshowScreenPic(unsigned char * pMem); +void CALLBACK GPUgetScreenPic(unsigned char * pMem); + +LRESULT CALLBACK KeyWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam) +{ + switch(message) + { + //--------------------------------------------------// + case WM_ACTIVATE: // some scanline window mode fixing stuff + case WM_MOVE: + { + if(!iUseScanLines) break; + if(!iWindowMode) break; + if(bIsFirstFrame) break; + MoveScanLineArea(hwnd); + }break; + //--------------------------------------------------// + case WM_KEYDOWN: // keydown + if(wParam==(WPARAM)szGPUKeys[2]) ulKeybits|=KEY_RESETTEXSTORE; + break; + //--------------------------------------------------// + case WM_SYSKEYUP: // alt+enter + if(wParam==VK_RETURN) bChangeWinMode=TRUE; + break; + //--------------------------------------------------// + case WM_KEYUP: // key up + + if(iDebugMode && wParam==(WPARAM)szGPUKeys[9]) + iFVDisplay=!iFVDisplay; + + if(wParam==(WPARAM)szGPUKeys[0]) + { + if(ulKeybits&KEY_SHOWFPS) + { + DestroyPic(); + ulKeybits&=~KEY_SHOWFPS; + DoClearScreenBuffer(); + } + else + { + ulKeybits|=KEY_SHOWFPS; + szDispBuf[0]=0; + BuildDispMenu(0); + } + break; + } + if(wParam==(WPARAM)szGPUKeys[1]) {ShowGpuPic();break;} + + if(wParam==(WPARAM)szGPUKeys[6]) + { + if(RECORD_RECORDING==TRUE) + {RECORD_RECORDING=FALSE;RECORD_Stop();} + else + {RECORD_RECORDING=TRUE;RECORD_Start();} + BuildDispMenu(0); + break; + } + + if(wParam==(WPARAM)szGPUKeys[2]) {SwitchDispMenu(-1); break;} + if(wParam==(WPARAM)szGPUKeys[3]) {SwitchDispMenu(1); break;} + if(wParam==(WPARAM)szGPUKeys[4]) {BuildDispMenu(-1); break;} + if(wParam==(WPARAM)szGPUKeys[5]) {BuildDispMenu( 1); break;} + if(wParam==(WPARAM)szGPUKeys[7]) {bVsync_Key = bVsync_Key==TRUE ? FALSE : TRUE; BuildDispMenu(0);break;} + if(wParam==(WPARAM)szGPUKeys[8]) + { + iFastFwd = 1 - iFastFwd; + bSkipNextFrame = FALSE; + UseFrameSkip=iFastFwd; + BuildDispMenu(0); + break; + } + break; + //--------------------------------------------------// + } + return wpOrgWndProc( hwnd, message, wParam, lParam ); +} + +//////////////////////////////////////////////////////////////////////// + +void SetKeyHandler(void) +{ + if(!wpOrgWndProc) // setup keyhandler + { + wpOrgWndProc = (WNDPROC)GetWindowLong(hWGPU, GWL_WNDPROC ); + SetWindowLong(hWGPU, GWL_WNDPROC, (long)KeyWndProc); + } +} + +//////////////////////////////////////////////////////////////////////// + +void ReleaseKeyHandler(void) +{ + if(wpOrgWndProc) + SetWindowLong(hWGPU,GWL_WNDPROC, // set old proc + (long)wpOrgWndProc); + wpOrgWndProc = 0; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/record.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/record.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/record.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/record.c 2016-06-30 16:53:26.000000000 +0000 @@ -0,0 +1,258 @@ +/*************************************************************************** + record.c - description + ------------------- + begin : Fri Nov 09 2001 + copyright : (C) 2001 by Darko Matesic + email : thedarkma@ptt.yu + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "externals.h" +#include "record.h" +#include "gpu.h" +#include + +extern BOOL RECORD_RECORDING = FALSE; +BITMAPINFOHEADER RECORD_BI = {40,0,0,1,16,0,0,2048,2048,0,0}; +unsigned char RECORD_BUFFER[1600*1200*3]; +unsigned long RECORD_INDEX; +unsigned long RECORD_RECORDING_MODE; +unsigned long RECORD_VIDEO_SIZE; +unsigned long RECORD_RECORDING_WIDTH; +unsigned long RECORD_RECORDING_HEIGHT; +unsigned long RECORD_FRAME_RATE_SCALE; +unsigned long RECORD_COMPRESSION_MODE; +COMPVARS RECORD_COMPRESSION1; +unsigned char RECORD_COMPRESSION_STATE1[4096]; +COMPVARS RECORD_COMPRESSION2; +unsigned char RECORD_COMPRESSION_STATE2[4096]; + + +PCOMPVARS pCompression = NULL; +AVISTREAMINFO strhdr; +PAVIFILE pfile = NULL; +PAVISTREAM ps = NULL; +PAVISTREAM psCompressed = NULL; +AVICOMPRESSOPTIONS opts; + +unsigned long frame; +unsigned long skip; + +//-------------------------------------------------------------------- + +BOOL RECORD_Start() +{ +static FILE *data; +static char filename[255]; +RECORD_INDEX = 0; +if(HIWORD(VideoForWindowsVersion())<0x010a) {MessageBox(NULL,"Video for Windows version is too old !\nAbording Recording.","Error", MB_OK|MB_ICONSTOP);return FALSE;} +mkdir("demo"); +while(TRUE) + { + sprintf(filename,"demo\\demo%04d.AVI",RECORD_INDEX++); + if((data=fopen(filename,"rb"))==NULL) break; + fclose(data); + if(RECORD_INDEX>9999) goto error; + } +if((data=fopen(filename,"wb"))==NULL) goto error; +if(RECORD_RECORDING_MODE==0) + { + switch(RECORD_VIDEO_SIZE) + { + case 0: + RECORD_BI.biWidth = iResX; + RECORD_BI.biHeight = iResY; + break; + case 1: + RECORD_BI.biWidth = iResX/2; + RECORD_BI.biHeight = iResY/2; + break; + default: + RECORD_BI.biWidth = iResX/4; + RECORD_BI.biHeight = iResY/4; + break; + } + } +else + { + RECORD_BI.biWidth = RECORD_RECORDING_WIDTH; + RECORD_BI.biHeight = RECORD_RECORDING_HEIGHT; + } +if(RECORD_COMPRESSION_MODE==0) + { + RECORD_BI.biBitCount = 16; + RECORD_BI.biSizeImage = RECORD_BI.biWidth*RECORD_BI.biHeight*2; + pCompression = &RECORD_COMPRESSION1; + } +else + { + RECORD_BI.biBitCount = 24; + RECORD_BI.biSizeImage = RECORD_BI.biWidth*RECORD_BI.biHeight*3; + pCompression = &RECORD_COMPRESSION2; + } +AVIFileInit(); +if(AVIFileOpen(&pfile,filename,OF_WRITE | OF_CREATE,NULL)!=AVIERR_OK) goto error; +memset(&strhdr,0,sizeof(strhdr)); +strhdr.fccType = streamtypeVIDEO; +strhdr.fccHandler = pCompression->fccHandler; +strhdr.dwScale = RECORD_FRAME_RATE_SCALE + 1; +strhdr.dwRate = (PSXDisplay.PAL)?50:60;// FPS +strhdr.dwSuggestedBufferSize = RECORD_BI.biSizeImage; +SetRect(&strhdr.rcFrame,0,0,RECORD_BI.biWidth,RECORD_BI.biHeight); +if(AVIFileCreateStream(pfile,&ps,&strhdr)!=AVIERR_OK) goto error; + +opts.fccType = pCompression->fccType; +opts.fccHandler = pCompression->fccHandler; +opts.dwKeyFrameEvery = pCompression->lKey; +opts.dwQuality = pCompression->lQ; +opts.dwBytesPerSecond = pCompression->lDataRate; +opts.dwFlags = AVICOMPRESSF_DATARATE|AVICOMPRESSF_KEYFRAMES|AVICOMPRESSF_VALID; +opts.lpFormat = &RECORD_BI; +opts.cbFormat = sizeof(RECORD_BI); +opts.lpParms = pCompression->lpState; +opts.cbParms = pCompression->cbState; +opts.dwInterleaveEvery = 0; + +if(AVIMakeCompressedStream(&psCompressed,ps,&opts,NULL)!=AVIERR_OK) goto error; + +//if(AVIStreamSetFormat(psCompressed,0,&RECORD_BI,RECORD_BI.biSizeImage)!=AVIERR_OK) goto error; +// fixed: +if(AVIStreamSetFormat(psCompressed,0,&RECORD_BI,sizeof(RECORD_BI))!=AVIERR_OK) goto error; + +frame = 0; +skip = RECORD_FRAME_RATE_SCALE; +return TRUE; +error: +RECORD_Stop(); +RECORD_RECORDING = FALSE; +return FALSE; +} + +//-------------------------------------------------------------------- + +void RECORD_Stop() +{ +if(ps) AVIStreamClose(ps); +if(psCompressed) AVIStreamClose(psCompressed); +if(pfile) AVIFileClose(pfile); +AVIFileExit(); +} + +//-------------------------------------------------------------------- + +BOOL RECORD_WriteFrame() +{ +if(skip) {skip--;return TRUE;} +skip=RECORD_FRAME_RATE_SCALE; +if(!RECORD_GetFrame()) return FALSE; +if(FAILED(AVIStreamWrite(psCompressed,frame,1,RECORD_BUFFER,RECORD_BI.biSizeImage,AVIIF_KEYFRAME,NULL,NULL))) + {RECORD_Stop();return FALSE;} +frame++; +return TRUE; +} + +//-------------------------------------------------------------------- + +BOOL RECORD_GetFrame() +{ +static unsigned short *srcs,*src,*dests,cs; +static unsigned char *srcc,*destc; +static long x,y,cx,cy,ax,ay; +static unsigned long cl; + +if(PSXDisplay.Disabled) + { + memset(RECORD_BUFFER,0,RECORD_BI.biSizeImage); + return TRUE; + } + +srcs = (unsigned short*)&psxVuw[PSXDisplay.DisplayPosition.x+(PSXDisplay.DisplayPosition.y<<10)]; +dests = (unsigned short*)RECORD_BUFFER; +destc = (unsigned char*)RECORD_BUFFER; +ax = (PSXDisplay.DisplayMode.x*65535L)/RECORD_BI.biWidth; +ay = (PSXDisplay.DisplayMode.y*65535L)/RECORD_BI.biHeight; +cy = (PSXDisplay.DisplayMode.y-1)<<16; +if(RECORD_BI.biBitCount==16) + { + if(PSXDisplay.RGB24) + { + for(y=0;y>6]; + cx = 0; + for(x=0;x>16)*3]); + *(dests++) = (unsigned short)(((cl&0xf8)<<7)|((cl&0xf800)>>6)|((cl&0xf80000)>>19)); + cx += ax; + } + cy -= ay;if(cy<0) cy=0; + } + } + else + { + for(y=0;y>6]; + cx = 0; + for(x=0;x>16]; + *(dests++) = ((cs&0x7c00)>>10)|(cs&0x03e0)|((cs&0x001f)<<10); + cx += ax; + } + cy -= ay;if(cy<0) cy=0; + } + } + } +else if(RECORD_BI.biBitCount==24) + { + if(PSXDisplay.RGB24) + { + for(y=0;y>6]; + cx = 0; + for(x=0;x>16)*3]); + *(destc++) = (unsigned char)((cl&0xff0000)>>16); + *(destc++) = (unsigned char)((cl&0xff00)>>8); + *(destc++) = (unsigned char)(cl&0xff); + cx += ax; + } + cy -= ay;if(cy<0) cy=0; + } + } + else + { + for(y=0;y>6]; + cx = 0; + for(x=0;x>16]; + *(destc++) = (unsigned char)((cs&0x7c00)>>7); + *(destc++) = (unsigned char)((cs&0x03e0)>>2); + *(destc++) = (unsigned char)((cs&0x001f)<<3); + cx += ax; + } + cy -= ay;if(cy<0) cy=0; + } + } + } +else + memset(RECORD_BUFFER,0,RECORD_BI.biSizeImage); + +return TRUE; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/record.h pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/record.h --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/record.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/record.h 2016-06-30 16:53:26.000000000 +0000 @@ -0,0 +1,56 @@ +/*************************************************************************** + record.h - description + ------------------- + begin : Fri Nov 09 2001 + copyright : (C) 2001 by Darko Matesic + email : thedarkma@ptt.yu + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +//*************************************************************************// +// History of changes: +// +// 2001/12/18 - Darko Matesic +// - two types of compression (16bit & 24bit) +// - FPSE 24bit MDEC support +// +// 2001/11/09 - Darko Matesic +// - first revision +// +//*************************************************************************// + +#ifndef _RECORD_H_ +#define _RECORD_H_ + +#include + +extern BOOL RECORD_RECORDING; +extern BITMAPINFOHEADER RECORD_BI; +extern unsigned char RECORD_BUFFER[1600*1200*3]; +extern unsigned long RECORD_INDEX; +extern unsigned long RECORD_RECORDING_MODE; +extern unsigned long RECORD_VIDEO_SIZE; +extern unsigned long RECORD_RECORDING_WIDTH; +extern unsigned long RECORD_RECORDING_HEIGHT; +extern unsigned long RECORD_FRAME_RATE_SCALE; +extern unsigned long RECORD_COMPRESSION_MODE; +extern COMPVARS RECORD_COMPRESSION1; +extern unsigned char RECORD_COMPRESSION_STATE1[4096]; +extern COMPVARS RECORD_COMPRESSION2; +extern unsigned char RECORD_COMPRESSION_STATE2[4096]; + +BOOL RECORD_Start(); +void RECORD_Stop(); +BOOL RECORD_WriteFrame(); +BOOL RECORD_GetFrame(); + +#endif \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/winmain.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/winmain.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/dfxvideo/winsrc/winmain.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/dfxvideo/winsrc/winmain.c 2016-06-30 16:53:26.000000000 +0000 @@ -0,0 +1,41 @@ +/*************************************************************************** + gpuPeopsSoft.c - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "externals.h" + +HINSTANCE hInst = NULL; +HMODULE hDDrawDLL = NULL; + +BOOL APIENTRY DllMain(HANDLE hModule, // DLL INIT + DWORD dwReason, + LPVOID lpReserved) +{ + switch (dwReason) { + case DLL_PROCESS_ATTACH: + hInst = (HINSTANCE)hModule; + hDDrawDLL = LoadLibrary(TEXT("DDRAW.DLL")); + break; + + case DLL_PROCESS_DETACH: + if (hDDrawDLL) FreeLibrary(hDDrawDLL); + break; + } + + return TRUE; // very quick :) +} + diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/PadSSSPSX/PadSSSPSX.cpp pcsxr-unstable-1.9.94+svn98108/win32/plugins/PadSSSPSX/PadSSSPSX.cpp --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/PadSSSPSX/PadSSSPSX.cpp 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/PadSSSPSX/PadSSSPSX.cpp 2016-06-30 16:53:26.000000000 +0000 @@ -0,0 +1,1149 @@ +#define WINVER 0x0500 +#define _WIN32_WINNT WINVER +#define DIRECTINPUT_VERSION 0x0800 + +// Modified by Wei Mingzhi at 10/2/2009 +// Added default keys, use registry instead of configuration file + +// Modified by Wei Mingzhi at 12/3/2009 +// Quick hack fix for FF8 "reverting" problem in menus +// Added configuration for enabling/disabling DualShock + +#include +#include +#include +#include + +#include "PadSSSPSX.h" + +static const char* LibraryName = "SSSPSX PAD Plugin Pressure Mod"; +static const unsigned char version = 0x0002; +static const unsigned char revision = 1; +static const unsigned char build = 6; + +HMODULE hInstance; +HWND hTargetWnd; + +static void (CALLBACK *gpuVisualVibration)(unsigned long, unsigned long) = NULL; + +static struct +{ + Config config; + int devcnt; + LPDIRECTINPUT8 pDInput; + LPDIRECTINPUTDEVICE8 pDKeyboard; + LPDIRECTINPUTDEVICE8 pDDevice[4]; + LPDIRECTINPUTEFFECT pDEffect[4][2]; /* for Small & Big Motor */ + DIJOYSTATE JoyState[4]; + u16 padStat[2]; + int padID[2]; + int padMode1[2]; + int padMode2[2]; + int padModeE[2]; + int padModeC[2]; + int padModeF[2]; + int padVib0[2]; + int padVib1[2]; + int padVibF[2][4]; + int padVibC[2]; + DWORD padPress[2][16]; + int curPad; + int curByte; + int curCmd; + int cmdLen; +} global; + +static BOOL CALLBACK EnumAxesCallback (LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef) +{ + LPDIRECTINPUTDEVICE8 pDDevice = (LPDIRECTINPUTDEVICE8)pvRef; + DIPROPRANGE diprg; + diprg.diph.dwSize = sizeof (diprg); + diprg.diph.dwHeaderSize = sizeof (diprg.diph); + diprg.diph.dwObj = lpddoi->dwType; + diprg.diph.dwHow = DIPH_BYID; + diprg.lMin = -128; + diprg.lMax = 127; + pDDevice->SetProperty (DIPROP_RANGE, &diprg.diph); + return DIENUM_CONTINUE; +} + +static BOOL CALLBACK EnumJoysticksCallback (const DIDEVICEINSTANCE* instance, VOID* pContext) +{ + const int devno = global.devcnt; + if (devno >= 4) + return DIENUM_STOP; + HRESULT result = global.pDInput->CreateDevice (instance->guidInstance, &global.pDDevice[devno], NULL); + if (FAILED (result)) + return DIENUM_CONTINUE; + global.devcnt++; + return DIENUM_CONTINUE; +} + +static bool ReleaseDirectInput (void) +{ + int index = 4; + while (index--) + { + if (global.pDEffect[index][0]) + { + global.pDEffect[index][0]->Unload(); + global.pDEffect[index][0]->Release(); + global.pDEffect[index][0] = NULL; + } + if (global.pDEffect[index][1]) + { + global.pDEffect[index][1]->Unload(); + global.pDEffect[index][1]->Release(); + global.pDEffect[index][1] = NULL; + } + if (global.pDDevice[index]) + { + global.pDDevice[index]->Unacquire(); + global.pDDevice[index]->Release(); + global.pDDevice[index] = NULL; + } + } + if (global.pDKeyboard) + { + global.pDKeyboard->Unacquire(); + global.pDKeyboard->Release(); + global.pDKeyboard = NULL; + } + if (global.pDInput) + { + global.pDInput->Release(); + global.pDInput = NULL; + } + global.devcnt = 0; + return FALSE; +} + +static bool InitDirectInput (void) +{ + if (global.pDInput) + return TRUE; + HRESULT result = DirectInput8Create (hInstance, DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&global.pDInput, NULL); + if (FAILED (result)) + return ReleaseDirectInput(); + result = global.pDInput->CreateDevice (GUID_SysKeyboard, &global.pDKeyboard, NULL); + if (FAILED (result)) + return ReleaseDirectInput(); + result = global.pDInput->EnumDevices (DI8DEVCLASS_GAMECTRL, EnumJoysticksCallback, NULL, DIEDFL_ATTACHEDONLY); + if (FAILED (result)) + return ReleaseDirectInput(); + result = global.pDKeyboard->SetDataFormat (&c_dfDIKeyboard); + if (FAILED (result)) + return ReleaseDirectInput(); + if (hTargetWnd) + { + global.pDKeyboard->Unacquire(); + result = global.pDKeyboard->SetCooperativeLevel (hTargetWnd, DISCL_FOREGROUND | DISCL_NONEXCLUSIVE); + if (FAILED (result)) + return ReleaseDirectInput(); + } + int index = global.devcnt; + while (index--) + { + const LPDIRECTINPUTDEVICE8 pDDevice = global.pDDevice[index]; + result = pDDevice->SetDataFormat (&c_dfDIJoystick); + if (FAILED (result)) + return ReleaseDirectInput(); + if (hTargetWnd) + { + pDDevice->Unacquire(); + result = pDDevice->SetCooperativeLevel (hTargetWnd, (global.config.background ? DISCL_BACKGROUND : DISCL_FOREGROUND) | DISCL_EXCLUSIVE); + if (FAILED (result)) + return ReleaseDirectInput(); + } + struct + { + DIPROPDWORD dipdw; + DWORD rgdwAxes[2]; + LONG rglDirection[2]; + DIPERIODIC per; + DICONSTANTFORCE cf; + DIEFFECT eff; + } local; + memset (&local, 0, sizeof (local)); + local.dipdw.diph.dwSize = sizeof (DIPROPDWORD); + local.dipdw.diph.dwHeaderSize = sizeof (DIPROPHEADER); + local.dipdw.diph.dwHow = DIPH_DEVICE; + local.dipdw.dwData = DIPROPAUTOCENTER_OFF; + pDDevice->SetProperty (DIPROP_AUTOCENTER, &local.dipdw.diph); + result = pDDevice->EnumObjects (EnumAxesCallback, pDDevice, DIDFT_AXIS); + if (FAILED (result)) + return ReleaseDirectInput(); + + local.rgdwAxes[0] = DIJOFS_X; + local.rgdwAxes[1] = DIJOFS_Y; + local.eff.dwSize = sizeof (DIEFFECT); + local.eff.dwFlags = DIEFF_CARTESIAN | DIEFF_OBJECTOFFSETS; + local.eff.dwDuration = INFINITE; + local.eff.dwGain = DI_FFNOMINALMAX; + local.eff.dwTriggerButton = DIEB_NOTRIGGER; + local.eff.cAxes = 2; + local.eff.rgdwAxes = local.rgdwAxes; + local.eff.rglDirection = local.rglDirection; + + /* Small Motor */ + local.eff.cbTypeSpecificParams = sizeof (DIPERIODIC); + local.eff.lpvTypeSpecificParams = &local.per; + result = pDDevice->CreateEffect (GUID_Square , &local.eff, &global.pDEffect[index][0], NULL); + if (FAILED (result)) + global.pDEffect[index][0] = NULL; + + /* Big Motor */ + local.eff.cbTypeSpecificParams = sizeof (DICONSTANTFORCE); + local.eff.lpvTypeSpecificParams = &local.cf; + result = pDDevice->CreateEffect (GUID_ConstantForce , &local.eff, &global.pDEffect[index][1], NULL); + if (FAILED (result)) + global.pDEffect[index][1] = NULL; + } + return TRUE; +} + +static bool AcquireDevice (LPDIRECTINPUTDEVICE8 lpDirectInputDevice) +{ + if (FAILED (lpDirectInputDevice->Acquire())) + { + HRESULT result = lpDirectInputDevice->Acquire(); + if (result == DIERR_OTHERAPPHASPRIO) + return FALSE; + if (FAILED (result)) + return ReleaseDirectInput(); + } + return TRUE; +} + +/* Small Motor */ +static bool SetDeviceForceS (int pad, DWORD force) +{ + InitDirectInput(); + if (global.pDEffect[pad][0]) + { + if ( force == 0) { + if (FAILED (global.pDEffect[pad][0]->Stop())) { + AcquireDevice (global.pDDevice[pad]); + if (FAILED (global.pDEffect[pad][0]->Stop())) + return ReleaseDirectInput(); + } + return TRUE; + } + LONG rglDirection[2] = { 0, 0 }; + DIPERIODIC per; + rglDirection[0] = force; + rglDirection[1] = force; + per.dwMagnitude = force; + per.dwPeriod = (DWORD) (0.01 * DI_SECONDS); + per.lOffset = 0; + per.dwPhase = 0; + DIEFFECT eff; + eff.dwSize = sizeof (DIEFFECT); + eff.dwFlags = DIEFF_CARTESIAN | DIEFF_OBJECTOFFSETS; + eff.cAxes = 2; + eff.rglDirection = rglDirection; + eff.lpEnvelope = 0; + eff.cbTypeSpecificParams = sizeof (DIPERIODIC); + eff.lpvTypeSpecificParams = &per; + if (FAILED (global.pDEffect[pad][0]->SetParameters (&eff, DIEP_DIRECTION | DIEP_TYPESPECIFICPARAMS | DIEP_START))) + return ReleaseDirectInput(); + if (FAILED (global.pDEffect[pad][0]->Start (1, 0))) + { + AcquireDevice (global.pDDevice[pad]); + if (FAILED (global.pDEffect[pad][0]->Start (1, 0))) + return ReleaseDirectInput(); + } + } + return TRUE; +} + +/* Big Motor */ +static bool SetDeviceForceB (int pad, DWORD force) +{ + InitDirectInput(); + if (global.pDEffect[pad][1]) + { + if ( force == 0) { + if (FAILED (global.pDEffect[pad][1]->Stop())) { + AcquireDevice (global.pDDevice[pad]); + if (FAILED (global.pDEffect[pad][1]->Stop())) + return ReleaseDirectInput(); + } + return TRUE; + } + LONG rglDirection[2] = { 0, 0 }; + DICONSTANTFORCE cf; + rglDirection[0] = force; + rglDirection[1] = force; + cf.lMagnitude = force; + DIEFFECT eff; + eff.dwSize = sizeof (DIEFFECT); + eff.dwFlags = DIEFF_CARTESIAN | DIEFF_OBJECTOFFSETS; + eff.cAxes = 2; + eff.rglDirection = rglDirection; + eff.lpEnvelope = 0; + eff.cbTypeSpecificParams = sizeof (DICONSTANTFORCE); + eff.lpvTypeSpecificParams = &cf; + if (FAILED (global.pDEffect[pad][1]->SetParameters (&eff, DIEP_DIRECTION | DIEP_TYPESPECIFICPARAMS | DIEP_START))) + return ReleaseDirectInput(); + if (FAILED (global.pDEffect[pad][1]->Start (1, 0))) + { + AcquireDevice (global.pDDevice[pad]); + if (FAILED (global.pDEffect[pad][1]->Start (1, 0))) + return ReleaseDirectInput(); + } + } + return TRUE; +} + +static bool GetJoyState (const int devno) +{ + InitDirectInput(); + if (global.pDDevice[devno] == NULL) + return FALSE; + global.pDDevice[devno]->Poll(); + if (FAILED (global.pDDevice[devno]->GetDeviceState (sizeof (DIJOYSTATE), &global.JoyState[devno]))) + { + AcquireDevice (global.pDDevice[devno]); + return FALSE; + } + return TRUE; +} + +static bool GetKeyState (u8* keyboard) +{ + InitDirectInput(); + if (global.pDKeyboard == NULL) + return FALSE; + global.pDKeyboard->Poll(); + if (FAILED (global.pDKeyboard->GetDeviceState (256, keyboard))) + { + AcquireDevice (global.pDKeyboard); + return FALSE; + } + return TRUE; +} + +static void SetDefaultConfig (void) +{ + memset (&global.config, 0, sizeof(global.config)); + + global.config.keys[0][0] = 0x2E; + global.config.keys[0][3] = 0x2F; + global.config.keys[0][4] = 0xC8; + global.config.keys[0][5] = 0xCD; + global.config.keys[0][6] = 0xD0; + global.config.keys[0][7] = 0xCB; + global.config.keys[0][8] = 0x12; + global.config.keys[0][9] = 0x14; + global.config.keys[0][10] = 0x11; + global.config.keys[0][11] = 0x13; + global.config.keys[0][12] = 0x20; + global.config.keys[0][13] = 0x2D; + global.config.keys[0][14] = 0x2C; + global.config.keys[0][15] = 0x1F; + + global.config.dualshock = FALSE; +} + +static void SaveConfig (void) +{ + HKEY myKey; + DWORD myDisp; + + RegCreateKeyEx(HKEY_CURRENT_USER, "Software\\Vision Thing\\PSEmu Pro\\PAD\\PadSSSPSX", 0, NULL, + REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &myKey, &myDisp); + + RegSetValueEx(myKey, "cfg", 0, REG_BINARY, (CONST BYTE *)&global.config, sizeof(global.config)); + + RegCloseKey(myKey); +} + +static void LoadConfig (void) +{ + HKEY myKey; + DWORD type, size; + + SetDefaultConfig (); + + if (RegOpenKeyEx (HKEY_CURRENT_USER, "Software\\Vision Thing\\PSEmu Pro\\PAD\\PadSSSPSX", 0, + KEY_ALL_ACCESS, &myKey) == ERROR_SUCCESS) + { + size = sizeof(global.config); + RegQueryValueEx (myKey, "cfg", NULL, &type, (LPBYTE)&global.config, &size); + RegCloseKey (myKey); + } + + global.padVibC[0] = global.padVibC[1] = -1; + for (int cnt = 21; cnt--; ) + { + const int key0 = global.config.keys[0][cnt]; + if (key0 >= 0x1000) + global.padVibC[0] = (key0 & 0xfff) / 0x100; + const int key1 = global.config.keys[1][cnt]; + if (key1 >= 0x1000) + global.padVibC[1] = (key1 & 0xfff) / 0x100; + } +} + +static void PADsetMode (const int pad, const int mode) +{ + static const u8 padID[] = { 0x41, 0x73, 0x41, 0x79 }; + global.padMode1[pad] = mode; + global.padVib0[pad] = 0; + global.padVib1[pad] = 0; + global.padVibF[pad][0] = 0; + global.padVibF[pad][1] = 0; + global.padID[pad] = padID[global.padMode2[pad] * 2 + mode]; +} + +static void KeyPress (const int pad, const int index, const bool press) +{ + if (index < 16) + { + if (press) + { + global.padStat[pad] &= ~(1 << index); + if (global.padPress[pad][index] == 0) + global.padPress[pad][index] = GetTickCount(); + } + else + { + global.padStat[pad] |= 1 << index; + global.padPress[pad][index] = 0; + } + } + else if (global.config.dualshock) + { + static bool prev[2] = { FALSE, FALSE }; + if ((prev[pad] != press) && (global.padModeF[pad] == 0)) + { + prev[pad] = press; + if (press) PADsetMode (pad, !global.padMode1[pad]); + } + } +} + +static void UpdateState (const int pad) +{ + static int flag_keyboard; + static int flag_joypad[4]; + if (pad == 0) + { + flag_keyboard = 0; + flag_joypad[0] = 0; + flag_joypad[1] = 0; + flag_joypad[2] = 0; + flag_joypad[3] = 0; + } + static u8 keystate[256]; + for (int index = 17; index--; ) + { + const int key = global.config.keys[pad][index]; + if (key == 0) + continue; + else if (key < 0x100) + { + if (flag_keyboard == FALSE) + { + flag_keyboard = TRUE; + if (GetKeyState (keystate) == FALSE) + return; + } + KeyPress (pad, index, keystate[key] & 0x80); + } + else + { + const int joypad = ((key & 0xfff) / 100); + if (flag_joypad[joypad] == FALSE) + { + flag_joypad[joypad] = TRUE; + if (GetJoyState (joypad) == FALSE) + return; + } + if (key < 0x2000) + { + KeyPress (pad, index, global.JoyState[joypad].rgbButtons[key & 0xff]); + } + else if (key < 0x3000) + { + const int state = ((int*)&global.JoyState[joypad].lX)[(key & 0xff) /2]; + switch (key & 1) + { + case 0: KeyPress (pad, index, state < -64); break; + case 1: KeyPress (pad, index, state >= 64); break; + } + } + else + { + const u32 state = global.JoyState[joypad].rgdwPOV[(key & 0xff) /4]; + switch (key & 3) + { + case 0: KeyPress (pad, index, (state >= 0 && state <= 4500) || (state >= 31500 && state <= 36000)); break; + case 1: KeyPress (pad, index, state >= 4500 && state <= 13500); break; + case 2: KeyPress (pad, index, state >= 13500 && state <= 22500); break; + case 3: KeyPress (pad, index, state >= 22500 && state <= 31500); break; + } + } + } + } + + /* Small Motor */ + const int vib0 = global.padVibF[pad][0] ? 10000 : 0; + if ((global.padVibF[pad][2] != vib0) && (global.padVibC[pad] >= 0)) + { + global.padVibF[pad][2] = vib0; + SetDeviceForceS (global.padVibC[pad], vib0); + } + /* Big Motor */ + const int vib1 = global.padVibF[pad][1] ? 500 + 37*global.padVibF[pad][1] : 0; + if ((global.padVibF[pad][3] != vib1) && (global.padVibC[pad] >= 0)) + { + global.padVibF[pad][3] = vib1; + SetDeviceForceB (global.padVibC[pad], vib1); + } +} + +static void set_label (const HWND hWnd, const int pad, const int index) +{ + const int key = global.config.keys[pad][index]; + char buff[64]; + if (key < 0x100) + { + if (key == 0) + strcpy (buff, "NONE"); + else if (GetKeyNameText (key << 16, buff, sizeof (buff)) == 0) + wsprintf (buff, "Keyboard 0x%02X", key); + } + else if (key >= 0x1000 && key < 0x2000) + { + wsprintf (buff, "J%d_%d", (key & 0xfff) / 0x100, (key & 0xff) + 1); + } + else if (key >= 0x2000 && key < 0x3000) + { + static const char name[][4] = { "MIN", "MAX" }; + const int axis = (key & 0xff); + wsprintf (buff, "J%d_AXIS%d_%s", (key & 0xfff) / 0x100, axis / 2, name[axis % 2]); + if (index >= 17 && index <= 20) + buff[strlen (buff) -4] = '\0'; + } + else if (key >= 0x3000 && key < 0x4000) + { + static const char name[][7] = { "FOWARD", "RIGHT", "BACK", "LEFT" }; + const int pov = (key & 0xff); + wsprintf (buff, "J%d_POV%d_%s", (key & 0xfff) / 0x100, pov /4, name[pov % 4]); + } + Button_SetText (GetDlgItem (hWnd, IDC_ESELECT + index), buff); +} + +static BOOL CALLBACK ConfigureDlgProc (const HWND hWnd, const UINT msg, const WPARAM wParam, const LPARAM lParam) +{ + static BYTE keymaps[2][256]; + static DWORD countdown; + static int disabled; + static HWND hTabWnd; + static int pad; + int cnt1; + int cnt2; + int key; + switch (msg) + { + case WM_INITDIALOG: + hTargetWnd = hWnd; + pad = disabled = 0; + LoadConfig(); + for (cnt1 = 21; cnt1--; ) + set_label (hWnd, pad, cnt1); + hTabWnd = GetDlgItem (hWnd, IDC_TABC); + TCITEM tcI; + tcI.mask = TCIF_TEXT; + tcI.pszText = "PAD1"; + TabCtrl_InsertItem (hTabWnd, 0, &tcI); + tcI.mask = TCIF_TEXT; + tcI.pszText = "PAD2"; + TabCtrl_InsertItem (hTabWnd, 1, &tcI); + CheckDlgButton(hWnd, IDC_DS2, global.config.dualshock); + CheckDlgButton(hWnd, IDC_VV3, global.config.visualvibration[0]); + CheckDlgButton(hWnd, IDC_BG, global.config.background); + EnableWindow(GetDlgItem(hWnd, IDC_BMODE), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_BLAX), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_BLAY), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_BRAX), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_BRAY), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_BL3), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_BR3), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_EMODE), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_ELAX), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_ELAY), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_ERAX), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_ERAY), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_EL3), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_ER3), global.config.dualshock); + SetTimer (hWnd, 0x80, 50, NULL); + return TRUE; + case WM_DESTROY: + break; + case WM_NOTIFY: + if (wParam == IDC_TABC) + { + if (disabled) + EnableWindow (GetDlgItem (hWnd, disabled), TRUE); + disabled = 0; + pad = TabCtrl_GetCurSel (hTabWnd); + for (cnt1 = 21; cnt1--; ) + set_label (hWnd, pad, cnt1); + CheckDlgButton(hWnd, IDC_VV3, global.config.visualvibration[pad]); + } + break; + case WM_COMMAND: + for (cnt1 = 21; cnt1--; ) + { + if (LOWORD (wParam) == IDC_BSELECT + cnt1) + { + if (disabled) + EnableWindow (GetDlgItem (hWnd, disabled), TRUE); + EnableWindow (GetDlgItem (hWnd, disabled = wParam), FALSE); + EnableWindow (GetDlgItem (hWnd, IDC_DS2), FALSE); + countdown = GetTickCount(); + GetKeyState (keymaps[0]); + return TRUE; + } + } + if (LOWORD (wParam) == IDOK) + EndDialog (hWnd, IDOK); + else if (LOWORD (wParam) == IDCANCEL) + EndDialog (hWnd, IDCANCEL); + else if (LOWORD (wParam) == IDC_DS2) + { + global.config.dualshock = IsDlgButtonChecked(hWnd, IDC_DS2); + + EnableWindow(GetDlgItem(hWnd, IDC_BMODE), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_BLAX), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_BLAY), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_BRAX), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_BRAY), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_BL3), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_BR3), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_EMODE), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_ELAX), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_ELAY), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_ERAX), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_ERAY), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_EL3), global.config.dualshock); + EnableWindow(GetDlgItem(hWnd, IDC_ER3), global.config.dualshock); + } + else if (LOWORD (wParam) == IDC_VV3) + { + global.config.visualvibration[pad] ^= 1; + } + else if (LOWORD (wParam) == IDC_BG) + { + global.config.background ^= 1; + } + break; + case WM_TIMER: + if (disabled) + { + const int index = disabled - IDC_BSELECT; + int analog = FALSE; + if ((GetTickCount() - countdown) / 1000 != 10) + { + char buff[64]; + wsprintf (buff, "Timeout: %d", 10 - (GetTickCount() - countdown) / 1000); + SetWindowText (GetDlgItem (hWnd, IDC_ESELECT + index), buff); + } + else + { + global.config.keys[pad][index] = 0; + set_label (hWnd, pad, index); + EnableWindow (GetDlgItem (hWnd, disabled), TRUE); + EnableWindow (GetDlgItem (hWnd, IDC_DS2), TRUE); + disabled = 0; + break; + } + if (GetKeyState (keymaps[1]) == FALSE) + break; + for (key = 0x100; key--; ) + { + if (~keymaps[0][key] & keymaps[1][key] & 0x80) + break; + } + for (cnt1 = global.devcnt; cnt1--;) + { + if (GetJoyState (cnt1) == FALSE) + break; + + for (cnt2 = 32; cnt2--; ) + { + if (global.JoyState[cnt1].rgbButtons[cnt2]) + key = 0x1000 + 0x100 * cnt1 + cnt2; + } + for (cnt2 = 8; cnt2--; ) + { + const int now = ((u32*)&global.JoyState[cnt1].lX)[cnt2]; + if (now < -64) + { + key = 0x2000 + 0x100 * cnt1 + cnt2 * 2 +0; + analog = TRUE; + } + else if (now >= 64) + { + key = 0x2000 + 0x100 * cnt1 + cnt2 * 2 +1; + analog = TRUE; + } + } + for (cnt2 = 4; cnt2--; ) + { + const u32 now = global.JoyState[cnt1].rgdwPOV[cnt2]; + if ((now >= 0 && now < 4500) || (now >= 31500 && now < 36000)) + key = 0x3000 + 0x100 * cnt1 + cnt2 * 4 +0; + if (now >= 4500 && now < 13500) + key = 0x3000 + 0x100 * cnt1 + cnt2 * 4 +1; + if (now >= 13500 && now < 22500) + key = 0x3000 + 0x100 * cnt1 + cnt2 * 4 +2; + if (now >= 22500 && now < 31500) + key = 0x3000 + 0x100 * cnt1 + cnt2 * 4 +3; + } + } + if (index >= 17 && index <= 20 && analog == 0) + key = 0; + else if (key > 0) + { + if (key != 1) + global.config.keys[pad][index] = key; + set_label (hWnd, pad, index); + EnableWindow (GetDlgItem (hWnd, disabled), TRUE); + EnableWindow (GetDlgItem (hWnd, IDC_DS2), TRUE); + disabled = 0; + } + } + } + return FALSE; +} + +u32 CALLBACK PS2EgetLibType (void) +{ + return 0x02; +} + +const char* CALLBACK PS2EgetLibName (void) +{ + return LibraryName; +} + +u32 CALLBACK PS2EgetLibVersion2 (u32 type) +{ + return (version << 16) | (revision << 8) | build; +} + +u32 CALLBACK PSEgetLibType (void) +{ + return 8; +} + +const char* CALLBACK PSEgetLibName (void) +{ + return LibraryName; +} + +u32 CALLBACK PSEgetLibVersion (void) +{ + return (version << 16) | (revision << 8) | build; +} + +s32 CALLBACK PADinit (u32 flags) +{ + return 0; +} + +void CALLBACK PADshutdown (void) +{ +} + +static int n_open = 0; +s32 CALLBACK PADopen (HWND hWnd) +{ + if (!IsWindow (hWnd) && !IsBadReadPtr ((u32*)hWnd, 4)) + hWnd = *(HWND*)hWnd; + if (!IsWindow (hWnd)) + hWnd = NULL; + else + { + while (GetWindowLong (hWnd, GWL_STYLE) & WS_CHILD) + hWnd = GetParent (hWnd); + } + hTargetWnd = hWnd; + if (n_open++ == FALSE) + { + memset (&global, 0, sizeof (global)); + global.padStat[0] = 0xffff; + global.padStat[1] = 0xffff; + LoadConfig(); + PADsetMode (0, 0); + PADsetMode (1, 0); + } + return 0; +} + +void CALLBACK PADclose (void) +{ + if (--n_open == 0) + ReleaseDirectInput(); +} + +u32 CALLBACK PADquery (void) +{ + return 3; +} + +u8 CALLBACK PADstartPoll (int pad) +{ + global.curPad = pad -1; + global.curByte = 0; + return 0xff; +} + +static const u8 cmd40[8] = +{ + 0xff, 0x5a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x5a +}; +static const u8 cmd41[8] = +{ + 0xff, 0x5a, 0xff, 0xff, 0x03, 0x00, 0x00, 0x5a, +}; +static const u8 cmd44[8] = +{ + 0xff, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +static const u8 cmd45[8] = +{ + 0xff, 0x5a, 0x03, 0x02, 0x01, 0x02, 0x01, 0x00, +}; +static const u8 cmd46[8] = +{ + 0xff, 0x5a, 0x00, 0x00, 0x01, 0x02, 0x00, 0x0a, +}; +static const u8 cmd47[8] = +{ + 0xff, 0x5a, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, +}; +static const u8 cmd4c[8] = +{ + 0xff, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +static const u8 cmd4d[8] = +{ + 0xff, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +}; +static const u8 cmd4f[8] = +{ + 0xff, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5a, +}; + +static u8 get_analog (const int key) +{ + const int pad = ((key & 0xf00) / 0x100); + const int pos = ((key & 0x0ff) /2); +// return (u8)(((int*)&global.JoyState[pad].lX)[pos] + 128); + u8 r = (u8)(((int*)&global.JoyState[pad].lX)[pos] + 128); + if (r == 128) r = 127; // FIXME: ??? + return r; +} + +static u8 get_pressure (const DWORD now, const DWORD press) +{ + /*if (press == 0) + return 0; + return (u8)((now - press > 2550) ? 255 : (now - press) / 10);*/ + return 255; +} + +u8 CALLBACK PADpoll (u8 value) +{ + const int pad = global.curPad; + const int cur = global.curByte; + static u8 buf[20]; + + if (!global.config.dualshock) + { + value = 0x42; + } + + if (cur == 0) + { + global.curByte++; + global.curCmd = value; + switch (value) + { + case 0x40: + global.cmdLen = sizeof (cmd40); + memcpy (buf, cmd40, sizeof (cmd40)); + return 0xf3; + case 0x41: + global.cmdLen = sizeof (cmd41); + memcpy (buf, cmd41, sizeof (cmd41)); + return 0xf3; + case 0x42: + case 0x43: + if (value == 0x42) UpdateState (pad); + global.cmdLen = 2 + 2 * (global.padID[pad] & 0x0f); + buf[1] = global.padModeC[pad] ? 0x00 : 0x5a; + *(u16*)&buf[2] = global.padStat[pad]; + if (value == 0x43 && global.padModeE[pad]) + { + buf[4] = 0; + buf[5] = 0; + buf[6] = 0; + buf[7] = 0; + return 0xf3; + } + else + { + buf[ 4] = get_analog (global.config.keys[pad][19]); + buf[ 5] = get_analog (global.config.keys[pad][20]); + buf[ 6] = get_analog (global.config.keys[pad][17]); + buf[ 7] = get_analog (global.config.keys[pad][18]); + + if (global.padID[pad] == 0x79) + { + const DWORD now = GetTickCount(); + buf[ 8] = get_pressure (now, global.padPress[pad][2]); + buf[ 9] = get_pressure (now, global.padPress[pad][0]); + buf[10] = get_pressure (now, global.padPress[pad][3]); + buf[11] = get_pressure (now, global.padPress[pad][1]); + buf[12] = get_pressure (now, global.padPress[pad][11]); + buf[13] = get_pressure (now, global.padPress[pad][10]); + buf[14] = get_pressure (now, global.padPress[pad][9]); + buf[15] = get_pressure (now, global.padPress[pad][8]); + buf[16] = get_pressure (now, global.padPress[pad][13]); + buf[17] = get_pressure (now, global.padPress[pad][12]); + buf[18] = get_pressure (now, global.padPress[pad][15]); + buf[19] = get_pressure (now, global.padPress[pad][14]); + } + return (u8)global.padID[pad]; + } + break; + case 0x44: + global.cmdLen = sizeof (cmd44); + memcpy (buf, cmd44, sizeof (cmd44)); + return 0xf3; + case 0x45: + global.cmdLen = sizeof (cmd45); + memcpy (buf, cmd45, sizeof (cmd45)); + buf[4] = (u8)global.padMode1[pad]; + return 0xf3; + case 0x46: + global.cmdLen = sizeof (cmd46); + memcpy (buf, cmd46, sizeof (cmd46)); + return 0xf3; + case 0x47: + global.cmdLen = sizeof (cmd47); + memcpy (buf, cmd47, sizeof (cmd47)); + return 0xf3; + case 0x4c: + global.cmdLen = sizeof (cmd4c); + memcpy (buf, cmd4c, sizeof (cmd4c)); + return 0xf3; + case 0x4d: + global.cmdLen = sizeof (cmd4d); + memcpy (buf, cmd4d, sizeof (cmd4d)); + return 0xf3; + case 0x4f: + global.padID[pad] = 0x79; + global.padMode2[pad] = 1; + global.cmdLen = sizeof (cmd4f); + memcpy (buf, cmd4f, sizeof (cmd4f)); + return 0xf3; + } + } + switch (global.curCmd) + { + case 0x42: + if (global.config.dualshock) + { + if (cur == global.padVib0[pad]) + { + global.padVibF[pad][0] = value; + + if (gpuVisualVibration != NULL && (global.padVibF[pad][0] || global.padVibF[pad][1]) && + global.config.visualvibration[pad]) + gpuVisualVibration(global.padVibF[pad][0], global.padVibF[pad][1]); + } + + if (cur == global.padVib1[pad]) + { + global.padVibF[pad][1] = value; + + if (gpuVisualVibration != NULL && (global.padVibF[pad][0] || global.padVibF[pad][1]) && + global.config.visualvibration[pad]) + gpuVisualVibration(global.padVibF[pad][0], global.padVibF[pad][1]); + } + } + break; + case 0x43: + if (cur == 2) + { + global.padModeE[pad] = value; + global.padModeC[pad] = 0; + } + break; + case 0x44: + if (cur == 2) + PADsetMode (pad, value); + if (cur == 3) + global.padModeF[pad] = (value == 3); + break; + case 0x46: + if (cur == 2) + { + switch(value) + { + case 0: + buf[5] = 0x02; + buf[6] = 0x00; + buf[7] = 0x0A; + break; + case 1: + buf[5] = 0x01; + buf[6] = 0x01; + buf[7] = 0x14; + break; + } + } + break; + case 0x4c: + if (cur == 2) + { + static const u8 buf5[] = { 0x04, 0x07, 0x02, 0x05 }; + buf[5] = buf5[value & 3]; + } + break; + case 0x4d: + if (cur >= 2) + { + if (cur == global.padVib0[pad]) + buf[cur] = 0x00; + if (cur == global.padVib1[pad]) + buf[cur] = 0x01; + if (value == 0x00) + { + global.padVib0[pad] = cur; + if ((global.padID[pad] & 0x0f) < (cur - 1) / 2) + global.padID[pad] = (global.padID[pad] & 0xf0) + (cur - 1) / 2; + } + else if (value == 0x01) + { + global.padVib1[pad] = cur; + if ((global.padID[pad] & 0x0f) < (cur - 1) / 2) + global.padID[pad] = (global.padID[pad] & 0xf0) + (cur - 1) / 2; + } + } + break; + } + if (cur >= global.cmdLen) + return 0; + return buf[global.curByte++]; +} + +typedef struct +{ + unsigned char controllerType; + unsigned short buttonStatus; + unsigned char rightJoyX, rightJoyY, leftJoyX, leftJoyY; + unsigned char moveX, moveY; + unsigned char reserved[91]; +} PadDataS; + +long PADreadPort1 (PadDataS* pads) +{ + memset (pads, 0, sizeof (PadDataS)); + if ((global.padID[0] & 0xf0) == 0x40) + pads->controllerType = 4; + else + pads->controllerType = 7; + pads->buttonStatus = global.padStat[0]; + pads->leftJoyX = get_analog (global.config.keys[0][17]); + pads->leftJoyY = get_analog (global.config.keys[0][18]); + pads->rightJoyX = get_analog (global.config.keys[0][19]); + pads->rightJoyY = get_analog (global.config.keys[0][20]); + pads->moveX = 0; + pads->moveY = 0; + return 0; +} + +long PADreadPort2 (PadDataS* pads) +{ + memset (pads, 0, sizeof (PadDataS)); + if ((global.padID[1] & 0xf0) == 0x40) + pads->controllerType = 4; + else + pads->controllerType = 7; + pads->buttonStatus = global.padStat[1]; + pads->leftJoyX = get_analog (global.config.keys[1][17]); + pads->leftJoyY = get_analog (global.config.keys[1][18]); + pads->rightJoyX = get_analog (global.config.keys[1][19]); + pads->rightJoyY = get_analog (global.config.keys[1][20]); + pads->moveX = 0; + pads->moveY = 0; + return 0; +} + +keyEvent* CALLBACK PADkeyEvent (void) +{ + static keyEvent ev; + static u8 state[2][256]; + if (n_open) + { + memcpy (state[0], state[1], sizeof (state[0])); + GetKeyState (state[1]); + for (int cnt = 0; cnt < 256; cnt++) + { + if (~state[0][cnt] & state[1][cnt] & 0x80) + { + ev.event = (state[1][cnt] & 0x80) ? 1 : 2; + ev.key = MapVirtualKey (cnt, 1); + return &ev; + } + } + } + return NULL; +} + +void CALLBACK PADconfigure (void) +{ + if (n_open == 0) + { + memset (&global, 0, sizeof (global)); + if (DialogBox (hInstance, MAKEINTRESOURCE (IDD_DIALOG1), GetActiveWindow(), (DLGPROC)ConfigureDlgProc) == IDOK) + SaveConfig(); + ReleaseDirectInput(); + } +} + +void CALLBACK PADabout (void) +{ + MessageBox (0, "Copyright (C) 2004-2005 Nagisa", "SSSPSX PAD plugin", 0); +} + +s32 CALLBACK PADtest (void) +{ + return 0; +} + +void CALLBACK PADregisterVibration(void (CALLBACK *callback)(unsigned long, unsigned long)) { + gpuVisualVibration = callback; +} + +//#ifdef _WIN64 +BOOL APIENTRY DllMain(HMODULE hInst, DWORD dwReason, LPVOID lpReserved) +{ + hInstance = hInst; + return TRUE; +} +//#else +BOOL APIENTRY EntryPoint (HMODULE hInst, DWORD dwReason, LPVOID lpReserved) +{ + hInstance = hInst; + return TRUE; +} +//#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/PadSSSPSX/PadSSSPSX.def pcsxr-unstable-1.9.94+svn98108/win32/plugins/PadSSSPSX/PadSSSPSX.def --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/PadSSSPSX/PadSSSPSX.def 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/PadSSSPSX/PadSSSPSX.def 2016-06-30 16:53:26.000000000 +0000 @@ -0,0 +1,23 @@ +LIBRARY "PadSSSPSX" + +EXPORTS + PSEgetLibType @1 + PSEgetLibName @2 + PSEgetLibVersion @3 + PS2EgetLibType @4 + PS2EgetLibName @5 + PS2EgetLibVersion2 @6 + PADinit @7 + PADshutdown @8 + PADopen @9 + PADclose @10 + PADkeyEvent @11 + PADstartPoll @12 + PADpoll @13 + PADreadPort1 @14 + PADreadPort2 @15 + PADquery @16 + PADconfigure @17 + PADtest @18 + PADabout @19 + PADregisterVibration @20 \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/PadSSSPSX/PadSSSPSX.h pcsxr-unstable-1.9.94+svn98108/win32/plugins/PadSSSPSX/PadSSSPSX.h --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/PadSSSPSX/PadSSSPSX.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/PadSSSPSX/PadSSSPSX.h 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,48 @@ +/* PADwin + * Copyright (C) 2002-2004 PADwin Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __PAD_H__ +#define __PAD_H__ + +#include "PadSSSPSXres.h" + +typedef signed char s8; +typedef signed short s16; +typedef signed int s32; +typedef __int64 s64; + +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +typedef unsigned __int64 u64; + +typedef struct +{ + u32 key; + u32 event; +} keyEvent; + +typedef struct +{ + u32 keys[2][21]; + u32 dualshock; + u32 visualvibration[2]; + u32 background; +} Config; + +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/PadSSSPSX/PadSSSPSX.rc pcsxr-unstable-1.9.94+svn98108/win32/plugins/PadSSSPSX/PadSSSPSX.rc --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/PadSSSPSX/PadSSSPSX.rc 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/PadSSSPSX/PadSSSPSX.rc 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,129 @@ +#include "PadSSSPSXres.h" + +#define APSTUDIO_READONLY_SYMBOLS + +/////////////////////////////////////////////////////////////////////////////// +// Use MFC if available +// +#if defined(_MFC_VER) +#include "afxres.h" +#else +#include "WinResrc.h" +#include +#endif + +#undef APSTUDIO_READONLY_SYMBOLS + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN) +#ifdef _WIN32 +//LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT +//#pragma code_page(932) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED + +1 TEXTINCLUDE +BEGIN + "PadSSSPSXres.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif + +IDD_DIALOG1 DIALOGEX 0, 0, 442, 239 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION +CAPTION "PAD Settings" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + CONTROL "",IDC_TABC,"SysTabControl32",0x0,6,6,432,210 + PUSHBUTTON "L2",IDC_BL2,54,24,72,12,NOT WS_TABSTOP + EDITTEXT IDC_EL2,54,36,72,12,ES_READONLY | NOT WS_TABSTOP + PUSHBUTTON "L1",IDC_BL1,54,48,72,12,NOT WS_TABSTOP + EDITTEXT IDC_EL1,54,60,72,12,ES_READONLY | NOT WS_TABSTOP + PUSHBUTTON "Up",IDC_BUP,54,78,72,12,NOT WS_TABSTOP + EDITTEXT IDC_EUP,54,90,72,12,ES_READONLY | NOT WS_TABSTOP + PUSHBUTTON "Left",IDC_BLEFT,12,102,72,12,NOT WS_TABSTOP + EDITTEXT IDC_ELEFT,12,114,72,12,ES_READONLY | NOT WS_TABSTOP + PUSHBUTTON "Right",IDC_BRIGHT,96,102,72,12,NOT WS_TABSTOP + EDITTEXT IDC_ERIGHT,96,114,72,12,ES_READONLY | NOT WS_TABSTOP + PUSHBUTTON "Down",IDC_BDOWN,54,126,72,12,NOT WS_TABSTOP + EDITTEXT IDC_EDOWN,54,138,72,12,ES_READONLY | NOT WS_TABSTOP + PUSHBUTTON "Select",IDC_BSELECT,144,36,72,12,NOT WS_TABSTOP, + WS_EX_TRANSPARENT + EDITTEXT IDC_ESELECT,144,48,72,12,ES_READONLY | NOT WS_TABSTOP, + WS_EX_TRANSPARENT + PUSHBUTTON "Start",IDC_BSTART,228,36,72,12,NOT WS_TABSTOP, + WS_EX_TRANSPARENT + EDITTEXT IDC_ESTART,228,48,72,12,ES_READONLY | NOT WS_TABSTOP, + WS_EX_TRANSPARENT + PUSHBUTTON "Analog",IDC_BMODE,186,66,72,12,NOT WS_TABSTOP, + WS_EX_TRANSPARENT + EDITTEXT IDC_EMODE,186,78,72,12,ES_READONLY | NOT WS_TABSTOP, + WS_EX_TRANSPARENT + PUSHBUTTON "R2",IDC_BR2,318,24,72,12,NOT WS_TABSTOP + EDITTEXT IDC_ER2,318,36,72,12,ES_AUTOHSCROLL | ES_READONLY | NOT + WS_TABSTOP + PUSHBUTTON "R1",IDC_BR1,318,48,72,12,NOT WS_TABSTOP + EDITTEXT IDC_ER1,318,60,72,12,ES_AUTOHSCROLL | ES_READONLY | NOT + WS_TABSTOP + PUSHBUTTON "Triangle",IDC_BTRIANGLE,318,78,72,12,NOT WS_TABSTOP + EDITTEXT IDC_ETRIANGLE,318,90,72,12,ES_AUTOHSCROLL | ES_READONLY | + NOT WS_TABSTOP + PUSHBUTTON "Square",IDC_BSQUARE,276,102,72,12,NOT WS_TABSTOP + EDITTEXT IDC_ESQUARE,276,114,72,12,ES_AUTOHSCROLL | ES_READONLY | + NOT WS_TABSTOP + PUSHBUTTON "Circle",IDC_BCIRCLE,360,102,72,12,NOT WS_TABSTOP + EDITTEXT IDC_ECIRCLE,360,114,72,12,ES_AUTOHSCROLL | ES_READONLY | + NOT WS_TABSTOP + PUSHBUTTON "Cross",IDC_BCROSS,318,126,72,12,NOT WS_TABSTOP + EDITTEXT IDC_ECROSS,318,138,72,12,ES_AUTOHSCROLL | ES_READONLY | + NOT WS_TABSTOP + PUSHBUTTON "L3",IDC_BL3,144,132,72,12,NOT WS_TABSTOP + EDITTEXT IDC_EL3,144,144,72,12,ES_READONLY | NOT WS_TABSTOP + PUSHBUTTON "LX",IDC_BLAX,144,162,72,12,NOT WS_TABSTOP + EDITTEXT IDC_ELAX,144,174,72,12,ES_READONLY | NOT WS_TABSTOP + PUSHBUTTON "LY",IDC_BLAY,144,186,72,12,NOT WS_TABSTOP + EDITTEXT IDC_ELAY,144,198,72,12,ES_READONLY | NOT WS_TABSTOP + PUSHBUTTON "R3",IDC_BR3,228,132,72,12,NOT WS_TABSTOP + EDITTEXT IDC_ER3,228,144,72,12,ES_READONLY | NOT WS_TABSTOP + PUSHBUTTON "RX",IDC_BRAX,228,162,72,12,NOT WS_TABSTOP + EDITTEXT IDC_ERAX,228,174,72,12,ES_READONLY | NOT WS_TABSTOP + PUSHBUTTON "RY",IDC_BRAY,228,186,72,12,NOT WS_TABSTOP + EDITTEXT IDC_ERAY,228,198,72,12,ES_READONLY | NOT WS_TABSTOP + PUSHBUTTON "OK",IDOK,330,222,48,12,NOT WS_TABSTOP + PUSHBUTTON "Cancel",IDCANCEL,390,222,48,12,NOT WS_TABSTOP + CTEXT "",IDC_STATIC,318,167,108,42,0,WS_EX_STATICEDGE + CONTROL "DUALSHOCK2 INSIDE",IDC_DS2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,331,172,84,8 + CONTROL "VISUAL VIBRATION",IDC_VV3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,331,184,84,8 + CONTROL "BACKGROUND",IDC_BG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,331,196,84,8 +END + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_DIALOG1, DIALOG + BEGIN + RIGHTMARGIN, 432 + BOTTOMMARGIN, 233 + END +END +#endif + +#endif + + +#ifndef APSTUDIO_INVOKED + +#endif + diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/PadSSSPSX/PadSSSPSXres.h pcsxr-unstable-1.9.94+svn98108/win32/plugins/PadSSSPSX/PadSSSPSXres.h --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/PadSSSPSX/PadSSSPSXres.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/PadSSSPSX/PadSSSPSXres.h 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,62 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by PadSSSPSX.rc +// +#define IDD_DIALOG1 100 +#define IDC_BSELECT 1000 +#define IDC_BL3 1001 +#define IDC_BR3 1002 +#define IDC_BSTART 1003 +#define IDC_BUP 1004 +#define IDC_BRIGHT 1005 +#define IDC_BDOWN 1006 +#define IDC_BLEFT 1007 +#define IDC_BL2 1008 +#define IDC_BR2 1009 +#define IDC_BL1 1010 +#define IDC_BR1 1011 +#define IDC_BTRIANGLE 1012 +#define IDC_BCIRCLE 1013 +#define IDC_BCROSS 1014 +#define IDC_BSQUARE 1015 +#define IDC_BMODE 1016 +#define IDC_BLAX 1017 +#define IDC_BLAY 1018 +#define IDC_BRAX 1019 +#define IDC_BRAY 1020 +#define IDC_ESELECT 1030 +#define IDC_EL3 1031 +#define IDC_ER3 1032 +#define IDC_ESTART 1033 +#define IDC_EUP 1034 +#define IDC_ERIGHT 1035 +#define IDC_EDOWN 1036 +#define IDC_ELEFT 1037 +#define IDC_EL2 1038 +#define IDC_ER2 1039 +#define IDC_EL1 1040 +#define IDC_ER1 1041 +#define IDC_ETRIANGLE 1042 +#define IDC_ECIRCLE 1043 +#define IDC_ECROSS 1044 +#define IDC_ESQUARE 1045 +#define IDC_EMODE 1046 +#define IDC_ELAX 1047 +#define IDC_ELAY 1048 +#define IDC_ERAX 1049 +#define IDC_ERAY 1050 +#define IDC_TABC 1060 +#define IDC_DS2 1070 +#define IDC_VV3 1071 +#define IDC_BG 1072 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1061 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/PadSSSPSX/PadSSSPSX.vcxproj pcsxr-unstable-1.9.94+svn98108/win32/plugins/PadSSSPSX/PadSSSPSX.vcxproj --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/PadSSSPSX/PadSSSPSX.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/PadSSSPSX/PadSSSPSX.vcxproj 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,173 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + SSSPSXpad + {0639CDF3-8C1F-47F4-A760-F5568194A083} + SSSPSXpad + + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + .\Debug\ + .\Debug\ + false + .\Release\ + .\Release\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/PadSSSPSX.tlb + + + + + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;SSSPSXPAD_EXPORTS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + .\Debug/PadSSSPSX.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0804 + + + odbc32.lib;odbccp32.lib;dinput8.lib;dxguid.lib;%(AdditionalDependencies) + $(SolutionDir)$(Configuration)\PadSSSPSX.dll + true + .\PadSSSPSX.def + true + .\Debug/PadSSSPSX.pdb + false + + + .\Debug/PadSSSPSX.lib + MachineX86 + + + + + true + .\Debug/PadSSSPSX.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/PadSSSPSX.tlb + + + + + MaxSpeed + OnlyExplicitInline + WIN32;NDEBUG;_WINDOWS;_USRDLL;SSSPSXPAD_EXPORTS;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/PadSSSPSX.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0804 + + + odbc32.lib;odbccp32.lib;dinput8.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/PadSSSPSX.dll + true + .\PadSSSPSX.def + .\Release/PadSSSPSX.pdb + false + + + .\Release/PadSSSPSX.lib + MachineX86 + + + + + true + .\Release/PadSSSPSX.bsc + + + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + + + + + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/PadSSSPSX/PadSSSPSX.vcxproj.filters pcsxr-unstable-1.9.94+svn98108/win32/plugins/PadSSSPSX/PadSSSPSX.vcxproj.filters --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/PadSSSPSX/PadSSSPSX.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/PadSSSPSX/PadSSSPSX.vcxproj.filters 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,40 @@ + + + + + {9e0fae11-21d1-4f55-a39a-a2a7ee79e32a} + cpp;c;cxx;rc;def;r;odl;idl;hpj;bat + + + {688f1b67-5186-4503-bdd3-f85e67193506} + h;hpp;hxx;hm;inl + + + {727a8f19-4c32-4d61-834d-c870f6ab38b6} + ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + + + Source Files + + + + + Header Files + + + Header Files + + + + + Resource Files + + + \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/PadSSSPSX/PadSSSPSX.vcxproj.user pcsxr-unstable-1.9.94+svn98108/win32/plugins/PadSSSPSX/PadSSSPSX.vcxproj.user --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/PadSSSPSX/PadSSSPSX.vcxproj.user 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/PadSSSPSX/PadSSSPSX.vcxproj.user 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/PadSSSPSX/readmewip.txt pcsxr-unstable-1.9.94+svn98108/win32/plugins/PadSSSPSX/readmewip.txt --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/PadSSSPSX/readmewip.txt 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/PadSSSPSX/readmewip.txt 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,48 @@ +SSSPSX Pad - An Open Source Pad plugin for PSX and PS2 emulators +Author: Nagisa +Homepage: http://www.asahi-net.or.jp/~bz7t-skmt/ + +Overview: +-Small executable program +-Source code under 1000 step,20kb binary +-Open Source,under the GPL Licence + + +Features: + +For PS1 emulators +- Force feedback support (PCSX only) + Delete the following PCSX sorce code. + File: sio.c Line: 138 +@--------------------- +@if (buf[parp] == 0x41) { +@@switch (value) { +@@@case 0x43: +@@@@buf[1] = 0x43; +@@@@break; +@@@case 0x45: +@@@@buf[1] = 0xf3; +@@@@break; +@@} +@} +@--------------------- + +For PCSX2 +-Force feedback support (maybe) +-PADKeyEvent API support +-Using DirectInput 9 (game controller and keyboard) + +Thanks to: +http://www.hm5.aitai.ne.jp/~takuya/index.html#ds2_analisys for the valuable info +PCSX2 team for the PadWinKeyb source code +bositman for some report + +Version History: +v1.0: -Initial Release +v1.1: -Changed to DirectInput 9 +v1.2: -PADKeyEvent API support added +v1.3: -DirectInput collision problem fixed +v1.4: -Added timeout on settings dialog.If the countdown ends, the key will be set to "NONE". + -Changed "ESC" key action on settings dialog.If you press the "ESC" key, the setting will keep the previous one. + -Fixed silly bug. (dont ask me about it). +v1.5: -Fixed 0x4D packet. diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/gpuPeopsOpenGL.def pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/gpuPeopsOpenGL.def --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/gpuPeopsOpenGL.def 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/gpuPeopsOpenGL.def 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,36 @@ +; gpuPeopsOpenGL.def : Declares the module parameters for the DLL. + +LIBRARY "gpuPeopsOpenGL" +DESCRIPTION 'gpuPeopsOpenGL OpenGL Windows Dynamic Link Library' +EXPORTS + ; Explicit exports can go here + PSEgetLibType @2 + PSEgetLibName @3 + PSEgetLibVersion @4 + GPUinit @5 + GPUshutdown @6 + GPUopen @7 + GPUclose @8 + GPUconfigure @9 + GPUabout @10 + GPUtest @11 + GPUwriteData @12 + GPUwriteStatus @13 + GPUreadData @14 + GPUreadStatus @15 + GPUdmaChain @16 + GPUupdateLace @17 + GPUmakeSnapshot @18 + GPUwriteDataMem @19 + GPUreadDataMem @20 + GPUdisplayFlags @21 + GPUfreeze @22 + GPUgetScreenPic @23 + GPUshowScreenPic @24 + + GPUcursor @25 + + GPUsetfix @26 + GPUsetframelimit @27 + GPUvisualVibration @28 + GPUaddVertex @29 diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/gpuPeopsOpenGL.dev pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/gpuPeopsOpenGL.dev --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/gpuPeopsOpenGL.dev 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/gpuPeopsOpenGL.dev 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,319 @@ +[Project] +FileName=gpuPeopsOpenGL.dev +Name=gpuPeopsOpenGL +Ver=1 +IsCpp=1 +Type=3 +Compiler=-W -DWIN32 -DNDEBUG -D_WINDOWS_@@_ +CppCompiler=-W -DWIN32 -DNDEBUG -D_WINDOWS_@@_ +Includes=.\\;.\winsrc;..\..\glue;..\..\..\plugins\peopsxgl;..\..\..\libpcsxcore +Linker=-luser32 -lgdi32 -lopengl32 -lwinmm -ladvapi32 -def gpuPeopsOpenGL.def --enable-stdcall-fixup_@@_ +Libs= +UnitCount=27 +Folders=peopsxgl,winsrc +ObjFiles= +PrivateResource=gpuPeopsOpenGL_private.rc +ResourceIncludes= +MakeIncludes= +Icon= +ExeOutput= +ObjectOutput= +OverrideOutput=0 +OverrideOutputName=gpuPeopsOpenGL.exe +HostApplication= +CommandLine= +UseCustomMakefile=0 +CustomMakefile= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0010000001001000000000 + +[Unit1] +FileName=winsrc\cfg.c +Folder=winsrc +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit2] +FileName=winsrc\fps.c +Folder=winsrc +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit3] +FileName=winsrc\key.c +Folder=winsrc +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit4] +FileName=winsrc\ssave.c +Folder=winsrc +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit5] +FileName=winsrc\ssave.h +Folder=winsrc +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit6] +FileName=winsrc\winmain.c +Folder=winsrc +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit7] +FileName=..\..\..\plugins\peopsxgl\cfg.h +Folder=peopsxgl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit8] +FileName=..\..\..\plugins\peopsxgl\draw.c +Folder=peopsxgl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit9] +FileName=..\..\..\plugins\peopsxgl\draw.h +Folder=peopsxgl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit10] +FileName=..\..\..\plugins\peopsxgl\externals.h +Folder=peopsxgl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit11] +FileName=..\..\..\plugins\peopsxgl\fps.h +Folder=peopsxgl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit12] +FileName=..\..\..\plugins\peopsxgl\gl_ext.h +Folder=peopsxgl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit13] +FileName=..\..\..\plugins\peopsxgl\gpu.c +Folder=peopsxgl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit14] +FileName=..\..\..\plugins\peopsxgl\gpu.h +Folder=peopsxgl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit15] +FileName=..\..\..\plugins\peopsxgl\key.h +Folder=peopsxgl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit16] +FileName=..\..\..\plugins\peopsxgl\menu.c +Folder=peopsxgl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit17] +FileName=..\..\..\plugins\peopsxgl\menu.h +Folder=peopsxgl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit18] +FileName=..\..\..\plugins\peopsxgl\prim.c +Folder=peopsxgl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit19] +FileName=..\..\..\plugins\peopsxgl\prim.h +Folder=peopsxgl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit20] +FileName=..\..\..\plugins\peopsxgl\soft.c +Folder=peopsxgl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit21] +FileName=..\..\..\plugins\peopsxgl\soft.h +Folder=peopsxgl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit22] +FileName=..\..\..\plugins\peopsxgl\stdafx.h +Folder=peopsxgl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit23] +FileName=..\..\..\plugins\peopsxgl\texture.c +Folder=peopsxgl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit24] +FileName=..\..\..\plugins\peopsxgl\texture.h +Folder=peopsxgl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit25] +FileName=gpuPeopsOpenGL.def +Folder= +Compile=0 +CompileCpp=0 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit26] +FileName=gpuPeopsOpenGL.rc +Folder=Resources +Compile=1 +CompileCpp=1 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit27] +FileName=resource.h +Folder= +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=0.1 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename=gpuPeopsOpenGL.exe +ProductName=gpuPeopsOpenGL +ProductVersion=0.1 +AutoIncBuildNr=0 + diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/gpuPeopsOpenGL.rc pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/gpuPeopsOpenGL.rc --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/gpuPeopsOpenGL.rc 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/gpuPeopsOpenGL.rc 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,519 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// Use MFC if available +// +#if defined(_MFC_VER) +#include "afxres.h" +#else +#include "WinResrc.h" +#include +#endif + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Neutral resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_GPU BITMAP DISCARDABLE "res\\gpu.bmp" +#endif // Neutral resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#define _AFX_NO_SPLITTER_RESOURCES\r\n" + "#define _AFX_NO_OLE_RESOURCES\r\n" + "#define _AFX_NO_TRACKER_RESOURCES\r\n" + "#define _AFX_NO_PROPERTY_RESOURCES\r\n" + "\r\n" + "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#endif\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,78,0,0 + PRODUCTVERSION 1,78,0,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "\0" + VALUE "CompanyName", "\0" + VALUE "FileDescription", "gpuPeopsOpenGL.dll\0" + VALUE "FileVersion", "1, 78, 0, 0\0" + VALUE "InternalName", "P.E.Op.S. PSX OpenGL GPU (mod)\0" + VALUE "LegalCopyright", "Copyright (C) 1999-2009\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "gpuPeopsOpenGL.dll\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "gpuPeopsOpenGL Dynamic Link Library\0" + VALUE "ProductVersion", "1, 78, 0, 0\0" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_DIALOG_ABOUT DIALOG DISCARDABLE 0, 0, 258, 165 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About P.E.Op.S. PSX OpenGL Renderer ..." +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,98,145,50,14 + RTEXT "Version:",IDC_STATIC,8,6,49,10 + RTEXT "Coded by:",IDC_STATIC,8,35,49,10 + RTEXT "Homepage:",IDC_STATIC,8,53,49,10 + LTEXT "1.78",IDC_STATIC,60,6,159,9 + LTEXT "Pete Bernert",IDC_STATIC,60,35,159,10 + LTEXT "www.pbernert.com",IDC_STATIC,60,53,159,10 + RTEXT "Release date:",IDC_STATIC,8,17,49,10 + LTEXT "04/2009",IDC_STATIC,60,17,159,10 + RTEXT "Thanks to:",IDC_STATIC,8,74,49,10 + LTEXT "Lewpy - without his infos this driver wouldn't exist", + IDC_STATIC,60,74,159,10 + LTEXT "Duddie && FoxPro - for their public sources",IDC_STATIC, + 60,86,159,10 + LTEXT "My girlfriend Heike - 'Hey, that cloud still looks funny, ", + IDC_STATIC,60,112,170,10 + LTEXT "go on and change it...'",IDC_STATIC,125,121,117,10 + CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME | SS_SUNKEN,4,68, + 249,70 + LTEXT "Gamma - thanks for your OpenGL book",IDC_STATIC,60,99, + 159,10 +END + +IDD_CFGDLG DIALOGEX 0, 0, 413, 306 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Configure P.E.Op.S. PSX OpenGL Renderer ..." +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "Fullscreen mode",IDC_DISPMODE1,"Button",BS_AUTORADIOBUTTON,11,11,73,10 + CONTROL "Window mode",IDC_DISPMODE2,"Button",BS_AUTORADIOBUTTON,11,25,63,10 + COMBOBOX IDC_RESOLUTION,150,10,63,64,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COLORDEPTH,261,10,36,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + EDITTEXT IDC_WINX,150,24,26,12,ES_AUTOHSCROLL + EDITTEXT IDC_WINY,187,24,26,12,ES_AUTOHSCROLL + CONTROL "Keep psx aspect ratio",IDC_ARATIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,11,95,12 + COMBOBOX IDC_TEXQUALITY,61,50,159,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_FILTERTYPE,61,63,159,83,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_HIRESTEX,275,50,129,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_VRAMSIZE,275,63,62,88,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + CONTROL "Show FPS display on startup",IDC_SHOWFPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,94,104,10 + PUSHBUTTON "...",IDC_KEYCONFIG,119,94,11,10,0,WS_EX_STATICEDGE + CONTROL "Use FPS limit",IDC_USELIMIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,149,89,73,10 + CONTROL "Use Frame skipping",IDC_USESKIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,149,101,78,10 + CONTROL "Auto-detect FPS/Frame skipping limit",IDC_FRAMEAUTO, + "Button",BS_AUTORADIOBUTTON | WS_GROUP,258,89,131,9 + CONTROL "FPS limit (10-200) :",IDC_FRAMEMANUELL,"Button",BS_AUTORADIOBUTTON,258,101,72,10 + EDITTEXT IDC_FRAMELIMIT,334,99,29,12,ES_AUTOHSCROLL + COMBOBOX IDC_OFFSCREEN,78,123,130,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_FRAMETEX,78,136,130,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_FRAMEREAD,78,149,130,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "Alpha MultiPass",IDC_OPAQUE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,219,127,66,10 + CONTROL "Mask bit",IDC_USEMASK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,219,138,47,10 + CONTROL "Advanced blending",IDC_ADVBLEND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,219,149,76,10 + CONTROL "Scanlines",IDC_USESCANLINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,176,46,10 + EDITTEXT IDC_SCANBLEND,375,175,29,12,ES_AUTOHSCROLL + CONTROL "Line mode",IDC_USELINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,186,48,10 + CONTROL "Unfiltered framebuffer updates",IDC_FASTMDEC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,196,113,10 + CONTROL "Force 15 bit framebuffer updates",IDC_FASTMDEC2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,206,121,10 + CONTROL "Color dithering",IDC_DRAWDITHER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,216,81,10 + CONTROL "Screen smoothing",IDC_BLUR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,226,81,10 + CONTROL "Disable screensaver",IDC_SSAVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,236,81,10 + CONTROL "Special game fixes",IDC_GAMEFIX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,246,75,10 + PUSHBUTTON "...",IDC_SELFIX,89,246,11,10,0,WS_EX_STATICEDGE + PUSHBUTTON "Fast",IDC_DEF1,10,282,34,14 + PUSHBUTTON "Nice",IDC_DEF2,49,282,34,14 + DEFPUSHBUTTON "OK",IDOK,113,282,84,14 + PUSHBUTTON "Cancel",IDCANCEL,215,282,84,14 + PUSHBUTTON "Copy settings\n to clipboard",IDC_CLIPBOARD,322,276,87,25,BS_MULTILINE,WS_EX_STATICEDGE + GROUPBOX "Misc",IDC_STATIC,3,166,406,104 + GROUPBOX "Default settings",IDC_STATIC,3,272,88,30 + GROUPBOX "Textures",IDC_STATIC,3,41,406,40 + RTEXT "Desktop resolution:",IDC_STATIC,81,12,65,9 + GROUPBOX "Resolution && Colors",IDC_STATIC,3,1,406,40 + RTEXT "Color depth:",IDC_STATIC,219,12,39,9 + GROUPBOX "Framerate",IDC_STATIC,3,81,406,33 + LTEXT "FPS",IDC_STATIC,367,100,17,9,SS_CENTERIMAGE + GROUPBOX "Compatibility",IDC_STATIC,3,115,406,51 + RTEXT "Texture quality:",IDC_QUALTXT,6,52,51,9 + RTEXT "Window size:",IDC_STATIC,85,26,61,9 + CTEXT "x",IDC_STATIC,177,26,8,9 + RTEXT "Gfx card vram:",IDC_QUALTXT2,225,65,48,9 + RTEXT "Off-Screen drawing:",IDC_STATIC,11,124,64,10,SS_CENTERIMAGE + RTEXT "Texture filtering:",IDC_STATIC,6,65,52,10 + RTEXT "Framebuffer textures:",IDC_STATIC,7,137,68,10,SS_CENTERIMAGE + LTEXT "Some games will need certain special options to work without glitches",IDC_STATIC,135,246,242,9,SS_CENTERIMAGE + LTEXT "Smoother shading in 16 bit color depth",IDC_STATIC,135,216,242,9,SS_CENTERIMAGE + LTEXT "Small speed up with mdecs",IDC_STATIC,135,196,242,9,SS_CENTERIMAGE + LTEXT "Polygons will not get filled",IDC_STATIC,135,186,89,9,SS_CENTERIMAGE + LTEXT "TV screen alike lines",IDC_STATIC,135,176,69,9,SS_CENTERIMAGE + LTEXT "Accurate psx color emulation",IDC_STATIC,302,149,97,9,SS_CENTERIMAGE + LTEXT "Correct opaque texture areas",IDC_STATIC,302,127,97,9,SS_CENTERIMAGE + LTEXT "Needed by a few games",IDC_STATIC,302,138,97,9,SS_CENTERIMAGE + RTEXT "Scanline brightness (0...255, -1=Monitor dot matrix):",IDC_STATIC,210,176,162,9,SS_CENTERIMAGE + EDITTEXT IDC_CLPEDIT,314,293,6,12,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | NOT WS_VISIBLE + LTEXT "MBytes",IDC_QUALTXT3,340,65,27,9 + LTEXT "The complete screen will get smoothed. Very slow on some cards, lotta vram needed",IDC_STATIC,135,226,269,9,SS_CENTERIMAGE + RTEXT "Framebuffer access:",IDC_STATIC,7,150,68,10,SS_CENTERIMAGE + LTEXT "Disable screensavers and power saving modes. Not available in Win95/WinNT",IDC_STATIC,135,236,269,9,SS_CENTERIMAGE + LTEXT "Speed up with mdecs in 32 bit color depth, but less colorful",IDC_T14_STATIC2,135,206,268,9,SS_CENTERIMAGE + RTEXT "Hi-Res textures:",IDC_QUALTXT4,223,52,50,9 + COMBOBOX IDC_VSYNC,261,24,36,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + RTEXT "V-Sync:",IDC_STATIC,219,26,39,9,SS_CENTERIMAGE + CONTROL "Gte accuracy",IDC_GTEACCURACY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,256,59,10 + LTEXT "Higher GTE precision that can improve vertex positioning (ie less polygon shaking)",IDC_STATIC,135,256,262,9,SS_CENTERIMAGE + CONTROL "Force 4:3 aspect ratio",IDC_ARATIO43,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,25,95,12 +END + +IDD_FIXES DIALOG DISCARDABLE 0, 0, 316, 322 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Special game fixes..." +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "0x00001: Adjust framebuffer access",IDC_FIX1,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,11,30,133,10 + CONTROL "0x00004: Ignore black brightness",IDC_FIX3,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,11,60,140,10 + CONTROL "0x00008: Swap front/back detection",IDC_FIX4,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,11,75,144,10 + CONTROL "0x00010: Disable coord check",IDC_FIX5,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,11,90,139,10 + CONTROL "0x00020: Remove blue glitches",IDC_FIX6,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,11,105,139,10 + CONTROL "0x00040: Mixed software FB access",IDC_FIX7,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,11,120,143,10 + CONTROL "0x00080: Use PC fps calculation",IDC_FIX8,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,11,135,142,10 + CONTROL "0x00100: Use old frame skipping",IDC_FIX9,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,11,150,139,10 + CONTROL "0x00002: Direct framebuffer updates",IDC_FIX2,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,11,45,137,10 + CONTROL "0x00200: G4 polygon cache",IDC_FIX10,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,11,165,141,10 + CONTROL "0x00400: Fake subtractive blending",IDC_FIX11,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,11,180,143,10 + CONTROL "0x00800: Lazy upload detection",IDC_FIX12,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,11,195,144,10 + CONTROL "0x01000: Odd/even bit hack",IDC_FIX13,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,11,210,143,10 + CONTROL "0x02000: Expand screen width",IDC_FIX14,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,11,225,144,10 + DEFPUSHBUTTON "OK",IDOK,83,302,50,14 + PUSHBUTTON "Cancel",IDCANCEL,182,302,50,14 + LTEXT "Activate the following options only if you want to play one of the listed games (or if your game is showing similar glitches)!", + IDC_STATIC,7,4,246,22 + LTEXT "ONLY for FF7 battle cursor/battle swirl",IDC_STATIC,163, + 30,137,9,SS_CENTERIMAGE + LTEXT "Speed up in nasty frame upload situations",IDC_STATIC, + 163,45,137,9,SS_CENTERIMAGE + LTEXT "Fixes black screens in Lunar",IDC_STATIC,162,60,123,9, + SS_CENTERIMAGE + LTEXT "Speed freaks, Killer Loop",IDC_STATIC,162,75,90,9, + SS_CENTERIMAGE + LTEXT "Old coord compatibility mode",IDC_STATIC,162,89,99,9, + SS_CENTERIMAGE + LTEXT "Leg. o. Dragoon, Alpha Multipass needed",IDC_STATIC,162, + 105,136,9,SS_CENTERIMAGE + LTEXT "Faster FB access on some systems/ATI",IDC_STATIC,162, + 120,125,9,SS_CENTERIMAGE + LTEXT "Better fps limitation with some games",IDC_STATIC,162, + 135,117,9,SS_CENTERIMAGE + LTEXT "Skips only every second frame",IDC_STATIC,162,150,130,9, + SS_CENTERIMAGE + LTEXT "ONLY for FF9 battle mode... yellow rect",IDC_STATIC,162, + 165,132,9,SS_CENTERIMAGE + LTEXT "Needed by some (buggy) OpenGL ICDs",IDC_STATIC,162,180, + 132,9,SS_CENTERIMAGE + LTEXT "DW7 fix (not 100% perfect...)",IDC_STATIC,162,195,132,9, + SS_CENTERIMAGE + LTEXT "Needed with epsxe 1.5.2 and older",IDC_STATIC,162,210, + 138,9,SS_CENTERIMAGE + LTEXT "Shows the full area in Capcom 2D fighters",IDC_STATIC, + 162,225,138,9,SS_CENTERIMAGE + CONTROL "0x04000: Use old texture filtering",IDC_FIX15,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,11,240,141,10 + LTEXT "Fixes black areas with some cards",IDC_STATIC,162,240, + 138,9,SS_CENTERIMAGE + CONTROL "0x08000: Special upload detection",IDC_FIX16,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,11,255,146,10 + LTEXT "May show some additional splash screens", + IDC_F14_STATIC3,163,255,137,9,SS_CENTERIMAGE + CONTROL "0x10000: Use low-res fps timer",IDC_FIX17,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,11,270,147,10 + LTEXT "For buggy motherboard chipsets",IDC_F14_STATIC4,163,270, + 137,9,SS_CENTERIMAGE + CONTROL "0x20000: Fake 'gpu busy' states",IDC_FIX18,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,11,285,147,10 + LTEXT "Toggles busy flags after drawing",IDC_F14_STATIC5,163, + 285,137,9,SS_CENTERIMAGE +END + +IDD_KEYS DIALOG DISCARDABLE 0, 0, 186, 162 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION +CAPTION "GPU key configuration" +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Default keys",IDC_DEFAULT,107,6,61,13 + COMBOBOX IDC_KEY1,108,25,61,62,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_KEY2,108,41,61,62,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_KEY3,108,57,61,62,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_KEY4,108,73,61,62,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_KEY5,108,89,61,62,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_KEY6,108,105,61,62,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + DEFPUSHBUTTON "OK",IDOK,19,142,50,14 + PUSHBUTTON "Cancel",IDCANCEL,115,142,50,14 + RTEXT "Show/hide gpu menu:",IDC_STATIC,4,26,100,9, + SS_CENTERIMAGE + RTEXT "Show/hide gpu infos:",IDC_STATIC,4,42,100,9, + SS_CENTERIMAGE + RTEXT "Toggle selected option up:",IDC_STATIC,4,58,100,9, + SS_CENTERIMAGE + RTEXT "Toggle selected option down:",IDC_STATIC,4,74,100,9, + SS_CENTERIMAGE + RTEXT "Select previous option:",IDC_STATIC,4,90,100,9, + SS_CENTERIMAGE + RTEXT "Select next option:",IDC_STATIC,4,106,100,9, + SS_CENTERIMAGE +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_DIALOG_ABOUT, DIALOG + BEGIN + LEFTMARGIN, 2 + RIGHTMARGIN, 253 + TOPMARGIN, 3 + BOTTOMMARGIN, 159 + END + + IDD_CFGDLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 406 + TOPMARGIN, 7 + BOTTOMMARGIN, 288 + END + + IDD_FIXES, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 309 + TOPMARGIN, 7 + BOTTOMMARGIN, 315 + END + + IDD_KEYS, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + TOPMARGIN, 7 + BOTTOMMARGIN, 155 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog Info +// +#ifdef _MSC_VER + +IDD_CFGDLG DLGINIT +BEGIN + IDC_RESOLUTION, 0x403, 1, 0 +"\000" + IDC_COLORDEPTH, 0x403, 7, 0 +0x3631, 0x4220, 0x7469, "\000" + IDC_COLORDEPTH, 0x403, 7, 0 +0x3233, 0x4220, 0x7469, "\000" + IDC_TEXQUALITY, 0x403, 11, 0 +0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000" + IDC_TEXQUALITY, 0x403, 12, 0 +0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034, + IDC_TEXQUALITY, 0x403, 12, 0 +0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031, + IDC_TEXQUALITY, 0x403, 12, 0 +0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038, + IDC_FILTERTYPE, 0x403, 9, 0 +0x7453, 0x6e61, 0x6164, 0x6472, "\000" + IDC_FILTERTYPE, 0x403, 9, 0 +0x7845, 0x6574, 0x646e, 0x6465, "\000" + IDC_FILTERTYPE, 0x403, 22, 0 +0x7453, 0x6e61, 0x6164, 0x6472, 0x2820, 0x6f6e, 0x5320, 0x7270, 0x7469, +0x7365, 0x0029, + IDC_FILTERTYPE, 0x403, 22, 0 +0x7845, 0x6574, 0x646e, 0x6465, 0x2820, 0x6f6e, 0x5320, 0x7270, 0x7469, +0x7365, 0x0029, + IDC_HIRESTEX, 0x403, 11, 0 +0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000" + IDC_HIRESTEX, 0x403, 12, 0 +0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034, + IDC_HIRESTEX, 0x403, 12, 0 +0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031, + IDC_HIRESTEX, 0x403, 12, 0 +0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038, + IDC_OFFSCREEN, 0x403, 11, 0 +0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000" + IDC_OFFSCREEN, 0x403, 12, 0 +0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034, + IDC_OFFSCREEN, 0x403, 12, 0 +0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031, + IDC_OFFSCREEN, 0x403, 12, 0 +0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038, + IDC_FRAMETEX, 0x403, 11, 0 +0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000" + IDC_FRAMETEX, 0x403, 12, 0 +0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034, + IDC_FRAMETEX, 0x403, 12, 0 +0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031, + IDC_FRAMETEX, 0x403, 12, 0 +0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038, + IDC_FRAMEREAD, 0x403, 11, 0 +0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000" + IDC_FRAMEREAD, 0x403, 12, 0 +0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034, + IDC_FRAMEREAD, 0x403, 12, 0 +0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031, + IDC_FRAMEREAD, 0x403, 12, 0 +0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038, + 0 +END + +#endif + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_INFO0 "FL - Frame limitation:\n[Off] - Speed as fast as possible\n[On-1] - Limits speed to manual value\n[On-2] - Limits speed to auto-detected value." + IDS_INFO1 "FS - Frame skipping:\n[Off] - No frames get skipped\n[On] - Tries to speed up the game by skipping frames. Can cause glitches!" + IDS_INFO2 "OD - Offscreen drawing:\n[0-4] - The higher the mode, the more checks for uploading screen data/software drawing will be done. Setting depends on the game." + IDS_INFO3 "FI - Texture filtering:\n[0-6] - Filtering will cause glitches! Mode 2/4/6: black borders vanish. Mode 3/4 will not filter sprites. Mode 5/6 will smooth sprites." + IDS_INFO4 "DI - Dithering:\n[Off] - No dithering\n[On] - Smoother shading in 16 bit modes." + IDS_INFO5 "AM - Alpha multipass:\n[Off] - Faster with some games, but opaque texture areas can get transparent.\n[On] - Accurate psx emulation." + IDS_INFO6 "AB - Advanced blending:\n[0-1] - For accurate psx coloring use mode 1. If your gfx card can't do it in hardware, a software mode will be done automatically (slower)." + IDS_INFO7 "FA - Framebuffer access:\n[0-4] - Some games read back the framebuffer to create special effects. This can be very slow! In mode 4 everything is done in software." + IDS_INFO8 "FT - Frame buffer texture:\n[0-3] - Mode 2 is trying to do some effects (whirls, motion blur) in hardware (can be slow). Mode 1 is turning the effects off (fastest emulation)." + IDS_INFO9 "GF - Special game fixes:\n[Off] - Turn off all fixes\n[On] - Turn on all activated fixes. You have to select the fixes you want to use in the gpu config." +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#define _AFX_NO_SPLITTER_RESOURCES +#define _AFX_NO_OLE_RESOURCES +#define _AFX_NO_TRACKER_RESOURCES +#define _AFX_NO_PROPERTY_RESOURCES + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcxproj pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcxproj --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcxproj 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,251 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {726BDE88-F2AD-4666-A4BC-5858F973976E} + gpuPeopsOpenGL + + + + DynamicLibrary + false + + + DynamicLibrary + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + .\Debug\ + .\Debug\ + false + .\Release\ + .\Release\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/gpuPeopsOpenGL.tlb + + + + + Disabled + .\;.\winsrc;..\..\glue;..\..\..\plugins\peopsxgl;..\..\..\libpcsxcore;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + .\Debug/gpuPeopsOpenGL.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0407 + + + opengl32.lib;winmm.lib;%(AdditionalDependencies) + $(SolutionDir)$(Configuration)\gpuPeopsOpenGL.dll + true + .\gpuPeopsOpenGL.def + true + .\Debug/gpuPeopsOpenGL.pdb + Windows + false + + + .\Debug/gpuPeopsOpenGL.lib + MachineX86 + + + true + .\Debug/gpuPeopsOpenGL.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/gpuPeopsOpenGL.tlb + + + + + MaxSpeed + OnlyExplicitInline + .\;.\winsrc;..\..\glue;..\..\..\plugins\peopsxgl;..\..\..\libpcsxcore;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + .\Release/gpuPeopsOpenGL.pch + .\Release/ + .\Release/ + .\Release/ + true + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0407 + + + opengl32.lib;winmm.lib;%(AdditionalDependencies) + .\Release/gpuPeopsOpenGL.dll + true + .\gpuPeopsOpenGL.def + .\Release/gpuPeopsOpenGL.pdb + Windows + false + + + .\Release/gpuPeopsOpenGL.lib + MachineX86 + + + true + .\Release/gpuPeopsOpenGL.bsc + + + rem copy release\*.dll d:\emus\epsxe\plugins + + + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcxproj.filters pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcxproj.filters --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcxproj.filters 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,101 @@ + + + + + {f5923236-a28e-4398-a152-67b79b0782e8} + + + {2edeb7e0-6467-4735-89eb-253dcc226912} + + + + + winsrc + + + winsrc + + + winsrc + + + winsrc + + + winsrc + + + peopsxgl + + + peopsxgl + + + peopsxgl + + + peopsxgl + + + peopsxgl + + + peopsxgl + + + peopsxgl + + + + + winsrc + + + peopsxgl + + + peopsxgl + + + peopsxgl + + + peopsxgl + + + peopsxgl + + + peopsxgl + + + peopsxgl + + + peopsxgl + + + peopsxgl + + + peopsxgl + + + peopsxgl + + + peopsxgl + + + peopsxgl + + + + + + + + + + + \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcxproj.user pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcxproj.user --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcxproj.user 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcxproj.user 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,3 @@ + + + \ No newline at end of file Binary files /tmp/tmpKtzBRK/0Y09gS7wd9/pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/res/gpu.bmp and /tmp/tmpKtzBRK/QNZDtkU5Bn/pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/res/gpu.bmp differ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/resource.h pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/resource.h --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/resource.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/resource.h 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,135 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by gpuPeopsOpenGL.rc +// +#define IDS_INFO0 1 +#define IDS_INFO1 2 +#define IDS_INFO2 3 +#define IDC_DEFAULT 3 +#define IDS_INFO3 4 +#define IDS_INFO4 5 +#define IDS_INFO5 6 +#define IDS_INFO6 7 +#define IDS_INFO7 8 +#define IDS_INFO8 9 +#define IDS_INFO9 10 +#define IDC_DEF1 127 +#define IDC_DEF2 128 +#define IDD_DIALOG_ABOUT 129 +#define IDD_CFGDLG 130 +#define IDD_FIXES 134 +#define IDB_GPU 135 +#define IDD_KEYS 138 +#define IDC_TEXWINDOWS 1001 +#define IDC_TEXFIX 1002 +#define IDC_TEXLINEAR 1003 +#define IDC_RESOLUTION 1004 +#define IDC_DRAWDITHER 1005 +#define IDC_CACHESIZE 1006 +#define IDC_BLUR 1007 +#define IDC_CACHETXT 1008 +#define IDC_SSAVE 1009 +#define IDC_USELINES 1010 +#define IDC_COLORDEPTH 1011 +#define IDC_CHANGEDESK 1012 +#define IDC_VSYNC 1012 +#define IDC_USELIMIT 1013 +#define IDC_FRAMELIMIT 1014 +#define IDC_FRAMEAUTO 1015 +#define IDC_FRAMEMANUELL 1016 +#define IDC_ADVBLEND 1017 +#define IDC_OFFSCREEN 1018 +#define IDC_OPAQUE 1019 +#define IDC_TEXQUALITY 1020 +#define IDC_USESKIP 1021 +#define IDC_DISPMODE1 1022 +#define IDC_DISPMODE2 1023 +#define IDC_SUBCACHE 1024 +#define IDC_VRAMSIZE 1025 +#define IDC_WINDOWFREE 1026 +#define IDC_EXTCOLCHECK 1027 +#define IDC_FRAMETEX 1028 +#define IDC_WINDOWAUTO 1029 +#define IDC_USETEXPRIO 1030 +#define IDC_SHOWFPS 1031 +#define IDC_WINX 1032 +#define IDC_WINY 1033 +#define IDC_FILTERTYPE 1034 +#define IDC_USEANTIALIAS 1035 +#define IDC_SCANBLEND 1036 +#define IDC_3DGLASSES 1037 +#define IDC_USESCANLINES 1038 +#define IDC_KEY1 1039 +#define IDC_KEY2 1040 +#define IDC_KEY3 1041 +#define IDC_KEY4 1042 +#define IDC_KEY5 1043 +#define IDC_KEY6 1044 +#define IDC_USEMASK 1045 +#define IDC_FASTMDEC 1046 +#define IDC_FULLVRAM 1047 +#define IDC_FRAMEREAD 1048 +#define IDC_ARATIO 1049 +#define IDC_CLIPBOARD 1050 +#define IDC_CLPEDIT 1051 +#define IDC_QUALTXT 1052 +#define IDC_QUALTXT2 1053 +#define IDC_QUALTXT3 1054 +#define IDC_GARBAGE 1055 +#define IDC_PALTEXWND 1056 +#define IDC_HIRESTEX 1057 +#define IDC_GAMEFIX 1058 +#define IDC_SELFIX 1059 +#define IDC_KEYCONFIG 1060 +#define IDC_T14_STATIC2 1061 +#define IDC_FASTMDEC2 1062 +#define IDC_QUALTXT4 1063 +#define IDC_GAMEFIX2 1064 +#define IDC_GTEACCURACY 1065 +#define IDC_F14_STATIC3 1083 +#define IDC_F14_STATIC4 1084 +#define IDC_F14_STATIC5 1085 +#define IDC_ARATIO43 1086 +#define IDC_FIX1 2038 +#define IDC_FIX2 2039 +#define IDC_FIX3 2040 +#define IDC_FIX4 2041 +#define IDC_FIX5 2042 +#define IDC_FIX6 2043 +#define IDC_FIX7 2044 +#define IDC_FIX8 2045 +#define IDC_FIX9 2046 +#define IDC_FIX10 2047 +#define IDC_FIX11 2048 +#define IDC_FIX12 2049 +#define IDC_FIX13 2050 +#define IDC_FIX14 2051 +#define IDC_FIX15 2052 +#define IDC_FIX16 2053 +#define IDC_FIX17 2054 +#define IDC_FIX18 2055 +#define IDC_FIX19 2056 +#define IDC_FIX20 2057 +#define IDC_FIX21 2058 +#define IDC_FIX22 2059 +#define IDC_FIX23 2060 +#define IDC_FIX24 2061 +#define IDC_FIX25 2062 +#define IDC_FIX26 2063 +#define IDC_FIX27 2064 +#define IDC_FIX28 2065 +#define IDC_FIX29 2066 +#define IDC_FIX30 2067 +#define IDC_FIX31 2068 +#define IDC_FIX32 2069 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 140 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 2070 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/winsrc/cfg.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/winsrc/cfg.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/winsrc/cfg.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/winsrc/cfg.c 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,1051 @@ +/*************************************************************************** + cfg.c - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define _IN_CFG + +///////////////////////////////////////////////////////////////////////////// +// Windows config handling + +#include "stdafx.h" +#include "resource.h" +#include "externals.h" +#include "cfg.h" +#include + +char szKeyDefaults[7]={VK_DELETE,VK_INSERT,VK_HOME,VK_END,VK_PRIOR,VK_NEXT,0x00}; + +///////////////////////////////////////////////////////////////////////////// +// CCfgDlg dialog + +BOOL OnInitCfgDialog(HWND hW); +void OnCfgOK(HWND hW); +void OnCfgCancel(HWND hW); +void OnCfgDef1(HWND hW); +void OnCfgDef2(HWND hW); +void OnBugFixes(HWND hW); +void OnKeyConfig(HWND hW); +void GetSettings(HWND hW); +void OnClipboard(HWND hW); +char * GetConfigInfos(HWND hWE); + +BOOL CALLBACK CfgDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch(uMsg) + { + case WM_INITDIALOG: + return OnInitCfgDialog(hW); + + case WM_COMMAND: + { + switch(LOWORD(wParam)) + { + case IDC_DEF1: OnCfgDef1(hW); return TRUE; + case IDC_DEF2: OnCfgDef2(hW); return TRUE; + case IDC_SELFIX: OnBugFixes(hW); return TRUE; + case IDC_KEYCONFIG: OnKeyConfig(hW); return TRUE; + case IDCANCEL: OnCfgCancel(hW); return TRUE; + case IDOK: OnCfgOK(hW); return TRUE; + case IDC_CLIPBOARD: OnClipboard(hW); return TRUE; + } + } + } + return FALSE; +} + +///////////////////////////////////////////////////////////////////////////// +// CCfgDlg message handlers + +//////////////////////////////////////////////////////////////////////// +// init dlg +//////////////////////////////////////////////////////////////////////// + +void ComboBoxAddRes(HWND hWC,char * cs) // ADD COMBOBOX RESOURCES +{ + int i=ComboBox_FindString(hWC,-1,cs); + if(i!=CB_ERR) return; + ComboBox_AddString(hWC,cs); +} + + +BOOL OnInitCfgDialog(HWND hW) // INIT CONFIG DIALOG +{ + HWND hWC;char cs[256];int i;DEVMODE dv; + + ReadConfig(); // read registry stuff + + //----------------------------------------------------// fill combo with available resolutions + + hWC=GetDlgItem(hW,IDC_RESOLUTION); + + memset(&dv,0,sizeof(DEVMODE)); + dv.dmSize=sizeof(DEVMODE); + i=0; + + while(EnumDisplaySettings(NULL,i,&dv)) // add all resolutions from the driver + { + wsprintf(cs,"%4d x %4d",dv.dmPelsWidth,dv.dmPelsHeight); + ComboBoxAddRes(hWC,cs); + i++; + } + + ComboBoxAddRes(hWC," 640 x 480"); // and also add some common ones + ComboBoxAddRes(hWC," 800 x 600"); + ComboBoxAddRes(hWC,"1024 x 768"); + ComboBoxAddRes(hWC,"1152 x 864"); + ComboBoxAddRes(hWC,"1280 x 1024"); + ComboBoxAddRes(hWC,"1600 x 1200"); + + wsprintf(cs,"%4d x %4d",iResX,iResY); // search curr resolution in combo + i=ComboBox_FindString(hWC,-1,cs); + if(i==CB_ERR) i=0; + ComboBox_SetCurSel(hWC,i); // and select this one + + //----------------------------------------------------// window size + + SetDlgItemInt(hW,IDC_WINX,LOWORD(iWinSize),FALSE); + SetDlgItemInt(hW,IDC_WINY,HIWORD(iWinSize),FALSE); + + //----------------------------------------------------// color depth + + hWC=GetDlgItem(hW,IDC_COLORDEPTH); + ComboBox_AddString(hWC,"16 Bit"); + ComboBox_AddString(hWC,"32 Bit"); + wsprintf(cs,"%d Bit",iColDepth); + i=ComboBox_FindString(hWC,-1,cs); + if(i==CB_ERR) i=0; + ComboBox_SetCurSel(hWC,i); + + //----------------------------------------------------// vsync + + hWC=GetDlgItem(hW,IDC_VSYNC); + ComboBox_AddString(hWC,"Driver"); + ComboBox_AddString(hWC,"Off"); + ComboBox_AddString(hWC,"On"); + ComboBox_SetCurSel(hWC,iForceVSync+1); + + //----------------------------------------------------// vram size + + hWC=GetDlgItem(hW,IDC_VRAMSIZE); + ComboBox_AddString(hWC,"0 (Autodetect)"); + ComboBox_AddString(hWC,"2"); + ComboBox_AddString(hWC,"4"); + ComboBox_AddString(hWC,"8"); + ComboBox_AddString(hWC,"16"); + ComboBox_AddString(hWC,"32"); + ComboBox_AddString(hWC,"64"); + ComboBox_AddString(hWC,"128 (or more)"); + + if(!iVRamSize) ComboBox_SetCurSel(hWC,0); + else {wsprintf(cs,"%d",iVRamSize);ComboBox_SetText(hWC,cs);} + + //----------------------------------------------------// texture quality + + hWC=GetDlgItem(hW,IDC_TEXQUALITY); + ComboBox_AddString(hWC,"don't care - Use driver's default textures"); + ComboBox_AddString(hWC,"R4 G4 B4 A4 - Fast, but less colorful"); + ComboBox_AddString(hWC,"R5 G5 B5 A1 - Nice colors, bad transparency"); + ComboBox_AddString(hWC,"R8 G8 B8 A8 - Best colors, more ram needed"); + ComboBox_AddString(hWC,"B8 G8 R8 A8 - Slightly faster with some cards"); + ComboBox_SetCurSel(hWC,iTexQuality); + + //----------------------------------------------------// all kind of on/off options + + if(bDrawDither) CheckDlgButton(hW,IDC_DRAWDITHER,TRUE); + if(bUseLines) CheckDlgButton(hW,IDC_USELINES,TRUE); + if(bUseFrameLimit) CheckDlgButton(hW,IDC_USELIMIT,TRUE); + if(bUseFrameSkip) CheckDlgButton(hW,IDC_USESKIP,TRUE); + if(bAdvancedBlend) CheckDlgButton(hW,IDC_ADVBLEND,TRUE); + if(bOpaquePass) CheckDlgButton(hW,IDC_OPAQUE,TRUE); +// if(bUseAntiAlias) CheckDlgButton(hW,IDC_USEANTIALIAS,TRUE); + if(bWindowMode) CheckDlgButton(hW,IDC_DISPMODE2,TRUE); + else CheckDlgButton(hW,IDC_DISPMODE1,TRUE); + if(iUseMask) CheckDlgButton(hW,IDC_USEMASK,TRUE); + if(bUseFastMdec) CheckDlgButton(hW,IDC_FASTMDEC,TRUE); + if(bUse15bitMdec) CheckDlgButton(hW,IDC_FASTMDEC2,TRUE); + if(bUseFixes) CheckDlgButton(hW,IDC_GAMEFIX,TRUE); + if(bGteAccuracy) CheckDlgButton(hW,IDC_GTEACCURACY,TRUE); + if(iUseScanLines) CheckDlgButton(hW,IDC_USESCANLINES,TRUE); + if(iShowFPS) CheckDlgButton(hW,IDC_SHOWFPS,TRUE); + if(bKeepRatio) CheckDlgButton(hW,IDC_ARATIO,TRUE); + if(bForceRatio43) CheckDlgButton(hW,IDC_ARATIO43,TRUE); + if(iBlurBuffer) CheckDlgButton(hW,IDC_BLUR,TRUE); + if(iNoScreenSaver) CheckDlgButton(hW,IDC_SSAVE,TRUE); + + //----------------------------------------------------// texture filter + + hWC=GetDlgItem(hW,IDC_FILTERTYPE); + ComboBox_AddString(hWC,"0: None"); + ComboBox_AddString(hWC,"1: Standard - Glitches will happen"); + ComboBox_AddString(hWC,"2: Extended - Removes black borders"); + ComboBox_AddString(hWC,"3: Standard w/o Sprites - unfiltered 2D"); + ComboBox_AddString(hWC,"4: Extended w/o Sprites - unfiltered 2D"); + ComboBox_AddString(hWC,"5: Standard + smoothed Sprites"); + ComboBox_AddString(hWC,"6: Extended + smoothed Sprites"); + ComboBox_SetCurSel(hWC,iFilterType); + + //----------------------------------------------------// hires texture mode + + hWC=GetDlgItem(hW,IDC_HIRESTEX); + ComboBox_AddString(hWC,"0: None (standard)"); + ComboBox_AddString(hWC,"1: 2xSaI (much vram needed)"); + ComboBox_AddString(hWC,"2: Stretched (filtering needed)"); + ComboBox_SetCurSel(hWC,iHiResTextures); + + //----------------------------------------------------// offscreen drawing + + hWC=GetDlgItem(hW,IDC_OFFSCREEN); + ComboBox_AddString(hWC,"0: None - Fastest, most glitches"); + ComboBox_AddString(hWC,"1: Minimum - Missing screens"); + ComboBox_AddString(hWC,"2: Standard - OK for most games"); + ComboBox_AddString(hWC,"3: Enhanced - Shows more stuff"); + ComboBox_AddString(hWC,"4: Extended - Can cause garbage"); + ComboBox_SetCurSel(hWC,iOffscreenDrawing); + + //----------------------------------------------------// texture quality + + hWC=GetDlgItem(hW,IDC_FRAMETEX); + ComboBox_AddString(hWC,"0: Emulated vram - effects need FVP"); + ComboBox_AddString(hWC,"1: Black - Fast but no special effects"); + ComboBox_AddString(hWC,"2: Gfx card buffer - Can be slow"); + ComboBox_AddString(hWC,"3: Gfx card buffer & software - slow"); + ComboBox_SetCurSel(hWC,iFrameTexType); + + //----------------------------------------------------// framebuffer read mode + + hWC=GetDlgItem(hW,IDC_FRAMEREAD); + ComboBox_AddString(hWC,"0: Emulated vram - OK for most games"); + ComboBox_AddString(hWC,"1: Gfx card buffer reads"); + ComboBox_AddString(hWC,"2: Gfx card buffer moves"); + ComboBox_AddString(hWC,"3: Gfx card buffer reads & moves"); + ComboBox_AddString(hWC,"4: Full software drawing (FVP)"); + ComboBox_SetCurSel(hWC,iFrameReadType); + + //----------------------------------------------------// framerate stuff + + if(iFrameLimit==2) + CheckDlgButton(hW,IDC_FRAMEAUTO,TRUE); + else CheckDlgButton(hW,IDC_FRAMEMANUELL,TRUE); + + sprintf(cs,"%.2f",fFrameRate); + SetDlgItemText(hW,IDC_FRAMELIMIT,cs); + SetDlgItemInt(hW,IDC_SCANBLEND,iScanBlend,TRUE); + + return TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// on ok: take vals +//////////////////////////////////////////////////////////////////////// + +void GetSettings(HWND hW) +{ + HWND hWC;char cs[256];int i,j;char * p; + + hWC=GetDlgItem(hW,IDC_VRAMSIZE); // get vram size + ComboBox_GetText(hWC,cs,255); + iVRamSize=atoi(cs); + if(iVRamSize<0) iVRamSize=0; + if(iVRamSize>1024) iVRamSize=1024; + + hWC=GetDlgItem(hW,IDC_RESOLUTION); // get resolution + i=ComboBox_GetCurSel(hWC); + ComboBox_GetLBText(hWC,i,cs); + iResX=atol(cs); + p=strchr(cs,'x'); + if(p) iResY=atol(p+1); + else iResY=480; + + hWC=GetDlgItem(hW,IDC_COLORDEPTH); // get color depth + i=ComboBox_GetCurSel(hWC); + ComboBox_GetLBText(hWC,i,cs); + iColDepth=atol(cs); + + hWC=GetDlgItem(hW,IDC_VSYNC); // get vsync + iForceVSync=ComboBox_GetCurSel(hWC)-1; + + i=GetDlgItemInt(hW,IDC_WINX,NULL,FALSE); // get win size + if(i<100) i=100; if(i>16384) i=16384; + j=GetDlgItemInt(hW,IDC_WINY,NULL,FALSE); + if(j<100) j=100; if(j>16384) j=16384; + iWinSize=MAKELONG(i,j); + + hWC=GetDlgItem(hW,IDC_TEXQUALITY); // texture quality + iTexQuality=ComboBox_GetCurSel(hWC); + + hWC=GetDlgItem(hW,IDC_FILTERTYPE); // all kind of options + iFilterType=ComboBox_GetCurSel(hWC); + + if(IsDlgButtonChecked(hW,IDC_DRAWDITHER)) + bDrawDither=TRUE; else bDrawDither=FALSE; + + if(IsDlgButtonChecked(hW,IDC_USELINES)) + bUseLines=TRUE; else bUseLines=FALSE; + + if(IsDlgButtonChecked(hW,IDC_DISPMODE2)) + bWindowMode=TRUE; else bWindowMode=FALSE; + + if(IsDlgButtonChecked(hW,IDC_ADVBLEND)) + bAdvancedBlend=TRUE; else bAdvancedBlend=FALSE; + + iOffscreenDrawing=ComboBox_GetCurSel(GetDlgItem(hW,IDC_OFFSCREEN)); + + iFrameTexType=ComboBox_GetCurSel(GetDlgItem(hW,IDC_FRAMETEX)); + iFrameReadType=ComboBox_GetCurSel(GetDlgItem(hW,IDC_FRAMEREAD)); + + if(IsDlgButtonChecked(hW,IDC_USELIMIT)) + bUseFrameLimit=TRUE; else bUseFrameLimit=FALSE; + + if(IsDlgButtonChecked(hW,IDC_USESKIP)) + bUseFrameSkip=TRUE; else bUseFrameSkip=FALSE; + + if(IsDlgButtonChecked(hW,IDC_OPAQUE)) + bOpaquePass=TRUE; else bOpaquePass=FALSE; + +// if(IsDlgButtonChecked(hW,IDC_USEANTIALIAS)) +// bUseAntiAlias=TRUE; else bUseAntiAlias=FALSE; + + if(IsDlgButtonChecked(hW,IDC_FASTMDEC)) + bUseFastMdec=TRUE; else bUseFastMdec=FALSE; + + if(IsDlgButtonChecked(hW,IDC_FASTMDEC2)) + bUse15bitMdec=TRUE; else bUse15bitMdec=FALSE; + + if(IsDlgButtonChecked(hW,IDC_GAMEFIX)) + bUseFixes=TRUE; else bUseFixes=FALSE; + + if(IsDlgButtonChecked(hW,IDC_GTEACCURACY)) + bGteAccuracy=TRUE; else bGteAccuracy=FALSE; + + if(IsDlgButtonChecked(hW,IDC_USESCANLINES)) + iUseScanLines=1; else iUseScanLines=0; + + if(IsDlgButtonChecked(hW,IDC_SHOWFPS)) + iShowFPS=1; else iShowFPS=0; + + if(IsDlgButtonChecked(hW,IDC_ARATIO)) + bKeepRatio=TRUE; else bKeepRatio=FALSE; + + if(IsDlgButtonChecked(hW,IDC_ARATIO43)) + bForceRatio43=TRUE; else bForceRatio43=FALSE; + + if(IsDlgButtonChecked(hW,IDC_BLUR)) + iBlurBuffer=1; else iBlurBuffer=0; + + if(IsDlgButtonChecked(hW,IDC_SSAVE)) + iNoScreenSaver=1; else iNoScreenSaver=0; + + hWC=GetDlgItem(hW,IDC_HIRESTEX); + iHiResTextures=ComboBox_GetCurSel(hWC); + + if(IsDlgButtonChecked(hW,IDC_USEMASK)) + {iUseMask=1;iZBufferDepth=16;} + else {iUseMask=0;iZBufferDepth=0; } + + iScanBlend=GetDlgItemInt(hW,IDC_SCANBLEND,NULL,TRUE); + if(iScanBlend>255) iScanBlend=0; + if(iScanBlend<-1) iScanBlend=-1; + + if(IsDlgButtonChecked(hW,IDC_FRAMEAUTO)) // frame rate settings + iFrameLimit=2; + else iFrameLimit=1; + + GetDlgItemText(hW,IDC_FRAMELIMIT,cs,255); + fFrameRate=(float)atof(cs); + if(fFrameRate<10.0f) fFrameRate=10.0f; + if(fFrameRate>1000.0f) fFrameRate=1000.0f; +} + +//////////////////////////////////////////////////////////////////////// +// OK button +//////////////////////////////////////////////////////////////////////// + +void OnCfgOK(HWND hW) +{ + GetSettings(hW); // get dialog settings + + WriteConfig(); // write registry + + EndDialog(hW,TRUE); // close dialog +} + +//////////////////////////////////////////////////////////////////////// +// Clipboard button +//////////////////////////////////////////////////////////////////////// + +void OnClipboard(HWND hW) +{ + HWND hWE=GetDlgItem(hW,IDC_CLPEDIT); + char * pB; + + GetSettings(hW); // get dialog setings + pB=GetConfigInfos(hWE); // get text infos + + if(pB) // some text got? + { + SetDlgItemText(hW,IDC_CLPEDIT,pB); // -> set text in invisible edit + SendMessage(hWE,EM_SETSEL,0,-1); // -> sel all in edit + SendMessage(hWE,WM_COPY,0,0); // -> copy sel to clipboard + free(pB); // -> free helper text buffer + + MessageBox(hW,"Configuration info successfully copied to the clipboard\nJust use the PASTE function in another program to retrieve the data!","Copy Info",MB_ICONINFORMATION|MB_OK); + } +} + +//////////////////////////////////////////////////////////////////////// +// Cancel button (just closes window) +//////////////////////////////////////////////////////////////////////// + +void OnCfgCancel(HWND hW) +{ + EndDialog(hW,FALSE); +} + +//////////////////////////////////////////////////////////////////////// +// Bug fixes +//////////////////////////////////////////////////////////////////////// + +BOOL CALLBACK BugFixesDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch(uMsg) + { + case WM_INITDIALOG: // init dialog: + { + int i; + + for(i=0;i<32;i++) // -> loop all 32 checkboxes + { + if(dwCfgFixes&(1< if fix is active: check box + CheckDlgButton(hW,IDC_FIX1+i,TRUE); + } + } + + case WM_COMMAND: + { + switch(LOWORD(wParam)) + { + case IDCANCEL: EndDialog(hW,FALSE);return TRUE; // cancel: close window + + case IDOK: // ok: take settings and close + { + int i; + dwCfgFixes=0; + for(i=0;i<32;i++) + { + if(IsDlgButtonChecked(hW,IDC_FIX1+i)) + dwCfgFixes|=(1< set defaults + for(i=IDC_KEY1;i<=IDC_KEY6;i++) + SetGPUKey(GetDlgItem(hW,i),szKeyDefaults[i-IDC_KEY1]); + }break; + + case IDCANCEL: // cancel: just close window + EndDialog(hW,FALSE); return TRUE; + + case IDOK: // ok: take key bindings + { + HWND hWC;int i; + for(i=IDC_KEY1;i<=IDC_KEY6;i++) + { + hWC=GetDlgItem(hW,i); + szGPUKeys[i-IDC_KEY1]=ComboBox_GetItemData(hWC,ComboBox_GetCurSel(hWC)); + if(szGPUKeys[i-IDC_KEY1]<0x20) szGPUKeys[i-IDC_KEY1]=0x20; + } + EndDialog(hW,TRUE); + return TRUE; + } + } + } + } + return FALSE; +} + +void OnKeyConfig(HWND hW) // call key dialog +{ + DialogBox(hInst,MAKEINTRESOURCE(IDD_KEYS), + hW,(DLGPROC)KeyDlgProc); +} + +///////////////////////////////////////////////////////////////////////////// +// AboutDlg dialog (Windows) + +BOOL CALLBACK AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch(uMsg) + { + case WM_COMMAND: + { + switch(LOWORD(wParam)) + { + case IDOK: EndDialog(hW,TRUE);return TRUE; + } + } + } + return FALSE; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/winsrc/fps.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/winsrc/fps.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/winsrc/fps.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/winsrc/fps.c 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,641 @@ +/*************************************************************************** + fps.c - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +//*************************************************************************// +// History of changes: +// +// 2009/03/08 - Pete +// - generic cleanup for the Peops release +// +//*************************************************************************// + +#include "stdafx.h" + +#define _IN_FPS + +#include "externals.h" + +//////////////////////////////////////////////////////////////////////// +// FPS stuff +//////////////////////////////////////////////////////////////////////// + +BOOL bIsPerformanceCounter=FALSE; +float fFrameRateHz=0; +DWORD dwFrameRateTicks=16; +float fFrameRate; +int iFrameLimit; +BOOL bUseFrameLimit=FALSE; +BOOL bUseFrameSkip=0; +DWORD dwLaceCnt=0; + +LARGE_INTEGER liCPUFrequency; + +//////////////////////////////////////////////////////////////////////// +// FPS skipping / limit +//////////////////////////////////////////////////////////////////////// + +BOOL bInitCap = TRUE; +float fps_skip = 0; +float fps_cur = 0; + +void FrameCap (void) +{ + static DWORD curticks, lastticks, _ticks_since_last_update; + static DWORD TicksToWait = 0; + static LARGE_INTEGER CurrentTime; + static LARGE_INTEGER LastTime; + static BOOL SkipNextWait = FALSE; + BOOL Waiting = TRUE; + + //--------------------------------------------------------- + // init some static vars... + // bInitCap is TRUE on startup and everytime the user + // is toggling the frame limit + //--------------------------------------------------------- + + if(bInitCap) + { + bInitCap=FALSE; + if (bIsPerformanceCounter) + QueryPerformanceCounter(&LastTime); + lastticks = timeGetTime(); + TicksToWait=0; + return; + } + + //--------------------------------------------------------- + + if(bIsPerformanceCounter) + { + QueryPerformanceCounter(&CurrentTime); + _ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart; + + //--------------------------------------------------------- + // check if diff > 1/2 sec, if yes: take mm timer value + //--------------------------------------------------------- + + curticks = timeGetTime(); + if(_ticks_since_last_update>(liCPUFrequency.LowPart>>1)) + { + if(curticks < lastticks) + _ticks_since_last_update = dwFrameRateTicks+TicksToWait+1; + else _ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000; + } + + //--------------------------------------------------------- + + if ((_ticks_since_last_update > TicksToWait) || + (CurrentTime.LowPart < LastTime.LowPart)) + { + LastTime.HighPart = CurrentTime.HighPart; + LastTime.LowPart = CurrentTime.LowPart; + + lastticks=curticks; + + if((_ticks_since_last_update-TicksToWait) > dwFrameRateTicks) + TicksToWait=0; + else TicksToWait=dwFrameRateTicks-(_ticks_since_last_update-TicksToWait); + } + else + { + while (Waiting) + { + QueryPerformanceCounter(&CurrentTime); + _ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart; + + //--------------------------------------------------------- + // check if diff > 1/2 sec, if yes: take mm timer value + //--------------------------------------------------------- + curticks = timeGetTime(); + if(_ticks_since_last_update>(liCPUFrequency.LowPart>>1)) + { + if(curticks < lastticks) + _ticks_since_last_update = TicksToWait+1; + else _ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000; + } + //--------------------------------------------------------- + + if ((_ticks_since_last_update > TicksToWait) || + (CurrentTime.LowPart < LastTime.LowPart)) + { + Waiting = FALSE; + + lastticks=curticks; + + LastTime.HighPart = CurrentTime.HighPart; + LastTime.LowPart = CurrentTime.LowPart; + TicksToWait = dwFrameRateTicks; + } + } + } + } + else + { + curticks = timeGetTime(); + _ticks_since_last_update = curticks - lastticks; + + if ((_ticks_since_last_update > TicksToWait) || + (curticks < lastticks)) + { + lastticks = curticks; + + if((_ticks_since_last_update-TicksToWait) > dwFrameRateTicks) + TicksToWait=0; + else TicksToWait=dwFrameRateTicks-(_ticks_since_last_update-TicksToWait); + } + else + { + while (Waiting) + { + curticks = timeGetTime(); + _ticks_since_last_update = curticks - lastticks; + if ((_ticks_since_last_update > TicksToWait) || + (curticks < lastticks)) + { + Waiting = FALSE; + lastticks = curticks; + TicksToWait = dwFrameRateTicks; + } + } + } + } +} + +//////////////////////////////////////////////////////////////////////// + +#define MAXSKIP 120 +#define MAXLACE 16 + +void FrameSkip(void) +{ + static int iNumSkips=0,iAdditionalSkip=0; // number of additional frames to skip + static DWORD dwLastLace=0; // helper var for frame limitation + static DWORD curticks, lastticks, _ticks_since_last_update; + static LARGE_INTEGER CurrentTime; + static LARGE_INTEGER LastTime; + + if(!dwLaceCnt) return; // important: if no updatelace happened, we ignore it completely + + if(iNumSkips) // we are in skipping mode? + { + dwLastLace+=dwLaceCnt; // -> calc frame limit helper (number of laces) + bSkipNextFrame = TRUE; // -> we skip next frame + iNumSkips--; // -> ok, one done + } + else // ok, no additional skipping has to be done... + { // we check now, if some limitation is needed, or a new skipping has to get started + DWORD dwWaitTime; + + if(bInitCap || bSkipNextFrame) // first time or we skipped before? + { + if(bUseFrameLimit && !bInitCap) // frame limit wanted and not first time called? + { + DWORD dwT=_ticks_since_last_update; // -> that's the time of the last drawn frame + dwLastLace+=dwLaceCnt; // -> and that's the number of updatelace since the start of the last drawn frame + + if(bIsPerformanceCounter) // -> now we calc the time of the last drawn frame + the time we spent skipping + { + QueryPerformanceCounter(&CurrentTime); + _ticks_since_last_update= dwT+CurrentTime.LowPart - LastTime.LowPart; + } + else + { + curticks = timeGetTime(); + _ticks_since_last_update= dwT+curticks - lastticks; + } + + dwWaitTime=dwLastLace*dwFrameRateTicks; // -> and now we calc the time the real psx would have needed + + if(_ticks_since_last_update we were too fast? + { + if((dwWaitTime-_ticks_since_last_update)> // -> some more security, to prevent + (60*dwFrameRateTicks)) // wrong waiting times + _ticks_since_last_update=dwWaitTime; + + while(_ticks_since_last_update loop until we have reached the real psx time + { // (that's the additional limitation, yup) + if(bIsPerformanceCounter) + { + QueryPerformanceCounter(&CurrentTime); + _ticks_since_last_update = dwT+CurrentTime.LowPart - LastTime.LowPart; + } + else + { + curticks = timeGetTime(); + _ticks_since_last_update = dwT+curticks - lastticks; + } + } + } + else // we were still too slow ?!!? + { + if(iAdditionalSkip well, somewhen we really have to stop skipping on very slow systems + { + iAdditionalSkip++; // -> inc our watchdog var + dwLaceCnt=0; // -> reset lace count + if(bIsPerformanceCounter) // -> ok, start time of the next frame + QueryPerformanceCounter(&LastTime); + lastticks = timeGetTime(); + return; // -> done, we will skip next frame to get more speed + } + } + } + + bInitCap=FALSE; // -> ok, we have inited the frameskip func + iAdditionalSkip=0; // -> init additional skip + bSkipNextFrame=FALSE; // -> we don't skip the next frame + if(bIsPerformanceCounter) // -> we store the start time of the next frame + QueryPerformanceCounter(&LastTime); + lastticks = timeGetTime(); + dwLaceCnt=0; // -> and we start to count the laces + dwLastLace=0; + _ticks_since_last_update=0; + return; // -> done, the next frame will get drawn + } + + bSkipNextFrame=FALSE; // init the frame skip signal to 'no skipping' first + + if(bIsPerformanceCounter) // get the current time (we are now at the end of one drawn frame) + { + QueryPerformanceCounter(&CurrentTime); + _ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart; + } + else + { + curticks = timeGetTime(); + _ticks_since_last_update = curticks - lastticks; + } + + dwLastLace=dwLaceCnt; // store curr count (frame limitation helper) + dwWaitTime=dwLaceCnt*dwFrameRateTicks; // calc the 'real psx lace time' + + if(_ticks_since_last_update>dwWaitTime) // hey, we needed way too long for that frame... + { + if(bUseFrameLimit) // if limitation, we skip just next frame, + { // and decide after, if we need to do more + iNumSkips=0; + } + else + { + iNumSkips=_ticks_since_last_update/dwWaitTime; // -> calc number of frames to skip to catch up + iNumSkips--; // -> since we already skip next frame, one down + if(iNumSkips>MAXSKIP) iNumSkips=MAXSKIP; // -> well, somewhere we have to draw a line + } + bSkipNextFrame = TRUE; // -> signal for skipping the next frame + } + else // we were faster than real psx? fine :) + if(bUseFrameLimit) // frame limit used? so we wait til the 'real psx time' has been reached + { + if(dwLaceCnt>MAXLACE) // -> security check + _ticks_since_last_update=dwWaitTime; + + while(_ticks_since_last_update(liCPUFrequency.LowPart>>1)) + _ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000; + lastticks=curticks; + //--------------------------------------------------// + + if(bUseFrameSkip && !bUseFrameLimit && _ticks_since_last_update) + fps_skip=min(fps_skip,(((float)liCPUFrequency.LowPart) / ((float)_ticks_since_last_update) +1.0f)); + + LastTime.HighPart = CurrentTime.HighPart; + LastTime.LowPart = CurrentTime.LowPart; + } + else + { + curticks = timeGetTime(); + _ticks_since_last_update=curticks-lastticks; + + if(bUseFrameSkip && !bUseFrameLimit && _ticks_since_last_update) + fps_skip=min(fps_skip,((float)1000/(float)_ticks_since_last_update+1.0f)); + + lastticks = curticks; + } + + if(bUseFrameSkip && bUseFrameLimit) + { + fpsskip_tck += _ticks_since_last_update; + + if(++fpsskip_cnt==2) + { + if(bIsPerformanceCounter) + fps_skip = ((float)liCPUFrequency.LowPart) / ((float)fpsskip_tck) *2.0f; + else + fps_skip = (float)2000/(float)fpsskip_tck; + + fps_skip +=6.0f; + + fpsskip_cnt = 0; + fpsskip_tck = 1; + } + } + + fps_tck += _ticks_since_last_update; + + if(++fps_cnt==10) + { + if(bIsPerformanceCounter) + fps_cur = ((float)liCPUFrequency.LowPart) / ((float)fps_tck) *10.0f; + else + fps_cur = (float)10000/(float)fps_tck; + + fps_cnt = 0; + fps_tck = 1; + + if(bUseFrameLimit && fps_cur>fFrameRateHz) // optical adjust ;) avoids flickering fps display + fps_cur=fFrameRateHz; + } +} + +//////////////////////////////////////////////////////////////////////// +// PC FPS skipping / limit +//////////////////////////////////////////////////////////////////////// + +void PCFrameCap(void) +{ + static DWORD curticks, lastticks, _ticks_since_last_update; + static DWORD TicksToWait = 0; + static LARGE_INTEGER CurrentTime; + static LARGE_INTEGER LastTime; + BOOL Waiting = TRUE; + + while (Waiting) + { + if(bIsPerformanceCounter) + { + QueryPerformanceCounter(&CurrentTime); + _ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart; + + //------------------------------------------------// + curticks = timeGetTime(); + if(_ticks_since_last_update>(liCPUFrequency.LowPart>>1)) + { + if(curticks < lastticks) + _ticks_since_last_update = TicksToWait+1; + else _ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000; + } + //------------------------------------------------// + + if ((_ticks_since_last_update > TicksToWait) || + (CurrentTime.LowPart < LastTime.LowPart)) + { + Waiting = FALSE; + + lastticks=curticks; + + LastTime.HighPart = CurrentTime.HighPart; + LastTime.LowPart = CurrentTime.LowPart; + TicksToWait = (liCPUFrequency.LowPart / fFrameRateHz); + } + } + else + { + curticks = timeGetTime(); + _ticks_since_last_update = curticks - lastticks; + if ((_ticks_since_last_update > TicksToWait) || + (curticks < lastticks)) + { + Waiting = FALSE; + lastticks = curticks; + TicksToWait = (1000 / (DWORD)fFrameRateHz); + } + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void PCcalcfps(void) +{ + static DWORD curticks,_ticks_since_last_update,lastticks; + static long fps_cnt = 0; + static float fps_acc = 0; + static LARGE_INTEGER CurrentTime; + static LARGE_INTEGER LastTime; + float CurrentFPS=0; + + if(bIsPerformanceCounter) + { + QueryPerformanceCounter(&CurrentTime); + _ticks_since_last_update=CurrentTime.LowPart-LastTime.LowPart; + + //--------------------------------------------------// + curticks = timeGetTime(); + if(_ticks_since_last_update>(liCPUFrequency.LowPart>>1)) + _ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000; + lastticks=curticks; + //--------------------------------------------------// + + if(_ticks_since_last_update) + { + CurrentFPS = ((float)liCPUFrequency.LowPart) / ((float)_ticks_since_last_update); + } + else CurrentFPS = 0; + LastTime.HighPart = CurrentTime.HighPart; + LastTime.LowPart = CurrentTime.LowPart; + } + else + { + curticks = timeGetTime(); + if(_ticks_since_last_update=curticks-lastticks) + CurrentFPS=(float)1000/(float)_ticks_since_last_update; + else CurrentFPS = 0; + lastticks = curticks; + } + + fps_acc += CurrentFPS; + + if(++fps_cnt==10) + { + fps_cur = fps_acc / 10; + fps_acc = 0; + fps_cnt = 0; + } + + fps_skip=CurrentFPS+1.0f; +} + +//////////////////////////////////////////////////////////////////////// + +void SetAutoFrameCap(void) +{ + if(iFrameLimit==1) + { + fFrameRateHz = fFrameRate; + if(bIsPerformanceCounter) + dwFrameRateTicks=(liCPUFrequency.LowPart / fFrameRateHz); + else dwFrameRateTicks=(1000 / (DWORD)fFrameRateHz); + return; + } + + if(dwActFixes&128) + { + if (PSXDisplay.Interlaced) + fFrameRateHz = PSXDisplay.PAL?50.0f:60.0f; + else fFrameRateHz = PSXDisplay.PAL?25.0f:30.0f; + } + else + { + //fFrameRateHz = PSXDisplay.PAL?50.0f:59.94f; + + if(PSXDisplay.PAL) + { + if (STATUSREG&GPUSTATUS_INTERLACED) + fFrameRateHz=33868800.0f/677343.75f; // 50.00238 + else fFrameRateHz=33868800.0f/680595.00f; // 49.76351 + } + else + { + if (STATUSREG&GPUSTATUS_INTERLACED) + fFrameRateHz=33868800.0f/565031.25f; // 59.94146 + else fFrameRateHz=33868800.0f/566107.50f; // 59.82750 + } + + if(bIsPerformanceCounter) + dwFrameRateTicks=(liCPUFrequency.LowPart / fFrameRateHz); + else dwFrameRateTicks=(1000 / (DWORD)fFrameRateHz); + } +} + +//////////////////////////////////////////////////////////////////////// + +void InitFrameCap(void) // inits cpu frequency info (on gpu startup) +{ + if (QueryPerformanceFrequency (&liCPUFrequency)) + bIsPerformanceCounter = TRUE; + else bIsPerformanceCounter = FALSE; +} + +//////////////////////////////////////////////////////////////////////// + +void ReInitFrameCap(void) +{ + BOOL bOldPerformanceCounter=bIsPerformanceCounter; // store curr timer mode + + if(dwActFixes&0x10000) // check game fix... high performance counters are bad on some mb chipsets + bIsPerformanceCounter=FALSE; + else + { + if (QueryPerformanceFrequency (&liCPUFrequency)) + bIsPerformanceCounter = TRUE; + else bIsPerformanceCounter = FALSE; + } + + if(bOldPerformanceCounter!=bIsPerformanceCounter) // changed? + { + bInitCap = TRUE; + SetAutoFrameCap(); + } +} + +//////////////////////////////////////////////////////////////////////// + +void SetFrameRateConfig(void) +{ + if(fFrameRateHz==0) + { + if(iFrameLimit==2) fFrameRateHz=59.94f; // auto framerate? set some init val (no pal/ntsc known yet) + else fFrameRateHz=fFrameRate; // else set user framerate + } + + if(bIsPerformanceCounter) + dwFrameRateTicks=(liCPUFrequency.LowPart / fFrameRateHz); + else dwFrameRateTicks=(1000 / (DWORD)fFrameRateHz); +} + +void CheckFrameRate(void) // called in updatelace (on every emulated psx vsync) +{ + if(bUseFrameSkip) + { + if(!(dwActFixes&0x100)) + { + dwLaceCnt++; // -> and store cnt of vsync between frames + if(dwLaceCnt>=MAXLACE && bUseFrameLimit) + { + if(dwLaceCnt==MAXLACE) bInitCap=TRUE; + FrameCap(); + } + } + else if(bUseFrameLimit) FrameCap(); + calcfps(); // -> calc fps display in skipping mode + } + else // -> non-skipping mode: + { + if(bUseFrameLimit) FrameCap(); + if(ulKeybits&KEY_SHOWFPS) calcfps(); + } +} + +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUsetframelimit(unsigned long option) // new EPSXE interface func: main emu can enable/disable fps limitation this way +{ + bInitCap = TRUE; + + if(option==1) // emu says: limit + { + bUseFrameLimit=TRUE;bUseFrameSkip=FALSE;iFrameLimit=2; + SetAutoFrameCap(); + } + else // emu says: no limit + { + bUseFrameLimit=FALSE; + } +} + +//////////////////////////////////////////////////////////////////////// diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/winsrc/key.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/winsrc/key.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/winsrc/key.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/winsrc/key.c 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,203 @@ +/*************************************************************************** + key.c - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +//*************************************************************************// +// History of changes: +// +// 2009/03/08 - Pete +// - generic cleanup for the Peops release +// +//*************************************************************************// + +#include "stdafx.h" + +#define _IN_KEY + +#include "externals.h" +#include "menu.h" +#include "texture.h" +#include "draw.h" +#include "fps.h" + +//////////////////////////////////////////////////////////////////////// +// KeyBoard handler stuff +//////////////////////////////////////////////////////////////////////// + +uint32_t ulKeybits; + +static WNDPROC pOldWinProc=0; +char szGPUKeys[7]; + +//////////////////////////////////////////////////////////////////////// +// keyboard handler (WINDOWS) +//////////////////////////////////////////////////////////////////////// + +LRESULT CALLBACK key_winproc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam) +{ + switch(message) + { + case WM_SYSCOMMAND: + if(iNoScreenSaver && wParam==SC_SCREENSAVE) return 0L; + break; + + case WM_KEYDOWN: + if(wParam==(WPARAM)szGPUKeys[1]) {ulKeybits|=KEY_RESETTEXSTORE;break;} + break; + + case WM_SYSKEYUP: + if(wParam==VK_RETURN) bChangeWinMode=TRUE; + break; + + case WM_KEYUP: + if(wParam==(WPARAM)szGPUKeys[0]) + { + if(ulKeybits&KEY_SHOWFPS) + { + ulKeybits&=~KEY_SHOWFPS; + HideText(); + DestroyPic(); + } + else + { + ulKeybits|=KEY_SHOWFPS; + szDispBuf[0]=0; + BuildDispMenu(0); + } + break; + } + if(wParam==(WPARAM)szGPUKeys[1]) {ShowGpuPic();break;} + if(wParam==(WPARAM)szGPUKeys[2]) {SwitchDispMenu(-1); break;} + if(wParam==(WPARAM)szGPUKeys[3]) {SwitchDispMenu( 1); break;} + if(wParam==(WPARAM)szGPUKeys[4]) + { + if(GetAsyncKeyState(VK_SHIFT)&32768) + { + if(iBlurBuffer) iBlurBuffer=0; + else iBlurBuffer=1; + } + BuildDispMenu(-1); + break; + } + if(wParam==(WPARAM)szGPUKeys[5]) {BuildDispMenu( 1); break;} + + } + return pOldWinProc( hwnd, message, wParam, lParam ); +} + +//////////////////////////////////////////////////////////////////////// + +void InitKeyHandler(void) +{ + if(!pOldWinProc) + { + pOldWinProc = (WNDPROC)GetWindowLong(hWWindow, GWL_WNDPROC ); + SetWindowLong(hWWindow, GWL_WNDPROC, (long)key_winproc); + } +} + +//////////////////////////////////////////////////////////////////////// + +void ExitKeyHandler(void) +{ + if(pOldWinProc) + SetWindowLong(hWWindow,GWL_WNDPROC, // set old proc + (long)pOldWinProc); + pOldWinProc = 0; +} + +//////////////////////////////////////////////////////////////////////// +// reset stuff on special keyboard commands +//////////////////////////////////////////////////////////////////////// + +void ResetStuff(void) +{ + ResetTextureArea(TRUE); + ulKeybits&=~KEY_RESETTEXSTORE; + + if(ulKeybits&KEY_BLACKWHITE) + { + if(bUseFixes) {bUseFixes=FALSE;dwActFixes=0;} + else {bUseFixes=TRUE; dwActFixes=dwCfgFixes;} + SetExtGLFuncs(); + if(iFrameLimit==2) SetAutoFrameCap(); + ulKeybits&=~KEY_BLACKWHITE; + } + + if(ulKeybits&KEY_RESETFILTER) + { + if(ulKeybits&KEY_STEPDOWN) + iFilterType--; + else iFilterType++; + if(iFilterType>6) iFilterType=0; + if(iFilterType<0) iFilterType=6; + SetExtGLFuncs(); + ulKeybits&=~(KEY_RESETFILTER|KEY_STEPDOWN); + BuildDispMenu(0); + } + + if(ulKeybits&KEY_RESETOPAQUE) + { + bOpaquePass=!bOpaquePass; + SetExtGLFuncs(); + ulKeybits&=~KEY_RESETOPAQUE; + BuildDispMenu(0); + } + + if(ulKeybits&KEY_RESETADVBLEND) + { + bAdvancedBlend=!bAdvancedBlend; + SetExtGLFuncs(); + ulKeybits&=~KEY_RESETADVBLEND; + BuildDispMenu(0); + } + + if(ulKeybits&KEY_RESETDITHER) + { + bDrawDither=!bDrawDither; + if(bDrawDither) glEnable(GL_DITHER); + else glDisable(GL_DITHER); + ulKeybits&=~KEY_RESETDITHER; + BuildDispMenu(0); + } + + if(ulKeybits & KEY_TOGGLEFBTEXTURE) + { + if(ulKeybits&KEY_STEPDOWN) + iFrameTexType--; + else iFrameTexType++; + if(iFrameTexType>3) iFrameTexType=0; + if(iFrameTexType<0) iFrameTexType=3; + if(gTexFrameName!=0) + glDeleteTextures(1, &gTexFrameName); + gTexFrameName=0; + ulKeybits&=~(KEY_TOGGLEFBTEXTURE|KEY_STEPDOWN); + } + + if(ulKeybits & KEY_TOGGLEFBREAD) + { + if(ulKeybits&KEY_STEPDOWN) + iFrameReadType--; + else iFrameReadType++; + if(iFrameReadType>4) iFrameReadType=0; + if(iFrameReadType<0) iFrameReadType=4; + if(iFrameReadType==4) bFullVRam=TRUE; + else bFullVRam=FALSE; + iRenderFVR=0; + ulKeybits&=~(KEY_TOGGLEFBREAD|KEY_STEPDOWN); + } +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/winsrc/ssave.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/winsrc/ssave.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/winsrc/ssave.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/winsrc/ssave.c 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,65 @@ +/*************************************************************************** + ssave.c - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +//*************************************************************************// +// History of changes: +// +// 2009/03/08 - Pete +// - generic cleanup for the Peops release +// +//*************************************************************************// + +#include "stdafx.h" + +#include "externals.h" + +//////////////////////////////////////////////////////////////////////// +// screensaver stuff: dynamically load kernel32.dll to avoid export dependeny +//////////////////////////////////////////////////////////////////////// + +#ifdef __MINGW32__ +#define EXECUTION_STATE DWORD +#endif + +void EnableScreenSaver(BOOL bEnab) +{ + HINSTANCE hKernel32 = NULL; + EXECUTION_STATE (WINAPI *D_SetThreadExecutionState)(EXECUTION_STATE esFlags); + + if(bEnab) + { + hKernel32 = LoadLibrary("kernel32.dll"); + if(hKernel32 != NULL) + { + if((D_SetThreadExecutionState=(EXECUTION_STATE (WINAPI *)(EXECUTION_STATE))GetProcAddress(hKernel32,"SetThreadExecutionState"))!=NULL) + D_SetThreadExecutionState(ES_SYSTEM_REQUIRED|ES_DISPLAY_REQUIRED); + FreeLibrary(hKernel32); + } + } + else + { + hKernel32 = LoadLibrary("kernel32.dll"); + if(hKernel32 != NULL) + { + if((D_SetThreadExecutionState=(EXECUTION_STATE (WINAPI *)(EXECUTION_STATE))GetProcAddress(hKernel32,"SetThreadExecutionState"))!=NULL) + D_SetThreadExecutionState(ES_SYSTEM_REQUIRED|ES_DISPLAY_REQUIRED|ES_CONTINUOUS); + FreeLibrary(hKernel32); + } + } +} + diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/winsrc/ssave.h pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/winsrc/ssave.h --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/winsrc/ssave.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/winsrc/ssave.h 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,29 @@ +/*************************************************************************** + ssave.h - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +//*************************************************************************// +// History of changes: +// +// 2009/03/08 - Pete +// - generic cleanup for the Peops release +// +//*************************************************************************// + +// prototype + +void EnableScreenSaver(BOOL bEnab); \ No newline at end of file diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/winsrc/winmain.c pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/winsrc/winmain.c --- pcsxr-unstable-1.9.94+svn97809/win32/plugins/peopsxgl/winsrc/winmain.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/plugins/peopsxgl/winsrc/winmain.c 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,42 @@ +/*************************************************************************** + gpuPeopsOpenGL.c - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +//*************************************************************************// +// History of changes: +// +// 2009/03/08 - Pete +// - generic cleanup for the Peops release +// +//*************************************************************************// + +#include "stdafx.h" + +/////////////////////////////////////////////////////////////////////////// +// GENERIC FUNCS ////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + +HINSTANCE hInst=NULL; + +BOOL APIENTRY DllMain(HANDLE hModule, // DLL INIT + DWORD dwReason, + LPVOID lpReserved) +{ + hInst=(HINSTANCE)hModule; + return TRUE; // very quick :) +} + diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/resource.h pcsxr-unstable-1.9.94+svn98108/win32/resource.h --- pcsxr-unstable-1.9.94+svn97809/win32/resource.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/resource.h 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,366 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by pcsxr.rc +// +#define IDS_TITLE 1 +#define IDC_SEARCHFOR 100 +#define IDR_MENU1 101 +#define IDI_APP_ICON 102 +#define IDD_MCDCONF 102 +#define DEBUG_DIALOG 103 +#define IDC_VALUEFROM 103 +#define ABOUT_DIALOG 104 +#define IDC_LABEL_TO 104 +#define IDD_CPUCONF 105 +#define IDC_VALUETO 105 +#define IDC_DATATYPE 106 +#define IDC_DATABASE 107 +#define IDD_NETPLAY 108 +#define IDC_LABEL_RESULTSFOUND 108 +#define IDD_CONNECT 109 +#define IDC_RESLIST 109 +#define IDD_CHEATLIST 110 +#define IDC_SEARCH 110 +#define IDC_NEWSEARCH 111 +#define IDD_CHEATSEARCH 112 +#define SPLASH_LOGO 113 +#define IDC_MODIFY 113 +#define IDD_GPREGS 114 +#define IDC_FREEZE 114 +#define IDD_CHEATEDIT 114 +#define IDD_CP0REGS 115 +#define IDC_COPY 115 +#define IDD_CHEATVALEDIT 115 +#define IDD_COP2D 116 +#define IDD_COP2C 117 +#define MAIN_LOGO 118 +#define IDD_CONFIG 120 +#define IDD_MEMVIEW 136 +#define IDC_EDIT2 1001 +#define IDC_CODE 1001 +#define IDC_VALUE 1001 +#define IDC_MCD2 1004 +#define IDC_ASMCHECK1 1005 +#define IDC_MCD1 1005 +#define IDC_MCDSEL1 1006 +#define IDC_STEP 1007 +#define IDC_MCDSEL2 1007 +#define IDC_XA 1007 +#define IDC_SIO 1008 +#define IDC_SKIP 1009 +#define IDC_MDEC 1009 +#define IDC_RESET 1010 +#define IDC_PSXAUTO 1010 +#define IDC_GO 1011 +#define IDC_PSXTYPES 1011 +#define IDC_BREAK 1012 +#define IDC_DISCPUQKEYS 1012 +#define IDC_QKEYS 1012 +#define IDC_EDIT1 1013 +#define IDC_CDDA 1013 +#define IDC_DESCR 1013 +#define IDC_ADDRESS 1013 +#define IDC_CLOSE 1014 +#define IDC_PCSXR_ABOUT_TEXT 1014 +#define IDC_PSXOUT 1014 +#define IDC_ASM_SCROLL 1015 +#define IDC_CPU 1015 +#define IDC_ASMCHECK2 1016 +#define IDC_SPUIRQ 1016 +#define IDC_ASMCHECK3 1017 +#define IDC_MDEC2 1017 +#define IDC_CDTIMING 1017 +#define IDC_SLOWBOOT 1017 +#define IDC_ASMCHECK4 1018 +#define IDC_ASMCHECK5 1019 +#define IDC_RELOAD1 1019 +#define IDC_CP07 1020 +#define IDC_ASMCHECK6 1020 +#define IDC_RELOAD2 1020 +#define IDC_ASMCHECK7 1021 +#define IDC_COPYTO2 1021 +#define IDC_ASMCHECK8 1022 +#define IDC_COPYTO1 1022 +#define IDC_RCNTFIX 1022 +#define IDC_ASMCHECK9 1023 +#define IDC_PASTE 1023 +#define IDC_CONFIGNET 1023 +#define IDC_VSYNCWA 1023 +#define IDC_ASMCHECK10 1024 +#define IDC_DELETE1 1024 +#define IDC_TESTNET 1024 +#define IDC_ASMCHECK11 1025 +#define IDC_DELETE2 1025 +#define IDC_ABOUTNET 1025 +#define IDC_ASMCHECK12 1026 +#define IDC_LISTNET 1026 +#define IDC_LIST1 1027 +#define IDC_ASMCHECK13 1027 +#define IDC_SYSCMCDS 1027 +#define IDC_ASMCHECK14 1028 +#define IDC_LIST2 1028 +#define IDC_CONNECTSTR 1028 +#define IDC_ASMCHECK15 1029 +#define IDC_PCSXR_ABOUT_AUTHORS 1029 +#define IDC_ASMCHECK16 1030 +#define IDC_PCSXR_ABOUT_GREETS 1030 +#define IDC_ASMCHECK17 1031 +#define IDC_SELPSX 1031 +#define IDC_ASMCHECK18 1032 +#define IDC_MISCOPT 1032 +#define IDC_ASMCHECK19 1033 +#define IDC_GRAPHICS 1033 +#define IDC_CP021 1034 +#define IDC_ASMCHECK20 1034 +#define IDC_FIRSTCONTROLLER 1034 +#define IDC_CP022 1035 +#define IDC_ASMCHECK21 1035 +#define IDC_SECONDCONTROLLER 1035 +#define IDC_CP023 1036 +#define IDC_ASMCHECK22 1036 +#define IDC_SOUND 1036 +#define IDC_CP024 1037 +#define IDC_ASMCHECK23 1037 +#define IDC_CDROM 1037 +#define IDC_CP025 1038 +#define IDC_ASMCHECK24 1038 +#define IDC_BIOS 1038 +#define IDC_NETPLAY 1039 +#define IDC_LINKCABLE 1039 +#define IDC_NETPLAYNOTE 1040 +#define IDC_FRAMEMCD1 1041 +#define IDC_FRAMEMCD2 1042 +#define IDC_CP031 1044 +#define IDC_CODELIST 1044 +#define IDC_REMOVECODE 1045 +#define IDC_EDITCODE 1046 +#define IDC_GPR0 1047 +#define IDC_TOGGLECODE 1047 +#define IDC_GPR1 1048 +#define IDC_SAVECODE 1048 +#define IDC_GPR2 1049 +#define IDC_LOADCODE 1049 +#define IDC_GPR3 1050 +#define IDC_LABEL_DESCR 1050 +#define IDC_GPR4 1051 +#define IDC_LABEL_CODE 1051 +#define IDC_GPR5 1052 +#define IDC_LISTGPU 1052 +#define IDC_LABEL_ADDRESS 1052 +#define IDC_GPR6 1053 +#define IDC_LISTSPU 1053 +#define IDC_DEBUG 1053 +#define IDC_GPR7 1054 +#define IDC_LISTCDR 1054 +#define IDC_GPR8 1055 +#define IDC_LISTBIOS 1055 +#define IDC_GPR9 1056 +#define IDC_CONFIGGPU 1056 +#define IDC_GPR10 1057 +#define IDC_TESTGPU 1057 +#define IDC_ABOUTGPU 1058 +#define IDC_CONFIGSPU 1059 +#define IDC_TESTSPU 1060 +#define IDC_ABOUTSPU 1061 +#define IDC_CONFIGCDR 1062 +#define IDC_GPR11 1063 +#define IDC_TESTCDR 1063 +#define IDC_ABOUTCDR 1064 +#define IDC_COMBODRIVE 1065 +#define IDC_LISTSIO1 1065 +#define IDC_LISTPAD1 1066 +#define IDC_CONFIGPAD1 1067 +#define IDC_GPR12 1068 +#define IDC_TESTPAD1 1068 +#define IDC_GPR13 1069 +#define IDC_ABOUTPAD1 1069 +#define IDC_GPR14 1070 +#define IDC_LISTPAD2 1070 +#define IDC_GPR15 1071 +#define IDC_CONFIGPAD2 1071 +#define IDC_GPR16 1072 +#define IDC_TESTPAD2 1072 +#define IDC_GPR17 1073 +#define IDC_ABOUTPAD2 1073 +#define IDC_GPR18 1074 +#define IDC_CONFIGSIO1 1074 +#define IDC_GPR19 1075 +#define IDC_TESTSIO1 1075 +#define IDC_GPR20 1076 +#define IDC_ABOUTCDR2 1076 +#define IDC_ABOUTSIO1 1076 +#define IDC_GPR21 1077 +#define IDC_GPR22 1078 +#define IDC_GPR23 1079 +#define IDC_GPR24 1080 +#define IDC_GPR25 1081 +#define IDC_GPR26 1082 +#define IDC_GPR27 1083 +#define IDC_GPR28 1084 +#define IDC_GPR29 1085 +#define IDC_GPR30 1086 +#define IDC_GPR31 1087 +#define IDC_GPR_PC 1089 +#define IDC_GPR_HI 1091 +#define IDC_GPR_LO 1092 +#define IDC_CP00 1093 +#define IDC_CP01 1094 +#define IDC_CP02 1095 +#define IDC_CP03 1096 +#define IDC_CP04 1097 +#define IDC_CP05 1098 +#define IDC_CP06 1099 +#define IDC_CP08 1100 +#define IDC_CP09 1101 +#define IDC_CP010 1102 +#define IDC_CP011 1103 +#define IDC_CP012 1104 +#define IDC_CP013 1105 +#define IDC_CP014 1106 +#define IDC_CP015 1107 +#define IDC_CP016 1108 +#define IDC_CP017 1109 +#define IDC_CP018 1110 +#define IDC_CP019 1111 +#define IDC_CP020 1112 +#define IDC_CP026 1113 +#define IDC_CP027 1114 +#define IDC_CP028 1115 +#define IDC_CP029 1116 +#define IDC_CP030 1117 +#define IDC_COP2D0 1118 +#define IDC_COP2D1 1119 +#define IDC_COP2D2 1120 +#define IDC_COP2D3 1121 +#define IDC_COP2D4 1122 +#define IDC_COP2D5 1123 +#define IDC_COP2D6 1124 +#define IDC_COP2D7 1125 +#define IDC_COP2D8 1126 +#define IDC_COP2D9 1127 +#define IDC_COP2D10 1128 +#define IDC_COP2D11 1129 +#define IDC_COP2D12 1130 +#define IDC_COP2D13 1131 +#define IDC_COP2D14 1132 +#define IDC_COP2D15 1133 +#define IDC_COP2D16 1134 +#define IDC_COP2D17 1135 +#define IDC_COP2D18 1136 +#define IDC_COP2D19 1137 +#define IDC_COP2D20 1138 +#define IDC_COP2D21 1139 +#define IDC_COP2D22 1140 +#define IDC_COP2D23 1141 +#define IDC_COP2D24 1142 +#define IDC_COP2D25 1143 +#define IDC_COP2D26 1144 +#define IDC_COP2D27 1145 +#define IDC_COP2D28 1146 +#define IDC_COP2D29 1147 +#define IDC_COP2D30 1148 +#define IDC_COP2D31 1149 +#define IDC_COP2C0 1152 +#define IDC_COP2C1 1153 +#define IDC_COP2C2 1154 +#define IDC_COP2C3 1155 +#define IDC_COP2C4 1156 +#define IDC_COP2C5 1157 +#define IDC_COP2C6 1158 +#define IDC_COP2C7 1159 +#define IDC_COP2C8 1160 +#define IDC_COP2C9 1161 +#define IDC_COP2C10 1162 +#define IDC_COP2C11 1163 +#define IDC_COP2C12 1164 +#define IDC_COP2C13 1165 +#define IDC_COP2C14 1166 +#define IDC_COP2C15 1167 +#define IDC_COP2C16 1168 +#define IDC_COP2C17 1169 +#define IDC_COP2C18 1170 +#define IDC_COP2C19 1171 +#define IDC_COP2C20 1172 +#define IDC_COP2C21 1173 +#define IDC_COP2C22 1174 +#define IDC_COP2C23 1175 +#define IDC_COP2C24 1176 +#define IDC_COP2C25 1177 +#define IDC_COP2C26 1178 +#define IDC_COP2C27 1179 +#define IDC_COP2C28 1180 +#define IDC_COP2C29 1181 +#define IDC_COP2C30 1182 +#define IDC_COP2C31 1183 +#define IDC_BUTTON1 1254 +#define IDC_BIOSDIR 1254 +#define IDC_FORMAT1 1254 +#define IDC_ADDCODE 1254 +#define IDC_PLUGINSDIR 1255 +#define IDC_FORMAT2 1255 +#define IDC_LABEL_DATATYPE 1260 +#define IDC_LABEL_SEARCHFOR 1261 +#define IDC_LABEL_VALUE 1262 +#define IDC_LABEL_DATABASE 1263 +#define IDC_WIDESCREEN 1264 +#define IDC_HIDECURSOR 1265 +#define IDC_SAVEWINDOWPOS 1266 +#define IDC_HACKFIX 1267 +#define ID_FILE_EXIT 40001 +#define ID_HELP_ABOUT 40002 +#define ID_FILE_RUN_CD 40003 +#define ID_FILE_RUN_EXE 40004 +#define ID_EMULATOR_PAUSE 40005 +#define ID_EMULATOR_RESET 40006 +#define ID_FILE_RUN_ISO 40007 +#define ID_DEBUG_ENABLE_DEBUGGER 40008 +#define ID_CONFIGURATION_GRAPHICS 40009 +#define ID_CONFIGURATION_SOUND 40010 +#define ID_CONFIGURATION_CDROM 40011 +#define ID_CONFIGURATION_MEMORYCARDMANAGER 40012 +#define ID_CONFIGURATION_CPU 40013 +#define ID_EMULATOR_RUN 40014 +#define ID_DEBUGREG 40015 +#define ID_DEBUG_MESSAGES 40015 +#define ID_EMULATOR_SHUTDOWN 40015 +#define ID_FILE_RUN_NOGUI 40016 +#define ID_CONFIGURATION_CONTROLLERS 40017 +#define ID_CONFIGURATION 40018 +#define ID_CONFIGURATION_LINKCABLE 40019 +#define ID_FILE_RUNBIOS 40026 +#define ID_CONFIGURATION_NETPLAY 40043 +#define ID_EMULATOR_SWITCH_ISO 40044 +#define ID_CONFIGURATION_CHEATLIST 40045 +#define ID_CONFIGURATION_CHEATSEARCH 40046 +#define ID_FILE_STATES_LOAD_SLOT1 40048 +#define ID_FILE_STATES_LOAD_SLOT2 40049 +#define ID_FILE_STATES_LOAD_SLOT3 40050 +#define ID_FILE_STATES_LOAD_SLOT4 40051 +#define ID_FILE_STATES_LOAD_SLOT5 40052 +#define ID_FILE_STATES_LOAD_SLOT6 40053 +#define ID_FILE_STATES_LOAD_SLOT7 40054 +#define ID_FILE_STATES_LOAD_SLOT8 40055 +#define ID_FILE_STATES_LOAD_SLOT9 40056 +#define ID_FILE_STATES_LOAD_OTHER 40057 +#define ID_FILE_STATES_SAVE_SLOT1 40058 +#define ID_FILE_STATES_SAVE_SLOT2 40059 +#define ID_FILE_STATES_SAVE_SLOT3 40060 +#define ID_FILE_STATES_SAVE_SLOT4 40061 +#define ID_FILE_STATES_SAVE_SLOT5 40062 +#define ID_FILE_STATES_SAVE_SLOT6 40063 +#define ID_FILE_STATES_SAVE_SLOT7 40064 +#define ID_FILE_STATES_SAVE_SLOT8 40065 +#define ID_FILE_STATES_SAVE_SLOT9 40066 +#define ID_FILE_STATES_SAVE_OTHER 40067 +#define ID_LANGS 50000 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 116 +#define _APS_NEXT_COMMAND_VALUE 40047 +#define _APS_NEXT_CONTROL_VALUE 1054 +#define _APS_NEXT_SYMED_VALUE 102 +#endif +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/adler32.c pcsxr-unstable-1.9.94+svn98108/win32/zlib/adler32.c --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/adler32.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/adler32.c 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,48 @@ +/* adler32.c -- compute the Adler-32 checksum of a data stream + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#include "zlib.h" + +#define BASE 65521L /* largest prime smaller than 65536 */ +#define NMAX 5552 +/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ + +#define DO1(buf,i) {s1 += buf[i]; s2 += s1;} +#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); +#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); +#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); +#define DO16(buf) DO8(buf,0); DO8(buf,8); + +/* ========================================================================= */ +uLong ZEXPORT adler32(adler, buf, len) + uLong adler; + const Bytef *buf; + uInt len; +{ + unsigned long s1 = adler & 0xffff; + unsigned long s2 = (adler >> 16) & 0xffff; + int k; + + if (buf == Z_NULL) return 1L; + + while (len > 0) { + k = len < NMAX ? len : NMAX; + len -= k; + while (k >= 16) { + DO16(buf); + buf += 16; + k -= 16; + } + if (k != 0) do { + s1 += *buf++; + s2 += s1; + } while (--k); + s1 %= BASE; + s2 %= BASE; + } + return (s2 << 16) | s1; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/compress.c pcsxr-unstable-1.9.94+svn98108/win32/zlib/compress.c --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/compress.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/compress.c 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,68 @@ +/* compress.c -- compress a memory buffer + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#include "zlib.h" + +/* =========================================================================== + Compresses the source buffer into the destination buffer. The level + parameter has the same meaning as in deflateInit. sourceLen is the byte + length of the source buffer. Upon entry, destLen is the total size of the + destination buffer, which must be at least 0.1% larger than sourceLen plus + 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. + + compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_BUF_ERROR if there was not enough room in the output buffer, + Z_STREAM_ERROR if the level parameter is invalid. +*/ +int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) + Bytef *dest; + uLongf *destLen; + const Bytef *source; + uLong sourceLen; + int level; +{ + z_stream stream; + int err; + + stream.next_in = (Bytef*)source; + stream.avail_in = (uInt)sourceLen; +#ifdef MAXSEG_64K + /* Check for source > 64K on 16-bit machine: */ + if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; +#endif + stream.next_out = dest; + stream.avail_out = (uInt)*destLen; + if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; + + stream.zalloc = (alloc_func)0; + stream.zfree = (free_func)0; + stream.opaque = (voidpf)0; + + err = deflateInit(&stream, level); + if (err != Z_OK) return err; + + err = deflate(&stream, Z_FINISH); + if (err != Z_STREAM_END) { + deflateEnd(&stream); + return err == Z_OK ? Z_BUF_ERROR : err; + } + *destLen = stream.total_out; + + err = deflateEnd(&stream); + return err; +} + +/* =========================================================================== + */ +int ZEXPORT compress (dest, destLen, source, sourceLen) + Bytef *dest; + uLongf *destLen; + const Bytef *source; + uLong sourceLen; +{ + return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/crc32.c pcsxr-unstable-1.9.94+svn98108/win32/zlib/crc32.c --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/crc32.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/crc32.c 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,162 @@ +/* crc32.c -- compute the CRC-32 of a data stream + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#include "zlib.h" + +#define local static + +#ifdef DYNAMIC_CRC_TABLE + +local int crc_table_empty = 1; +local uLongf crc_table[256]; +local void make_crc_table OF((void)); + +/* + Generate a table for a byte-wise 32-bit CRC calculation on the polynomial: + x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. + + Polynomials over GF(2) are represented in binary, one bit per coefficient, + with the lowest powers in the most significant bit. Then adding polynomials + is just exclusive-or, and multiplying a polynomial by x is a right shift by + one. If we call the above polynomial p, and represent a byte as the + polynomial q, also with the lowest power in the most significant bit (so the + byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p, + where a mod b means the remainder after dividing a by b. + + This calculation is done using the shift-register method of multiplying and + taking the remainder. The register is initialized to zero, and for each + incoming bit, x^32 is added mod p to the register if the bit is a one (where + x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by + x (which is shifting right by one and adding x^32 mod p if the bit shifted + out is a one). We start with the highest power (least significant bit) of + q and repeat for all eight bits of q. + + The table is simply the CRC of all possible eight bit values. This is all + the information needed to generate CRC's on data a byte at a time for all + combinations of CRC register values and incoming bytes. +*/ +local void make_crc_table() +{ + uLong c; + int n, k; + uLong poly; /* polynomial exclusive-or pattern */ + /* terms of polynomial defining this crc (except x^32): */ + static const Byte p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26}; + + /* make exclusive-or pattern from polynomial (0xedb88320L) */ + poly = 0L; + for (n = 0; n < sizeof(p)/sizeof(Byte); n++) + poly |= 1L << (31 - p[n]); + + for (n = 0; n < 256; n++) + { + c = (uLong)n; + for (k = 0; k < 8; k++) + c = c & 1 ? poly ^ (c >> 1) : c >> 1; + crc_table[n] = c; + } + crc_table_empty = 0; +} +#else +/* ======================================================================== + * Table of CRC-32's of all single-byte values (made by make_crc_table) + */ +local const uLongf crc_table[256] = { + 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, + 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, + 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, + 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, + 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, + 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, + 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, + 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL, + 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, + 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL, + 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, + 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, + 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L, + 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, + 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, + 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L, + 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, + 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L, + 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, + 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, + 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL, + 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, + 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L, + 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL, + 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, + 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L, + 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, + 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, + 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L, + 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, + 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, + 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L, + 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, + 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL, + 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, + 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, + 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL, + 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, + 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, + 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L, + 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, + 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L, + 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, + 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, + 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L, + 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, + 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, + 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, + 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, + 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L, + 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, + 0x2d02ef8dL +}; +#endif + +/* ========================================================================= + * This function can be used by asm versions of crc32() + */ +const uLongf * ZEXPORT get_crc_table() +{ +#ifdef DYNAMIC_CRC_TABLE + if (crc_table_empty) make_crc_table(); +#endif + return (const uLongf *)crc_table; +} + +/* ========================================================================= */ +#define DO1(buf) crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8); +#define DO2(buf) DO1(buf); DO1(buf); +#define DO4(buf) DO2(buf); DO2(buf); +#define DO8(buf) DO4(buf); DO4(buf); + +/* ========================================================================= */ +uLong ZEXPORT crc32(crc, buf, len) + uLong crc; + const Bytef *buf; + uInt len; +{ + if (buf == Z_NULL) return 0L; +#ifdef DYNAMIC_CRC_TABLE + if (crc_table_empty) + make_crc_table(); +#endif + crc = crc ^ 0xffffffffL; + while (len >= 8) + { + DO8(buf); + len -= 8; + } + if (len) do { + DO1(buf); + } while (--len); + return crc ^ 0xffffffffL; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/deflate.c pcsxr-unstable-1.9.94+svn98108/win32/zlib/deflate.c --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/deflate.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/deflate.c 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,1350 @@ +/* deflate.c -- compress data using the deflation algorithm + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + * ALGORITHM + * + * The "deflation" process depends on being able to identify portions + * of the input text which are identical to earlier input (within a + * sliding window trailing behind the input currently being processed). + * + * The most straightforward technique turns out to be the fastest for + * most input files: try all possible matches and select the longest. + * The key feature of this algorithm is that insertions into the string + * dictionary are very simple and thus fast, and deletions are avoided + * completely. Insertions are performed at each input character, whereas + * string matches are performed only when the previous match ends. So it + * is preferable to spend more time in matches to allow very fast string + * insertions and avoid deletions. The matching algorithm for small + * strings is inspired from that of Rabin & Karp. A brute force approach + * is used to find longer strings when a small match has been found. + * A similar algorithm is used in comic (by Jan-Mark Wams) and freeze + * (by Leonid Broukhis). + * A previous version of this file used a more sophisticated algorithm + * (by Fiala and Greene) which is guaranteed to run in linear amortized + * time, but has a larger average cost, uses more memory and is patented. + * However the F&G algorithm may be faster for some highly redundant + * files if the parameter max_chain_length (described below) is too large. + * + * ACKNOWLEDGEMENTS + * + * The idea of lazy evaluation of matches is due to Jan-Mark Wams, and + * I found it in 'freeze' written by Leonid Broukhis. + * Thanks to many people for bug reports and testing. + * + * REFERENCES + * + * Deutsch, L.P.,"DEFLATE Compressed Data Format Specification". + * Available in ftp://ds.internic.net/rfc/rfc1951.txt + * + * A description of the Rabin and Karp algorithm is given in the book + * "Algorithms" by R. Sedgewick, Addison-Wesley, p252. + * + * Fiala,E.R., and Greene,D.H. + * Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595 + * + */ + +/* @(#) $Id$ */ + +#include "deflate.h" + +const char deflate_copyright[] = + " deflate 1.1.4 Copyright 1995-2002 Jean-loup Gailly "; +/* + If you use the zlib library in a product, an acknowledgment is welcome + in the documentation of your product. If for some reason you cannot + include such an acknowledgment, I would appreciate that you keep this + copyright string in the executable of your product. + */ + +/* =========================================================================== + * Function prototypes. + */ +typedef enum { + need_more, /* block not completed, need more input or more output */ + block_done, /* block flush performed */ + finish_started, /* finish started, need only more output at next deflate */ + finish_done /* finish done, accept no more input or output */ +} block_state; + +typedef block_state (*compress_func) OF((deflate_state *s, int flush)); +/* Compression function. Returns the block state after the call. */ + +local void fill_window OF((deflate_state *s)); +local block_state deflate_stored OF((deflate_state *s, int flush)); +local block_state deflate_fast OF((deflate_state *s, int flush)); +local block_state deflate_slow OF((deflate_state *s, int flush)); +local void lm_init OF((deflate_state *s)); +local void putShortMSB OF((deflate_state *s, uInt b)); +local void flush_pending OF((z_streamp strm)); +local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); +#ifdef ASMV + void match_init OF((void)); /* asm code initialization */ + uInt longest_match OF((deflate_state *s, IPos cur_match)); +#else +local uInt longest_match OF((deflate_state *s, IPos cur_match)); +#endif + +#ifdef DEBUG +local void check_match OF((deflate_state *s, IPos start, IPos match, + int length)); +#endif + +/* =========================================================================== + * Local data + */ + +#define NIL 0 +/* Tail of hash chains */ + +#ifndef TOO_FAR +# define TOO_FAR 4096 +#endif +/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */ + +#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) +/* Minimum amount of lookahead, except at the end of the input file. + * See deflate.c for comments about the MIN_MATCH+1. + */ + +/* Values for max_lazy_match, good_match and max_chain_length, depending on + * the desired pack level (0..9). The values given below have been tuned to + * exclude worst case performance for pathological files. Better values may be + * found for specific files. + */ +typedef struct config_s { + ush good_length; /* reduce lazy search above this match length */ + ush max_lazy; /* do not perform lazy search above this match length */ + ush nice_length; /* quit search above this match length */ + ush max_chain; + compress_func func; +} config; + +local const config configuration_table[10] = { +/* good lazy nice chain */ +/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */ +/* 1 */ {4, 4, 8, 4, deflate_fast}, /* maximum speed, no lazy matches */ +/* 2 */ {4, 5, 16, 8, deflate_fast}, +/* 3 */ {4, 6, 32, 32, deflate_fast}, + +/* 4 */ {4, 4, 16, 16, deflate_slow}, /* lazy matches */ +/* 5 */ {8, 16, 32, 32, deflate_slow}, +/* 6 */ {8, 16, 128, 128, deflate_slow}, +/* 7 */ {8, 32, 128, 256, deflate_slow}, +/* 8 */ {32, 128, 258, 1024, deflate_slow}, +/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* maximum compression */ + +/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 + * For deflate_fast() (levels <= 3) good is ignored and lazy has a different + * meaning. + */ + +#define EQUAL 0 +/* result of memcmp for equal strings */ + +struct static_tree_desc_s {int dummy;}; /* for buggy compilers */ + +/* =========================================================================== + * Update a hash value with the given input byte + * IN assertion: all calls to to UPDATE_HASH are made with consecutive + * input characters, so that a running hash key can be computed from the + * previous key instead of complete recalculation each time. + */ +#define UPDATE_HASH(s,h,c) (h = (((h)<hash_shift) ^ (c)) & s->hash_mask) + + +/* =========================================================================== + * Insert string str in the dictionary and set match_head to the previous head + * of the hash chain (the most recent string with same hash key). Return + * the previous length of the hash chain. + * If this file is compiled with -DFASTEST, the compression level is forced + * to 1, and no hash chains are maintained. + * IN assertion: all calls to to INSERT_STRING are made with consecutive + * input characters and the first MIN_MATCH bytes of str are valid + * (except for the last MIN_MATCH-1 bytes of the input file). + */ +#ifdef FASTEST +#define INSERT_STRING(s, str, match_head) \ + (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ + match_head = s->head[s->ins_h], \ + s->head[s->ins_h] = (Pos)(str)) +#else +#define INSERT_STRING(s, str, match_head) \ + (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ + s->prev[(str) & s->w_mask] = match_head = s->head[s->ins_h], \ + s->head[s->ins_h] = (Pos)(str)) +#endif + +/* =========================================================================== + * Initialize the hash table (avoiding 64K overflow for 16 bit systems). + * prev[] will be initialized on the fly. + */ +#define CLEAR_HASH(s) \ + s->head[s->hash_size-1] = NIL; \ + zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head)); + +/* ========================================================================= */ +int ZEXPORT deflateInit_(strm, level, version, stream_size) + z_streamp strm; + int level; + const char *version; + int stream_size; +{ + return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, + Z_DEFAULT_STRATEGY, version, stream_size); + /* To do: ignore strm->next_in if we use it as window */ +} + +/* ========================================================================= */ +int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, + version, stream_size) + z_streamp strm; + int level; + int method; + int windowBits; + int memLevel; + int strategy; + const char *version; + int stream_size; +{ + deflate_state *s; + int noheader = 0; + static const char* my_version = ZLIB_VERSION; + + ushf *overlay; + /* We overlay pending_buf and d_buf+l_buf. This works since the average + * output size for (length,distance) codes is <= 24 bits. + */ + + if (version == Z_NULL || version[0] != my_version[0] || + stream_size != sizeof(z_stream)) { + return Z_VERSION_ERROR; + } + if (strm == Z_NULL) return Z_STREAM_ERROR; + + strm->msg = Z_NULL; + if (strm->zalloc == Z_NULL) { + strm->zalloc = zcalloc; + strm->opaque = (voidpf)0; + } + if (strm->zfree == Z_NULL) strm->zfree = zcfree; + + if (level == Z_DEFAULT_COMPRESSION) level = 6; +#ifdef FASTEST + level = 1; +#endif + + if (windowBits < 0) { /* undocumented feature: suppress zlib header */ + noheader = 1; + windowBits = -windowBits; + } + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || + windowBits < 9 || windowBits > 15 || level < 0 || level > 9 || + strategy < 0 || strategy > Z_HUFFMAN_ONLY) { + return Z_STREAM_ERROR; + } + s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state)); + if (s == Z_NULL) return Z_MEM_ERROR; + strm->state = (struct internal_state FAR *)s; + s->strm = strm; + + s->noheader = noheader; + s->w_bits = windowBits; + s->w_size = 1 << s->w_bits; + s->w_mask = s->w_size - 1; + + s->hash_bits = memLevel + 7; + s->hash_size = 1 << s->hash_bits; + s->hash_mask = s->hash_size - 1; + s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH); + + s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte)); + s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos)); + s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos)); + + s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ + + overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); + s->pending_buf = (uchf *) overlay; + s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L); + + if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || + s->pending_buf == Z_NULL) { + strm->msg = (char*)ERR_MSG(Z_MEM_ERROR); + deflateEnd (strm); + return Z_MEM_ERROR; + } + s->d_buf = overlay + s->lit_bufsize/sizeof(ush); + s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; + + s->level = level; + s->strategy = strategy; + s->method = (Byte)method; + + return deflateReset(strm); +} + +/* ========================================================================= */ +int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) + z_streamp strm; + const Bytef *dictionary; + uInt dictLength; +{ + deflate_state *s; + uInt length = dictLength; + uInt n; + IPos hash_head = 0; + + if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL || + strm->state->status != INIT_STATE) return Z_STREAM_ERROR; + + s = strm->state; + strm->adler = adler32(strm->adler, dictionary, dictLength); + + if (length < MIN_MATCH) return Z_OK; + if (length > MAX_DIST(s)) { + length = MAX_DIST(s); +#ifndef USE_DICT_HEAD + dictionary += dictLength - length; /* use the tail of the dictionary */ +#endif + } + zmemcpy(s->window, dictionary, length); + s->strstart = length; + s->block_start = (long)length; + + /* Insert all strings in the hash table (except for the last two bytes). + * s->lookahead stays null, so s->ins_h will be recomputed at the next + * call of fill_window. + */ + s->ins_h = s->window[0]; + UPDATE_HASH(s, s->ins_h, s->window[1]); + for (n = 0; n <= length - MIN_MATCH; n++) { + INSERT_STRING(s, n, hash_head); + } + if (hash_head) hash_head = 0; /* to make compiler happy */ + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflateReset (strm) + z_streamp strm; +{ + deflate_state *s; + + if (strm == Z_NULL || strm->state == Z_NULL || + strm->zalloc == Z_NULL || strm->zfree == Z_NULL) return Z_STREAM_ERROR; + + strm->total_in = strm->total_out = 0; + strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */ + strm->data_type = Z_UNKNOWN; + + s = (deflate_state *)strm->state; + s->pending = 0; + s->pending_out = s->pending_buf; + + if (s->noheader < 0) { + s->noheader = 0; /* was set to -1 by deflate(..., Z_FINISH); */ + } + s->status = s->noheader ? BUSY_STATE : INIT_STATE; + strm->adler = 1; + s->last_flush = Z_NO_FLUSH; + + _tr_init(s); + lm_init(s); + + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflateParams(strm, level, strategy) + z_streamp strm; + int level; + int strategy; +{ + deflate_state *s; + compress_func func; + int err = Z_OK; + + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + s = strm->state; + + if (level == Z_DEFAULT_COMPRESSION) { + level = 6; + } + if (level < 0 || level > 9 || strategy < 0 || strategy > Z_HUFFMAN_ONLY) { + return Z_STREAM_ERROR; + } + func = configuration_table[s->level].func; + + if (func != configuration_table[level].func && strm->total_in != 0) { + /* Flush the last buffer: */ + err = deflate(strm, Z_PARTIAL_FLUSH); + } + if (s->level != level) { + s->level = level; + s->max_lazy_match = configuration_table[level].max_lazy; + s->good_match = configuration_table[level].good_length; + s->nice_match = configuration_table[level].nice_length; + s->max_chain_length = configuration_table[level].max_chain; + } + s->strategy = strategy; + return err; +} + +/* ========================================================================= + * Put a short in the pending buffer. The 16-bit value is put in MSB order. + * IN assertion: the stream state is correct and there is enough room in + * pending_buf. + */ +local void putShortMSB (s, b) + deflate_state *s; + uInt b; +{ + put_byte(s, (Byte)(b >> 8)); + put_byte(s, (Byte)(b & 0xff)); +} + +/* ========================================================================= + * Flush as much pending output as possible. All deflate() output goes + * through this function so some applications may wish to modify it + * to avoid allocating a large strm->next_out buffer and copying into it. + * (See also read_buf()). + */ +local void flush_pending(strm) + z_streamp strm; +{ + unsigned len = strm->state->pending; + + if (len > strm->avail_out) len = strm->avail_out; + if (len == 0) return; + + zmemcpy(strm->next_out, strm->state->pending_out, len); + strm->next_out += len; + strm->state->pending_out += len; + strm->total_out += len; + strm->avail_out -= len; + strm->state->pending -= len; + if (strm->state->pending == 0) { + strm->state->pending_out = strm->state->pending_buf; + } +} + +/* ========================================================================= */ +int ZEXPORT deflate (strm, flush) + z_streamp strm; + int flush; +{ + int old_flush; /* value of flush param for previous deflate call */ + deflate_state *s; + + if (strm == Z_NULL || strm->state == Z_NULL || + flush > Z_FINISH || flush < 0) { + return Z_STREAM_ERROR; + } + s = strm->state; + + if (strm->next_out == Z_NULL || + (strm->next_in == Z_NULL && strm->avail_in != 0) || + (s->status == FINISH_STATE && flush != Z_FINISH)) { + ERR_RETURN(strm, Z_STREAM_ERROR); + } + if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR); + + s->strm = strm; /* just in case */ + old_flush = s->last_flush; + s->last_flush = flush; + + /* Write the zlib header */ + if (s->status == INIT_STATE) { + + uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8; + uInt level_flags = (s->level-1) >> 1; + + if (level_flags > 3) level_flags = 3; + header |= (level_flags << 6); + if (s->strstart != 0) header |= PRESET_DICT; + header += 31 - (header % 31); + + s->status = BUSY_STATE; + putShortMSB(s, header); + + /* Save the adler32 of the preset dictionary: */ + if (s->strstart != 0) { + putShortMSB(s, (uInt)(strm->adler >> 16)); + putShortMSB(s, (uInt)(strm->adler & 0xffff)); + } + strm->adler = 1L; + } + + /* Flush as much pending output as possible */ + if (s->pending != 0) { + flush_pending(strm); + if (strm->avail_out == 0) { + /* Since avail_out is 0, deflate will be called again with + * more output space, but possibly with both pending and + * avail_in equal to zero. There won't be anything to do, + * but this is not an error situation so make sure we + * return OK instead of BUF_ERROR at next call of deflate: + */ + s->last_flush = -1; + return Z_OK; + } + + /* Make sure there is something to do and avoid duplicate consecutive + * flushes. For repeated and useless calls with Z_FINISH, we keep + * returning Z_STREAM_END instead of Z_BUFF_ERROR. + */ + } else if (strm->avail_in == 0 && flush <= old_flush && + flush != Z_FINISH) { + ERR_RETURN(strm, Z_BUF_ERROR); + } + + /* User must not provide more input after the first FINISH: */ + if (s->status == FINISH_STATE && strm->avail_in != 0) { + ERR_RETURN(strm, Z_BUF_ERROR); + } + + /* Start a new block or continue the current one. + */ + if (strm->avail_in != 0 || s->lookahead != 0 || + (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) { + block_state bstate; + + bstate = (*(configuration_table[s->level].func))(s, flush); + + if (bstate == finish_started || bstate == finish_done) { + s->status = FINISH_STATE; + } + if (bstate == need_more || bstate == finish_started) { + if (strm->avail_out == 0) { + s->last_flush = -1; /* avoid BUF_ERROR next call, see above */ + } + return Z_OK; + /* If flush != Z_NO_FLUSH && avail_out == 0, the next call + * of deflate should use the same flush parameter to make sure + * that the flush is complete. So we don't have to output an + * empty block here, this will be done at next call. This also + * ensures that for a very small output buffer, we emit at most + * one empty block. + */ + } + if (bstate == block_done) { + if (flush == Z_PARTIAL_FLUSH) { + _tr_align(s); + } else { /* FULL_FLUSH or SYNC_FLUSH */ + _tr_stored_block(s, (char*)0, 0L, 0); + /* For a full flush, this empty block will be recognized + * as a special marker by inflate_sync(). + */ + if (flush == Z_FULL_FLUSH) { + CLEAR_HASH(s); /* forget history */ + } + } + flush_pending(strm); + if (strm->avail_out == 0) { + s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */ + return Z_OK; + } + } + } + Assert(strm->avail_out > 0, "bug2"); + + if (flush != Z_FINISH) return Z_OK; + if (s->noheader) return Z_STREAM_END; + + /* Write the zlib trailer (adler32) */ + putShortMSB(s, (uInt)(strm->adler >> 16)); + putShortMSB(s, (uInt)(strm->adler & 0xffff)); + flush_pending(strm); + /* If avail_out is zero, the application will call deflate again + * to flush the rest. + */ + s->noheader = -1; /* write the trailer only once! */ + return s->pending != 0 ? Z_OK : Z_STREAM_END; +} + +/* ========================================================================= */ +int ZEXPORT deflateEnd (strm) + z_streamp strm; +{ + int status; + + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + + status = strm->state->status; + if (status != INIT_STATE && status != BUSY_STATE && + status != FINISH_STATE) { + return Z_STREAM_ERROR; + } + + /* Deallocate in reverse order of allocations: */ + TRY_FREE(strm, strm->state->pending_buf); + TRY_FREE(strm, strm->state->head); + TRY_FREE(strm, strm->state->prev); + TRY_FREE(strm, strm->state->window); + + ZFREE(strm, strm->state); + strm->state = Z_NULL; + + return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK; +} + +/* ========================================================================= + * Copy the source state to the destination state. + * To simplify the source, this is not supported for 16-bit MSDOS (which + * doesn't have enough memory anyway to duplicate compression states). + */ +int ZEXPORT deflateCopy (dest, source) + z_streamp dest; + z_streamp source; +{ +#ifdef MAXSEG_64K + return Z_STREAM_ERROR; +#else + deflate_state *ds; + deflate_state *ss; + ushf *overlay; + + + if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) { + return Z_STREAM_ERROR; + } + + ss = source->state; + + *dest = *source; + + ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state)); + if (ds == Z_NULL) return Z_MEM_ERROR; + dest->state = (struct internal_state FAR *) ds; + *ds = *ss; + ds->strm = dest; + + ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte)); + ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos)); + ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos)); + overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2); + ds->pending_buf = (uchf *) overlay; + + if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL || + ds->pending_buf == Z_NULL) { + deflateEnd (dest); + return Z_MEM_ERROR; + } + /* following zmemcpy do not work for 16-bit MSDOS */ + zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte)); + zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos)); + zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos)); + zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size); + + ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf); + ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush); + ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize; + + ds->l_desc.dyn_tree = ds->dyn_ltree; + ds->d_desc.dyn_tree = ds->dyn_dtree; + ds->bl_desc.dyn_tree = ds->bl_tree; + + return Z_OK; +#endif +} + +/* =========================================================================== + * Read a new buffer from the current input stream, update the adler32 + * and total number of bytes read. All deflate() input goes through + * this function so some applications may wish to modify it to avoid + * allocating a large strm->next_in buffer and copying from it. + * (See also flush_pending()). + */ +local int read_buf(strm, buf, size) + z_streamp strm; + Bytef *buf; + unsigned size; +{ + unsigned len = strm->avail_in; + + if (len > size) len = size; + if (len == 0) return 0; + + strm->avail_in -= len; + + if (!strm->state->noheader) { + strm->adler = adler32(strm->adler, strm->next_in, len); + } + zmemcpy(buf, strm->next_in, len); + strm->next_in += len; + strm->total_in += len; + + return (int)len; +} + +/* =========================================================================== + * Initialize the "longest match" routines for a new zlib stream + */ +local void lm_init (s) + deflate_state *s; +{ + s->window_size = (ulg)2L*s->w_size; + + CLEAR_HASH(s); + + /* Set the default configuration parameters: + */ + s->max_lazy_match = configuration_table[s->level].max_lazy; + s->good_match = configuration_table[s->level].good_length; + s->nice_match = configuration_table[s->level].nice_length; + s->max_chain_length = configuration_table[s->level].max_chain; + + s->strstart = 0; + s->block_start = 0L; + s->lookahead = 0; + s->match_length = s->prev_length = MIN_MATCH-1; + s->match_available = 0; + s->ins_h = 0; +#ifdef ASMV + match_init(); /* initialize the asm code */ +#endif +} + +/* =========================================================================== + * Set match_start to the longest match starting at the given string and + * return its length. Matches shorter or equal to prev_length are discarded, + * in which case the result is equal to prev_length and match_start is + * garbage. + * IN assertions: cur_match is the head of the hash chain for the current + * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 + * OUT assertion: the match length is not greater than s->lookahead. + */ +#ifndef ASMV +/* For 80x86 and 680x0, an optimized version will be provided in match.asm or + * match.S. The code will be functionally equivalent. + */ +#ifndef FASTEST +local uInt longest_match(s, cur_match) + deflate_state *s; + IPos cur_match; /* current match */ +{ + unsigned chain_length = s->max_chain_length;/* max hash chain length */ + register Bytef *scan = s->window + s->strstart; /* current string */ + register Bytef *match; /* matched string */ + register int len; /* length of current match */ + int best_len = s->prev_length; /* best match length so far */ + int nice_match = s->nice_match; /* stop if match long enough */ + IPos limit = s->strstart > (IPos)MAX_DIST(s) ? + s->strstart - (IPos)MAX_DIST(s) : NIL; + /* Stop when cur_match becomes <= limit. To simplify the code, + * we prevent matches with the string of window index 0. + */ + Posf *prev = s->prev; + uInt wmask = s->w_mask; + +#ifdef UNALIGNED_OK + /* Compare two bytes at a time. Note: this is not always beneficial. + * Try with and without -DUNALIGNED_OK to check. + */ + register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; + register ush scan_start = *(ushf*)scan; + register ush scan_end = *(ushf*)(scan+best_len-1); +#else + register Bytef *strend = s->window + s->strstart + MAX_MATCH; + register Byte scan_end1 = scan[best_len-1]; + register Byte scan_end = scan[best_len]; +#endif + + /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ + Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); + + /* Do not waste too much time if we already have a good match: */ + if (s->prev_length >= s->good_match) { + chain_length >>= 2; + } + /* Do not look for matches beyond the end of the input. This is necessary + * to make deflate deterministic. + */ + if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; + + Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); + + do { + Assert(cur_match < s->strstart, "no future"); + match = s->window + cur_match; + + /* Skip to next match if the match length cannot increase + * or if the match length is less than 2: + */ +#if (defined(UNALIGNED_OK) && MAX_MATCH == 258) + /* This code assumes sizeof(unsigned short) == 2. Do not use + * UNALIGNED_OK if your compiler uses a different size. + */ + if (*(ushf*)(match+best_len-1) != scan_end || + *(ushf*)match != scan_start) continue; + + /* It is not necessary to compare scan[2] and match[2] since they are + * always equal when the other bytes match, given that the hash keys + * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at + * strstart+3, +5, ... up to strstart+257. We check for insufficient + * lookahead only every 4th comparison; the 128th check will be made + * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is + * necessary to put more guard bytes at the end of the window, or + * to check more often for insufficient lookahead. + */ + Assert(scan[2] == match[2], "scan[2]?"); + scan++, match++; + do { + } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) && + *(ushf*)(scan+=2) == *(ushf*)(match+=2) && + *(ushf*)(scan+=2) == *(ushf*)(match+=2) && + *(ushf*)(scan+=2) == *(ushf*)(match+=2) && + scan < strend); + /* The funny "do {}" generates better code on most compilers */ + + /* Here, scan <= window+strstart+257 */ + Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + if (*scan == *match) scan++; + + len = (MAX_MATCH - 1) - (int)(strend-scan); + scan = strend - (MAX_MATCH-1); + +#else /* UNALIGNED_OK */ + + if (match[best_len] != scan_end || + match[best_len-1] != scan_end1 || + *match != *scan || + *++match != scan[1]) continue; + + /* The check at best_len-1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2, match++; + Assert(*scan == *match, "match[2]?"); + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart+258. + */ + do { + } while (*++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + scan < strend); + + Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + + len = MAX_MATCH - (int)(strend - scan); + scan = strend - MAX_MATCH; + +#endif /* UNALIGNED_OK */ + + if (len > best_len) { + s->match_start = cur_match; + best_len = len; + if (len >= nice_match) break; +#ifdef UNALIGNED_OK + scan_end = *(ushf*)(scan+best_len-1); +#else + scan_end1 = scan[best_len-1]; + scan_end = scan[best_len]; +#endif + } + } while ((cur_match = prev[cur_match & wmask]) > limit + && --chain_length != 0); + + if ((uInt)best_len <= s->lookahead) return (uInt)best_len; + return s->lookahead; +} + +#else /* FASTEST */ +/* --------------------------------------------------------------------------- + * Optimized version for level == 1 only + */ +local uInt longest_match(s, cur_match) + deflate_state *s; + IPos cur_match; /* current match */ +{ + register Bytef *scan = s->window + s->strstart; /* current string */ + register Bytef *match; /* matched string */ + register int len; /* length of current match */ + register Bytef *strend = s->window + s->strstart + MAX_MATCH; + + /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ + Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); + + Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); + + Assert(cur_match < s->strstart, "no future"); + + match = s->window + cur_match; + + /* Return failure if the match length is less than 2: + */ + if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1; + + /* The check at best_len-1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2, match += 2; + Assert(*scan == *match, "match[2]?"); + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart+258. + */ + do { + } while (*++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + scan < strend); + + Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + + len = MAX_MATCH - (int)(strend - scan); + + if (len < MIN_MATCH) return MIN_MATCH - 1; + + s->match_start = cur_match; + return len <= s->lookahead ? len : s->lookahead; +} +#endif /* FASTEST */ +#endif /* ASMV */ + +#ifdef DEBUG +/* =========================================================================== + * Check that the match at match_start is indeed a match. + */ +local void check_match(s, start, match, length) + deflate_state *s; + IPos start, match; + int length; +{ + /* check that the match is indeed a match */ + if (zmemcmp(s->window + match, + s->window + start, length) != EQUAL) { + fprintf(stderr, " start %u, match %u, length %d\n", + start, match, length); + do { + fprintf(stderr, "%c%c", s->window[match++], s->window[start++]); + } while (--length != 0); + z_error("invalid match"); + } + if (z_verbose > 1) { + fprintf(stderr,"\\[%d,%d]", start-match, length); + do { putc(s->window[start++], stderr); } while (--length != 0); + } +} +#else +# define check_match(s, start, match, length) +#endif + +/* =========================================================================== + * Fill the window when the lookahead becomes insufficient. + * Updates strstart and lookahead. + * + * IN assertion: lookahead < MIN_LOOKAHEAD + * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD + * At least one byte has been read, or avail_in == 0; reads are + * performed for at least two bytes (required for the zip translate_eol + * option -- not supported here). + */ +local void fill_window(s) + deflate_state *s; +{ + register unsigned n, m; + register Posf *p; + unsigned more; /* Amount of free space at the end of the window. */ + uInt wsize = s->w_size; + + do { + more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart); + + /* Deal with !@#$% 64K limit: */ + if (more == 0 && s->strstart == 0 && s->lookahead == 0) { + more = wsize; + + } else if (more == (unsigned)(-1)) { + /* Very unlikely, but possible on 16 bit machine if strstart == 0 + * and lookahead == 1 (input done one byte at time) + */ + more--; + + /* If the window is almost full and there is insufficient lookahead, + * move the upper half to the lower one to make room in the upper half. + */ + } else if (s->strstart >= wsize+MAX_DIST(s)) { + + zmemcpy(s->window, s->window+wsize, (unsigned)wsize); + s->match_start -= wsize; + s->strstart -= wsize; /* we now have strstart >= MAX_DIST */ + s->block_start -= (long) wsize; + + /* Slide the hash table (could be avoided with 32 bit values + at the expense of memory usage). We slide even when level == 0 + to keep the hash table consistent if we switch back to level > 0 + later. (Using level 0 permanently is not an optimal usage of + zlib, so we don't care about this pathological case.) + */ + n = s->hash_size; + p = &s->head[n]; + do { + m = *--p; + *p = (Pos)(m >= wsize ? m-wsize : NIL); + } while (--n); + + n = wsize; +#ifndef FASTEST + p = &s->prev[n]; + do { + m = *--p; + *p = (Pos)(m >= wsize ? m-wsize : NIL); + /* If n is not on any hash chain, prev[n] is garbage but + * its value will never be used. + */ + } while (--n); +#endif + more += wsize; + } + if (s->strm->avail_in == 0) return; + + /* If there was no sliding: + * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && + * more == window_size - lookahead - strstart + * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) + * => more >= window_size - 2*WSIZE + 2 + * In the BIG_MEM or MMAP case (not yet supported), + * window_size == input_size + MIN_LOOKAHEAD && + * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. + * Otherwise, window_size == 2*WSIZE so more >= 2. + * If there was sliding, more >= WSIZE. So in all cases, more >= 2. + */ + Assert(more >= 2, "more < 2"); + + n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more); + s->lookahead += n; + + /* Initialize the hash value now that we have some input: */ + if (s->lookahead >= MIN_MATCH) { + s->ins_h = s->window[s->strstart]; + UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]); +#if MIN_MATCH != 3 + Call UPDATE_HASH() MIN_MATCH-3 more times +#endif + } + /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, + * but this is not important since only literal bytes will be emitted. + */ + + } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); +} + +/* =========================================================================== + * Flush the current block, with given end-of-file flag. + * IN assertion: strstart is set to the end of the current match. + */ +#define FLUSH_BLOCK_ONLY(s, eof) { \ + _tr_flush_block(s, (s->block_start >= 0L ? \ + (charf *)&s->window[(unsigned)s->block_start] : \ + (charf *)Z_NULL), \ + (ulg)((long)s->strstart - s->block_start), \ + (eof)); \ + s->block_start = s->strstart; \ + flush_pending(s->strm); \ + Tracev((stderr,"[FLUSH]")); \ +} + +/* Same but force premature exit if necessary. */ +#define FLUSH_BLOCK(s, eof) { \ + FLUSH_BLOCK_ONLY(s, eof); \ + if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \ +} + +/* =========================================================================== + * Copy without compression as much as possible from the input stream, return + * the current block state. + * This function does not insert new strings in the dictionary since + * uncompressible data is probably not useful. This function is used + * only for the level=0 compression option. + * NOTE: this function should be optimized to avoid extra copying from + * window to pending_buf. + */ +local block_state deflate_stored(s, flush) + deflate_state *s; + int flush; +{ + /* Stored blocks are limited to 0xffff bytes, pending_buf is limited + * to pending_buf_size, and each stored block has a 5 byte header: + */ + ulg max_block_size = 0xffff; + ulg max_start; + + if (max_block_size > s->pending_buf_size - 5) { + max_block_size = s->pending_buf_size - 5; + } + + /* Copy as much as possible from input to output: */ + for (;;) { + /* Fill the window as much as possible: */ + if (s->lookahead <= 1) { + + Assert(s->strstart < s->w_size+MAX_DIST(s) || + s->block_start >= (long)s->w_size, "slide too late"); + + fill_window(s); + if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more; + + if (s->lookahead == 0) break; /* flush the current block */ + } + Assert(s->block_start >= 0L, "block gone"); + + s->strstart += s->lookahead; + s->lookahead = 0; + + /* Emit a stored block if pending_buf will be full: */ + max_start = s->block_start + max_block_size; + if (s->strstart == 0 || (ulg)s->strstart >= max_start) { + /* strstart == 0 is possible when wraparound on 16-bit machine */ + s->lookahead = (uInt)(s->strstart - max_start); + s->strstart = (uInt)max_start; + FLUSH_BLOCK(s, 0); + } + /* Flush if we may have to slide, otherwise block_start may become + * negative and the data will be gone: + */ + if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) { + FLUSH_BLOCK(s, 0); + } + } + FLUSH_BLOCK(s, flush == Z_FINISH); + return flush == Z_FINISH ? finish_done : block_done; +} + +/* =========================================================================== + * Compress as much as possible from the input stream, return the current + * block state. + * This function does not perform lazy evaluation of matches and inserts + * new strings in the dictionary only for unmatched strings or for short + * matches. It is used only for the fast compression options. + */ +local block_state deflate_fast(s, flush) + deflate_state *s; + int flush; +{ + IPos hash_head = NIL; /* head of the hash chain */ + int bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s->lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { + return need_more; + } + if (s->lookahead == 0) break; /* flush the current block */ + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + if (s->lookahead >= MIN_MATCH) { + INSERT_STRING(s, s->strstart, hash_head); + } + + /* Find the longest match, discarding those <= prev_length. + * At this point we have always match_length < MIN_MATCH + */ + if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + if (s->strategy != Z_HUFFMAN_ONLY) { + s->match_length = longest_match (s, hash_head); + } + /* longest_match() sets match_start */ + } + if (s->match_length >= MIN_MATCH) { + check_match(s, s->strstart, s->match_start, s->match_length); + + _tr_tally_dist(s, s->strstart - s->match_start, + s->match_length - MIN_MATCH, bflush); + + s->lookahead -= s->match_length; + + /* Insert new strings in the hash table only if the match length + * is not too large. This saves time but degrades compression. + */ +#ifndef FASTEST + if (s->match_length <= s->max_insert_length && + s->lookahead >= MIN_MATCH) { + s->match_length--; /* string at strstart already in hash table */ + do { + s->strstart++; + INSERT_STRING(s, s->strstart, hash_head); + /* strstart never exceeds WSIZE-MAX_MATCH, so there are + * always MIN_MATCH bytes ahead. + */ + } while (--s->match_length != 0); + s->strstart++; + } else +#endif + { + s->strstart += s->match_length; + s->match_length = 0; + s->ins_h = s->window[s->strstart]; + UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]); +#if MIN_MATCH != 3 + Call UPDATE_HASH() MIN_MATCH-3 more times +#endif + /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not + * matter since it will be recomputed at next deflate call. + */ + } + } else { + /* No match, output a literal byte */ + Tracevv((stderr,"%c", s->window[s->strstart])); + _tr_tally_lit (s, s->window[s->strstart], bflush); + s->lookahead--; + s->strstart++; + } + if (bflush) FLUSH_BLOCK(s, 0); + } + FLUSH_BLOCK(s, flush == Z_FINISH); + return flush == Z_FINISH ? finish_done : block_done; +} + +/* =========================================================================== + * Same as above, but achieves better compression. We use a lazy + * evaluation for matches: a match is finally adopted only if there is + * no better match at the next window position. + */ +local block_state deflate_slow(s, flush) + deflate_state *s; + int flush; +{ + IPos hash_head = NIL; /* head of hash chain */ + int bflush; /* set if current block must be flushed */ + + /* Process the input block. */ + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s->lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { + return need_more; + } + if (s->lookahead == 0) break; /* flush the current block */ + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + if (s->lookahead >= MIN_MATCH) { + INSERT_STRING(s, s->strstart, hash_head); + } + + /* Find the longest match, discarding those <= prev_length. + */ + s->prev_length = s->match_length, s->prev_match = s->match_start; + s->match_length = MIN_MATCH-1; + + if (hash_head != NIL && s->prev_length < s->max_lazy_match && + s->strstart - hash_head <= MAX_DIST(s)) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + if (s->strategy != Z_HUFFMAN_ONLY) { + s->match_length = longest_match (s, hash_head); + } + /* longest_match() sets match_start */ + + if (s->match_length <= 5 && (s->strategy == Z_FILTERED || + (s->match_length == MIN_MATCH && + s->strstart - s->match_start > TOO_FAR))) { + + /* If prev_match is also MIN_MATCH, match_start is garbage + * but we will ignore the current match anyway. + */ + s->match_length = MIN_MATCH-1; + } + } + /* If there was a match at the previous step and the current + * match is not better, output the previous match: + */ + if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) { + uInt max_insert = s->strstart + s->lookahead - MIN_MATCH; + /* Do not insert strings in hash table beyond this. */ + + check_match(s, s->strstart-1, s->prev_match, s->prev_length); + + _tr_tally_dist(s, s->strstart -1 - s->prev_match, + s->prev_length - MIN_MATCH, bflush); + + /* Insert in hash table all strings up to the end of the match. + * strstart-1 and strstart are already inserted. If there is not + * enough lookahead, the last two strings are not inserted in + * the hash table. + */ + s->lookahead -= s->prev_length-1; + s->prev_length -= 2; + do { + if (++s->strstart <= max_insert) { + INSERT_STRING(s, s->strstart, hash_head); + } + } while (--s->prev_length != 0); + s->match_available = 0; + s->match_length = MIN_MATCH-1; + s->strstart++; + + if (bflush) FLUSH_BLOCK(s, 0); + + } else if (s->match_available) { + /* If there was no match at the previous position, output a + * single literal. If there was a match but the current match + * is longer, truncate the previous match to a single literal. + */ + Tracevv((stderr,"%c", s->window[s->strstart-1])); + _tr_tally_lit(s, s->window[s->strstart-1], bflush); + if (bflush) { + FLUSH_BLOCK_ONLY(s, 0); + } + s->strstart++; + s->lookahead--; + if (s->strm->avail_out == 0) return need_more; + } else { + /* There is no previous match to compare with, wait for + * the next step to decide. + */ + s->match_available = 1; + s->strstart++; + s->lookahead--; + } + } + Assert (flush != Z_NO_FLUSH, "no flush?"); + if (s->match_available) { + Tracevv((stderr,"%c", s->window[s->strstart-1])); + _tr_tally_lit(s, s->window[s->strstart-1], bflush); + s->match_available = 0; + } + FLUSH_BLOCK(s, flush == Z_FINISH); + return flush == Z_FINISH ? finish_done : block_done; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/deflate.h pcsxr-unstable-1.9.94+svn98108/win32/zlib/deflate.h --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/deflate.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/deflate.h 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,318 @@ +/* deflate.h -- internal compression state + * Copyright (C) 1995-2002 Jean-loup Gailly + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* @(#) $Id$ */ + +#ifndef _DEFLATE_H +#define _DEFLATE_H + +#include "zutil.h" + +/* =========================================================================== + * Internal compression state. + */ + +#define LENGTH_CODES 29 +/* number of length codes, not counting the special END_BLOCK code */ + +#define LITERALS 256 +/* number of literal bytes 0..255 */ + +#define L_CODES (LITERALS+1+LENGTH_CODES) +/* number of Literal or Length codes, including the END_BLOCK code */ + +#define D_CODES 30 +/* number of distance codes */ + +#define BL_CODES 19 +/* number of codes used to transfer the bit lengths */ + +#define HEAP_SIZE (2*L_CODES+1) +/* maximum heap size */ + +#define MAX_BITS 15 +/* All codes must not exceed MAX_BITS bits */ + +#define INIT_STATE 42 +#define BUSY_STATE 113 +#define FINISH_STATE 666 +/* Stream status */ + + +/* Data structure describing a single value and its code string. */ +typedef struct ct_data_s { + union { + ush freq; /* frequency count */ + ush code; /* bit string */ + } fc; + union { + ush dad; /* father node in Huffman tree */ + ush len; /* length of bit string */ + } dl; +} FAR ct_data; + +#define Freq fc.freq +#define Code fc.code +#define Dad dl.dad +#define Len dl.len + +typedef struct static_tree_desc_s static_tree_desc; + +typedef struct tree_desc_s { + ct_data *dyn_tree; /* the dynamic tree */ + int max_code; /* largest code with non zero frequency */ + static_tree_desc *stat_desc; /* the corresponding static tree */ +} FAR tree_desc; + +typedef ush Pos; +typedef Pos FAR Posf; +typedef unsigned IPos; + +/* A Pos is an index in the character window. We use short instead of int to + * save space in the various tables. IPos is used only for parameter passing. + */ + +typedef struct internal_state { + z_streamp strm; /* pointer back to this zlib stream */ + int status; /* as the name implies */ + Bytef *pending_buf; /* output still pending */ + ulg pending_buf_size; /* size of pending_buf */ + Bytef *pending_out; /* next pending byte to output to the stream */ + int pending; /* nb of bytes in the pending buffer */ + int noheader; /* suppress zlib header and adler32 */ + Byte data_type; /* UNKNOWN, BINARY or ASCII */ + Byte method; /* STORED (for zip only) or DEFLATED */ + int last_flush; /* value of flush param for previous deflate call */ + + /* used by deflate.c: */ + + uInt w_size; /* LZ77 window size (32K by default) */ + uInt w_bits; /* log2(w_size) (8..16) */ + uInt w_mask; /* w_size - 1 */ + + Bytef *window; + /* Sliding window. Input bytes are read into the second half of the window, + * and move to the first half later to keep a dictionary of at least wSize + * bytes. With this organization, matches are limited to a distance of + * wSize-MAX_MATCH bytes, but this ensures that IO is always + * performed with a length multiple of the block size. Also, it limits + * the window size to 64K, which is quite useful on MSDOS. + * To do: use the user input buffer as sliding window. + */ + + ulg window_size; + /* Actual size of window: 2*wSize, except when the user input buffer + * is directly used as sliding window. + */ + + Posf *prev; + /* Link to older string with same hash index. To limit the size of this + * array to 64K, this link is maintained only for the last 32K strings. + * An index in this array is thus a window index modulo 32K. + */ + + Posf *head; /* Heads of the hash chains or NIL. */ + + uInt ins_h; /* hash index of string to be inserted */ + uInt hash_size; /* number of elements in hash table */ + uInt hash_bits; /* log2(hash_size) */ + uInt hash_mask; /* hash_size-1 */ + + uInt hash_shift; + /* Number of bits by which ins_h must be shifted at each input + * step. It must be such that after MIN_MATCH steps, the oldest + * byte no longer takes part in the hash key, that is: + * hash_shift * MIN_MATCH >= hash_bits + */ + + long block_start; + /* Window position at the beginning of the current output block. Gets + * negative when the window is moved backwards. + */ + + uInt match_length; /* length of best match */ + IPos prev_match; /* previous match */ + int match_available; /* set if previous match exists */ + uInt strstart; /* start of string to insert */ + uInt match_start; /* start of matching string */ + uInt lookahead; /* number of valid bytes ahead in window */ + + uInt prev_length; + /* Length of the best match at previous step. Matches not greater than this + * are discarded. This is used in the lazy match evaluation. + */ + + uInt max_chain_length; + /* To speed up deflation, hash chains are never searched beyond this + * length. A higher limit improves compression ratio but degrades the + * speed. + */ + + uInt max_lazy_match; + /* Attempt to find a better match only when the current match is strictly + * smaller than this value. This mechanism is used only for compression + * levels >= 4. + */ +# define max_insert_length max_lazy_match + /* Insert new strings in the hash table only if the match length is not + * greater than this length. This saves time but degrades compression. + * max_insert_length is used only for compression levels <= 3. + */ + + int level; /* compression level (1..9) */ + int strategy; /* favor or force Huffman coding*/ + + uInt good_match; + /* Use a faster search when the previous match is longer than this */ + + int nice_match; /* Stop searching when current match exceeds this */ + + /* used by trees.c: */ + /* Didn't use ct_data typedef below to supress compiler warning */ + struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ + struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ + struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ + + struct tree_desc_s l_desc; /* desc. for literal tree */ + struct tree_desc_s d_desc; /* desc. for distance tree */ + struct tree_desc_s bl_desc; /* desc. for bit length tree */ + + ush bl_count[MAX_BITS+1]; + /* number of codes at each bit length for an optimal tree */ + + int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ + int heap_len; /* number of elements in the heap */ + int heap_max; /* element of largest frequency */ + /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. + * The same heap array is used to build all trees. + */ + + uch depth[2*L_CODES+1]; + /* Depth of each subtree used as tie breaker for trees of equal frequency + */ + + uchf *l_buf; /* buffer for literals or lengths */ + + uInt lit_bufsize; + /* Size of match buffer for literals/lengths. There are 4 reasons for + * limiting lit_bufsize to 64K: + * - frequencies can be kept in 16 bit counters + * - if compression is not successful for the first block, all input + * data is still in the window so we can still emit a stored block even + * when input comes from standard input. (This can also be done for + * all blocks if lit_bufsize is not greater than 32K.) + * - if compression is not successful for a file smaller than 64K, we can + * even emit a stored file instead of a stored block (saving 5 bytes). + * This is applicable only for zip (not gzip or zlib). + * - creating new Huffman trees less frequently may not provide fast + * adaptation to changes in the input data statistics. (Take for + * example a binary file with poorly compressible code followed by + * a highly compressible string table.) Smaller buffer sizes give + * fast adaptation but have of course the overhead of transmitting + * trees more frequently. + * - I can't count above 4 + */ + + uInt last_lit; /* running index in l_buf */ + + ushf *d_buf; + /* Buffer for distances. To simplify the code, d_buf and l_buf have + * the same number of elements. To use different lengths, an extra flag + * array would be necessary. + */ + + ulg opt_len; /* bit length of current block with optimal trees */ + ulg static_len; /* bit length of current block with static trees */ + uInt matches; /* number of string matches in current block */ + int last_eob_len; /* bit length of EOB code for last block */ + +#ifdef DEBUG + ulg compressed_len; /* total bit length of compressed file mod 2^32 */ + ulg bits_sent; /* bit length of compressed data sent mod 2^32 */ +#endif + + ush bi_buf; + /* Output buffer. bits are inserted starting at the bottom (least + * significant bits). + */ + int bi_valid; + /* Number of valid bits in bi_buf. All bits above the last valid bit + * are always zero. + */ + +} FAR deflate_state; + +/* Output a byte on the stream. + * IN assertion: there is enough room in pending_buf. + */ +#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);} + + +#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) +/* Minimum amount of lookahead, except at the end of the input file. + * See deflate.c for comments about the MIN_MATCH+1. + */ + +#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD) +/* In order to simplify the code, particularly on 16 bit machines, match + * distances are limited to MAX_DIST instead of WSIZE. + */ + + /* in trees.c */ +void _tr_init OF((deflate_state *s)); +int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); +void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len, + int eof)); +void _tr_align OF((deflate_state *s)); +void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len, + int eof)); + +#define d_code(dist) \ + ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) +/* Mapping from a distance to a distance code. dist is the distance - 1 and + * must not have side effects. _dist_code[256] and _dist_code[257] are never + * used. + */ + +#ifndef DEBUG +/* Inline versions of _tr_tally for speed: */ + +#if defined(GEN_TREES_H) || !defined(STDC) + extern uch _length_code[]; + extern uch _dist_code[]; +#else + extern const uch _length_code[]; + extern const uch _dist_code[]; +#endif + +# define _tr_tally_lit(s, c, flush) \ + { uch cc = (c); \ + s->d_buf[s->last_lit] = 0; \ + s->l_buf[s->last_lit++] = cc; \ + s->dyn_ltree[cc].Freq++; \ + flush = (s->last_lit == s->lit_bufsize-1); \ + } +# define _tr_tally_dist(s, distance, length, flush) \ + { uch len = (length); \ + ush dist = (distance); \ + s->d_buf[s->last_lit] = dist; \ + s->l_buf[s->last_lit++] = len; \ + dist--; \ + s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ + s->dyn_dtree[d_code(dist)].Freq++; \ + flush = (s->last_lit == s->lit_bufsize-1); \ + } +#else +# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c) +# define _tr_tally_dist(s, distance, length, flush) \ + flush = _tr_tally(s, distance, length) +#endif + +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/gzio.c pcsxr-unstable-1.9.94+svn98108/win32/zlib/gzio.c --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/gzio.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/gzio.c 2016-06-30 16:53:27.000000000 +0000 @@ -0,0 +1,879 @@ +/* gzio.c -- IO on .gz files + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + * + * Compile this file with -DNO_DEFLATE to avoid the compression code. + */ + +/* @(#) $Id$ */ + +#include + +#include "zutil.h" + +#ifdef _MSC_VER +#pragma warning (disable:4996) +#endif + +struct internal_state {int dummy;}; /* for buggy compilers */ + +#ifndef Z_BUFSIZE +# ifdef MAXSEG_64K +# define Z_BUFSIZE 4096 /* minimize memory usage for 16-bit DOS */ +# else +# define Z_BUFSIZE 16384 +# endif +#endif +#ifndef Z_PRINTF_BUFSIZE +# define Z_PRINTF_BUFSIZE 4096 +#endif + +#define ALLOC(size) malloc(size) +#define TRYFREE(p) {if (p) free(p);} + +static int gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */ + +/* gzip flag byte */ +#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */ +#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */ +#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ +#define ORIG_NAME 0x08 /* bit 3 set: original file name present */ +#define COMMENT 0x10 /* bit 4 set: file comment present */ +#define RESERVED 0xE0 /* bits 5..7: reserved */ + +typedef struct gz_stream { + z_stream stream; + int z_err; /* error code for last stream operation */ + int z_eof; /* set if end of input file */ + FILE *file; /* .gz file */ + Byte *inbuf; /* input buffer */ + Byte *outbuf; /* output buffer */ + uLong crc; /* crc32 of uncompressed data */ + char *msg; /* error message */ + char *path; /* path name for debugging only */ + int transparent; /* 1 if input file is not a .gz file */ + char mode; /* 'w' or 'r' */ + long startpos; /* start of compressed data in file (header skipped) */ +} gz_stream; + + +local gzFile gz_open OF((const char *path, const char *mode, int fd)); +local int do_flush OF((gzFile file, int flush)); +local int get_byte OF((gz_stream *s)); +local void check_header OF((gz_stream *s)); +local int destroy OF((gz_stream *s)); +local void putLong OF((FILE *file, uLong x)); +local uLong getLong OF((gz_stream *s)); + +/* =========================================================================== + Opens a gzip (.gz) file for reading or writing. The mode parameter + is as in fopen ("rb" or "wb"). The file is given either by file descriptor + or path name (if fd == -1). + gz_open return NULL if the file could not be opened or if there was + insufficient memory to allocate the (de)compression state; errno + can be checked to distinguish the two cases (if errno is zero, the + zlib error is Z_MEM_ERROR). +*/ +local gzFile gz_open (path, mode, fd) + const char *path; + const char *mode; + int fd; +{ + int err; + int level = Z_DEFAULT_COMPRESSION; /* compression level */ + int strategy = Z_DEFAULT_STRATEGY; /* compression strategy */ + char *p = (char*)mode; + gz_stream *s; + char fmode[80]; /* copy of mode, without the compression level */ + char *m = fmode; + + if (!path || !mode) return Z_NULL; + + s = (gz_stream *)ALLOC(sizeof(gz_stream)); + if (!s) return Z_NULL; + + s->stream.zalloc = (alloc_func)0; + s->stream.zfree = (free_func)0; + s->stream.opaque = (voidpf)0; + s->stream.next_in = s->inbuf = Z_NULL; + s->stream.next_out = s->outbuf = Z_NULL; + s->stream.avail_in = s->stream.avail_out = 0; + s->file = NULL; + s->z_err = Z_OK; + s->z_eof = 0; + s->crc = crc32(0L, Z_NULL, 0); + s->msg = NULL; + s->transparent = 0; + + s->path = (char*)ALLOC(strlen(path)+1); + if (s->path == NULL) { + return destroy(s), (gzFile)Z_NULL; + } + strcpy(s->path, path); /* do this early for debugging */ + + s->mode = '\0'; + do { + if (*p == 'r') s->mode = 'r'; + if (*p == 'w' || *p == 'a') s->mode = 'w'; + if (*p >= '0' && *p <= '9') { + level = *p - '0'; + } else if (*p == 'f') { + strategy = Z_FILTERED; + } else if (*p == 'h') { + strategy = Z_HUFFMAN_ONLY; + } else { + *m++ = *p; /* copy the mode */ + } + } while (*p++ && m != fmode + sizeof(fmode)); + if (s->mode == '\0') return destroy(s), (gzFile)Z_NULL; + + if (s->mode == 'w') { +#ifdef NO_DEFLATE + err = Z_STREAM_ERROR; +#else + err = deflateInit2(&(s->stream), level, + Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, strategy); + /* windowBits is passed < 0 to suppress zlib header */ + + s->stream.next_out = s->outbuf = (Byte*)ALLOC(Z_BUFSIZE); +#endif + if (err != Z_OK || s->outbuf == Z_NULL) { + return destroy(s), (gzFile)Z_NULL; + } + } else { + s->stream.next_in = s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); + + err = inflateInit2(&(s->stream), -MAX_WBITS); + /* windowBits is passed < 0 to tell that there is no zlib header. + * Note that in this case inflate *requires* an extra "dummy" byte + * after the compressed stream in order to complete decompression and + * return Z_STREAM_END. Here the gzip CRC32 ensures that 4 bytes are + * present after the compressed stream. + */ + if (err != Z_OK || s->inbuf == Z_NULL) { + return destroy(s), (gzFile)Z_NULL; + } + } + s->stream.avail_out = Z_BUFSIZE; + + errno = 0; + s->file = fd < 0 ? F_OPEN(path, fmode) : (FILE*)fdopen(fd, fmode); + + if (s->file == NULL) { + return destroy(s), (gzFile)Z_NULL; + } + if (s->mode == 'w') { + /* Write a very simple .gz header: + */ + fprintf(s->file, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1], + Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE); + s->startpos = 10L; + /* We use 10L instead of ftell(s->file) to because ftell causes an + * fflush on some systems. This version of the library doesn't use + * startpos anyway in write mode, so this initialization is not + * necessary. + */ + } else { + check_header(s); /* skip the .gz header */ + s->startpos = (ftell(s->file) - s->stream.avail_in); + } + + return (gzFile)s; +} + +/* =========================================================================== + Opens a gzip (.gz) file for reading or writing. +*/ +gzFile ZEXPORT gzopen (path, mode) + const char *path; + const char *mode; +{ + return gz_open (path, mode, -1); +} + +/* =========================================================================== + Associate a gzFile with the file descriptor fd. fd is not dup'ed here + to mimic the behavio(u)r of fdopen. +*/ +gzFile ZEXPORT gzdopen (fd, mode) + int fd; + const char *mode; +{ + char name[20]; + + if (fd < 0) return (gzFile)Z_NULL; + sprintf(name, "", fd); /* for debugging */ + + return gz_open (name, mode, fd); +} + +/* =========================================================================== + * Update the compression level and strategy + */ +int ZEXPORT gzsetparams (file, level, strategy) + gzFile file; + int level; + int strategy; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; + + /* Make room to allow flushing */ + if (s->stream.avail_out == 0) { + + s->stream.next_out = s->outbuf; + if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) { + s->z_err = Z_ERRNO; + } + s->stream.avail_out = Z_BUFSIZE; + } + + return deflateParams (&(s->stream), level, strategy); +} + +/* =========================================================================== + Read a byte from a gz_stream; update next_in and avail_in. Return EOF + for end of file. + IN assertion: the stream s has been sucessfully opened for reading. +*/ +local int get_byte(s) + gz_stream *s; +{ + if (s->z_eof) return EOF; + if (s->stream.avail_in == 0) { + errno = 0; + s->stream.avail_in = fread(s->inbuf, 1, Z_BUFSIZE, s->file); + if (s->stream.avail_in == 0) { + s->z_eof = 1; + if (ferror(s->file)) s->z_err = Z_ERRNO; + return EOF; + } + s->stream.next_in = s->inbuf; + } + s->stream.avail_in--; + return *(s->stream.next_in)++; +} + +/* =========================================================================== + Check the gzip header of a gz_stream opened for reading. Set the stream + mode to transparent if the gzip magic header is not present; set s->err + to Z_DATA_ERROR if the magic header is present but the rest of the header + is incorrect. + IN assertion: the stream s has already been created sucessfully; + s->stream.avail_in is zero for the first time, but may be non-zero + for concatenated .gz files. +*/ +local void check_header(s) + gz_stream *s; +{ + int method; /* method byte */ + int flags; /* flags byte */ + uInt len; + int c; + + /* Check the gzip magic header */ + for (len = 0; len < 2; len++) { + c = get_byte(s); + if (c != gz_magic[len]) { + if (len != 0) s->stream.avail_in++, s->stream.next_in--; + if (c != EOF) { + s->stream.avail_in++, s->stream.next_in--; + s->transparent = 1; + } + s->z_err = s->stream.avail_in != 0 ? Z_OK : Z_STREAM_END; + return; + } + } + method = get_byte(s); + flags = get_byte(s); + if (method != Z_DEFLATED || (flags & RESERVED) != 0) { + s->z_err = Z_DATA_ERROR; + return; + } + + /* Discard time, xflags and OS code: */ + for (len = 0; len < 6; len++) (void)get_byte(s); + + if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */ + len = (uInt)get_byte(s); + len += ((uInt)get_byte(s))<<8; + /* len is garbage if EOF but the loop below will quit anyway */ + while (len-- != 0 && get_byte(s) != EOF) ; + } + if ((flags & ORIG_NAME) != 0) { /* skip the original file name */ + while ((c = get_byte(s)) != 0 && c != EOF) ; + } + if ((flags & COMMENT) != 0) { /* skip the .gz file comment */ + while ((c = get_byte(s)) != 0 && c != EOF) ; + } + if ((flags & HEAD_CRC) != 0) { /* skip the header crc */ + for (len = 0; len < 2; len++) (void)get_byte(s); + } + s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK; +} + + /* =========================================================================== + * Cleanup then free the given gz_stream. Return a zlib error code. + Try freeing in the reverse order of allocations. + */ +local int destroy (s) + gz_stream *s; +{ + int err = Z_OK; + + if (!s) return Z_STREAM_ERROR; + + TRYFREE(s->msg); + + if (s->stream.state != NULL) { + if (s->mode == 'w') { +#ifdef NO_DEFLATE + err = Z_STREAM_ERROR; +#else + err = deflateEnd(&(s->stream)); +#endif + } else if (s->mode == 'r') { + err = inflateEnd(&(s->stream)); + } + } + if (s->file != NULL && fclose(s->file)) { +#ifdef ESPIPE + if (errno != ESPIPE) /* fclose is broken for pipes in HP/UX */ +#endif + err = Z_ERRNO; + } + if (s->z_err < 0) err = s->z_err; + + TRYFREE(s->inbuf); + TRYFREE(s->outbuf); + TRYFREE(s->path); + TRYFREE(s); + return err; +} + +/* =========================================================================== + Reads the given number of uncompressed bytes from the compressed file. + gzread returns the number of bytes actually read (0 for end of file). +*/ +int ZEXPORT gzread (file, buf, len) + gzFile file; + voidp buf; + unsigned len; +{ + gz_stream *s = (gz_stream*)file; + Bytef *start = (Bytef*)buf; /* starting point for crc computation */ + Byte *next_out; /* == stream.next_out but not forced far (for MSDOS) */ + + if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR; + + if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) return -1; + if (s->z_err == Z_STREAM_END) return 0; /* EOF */ + + next_out = (Byte*)buf; + s->stream.next_out = (Bytef*)buf; + s->stream.avail_out = len; + + while (s->stream.avail_out != 0) { + + if (s->transparent) { + /* Copy first the lookahead bytes: */ + uInt n = s->stream.avail_in; + if (n > s->stream.avail_out) n = s->stream.avail_out; + if (n > 0) { + zmemcpy(s->stream.next_out, s->stream.next_in, n); + next_out += n; + s->stream.next_out = next_out; + s->stream.next_in += n; + s->stream.avail_out -= n; + s->stream.avail_in -= n; + } + if (s->stream.avail_out > 0) { + s->stream.avail_out -= fread(next_out, 1, s->stream.avail_out, + s->file); + } + len -= s->stream.avail_out; + s->stream.total_in += (uLong)len; + s->stream.total_out += (uLong)len; + if (len == 0) s->z_eof = 1; + return (int)len; + } + if (s->stream.avail_in == 0 && !s->z_eof) { + + errno = 0; + s->stream.avail_in = fread(s->inbuf, 1, Z_BUFSIZE, s->file); + if (s->stream.avail_in == 0) { + s->z_eof = 1; + if (ferror(s->file)) { + s->z_err = Z_ERRNO; + break; + } + } + s->stream.next_in = s->inbuf; + } + s->z_err = inflate(&(s->stream), Z_NO_FLUSH); + + if (s->z_err == Z_STREAM_END) { + /* Check CRC and original size */ + s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start)); + start = s->stream.next_out; + + if (getLong(s) != s->crc) { + s->z_err = Z_DATA_ERROR; + } else { + (void)getLong(s); + /* The uncompressed length returned by above getlong() may + * be different from s->stream.total_out) in case of + * concatenated .gz files. Check for such files: + */ + check_header(s); + if (s->z_err == Z_OK) { + uLong total_in = s->stream.total_in; + uLong total_out = s->stream.total_out; + + inflateReset(&(s->stream)); + s->stream.total_in = total_in; + s->stream.total_out = total_out; + s->crc = crc32(0L, Z_NULL, 0); + } + } + } + if (s->z_err != Z_OK || s->z_eof) break; + } + s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start)); + + return (int)(len - s->stream.avail_out); +} + + +/* =========================================================================== + Reads one byte from the compressed file. gzgetc returns this byte + or -1 in case of end of file or error. +*/ +int ZEXPORT gzgetc(file) + gzFile file; +{ + unsigned char c; + + return gzread(file, &c, 1) == 1 ? c : -1; +} + + +/* =========================================================================== + Reads bytes from the compressed file until len-1 characters are + read, or a newline character is read and transferred to buf, or an + end-of-file condition is encountered. The string is then terminated + with a null character. + gzgets returns buf, or Z_NULL in case of error. + + The current implementation is not optimized at all. +*/ +char * ZEXPORT gzgets(file, buf, len) + gzFile file; + char *buf; + int len; +{ + char *b = buf; + if (buf == Z_NULL || len <= 0) return Z_NULL; + + while (--len > 0 && gzread(file, buf, 1) == 1 && *buf++ != '\n') ; + *buf = '\0'; + return b == buf && len > 0 ? Z_NULL : b; +} + + +#ifndef NO_DEFLATE +/* =========================================================================== + Writes the given number of uncompressed bytes into the compressed file. + gzwrite returns the number of bytes actually written (0 in case of error). +*/ +int ZEXPORT gzwrite (file, buf, len) + gzFile file; + const voidp buf; + unsigned len; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; + + s->stream.next_in = (Bytef*)buf; + s->stream.avail_in = len; + + while (s->stream.avail_in != 0) { + + if (s->stream.avail_out == 0) { + + s->stream.next_out = s->outbuf; + if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) { + s->z_err = Z_ERRNO; + break; + } + s->stream.avail_out = Z_BUFSIZE; + } + s->z_err = deflate(&(s->stream), Z_NO_FLUSH); + if (s->z_err != Z_OK) break; + } + s->crc = crc32(s->crc, (const Bytef *)buf, len); + + return (int)(len - s->stream.avail_in); +} + +/* =========================================================================== + Converts, formats, and writes the args to the compressed file under + control of the format string, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written (0 in case of error). +*/ +#ifdef STDC +#include + +int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...) +{ + char buf[Z_PRINTF_BUFSIZE]; + va_list va; + int len; + + va_start(va, format); +#ifdef HAS_vsnprintf + (void)vsnprintf(buf, sizeof(buf), format, va); +#else + (void)vsprintf(buf, format, va); +#endif + va_end(va); + len = strlen(buf); /* some *sprintf don't return the nb of bytes written */ + if (len <= 0) return 0; + + return gzwrite(file, buf, (unsigned)len); +} +#else /* not ANSI C */ + +int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, + a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) + gzFile file; + const char *format; + int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, + a11, a12, a13, a14, a15, a16, a17, a18, a19, a20; +{ + char buf[Z_PRINTF_BUFSIZE]; + int len; + +#ifdef HAS_snprintf + snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); +#else + sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); +#endif + len = strlen(buf); /* old sprintf doesn't return the nb of bytes written */ + if (len <= 0) return 0; + + return gzwrite(file, buf, len); +} +#endif + +/* =========================================================================== + Writes c, converted to an unsigned char, into the compressed file. + gzputc returns the value that was written, or -1 in case of error. +*/ +int ZEXPORT gzputc(file, c) + gzFile file; + int c; +{ + unsigned char cc = (unsigned char) c; /* required for big endian systems */ + + return gzwrite(file, &cc, 1) == 1 ? (int)cc : -1; +} + + +/* =========================================================================== + Writes the given null-terminated string to the compressed file, excluding + the terminating null character. + gzputs returns the number of characters written, or -1 in case of error. +*/ +int ZEXPORT gzputs(file, s) + gzFile file; + const char *s; +{ + return gzwrite(file, (char*)s, (unsigned)strlen(s)); +} + + +/* =========================================================================== + Flushes all pending output into the compressed file. The parameter + flush is as in the deflate() function. +*/ +local int do_flush (file, flush) + gzFile file; + int flush; +{ + uInt len; + int done = 0; + gz_stream *s = (gz_stream*)file; + + if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; + + s->stream.avail_in = 0; /* should be zero already anyway */ + + for (;;) { + len = Z_BUFSIZE - s->stream.avail_out; + + if (len != 0) { + if ((uInt)fwrite(s->outbuf, 1, len, s->file) != len) { + s->z_err = Z_ERRNO; + return Z_ERRNO; + } + s->stream.next_out = s->outbuf; + s->stream.avail_out = Z_BUFSIZE; + } + if (done) break; + s->z_err = deflate(&(s->stream), flush); + + /* Ignore the second of two consecutive flushes: */ + if (len == 0 && s->z_err == Z_BUF_ERROR) s->z_err = Z_OK; + + /* deflate has finished flushing only when it hasn't used up + * all the available space in the output buffer: + */ + done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END); + + if (s->z_err != Z_OK && s->z_err != Z_STREAM_END) break; + } + return s->z_err == Z_STREAM_END ? Z_OK : s->z_err; +} + +int ZEXPORT gzflush (file, flush) + gzFile file; + int flush; +{ + gz_stream *s = (gz_stream*)file; + int err = do_flush (file, flush); + + if (err) return err; + fflush(s->file); + return s->z_err == Z_STREAM_END ? Z_OK : s->z_err; +} +#endif /* NO_DEFLATE */ + +/* =========================================================================== + Sets the starting position for the next gzread or gzwrite on the given + compressed file. The offset represents a number of bytes in the + gzseek returns the resulting offset location as measured in bytes from + the beginning of the uncompressed stream, or -1 in case of error. + SEEK_END is not implemented, returns error. + In this version of the library, gzseek can be extremely slow. +*/ +z_off_t ZEXPORT gzseek (file, offset, whence) + gzFile file; + z_off_t offset; + int whence; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL || whence == SEEK_END || + s->z_err == Z_ERRNO || s->z_err == Z_DATA_ERROR) { + return -1L; + } + + if (s->mode == 'w') { +#ifdef NO_DEFLATE + return -1L; +#else + if (whence == SEEK_SET) { + offset -= s->stream.total_in; + } + if (offset < 0) return -1L; + + /* At this point, offset is the number of zero bytes to write. */ + if (s->inbuf == Z_NULL) { + s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); /* for seeking */ + zmemzero(s->inbuf, Z_BUFSIZE); + } + while (offset > 0) { + uInt size = Z_BUFSIZE; + if (offset < Z_BUFSIZE) size = (uInt)offset; + + size = gzwrite(file, s->inbuf, size); + if (size == 0) return -1L; + + offset -= size; + } + return (z_off_t)s->stream.total_in; +#endif + } + /* Rest of function is for reading only */ + + /* compute absolute position */ + if (whence == SEEK_CUR) { + offset += s->stream.total_out; + } + if (offset < 0) return -1L; + + if (s->transparent) { + /* map to fseek */ + s->stream.avail_in = 0; + s->stream.next_in = s->inbuf; + if (fseek(s->file, offset, SEEK_SET) < 0) return -1L; + + s->stream.total_in = s->stream.total_out = (uLong)offset; + return offset; + } + + /* For a negative seek, rewind and use positive seek */ + if ((uLong)offset >= s->stream.total_out) { + offset -= s->stream.total_out; + } else if (gzrewind(file) < 0) { + return -1L; + } + /* offset is now the number of bytes to skip. */ + + if (offset != 0 && s->outbuf == Z_NULL) { + s->outbuf = (Byte*)ALLOC(Z_BUFSIZE); + } + while (offset > 0) { + int size = Z_BUFSIZE; + if (offset < Z_BUFSIZE) size = (int)offset; + + size = gzread(file, s->outbuf, (uInt)size); + if (size <= 0) return -1L; + offset -= size; + } + return (z_off_t)s->stream.total_out; +} + +/* =========================================================================== + Rewinds input file. +*/ +int ZEXPORT gzrewind (file) + gzFile file; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL || s->mode != 'r') return -1; + + s->z_err = Z_OK; + s->z_eof = 0; + s->stream.avail_in = 0; + s->stream.next_in = s->inbuf; + s->crc = crc32(0L, Z_NULL, 0); + + if (s->startpos == 0) { /* not a compressed file */ + rewind(s->file); + return 0; + } + + (void) inflateReset(&s->stream); + return fseek(s->file, s->startpos, SEEK_SET); +} + +/* =========================================================================== + Returns the starting position for the next gzread or gzwrite on the + given compressed file. This position represents a number of bytes in the + uncompressed data stream. +*/ +z_off_t ZEXPORT gztell (file) + gzFile file; +{ + return gzseek(file, 0L, SEEK_CUR); +} + +/* =========================================================================== + Returns 1 when EOF has previously been detected reading the given + input stream, otherwise zero. +*/ +int ZEXPORT gzeof (file) + gzFile file; +{ + gz_stream *s = (gz_stream*)file; + + return (s == NULL || s->mode != 'r') ? 0 : s->z_eof; +} + +/* =========================================================================== + Outputs a long in LSB order to the given file +*/ +local void putLong (file, x) + FILE *file; + uLong x; +{ + int n; + for (n = 0; n < 4; n++) { + fputc((int)(x & 0xff), file); + x >>= 8; + } +} + +/* =========================================================================== + Reads a long in LSB order from the given gz_stream. Sets z_err in case + of error. +*/ +local uLong getLong (s) + gz_stream *s; +{ + uLong x = (uLong)get_byte(s); + int c; + + x += ((uLong)get_byte(s))<<8; + x += ((uLong)get_byte(s))<<16; + c = get_byte(s); + if (c == EOF) s->z_err = Z_DATA_ERROR; + x += ((uLong)c)<<24; + return x; +} + +/* =========================================================================== + Flushes all pending output if necessary, closes the compressed file + and deallocates all the (de)compression state. +*/ +int ZEXPORT gzclose (file) + gzFile file; +{ + int err; + gz_stream *s = (gz_stream*)file; + + if (s == NULL) return Z_STREAM_ERROR; + + if (s->mode == 'w') { +#ifdef NO_DEFLATE + return Z_STREAM_ERROR; +#else + err = do_flush (file, Z_FINISH); + if (err != Z_OK) return destroy((gz_stream*)file); + + putLong (s->file, s->crc); + putLong (s->file, s->stream.total_in); +#endif + } + return destroy((gz_stream*)file); +} + +/* =========================================================================== + Returns the error message for the last error which occured on the + given compressed file. errnum is set to zlib error number. If an + error occured in the file system and not in the compression library, + errnum is set to Z_ERRNO and the application may consult errno + to get the exact error code. +*/ +const char* ZEXPORT gzerror (file, errnum) + gzFile file; + int *errnum; +{ + char *m; + gz_stream *s = (gz_stream*)file; + + if (s == NULL) { + *errnum = Z_STREAM_ERROR; + return (const char*)ERR_MSG(Z_STREAM_ERROR); + } + *errnum = s->z_err; + if (*errnum == Z_OK) return (const char*)""; + + m = (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg); + + if (m == NULL || *m == '\0') m = (char*)ERR_MSG(s->z_err); + + TRYFREE(s->msg); + s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3); + strcpy(s->msg, s->path); + strcat(s->msg, ": "); + strcat(s->msg, m); + return (const char*)s->msg; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/infblock.c pcsxr-unstable-1.9.94+svn98108/win32/zlib/infblock.c --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/infblock.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/infblock.c 2016-06-30 16:53:28.000000000 +0000 @@ -0,0 +1,403 @@ +/* infblock.c -- interpret and process block types to last block + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "infblock.h" +#include "inftrees.h" +#include "infcodes.h" +#include "infutil.h" + +struct inflate_codes_state {int dummy;}; /* for buggy compilers */ + +/* simplify the use of the inflate_huft type with some defines */ +#define exop word.what.Exop +#define bits word.what.Bits + +/* Table for deflate from PKZIP's appnote.txt. */ +local const uInt border[] = { /* Order of the bit length code lengths */ + 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + +/* + Notes beyond the 1.93a appnote.txt: + + 1. Distance pointers never point before the beginning of the output + stream. + 2. Distance pointers can point back across blocks, up to 32k away. + 3. There is an implied maximum of 7 bits for the bit length table and + 15 bits for the actual data. + 4. If only one code exists, then it is encoded using one bit. (Zero + would be more efficient, but perhaps a little confusing.) If two + codes exist, they are coded using one bit each (0 and 1). + 5. There is no way of sending zero distance codes--a dummy must be + sent if there are none. (History: a pre 2.0 version of PKZIP would + store blocks with no distance codes, but this was discovered to be + too harsh a criterion.) Valid only for 1.93a. 2.04c does allow + zero distance codes, which is sent as one code of zero bits in + length. + 6. There are up to 286 literal/length codes. Code 256 represents the + end-of-block. Note however that the static length tree defines + 288 codes just to fill out the Huffman codes. Codes 286 and 287 + cannot be used though, since there is no length base or extra bits + defined for them. Similarily, there are up to 30 distance codes. + However, static trees define 32 codes (all 5 bits) to fill out the + Huffman codes, but the last two had better not show up in the data. + 7. Unzip can check dynamic Huffman blocks for complete code sets. + The exception is that a single code would not be complete (see #4). + 8. The five bits following the block type is really the number of + literal codes sent minus 257. + 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits + (1+6+6). Therefore, to output three times the length, you output + three codes (1+1+1), whereas to output four times the same length, + you only need two codes (1+3). Hmm. + 10. In the tree reconstruction algorithm, Code = Code + Increment + only if BitLength(i) is not zero. (Pretty obvious.) + 11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19) + 12. Note: length code 284 can represent 227-258, but length code 285 + really is 258. The last length deserves its own, short code + since it gets used a lot in very redundant files. The length + 258 is special since 258 - 3 (the min match length) is 255. + 13. The literal/length and distance code bit lengths are read as a + single stream of lengths. It is possible (and advantageous) for + a repeat code (16, 17, or 18) to go across the boundary between + the two sets of lengths. + */ + + +void inflate_blocks_reset(s, z, c) +inflate_blocks_statef *s; +z_streamp z; +uLongf *c; +{ + if (c != Z_NULL) + *c = s->check; + if (s->mode == BTREE || s->mode == DTREE) + ZFREE(z, s->sub.trees.blens); + if (s->mode == CODES) + inflate_codes_free(s->sub.decode.codes, z); + s->mode = TYPE; + s->bitk = 0; + s->bitb = 0; + s->read = s->write = s->window; + if (s->checkfn != Z_NULL) + z->adler = s->check = (*s->checkfn)(0L, (const Bytef *)Z_NULL, 0); + Tracev((stderr, "inflate: blocks reset\n")); +} + + +inflate_blocks_statef *inflate_blocks_new(z, c, w) +z_streamp z; +check_func c; +uInt w; +{ + inflate_blocks_statef *s; + + if ((s = (inflate_blocks_statef *)ZALLOC + (z,1,sizeof(struct inflate_blocks_state))) == Z_NULL) + return s; + if ((s->hufts = + (inflate_huft *)ZALLOC(z, sizeof(inflate_huft), MANY)) == Z_NULL) + { + ZFREE(z, s); + return Z_NULL; + } + if ((s->window = (Bytef *)ZALLOC(z, 1, w)) == Z_NULL) + { + ZFREE(z, s->hufts); + ZFREE(z, s); + return Z_NULL; + } + s->end = s->window + w; + s->checkfn = c; + s->mode = TYPE; + Tracev((stderr, "inflate: blocks allocated\n")); + inflate_blocks_reset(s, z, Z_NULL); + return s; +} + + +int inflate_blocks(s, z, r) +inflate_blocks_statef *s; +z_streamp z; +int r; +{ + uInt t; /* temporary storage */ + uLong b; /* bit buffer */ + uInt k; /* bits in bit buffer */ + Bytef *p; /* input data pointer */ + uInt n; /* bytes available there */ + Bytef *q; /* output window write pointer */ + uInt m; /* bytes to end of window or read pointer */ + + /* copy input/output information to locals (UPDATE macro restores) */ + LOAD + + /* process input based on current state */ + while (1) switch (s->mode) + { + case TYPE: + NEEDBITS(3) + t = (uInt)b & 7; + s->last = t & 1; + switch (t >> 1) + { + case 0: /* stored */ + Tracev((stderr, "inflate: stored block%s\n", + s->last ? " (last)" : "")); + DUMPBITS(3) + t = k & 7; /* go to byte boundary */ + DUMPBITS(t) + s->mode = LENS; /* get length of stored block */ + break; + case 1: /* fixed */ + Tracev((stderr, "inflate: fixed codes block%s\n", + s->last ? " (last)" : "")); + { + uInt bl, bd; + inflate_huft *tl, *td; + + inflate_trees_fixed(&bl, &bd, &tl, &td, z); + s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z); + if (s->sub.decode.codes == Z_NULL) + { + r = Z_MEM_ERROR; + LEAVE + } + } + DUMPBITS(3) + s->mode = CODES; + break; + case 2: /* dynamic */ + Tracev((stderr, "inflate: dynamic codes block%s\n", + s->last ? " (last)" : "")); + DUMPBITS(3) + s->mode = TABLE; + break; + case 3: /* illegal */ + DUMPBITS(3) + s->mode = BAD; + z->msg = (char*)"invalid block type"; + r = Z_DATA_ERROR; + LEAVE + } + break; + case LENS: + NEEDBITS(32) + if ((((~b) >> 16) & 0xffff) != (b & 0xffff)) + { + s->mode = BAD; + z->msg = (char*)"invalid stored block lengths"; + r = Z_DATA_ERROR; + LEAVE + } + s->sub.left = (uInt)b & 0xffff; + b = k = 0; /* dump bits */ + Tracev((stderr, "inflate: stored length %u\n", s->sub.left)); + s->mode = s->sub.left ? STORED : (s->last ? DRY : TYPE); + break; + case STORED: + if (n == 0) + LEAVE + NEEDOUT + t = s->sub.left; + if (t > n) t = n; + if (t > m) t = m; + zmemcpy(q, p, t); + p += t; n -= t; + q += t; m -= t; + if ((s->sub.left -= t) != 0) + break; + Tracev((stderr, "inflate: stored end, %lu total out\n", + z->total_out + (q >= s->read ? q - s->read : + (s->end - s->read) + (q - s->window)))); + s->mode = s->last ? DRY : TYPE; + break; + case TABLE: + NEEDBITS(14) + s->sub.trees.table = t = (uInt)b & 0x3fff; +#ifndef PKZIP_BUG_WORKAROUND + if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) + { + s->mode = BAD; + z->msg = (char*)"too many length or distance symbols"; + r = Z_DATA_ERROR; + LEAVE + } +#endif + t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f); + if ((s->sub.trees.blens = (uIntf*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL) + { + r = Z_MEM_ERROR; + LEAVE + } + DUMPBITS(14) + s->sub.trees.index = 0; + Tracev((stderr, "inflate: table sizes ok\n")); + s->mode = BTREE; + case BTREE: + while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10)) + { + NEEDBITS(3) + s->sub.trees.blens[border[s->sub.trees.index++]] = (uInt)b & 7; + DUMPBITS(3) + } + while (s->sub.trees.index < 19) + s->sub.trees.blens[border[s->sub.trees.index++]] = 0; + s->sub.trees.bb = 7; + t = inflate_trees_bits(s->sub.trees.blens, &s->sub.trees.bb, + &s->sub.trees.tb, s->hufts, z); + if (t != Z_OK) + { + r = t; + if (r == Z_DATA_ERROR) + { + ZFREE(z, s->sub.trees.blens); + s->mode = BAD; + } + LEAVE + } + s->sub.trees.index = 0; + Tracev((stderr, "inflate: bits tree ok\n")); + s->mode = DTREE; + case DTREE: + while (t = s->sub.trees.table, + s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) + { + inflate_huft *h; + uInt i, j, c; + + t = s->sub.trees.bb; + NEEDBITS(t) + h = s->sub.trees.tb + ((uInt)b & inflate_mask[t]); + t = h->bits; + c = h->base; + if (c < 16) + { + DUMPBITS(t) + s->sub.trees.blens[s->sub.trees.index++] = c; + } + else /* c == 16..18 */ + { + i = c == 18 ? 7 : c - 14; + j = c == 18 ? 11 : 3; + NEEDBITS(t + i) + DUMPBITS(t) + j += (uInt)b & inflate_mask[i]; + DUMPBITS(i) + i = s->sub.trees.index; + t = s->sub.trees.table; + if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || + (c == 16 && i < 1)) + { + ZFREE(z, s->sub.trees.blens); + s->mode = BAD; + z->msg = (char*)"invalid bit length repeat"; + r = Z_DATA_ERROR; + LEAVE + } + c = c == 16 ? s->sub.trees.blens[i - 1] : 0; + do { + s->sub.trees.blens[i++] = c; + } while (--j); + s->sub.trees.index = i; + } + } + s->sub.trees.tb = Z_NULL; + { + uInt bl, bd; + inflate_huft *tl, *td; + inflate_codes_statef *c; + + bl = 9; /* must be <= 9 for lookahead assumptions */ + bd = 6; /* must be <= 9 for lookahead assumptions */ + t = s->sub.trees.table; + t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), + s->sub.trees.blens, &bl, &bd, &tl, &td, + s->hufts, z); + if (t != Z_OK) + { + if (t == (uInt)Z_DATA_ERROR) + { + ZFREE(z, s->sub.trees.blens); + s->mode = BAD; + } + r = t; + LEAVE + } + Tracev((stderr, "inflate: trees ok\n")); + if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL) + { + r = Z_MEM_ERROR; + LEAVE + } + s->sub.decode.codes = c; + } + ZFREE(z, s->sub.trees.blens); + s->mode = CODES; + case CODES: + UPDATE + if ((r = inflate_codes(s, z, r)) != Z_STREAM_END) + return inflate_flush(s, z, r); + r = Z_OK; + inflate_codes_free(s->sub.decode.codes, z); + LOAD + Tracev((stderr, "inflate: codes end, %lu total out\n", + z->total_out + (q >= s->read ? q - s->read : + (s->end - s->read) + (q - s->window)))); + if (!s->last) + { + s->mode = TYPE; + break; + } + s->mode = DRY; + case DRY: + FLUSH + if (s->read != s->write) + LEAVE + s->mode = DONE; + case DONE: + r = Z_STREAM_END; + LEAVE + case BAD: + r = Z_DATA_ERROR; + LEAVE + default: + r = Z_STREAM_ERROR; + LEAVE + } +} + + +int inflate_blocks_free(s, z) +inflate_blocks_statef *s; +z_streamp z; +{ + inflate_blocks_reset(s, z, Z_NULL); + ZFREE(z, s->window); + ZFREE(z, s->hufts); + ZFREE(z, s); + Tracev((stderr, "inflate: blocks freed\n")); + return Z_OK; +} + + +void inflate_set_dictionary(s, d, n) +inflate_blocks_statef *s; +const Bytef *d; +uInt n; +{ + zmemcpy(s->window, d, n); + s->read = s->write = s->window + n; +} + + +/* Returns true if inflate is currently at the end of a block generated + * by Z_SYNC_FLUSH or Z_FULL_FLUSH. + * IN assertion: s != Z_NULL + */ +int inflate_blocks_sync_point(s) +inflate_blocks_statef *s; +{ + return s->mode == LENS; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/infblock.h pcsxr-unstable-1.9.94+svn98108/win32/zlib/infblock.h --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/infblock.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/infblock.h 2016-06-30 16:53:28.000000000 +0000 @@ -0,0 +1,39 @@ +/* infblock.h -- header to use infblock.c + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +struct inflate_blocks_state; +typedef struct inflate_blocks_state FAR inflate_blocks_statef; + +extern inflate_blocks_statef * inflate_blocks_new OF(( + z_streamp z, + check_func c, /* check function */ + uInt w)); /* window size */ + +extern int inflate_blocks OF(( + inflate_blocks_statef *, + z_streamp , + int)); /* initial return code */ + +extern void inflate_blocks_reset OF(( + inflate_blocks_statef *, + z_streamp , + uLongf *)); /* check value on output */ + +extern int inflate_blocks_free OF(( + inflate_blocks_statef *, + z_streamp)); + +extern void inflate_set_dictionary OF(( + inflate_blocks_statef *s, + const Bytef *d, /* dictionary */ + uInt n)); /* dictionary length */ + +extern int inflate_blocks_sync_point OF(( + inflate_blocks_statef *s)); diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/infcodes.c pcsxr-unstable-1.9.94+svn98108/win32/zlib/infcodes.c --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/infcodes.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/infcodes.c 2016-06-30 16:53:28.000000000 +0000 @@ -0,0 +1,251 @@ +/* infcodes.c -- process literals and length/distance pairs + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "inftrees.h" +#include "infblock.h" +#include "infcodes.h" +#include "infutil.h" +#include "inffast.h" + +/* simplify the use of the inflate_huft type with some defines */ +#define exop word.what.Exop +#define bits word.what.Bits + +typedef enum { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */ + START, /* x: set up for LEN */ + LEN, /* i: get length/literal/eob next */ + LENEXT, /* i: getting length extra (have base) */ + DIST, /* i: get distance next */ + DISTEXT, /* i: getting distance extra */ + COPY, /* o: copying bytes in window, waiting for space */ + LIT, /* o: got literal, waiting for output space */ + WASH, /* o: got eob, possibly still output waiting */ + END, /* x: got eob and all data flushed */ + BADCODE} /* x: got error */ +inflate_codes_mode; + +/* inflate codes private state */ +struct inflate_codes_state { + + /* mode */ + inflate_codes_mode mode; /* current inflate_codes mode */ + + /* mode dependent information */ + uInt len; + union { + struct { + inflate_huft *tree; /* pointer into tree */ + uInt need; /* bits needed */ + } code; /* if LEN or DIST, where in tree */ + uInt lit; /* if LIT, literal */ + struct { + uInt get; /* bits to get for extra */ + uInt dist; /* distance back to copy from */ + } copy; /* if EXT or COPY, where and how much */ + } sub; /* submode */ + + /* mode independent information */ + Byte lbits; /* ltree bits decoded per branch */ + Byte dbits; /* dtree bits decoder per branch */ + inflate_huft *ltree; /* literal/length/eob tree */ + inflate_huft *dtree; /* distance tree */ + +}; + + +inflate_codes_statef *inflate_codes_new(bl, bd, tl, td, z) +uInt bl, bd; +inflate_huft *tl; +inflate_huft *td; /* need separate declaration for Borland C++ */ +z_streamp z; +{ + inflate_codes_statef *c; + + if ((c = (inflate_codes_statef *) + ZALLOC(z,1,sizeof(struct inflate_codes_state))) != Z_NULL) + { + c->mode = START; + c->lbits = (Byte)bl; + c->dbits = (Byte)bd; + c->ltree = tl; + c->dtree = td; + Tracev((stderr, "inflate: codes new\n")); + } + return c; +} + + +int inflate_codes(s, z, r) +inflate_blocks_statef *s; +z_streamp z; +int r; +{ + uInt j; /* temporary storage */ + inflate_huft *t; /* temporary pointer */ + uInt e; /* extra bits or operation */ + uLong b; /* bit buffer */ + uInt k; /* bits in bit buffer */ + Bytef *p; /* input data pointer */ + uInt n; /* bytes available there */ + Bytef *q; /* output window write pointer */ + uInt m; /* bytes to end of window or read pointer */ + Bytef *f; /* pointer to copy strings from */ + inflate_codes_statef *c = s->sub.decode.codes; /* codes state */ + + /* copy input/output information to locals (UPDATE macro restores) */ + LOAD + + /* process input and output based on current state */ + while (1) switch (c->mode) + { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */ + case START: /* x: set up for LEN */ +#ifndef SLOW + if (m >= 258 && n >= 10) + { + UPDATE + r = inflate_fast(c->lbits, c->dbits, c->ltree, c->dtree, s, z); + LOAD + if (r != Z_OK) + { + c->mode = r == Z_STREAM_END ? WASH : BADCODE; + break; + } + } +#endif /* !SLOW */ + c->sub.code.need = c->lbits; + c->sub.code.tree = c->ltree; + c->mode = LEN; + case LEN: /* i: get length/literal/eob next */ + j = c->sub.code.need; + NEEDBITS(j) + t = c->sub.code.tree + ((uInt)b & inflate_mask[j]); + DUMPBITS(t->bits) + e = (uInt)(t->exop); + if (e == 0) /* literal */ + { + c->sub.lit = t->base; + Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ? + "inflate: literal '%c'\n" : + "inflate: literal 0x%02x\n", t->base)); + c->mode = LIT; + break; + } + if (e & 16) /* length */ + { + c->sub.copy.get = e & 15; + c->len = t->base; + c->mode = LENEXT; + break; + } + if ((e & 64) == 0) /* next table */ + { + c->sub.code.need = e; + c->sub.code.tree = t + t->base; + break; + } + if (e & 32) /* end of block */ + { + Tracevv((stderr, "inflate: end of block\n")); + c->mode = WASH; + break; + } + c->mode = BADCODE; /* invalid code */ + z->msg = (char*)"invalid literal/length code"; + r = Z_DATA_ERROR; + LEAVE + case LENEXT: /* i: getting length extra (have base) */ + j = c->sub.copy.get; + NEEDBITS(j) + c->len += (uInt)b & inflate_mask[j]; + DUMPBITS(j) + c->sub.code.need = c->dbits; + c->sub.code.tree = c->dtree; + Tracevv((stderr, "inflate: length %u\n", c->len)); + c->mode = DIST; + case DIST: /* i: get distance next */ + j = c->sub.code.need; + NEEDBITS(j) + t = c->sub.code.tree + ((uInt)b & inflate_mask[j]); + DUMPBITS(t->bits) + e = (uInt)(t->exop); + if (e & 16) /* distance */ + { + c->sub.copy.get = e & 15; + c->sub.copy.dist = t->base; + c->mode = DISTEXT; + break; + } + if ((e & 64) == 0) /* next table */ + { + c->sub.code.need = e; + c->sub.code.tree = t + t->base; + break; + } + c->mode = BADCODE; /* invalid code */ + z->msg = (char*)"invalid distance code"; + r = Z_DATA_ERROR; + LEAVE + case DISTEXT: /* i: getting distance extra */ + j = c->sub.copy.get; + NEEDBITS(j) + c->sub.copy.dist += (uInt)b & inflate_mask[j]; + DUMPBITS(j) + Tracevv((stderr, "inflate: distance %u\n", c->sub.copy.dist)); + c->mode = COPY; + case COPY: /* o: copying bytes in window, waiting for space */ + f = q - c->sub.copy.dist; + while (f < s->window) /* modulo window size-"while" instead */ + f += s->end - s->window; /* of "if" handles invalid distances */ + while (c->len) + { + NEEDOUT + OUTBYTE(*f++) + if (f == s->end) + f = s->window; + c->len--; + } + c->mode = START; + break; + case LIT: /* o: got literal, waiting for output space */ + NEEDOUT + OUTBYTE(c->sub.lit) + c->mode = START; + break; + case WASH: /* o: got eob, possibly more output */ + if (k > 7) /* return unused byte, if any */ + { + Assert(k < 16, "inflate_codes grabbed too many bytes") + k -= 8; + n++; + p--; /* can always return one */ + } + FLUSH + if (s->read != s->write) + LEAVE + c->mode = END; + case END: + r = Z_STREAM_END; + LEAVE + case BADCODE: /* x: got error */ + r = Z_DATA_ERROR; + LEAVE + default: + r = Z_STREAM_ERROR; + LEAVE + } +#ifdef NEED_DUMMY_RETURN + return Z_STREAM_ERROR; /* Some dumb compilers complain without this */ +#endif +} + + +void inflate_codes_free(c, z) +inflate_codes_statef *c; +z_streamp z; +{ + ZFREE(z, c); + Tracev((stderr, "inflate: codes free\n")); +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/infcodes.h pcsxr-unstable-1.9.94+svn98108/win32/zlib/infcodes.h --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/infcodes.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/infcodes.h 2016-06-30 16:53:28.000000000 +0000 @@ -0,0 +1,27 @@ +/* infcodes.h -- header to use infcodes.c + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +struct inflate_codes_state; +typedef struct inflate_codes_state FAR inflate_codes_statef; + +extern inflate_codes_statef *inflate_codes_new OF(( + uInt, uInt, + inflate_huft *, inflate_huft *, + z_streamp )); + +extern int inflate_codes OF(( + inflate_blocks_statef *, + z_streamp , + int)); + +extern void inflate_codes_free OF(( + inflate_codes_statef *, + z_streamp )); + diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/inffast.c pcsxr-unstable-1.9.94+svn98108/win32/zlib/inffast.c --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/inffast.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/inffast.c 2016-06-30 16:53:28.000000000 +0000 @@ -0,0 +1,183 @@ +/* inffast.c -- process literals and length/distance pairs fast + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "inftrees.h" +#include "infblock.h" +#include "infcodes.h" +#include "infutil.h" +#include "inffast.h" + +struct inflate_codes_state {int dummy;}; /* for buggy compilers */ + +/* simplify the use of the inflate_huft type with some defines */ +#define exop word.what.Exop +#define bits word.what.Bits + +/* macros for bit input with no checking and for returning unused bytes */ +#define GRABBITS(j) {while(k<(j)){b|=((uLong)NEXTBYTE)<avail_in-n;c=(k>>3)>3:c;n+=c;p-=c;k-=c<<3;} + +/* Called with number of bytes left to write in window at least 258 + (the maximum string length) and number of input bytes available + at least ten. The ten bytes are six bytes for the longest length/ + distance pair plus four bytes for overloading the bit buffer. */ + +int inflate_fast(bl, bd, tl, td, s, z) +uInt bl, bd; +inflate_huft *tl; +inflate_huft *td; /* need separate declaration for Borland C++ */ +inflate_blocks_statef *s; +z_streamp z; +{ + inflate_huft *t; /* temporary pointer */ + uInt e; /* extra bits or operation */ + uLong b; /* bit buffer */ + uInt k; /* bits in bit buffer */ + Bytef *p; /* input data pointer */ + uInt n; /* bytes available there */ + Bytef *q; /* output window write pointer */ + uInt m; /* bytes to end of window or read pointer */ + uInt ml; /* mask for literal/length tree */ + uInt md; /* mask for distance tree */ + uInt c; /* bytes to copy */ + uInt d; /* distance back to copy from */ + Bytef *r; /* copy source pointer */ + + /* load input, output, bit values */ + LOAD + + /* initialize masks */ + ml = inflate_mask[bl]; + md = inflate_mask[bd]; + + /* do until not enough input or output space for fast loop */ + do { /* assume called with m >= 258 && n >= 10 */ + /* get literal/length code */ + GRABBITS(20) /* max bits for literal/length code */ + if ((e = (t = tl + ((uInt)b & ml))->exop) == 0) + { + DUMPBITS(t->bits) + Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ? + "inflate: * literal '%c'\n" : + "inflate: * literal 0x%02x\n", t->base)); + *q++ = (Byte)t->base; + m--; + continue; + } + do { + DUMPBITS(t->bits) + if (e & 16) + { + /* get extra bits for length */ + e &= 15; + c = t->base + ((uInt)b & inflate_mask[e]); + DUMPBITS(e) + Tracevv((stderr, "inflate: * length %u\n", c)); + + /* decode distance base of block to copy */ + GRABBITS(15); /* max bits for distance code */ + e = (t = td + ((uInt)b & md))->exop; + do { + DUMPBITS(t->bits) + if (e & 16) + { + /* get extra bits to add to distance base */ + e &= 15; + GRABBITS(e) /* get extra bits (up to 13) */ + d = t->base + ((uInt)b & inflate_mask[e]); + DUMPBITS(e) + Tracevv((stderr, "inflate: * distance %u\n", d)); + + /* do the copy */ + m -= c; + r = q - d; + if (r < s->window) /* wrap if needed */ + { + do { + r += s->end - s->window; /* force pointer in window */ + } while (r < s->window); /* covers invalid distances */ + e = s->end - r; + if (c > e) + { + c -= e; /* wrapped copy */ + do { + *q++ = *r++; + } while (--e); + r = s->window; + do { + *q++ = *r++; + } while (--c); + } + else /* normal copy */ + { + *q++ = *r++; c--; + *q++ = *r++; c--; + do { + *q++ = *r++; + } while (--c); + } + } + else /* normal copy */ + { + *q++ = *r++; c--; + *q++ = *r++; c--; + do { + *q++ = *r++; + } while (--c); + } + break; + } + else if ((e & 64) == 0) + { + t += t->base; + e = (t += ((uInt)b & inflate_mask[e]))->exop; + } + else + { + z->msg = (char*)"invalid distance code"; + UNGRAB + UPDATE + return Z_DATA_ERROR; + } + } while (1); + break; + } + if ((e & 64) == 0) + { + t += t->base; + if ((e = (t += ((uInt)b & inflate_mask[e]))->exop) == 0) + { + DUMPBITS(t->bits) + Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ? + "inflate: * literal '%c'\n" : + "inflate: * literal 0x%02x\n", t->base)); + *q++ = (Byte)t->base; + m--; + break; + } + } + else if (e & 32) + { + Tracevv((stderr, "inflate: * end of block\n")); + UNGRAB + UPDATE + return Z_STREAM_END; + } + else + { + z->msg = (char*)"invalid literal/length code"; + UNGRAB + UPDATE + return Z_DATA_ERROR; + } + } while (1); + } while (m >= 258 && n >= 10); + + /* not enough input or output--restore pointers and return */ + UNGRAB + UPDATE + return Z_OK; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/inffast.h pcsxr-unstable-1.9.94+svn98108/win32/zlib/inffast.h --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/inffast.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/inffast.h 2016-06-30 16:53:28.000000000 +0000 @@ -0,0 +1,17 @@ +/* inffast.h -- header to use inffast.c + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +extern int inflate_fast OF(( + uInt, + uInt, + inflate_huft *, + inflate_huft *, + inflate_blocks_statef *, + z_streamp )); diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/inffixed.h pcsxr-unstable-1.9.94+svn98108/win32/zlib/inffixed.h --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/inffixed.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/inffixed.h 2016-06-30 16:53:28.000000000 +0000 @@ -0,0 +1,151 @@ +/* inffixed.h -- table for decoding fixed codes + * Generated automatically by the maketree.c program + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +local uInt fixed_bl = 9; +local uInt fixed_bd = 5; +local inflate_huft fixed_tl[] = { + {{{96,7}},256}, {{{0,8}},80}, {{{0,8}},16}, {{{84,8}},115}, + {{{82,7}},31}, {{{0,8}},112}, {{{0,8}},48}, {{{0,9}},192}, + {{{80,7}},10}, {{{0,8}},96}, {{{0,8}},32}, {{{0,9}},160}, + {{{0,8}},0}, {{{0,8}},128}, {{{0,8}},64}, {{{0,9}},224}, + {{{80,7}},6}, {{{0,8}},88}, {{{0,8}},24}, {{{0,9}},144}, + {{{83,7}},59}, {{{0,8}},120}, {{{0,8}},56}, {{{0,9}},208}, + {{{81,7}},17}, {{{0,8}},104}, {{{0,8}},40}, {{{0,9}},176}, + {{{0,8}},8}, {{{0,8}},136}, {{{0,8}},72}, {{{0,9}},240}, + {{{80,7}},4}, {{{0,8}},84}, {{{0,8}},20}, {{{85,8}},227}, + {{{83,7}},43}, {{{0,8}},116}, {{{0,8}},52}, {{{0,9}},200}, + {{{81,7}},13}, {{{0,8}},100}, {{{0,8}},36}, {{{0,9}},168}, + {{{0,8}},4}, {{{0,8}},132}, {{{0,8}},68}, {{{0,9}},232}, + {{{80,7}},8}, {{{0,8}},92}, {{{0,8}},28}, {{{0,9}},152}, + {{{84,7}},83}, {{{0,8}},124}, {{{0,8}},60}, {{{0,9}},216}, + {{{82,7}},23}, {{{0,8}},108}, {{{0,8}},44}, {{{0,9}},184}, + {{{0,8}},12}, {{{0,8}},140}, {{{0,8}},76}, {{{0,9}},248}, + {{{80,7}},3}, {{{0,8}},82}, {{{0,8}},18}, {{{85,8}},163}, + {{{83,7}},35}, {{{0,8}},114}, {{{0,8}},50}, {{{0,9}},196}, + {{{81,7}},11}, {{{0,8}},98}, {{{0,8}},34}, {{{0,9}},164}, + {{{0,8}},2}, {{{0,8}},130}, {{{0,8}},66}, {{{0,9}},228}, + {{{80,7}},7}, {{{0,8}},90}, {{{0,8}},26}, {{{0,9}},148}, + {{{84,7}},67}, {{{0,8}},122}, {{{0,8}},58}, {{{0,9}},212}, + {{{82,7}},19}, {{{0,8}},106}, {{{0,8}},42}, {{{0,9}},180}, + {{{0,8}},10}, {{{0,8}},138}, {{{0,8}},74}, {{{0,9}},244}, + {{{80,7}},5}, {{{0,8}},86}, {{{0,8}},22}, {{{192,8}},0}, + {{{83,7}},51}, {{{0,8}},118}, {{{0,8}},54}, {{{0,9}},204}, + {{{81,7}},15}, {{{0,8}},102}, {{{0,8}},38}, {{{0,9}},172}, + {{{0,8}},6}, {{{0,8}},134}, {{{0,8}},70}, {{{0,9}},236}, + {{{80,7}},9}, {{{0,8}},94}, {{{0,8}},30}, {{{0,9}},156}, + {{{84,7}},99}, {{{0,8}},126}, {{{0,8}},62}, {{{0,9}},220}, + {{{82,7}},27}, {{{0,8}},110}, {{{0,8}},46}, {{{0,9}},188}, + {{{0,8}},14}, {{{0,8}},142}, {{{0,8}},78}, {{{0,9}},252}, + {{{96,7}},256}, {{{0,8}},81}, {{{0,8}},17}, {{{85,8}},131}, + {{{82,7}},31}, {{{0,8}},113}, {{{0,8}},49}, {{{0,9}},194}, + {{{80,7}},10}, {{{0,8}},97}, {{{0,8}},33}, {{{0,9}},162}, + {{{0,8}},1}, {{{0,8}},129}, {{{0,8}},65}, {{{0,9}},226}, + {{{80,7}},6}, {{{0,8}},89}, {{{0,8}},25}, {{{0,9}},146}, + {{{83,7}},59}, {{{0,8}},121}, {{{0,8}},57}, {{{0,9}},210}, + {{{81,7}},17}, {{{0,8}},105}, {{{0,8}},41}, {{{0,9}},178}, + {{{0,8}},9}, {{{0,8}},137}, {{{0,8}},73}, {{{0,9}},242}, + {{{80,7}},4}, {{{0,8}},85}, {{{0,8}},21}, {{{80,8}},258}, + {{{83,7}},43}, {{{0,8}},117}, {{{0,8}},53}, {{{0,9}},202}, + {{{81,7}},13}, {{{0,8}},101}, {{{0,8}},37}, {{{0,9}},170}, + {{{0,8}},5}, {{{0,8}},133}, {{{0,8}},69}, {{{0,9}},234}, + {{{80,7}},8}, {{{0,8}},93}, {{{0,8}},29}, {{{0,9}},154}, + {{{84,7}},83}, {{{0,8}},125}, {{{0,8}},61}, {{{0,9}},218}, + {{{82,7}},23}, {{{0,8}},109}, {{{0,8}},45}, {{{0,9}},186}, + {{{0,8}},13}, {{{0,8}},141}, {{{0,8}},77}, {{{0,9}},250}, + {{{80,7}},3}, {{{0,8}},83}, {{{0,8}},19}, {{{85,8}},195}, + {{{83,7}},35}, {{{0,8}},115}, {{{0,8}},51}, {{{0,9}},198}, + {{{81,7}},11}, {{{0,8}},99}, {{{0,8}},35}, {{{0,9}},166}, + {{{0,8}},3}, {{{0,8}},131}, {{{0,8}},67}, {{{0,9}},230}, + {{{80,7}},7}, {{{0,8}},91}, {{{0,8}},27}, {{{0,9}},150}, + {{{84,7}},67}, {{{0,8}},123}, {{{0,8}},59}, {{{0,9}},214}, + {{{82,7}},19}, {{{0,8}},107}, {{{0,8}},43}, {{{0,9}},182}, + {{{0,8}},11}, {{{0,8}},139}, {{{0,8}},75}, {{{0,9}},246}, + {{{80,7}},5}, {{{0,8}},87}, {{{0,8}},23}, {{{192,8}},0}, + {{{83,7}},51}, {{{0,8}},119}, {{{0,8}},55}, {{{0,9}},206}, + {{{81,7}},15}, {{{0,8}},103}, {{{0,8}},39}, {{{0,9}},174}, + {{{0,8}},7}, {{{0,8}},135}, {{{0,8}},71}, {{{0,9}},238}, + {{{80,7}},9}, {{{0,8}},95}, {{{0,8}},31}, {{{0,9}},158}, + {{{84,7}},99}, {{{0,8}},127}, {{{0,8}},63}, {{{0,9}},222}, + {{{82,7}},27}, {{{0,8}},111}, {{{0,8}},47}, {{{0,9}},190}, + {{{0,8}},15}, {{{0,8}},143}, {{{0,8}},79}, {{{0,9}},254}, + {{{96,7}},256}, {{{0,8}},80}, {{{0,8}},16}, {{{84,8}},115}, + {{{82,7}},31}, {{{0,8}},112}, {{{0,8}},48}, {{{0,9}},193}, + {{{80,7}},10}, {{{0,8}},96}, {{{0,8}},32}, {{{0,9}},161}, + {{{0,8}},0}, {{{0,8}},128}, {{{0,8}},64}, {{{0,9}},225}, + {{{80,7}},6}, {{{0,8}},88}, {{{0,8}},24}, {{{0,9}},145}, + {{{83,7}},59}, {{{0,8}},120}, {{{0,8}},56}, {{{0,9}},209}, + {{{81,7}},17}, {{{0,8}},104}, {{{0,8}},40}, {{{0,9}},177}, + {{{0,8}},8}, {{{0,8}},136}, {{{0,8}},72}, {{{0,9}},241}, + {{{80,7}},4}, {{{0,8}},84}, {{{0,8}},20}, {{{85,8}},227}, + {{{83,7}},43}, {{{0,8}},116}, {{{0,8}},52}, {{{0,9}},201}, + {{{81,7}},13}, {{{0,8}},100}, {{{0,8}},36}, {{{0,9}},169}, + {{{0,8}},4}, {{{0,8}},132}, {{{0,8}},68}, {{{0,9}},233}, + {{{80,7}},8}, {{{0,8}},92}, {{{0,8}},28}, {{{0,9}},153}, + {{{84,7}},83}, {{{0,8}},124}, {{{0,8}},60}, {{{0,9}},217}, + {{{82,7}},23}, {{{0,8}},108}, {{{0,8}},44}, {{{0,9}},185}, + {{{0,8}},12}, {{{0,8}},140}, {{{0,8}},76}, {{{0,9}},249}, + {{{80,7}},3}, {{{0,8}},82}, {{{0,8}},18}, {{{85,8}},163}, + {{{83,7}},35}, {{{0,8}},114}, {{{0,8}},50}, {{{0,9}},197}, + {{{81,7}},11}, {{{0,8}},98}, {{{0,8}},34}, {{{0,9}},165}, + {{{0,8}},2}, {{{0,8}},130}, {{{0,8}},66}, {{{0,9}},229}, + {{{80,7}},7}, {{{0,8}},90}, {{{0,8}},26}, {{{0,9}},149}, + {{{84,7}},67}, {{{0,8}},122}, {{{0,8}},58}, {{{0,9}},213}, + {{{82,7}},19}, {{{0,8}},106}, {{{0,8}},42}, {{{0,9}},181}, + {{{0,8}},10}, {{{0,8}},138}, {{{0,8}},74}, {{{0,9}},245}, + {{{80,7}},5}, {{{0,8}},86}, {{{0,8}},22}, {{{192,8}},0}, + {{{83,7}},51}, {{{0,8}},118}, {{{0,8}},54}, {{{0,9}},205}, + {{{81,7}},15}, {{{0,8}},102}, {{{0,8}},38}, {{{0,9}},173}, + {{{0,8}},6}, {{{0,8}},134}, {{{0,8}},70}, {{{0,9}},237}, + {{{80,7}},9}, {{{0,8}},94}, {{{0,8}},30}, {{{0,9}},157}, + {{{84,7}},99}, {{{0,8}},126}, {{{0,8}},62}, {{{0,9}},221}, + {{{82,7}},27}, {{{0,8}},110}, {{{0,8}},46}, {{{0,9}},189}, + {{{0,8}},14}, {{{0,8}},142}, {{{0,8}},78}, {{{0,9}},253}, + {{{96,7}},256}, {{{0,8}},81}, {{{0,8}},17}, {{{85,8}},131}, + {{{82,7}},31}, {{{0,8}},113}, {{{0,8}},49}, {{{0,9}},195}, + {{{80,7}},10}, {{{0,8}},97}, {{{0,8}},33}, {{{0,9}},163}, + {{{0,8}},1}, {{{0,8}},129}, {{{0,8}},65}, {{{0,9}},227}, + {{{80,7}},6}, {{{0,8}},89}, {{{0,8}},25}, {{{0,9}},147}, + {{{83,7}},59}, {{{0,8}},121}, {{{0,8}},57}, {{{0,9}},211}, + {{{81,7}},17}, {{{0,8}},105}, {{{0,8}},41}, {{{0,9}},179}, + {{{0,8}},9}, {{{0,8}},137}, {{{0,8}},73}, {{{0,9}},243}, + {{{80,7}},4}, {{{0,8}},85}, {{{0,8}},21}, {{{80,8}},258}, + {{{83,7}},43}, {{{0,8}},117}, {{{0,8}},53}, {{{0,9}},203}, + {{{81,7}},13}, {{{0,8}},101}, {{{0,8}},37}, {{{0,9}},171}, + {{{0,8}},5}, {{{0,8}},133}, {{{0,8}},69}, {{{0,9}},235}, + {{{80,7}},8}, {{{0,8}},93}, {{{0,8}},29}, {{{0,9}},155}, + {{{84,7}},83}, {{{0,8}},125}, {{{0,8}},61}, {{{0,9}},219}, + {{{82,7}},23}, {{{0,8}},109}, {{{0,8}},45}, {{{0,9}},187}, + {{{0,8}},13}, {{{0,8}},141}, {{{0,8}},77}, {{{0,9}},251}, + {{{80,7}},3}, {{{0,8}},83}, {{{0,8}},19}, {{{85,8}},195}, + {{{83,7}},35}, {{{0,8}},115}, {{{0,8}},51}, {{{0,9}},199}, + {{{81,7}},11}, {{{0,8}},99}, {{{0,8}},35}, {{{0,9}},167}, + {{{0,8}},3}, {{{0,8}},131}, {{{0,8}},67}, {{{0,9}},231}, + {{{80,7}},7}, {{{0,8}},91}, {{{0,8}},27}, {{{0,9}},151}, + {{{84,7}},67}, {{{0,8}},123}, {{{0,8}},59}, {{{0,9}},215}, + {{{82,7}},19}, {{{0,8}},107}, {{{0,8}},43}, {{{0,9}},183}, + {{{0,8}},11}, {{{0,8}},139}, {{{0,8}},75}, {{{0,9}},247}, + {{{80,7}},5}, {{{0,8}},87}, {{{0,8}},23}, {{{192,8}},0}, + {{{83,7}},51}, {{{0,8}},119}, {{{0,8}},55}, {{{0,9}},207}, + {{{81,7}},15}, {{{0,8}},103}, {{{0,8}},39}, {{{0,9}},175}, + {{{0,8}},7}, {{{0,8}},135}, {{{0,8}},71}, {{{0,9}},239}, + {{{80,7}},9}, {{{0,8}},95}, {{{0,8}},31}, {{{0,9}},159}, + {{{84,7}},99}, {{{0,8}},127}, {{{0,8}},63}, {{{0,9}},223}, + {{{82,7}},27}, {{{0,8}},111}, {{{0,8}},47}, {{{0,9}},191}, + {{{0,8}},15}, {{{0,8}},143}, {{{0,8}},79}, {{{0,9}},255} + }; +local inflate_huft fixed_td[] = { + {{{80,5}},1}, {{{87,5}},257}, {{{83,5}},17}, {{{91,5}},4097}, + {{{81,5}},5}, {{{89,5}},1025}, {{{85,5}},65}, {{{93,5}},16385}, + {{{80,5}},3}, {{{88,5}},513}, {{{84,5}},33}, {{{92,5}},8193}, + {{{82,5}},9}, {{{90,5}},2049}, {{{86,5}},129}, {{{192,5}},24577}, + {{{80,5}},2}, {{{87,5}},385}, {{{83,5}},25}, {{{91,5}},6145}, + {{{81,5}},7}, {{{89,5}},1537}, {{{85,5}},97}, {{{93,5}},24577}, + {{{80,5}},4}, {{{88,5}},769}, {{{84,5}},49}, {{{92,5}},12289}, + {{{82,5}},13}, {{{90,5}},3073}, {{{86,5}},193}, {{{192,5}},24577} + }; diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/inflate.c pcsxr-unstable-1.9.94+svn98108/win32/zlib/inflate.c --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/inflate.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/inflate.c 2016-06-30 16:53:28.000000000 +0000 @@ -0,0 +1,366 @@ +/* inflate.c -- zlib interface to inflate modules + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "infblock.h" + +struct inflate_blocks_state {int dummy;}; /* for buggy compilers */ + +typedef enum { + METHOD, /* waiting for method byte */ + FLAG, /* waiting for flag byte */ + DICT4, /* four dictionary check bytes to go */ + DICT3, /* three dictionary check bytes to go */ + DICT2, /* two dictionary check bytes to go */ + DICT1, /* one dictionary check byte to go */ + DICT0, /* waiting for inflateSetDictionary */ + BLOCKS, /* decompressing blocks */ + CHECK4, /* four check bytes to go */ + CHECK3, /* three check bytes to go */ + CHECK2, /* two check bytes to go */ + CHECK1, /* one check byte to go */ + DONE, /* finished check, done */ + BAD} /* got an error--stay here */ +inflate_mode; + +/* inflate private state */ +struct internal_state { + + /* mode */ + inflate_mode mode; /* current inflate mode */ + + /* mode dependent information */ + union { + uInt method; /* if FLAGS, method byte */ + struct { + uLong was; /* computed check value */ + uLong need; /* stream check value */ + } check; /* if CHECK, check values to compare */ + uInt marker; /* if BAD, inflateSync's marker bytes count */ + } sub; /* submode */ + + /* mode independent information */ + int nowrap; /* flag for no wrapper */ + uInt wbits; /* log2(window size) (8..15, defaults to 15) */ + inflate_blocks_statef + *blocks; /* current inflate_blocks state */ + +}; + + +int ZEXPORT inflateReset(z) +z_streamp z; +{ + if (z == Z_NULL || z->state == Z_NULL) + return Z_STREAM_ERROR; + z->total_in = z->total_out = 0; + z->msg = Z_NULL; + z->state->mode = z->state->nowrap ? BLOCKS : METHOD; + inflate_blocks_reset(z->state->blocks, z, Z_NULL); + Tracev((stderr, "inflate: reset\n")); + return Z_OK; +} + + +int ZEXPORT inflateEnd(z) +z_streamp z; +{ + if (z == Z_NULL || z->state == Z_NULL || z->zfree == Z_NULL) + return Z_STREAM_ERROR; + if (z->state->blocks != Z_NULL) + inflate_blocks_free(z->state->blocks, z); + ZFREE(z, z->state); + z->state = Z_NULL; + Tracev((stderr, "inflate: end\n")); + return Z_OK; +} + + +int ZEXPORT inflateInit2_(z, w, version, stream_size) +z_streamp z; +int w; +const char *version; +int stream_size; +{ + if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || + stream_size != sizeof(z_stream)) + return Z_VERSION_ERROR; + + /* initialize state */ + if (z == Z_NULL) + return Z_STREAM_ERROR; + z->msg = Z_NULL; + if (z->zalloc == Z_NULL) + { + z->zalloc = zcalloc; + z->opaque = (voidpf)0; + } + if (z->zfree == Z_NULL) z->zfree = zcfree; + if ((z->state = (struct internal_state FAR *) + ZALLOC(z,1,sizeof(struct internal_state))) == Z_NULL) + return Z_MEM_ERROR; + z->state->blocks = Z_NULL; + + /* handle undocumented nowrap option (no zlib header or check) */ + z->state->nowrap = 0; + if (w < 0) + { + w = - w; + z->state->nowrap = 1; + } + + /* set window size */ + if (w < 8 || w > 15) + { + inflateEnd(z); + return Z_STREAM_ERROR; + } + z->state->wbits = (uInt)w; + + /* create inflate_blocks state */ + if ((z->state->blocks = + inflate_blocks_new(z, z->state->nowrap ? Z_NULL : adler32, (uInt)1 << w)) + == Z_NULL) + { + inflateEnd(z); + return Z_MEM_ERROR; + } + Tracev((stderr, "inflate: allocated\n")); + + /* reset state */ + inflateReset(z); + return Z_OK; +} + + +int ZEXPORT inflateInit_(z, version, stream_size) +z_streamp z; +const char *version; +int stream_size; +{ + return inflateInit2_(z, DEF_WBITS, version, stream_size); +} + + +#define NEEDBYTE {if(z->avail_in==0)return r;r=f;} +#define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++) + +int ZEXPORT inflate(z, f) +z_streamp z; +int f; +{ + int r; + uInt b; + + if (z == Z_NULL || z->state == Z_NULL || z->next_in == Z_NULL) + return Z_STREAM_ERROR; + f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK; + r = Z_BUF_ERROR; + while (1) switch (z->state->mode) + { + case METHOD: + NEEDBYTE + if (((z->state->sub.method = NEXTBYTE) & 0xf) != Z_DEFLATED) + { + z->state->mode = BAD; + z->msg = (char*)"unknown compression method"; + z->state->sub.marker = 5; /* can't try inflateSync */ + break; + } + if ((z->state->sub.method >> 4) + 8 > z->state->wbits) + { + z->state->mode = BAD; + z->msg = (char*)"invalid window size"; + z->state->sub.marker = 5; /* can't try inflateSync */ + break; + } + z->state->mode = FLAG; + case FLAG: + NEEDBYTE + b = NEXTBYTE; + if (((z->state->sub.method << 8) + b) % 31) + { + z->state->mode = BAD; + z->msg = (char*)"incorrect header check"; + z->state->sub.marker = 5; /* can't try inflateSync */ + break; + } + Tracev((stderr, "inflate: zlib header ok\n")); + if (!(b & PRESET_DICT)) + { + z->state->mode = BLOCKS; + break; + } + z->state->mode = DICT4; + case DICT4: + NEEDBYTE + z->state->sub.check.need = (uLong)NEXTBYTE << 24; + z->state->mode = DICT3; + case DICT3: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE << 16; + z->state->mode = DICT2; + case DICT2: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE << 8; + z->state->mode = DICT1; + case DICT1: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE; + z->adler = z->state->sub.check.need; + z->state->mode = DICT0; + return Z_NEED_DICT; + case DICT0: + z->state->mode = BAD; + z->msg = (char*)"need dictionary"; + z->state->sub.marker = 0; /* can try inflateSync */ + return Z_STREAM_ERROR; + case BLOCKS: + r = inflate_blocks(z->state->blocks, z, r); + if (r == Z_DATA_ERROR) + { + z->state->mode = BAD; + z->state->sub.marker = 0; /* can try inflateSync */ + break; + } + if (r == Z_OK) + r = f; + if (r != Z_STREAM_END) + return r; + r = f; + inflate_blocks_reset(z->state->blocks, z, &z->state->sub.check.was); + if (z->state->nowrap) + { + z->state->mode = DONE; + break; + } + z->state->mode = CHECK4; + case CHECK4: + NEEDBYTE + z->state->sub.check.need = (uLong)NEXTBYTE << 24; + z->state->mode = CHECK3; + case CHECK3: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE << 16; + z->state->mode = CHECK2; + case CHECK2: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE << 8; + z->state->mode = CHECK1; + case CHECK1: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE; + + if (z->state->sub.check.was != z->state->sub.check.need) + { + z->state->mode = BAD; + z->msg = (char*)"incorrect data check"; + z->state->sub.marker = 5; /* can't try inflateSync */ + break; + } + Tracev((stderr, "inflate: zlib check ok\n")); + z->state->mode = DONE; + case DONE: + return Z_STREAM_END; + case BAD: + return Z_DATA_ERROR; + default: + return Z_STREAM_ERROR; + } +#ifdef NEED_DUMMY_RETURN + return Z_STREAM_ERROR; /* Some dumb compilers complain without this */ +#endif +} + + +int ZEXPORT inflateSetDictionary(z, dictionary, dictLength) +z_streamp z; +const Bytef *dictionary; +uInt dictLength; +{ + uInt length = dictLength; + + if (z == Z_NULL || z->state == Z_NULL || z->state->mode != DICT0) + return Z_STREAM_ERROR; + + if (adler32(1L, dictionary, dictLength) != z->adler) return Z_DATA_ERROR; + z->adler = 1L; + + if (length >= ((uInt)1<state->wbits)) + { + length = (1<state->wbits)-1; + dictionary += dictLength - length; + } + inflate_set_dictionary(z->state->blocks, dictionary, length); + z->state->mode = BLOCKS; + return Z_OK; +} + + +int ZEXPORT inflateSync(z) +z_streamp z; +{ + uInt n; /* number of bytes to look at */ + Bytef *p; /* pointer to bytes */ + uInt m; /* number of marker bytes found in a row */ + uLong r, w; /* temporaries to save total_in and total_out */ + + /* set up */ + if (z == Z_NULL || z->state == Z_NULL) + return Z_STREAM_ERROR; + if (z->state->mode != BAD) + { + z->state->mode = BAD; + z->state->sub.marker = 0; + } + if ((n = z->avail_in) == 0) + return Z_BUF_ERROR; + p = z->next_in; + m = z->state->sub.marker; + + /* search */ + while (n && m < 4) + { + static const Byte mark[4] = {0, 0, 0xff, 0xff}; + if (*p == mark[m]) + m++; + else if (*p) + m = 0; + else + m = 4 - m; + p++, n--; + } + + /* restore */ + z->total_in += p - z->next_in; + z->next_in = p; + z->avail_in = n; + z->state->sub.marker = m; + + /* return no joy or set up to restart on a new block */ + if (m != 4) + return Z_DATA_ERROR; + r = z->total_in; w = z->total_out; + inflateReset(z); + z->total_in = r; z->total_out = w; + z->state->mode = BLOCKS; + return Z_OK; +} + + +/* Returns true if inflate is currently at the end of a block generated + * by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP + * implementation to provide an additional safety check. PPP uses Z_SYNC_FLUSH + * but removes the length bytes of the resulting empty stored block. When + * decompressing, PPP checks that at the end of input packet, inflate is + * waiting for these length bytes. + */ +int ZEXPORT inflateSyncPoint(z) +z_streamp z; +{ + if (z == Z_NULL || z->state == Z_NULL || z->state->blocks == Z_NULL) + return Z_STREAM_ERROR; + return inflate_blocks_sync_point(z->state->blocks); +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/inftrees.c pcsxr-unstable-1.9.94+svn98108/win32/zlib/inftrees.c --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/inftrees.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/inftrees.c 2016-06-30 16:53:28.000000000 +0000 @@ -0,0 +1,454 @@ +/* inftrees.c -- generate Huffman trees for efficient decoding + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "inftrees.h" + +#if !defined(BUILDFIXED) && !defined(STDC) +# define BUILDFIXED /* non ANSI compilers may not accept inffixed.h */ +#endif + +const char inflate_copyright[] = + " inflate 1.1.4 Copyright 1995-2002 Mark Adler "; +/* + If you use the zlib library in a product, an acknowledgment is welcome + in the documentation of your product. If for some reason you cannot + include such an acknowledgment, I would appreciate that you keep this + copyright string in the executable of your product. + */ +struct internal_state {int dummy;}; /* for buggy compilers */ + +/* simplify the use of the inflate_huft type with some defines */ +#define exop word.what.Exop +#define bits word.what.Bits + + +local int huft_build OF(( + uIntf *, /* code lengths in bits */ + uInt, /* number of codes */ + uInt, /* number of "simple" codes */ + const uIntf *, /* list of base values for non-simple codes */ + const uIntf *, /* list of extra bits for non-simple codes */ + inflate_huft * FAR*,/* result: starting table */ + uIntf *, /* maximum lookup bits (returns actual) */ + inflate_huft *, /* space for trees */ + uInt *, /* hufts used in space */ + uIntf * )); /* space for values */ + +/* Tables for deflate from PKZIP's appnote.txt. */ +local const uInt cplens[31] = { /* Copy lengths for literal codes 257..285 */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; + /* see note #13 above about 258 */ +local const uInt cplext[31] = { /* Extra bits for literal codes 257..285 */ + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, + 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112}; /* 112==invalid */ +local const uInt cpdist[30] = { /* Copy offsets for distance codes 0..29 */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, + 8193, 12289, 16385, 24577}; +local const uInt cpdext[30] = { /* Extra bits for distance codes */ + 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, + 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, + 12, 12, 13, 13}; + +/* + Huffman code decoding is performed using a multi-level table lookup. + The fastest way to decode is to simply build a lookup table whose + size is determined by the longest code. However, the time it takes + to build this table can also be a factor if the data being decoded + is not very long. The most common codes are necessarily the + shortest codes, so those codes dominate the decoding time, and hence + the speed. The idea is you can have a shorter table that decodes the + shorter, more probable codes, and then point to subsidiary tables for + the longer codes. The time it costs to decode the longer codes is + then traded against the time it takes to make longer tables. + + This results of this trade are in the variables lbits and dbits + below. lbits is the number of bits the first level table for literal/ + length codes can decode in one step, and dbits is the same thing for + the distance codes. Subsequent tables are also less than or equal to + those sizes. These values may be adjusted either when all of the + codes are shorter than that, in which case the longest code length in + bits is used, or when the shortest code is *longer* than the requested + table size, in which case the length of the shortest code in bits is + used. + + There are two different values for the two tables, since they code a + different number of possibilities each. The literal/length table + codes 286 possible values, or in a flat code, a little over eight + bits. The distance table codes 30 possible values, or a little less + than five bits, flat. The optimum values for speed end up being + about one bit more than those, so lbits is 8+1 and dbits is 5+1. + The optimum values may differ though from machine to machine, and + possibly even between compilers. Your mileage may vary. + */ + + +/* If BMAX needs to be larger than 16, then h and x[] should be uLong. */ +#define BMAX 15 /* maximum bit length of any code */ + +local int huft_build(b, n, s, d, e, t, m, hp, hn, v) +uIntf *b; /* code lengths in bits (all assumed <= BMAX) */ +uInt n; /* number of codes (assumed <= 288) */ +uInt s; /* number of simple-valued codes (0..s-1) */ +const uIntf *d; /* list of base values for non-simple codes */ +const uIntf *e; /* list of extra bits for non-simple codes */ +inflate_huft * FAR *t; /* result: starting table */ +uIntf *m; /* maximum lookup bits, returns actual */ +inflate_huft *hp; /* space for trees */ +uInt *hn; /* hufts used in space */ +uIntf *v; /* working area: values in order of bit length */ +/* Given a list of code lengths and a maximum table size, make a set of + tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR + if the given code set is incomplete (the tables are still built in this + case), or Z_DATA_ERROR if the input is invalid. */ +{ + + uInt a; /* counter for codes of length k */ + uInt c[BMAX+1]; /* bit length count table */ + uInt f; /* i repeats in table every f entries */ + int g; /* maximum code length */ + int h; /* table level */ + register uInt i; /* counter, current code */ + register uInt j; /* counter */ + register int k; /* number of bits in current code */ + int l; /* bits per table (returned in m) */ + uInt mask; /* (1 << w) - 1, to avoid cc -O bug on HP */ + register uIntf *p; /* pointer into c[], b[], or v[] */ + inflate_huft *q; /* points to current table */ + struct inflate_huft_s r; /* table entry for structure assignment */ + inflate_huft *u[BMAX]; /* table stack */ + register int w; /* bits before this table == (l * h) */ + uInt x[BMAX+1]; /* bit offsets, then code stack */ + uIntf *xp; /* pointer into x */ + int y; /* number of dummy codes added */ + uInt z; /* number of entries in current table */ + + + /* Generate counts for each bit length */ + p = c; +#define C0 *p++ = 0; +#define C2 C0 C0 C0 C0 +#define C4 C2 C2 C2 C2 + C4 /* clear c[]--assume BMAX+1 is 16 */ + p = b; i = n; + do { + c[*p++]++; /* assume all entries <= BMAX */ + } while (--i); + if (c[0] == n) /* null input--all zero length codes */ + { + *t = (inflate_huft *)Z_NULL; + *m = 0; + return Z_OK; + } + + + /* Find minimum and maximum length, bound *m by those */ + l = *m; + for (j = 1; j <= BMAX; j++) + if (c[j]) + break; + k = j; /* minimum code length */ + if ((uInt)l < j) + l = j; + for (i = BMAX; i; i--) + if (c[i]) + break; + g = i; /* maximum code length */ + if ((uInt)l > i) + l = i; + *m = l; + + + /* Adjust last length count to fill out codes, if needed */ + for (y = 1 << j; j < i; j++, y <<= 1) + if ((y -= c[j]) < 0) + return Z_DATA_ERROR; + if ((y -= c[i]) < 0) + return Z_DATA_ERROR; + c[i] += y; + + + /* Generate starting offsets into the value table for each length */ + x[1] = j = 0; + p = c + 1; xp = x + 2; + while (--i) { /* note that i == g from above */ + *xp++ = (j += *p++); + } + + + /* Make a table of values in order of bit lengths */ + p = b; i = 0; + do { + if ((j = *p++) != 0) + v[x[j]++] = i; + } while (++i < n); + n = x[g]; /* set n to length of v */ + + + /* Generate the Huffman codes and for each, make the table entries */ + x[0] = i = 0; /* first Huffman code is zero */ + p = v; /* grab values in bit order */ + h = -1; /* no tables yet--level -1 */ + w = -l; /* bits decoded == (l * h) */ + u[0] = (inflate_huft *)Z_NULL; /* just to keep compilers happy */ + q = (inflate_huft *)Z_NULL; /* ditto */ + z = 0; /* ditto */ + + /* go through the bit lengths (k already is bits in shortest code) */ + for (; k <= g; k++) + { + a = c[k]; + while (a--) + { + /* here i is the Huffman code of length k bits for value *p */ + /* make tables up to required level */ + while (k > w + l) + { + h++; + w += l; /* previous table always l bits */ + + /* compute minimum size table less than or equal to l bits */ + z = g - w; + z = z > (uInt)l ? l : z; /* table size upper limit */ + if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */ + { /* too few codes for k-w bit table */ + f -= a + 1; /* deduct codes from patterns left */ + xp = c + k; + if (j < z) + while (++j < z) /* try smaller tables up to z bits */ + { + if ((f <<= 1) <= *++xp) + break; /* enough codes to use up j bits */ + f -= *xp; /* else deduct codes from patterns */ + } + } + z = 1 << j; /* table entries for j-bit table */ + + /* allocate new table */ + if (*hn + z > MANY) /* (note: doesn't matter for fixed) */ + return Z_DATA_ERROR; /* overflow of MANY */ + u[h] = q = hp + *hn; + *hn += z; + + /* connect to last table, if there is one */ + if (h) + { + x[h] = i; /* save pattern for backing up */ + r.bits = (Byte)l; /* bits to dump before this table */ + r.exop = (Byte)j; /* bits in this table */ + j = i >> (w - l); + r.base = (uInt)(q - u[h-1] - j); /* offset to this table */ + u[h-1][j] = r; /* connect to last table */ + } + else + *t = q; /* first table is returned result */ + } + + /* set up table entry in r */ + r.bits = (Byte)(k - w); + if (p >= v + n) + r.exop = 128 + 64; /* out of values--invalid code */ + else if (*p < s) + { + r.exop = (Byte)(*p < 256 ? 0 : 32 + 64); /* 256 is end-of-block */ + r.base = *p++; /* simple code is just the value */ + } + else + { + r.exop = (Byte)(e[*p - s] + 16 + 64);/* non-simple--look up in lists */ + r.base = d[*p++ - s]; + } + + /* fill code-like entries with r */ + f = 1 << (k - w); + for (j = i >> w; j < z; j += f) + q[j] = r; + + /* backwards increment the k-bit code i */ + for (j = 1 << (k - 1); i & j; j >>= 1) + i ^= j; + i ^= j; + + /* backup over finished tables */ + mask = (1 << w) - 1; /* needed on HP, cc -O bug */ + while ((i & mask) != x[h]) + { + h--; /* don't need to update q */ + w -= l; + mask = (1 << w) - 1; + } + } + } + + + /* Return Z_BUF_ERROR if we were given an incomplete table */ + return y != 0 && g != 1 ? Z_BUF_ERROR : Z_OK; +} + + +int inflate_trees_bits(c, bb, tb, hp, z) +uIntf *c; /* 19 code lengths */ +uIntf *bb; /* bits tree desired/actual depth */ +inflate_huft * FAR *tb; /* bits tree result */ +inflate_huft *hp; /* space for trees */ +z_streamp z; /* for messages */ +{ + int r; + uInt hn = 0; /* hufts used in space */ + uIntf *v; /* work area for huft_build */ + + if ((v = (uIntf*)ZALLOC(z, 19, sizeof(uInt))) == Z_NULL) + return Z_MEM_ERROR; + r = huft_build(c, 19, 19, (uIntf*)Z_NULL, (uIntf*)Z_NULL, + tb, bb, hp, &hn, v); + if (r == Z_DATA_ERROR) + z->msg = (char*)"oversubscribed dynamic bit lengths tree"; + else if (r == Z_BUF_ERROR || *bb == 0) + { + z->msg = (char*)"incomplete dynamic bit lengths tree"; + r = Z_DATA_ERROR; + } + ZFREE(z, v); + return r; +} + + +int inflate_trees_dynamic(nl, nd, c, bl, bd, tl, td, hp, z) +uInt nl; /* number of literal/length codes */ +uInt nd; /* number of distance codes */ +uIntf *c; /* that many (total) code lengths */ +uIntf *bl; /* literal desired/actual bit depth */ +uIntf *bd; /* distance desired/actual bit depth */ +inflate_huft * FAR *tl; /* literal/length tree result */ +inflate_huft * FAR *td; /* distance tree result */ +inflate_huft *hp; /* space for trees */ +z_streamp z; /* for messages */ +{ + int r; + uInt hn = 0; /* hufts used in space */ + uIntf *v; /* work area for huft_build */ + + /* allocate work area */ + if ((v = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL) + return Z_MEM_ERROR; + + /* build literal/length tree */ + r = huft_build(c, nl, 257, cplens, cplext, tl, bl, hp, &hn, v); + if (r != Z_OK || *bl == 0) + { + if (r == Z_DATA_ERROR) + z->msg = (char*)"oversubscribed literal/length tree"; + else if (r != Z_MEM_ERROR) + { + z->msg = (char*)"incomplete literal/length tree"; + r = Z_DATA_ERROR; + } + ZFREE(z, v); + return r; + } + + /* build distance tree */ + r = huft_build(c + nl, nd, 0, cpdist, cpdext, td, bd, hp, &hn, v); + if (r != Z_OK || (*bd == 0 && nl > 257)) + { + if (r == Z_DATA_ERROR) + z->msg = (char*)"oversubscribed distance tree"; + else if (r == Z_BUF_ERROR) { +#ifdef PKZIP_BUG_WORKAROUND + r = Z_OK; + } +#else + z->msg = (char*)"incomplete distance tree"; + r = Z_DATA_ERROR; + } + else if (r != Z_MEM_ERROR) + { + z->msg = (char*)"empty distance tree with lengths"; + r = Z_DATA_ERROR; + } + ZFREE(z, v); + return r; +#endif + } + + /* done */ + ZFREE(z, v); + return Z_OK; +} + + +/* build fixed tables only once--keep them here */ +#ifdef BUILDFIXED +local int fixed_built = 0; +#define FIXEDH 544 /* number of hufts used by fixed tables */ +local inflate_huft fixed_mem[FIXEDH]; +local uInt fixed_bl; +local uInt fixed_bd; +local inflate_huft *fixed_tl; +local inflate_huft *fixed_td; +#else +#include "inffixed.h" +#endif + + +int inflate_trees_fixed(bl, bd, tl, td, z) +uIntf *bl; /* literal desired/actual bit depth */ +uIntf *bd; /* distance desired/actual bit depth */ +inflate_huft * FAR *tl; /* literal/length tree result */ +inflate_huft * FAR *td; /* distance tree result */ +z_streamp z; /* for memory allocation */ +{ +#ifdef BUILDFIXED + /* build fixed tables if not already */ + if (!fixed_built) + { + int k; /* temporary variable */ + uInt f = 0; /* number of hufts used in fixed_mem */ + uIntf *c; /* length list for huft_build */ + uIntf *v; /* work area for huft_build */ + + /* allocate memory */ + if ((c = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL) + return Z_MEM_ERROR; + if ((v = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL) + { + ZFREE(z, c); + return Z_MEM_ERROR; + } + + /* literal table */ + for (k = 0; k < 144; k++) + c[k] = 8; + for (; k < 256; k++) + c[k] = 9; + for (; k < 280; k++) + c[k] = 7; + for (; k < 288; k++) + c[k] = 8; + fixed_bl = 9; + huft_build(c, 288, 257, cplens, cplext, &fixed_tl, &fixed_bl, + fixed_mem, &f, v); + + /* distance table */ + for (k = 0; k < 30; k++) + c[k] = 5; + fixed_bd = 5; + huft_build(c, 30, 0, cpdist, cpdext, &fixed_td, &fixed_bd, + fixed_mem, &f, v); + + /* done */ + ZFREE(z, v); + ZFREE(z, c); + fixed_built = 1; + } +#endif + *bl = fixed_bl; + *bd = fixed_bd; + *tl = fixed_tl; + *td = fixed_td; + return Z_OK; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/inftrees.h pcsxr-unstable-1.9.94+svn98108/win32/zlib/inftrees.h --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/inftrees.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/inftrees.h 2016-06-30 16:53:28.000000000 +0000 @@ -0,0 +1,58 @@ +/* inftrees.h -- header to use inftrees.c + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* Huffman code lookup table entry--this entry is four bytes for machines + that have 16-bit pointers (e.g. PC's in the small or medium model). */ + +typedef struct inflate_huft_s FAR inflate_huft; + +struct inflate_huft_s { + union { + struct { + Byte Exop; /* number of extra bits or operation */ + Byte Bits; /* number of bits in this code or subcode */ + } what; + uInt pad; /* pad structure to a power of 2 (4 bytes for */ + } word; /* 16-bit, 8 bytes for 32-bit int's) */ + uInt base; /* literal, length base, distance base, + or table offset */ +}; + +/* Maximum size of dynamic tree. The maximum found in a long but non- + exhaustive search was 1004 huft structures (850 for length/literals + and 154 for distances, the latter actually the result of an + exhaustive search). The actual maximum is not known, but the + value below is more than safe. */ +#define MANY 1440 + +extern int inflate_trees_bits OF(( + uIntf *, /* 19 code lengths */ + uIntf *, /* bits tree desired/actual depth */ + inflate_huft * FAR *, /* bits tree result */ + inflate_huft *, /* space for trees */ + z_streamp)); /* for messages */ + +extern int inflate_trees_dynamic OF(( + uInt, /* number of literal/length codes */ + uInt, /* number of distance codes */ + uIntf *, /* that many (total) code lengths */ + uIntf *, /* literal desired/actual bit depth */ + uIntf *, /* distance desired/actual bit depth */ + inflate_huft * FAR *, /* literal/length tree result */ + inflate_huft * FAR *, /* distance tree result */ + inflate_huft *, /* space for trees */ + z_streamp)); /* for messages */ + +extern int inflate_trees_fixed OF(( + uIntf *, /* literal desired/actual bit depth */ + uIntf *, /* distance desired/actual bit depth */ + inflate_huft * FAR *, /* literal/length tree result */ + inflate_huft * FAR *, /* distance tree result */ + z_streamp)); /* for memory allocation */ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/infutil.c pcsxr-unstable-1.9.94+svn98108/win32/zlib/infutil.c --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/infutil.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/infutil.c 2016-06-30 16:53:28.000000000 +0000 @@ -0,0 +1,87 @@ +/* inflate_util.c -- data and routines common to blocks and codes + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "infblock.h" +#include "inftrees.h" +#include "infcodes.h" +#include "infutil.h" + +struct inflate_codes_state {int dummy;}; /* for buggy compilers */ + +/* And'ing with mask[n] masks the lower n bits */ +uInt inflate_mask[17] = { + 0x0000, + 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, + 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff +}; + + +/* copy as much as possible from the sliding window to the output area */ +int inflate_flush(s, z, r) +inflate_blocks_statef *s; +z_streamp z; +int r; +{ + uInt n; + Bytef *p; + Bytef *q; + + /* local copies of source and destination pointers */ + p = z->next_out; + q = s->read; + + /* compute number of bytes to copy as far as end of window */ + n = (uInt)((q <= s->write ? s->write : s->end) - q); + if (n > z->avail_out) n = z->avail_out; + if (n && r == Z_BUF_ERROR) r = Z_OK; + + /* update counters */ + z->avail_out -= n; + z->total_out += n; + + /* update check information */ + if (s->checkfn != Z_NULL) + z->adler = s->check = (*s->checkfn)(s->check, q, n); + + /* copy as far as end of window */ + zmemcpy(p, q, n); + p += n; + q += n; + + /* see if more to copy at beginning of window */ + if (q == s->end) + { + /* wrap pointers */ + q = s->window; + if (s->write == s->end) + s->write = s->window; + + /* compute bytes to copy */ + n = (uInt)(s->write - q); + if (n > z->avail_out) n = z->avail_out; + if (n && r == Z_BUF_ERROR) r = Z_OK; + + /* update counters */ + z->avail_out -= n; + z->total_out += n; + + /* update check information */ + if (s->checkfn != Z_NULL) + z->adler = s->check = (*s->checkfn)(s->check, q, n); + + /* copy */ + zmemcpy(p, q, n); + p += n; + q += n; + } + + /* update pointers */ + z->next_out = p; + s->read = q; + + /* done */ + return r; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/infutil.h pcsxr-unstable-1.9.94+svn98108/win32/zlib/infutil.h --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/infutil.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/infutil.h 2016-06-30 16:53:28.000000000 +0000 @@ -0,0 +1,98 @@ +/* infutil.h -- types and macros common to blocks and codes + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +#ifndef _INFUTIL_H +#define _INFUTIL_H + +typedef enum { + TYPE, /* get type bits (3, including end bit) */ + LENS, /* get lengths for stored */ + STORED, /* processing stored block */ + TABLE, /* get table lengths */ + BTREE, /* get bit lengths tree for a dynamic block */ + DTREE, /* get length, distance trees for a dynamic block */ + CODES, /* processing fixed or dynamic block */ + DRY, /* output remaining window bytes */ + DONE, /* finished last block, done */ + BAD} /* got a data error--stuck here */ +inflate_block_mode; + +/* inflate blocks semi-private state */ +struct inflate_blocks_state { + + /* mode */ + inflate_block_mode mode; /* current inflate_block mode */ + + /* mode dependent information */ + union { + uInt left; /* if STORED, bytes left to copy */ + struct { + uInt table; /* table lengths (14 bits) */ + uInt index; /* index into blens (or border) */ + uIntf *blens; /* bit lengths of codes */ + uInt bb; /* bit length tree depth */ + inflate_huft *tb; /* bit length decoding tree */ + } trees; /* if DTREE, decoding info for trees */ + struct { + inflate_codes_statef + *codes; + } decode; /* if CODES, current state */ + } sub; /* submode */ + uInt last; /* true if this block is the last block */ + + /* mode independent information */ + uInt bitk; /* bits in bit buffer */ + uLong bitb; /* bit buffer */ + inflate_huft *hufts; /* single malloc for tree space */ + Bytef *window; /* sliding window */ + Bytef *end; /* one byte after sliding window */ + Bytef *read; /* window read pointer */ + Bytef *write; /* window write pointer */ + check_func checkfn; /* check function */ + uLong check; /* check on output */ + +}; + + +/* defines for inflate input/output */ +/* update pointers and return */ +#define UPDBITS {s->bitb=b;s->bitk=k;} +#define UPDIN {z->avail_in=n;z->total_in+=p-z->next_in;z->next_in=p;} +#define UPDOUT {s->write=q;} +#define UPDATE {UPDBITS UPDIN UPDOUT} +#define LEAVE {UPDATE return inflate_flush(s,z,r);} +/* get bytes and bits */ +#define LOADIN {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;} +#define NEEDBYTE {if(n)r=Z_OK;else LEAVE} +#define NEXTBYTE (n--,*p++) +#define NEEDBITS(j) {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<>=(j);k-=(j);} +/* output bytes */ +#define WAVAIL (uInt)(qread?s->read-q-1:s->end-q) +#define LOADOUT {q=s->write;m=(uInt)WAVAIL;} +#define WRAP {if(q==s->end&&s->read!=s->window){q=s->window;m=(uInt)WAVAIL;}} +#define FLUSH {UPDOUT r=inflate_flush(s,z,r); LOADOUT} +#define NEEDOUT {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE}}r=Z_OK;} +#define OUTBYTE(a) {*q++=(Byte)(a);m--;} +/* load local pointers */ +#define LOAD {LOADIN LOADOUT} + +/* masks for lower bits (size given to avoid silly warnings with Visual C++) */ +extern uInt inflate_mask[17]; + +/* copy as much as possible from the sliding window to the output area */ +extern int inflate_flush OF(( + inflate_blocks_statef *, + z_streamp , + int)); + +struct internal_state {int dummy;}; /* for buggy compilers */ + +#endif diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/trees.c pcsxr-unstable-1.9.94+svn98108/win32/zlib/trees.c --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/trees.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/trees.c 2016-06-30 16:53:28.000000000 +0000 @@ -0,0 +1,1214 @@ +/* trees.c -- output deflated data using Huffman coding + * Copyright (C) 1995-2002 Jean-loup Gailly + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + * ALGORITHM + * + * The "deflation" process uses several Huffman trees. The more + * common source values are represented by shorter bit sequences. + * + * Each code tree is stored in a compressed form which is itself + * a Huffman encoding of the lengths of all the code strings (in + * ascending order by source values). The actual code strings are + * reconstructed from the lengths in the inflate process, as described + * in the deflate specification. + * + * REFERENCES + * + * Deutsch, L.P.,"'Deflate' Compressed Data Format Specification". + * Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc + * + * Storer, James A. + * Data Compression: Methods and Theory, pp. 49-50. + * Computer Science Press, 1988. ISBN 0-7167-8156-5. + * + * Sedgewick, R. + * Algorithms, p290. + * Addison-Wesley, 1983. ISBN 0-201-06672-6. + */ + +/* @(#) $Id$ */ + +/* #define GEN_TREES_H */ + +#include "deflate.h" + +#ifdef DEBUG +# include +#endif + +/* =========================================================================== + * Constants + */ + +#define MAX_BL_BITS 7 +/* Bit length codes must not exceed MAX_BL_BITS bits */ + +#define END_BLOCK 256 +/* end of block literal code */ + +#define REP_3_6 16 +/* repeat previous bit length 3-6 times (2 bits of repeat count) */ + +#define REPZ_3_10 17 +/* repeat a zero length 3-10 times (3 bits of repeat count) */ + +#define REPZ_11_138 18 +/* repeat a zero length 11-138 times (7 bits of repeat count) */ + +local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */ + = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0}; + +local const int extra_dbits[D_CODES] /* extra bits for each distance code */ + = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; + +local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */ + = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7}; + +local const uch bl_order[BL_CODES] + = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15}; +/* The lengths of the bit length codes are sent in order of decreasing + * probability, to avoid transmitting the lengths for unused bit length codes. + */ + +#define Buf_size (8 * 2*sizeof(char)) +/* Number of bits used within bi_buf. (bi_buf might be implemented on + * more than 16 bits on some systems.) + */ + +/* =========================================================================== + * Local data. These are initialized only once. + */ + +#define DIST_CODE_LEN 512 /* see definition of array dist_code below */ + +#if defined(GEN_TREES_H) || !defined(STDC) +/* non ANSI compilers may not accept trees.h */ + +local ct_data static_ltree[L_CODES+2]; +/* The static literal tree. Since the bit lengths are imposed, there is no + * need for the L_CODES extra codes used during heap construction. However + * The codes 286 and 287 are needed to build a canonical tree (see _tr_init + * below). + */ + +local ct_data static_dtree[D_CODES]; +/* The static distance tree. (Actually a trivial tree since all codes use + * 5 bits.) + */ + +uch _dist_code[DIST_CODE_LEN]; +/* Distance codes. The first 256 values correspond to the distances + * 3 .. 258, the last 256 values correspond to the top 8 bits of + * the 15 bit distances. + */ + +uch _length_code[MAX_MATCH-MIN_MATCH+1]; +/* length code for each normalized match length (0 == MIN_MATCH) */ + +local int base_length[LENGTH_CODES]; +/* First normalized length for each code (0 = MIN_MATCH) */ + +local int base_dist[D_CODES]; +/* First normalized distance for each code (0 = distance of 1) */ + +#else +# include "trees.h" +#endif /* GEN_TREES_H */ + +struct static_tree_desc_s { + const ct_data *static_tree; /* static tree or NULL */ + const intf *extra_bits; /* extra bits for each code or NULL */ + int extra_base; /* base index for extra_bits */ + int elems; /* max number of elements in the tree */ + int max_length; /* max bit length for the codes */ +}; + +local static_tree_desc static_l_desc = +{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS}; + +local static_tree_desc static_d_desc = +{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS}; + +local static_tree_desc static_bl_desc = +{(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS}; + +/* =========================================================================== + * Local (static) routines in this file. + */ + +local void tr_static_init OF((void)); +local void init_block OF((deflate_state *s)); +local void pqdownheap OF((deflate_state *s, ct_data *tree, int k)); +local void gen_bitlen OF((deflate_state *s, tree_desc *desc)); +local void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count)); +local void build_tree OF((deflate_state *s, tree_desc *desc)); +local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code)); +local void send_tree OF((deflate_state *s, ct_data *tree, int max_code)); +local int build_bl_tree OF((deflate_state *s)); +local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes, + int blcodes)); +local void compress_block OF((deflate_state *s, ct_data *ltree, + ct_data *dtree)); +local void set_data_type OF((deflate_state *s)); +local unsigned bi_reverse OF((unsigned value, int length)); +local void bi_windup OF((deflate_state *s)); +local void bi_flush OF((deflate_state *s)); +local void copy_block OF((deflate_state *s, charf *buf, unsigned len, + int header)); + +#ifdef GEN_TREES_H +local void gen_trees_header OF((void)); +#endif + +#ifndef DEBUG +# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len) + /* Send a code of the given tree. c and tree must not have side effects */ + +#else /* DEBUG */ +# define send_code(s, c, tree) \ + { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \ + send_bits(s, tree[c].Code, tree[c].Len); } +#endif + +/* =========================================================================== + * Output a short LSB first on the stream. + * IN assertion: there is enough room in pendingBuf. + */ +#define put_short(s, w) { \ + put_byte(s, (uch)((w) & 0xff)); \ + put_byte(s, (uch)((ush)(w) >> 8)); \ +} + +/* =========================================================================== + * Send a value on a given number of bits. + * IN assertion: length <= 16 and value fits in length bits. + */ +#ifdef DEBUG +local void send_bits OF((deflate_state *s, int value, int length)); + +local void send_bits(s, value, length) + deflate_state *s; + int value; /* value to send */ + int length; /* number of bits */ +{ + Tracevv((stderr," l %2d v %4x ", length, value)); + Assert(length > 0 && length <= 15, "invalid length"); + s->bits_sent += (ulg)length; + + /* If not enough room in bi_buf, use (valid) bits from bi_buf and + * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid)) + * unused bits in value. + */ + if (s->bi_valid > (int)Buf_size - length) { + s->bi_buf |= (value << s->bi_valid); + put_short(s, s->bi_buf); + s->bi_buf = (ush)value >> (Buf_size - s->bi_valid); + s->bi_valid += length - Buf_size; + } else { + s->bi_buf |= value << s->bi_valid; + s->bi_valid += length; + } +} +#else /* !DEBUG */ + +#define send_bits(s, value, length) \ +{ int len = length;\ + if (s->bi_valid > (int)Buf_size - len) {\ + int val = value;\ + s->bi_buf |= (val << s->bi_valid);\ + put_short(s, s->bi_buf);\ + s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\ + s->bi_valid += len - Buf_size;\ + } else {\ + s->bi_buf |= (value) << s->bi_valid;\ + s->bi_valid += len;\ + }\ +} +#endif /* DEBUG */ + + +#define MAX(a,b) (a >= b ? a : b) +/* the arguments must not have side effects */ + +/* =========================================================================== + * Initialize the various 'constant' tables. + */ +local void tr_static_init() +{ +#if defined(GEN_TREES_H) || !defined(STDC) + static int static_init_done = 0; + int n; /* iterates over tree elements */ + int bits; /* bit counter */ + int length; /* length value */ + int code; /* code value */ + int dist; /* distance index */ + ush bl_count[MAX_BITS+1]; + /* number of codes at each bit length for an optimal tree */ + + if (static_init_done) return; + + /* For some embedded targets, global variables are not initialized: */ + static_l_desc.static_tree = static_ltree; + static_l_desc.extra_bits = extra_lbits; + static_d_desc.static_tree = static_dtree; + static_d_desc.extra_bits = extra_dbits; + static_bl_desc.extra_bits = extra_blbits; + + /* Initialize the mapping length (0..255) -> length code (0..28) */ + length = 0; + for (code = 0; code < LENGTH_CODES-1; code++) { + base_length[code] = length; + for (n = 0; n < (1< dist code (0..29) */ + dist = 0; + for (code = 0 ; code < 16; code++) { + base_dist[code] = dist; + for (n = 0; n < (1<>= 7; /* from now on, all distances are divided by 128 */ + for ( ; code < D_CODES; code++) { + base_dist[code] = dist << 7; + for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) { + _dist_code[256 + dist++] = (uch)code; + } + } + Assert (dist == 256, "tr_static_init: 256+dist != 512"); + + /* Construct the codes of the static literal tree */ + for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0; + n = 0; + while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++; + while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++; + while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++; + while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++; + /* Codes 286 and 287 do not exist, but we must include them in the + * tree construction to get a canonical Huffman tree (longest code + * all ones) + */ + gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count); + + /* The static distance tree is trivial: */ + for (n = 0; n < D_CODES; n++) { + static_dtree[n].Len = 5; + static_dtree[n].Code = bi_reverse((unsigned)n, 5); + } + static_init_done = 1; + +# ifdef GEN_TREES_H + gen_trees_header(); +# endif +#endif /* defined(GEN_TREES_H) || !defined(STDC) */ +} + +/* =========================================================================== + * Genererate the file trees.h describing the static trees. + */ +#ifdef GEN_TREES_H +# ifndef DEBUG +# include +# endif + +# define SEPARATOR(i, last, width) \ + ((i) == (last)? "\n};\n\n" : \ + ((i) % (width) == (width)-1 ? ",\n" : ", ")) + +void gen_trees_header() +{ + FILE *header = fopen("trees.h", "w"); + int i; + + Assert (header != NULL, "Can't open trees.h"); + fprintf(header, + "/* header created automatically with -DGEN_TREES_H */\n\n"); + + fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n"); + for (i = 0; i < L_CODES+2; i++) { + fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code, + static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5)); + } + + fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n"); + for (i = 0; i < D_CODES; i++) { + fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code, + static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5)); + } + + fprintf(header, "const uch _dist_code[DIST_CODE_LEN] = {\n"); + for (i = 0; i < DIST_CODE_LEN; i++) { + fprintf(header, "%2u%s", _dist_code[i], + SEPARATOR(i, DIST_CODE_LEN-1, 20)); + } + + fprintf(header, "const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n"); + for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) { + fprintf(header, "%2u%s", _length_code[i], + SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20)); + } + + fprintf(header, "local const int base_length[LENGTH_CODES] = {\n"); + for (i = 0; i < LENGTH_CODES; i++) { + fprintf(header, "%1u%s", base_length[i], + SEPARATOR(i, LENGTH_CODES-1, 20)); + } + + fprintf(header, "local const int base_dist[D_CODES] = {\n"); + for (i = 0; i < D_CODES; i++) { + fprintf(header, "%5u%s", base_dist[i], + SEPARATOR(i, D_CODES-1, 10)); + } + + fclose(header); +} +#endif /* GEN_TREES_H */ + +/* =========================================================================== + * Initialize the tree data structures for a new zlib stream. + */ +void _tr_init(s) + deflate_state *s; +{ + tr_static_init(); + + s->l_desc.dyn_tree = s->dyn_ltree; + s->l_desc.stat_desc = &static_l_desc; + + s->d_desc.dyn_tree = s->dyn_dtree; + s->d_desc.stat_desc = &static_d_desc; + + s->bl_desc.dyn_tree = s->bl_tree; + s->bl_desc.stat_desc = &static_bl_desc; + + s->bi_buf = 0; + s->bi_valid = 0; + s->last_eob_len = 8; /* enough lookahead for inflate */ +#ifdef DEBUG + s->compressed_len = 0L; + s->bits_sent = 0L; +#endif + + /* Initialize the first block of the first file: */ + init_block(s); +} + +/* =========================================================================== + * Initialize a new block. + */ +local void init_block(s) + deflate_state *s; +{ + int n; /* iterates over tree elements */ + + /* Initialize the trees. */ + for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0; + for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0; + for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0; + + s->dyn_ltree[END_BLOCK].Freq = 1; + s->opt_len = s->static_len = 0L; + s->last_lit = s->matches = 0; +} + +#define SMALLEST 1 +/* Index within the heap array of least frequent node in the Huffman tree */ + + +/* =========================================================================== + * Remove the smallest element from the heap and recreate the heap with + * one less element. Updates heap and heap_len. + */ +#define pqremove(s, tree, top) \ +{\ + top = s->heap[SMALLEST]; \ + s->heap[SMALLEST] = s->heap[s->heap_len--]; \ + pqdownheap(s, tree, SMALLEST); \ +} + +/* =========================================================================== + * Compares to subtrees, using the tree depth as tie breaker when + * the subtrees have equal frequency. This minimizes the worst case length. + */ +#define smaller(tree, n, m, depth) \ + (tree[n].Freq < tree[m].Freq || \ + (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m])) + +/* =========================================================================== + * Restore the heap property by moving down the tree starting at node k, + * exchanging a node with the smallest of its two sons if necessary, stopping + * when the heap property is re-established (each father smaller than its + * two sons). + */ +local void pqdownheap(s, tree, k) + deflate_state *s; + ct_data *tree; /* the tree to restore */ + int k; /* node to move down */ +{ + int v = s->heap[k]; + int j = k << 1; /* left son of k */ + while (j <= s->heap_len) { + /* Set j to the smallest of the two sons: */ + if (j < s->heap_len && + smaller(tree, s->heap[j+1], s->heap[j], s->depth)) { + j++; + } + /* Exit if v is smaller than both sons */ + if (smaller(tree, v, s->heap[j], s->depth)) break; + + /* Exchange v with the smallest son */ + s->heap[k] = s->heap[j]; k = j; + + /* And continue down the tree, setting j to the left son of k */ + j <<= 1; + } + s->heap[k] = v; +} + +/* =========================================================================== + * Compute the optimal bit lengths for a tree and update the total bit length + * for the current block. + * IN assertion: the fields freq and dad are set, heap[heap_max] and + * above are the tree nodes sorted by increasing frequency. + * OUT assertions: the field len is set to the optimal bit length, the + * array bl_count contains the frequencies for each bit length. + * The length opt_len is updated; static_len is also updated if stree is + * not null. + */ +local void gen_bitlen(s, desc) + deflate_state *s; + tree_desc *desc; /* the tree descriptor */ +{ + ct_data *tree = desc->dyn_tree; + int max_code = desc->max_code; + const ct_data *stree = desc->stat_desc->static_tree; + const intf *extra = desc->stat_desc->extra_bits; + int base = desc->stat_desc->extra_base; + int max_length = desc->stat_desc->max_length; + int h; /* heap index */ + int n, m; /* iterate over the tree elements */ + int bits; /* bit length */ + int xbits; /* extra bits */ + ush f; /* frequency */ + int overflow = 0; /* number of elements with bit length too large */ + + for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0; + + /* In a first pass, compute the optimal bit lengths (which may + * overflow in the case of the bit length tree). + */ + tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */ + + for (h = s->heap_max+1; h < HEAP_SIZE; h++) { + n = s->heap[h]; + bits = tree[tree[n].Dad].Len + 1; + if (bits > max_length) bits = max_length, overflow++; + tree[n].Len = (ush)bits; + /* We overwrite tree[n].Dad which is no longer needed */ + + if (n > max_code) continue; /* not a leaf node */ + + s->bl_count[bits]++; + xbits = 0; + if (n >= base) xbits = extra[n-base]; + f = tree[n].Freq; + s->opt_len += (ulg)f * (bits + xbits); + if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits); + } + if (overflow == 0) return; + + Trace((stderr,"\nbit length overflow\n")); + /* This happens for example on obj2 and pic of the Calgary corpus */ + + /* Find the first bit length which could increase: */ + do { + bits = max_length-1; + while (s->bl_count[bits] == 0) bits--; + s->bl_count[bits]--; /* move one leaf down the tree */ + s->bl_count[bits+1] += 2; /* move one overflow item as its brother */ + s->bl_count[max_length]--; + /* The brother of the overflow item also moves one step up, + * but this does not affect bl_count[max_length] + */ + overflow -= 2; + } while (overflow > 0); + + /* Now recompute all bit lengths, scanning in increasing frequency. + * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all + * lengths instead of fixing only the wrong ones. This idea is taken + * from 'ar' written by Haruhiko Okumura.) + */ + for (bits = max_length; bits != 0; bits--) { + n = s->bl_count[bits]; + while (n != 0) { + m = s->heap[--h]; + if (m > max_code) continue; + if (tree[m].Len != (unsigned) bits) { + Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); + s->opt_len += ((long)bits - (long)tree[m].Len) + *(long)tree[m].Freq; + tree[m].Len = (ush)bits; + } + n--; + } + } +} + +/* =========================================================================== + * Generate the codes for a given tree and bit counts (which need not be + * optimal). + * IN assertion: the array bl_count contains the bit length statistics for + * the given tree and the field len is set for all tree elements. + * OUT assertion: the field code is set for all tree elements of non + * zero code length. + */ +local void gen_codes (tree, max_code, bl_count) + ct_data *tree; /* the tree to decorate */ + int max_code; /* largest code with non zero frequency */ + ushf *bl_count; /* number of codes at each bit length */ +{ + ush next_code[MAX_BITS+1]; /* next code value for each bit length */ + ush code = 0; /* running code value */ + int bits; /* bit index */ + int n; /* code index */ + + /* The distribution counts are first used to generate the code values + * without bit reversal. + */ + for (bits = 1; bits <= MAX_BITS; bits++) { + next_code[bits] = code = (code + bl_count[bits-1]) << 1; + } + /* Check that the bit counts in bl_count are consistent. The last code + * must be all ones. + */ + Assert (code + bl_count[MAX_BITS]-1 == (1<dyn_tree; + const ct_data *stree = desc->stat_desc->static_tree; + int elems = desc->stat_desc->elems; + int n, m; /* iterate over heap elements */ + int max_code = -1; /* largest code with non zero frequency */ + int node; /* new node being created */ + + /* Construct the initial heap, with least frequent element in + * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. + * heap[0] is not used. + */ + s->heap_len = 0, s->heap_max = HEAP_SIZE; + + for (n = 0; n < elems; n++) { + if (tree[n].Freq != 0) { + s->heap[++(s->heap_len)] = max_code = n; + s->depth[n] = 0; + } else { + tree[n].Len = 0; + } + } + + /* The pkzip format requires that at least one distance code exists, + * and that at least one bit should be sent even if there is only one + * possible code. So to avoid special checks later on we force at least + * two codes of non zero frequency. + */ + while (s->heap_len < 2) { + node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0); + tree[node].Freq = 1; + s->depth[node] = 0; + s->opt_len--; if (stree) s->static_len -= stree[node].Len; + /* node is 0 or 1 so it does not have extra bits */ + } + desc->max_code = max_code; + + /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, + * establish sub-heaps of increasing lengths: + */ + for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n); + + /* Construct the Huffman tree by repeatedly combining the least two + * frequent nodes. + */ + node = elems; /* next internal node of the tree */ + do { + pqremove(s, tree, n); /* n = node of least frequency */ + m = s->heap[SMALLEST]; /* m = node of next least frequency */ + + s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */ + s->heap[--(s->heap_max)] = m; + + /* Create a new node father of n and m */ + tree[node].Freq = tree[n].Freq + tree[m].Freq; + s->depth[node] = (uch) (MAX(s->depth[n], s->depth[m]) + 1); + tree[n].Dad = tree[m].Dad = (ush)node; +#ifdef DUMP_BL_TREE + if (tree == s->bl_tree) { + fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)", + node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq); + } +#endif + /* and insert the new node in the heap */ + s->heap[SMALLEST] = node++; + pqdownheap(s, tree, SMALLEST); + + } while (s->heap_len >= 2); + + s->heap[--(s->heap_max)] = s->heap[SMALLEST]; + + /* At this point, the fields freq and dad are set. We can now + * generate the bit lengths. + */ + gen_bitlen(s, (tree_desc *)desc); + + /* The field len is now set, we can generate the bit codes */ + gen_codes ((ct_data *)tree, max_code, s->bl_count); +} + +/* =========================================================================== + * Scan a literal or distance tree to determine the frequencies of the codes + * in the bit length tree. + */ +local void scan_tree (s, tree, max_code) + deflate_state *s; + ct_data *tree; /* the tree to be scanned */ + int max_code; /* and its largest code of non zero frequency */ +{ + int n; /* iterates over all tree elements */ + int prevlen = -1; /* last emitted length */ + int curlen; /* length of current code */ + int nextlen = tree[0].Len; /* length of next code */ + int count = 0; /* repeat count of the current code */ + int max_count = 7; /* max repeat count */ + int min_count = 4; /* min repeat count */ + + if (nextlen == 0) max_count = 138, min_count = 3; + tree[max_code+1].Len = (ush)0xffff; /* guard */ + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; nextlen = tree[n+1].Len; + if (++count < max_count && curlen == nextlen) { + continue; + } else if (count < min_count) { + s->bl_tree[curlen].Freq += count; + } else if (curlen != 0) { + if (curlen != prevlen) s->bl_tree[curlen].Freq++; + s->bl_tree[REP_3_6].Freq++; + } else if (count <= 10) { + s->bl_tree[REPZ_3_10].Freq++; + } else { + s->bl_tree[REPZ_11_138].Freq++; + } + count = 0; prevlen = curlen; + if (nextlen == 0) { + max_count = 138, min_count = 3; + } else if (curlen == nextlen) { + max_count = 6, min_count = 3; + } else { + max_count = 7, min_count = 4; + } + } +} + +/* =========================================================================== + * Send a literal or distance tree in compressed form, using the codes in + * bl_tree. + */ +local void send_tree (s, tree, max_code) + deflate_state *s; + ct_data *tree; /* the tree to be scanned */ + int max_code; /* and its largest code of non zero frequency */ +{ + int n; /* iterates over all tree elements */ + int prevlen = -1; /* last emitted length */ + int curlen; /* length of current code */ + int nextlen = tree[0].Len; /* length of next code */ + int count = 0; /* repeat count of the current code */ + int max_count = 7; /* max repeat count */ + int min_count = 4; /* min repeat count */ + + /* tree[max_code+1].Len = -1; */ /* guard already set */ + if (nextlen == 0) max_count = 138, min_count = 3; + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; nextlen = tree[n+1].Len; + if (++count < max_count && curlen == nextlen) { + continue; + } else if (count < min_count) { + do { send_code(s, curlen, s->bl_tree); } while (--count != 0); + + } else if (curlen != 0) { + if (curlen != prevlen) { + send_code(s, curlen, s->bl_tree); count--; + } + Assert(count >= 3 && count <= 6, " 3_6?"); + send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2); + + } else if (count <= 10) { + send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3); + + } else { + send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7); + } + count = 0; prevlen = curlen; + if (nextlen == 0) { + max_count = 138, min_count = 3; + } else if (curlen == nextlen) { + max_count = 6, min_count = 3; + } else { + max_count = 7, min_count = 4; + } + } +} + +/* =========================================================================== + * Construct the Huffman tree for the bit lengths and return the index in + * bl_order of the last bit length code to send. + */ +local int build_bl_tree(s) + deflate_state *s; +{ + int max_blindex; /* index of last bit length code of non zero freq */ + + /* Determine the bit length frequencies for literal and distance trees */ + scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code); + scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code); + + /* Build the bit length tree: */ + build_tree(s, (tree_desc *)(&(s->bl_desc))); + /* opt_len now includes the length of the tree representations, except + * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. + */ + + /* Determine the number of bit length codes to send. The pkzip format + * requires that at least 4 bit length codes be sent. (appnote.txt says + * 3 but the actual value used is 4.) + */ + for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { + if (s->bl_tree[bl_order[max_blindex]].Len != 0) break; + } + /* Update opt_len to include the bit length tree and counts */ + s->opt_len += 3*(max_blindex+1) + 5+5+4; + Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", + s->opt_len, s->static_len)); + + return max_blindex; +} + +/* =========================================================================== + * Send the header for a block using dynamic Huffman trees: the counts, the + * lengths of the bit length codes, the literal tree and the distance tree. + * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. + */ +local void send_all_trees(s, lcodes, dcodes, blcodes) + deflate_state *s; + int lcodes, dcodes, blcodes; /* number of codes for each tree */ +{ + int rank; /* index in bl_order */ + + Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); + Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, + "too many codes"); + Tracev((stderr, "\nbl counts: ")); + send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */ + send_bits(s, dcodes-1, 5); + send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */ + for (rank = 0; rank < blcodes; rank++) { + Tracev((stderr, "\nbl code %2d ", bl_order[rank])); + send_bits(s, s->bl_tree[bl_order[rank]].Len, 3); + } + Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); + + send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */ + Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); + + send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */ + Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); +} + +/* =========================================================================== + * Send a stored block + */ +void _tr_stored_block(s, buf, stored_len, eof) + deflate_state *s; + charf *buf; /* input block */ + ulg stored_len; /* length of input block */ + int eof; /* true if this is the last block for a file */ +{ + send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */ +#ifdef DEBUG + s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; + s->compressed_len += (stored_len + 4) << 3; +#endif + copy_block(s, buf, (unsigned)stored_len, 1); /* with header */ +} + +/* =========================================================================== + * Send one empty static block to give enough lookahead for inflate. + * This takes 10 bits, of which 7 may remain in the bit buffer. + * The current inflate code requires 9 bits of lookahead. If the + * last two codes for the previous block (real code plus EOB) were coded + * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode + * the last real code. In this case we send two empty static blocks instead + * of one. (There are no problems if the previous block is stored or fixed.) + * To simplify the code, we assume the worst case of last real code encoded + * on one bit only. + */ +void _tr_align(s) + deflate_state *s; +{ + send_bits(s, STATIC_TREES<<1, 3); + send_code(s, END_BLOCK, static_ltree); +#ifdef DEBUG + s->compressed_len += 10L; /* 3 for block type, 7 for EOB */ +#endif + bi_flush(s); + /* Of the 10 bits for the empty block, we have already sent + * (10 - bi_valid) bits. The lookahead for the last real code (before + * the EOB of the previous block) was thus at least one plus the length + * of the EOB plus what we have just sent of the empty static block. + */ + if (1 + s->last_eob_len + 10 - s->bi_valid < 9) { + send_bits(s, STATIC_TREES<<1, 3); + send_code(s, END_BLOCK, static_ltree); +#ifdef DEBUG + s->compressed_len += 10L; +#endif + bi_flush(s); + } + s->last_eob_len = 7; +} + +/* =========================================================================== + * Determine the best encoding for the current block: dynamic trees, static + * trees or store, and output the encoded block to the zip file. + */ +void _tr_flush_block(s, buf, stored_len, eof) + deflate_state *s; + charf *buf; /* input block, or NULL if too old */ + ulg stored_len; /* length of input block */ + int eof; /* true if this is the last block for a file */ +{ + ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ + int max_blindex = 0; /* index of last bit length code of non zero freq */ + + /* Build the Huffman trees unless a stored block is forced */ + if (s->level > 0) { + + /* Check if the file is ascii or binary */ + if (s->data_type == Z_UNKNOWN) set_data_type(s); + + /* Construct the literal and distance trees */ + build_tree(s, (tree_desc *)(&(s->l_desc))); + Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, + s->static_len)); + + build_tree(s, (tree_desc *)(&(s->d_desc))); + Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, + s->static_len)); + /* At this point, opt_len and static_len are the total bit lengths of + * the compressed block data, excluding the tree representations. + */ + + /* Build the bit length tree for the above two trees, and get the index + * in bl_order of the last bit length code to send. + */ + max_blindex = build_bl_tree(s); + + /* Determine the best encoding. Compute first the block length in bytes*/ + opt_lenb = (s->opt_len+3+7)>>3; + static_lenb = (s->static_len+3+7)>>3; + + Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", + opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, + s->last_lit)); + + if (static_lenb <= opt_lenb) opt_lenb = static_lenb; + + } else { + Assert(buf != (char*)0, "lost buf"); + opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ + } + +#ifdef FORCE_STORED + if (buf != (char*)0) { /* force stored block */ +#else + if (stored_len+4 <= opt_lenb && buf != (char*)0) { + /* 4: two words for the lengths */ +#endif + /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. + * Otherwise we can't have processed more than WSIZE input bytes since + * the last block flush, because compression would have been + * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to + * transform a block into a stored block. + */ + _tr_stored_block(s, buf, stored_len, eof); + +#ifdef FORCE_STATIC + } else if (static_lenb >= 0) { /* force static trees */ +#else + } else if (static_lenb == opt_lenb) { +#endif + send_bits(s, (STATIC_TREES<<1)+eof, 3); + compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree); +#ifdef DEBUG + s->compressed_len += 3 + s->static_len; +#endif + } else { + send_bits(s, (DYN_TREES<<1)+eof, 3); + send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1, + max_blindex+1); + compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree); +#ifdef DEBUG + s->compressed_len += 3 + s->opt_len; +#endif + } + Assert (s->compressed_len == s->bits_sent, "bad compressed size"); + /* The above check is made mod 2^32, for files larger than 512 MB + * and uLong implemented on 32 bits. + */ + init_block(s); + + if (eof) { + bi_windup(s); +#ifdef DEBUG + s->compressed_len += 7; /* align on byte boundary */ +#endif + } + Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, + s->compressed_len-7*eof)); +} + +/* =========================================================================== + * Save the match info and tally the frequency counts. Return true if + * the current block must be flushed. + */ +int _tr_tally (s, dist, lc) + deflate_state *s; + unsigned dist; /* distance of matched string */ + unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ +{ + s->d_buf[s->last_lit] = (ush)dist; + s->l_buf[s->last_lit++] = (uch)lc; + if (dist == 0) { + /* lc is the unmatched char */ + s->dyn_ltree[lc].Freq++; + } else { + s->matches++; + /* Here, lc is the match length - MIN_MATCH */ + dist--; /* dist = match distance - 1 */ + Assert((ush)dist < (ush)MAX_DIST(s) && + (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && + (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); + + s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++; + s->dyn_dtree[d_code(dist)].Freq++; + } + +#ifdef TRUNCATE_BLOCK + /* Try to guess if it is profitable to stop the current block here */ + if ((s->last_lit & 0x1fff) == 0 && s->level > 2) { + /* Compute an upper bound for the compressed length */ + ulg out_length = (ulg)s->last_lit*8L; + ulg in_length = (ulg)((long)s->strstart - s->block_start); + int dcode; + for (dcode = 0; dcode < D_CODES; dcode++) { + out_length += (ulg)s->dyn_dtree[dcode].Freq * + (5L+extra_dbits[dcode]); + } + out_length >>= 3; + Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", + s->last_lit, in_length, out_length, + 100L - out_length*100L/in_length)); + if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1; + } +#endif + return (s->last_lit == s->lit_bufsize-1); + /* We avoid equality with lit_bufsize because of wraparound at 64K + * on 16 bit machines and because stored blocks are restricted to + * 64K-1 bytes. + */ +} + +/* =========================================================================== + * Send the block data compressed using the given Huffman trees + */ +local void compress_block(s, ltree, dtree) + deflate_state *s; + ct_data *ltree; /* literal tree */ + ct_data *dtree; /* distance tree */ +{ + unsigned dist; /* distance of matched string */ + int lc; /* match length or unmatched char (if dist == 0) */ + unsigned lx = 0; /* running index in l_buf */ + unsigned code; /* the code to send */ + int extra; /* number of extra bits to send */ + + if (s->last_lit != 0) do { + dist = s->d_buf[lx]; + lc = s->l_buf[lx++]; + if (dist == 0) { + send_code(s, lc, ltree); /* send a literal byte */ + Tracecv(isgraph(lc), (stderr," '%c' ", lc)); + } else { + /* Here, lc is the match length - MIN_MATCH */ + code = _length_code[lc]; + send_code(s, code+LITERALS+1, ltree); /* send the length code */ + extra = extra_lbits[code]; + if (extra != 0) { + lc -= base_length[code]; + send_bits(s, lc, extra); /* send the extra length bits */ + } + dist--; /* dist is now the match distance - 1 */ + code = d_code(dist); + Assert (code < D_CODES, "bad d_code"); + + send_code(s, code, dtree); /* send the distance code */ + extra = extra_dbits[code]; + if (extra != 0) { + dist -= base_dist[code]; + send_bits(s, dist, extra); /* send the extra distance bits */ + } + } /* literal or match pair ? */ + + /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ + Assert(s->pending < s->lit_bufsize + 2*lx, "pendingBuf overflow"); + + } while (lx < s->last_lit); + + send_code(s, END_BLOCK, ltree); + s->last_eob_len = ltree[END_BLOCK].Len; +} + +/* =========================================================================== + * Set the data type to ASCII or BINARY, using a crude approximation: + * binary if more than 20% of the bytes are <= 6 or >= 128, ascii otherwise. + * IN assertion: the fields freq of dyn_ltree are set and the total of all + * frequencies does not exceed 64K (to fit in an int on 16 bit machines). + */ +local void set_data_type(s) + deflate_state *s; +{ + int n = 0; + unsigned ascii_freq = 0; + unsigned bin_freq = 0; + while (n < 7) bin_freq += s->dyn_ltree[n++].Freq; + while (n < 128) ascii_freq += s->dyn_ltree[n++].Freq; + while (n < LITERALS) bin_freq += s->dyn_ltree[n++].Freq; + s->data_type = (Byte)(bin_freq > (ascii_freq >> 2) ? Z_BINARY : Z_ASCII); +} + +/* =========================================================================== + * Reverse the first len bits of a code, using straightforward code (a faster + * method would use a table) + * IN assertion: 1 <= len <= 15 + */ +local unsigned bi_reverse(code, len) + unsigned code; /* the value to invert */ + int len; /* its bit length */ +{ + register unsigned res = 0; + do { + res |= code & 1; + code >>= 1, res <<= 1; + } while (--len > 0); + return res >> 1; +} + +/* =========================================================================== + * Flush the bit buffer, keeping at most 7 bits in it. + */ +local void bi_flush(s) + deflate_state *s; +{ + if (s->bi_valid == 16) { + put_short(s, s->bi_buf); + s->bi_buf = 0; + s->bi_valid = 0; + } else if (s->bi_valid >= 8) { + put_byte(s, (Byte)s->bi_buf); + s->bi_buf >>= 8; + s->bi_valid -= 8; + } +} + +/* =========================================================================== + * Flush the bit buffer and align the output on a byte boundary + */ +local void bi_windup(s) + deflate_state *s; +{ + if (s->bi_valid > 8) { + put_short(s, s->bi_buf); + } else if (s->bi_valid > 0) { + put_byte(s, (Byte)s->bi_buf); + } + s->bi_buf = 0; + s->bi_valid = 0; +#ifdef DEBUG + s->bits_sent = (s->bits_sent+7) & ~7; +#endif +} + +/* =========================================================================== + * Copy a stored block, storing first the length and its + * one's complement if requested. + */ +local void copy_block(s, buf, len, header) + deflate_state *s; + charf *buf; /* the input data */ + unsigned len; /* its length */ + int header; /* true if block header must be written */ +{ + bi_windup(s); /* align on byte boundary */ + s->last_eob_len = 8; /* enough lookahead for inflate */ + + if (header) { + put_short(s, (ush)len); + put_short(s, (ush)~len); +#ifdef DEBUG + s->bits_sent += 2*16; +#endif + } +#ifdef DEBUG + s->bits_sent += (ulg)len<<3; +#endif + while (len--) { + put_byte(s, *buf++); + } +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/trees.h pcsxr-unstable-1.9.94+svn98108/win32/zlib/trees.h --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/trees.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/trees.h 2016-06-30 16:53:28.000000000 +0000 @@ -0,0 +1,128 @@ +/* header created automatically with -DGEN_TREES_H */ + +local const ct_data static_ltree[L_CODES+2] = { +{{ 12},{ 8}}, {{140},{ 8}}, {{ 76},{ 8}}, {{204},{ 8}}, {{ 44},{ 8}}, +{{172},{ 8}}, {{108},{ 8}}, {{236},{ 8}}, {{ 28},{ 8}}, {{156},{ 8}}, +{{ 92},{ 8}}, {{220},{ 8}}, {{ 60},{ 8}}, {{188},{ 8}}, {{124},{ 8}}, +{{252},{ 8}}, {{ 2},{ 8}}, {{130},{ 8}}, {{ 66},{ 8}}, {{194},{ 8}}, +{{ 34},{ 8}}, {{162},{ 8}}, {{ 98},{ 8}}, {{226},{ 8}}, {{ 18},{ 8}}, +{{146},{ 8}}, {{ 82},{ 8}}, {{210},{ 8}}, {{ 50},{ 8}}, {{178},{ 8}}, +{{114},{ 8}}, {{242},{ 8}}, {{ 10},{ 8}}, {{138},{ 8}}, {{ 74},{ 8}}, +{{202},{ 8}}, {{ 42},{ 8}}, {{170},{ 8}}, {{106},{ 8}}, {{234},{ 8}}, +{{ 26},{ 8}}, {{154},{ 8}}, {{ 90},{ 8}}, {{218},{ 8}}, {{ 58},{ 8}}, +{{186},{ 8}}, {{122},{ 8}}, {{250},{ 8}}, {{ 6},{ 8}}, {{134},{ 8}}, +{{ 70},{ 8}}, {{198},{ 8}}, {{ 38},{ 8}}, {{166},{ 8}}, {{102},{ 8}}, +{{230},{ 8}}, {{ 22},{ 8}}, {{150},{ 8}}, {{ 86},{ 8}}, {{214},{ 8}}, +{{ 54},{ 8}}, {{182},{ 8}}, {{118},{ 8}}, {{246},{ 8}}, {{ 14},{ 8}}, +{{142},{ 8}}, {{ 78},{ 8}}, {{206},{ 8}}, {{ 46},{ 8}}, {{174},{ 8}}, +{{110},{ 8}}, {{238},{ 8}}, {{ 30},{ 8}}, {{158},{ 8}}, {{ 94},{ 8}}, +{{222},{ 8}}, {{ 62},{ 8}}, {{190},{ 8}}, {{126},{ 8}}, {{254},{ 8}}, +{{ 1},{ 8}}, {{129},{ 8}}, {{ 65},{ 8}}, {{193},{ 8}}, {{ 33},{ 8}}, +{{161},{ 8}}, {{ 97},{ 8}}, {{225},{ 8}}, {{ 17},{ 8}}, {{145},{ 8}}, +{{ 81},{ 8}}, {{209},{ 8}}, {{ 49},{ 8}}, {{177},{ 8}}, {{113},{ 8}}, +{{241},{ 8}}, {{ 9},{ 8}}, {{137},{ 8}}, {{ 73},{ 8}}, {{201},{ 8}}, +{{ 41},{ 8}}, {{169},{ 8}}, {{105},{ 8}}, {{233},{ 8}}, {{ 25},{ 8}}, +{{153},{ 8}}, {{ 89},{ 8}}, {{217},{ 8}}, {{ 57},{ 8}}, {{185},{ 8}}, +{{121},{ 8}}, {{249},{ 8}}, {{ 5},{ 8}}, {{133},{ 8}}, {{ 69},{ 8}}, +{{197},{ 8}}, {{ 37},{ 8}}, {{165},{ 8}}, {{101},{ 8}}, {{229},{ 8}}, +{{ 21},{ 8}}, {{149},{ 8}}, {{ 85},{ 8}}, {{213},{ 8}}, {{ 53},{ 8}}, +{{181},{ 8}}, {{117},{ 8}}, {{245},{ 8}}, {{ 13},{ 8}}, {{141},{ 8}}, +{{ 77},{ 8}}, {{205},{ 8}}, {{ 45},{ 8}}, {{173},{ 8}}, {{109},{ 8}}, +{{237},{ 8}}, {{ 29},{ 8}}, {{157},{ 8}}, {{ 93},{ 8}}, {{221},{ 8}}, +{{ 61},{ 8}}, {{189},{ 8}}, {{125},{ 8}}, {{253},{ 8}}, {{ 19},{ 9}}, +{{275},{ 9}}, {{147},{ 9}}, {{403},{ 9}}, {{ 83},{ 9}}, {{339},{ 9}}, +{{211},{ 9}}, {{467},{ 9}}, {{ 51},{ 9}}, {{307},{ 9}}, {{179},{ 9}}, +{{435},{ 9}}, {{115},{ 9}}, {{371},{ 9}}, {{243},{ 9}}, {{499},{ 9}}, +{{ 11},{ 9}}, {{267},{ 9}}, {{139},{ 9}}, {{395},{ 9}}, {{ 75},{ 9}}, +{{331},{ 9}}, {{203},{ 9}}, {{459},{ 9}}, {{ 43},{ 9}}, {{299},{ 9}}, +{{171},{ 9}}, {{427},{ 9}}, {{107},{ 9}}, {{363},{ 9}}, {{235},{ 9}}, +{{491},{ 9}}, {{ 27},{ 9}}, {{283},{ 9}}, {{155},{ 9}}, {{411},{ 9}}, +{{ 91},{ 9}}, {{347},{ 9}}, {{219},{ 9}}, {{475},{ 9}}, {{ 59},{ 9}}, +{{315},{ 9}}, {{187},{ 9}}, {{443},{ 9}}, {{123},{ 9}}, {{379},{ 9}}, +{{251},{ 9}}, {{507},{ 9}}, {{ 7},{ 9}}, {{263},{ 9}}, {{135},{ 9}}, +{{391},{ 9}}, {{ 71},{ 9}}, {{327},{ 9}}, {{199},{ 9}}, {{455},{ 9}}, +{{ 39},{ 9}}, {{295},{ 9}}, {{167},{ 9}}, {{423},{ 9}}, {{103},{ 9}}, +{{359},{ 9}}, {{231},{ 9}}, {{487},{ 9}}, {{ 23},{ 9}}, {{279},{ 9}}, +{{151},{ 9}}, {{407},{ 9}}, {{ 87},{ 9}}, {{343},{ 9}}, {{215},{ 9}}, +{{471},{ 9}}, {{ 55},{ 9}}, {{311},{ 9}}, {{183},{ 9}}, {{439},{ 9}}, +{{119},{ 9}}, {{375},{ 9}}, {{247},{ 9}}, {{503},{ 9}}, {{ 15},{ 9}}, +{{271},{ 9}}, {{143},{ 9}}, {{399},{ 9}}, {{ 79},{ 9}}, {{335},{ 9}}, +{{207},{ 9}}, {{463},{ 9}}, {{ 47},{ 9}}, {{303},{ 9}}, {{175},{ 9}}, +{{431},{ 9}}, {{111},{ 9}}, {{367},{ 9}}, {{239},{ 9}}, {{495},{ 9}}, +{{ 31},{ 9}}, {{287},{ 9}}, {{159},{ 9}}, {{415},{ 9}}, {{ 95},{ 9}}, +{{351},{ 9}}, {{223},{ 9}}, {{479},{ 9}}, {{ 63},{ 9}}, {{319},{ 9}}, +{{191},{ 9}}, {{447},{ 9}}, {{127},{ 9}}, {{383},{ 9}}, {{255},{ 9}}, +{{511},{ 9}}, {{ 0},{ 7}}, {{ 64},{ 7}}, {{ 32},{ 7}}, {{ 96},{ 7}}, +{{ 16},{ 7}}, {{ 80},{ 7}}, {{ 48},{ 7}}, {{112},{ 7}}, {{ 8},{ 7}}, +{{ 72},{ 7}}, {{ 40},{ 7}}, {{104},{ 7}}, {{ 24},{ 7}}, {{ 88},{ 7}}, +{{ 56},{ 7}}, {{120},{ 7}}, {{ 4},{ 7}}, {{ 68},{ 7}}, {{ 36},{ 7}}, +{{100},{ 7}}, {{ 20},{ 7}}, {{ 84},{ 7}}, {{ 52},{ 7}}, {{116},{ 7}}, +{{ 3},{ 8}}, {{131},{ 8}}, {{ 67},{ 8}}, {{195},{ 8}}, {{ 35},{ 8}}, +{{163},{ 8}}, {{ 99},{ 8}}, {{227},{ 8}} +}; + +local const ct_data static_dtree[D_CODES] = { +{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}}, +{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}}, +{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}}, +{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}}, +{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}}, +{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}} +}; + +const uch _dist_code[DIST_CODE_LEN] = { + 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, + 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, +10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, +11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, +12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, +13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, +13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, +14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, +14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, +14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, +15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, +15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, +15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, 17, +18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, +23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, +24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, +26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, +26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, +27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, +27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29 +}; + +const uch _length_code[MAX_MATCH-MIN_MATCH+1]= { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, +13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, +17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, +19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, +21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, +22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, +23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, +24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, +25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, +25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, +26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, +26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, +27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28 +}; + +local const int base_length[LENGTH_CODES] = { +0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, +64, 80, 96, 112, 128, 160, 192, 224, 0 +}; + +local const int base_dist[D_CODES] = { + 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, + 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, + 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576 +}; + diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/uncompr.c pcsxr-unstable-1.9.94+svn98108/win32/zlib/uncompr.c --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/uncompr.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/uncompr.c 2016-06-30 16:53:28.000000000 +0000 @@ -0,0 +1,58 @@ +/* uncompr.c -- decompress a memory buffer + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#include "zlib.h" + +/* =========================================================================== + Decompresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be large enough to hold the + entire uncompressed data. (The size of the uncompressed data must have + been saved previously by the compressor and transmitted to the decompressor + by some mechanism outside the scope of this compression library.) + Upon exit, destLen is the actual size of the compressed buffer. + This function can be used to decompress a whole file at once if the + input file is mmap'ed. + + uncompress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer, or Z_DATA_ERROR if the input data was corrupted. +*/ +int ZEXPORT uncompress (dest, destLen, source, sourceLen) + Bytef *dest; + uLongf *destLen; + const Bytef *source; + uLong sourceLen; +{ + z_stream stream; + int err; + + stream.next_in = (Bytef*)source; + stream.avail_in = (uInt)sourceLen; + /* Check for source > 64K on 16-bit machine: */ + if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; + + stream.next_out = dest; + stream.avail_out = (uInt)*destLen; + if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; + + stream.zalloc = (alloc_func)0; + stream.zfree = (free_func)0; + + err = inflateInit(&stream); + if (err != Z_OK) return err; + + err = inflate(&stream, Z_FINISH); + if (err != Z_STREAM_END) { + inflateEnd(&stream); + return err == Z_OK ? Z_BUF_ERROR : err; + } + *destLen = stream.total_out; + + err = inflateEnd(&stream); + return err; +} diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/zconf.h pcsxr-unstable-1.9.94+svn98108/win32/zlib/zconf.h --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/zconf.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/zconf.h 2016-06-30 16:53:28.000000000 +0000 @@ -0,0 +1,279 @@ +/* zconf.h -- configuration of the zlib compression library + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#ifndef _ZCONF_H +#define _ZCONF_H + +/* + * If you *really* need a unique prefix for all types and library functions, + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + */ +#ifdef Z_PREFIX +# define deflateInit_ z_deflateInit_ +# define deflate z_deflate +# define deflateEnd z_deflateEnd +# define inflateInit_ z_inflateInit_ +# define inflate z_inflate +# define inflateEnd z_inflateEnd +# define deflateInit2_ z_deflateInit2_ +# define deflateSetDictionary z_deflateSetDictionary +# define deflateCopy z_deflateCopy +# define deflateReset z_deflateReset +# define deflateParams z_deflateParams +# define inflateInit2_ z_inflateInit2_ +# define inflateSetDictionary z_inflateSetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateReset z_inflateReset +# define compress z_compress +# define compress2 z_compress2 +# define uncompress z_uncompress +# define adler32 z_adler32 +# define crc32 z_crc32 +# define get_crc_table z_get_crc_table + +# define Byte z_Byte +# define uInt z_uInt +# define uLong z_uLong +# define Bytef z_Bytef +# define charf z_charf +# define intf z_intf +# define uIntf z_uIntf +# define uLongf z_uLongf +# define voidpf z_voidpf +# define voidp z_voidp +#endif + +#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) +# define WIN32 +#endif +#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386) +# ifndef __32BIT__ +# define __32BIT__ +# endif +#endif +#if defined(__MSDOS__) && !defined(MSDOS) +# define MSDOS +#endif + +/* + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more + * than 64k bytes at a time (needed on systems with 16-bit int). + */ +#if defined(MSDOS) && !defined(__32BIT__) +# define MAXSEG_64K +#endif +#ifdef MSDOS +# define UNALIGNED_OK +#endif + +#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC) +# define STDC +#endif +#if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__) +# ifndef STDC +# define STDC +# endif +#endif + +#ifndef STDC +# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ +# define const +# endif +#endif + +/* Some Mac compilers merge all .h files incorrectly: */ +#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__) +# define NO_DUMMY_DECL +#endif + +/* Old Borland C incorrectly complains about missing returns: */ +#if defined(__BORLANDC__) && (__BORLANDC__ < 0x500) +# define NEED_DUMMY_RETURN +#endif + + +/* Maximum value for memLevel in deflateInit2 */ +#ifndef MAX_MEM_LEVEL +# ifdef MAXSEG_64K +# define MAX_MEM_LEVEL 8 +# else +# define MAX_MEM_LEVEL 9 +# endif +#endif + +/* Maximum value for windowBits in deflateInit2 and inflateInit2. + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files + * created by gzip. (Files created by minigzip can still be extracted by + * gzip.) + */ +#ifndef MAX_WBITS +# define MAX_WBITS 15 /* 32K LZ77 window */ +#endif + +/* The memory requirements for deflate are (in bytes): + (1 << (windowBits+2)) + (1 << (memLevel+9)) + that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) + plus a few kilobytes for small objects. For example, if you want to reduce + the default memory requirements from 256K to 128K, compile with + make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" + Of course this will generally degrade compression (there's no free lunch). + + The memory requirements for inflate are (in bytes) 1 << windowBits + that is, 32K for windowBits=15 (default value) plus a few kilobytes + for small objects. +*/ + + /* Type declarations */ + +#ifndef OF /* function prototypes */ +# ifdef STDC +# define OF(args) args +# else +# define OF(args) () +# endif +#endif + +/* The following definitions for FAR are needed only for MSDOS mixed + * model programming (small or medium model with some far allocations). + * This was tested only with MSC; for other MSDOS compilers you may have + * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, + * just define FAR to be empty. + */ +#if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__) + /* MSC small or medium model */ +# define SMALL_MEDIUM +# ifdef _MSC_VER +# define FAR _far +# else +# define FAR far +# endif +#endif +#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__)) +# ifndef __32BIT__ +# define SMALL_MEDIUM +# define FAR _far +# endif +#endif + +/* Compile with -DZLIB_DLL for Windows DLL support */ +#if defined(ZLIB_DLL) +# if defined(_WINDOWS) || defined(WINDOWS) +# ifdef FAR +# undef FAR +# endif +# include +# define ZEXPORT WINAPI +# ifdef WIN32 +# define ZEXPORTVA WINAPIV +# else +# define ZEXPORTVA FAR _cdecl _export +# endif +# endif +# if defined (__BORLANDC__) +# if (__BORLANDC__ >= 0x0500) && defined (WIN32) +# include +# define ZEXPORT __declspec(dllexport) WINAPI +# define ZEXPORTRVA __declspec(dllexport) WINAPIV +# else +# if defined (_Windows) && defined (__DLL__) +# define ZEXPORT _export +# define ZEXPORTVA _export +# endif +# endif +# endif +#endif + +#if defined (__BEOS__) +# if defined (ZLIB_DLL) +# define ZEXTERN extern __declspec(dllexport) +# else +# define ZEXTERN extern __declspec(dllimport) +# endif +#endif + +#ifndef ZEXPORT +# define ZEXPORT +#endif +#ifndef ZEXPORTVA +# define ZEXPORTVA +#endif +#ifndef ZEXTERN +# define ZEXTERN extern +#endif + +#ifndef FAR +# define FAR +#endif + +#if !defined(MACOS) && !defined(TARGET_OS_MAC) +typedef unsigned char Byte; /* 8 bits */ +#endif +typedef unsigned int uInt; /* 16 bits or more */ +typedef unsigned long uLong; /* 32 bits or more */ + +#ifdef SMALL_MEDIUM + /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ +# define Bytef Byte FAR +#else + typedef Byte FAR Bytef; +#endif +typedef char FAR charf; +typedef int FAR intf; +typedef uInt FAR uIntf; +typedef uLong FAR uLongf; + +#ifdef STDC + typedef void FAR *voidpf; + typedef void *voidp; +#else + typedef Byte FAR *voidpf; + typedef Byte *voidp; +#endif + +#ifdef HAVE_UNISTD_H +# include /* for off_t */ +# include /* for SEEK_* and off_t */ +# define z_off_t off_t +#endif +#ifndef SEEK_SET +# define SEEK_SET 0 /* Seek from beginning of file. */ +# define SEEK_CUR 1 /* Seek from current position. */ +# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ +#endif +#ifndef z_off_t +# define z_off_t long +#endif + +/* MVS linker does not support external names larger than 8 bytes */ +#if defined(__MVS__) +# pragma map(deflateInit_,"DEIN") +# pragma map(deflateInit2_,"DEIN2") +# pragma map(deflateEnd,"DEEND") +# pragma map(inflateInit_,"ININ") +# pragma map(inflateInit2_,"ININ2") +# pragma map(inflateEnd,"INEND") +# pragma map(inflateSync,"INSY") +# pragma map(inflateSetDictionary,"INSEDI") +# pragma map(inflate_blocks,"INBL") +# pragma map(inflate_blocks_new,"INBLNE") +# pragma map(inflate_blocks_free,"INBLFR") +# pragma map(inflate_blocks_reset,"INBLRE") +# pragma map(inflate_codes_free,"INCOFR") +# pragma map(inflate_codes,"INCO") +# pragma map(inflate_fast,"INFA") +# pragma map(inflate_flush,"INFLU") +# pragma map(inflate_mask,"INMA") +# pragma map(inflate_set_dictionary,"INSEDI2") +# pragma map(inflate_copyright,"INCOPY") +# pragma map(inflate_trees_bits,"INTRBI") +# pragma map(inflate_trees_dynamic,"INTRDY") +# pragma map(inflate_trees_fixed,"INTRFI") +# pragma map(inflate_trees_free,"INTRFR") +#endif + +#endif /* _ZCONF_H */ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/zlib.h pcsxr-unstable-1.9.94+svn98108/win32/zlib/zlib.h --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/zlib.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/zlib.h 2016-06-30 16:53:28.000000000 +0000 @@ -0,0 +1,893 @@ +/* zlib.h -- interface of the 'zlib' general purpose compression library + version 1.1.4, March 11th, 2002 + + Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + + + The data format used by the zlib library is described by RFCs (Request for + Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt + (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). +*/ + +#ifndef _ZLIB_H +#define _ZLIB_H + +#include "zconf.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define ZLIB_VERSION "1.1.4" + +/* + The 'zlib' compression library provides in-memory compression and + decompression functions, including integrity checks of the uncompressed + data. This version of the library supports only one compression method + (deflation) but other algorithms will be added later and will have the same + stream interface. + + Compression can be done in a single step if the buffers are large + enough (for example if an input file is mmap'ed), or can be done by + repeated calls of the compression function. In the latter case, the + application must provide more input and/or consume the output + (providing more output space) before each call. + + The library also supports reading and writing files in gzip (.gz) format + with an interface similar to that of stdio. + + The library does not install any signal handler. The decoder checks + the consistency of the compressed data, so the library should never + crash even in case of corrupted input. +*/ + +typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); +typedef void (*free_func) OF((voidpf opaque, voidpf address)); + +struct internal_state; + +typedef struct z_stream_s { + Bytef *next_in; /* next input byte */ + uInt avail_in; /* number of bytes available at next_in */ + uLong total_in; /* total nb of input bytes read so far */ + + Bytef *next_out; /* next output byte should be put there */ + uInt avail_out; /* remaining free space at next_out */ + uLong total_out; /* total nb of bytes output so far */ + + char *msg; /* last error message, NULL if no error */ + struct internal_state FAR *state; /* not visible by applications */ + + alloc_func zalloc; /* used to allocate the internal state */ + free_func zfree; /* used to free the internal state */ + voidpf opaque; /* private data object passed to zalloc and zfree */ + + int data_type; /* best guess about the data type: ascii or binary */ + uLong adler; /* adler32 value of the uncompressed data */ + uLong reserved; /* reserved for future use */ +} z_stream; + +typedef z_stream FAR *z_streamp; + +/* + The application must update next_in and avail_in when avail_in has + dropped to zero. It must update next_out and avail_out when avail_out + has dropped to zero. The application must initialize zalloc, zfree and + opaque before calling the init function. All other fields are set by the + compression library and must not be updated by the application. + + The opaque value provided by the application will be passed as the first + parameter for calls of zalloc and zfree. This can be useful for custom + memory management. The compression library attaches no meaning to the + opaque value. + + zalloc must return Z_NULL if there is not enough memory for the object. + If zlib is used in a multi-threaded application, zalloc and zfree must be + thread safe. + + On 16-bit systems, the functions zalloc and zfree must be able to allocate + exactly 65536 bytes, but will not be required to allocate more than this + if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, + pointers returned by zalloc for objects of exactly 65536 bytes *must* + have their offset normalized to zero. The default allocation function + provided by this library ensures this (see zutil.c). To reduce memory + requirements and avoid any allocation of 64K objects, at the expense of + compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h). + + The fields total_in and total_out can be used for statistics or + progress reports. After compression, total_in holds the total size of + the uncompressed data and may be saved for use in the decompressor + (particularly if the decompressor wants to decompress everything in + a single step). +*/ + + /* constants */ + +#define Z_NO_FLUSH 0 +#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */ +#define Z_SYNC_FLUSH 2 +#define Z_FULL_FLUSH 3 +#define Z_FINISH 4 +/* Allowed flush values; see deflate() below for details */ + +#define Z_OK 0 +#define Z_STREAM_END 1 +#define Z_NEED_DICT 2 +#define Z_ERRNO (-1) +#define Z_STREAM_ERROR (-2) +#define Z_DATA_ERROR (-3) +#define Z_MEM_ERROR (-4) +#define Z_BUF_ERROR (-5) +#define Z_VERSION_ERROR (-6) +/* Return codes for the compression/decompression functions. Negative + * values are errors, positive values are used for special but normal events. + */ + +#define Z_NO_COMPRESSION 0 +#define Z_BEST_SPEED 1 +#define Z_BEST_COMPRESSION 9 +#define Z_DEFAULT_COMPRESSION (-1) +/* compression levels */ + +#define Z_FILTERED 1 +#define Z_HUFFMAN_ONLY 2 +#define Z_DEFAULT_STRATEGY 0 +/* compression strategy; see deflateInit2() below for details */ + +#define Z_BINARY 0 +#define Z_ASCII 1 +#define Z_UNKNOWN 2 +/* Possible values of the data_type field */ + +#define Z_DEFLATED 8 +/* The deflate compression method (the only one supported in this version) */ + +#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ + +#define zlib_version zlibVersion() +/* for compatibility with versions < 1.0.2 */ + + /* basic functions */ + +ZEXTERN const char * ZEXPORT zlibVersion OF((void)); +/* The application can compare zlibVersion and ZLIB_VERSION for consistency. + If the first character differs, the library code actually used is + not compatible with the zlib.h header file used by the application. + This check is automatically made by deflateInit and inflateInit. + */ + +/* +ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); + + Initializes the internal stream state for compression. The fields + zalloc, zfree and opaque must be initialized before by the caller. + If zalloc and zfree are set to Z_NULL, deflateInit updates them to + use default allocation functions. + + The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: + 1 gives best speed, 9 gives best compression, 0 gives no compression at + all (the input data is simply copied a block at a time). + Z_DEFAULT_COMPRESSION requests a default compromise between speed and + compression (currently equivalent to level 6). + + deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if level is not a valid compression level, + Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible + with the version assumed by the caller (ZLIB_VERSION). + msg is set to null if there is no error message. deflateInit does not + perform any compression: this will be done by deflate(). +*/ + + +ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); +/* + deflate compresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may introduce some + output latency (reading input without producing any output) except when + forced to flush. + + The detailed semantics are as follows. deflate performs one or both of the + following actions: + + - Compress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in and avail_in are updated and + processing will resume at this point for the next call of deflate(). + + - Provide more output starting at next_out and update next_out and avail_out + accordingly. This action is forced if the parameter flush is non zero. + Forcing flush frequently degrades the compression ratio, so this parameter + should be set only when necessary (in interactive applications). + Some output may be provided even if flush is not set. + + Before the call of deflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming + more output, and updating avail_in or avail_out accordingly; avail_out + should never be zero before the call. The application can consume the + compressed output when it wants, for example when the output buffer is full + (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK + and with zero avail_out, it must be called again after making room in the + output buffer because there might be more output pending. + + If the parameter flush is set to Z_SYNC_FLUSH, all pending output is + flushed to the output buffer and the output is aligned on a byte boundary, so + that the decompressor can get all input data available so far. (In particular + avail_in is zero after the call if enough output space has been provided + before the call.) Flushing may degrade compression for some compression + algorithms and so it should be used only when necessary. + + If flush is set to Z_FULL_FLUSH, all output is flushed as with + Z_SYNC_FLUSH, and the compression state is reset so that decompression can + restart from this point if previous compressed data has been damaged or if + random access is desired. Using Z_FULL_FLUSH too often can seriously degrade + the compression. + + If deflate returns with avail_out == 0, this function must be called again + with the same value of the flush parameter and more output space (updated + avail_out), until the flush is complete (deflate returns with non-zero + avail_out). + + If the parameter flush is set to Z_FINISH, pending input is processed, + pending output is flushed and deflate returns with Z_STREAM_END if there + was enough output space; if deflate returns with Z_OK, this function must be + called again with Z_FINISH and more output space (updated avail_out) but no + more input data, until it returns with Z_STREAM_END or an error. After + deflate has returned Z_STREAM_END, the only possible operations on the + stream are deflateReset or deflateEnd. + + Z_FINISH can be used immediately after deflateInit if all the compression + is to be done in a single step. In this case, avail_out must be at least + 0.1% larger than avail_in plus 12 bytes. If deflate does not return + Z_STREAM_END, then it must be called again as described above. + + deflate() sets strm->adler to the adler32 checksum of all input read + so far (that is, total_in bytes). + + deflate() may update data_type if it can make a good guess about + the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered + binary. This field is only for information purposes and does not affect + the compression algorithm in any manner. + + deflate() returns Z_OK if some progress has been made (more input + processed or more output produced), Z_STREAM_END if all input has been + consumed and all output has been produced (only when flush is set to + Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example + if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible + (for example avail_in or avail_out was zero). +*/ + + +ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any + pending output. + + deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the + stream state was inconsistent, Z_DATA_ERROR if the stream was freed + prematurely (some input or output was discarded). In the error case, + msg may be set but then points to a static string (which must not be + deallocated). +*/ + + +/* +ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); + + Initializes the internal stream state for decompression. The fields + next_in, avail_in, zalloc, zfree and opaque must be initialized before by + the caller. If next_in is not Z_NULL and avail_in is large enough (the exact + value depends on the compression method), inflateInit determines the + compression method from the zlib header and allocates all data structures + accordingly; otherwise the allocation will be deferred to the first call of + inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to + use default allocation functions. + + inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller. msg is set to null if there is no error + message. inflateInit does not perform any decompression apart from reading + the zlib header if present: this will be done by inflate(). (So next_in and + avail_in may be modified, but next_out and avail_out are unchanged.) +*/ + + +ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); +/* + inflate decompresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may some + introduce some output latency (reading input without producing any output) + except when forced to flush. + + The detailed semantics are as follows. inflate performs one or both of the + following actions: + + - Decompress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in is updated and processing + will resume at this point for the next call of inflate(). + + - Provide more output starting at next_out and update next_out and avail_out + accordingly. inflate() provides as much output as possible, until there + is no more input data or no more space in the output buffer (see below + about the flush parameter). + + Before the call of inflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming + more output, and updating the next_* and avail_* values accordingly. + The application can consume the uncompressed output when it wants, for + example when the output buffer is full (avail_out == 0), or after each + call of inflate(). If inflate returns Z_OK and with zero avail_out, it + must be called again after making room in the output buffer because there + might be more output pending. + + If the parameter flush is set to Z_SYNC_FLUSH, inflate flushes as much + output as possible to the output buffer. The flushing behavior of inflate is + not specified for values of the flush parameter other than Z_SYNC_FLUSH + and Z_FINISH, but the current implementation actually flushes as much output + as possible anyway. + + inflate() should normally be called until it returns Z_STREAM_END or an + error. However if all decompression is to be performed in a single step + (a single call of inflate), the parameter flush should be set to + Z_FINISH. In this case all pending input is processed and all pending + output is flushed; avail_out must be large enough to hold all the + uncompressed data. (The size of the uncompressed data may have been saved + by the compressor for this purpose.) The next operation on this stream must + be inflateEnd to deallocate the decompression state. The use of Z_FINISH + is never required, but can be used to inform inflate that a faster routine + may be used for the single inflate() call. + + If a preset dictionary is needed at this point (see inflateSetDictionary + below), inflate sets strm-adler to the adler32 checksum of the + dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise + it sets strm->adler to the adler32 checksum of all output produced + so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or + an error code as described below. At the end of the stream, inflate() + checks that its computed adler32 checksum is equal to that saved by the + compressor and returns Z_STREAM_END only if the checksum is correct. + + inflate() returns Z_OK if some progress has been made (more input processed + or more output produced), Z_STREAM_END if the end of the compressed data has + been reached and all uncompressed output has been produced, Z_NEED_DICT if a + preset dictionary is needed at this point, Z_DATA_ERROR if the input data was + corrupted (input stream not conforming to the zlib format or incorrect + adler32 checksum), Z_STREAM_ERROR if the stream structure was inconsistent + (for example if next_in or next_out was NULL), Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if no progress is possible or if there was not + enough room in the output buffer when Z_FINISH is used. In the Z_DATA_ERROR + case, the application may then call inflateSync to look for a good + compression block. +*/ + + +ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any + pending output. + + inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state + was inconsistent. In the error case, msg may be set but then points to a + static string (which must not be deallocated). +*/ + + /* Advanced functions */ + +/* + The following functions are needed only in some special applications. +*/ + +/* +ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, + int level, + int method, + int windowBits, + int memLevel, + int strategy)); + + This is another version of deflateInit with more compression options. The + fields next_in, zalloc, zfree and opaque must be initialized before by + the caller. + + The method parameter is the compression method. It must be Z_DEFLATED in + this version of the library. + + The windowBits parameter is the base two logarithm of the window size + (the size of the history buffer). It should be in the range 8..15 for this + version of the library. Larger values of this parameter result in better + compression at the expense of memory usage. The default value is 15 if + deflateInit is used instead. + + The memLevel parameter specifies how much memory should be allocated + for the internal compression state. memLevel=1 uses minimum memory but + is slow and reduces compression ratio; memLevel=9 uses maximum memory + for optimal speed. The default value is 8. See zconf.h for total memory + usage as a function of windowBits and memLevel. + + The strategy parameter is used to tune the compression algorithm. Use the + value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a + filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no + string match). Filtered data consists mostly of small values with a + somewhat random distribution. In this case, the compression algorithm is + tuned to compress them better. The effect of Z_FILTERED is to force more + Huffman coding and less string matching; it is somewhat intermediate + between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects + the compression ratio but not the correctness of the compressed output even + if it is not set appropriately. + + deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid + method). msg is set to null if there is no error message. deflateInit2 does + not perform any compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); +/* + Initializes the compression dictionary from the given byte sequence + without producing any compressed output. This function must be called + immediately after deflateInit, deflateInit2 or deflateReset, before any + call of deflate. The compressor and decompressor must use exactly the same + dictionary (see inflateSetDictionary). + + The dictionary should consist of strings (byte sequences) that are likely + to be encountered later in the data to be compressed, with the most commonly + used strings preferably put towards the end of the dictionary. Using a + dictionary is most useful when the data to be compressed is short and can be + predicted with good accuracy; the data can then be compressed better than + with the default empty dictionary. + + Depending on the size of the compression data structures selected by + deflateInit or deflateInit2, a part of the dictionary may in effect be + discarded, for example if the dictionary is larger than the window size in + deflate or deflate2. Thus the strings most likely to be useful should be + put at the end of the dictionary, not at the front. + + Upon return of this function, strm->adler is set to the Adler32 value + of the dictionary; the decompressor may later use this value to determine + which dictionary has been used by the compressor. (The Adler32 value + applies to the whole dictionary even if only a subset of the dictionary is + actually used by the compressor.) + + deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a + parameter is invalid (such as NULL dictionary) or the stream state is + inconsistent (for example if deflate has already been called for this stream + or if the compression method is bsort). deflateSetDictionary does not + perform any compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, + z_streamp source)); +/* + Sets the destination stream as a complete copy of the source stream. + + This function can be useful when several compression strategies will be + tried, for example when there are several ways of pre-processing the input + data with a filter. The streams that will be discarded should then be freed + by calling deflateEnd. Note that deflateCopy duplicates the internal + compression state which can be quite large, so this strategy is slow and + can consume lots of memory. + + deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being NULL). msg is left unchanged in both source and + destination. +*/ + +ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); +/* + This function is equivalent to deflateEnd followed by deflateInit, + but does not free and reallocate all the internal compression state. + The stream will keep the same compression level and any other attributes + that may have been set by deflateInit2. + + deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being NULL). +*/ + +ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, + int level, + int strategy)); +/* + Dynamically update the compression level and compression strategy. The + interpretation of level and strategy is as in deflateInit2. This can be + used to switch between compression and straight copy of the input data, or + to switch to a different kind of input data requiring a different + strategy. If the compression level is changed, the input available so far + is compressed with the old level (and may be flushed); the new level will + take effect only at the next call of deflate(). + + Before the call of deflateParams, the stream state must be set as for + a call of deflate(), since the currently available input may have to + be compressed and flushed. In particular, strm->avail_out must be non-zero. + + deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source + stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR + if strm->avail_out was zero. +*/ + +/* +ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, + int windowBits)); + + This is another version of inflateInit with an extra parameter. The + fields next_in, avail_in, zalloc, zfree and opaque must be initialized + before by the caller. + + The windowBits parameter is the base two logarithm of the maximum window + size (the size of the history buffer). It should be in the range 8..15 for + this version of the library. The default value is 15 if inflateInit is used + instead. If a compressed stream with a larger window size is given as + input, inflate() will return with the error code Z_DATA_ERROR instead of + trying to allocate a larger window. + + inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative + memLevel). msg is set to null if there is no error message. inflateInit2 + does not perform any decompression apart from reading the zlib header if + present: this will be done by inflate(). (So next_in and avail_in may be + modified, but next_out and avail_out are unchanged.) +*/ + +ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); +/* + Initializes the decompression dictionary from the given uncompressed byte + sequence. This function must be called immediately after a call of inflate + if this call returned Z_NEED_DICT. The dictionary chosen by the compressor + can be determined from the Adler32 value returned by this call of + inflate. The compressor and decompressor must use exactly the same + dictionary (see deflateSetDictionary). + + inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a + parameter is invalid (such as NULL dictionary) or the stream state is + inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the + expected one (incorrect Adler32 value). inflateSetDictionary does not + perform any decompression: this will be done by subsequent calls of + inflate(). +*/ + +ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); +/* + Skips invalid compressed data until a full flush point (see above the + description of deflate with Z_FULL_FLUSH) can be found, or until all + available input is skipped. No output is provided. + + inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR + if no more input was provided, Z_DATA_ERROR if no flush point has been found, + or Z_STREAM_ERROR if the stream structure was inconsistent. In the success + case, the application may save the current current value of total_in which + indicates where valid compressed data was found. In the error case, the + application may repeatedly call inflateSync, providing more input each time, + until success or end of the input data. +*/ + +ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); +/* + This function is equivalent to inflateEnd followed by inflateInit, + but does not free and reallocate all the internal decompression state. + The stream will keep attributes that may have been set by inflateInit2. + + inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being NULL). +*/ + + + /* utility functions */ + +/* + The following utility functions are implemented on top of the + basic stream-oriented functions. To simplify the interface, some + default options are assumed (compression level and memory usage, + standard memory allocation functions). The source code of these + utility functions can easily be modified if you need special options. +*/ + +ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); +/* + Compresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be at least 0.1% larger than + sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the + compressed buffer. + This function can be used to compress a whole file at once if the + input file is mmap'ed. + compress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer. +*/ + +ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen, + int level)); +/* + Compresses the source buffer into the destination buffer. The level + parameter has the same meaning as in deflateInit. sourceLen is the byte + length of the source buffer. Upon entry, destLen is the total size of the + destination buffer, which must be at least 0.1% larger than sourceLen plus + 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. + + compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_BUF_ERROR if there was not enough room in the output buffer, + Z_STREAM_ERROR if the level parameter is invalid. +*/ + +ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); +/* + Decompresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be large enough to hold the + entire uncompressed data. (The size of the uncompressed data must have + been saved previously by the compressor and transmitted to the decompressor + by some mechanism outside the scope of this compression library.) + Upon exit, destLen is the actual size of the compressed buffer. + This function can be used to decompress a whole file at once if the + input file is mmap'ed. + + uncompress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer, or Z_DATA_ERROR if the input data was corrupted. +*/ + + +typedef voidp gzFile; + +ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); +/* + Opens a gzip (.gz) file for reading or writing. The mode parameter + is as in fopen ("rb" or "wb") but can also include a compression level + ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for + Huffman only compression as in "wb1h". (See the description + of deflateInit2 for more information about the strategy parameter.) + + gzopen can be used to read a file which is not in gzip format; in this + case gzread will directly read from the file without decompression. + + gzopen returns NULL if the file could not be opened or if there was + insufficient memory to allocate the (de)compression state; errno + can be checked to distinguish the two cases (if errno is zero, the + zlib error is Z_MEM_ERROR). */ + +ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); +/* + gzdopen() associates a gzFile with the file descriptor fd. File + descriptors are obtained from calls like open, dup, creat, pipe or + fileno (in the file has been previously opened with fopen). + The mode parameter is as in gzopen. + The next call of gzclose on the returned gzFile will also close the + file descriptor fd, just like fclose(fdopen(fd), mode) closes the file + descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode). + gzdopen returns NULL if there was insufficient memory to allocate + the (de)compression state. +*/ + +ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); +/* + Dynamically update the compression level or strategy. See the description + of deflateInit2 for the meaning of these parameters. + gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not + opened for writing. +*/ + +ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); +/* + Reads the given number of uncompressed bytes from the compressed file. + If the input file was not in gzip format, gzread copies the given number + of bytes into the buffer. + gzread returns the number of uncompressed bytes actually read (0 for + end of file, -1 for error). */ + +ZEXTERN int ZEXPORT gzwrite OF((gzFile file, + const voidp buf, unsigned len)); +/* + Writes the given number of uncompressed bytes into the compressed file. + gzwrite returns the number of uncompressed bytes actually written + (0 in case of error). +*/ + +ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); +/* + Converts, formats, and writes the args to the compressed file under + control of the format string, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written (0 in case of error). +*/ + +ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); +/* + Writes the given null-terminated string to the compressed file, excluding + the terminating null character. + gzputs returns the number of characters written, or -1 in case of error. +*/ + +ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); +/* + Reads bytes from the compressed file until len-1 characters are read, or + a newline character is read and transferred to buf, or an end-of-file + condition is encountered. The string is then terminated with a null + character. + gzgets returns buf, or Z_NULL in case of error. +*/ + +ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); +/* + Writes c, converted to an unsigned char, into the compressed file. + gzputc returns the value that was written, or -1 in case of error. +*/ + +ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); +/* + Reads one byte from the compressed file. gzgetc returns this byte + or -1 in case of end of file or error. +*/ + +ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); +/* + Flushes all pending output into the compressed file. The parameter + flush is as in the deflate() function. The return value is the zlib + error number (see function gzerror below). gzflush returns Z_OK if + the flush parameter is Z_FINISH and all output could be flushed. + gzflush should be called only when strictly necessary because it can + degrade compression. +*/ + +ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, + z_off_t offset, int whence)); +/* + Sets the starting position for the next gzread or gzwrite on the + given compressed file. The offset represents a number of bytes in the + uncompressed data stream. The whence parameter is defined as in lseek(2); + the value SEEK_END is not supported. + If the file is opened for reading, this function is emulated but can be + extremely slow. If the file is opened for writing, only forward seeks are + supported; gzseek then compresses a sequence of zeroes up to the new + starting position. + + gzseek returns the resulting offset location as measured in bytes from + the beginning of the uncompressed stream, or -1 in case of error, in + particular if the file is opened for writing and the new starting position + would be before the current position. +*/ + +ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); +/* + Rewinds the given file. This function is supported only for reading. + + gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) +*/ + +ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); +/* + Returns the starting position for the next gzread or gzwrite on the + given compressed file. This position represents a number of bytes in the + uncompressed data stream. + + gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) +*/ + +ZEXTERN int ZEXPORT gzeof OF((gzFile file)); +/* + Returns 1 when EOF has previously been detected reading the given + input stream, otherwise zero. +*/ + +ZEXTERN int ZEXPORT gzclose OF((gzFile file)); +/* + Flushes all pending output if necessary, closes the compressed file + and deallocates all the (de)compression state. The return value is the zlib + error number (see function gzerror below). +*/ + +ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); +/* + Returns the error message for the last error which occurred on the + given compressed file. errnum is set to zlib error number. If an + error occurred in the file system and not in the compression library, + errnum is set to Z_ERRNO and the application may consult errno + to get the exact error code. +*/ + + /* checksum functions */ + +/* + These functions are not related to compression but are exported + anyway because they might be useful in applications using the + compression library. +*/ + +ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); + +/* + Update a running Adler-32 checksum with the bytes buf[0..len-1] and + return the updated checksum. If buf is NULL, this function returns + the required initial value for the checksum. + An Adler-32 checksum is almost as reliable as a CRC32 but can be computed + much faster. Usage example: + + uLong adler = adler32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + adler = adler32(adler, buffer, length); + } + if (adler != original_adler) error(); +*/ + +ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); +/* + Update a running crc with the bytes buf[0..len-1] and return the updated + crc. If buf is NULL, this function returns the required initial value + for the crc. Pre- and post-conditioning (one's complement) is performed + within this function so it shouldn't be done by the application. + Usage example: + + uLong crc = crc32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + crc = crc32(crc, buffer, length); + } + if (crc != original_crc) error(); +*/ + + + /* various hacks, don't look :) */ + +/* deflateInit and inflateInit are macros to allow checking the zlib version + * and the compiler's view of z_stream: + */ +ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, + int windowBits, int memLevel, + int strategy, const char *version, + int stream_size)); +ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, + const char *version, int stream_size)); +#define deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) +#define inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream)) +#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, sizeof(z_stream)) +#define inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) + + +#if !defined(_Z_UTIL_H) && !defined(NO_DUMMY_DECL) + struct internal_state {int dummy;}; /* hack for buggy compilers */ +#endif + +ZEXTERN const char * ZEXPORT zError OF((int err)); +ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z)); +ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); + +#ifdef __cplusplus +} +#endif + +#endif /* _ZLIB_H */ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/zutil.c pcsxr-unstable-1.9.94+svn98108/win32/zlib/zutil.c --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/zutil.c 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/zutil.c 2016-06-30 16:53:28.000000000 +0000 @@ -0,0 +1,225 @@ +/* zutil.c -- target dependent utility functions for the compression library + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#include "zutil.h" + +struct internal_state {int dummy;}; /* for buggy compilers */ + +#ifndef STDC +extern void exit OF((int)); +#endif + +const char *z_errmsg[10] = { +"need dictionary", /* Z_NEED_DICT 2 */ +"stream end", /* Z_STREAM_END 1 */ +"", /* Z_OK 0 */ +"file error", /* Z_ERRNO (-1) */ +"stream error", /* Z_STREAM_ERROR (-2) */ +"data error", /* Z_DATA_ERROR (-3) */ +"insufficient memory", /* Z_MEM_ERROR (-4) */ +"buffer error", /* Z_BUF_ERROR (-5) */ +"incompatible version",/* Z_VERSION_ERROR (-6) */ +""}; + + +const char * ZEXPORT zlibVersion() +{ + return ZLIB_VERSION; +} + +#ifdef DEBUG + +# ifndef verbose +# define verbose 0 +# endif +int z_verbose = verbose; + +void z_error (m) + char *m; +{ + fprintf(stderr, "%s\n", m); + exit(1); +} +#endif + +/* exported to allow conversion of error code to string for compress() and + * uncompress() + */ +const char * ZEXPORT zError(err) + int err; +{ + return ERR_MSG(err); +} + + +#ifndef HAVE_MEMCPY + +void zmemcpy(dest, source, len) + Bytef* dest; + const Bytef* source; + uInt len; +{ + if (len == 0) return; + do { + *dest++ = *source++; /* ??? to be unrolled */ + } while (--len != 0); +} + +int zmemcmp(s1, s2, len) + const Bytef* s1; + const Bytef* s2; + uInt len; +{ + uInt j; + + for (j = 0; j < len; j++) { + if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1; + } + return 0; +} + +void zmemzero(dest, len) + Bytef* dest; + uInt len; +{ + if (len == 0) return; + do { + *dest++ = 0; /* ??? to be unrolled */ + } while (--len != 0); +} +#endif + +#ifdef __TURBOC__ +#if (defined( __BORLANDC__) || !defined(SMALL_MEDIUM)) && !defined(__32BIT__) +/* Small and medium model in Turbo C are for now limited to near allocation + * with reduced MAX_WBITS and MAX_MEM_LEVEL + */ +# define MY_ZCALLOC + +/* Turbo C malloc() does not allow dynamic allocation of 64K bytes + * and farmalloc(64K) returns a pointer with an offset of 8, so we + * must fix the pointer. Warning: the pointer must be put back to its + * original form in order to free it, use zcfree(). + */ + +#define MAX_PTR 10 +/* 10*64K = 640K */ + +local int next_ptr = 0; + +typedef struct ptr_table_s { + voidpf org_ptr; + voidpf new_ptr; +} ptr_table; + +local ptr_table table[MAX_PTR]; +/* This table is used to remember the original form of pointers + * to large buffers (64K). Such pointers are normalized with a zero offset. + * Since MSDOS is not a preemptive multitasking OS, this table is not + * protected from concurrent access. This hack doesn't work anyway on + * a protected system like OS/2. Use Microsoft C instead. + */ + +voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) +{ + voidpf buf = opaque; /* just to make some compilers happy */ + ulg bsize = (ulg)items*size; + + /* If we allocate less than 65520 bytes, we assume that farmalloc + * will return a usable pointer which doesn't have to be normalized. + */ + if (bsize < 65520L) { + buf = farmalloc(bsize); + if (*(ush*)&buf != 0) return buf; + } else { + buf = farmalloc(bsize + 16L); + } + if (buf == NULL || next_ptr >= MAX_PTR) return NULL; + table[next_ptr].org_ptr = buf; + + /* Normalize the pointer to seg:0 */ + *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4; + *(ush*)&buf = 0; + table[next_ptr++].new_ptr = buf; + return buf; +} + +void zcfree (voidpf opaque, voidpf ptr) +{ + int n; + if (*(ush*)&ptr != 0) { /* object < 64K */ + farfree(ptr); + return; + } + /* Find the original pointer */ + for (n = 0; n < next_ptr; n++) { + if (ptr != table[n].new_ptr) continue; + + farfree(table[n].org_ptr); + while (++n < next_ptr) { + table[n-1] = table[n]; + } + next_ptr--; + return; + } + ptr = opaque; /* just to make some compilers happy */ + Assert(0, "zcfree: ptr not found"); +} +#endif +#endif /* __TURBOC__ */ + + +#if defined(M_I86) && !defined(__32BIT__) +/* Microsoft C in 16-bit mode */ + +# define MY_ZCALLOC + +#if (!defined(_MSC_VER) || (_MSC_VER <= 600)) +# define _halloc halloc +# define _hfree hfree +#endif + +voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) +{ + if (opaque) opaque = 0; /* to make compiler happy */ + return _halloc((long)items, size); +} + +void zcfree (voidpf opaque, voidpf ptr) +{ + if (opaque) opaque = 0; /* to make compiler happy */ + _hfree(ptr); +} + +#endif /* MSC */ + + +#ifndef MY_ZCALLOC /* Any system without a special alloc function */ + +#ifndef STDC +extern voidp calloc OF((uInt items, uInt size)); +extern void free OF((voidpf ptr)); +#endif + +voidpf zcalloc (opaque, items, size) + voidpf opaque; + unsigned items; + unsigned size; +{ + if (opaque) items += size - size; /* make compiler happy */ + return (voidpf)calloc(items, size); +} + +void zcfree (opaque, ptr) + voidpf opaque; + voidpf ptr; +{ + free(ptr); + if (opaque) return; /* make compiler happy */ +} + +#endif /* MY_ZCALLOC */ diff -Nru pcsxr-unstable-1.9.94+svn97809/win32/zlib/zutil.h pcsxr-unstable-1.9.94+svn98108/win32/zlib/zutil.h --- pcsxr-unstable-1.9.94+svn97809/win32/zlib/zutil.h 1970-01-01 00:00:00.000000000 +0000 +++ pcsxr-unstable-1.9.94+svn98108/win32/zlib/zutil.h 2016-06-30 16:53:28.000000000 +0000 @@ -0,0 +1,220 @@ +/* zutil.h -- internal interface and configuration of the compression library + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* @(#) $Id$ */ + +#ifndef _Z_UTIL_H +#define _Z_UTIL_H + +#include "zlib.h" + +#ifdef STDC +# include +# include +# include +#endif +#ifdef NO_ERRNO_H + extern int errno; +#else +# include +#endif + +#ifndef local +# define local static +#endif +/* compile with -Dlocal if your debugger can't find static symbols */ + +typedef unsigned char uch; +typedef uch FAR uchf; +typedef unsigned short ush; +typedef ush FAR ushf; +typedef unsigned long ulg; + +extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ +/* (size given to avoid silly warnings with Visual C++) */ + +#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] + +#define ERR_RETURN(strm,err) \ + return (strm->msg = (char*)ERR_MSG(err), (err)) +/* To be used only when the state is known to be valid */ + + /* common constants */ + +#ifndef DEF_WBITS +# define DEF_WBITS MAX_WBITS +#endif +/* default windowBits for decompression. MAX_WBITS is for compression only */ + +#if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +#else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +#endif +/* default memLevel */ + +#define STORED_BLOCK 0 +#define STATIC_TREES 1 +#define DYN_TREES 2 +/* The three kinds of block type */ + +#define MIN_MATCH 3 +#define MAX_MATCH 258 +/* The minimum and maximum match lengths */ + +#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */ + + /* target dependencies */ + +#ifdef MSDOS +# define OS_CODE 0x00 +# if defined(__TURBOC__) || defined(__BORLANDC__) +# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) + /* Allow compilation with ANSI keywords only enabled */ + void _Cdecl farfree( void *block ); + void *_Cdecl farmalloc( unsigned long nbytes ); +# else +# include +# endif +# else /* MSC or DJGPP */ +# include +# endif +#endif + +#ifdef OS2 +# define OS_CODE 0x06 +#endif + +#ifdef WIN32 /* Window 95 & Windows NT */ +# define OS_CODE 0x0b +#endif + +#if defined(VAXC) || defined(VMS) +# define OS_CODE 0x02 +# define F_OPEN(name, mode) \ + fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") +#endif + +#ifdef AMIGA +# define OS_CODE 0x01 +#endif + +#if defined(ATARI) || defined(atarist) +# define OS_CODE 0x05 +#endif + +#if defined(MACOS) || defined(TARGET_OS_MAC) +# define OS_CODE 0x07 +# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os +# include /* for fdopen */ +# else +# ifndef fdopen +# define fdopen(fd,mode) NULL /* No fdopen() */ +# endif +# endif +#endif + +#ifdef __50SERIES /* Prime/PRIMOS */ +# define OS_CODE 0x0F +#endif + +#ifdef TOPS20 +# define OS_CODE 0x0a +#endif + +#if defined(_BEOS_) || defined(RISCOS) +# define fdopen(fd,mode) NULL /* No fdopen() */ +#endif + +#if (defined(_MSC_VER) && (_MSC_VER > 600)) +# define fdopen(fd,type) _fdopen(fd,type) +#endif + + + /* Common defaults */ + +#ifndef OS_CODE +# define OS_CODE 0x03 /* assume Unix */ +#endif + +#ifndef F_OPEN +# define F_OPEN(name, mode) fopen((name), (mode)) +#endif + + /* functions */ + +#ifdef HAVE_STRERROR + extern char *strerror OF((int)); +# define zstrerror(errnum) strerror(errnum) +#else +# define zstrerror(errnum) "" +#endif + +#if defined(pyr) +# define NO_MEMCPY +#endif +#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__) + /* Use our own functions for small and medium model with MSC <= 5.0. + * You may have to use the same strategy for Borland C (untested). + * The __SC__ check is for Symantec. + */ +# define NO_MEMCPY +#endif +#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY) +# define HAVE_MEMCPY +#endif +#ifdef HAVE_MEMCPY +# ifdef SMALL_MEDIUM /* MSDOS small or medium model */ +# define zmemcpy _fmemcpy +# define zmemcmp _fmemcmp +# define zmemzero(dest, len) _fmemset(dest, 0, len) +# else +# define zmemcpy memcpy +# define zmemcmp memcmp +# define zmemzero(dest, len) memset(dest, 0, len) +# endif +#else + extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); + extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); + extern void zmemzero OF((Bytef* dest, uInt len)); +#endif + +/* Diagnostic functions */ +#ifdef DEBUG +# include + extern int z_verbose; + extern void z_error OF((char *m)); +# define Assert(cond,msg) {if(!(cond)) z_error(msg);} +# define Trace(x) {if (z_verbose>=0) fprintf x ;} +# define Tracev(x) {if (z_verbose>0) fprintf x ;} +# define Tracevv(x) {if (z_verbose>1) fprintf x ;} +# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} +# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} +#else +# define Assert(cond,msg) +# define Trace(x) +# define Tracev(x) +# define Tracevv(x) +# define Tracec(c,x) +# define Tracecv(c,x) +#endif + + +typedef uLong (ZEXPORT *check_func) OF((uLong check, const Bytef *buf, + uInt len)); +voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); +void zcfree OF((voidpf opaque, voidpf ptr)); + +#define ZALLOC(strm, items, size) \ + (*((strm)->zalloc))((strm)->opaque, (items), (size)) +#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr)) +#define TRY_FREE(s, p) {if (p) ZFREE(s, p);} + +#endif /* _Z_UTIL_H */