From a50689764adaf9846b1fcb503bde4c9544d30698 Mon Sep 17 00:00:00 2001 From: gecko_reverse Date: Tue, 1 Apr 2008 04:59:52 +0000 Subject: [PATCH] Cocoa Port: updated documentation, video output view moved into it's own file, input class added, fixed window resizing bugs, ROM Info interface updated and icon preview added, much improved about window, emulation moved to separate threadd, xcode project file added (compile from xcode or codeblocks) --- desmume/ChangeLog | 5 +- desmume/README.MAC | 41 +- desmume/README.TRANSLATION | 14 +- desmume/src/cocoa/DeSmuME.cbp | 31 +- .../cocoa/DeSmuME.xcodeproj/project.pbxproj | 514 ++++ desmume/src/cocoa/English.strings | Bin 5382 -> 6390 bytes desmume/src/cocoa/Japanese.strings | Bin 4856 -> 5750 bytes desmume/src/cocoa/about.m | 373 +++ desmume/src/cocoa/cocoa_util.m | 1 + desmume/src/cocoa/globals.h | 130 +- desmume/src/cocoa/input.h | 46 + desmume/src/cocoa/input.m | 205 ++ desmume/src/cocoa/main.m | 330 +-- desmume/src/cocoa/main_window.h | 63 +- desmume/src/cocoa/main_window.m | 2227 ++++++++--------- desmume/src/cocoa/makeapp.sh | 8 +- desmume/src/cocoa/nds_control.h | 186 +- desmume/src/cocoa/nds_control.m | 1583 +++++++----- desmume/src/cocoa/preferences.h | 16 +- desmume/src/cocoa/preferences.m | 74 +- desmume/src/cocoa/rom_info.h | 32 + desmume/src/cocoa/rom_info.m | 301 +++ desmume/src/cocoa/screenshot.h | 26 +- desmume/src/cocoa/screenshot.m | 468 ++-- desmume/src/cocoa/sndOSX.h | 6 - desmume/src/cocoa/sndOSX.m | 10 +- desmume/src/cocoa/video_output_view.h | 42 + desmume/src/cocoa/video_output_view.m | 271 ++ desmume/src/types.h | 8 +- 29 files changed, 4386 insertions(+), 2625 deletions(-) create mode 100644 desmume/src/cocoa/DeSmuME.xcodeproj/project.pbxproj create mode 100644 desmume/src/cocoa/about.m create mode 100644 desmume/src/cocoa/input.h create mode 100644 desmume/src/cocoa/input.m create mode 100644 desmume/src/cocoa/rom_info.h create mode 100644 desmume/src/cocoa/rom_info.m create mode 100644 desmume/src/cocoa/video_output_view.h create mode 100644 desmume/src/cocoa/video_output_view.m diff --git a/desmume/ChangeLog b/desmume/ChangeLog index f2d1cd933..b27fd8b2b 100644 --- a/desmume/ChangeLog +++ b/desmume/ChangeLog @@ -4,13 +4,16 @@ - Recent Items menu now works. [Jeff B] - Opening NDS files from Finder now works. [Jeff B] - Added screenshot feature. [Jeff B] - - Added preferences window. [Jeff B] + - Added preferences. [Jeff B] - Many more strings are translatable now. [Jeff B] - Default screen color is black (better represents being "off" and easier on eyes at night). [Jeff B] - Added sound. [Jeff B] - Now is a universal binary. [Jeff B] - Leopard resolution icon added. [Jeff B] - Added a Japanese translation. [Jeff B] + - Added an optional status bar (resize handle no longer overlaps screen). [Jeff B] + - New ROM Info and About DeSmuME windows have been added. [Jeff B] + - Fixed several bugs in window resizing. [Jeff B] general: - Fixed possible segfault in ROMReader on ia64 and amd64. [evilynux] - Fixed a crash bug with 2D background corrupting memory [shash] diff --git a/desmume/README.MAC b/desmume/README.MAC index d9a53dd86..d5547444a 100644 --- a/desmume/README.MAC +++ b/desmume/README.MAC @@ -5,15 +5,17 @@ 1) Compiling instructions...................................13 -2) How to use DeSmuME.......................................51 -3) Contact information.....................................166 -4) Disclaimer..............................................185 +2) How to use DeSmuME.......................................31 +3) Contact information......................................67 +4) Disclaimer...............................................84 1 Compiling instructions______________________________________ DeSmuME is written in C, and the Cocoa interface was written -in Objective-C. It uses the Cocoa, OpenGL, and zlib libraries. +in Objective-C. It uses the Cocoa, OpenGL, and [optionally] +the zlib library. + So you need a working C and Objective-C compiler, such as GCC for Mac OS X. @@ -22,27 +24,31 @@ GCC for Mac OS X. * zlib can be found at http://www.zlib.net, and may also come with Mac OS X. -DeSmuME for Mac OS X is being developed with the CodeBlocks -IDE, but one may also use Apple's Xcode Interface. +DeSmuME for Mac OS X can be compiled using the XCode IDE +or the CodeBlocks IDE. Project files are available in the +Cocoa source folder. 2 How to use DeSmuME__________________________________________ +To install DeSmuME, copy DeSmuME.app into the folder of your +choice (Applications folder is recommended). You can also drag +it to your dock for quicker launching. + +Double click the application to launch DeSmuME. + +Most options can be found in the menu bar a the top of the +screen. On Leopard, you can use the search box under the help +menu to find things. + DeSmuME for Mac OS X does not support all the features of the Linux and Windows versions. -To install DeSmuME, copy DeSmuME.app into the folder of your choice -(Applications folder is recommended). - -Double click the application to launch DeSmuME. - -Most options can be found in the menu's at the top of the screen. - Click the lower screen for DS touch-screen input. Here are the default key mappings(they may be subject to change): -Up arrow - Up -Left arrow - Left -Down arrow - Down +up arrow - Up +left arrow - Left +down arrow - Down right arrow - Right v - A button b - B button @@ -56,6 +62,8 @@ space - Select button Shift + F1 (through F10) will save the state with the corresponding number. F1 (through F10) will load the state with the corresponding number. +NOTE: These key bindings may not be correct on foreign keyboards. + 3 Contact information_________________________________________ General inquiries should go to: @@ -73,7 +81,6 @@ If you want to submit a bug report, please run desmume, go into the "Help" menu, and click on "Submit a bug report". If you're having trouble with it, please feel free to email. - 4 Disclaimer__________________________________________________ This program is free software; you can redistribute it and/or diff --git a/desmume/README.TRANSLATION b/desmume/README.TRANSLATION index bfbfca9b2..34cca8eee 100644 --- a/desmume/README.TRANSLATION +++ b/desmume/README.TRANSLATION @@ -15,7 +15,7 @@ Developpers: 1 Supported UIs ________________________________________________________________ Although there are 4 UIs, only 3 currently support localization: -windows and gtk-glade. +windows, gtk-glade, and Cocoa (Mac OS X). To translate DeSmuME, see "Starting a new translation" below. @@ -37,9 +37,9 @@ send us your translation by getting in touch with us: see "Contact Us" below. 1.3 Mac OS X (Cocoa) UI _____________________________________________________ - Localization is located within the application bundle (in Finder right click - on DeSmuME and select "Show Package Contents"). Within the Contents/Resources - folder there is a folder for each localization. + Localization files are located within the application bundle (in Finder right + click on DeSmuME and select "Show Package Contents"). Within the + Contents/Resources folder there is a folder for each localization. 2 Starting a new translation ___________________________________________________ @@ -66,6 +66,10 @@ send us your translation by getting in touch with us: see "Contact Us" below. Rename the part before ".lproj" to the language of the translation. Within your newly created folder edit "Localizable.strings". + The MainMenu.nib opaque folder also contains localization of the Application + menu, however since this is a standard menu in Mac OS X, for most languages + standard strings can be generated by Apple's Interface Builder. + The strings file should stay in UTF-16 encoding (UTF-8 or others may work, but UTF-16 is preferred). @@ -74,7 +78,7 @@ send us your translation by getting in touch with us: see "Contact Us" below. Debugging the string file: If you have Mac OS X developer tools installed, from the console you can type "plutil FILE", replacing FILE with the name and path of the string file, and - it will tell you if there are any errors (and where). + it will tell you if there are any errors (and on what line). 3 Editors ______________________________________________________________________ diff --git a/desmume/src/cocoa/DeSmuME.cbp b/desmume/src/cocoa/DeSmuME.cbp index 58c055a2b..195890a37 100644 --- a/desmume/src/cocoa/DeSmuME.cbp +++ b/desmume/src/cocoa/DeSmuME.cbp @@ -11,6 +11,8 @@ - @@ -54,8 +55,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA]]>