diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..6f93fbc --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: schnapple +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c6b2056 --- /dev/null +++ b/.gitignore @@ -0,0 +1,87 @@ +.DS_Store +*xcuserdata/ +*build/ +*.mode1v3 +*.pbxuser +*.xcworkspace +*.moved-aside/ +.svn + +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xccheckout +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# Package.resolved +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ +# +# Add this line if you want to avoid checking in source code from the Xcode workspace +# *.xcworkspace + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots/**/*.png +fastlane/test_output + +# Code Injection +# +# After new code Injection tools there's a generated folder /iOSInjectionProject +# https://github.com/johnno1962/injectionforxcode + +iOSInjectionProject/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..8f872ff --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ + + +# Wolfenstein 3D for iOS 11 and tvOS for Apple TV + +  + +This is my update for Wolfenstein 3D for iOS to run on iOS 11, running in modern resolutions including the full width of the iPhone X. I have also made a target and version for tvOS to run on Apple TV + +![screenshot](https://raw.githubusercontent.com/tomkidd/Wolf3d-iOS/master/ss_wolf3d.png) + +Improvements/Changes + +- Compiles and runs in iOS 11 SDK +- Orientation and coordinate system fixed to reflect iOS 8 changes +- C warnings fixed for Xcode 9.3 +- Basic MFi controller support +- Deprecated APIs removed and replaced with modern equivalents +- Code locations reorganized and consolodated +- Second project target for tvOS that takes advantage of focus model and removes on-screen controls. + +For a rundown of getting the code up and running in iOS 11, I wrote this [lengthy article](http://schnapple.com/wolfenstein-3d-and-doom-on-ios-11/) on the subject. For a rundown of the effort to get it running on tvOS, I wrote a [second lenghty article](http://schnapple.com/wolfenstein-3d-and-doom-on-tvos-for-apple-tv/) on the subject. + +[Video of Wolfenstein 3-D running on an iPhone X](https://www.youtube.com/watch?v=O_tC5krFVZ8) + +[Video of Wolfenstein 3-D running on an Apple TV](https://www.youtube.com/watch?v=ghkjUi_1Bos) + +I have also made apps for [*DOOM*, *DOOM II* and *Final DOOM*](https://github.com/tomkidd/DOOM-iOS), [*Quake*](https://github.com/tomkidd/Quake-iOS), [*Quake II*](https://github.com/tomkidd/Quake2-iOS), [*Quake III: Arena*](https://github.com/tomkidd/Quake3-iOS), [*Return to Castle Wolfenstein*](https://github.com/tomkidd/RTCW-iOS) and [*DOOM 3*](https://github.com/tomkidd/DOOM3-iOS). + +Have fun. For any questions I can be reached at tomkidd@gmail.com diff --git a/__MACOSX/wolf3d/._README.txt b/__MACOSX/wolf3d/._README.txt deleted file mode 100644 index c8ef17d..0000000 Binary files a/__MACOSX/wolf3d/._README.txt and /dev/null differ diff --git a/__MACOSX/wolf3d/._readme_iWolf_v1x.txt b/__MACOSX/wolf3d/._readme_iWolf_v1x.txt deleted file mode 100644 index 5a667fa..0000000 Binary files a/__MACOSX/wolf3d/._readme_iWolf_v1x.txt and /dev/null differ diff --git a/__MACOSX/wolf3d/code/._wolfiphone.h b/__MACOSX/wolf3d/code/._wolfiphone.h deleted file mode 100644 index ddd0b08..0000000 Binary files a/__MACOSX/wolf3d/code/._wolfiphone.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/env/._fileio.c b/__MACOSX/wolf3d/code/env/._fileio.c deleted file mode 100644 index a382427..0000000 Binary files a/__MACOSX/wolf3d/code/env/._fileio.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/env/._files.c b/__MACOSX/wolf3d/code/env/._files.c deleted file mode 100644 index 19d0b71..0000000 Binary files a/__MACOSX/wolf3d/code/env/._files.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/env/._filesystem.h b/__MACOSX/wolf3d/code/env/._filesystem.h deleted file mode 100644 index 198fffe..0000000 Binary files a/__MACOSX/wolf3d/code/env/._filesystem.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/env/._openal_main.c b/__MACOSX/wolf3d/code/env/._openal_main.c deleted file mode 100644 index 414337f..0000000 Binary files a/__MACOSX/wolf3d/code/env/._openal_main.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/env/._opengl_draw.c b/__MACOSX/wolf3d/code/env/._opengl_draw.c deleted file mode 100644 index 5c7cc80..0000000 Binary files a/__MACOSX/wolf3d/code/env/._opengl_draw.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/env/._opengl_local.h b/__MACOSX/wolf3d/code/env/._opengl_local.h deleted file mode 100644 index 42e7078..0000000 Binary files a/__MACOSX/wolf3d/code/env/._opengl_local.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/env/._opengl_main.c b/__MACOSX/wolf3d/code/env/._opengl_main.c deleted file mode 100644 index fd7dc6d..0000000 Binary files a/__MACOSX/wolf3d/code/env/._opengl_main.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/env/._sound.c b/__MACOSX/wolf3d/code/env/._sound.c deleted file mode 100644 index 94bc34f..0000000 Binary files a/__MACOSX/wolf3d/code/env/._sound.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/env/._sound_local.h b/__MACOSX/wolf3d/code/env/._sound_local.h deleted file mode 100644 index 074c145..0000000 Binary files a/__MACOSX/wolf3d/code/env/._sound_local.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/env/._sound_sfx_id.c b/__MACOSX/wolf3d/code/env/._sound_sfx_id.c deleted file mode 100644 index e362eb2..0000000 Binary files a/__MACOSX/wolf3d/code/env/._sound_sfx_id.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/env/._sound_stream.c b/__MACOSX/wolf3d/code/env/._sound_stream.c deleted file mode 100644 index 7b07437..0000000 Binary files a/__MACOSX/wolf3d/code/env/._sound_stream.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/env/._texture_manager.c b/__MACOSX/wolf3d/code/env/._texture_manager.c deleted file mode 100644 index b3a1345..0000000 Binary files a/__MACOSX/wolf3d/code/env/._texture_manager.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/env/._texture_manager.h b/__MACOSX/wolf3d/code/env/._texture_manager.h deleted file mode 100644 index 27b01ad..0000000 Binary files a/__MACOSX/wolf3d/code/env/._texture_manager.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/env/._unix_file.c b/__MACOSX/wolf3d/code/env/._unix_file.c deleted file mode 100644 index 2e07b96..0000000 Binary files a/__MACOSX/wolf3d/code/env/._unix_file.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/env/._video.h b/__MACOSX/wolf3d/code/env/._video.h deleted file mode 100644 index 77618cd..0000000 Binary files a/__MACOSX/wolf3d/code/env/._video.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._.DS_Store b/__MACOSX/wolf3d/code/iphone/._.DS_Store deleted file mode 100644 index 460d887..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._.DS_Store and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._CreditsViewController.h b/__MACOSX/wolf3d/code/iphone/._CreditsViewController.h deleted file mode 100644 index aa11515..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._CreditsViewController.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._CreditsViewController.m b/__MACOSX/wolf3d/code/iphone/._CreditsViewController.m deleted file mode 100644 index fcb90ed..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._CreditsViewController.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._EAGLView.h b/__MACOSX/wolf3d/code/iphone/._EAGLView.h deleted file mode 100644 index 0ce1695..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._EAGLView.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._EAGLView.m b/__MACOSX/wolf3d/code/iphone/._EAGLView.m deleted file mode 100644 index daea694..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._EAGLView.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._EpisodeViewController.h b/__MACOSX/wolf3d/code/iphone/._EpisodeViewController.h deleted file mode 100644 index 280f1d0..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._EpisodeViewController.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._EpisodeViewController.m b/__MACOSX/wolf3d/code/iphone/._EpisodeViewController.m deleted file mode 100644 index 2a43dad..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._EpisodeViewController.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._Info.plist b/__MACOSX/wolf3d/code/iphone/._Info.plist deleted file mode 100644 index 2c437f7..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._Info.plist and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._LegalViewController.h b/__MACOSX/wolf3d/code/iphone/._LegalViewController.h deleted file mode 100644 index 56caabf..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._LegalViewController.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._LegalViewController.m b/__MACOSX/wolf3d/code/iphone/._LegalViewController.m deleted file mode 100644 index 0f6dc16..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._LegalViewController.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._LevelSelectViewController.h b/__MACOSX/wolf3d/code/iphone/._LevelSelectViewController.h deleted file mode 100644 index 47ae26b..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._LevelSelectViewController.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._LevelSelectViewController.m b/__MACOSX/wolf3d/code/iphone/._LevelSelectViewController.m deleted file mode 100644 index 4b1fa12..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._LevelSelectViewController.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._MainMenuViewController.h b/__MACOSX/wolf3d/code/iphone/._MainMenuViewController.h deleted file mode 100644 index f9592cc..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._MainMenuViewController.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._MainMenuViewController.m b/__MACOSX/wolf3d/code/iphone/._MainMenuViewController.m deleted file mode 100644 index 2ad1180..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._MainMenuViewController.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._MissionTableViewCell.h b/__MACOSX/wolf3d/code/iphone/._MissionTableViewCell.h deleted file mode 100644 index b35249d..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._MissionTableViewCell.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._MissionTableViewCell.m b/__MACOSX/wolf3d/code/iphone/._MissionTableViewCell.m deleted file mode 100644 index 1999946..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._MissionTableViewCell.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._SettingsViewController.h b/__MACOSX/wolf3d/code/iphone/._SettingsViewController.h deleted file mode 100644 index 251f4fc..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._SettingsViewController.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._SettingsViewController.m b/__MACOSX/wolf3d/code/iphone/._SettingsViewController.m deleted file mode 100644 index 284c8ff..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._SettingsViewController.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._SkillViewController.h b/__MACOSX/wolf3d/code/iphone/._SkillViewController.h deleted file mode 100644 index a4c9529..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._SkillViewController.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._SkillViewController.m b/__MACOSX/wolf3d/code/iphone/._SkillViewController.m deleted file mode 100644 index e8215df..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._SkillViewController.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._TriviaViewController.h b/__MACOSX/wolf3d/code/iphone/._TriviaViewController.h deleted file mode 100644 index 4b49e4e..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._TriviaViewController.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._TriviaViewController.m b/__MACOSX/wolf3d/code/iphone/._TriviaViewController.m deleted file mode 100644 index 543339f..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._TriviaViewController.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._UIFontButton.h b/__MACOSX/wolf3d/code/iphone/._UIFontButton.h deleted file mode 100644 index ace6274..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._UIFontButton.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._UIFontButton.m b/__MACOSX/wolf3d/code/iphone/._UIFontButton.m deleted file mode 100644 index b18b658..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._UIFontButton.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._UIFontLabel.h b/__MACOSX/wolf3d/code/iphone/._UIFontLabel.h deleted file mode 100644 index 29e2a0e..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._UIFontLabel.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._UIFontLabel.m b/__MACOSX/wolf3d/code/iphone/._UIFontLabel.m deleted file mode 100644 index 0a251c5..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._UIFontLabel.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._UITableViewScrolling.h b/__MACOSX/wolf3d/code/iphone/._UITableViewScrolling.h deleted file mode 100644 index b0f3b58..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._UITableViewScrolling.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._UITableViewScrolling.m b/__MACOSX/wolf3d/code/iphone/._UITableViewScrolling.m deleted file mode 100644 index c53a419..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._UITableViewScrolling.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._WolfSlider.h b/__MACOSX/wolf3d/code/iphone/._WolfSlider.h deleted file mode 100644 index 368a74b..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._WolfSlider.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._WolfSlider.m b/__MACOSX/wolf3d/code/iphone/._WolfSlider.m deleted file mode 100644 index 63d5478..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._WolfSlider.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._gles_glue.c b/__MACOSX/wolf3d/code/iphone/._gles_glue.c deleted file mode 100644 index 4e2c4ec..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._gles_glue.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._gles_glue.h b/__MACOSX/wolf3d/code/iphone/._gles_glue.h deleted file mode 100644 index 6b8b61f..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._gles_glue.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._hud.c b/__MACOSX/wolf3d/code/iphone/._hud.c deleted file mode 100644 index 0d38daa..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._hud.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._iphone_alerts.h b/__MACOSX/wolf3d/code/iphone/._iphone_alerts.h deleted file mode 100644 index a364c34..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._iphone_alerts.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._iphone_alerts.m b/__MACOSX/wolf3d/code/iphone/._iphone_alerts.m deleted file mode 100644 index cdeb0b3..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._iphone_alerts.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._iphone_downloadSOD.m b/__MACOSX/wolf3d/code/iphone/._iphone_downloadSOD.m deleted file mode 100644 index 7bedaa7..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._iphone_downloadSOD.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._iphone_downloadUserMap.m b/__MACOSX/wolf3d/code/iphone/._iphone_downloadUserMap.m deleted file mode 100644 index 422c8bb..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._iphone_downloadUserMap.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._iphone_loop.c b/__MACOSX/wolf3d/code/iphone/._iphone_loop.c deleted file mode 100644 index 570dc66..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._iphone_loop.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._iphone_main.c b/__MACOSX/wolf3d/code/iphone/._iphone_main.c deleted file mode 100644 index b502cd8..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._iphone_main.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._iphone_mapselector.c b/__MACOSX/wolf3d/code/iphone/._iphone_mapselector.c deleted file mode 100644 index c022898..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._iphone_mapselector.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._iphone_menus.c b/__MACOSX/wolf3d/code/iphone/._iphone_menus.c deleted file mode 100644 index 038c0f3..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._iphone_menus.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._iphone_qgl.h b/__MACOSX/wolf3d/code/iphone/._iphone_qgl.h deleted file mode 100644 index 3f25766..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._iphone_qgl.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._iphone_store.h b/__MACOSX/wolf3d/code/iphone/._iphone_store.h deleted file mode 100644 index b53f114..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._iphone_store.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._iphone_store.m b/__MACOSX/wolf3d/code/iphone/._iphone_store.m deleted file mode 100644 index 92cdb0f..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._iphone_store.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._iphone_sys.m b/__MACOSX/wolf3d/code/iphone/._iphone_sys.m deleted file mode 100644 index 6d38f6f..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._iphone_sys.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._iphone_wolf.h b/__MACOSX/wolf3d/code/iphone/._iphone_wolf.h deleted file mode 100644 index 938decc..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._iphone_wolf.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._main.m b/__MACOSX/wolf3d/code/iphone/._main.m deleted file mode 100644 index 2dc0ff3..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._main.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._wolf3dAppDelegate.h b/__MACOSX/wolf3d/code/iphone/._wolf3dAppDelegate.h deleted file mode 100644 index 9b290c3..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._wolf3dAppDelegate.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._wolf3dAppDelegate.m b/__MACOSX/wolf3d/code/iphone/._wolf3dAppDelegate.m deleted file mode 100644 index 9863f24..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._wolf3dAppDelegate.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._wolf3dViewController.h b/__MACOSX/wolf3d/code/iphone/._wolf3dViewController.h deleted file mode 100644 index 536bd85..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._wolf3dViewController.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._wolf3dViewController.m b/__MACOSX/wolf3d/code/iphone/._wolf3dViewController.m deleted file mode 100644 index 25ca8a2..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._wolf3dViewController.m and /dev/null differ diff --git a/__MACOSX/wolf3d/code/iphone/._wolf3d_Prefix.pch b/__MACOSX/wolf3d/code/iphone/._wolf3d_Prefix.pch deleted file mode 100644 index 8fd8429..0000000 Binary files a/__MACOSX/wolf3d/code/iphone/._wolf3d_Prefix.pch and /dev/null differ diff --git a/__MACOSX/wolf3d/code/wolf/._wolf_ai_com.c b/__MACOSX/wolf3d/code/wolf/._wolf_ai_com.c deleted file mode 100644 index 4e333a6..0000000 Binary files a/__MACOSX/wolf3d/code/wolf/._wolf_ai_com.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/wolf/._wolf_client_main.c b/__MACOSX/wolf3d/code/wolf/._wolf_client_main.c deleted file mode 100644 index 457e084..0000000 Binary files a/__MACOSX/wolf3d/code/wolf/._wolf_client_main.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/wolf/._wolf_local.h b/__MACOSX/wolf3d/code/wolf/._wolf_local.h deleted file mode 100644 index ac19892..0000000 Binary files a/__MACOSX/wolf3d/code/wolf/._wolf_local.h and /dev/null differ diff --git a/__MACOSX/wolf3d/code/wolf/._wolf_math.c b/__MACOSX/wolf3d/code/wolf/._wolf_math.c deleted file mode 100644 index 241e2c9..0000000 Binary files a/__MACOSX/wolf3d/code/wolf/._wolf_math.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/wolf/._wolf_opengl.c b/__MACOSX/wolf3d/code/wolf/._wolf_opengl.c deleted file mode 100644 index 7c5e425..0000000 Binary files a/__MACOSX/wolf3d/code/wolf/._wolf_opengl.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/wolf/._wolf_player.c b/__MACOSX/wolf3d/code/wolf/._wolf_player.c deleted file mode 100644 index 6467aae..0000000 Binary files a/__MACOSX/wolf3d/code/wolf/._wolf_player.c and /dev/null differ diff --git a/__MACOSX/wolf3d/code/wolf/._wolf_renderer.h b/__MACOSX/wolf3d/code/wolf/._wolf_renderer.h deleted file mode 100644 index 227b307..0000000 Binary files a/__MACOSX/wolf3d/code/wolf/._wolf_renderer.h and /dev/null differ diff --git a/__MACOSX/wolf3d/scripts/._scrubBase.pl b/__MACOSX/wolf3d/scripts/._scrubBase.pl deleted file mode 100644 index d64c7c5..0000000 Binary files a/__MACOSX/wolf3d/scripts/._scrubBase.pl and /dev/null differ diff --git a/icon_wolf3d.png b/icon_wolf3d.png new file mode 100644 index 0000000..0da1814 Binary files /dev/null and b/icon_wolf3d.png differ diff --git a/ss_wolf3d.png b/ss_wolf3d.png new file mode 100644 index 0000000..fef70da Binary files /dev/null and b/ss_wolf3d.png differ diff --git a/wolf3d/base/maps/s00.map b/wolf3d/base/maps/s00.map new file mode 100755 index 0000000..d8d95d8 Binary files /dev/null and b/wolf3d/base/maps/s00.map differ diff --git a/wolf3d/base/maps/s01.map b/wolf3d/base/maps/s01.map new file mode 100755 index 0000000..f725bfa Binary files /dev/null and b/wolf3d/base/maps/s01.map differ diff --git a/wolf3d/base/maps/s02.map b/wolf3d/base/maps/s02.map new file mode 100755 index 0000000..915bcc3 Binary files /dev/null and b/wolf3d/base/maps/s02.map differ diff --git a/wolf3d/base/maps/s03.map b/wolf3d/base/maps/s03.map new file mode 100755 index 0000000..50454cf Binary files /dev/null and b/wolf3d/base/maps/s03.map differ diff --git a/wolf3d/base/maps/s04.map b/wolf3d/base/maps/s04.map new file mode 100755 index 0000000..0262833 Binary files /dev/null and b/wolf3d/base/maps/s04.map differ diff --git a/wolf3d/base/maps/s05.map b/wolf3d/base/maps/s05.map new file mode 100755 index 0000000..1aa1085 Binary files /dev/null and b/wolf3d/base/maps/s05.map differ diff --git a/wolf3d/base/maps/s06.map b/wolf3d/base/maps/s06.map new file mode 100755 index 0000000..a1dd71c Binary files /dev/null and b/wolf3d/base/maps/s06.map differ diff --git a/wolf3d/base/maps/s07.map b/wolf3d/base/maps/s07.map new file mode 100755 index 0000000..f85db41 Binary files /dev/null and b/wolf3d/base/maps/s07.map differ diff --git a/wolf3d/base/maps/s08.map b/wolf3d/base/maps/s08.map new file mode 100755 index 0000000..cd6b1a4 Binary files /dev/null and b/wolf3d/base/maps/s08.map differ diff --git a/wolf3d/base/maps/s09.map b/wolf3d/base/maps/s09.map new file mode 100755 index 0000000..16b40c1 Binary files /dev/null and b/wolf3d/base/maps/s09.map differ diff --git a/wolf3d/base/maps/s10.map b/wolf3d/base/maps/s10.map new file mode 100755 index 0000000..b0fe20d Binary files /dev/null and b/wolf3d/base/maps/s10.map differ diff --git a/wolf3d/base/maps/s11.map b/wolf3d/base/maps/s11.map new file mode 100755 index 0000000..5d5eb16 Binary files /dev/null and b/wolf3d/base/maps/s11.map differ diff --git a/wolf3d/base/maps/s12.map b/wolf3d/base/maps/s12.map new file mode 100755 index 0000000..b8e0f05 Binary files /dev/null and b/wolf3d/base/maps/s12.map differ diff --git a/wolf3d/base/maps/s13.map b/wolf3d/base/maps/s13.map new file mode 100755 index 0000000..167b7a6 Binary files /dev/null and b/wolf3d/base/maps/s13.map differ diff --git a/wolf3d/base/maps/s14.map b/wolf3d/base/maps/s14.map new file mode 100755 index 0000000..80bd65f Binary files /dev/null and b/wolf3d/base/maps/s14.map differ diff --git a/wolf3d/base/maps/s15.map b/wolf3d/base/maps/s15.map new file mode 100755 index 0000000..f009f18 Binary files /dev/null and b/wolf3d/base/maps/s15.map differ diff --git a/wolf3d/base/maps/s16.map b/wolf3d/base/maps/s16.map new file mode 100755 index 0000000..3d0943f Binary files /dev/null and b/wolf3d/base/maps/s16.map differ diff --git a/wolf3d/base/maps/s17.map b/wolf3d/base/maps/s17.map new file mode 100755 index 0000000..c482dba Binary files /dev/null and b/wolf3d/base/maps/s17.map differ diff --git a/wolf3d/base/maps/s18.map b/wolf3d/base/maps/s18.map new file mode 100755 index 0000000..07d948f Binary files /dev/null and b/wolf3d/base/maps/s18.map differ diff --git a/wolf3d/base/maps/s19.map b/wolf3d/base/maps/s19.map new file mode 100755 index 0000000..3fd56d3 Binary files /dev/null and b/wolf3d/base/maps/s19.map differ diff --git a/wolf3d/base/maps/s20.map b/wolf3d/base/maps/s20.map new file mode 100755 index 0000000..d8c0ceb Binary files /dev/null and b/wolf3d/base/maps/s20.map differ diff --git a/wolf3d/base/pics/BJCOLLAPSE1PIC.tga b/wolf3d/base/pics/BJCOLLAPSE1PIC.tga new file mode 100755 index 0000000..1e8cbf6 Binary files /dev/null and b/wolf3d/base/pics/BJCOLLAPSE1PIC.tga differ diff --git a/wolf3d/base/pics/BJCOLLAPSE2PIC.tga b/wolf3d/base/pics/BJCOLLAPSE2PIC.tga new file mode 100755 index 0000000..faca868 Binary files /dev/null and b/wolf3d/base/pics/BJCOLLAPSE2PIC.tga differ diff --git a/wolf3d/base/pics/BJCOLLAPSE3PIC.tga b/wolf3d/base/pics/BJCOLLAPSE3PIC.tga new file mode 100755 index 0000000..727121a Binary files /dev/null and b/wolf3d/base/pics/BJCOLLAPSE3PIC.tga differ diff --git a/wolf3d/base/pics/BJCOLLAPSE4PIC.tga b/wolf3d/base/pics/BJCOLLAPSE4PIC.tga new file mode 100755 index 0000000..5d1d7c5 Binary files /dev/null and b/wolf3d/base/pics/BJCOLLAPSE4PIC.tga differ diff --git a/wolf3d/base/pics/BJOUCHPIC.tga b/wolf3d/base/pics/BJOUCHPIC.tga new file mode 100755 index 0000000..eb2adff Binary files /dev/null and b/wolf3d/base/pics/BJOUCHPIC.tga differ diff --git a/wolf3d/base/pics/BJWAITING0PIC.tga b/wolf3d/base/pics/BJWAITING0PIC.tga new file mode 100755 index 0000000..955313a Binary files /dev/null and b/wolf3d/base/pics/BJWAITING0PIC.tga differ diff --git a/wolf3d/base/pics/BJWAITING1PIC.tga b/wolf3d/base/pics/BJWAITING1PIC.tga new file mode 100755 index 0000000..4c31321 Binary files /dev/null and b/wolf3d/base/pics/BJWAITING1PIC.tga differ diff --git a/wolf3d/base/pics/BOSSPIC1PIC.tga b/wolf3d/base/pics/BOSSPIC1PIC.tga new file mode 100755 index 0000000..c48ea22 Binary files /dev/null and b/wolf3d/base/pics/BOSSPIC1PIC.tga differ diff --git a/wolf3d/base/pics/BOSSPIC2PIC.tga b/wolf3d/base/pics/BOSSPIC2PIC.tga new file mode 100755 index 0000000..4ba724e Binary files /dev/null and b/wolf3d/base/pics/BOSSPIC2PIC.tga differ diff --git a/wolf3d/base/pics/BOSSPIC3PIC.tga b/wolf3d/base/pics/BOSSPIC3PIC.tga new file mode 100755 index 0000000..8b6a3d9 Binary files /dev/null and b/wolf3d/base/pics/BOSSPIC3PIC.tga differ diff --git a/wolf3d/base/pics/BOSSPIC4PIC.tga b/wolf3d/base/pics/BOSSPIC4PIC.tga new file mode 100755 index 0000000..e5dbe60 Binary files /dev/null and b/wolf3d/base/pics/BOSSPIC4PIC.tga differ diff --git a/wolf3d/base/pics/COPYPROTBOXPIC.tga b/wolf3d/base/pics/COPYPROTBOXPIC.tga new file mode 100755 index 0000000..990cf82 Binary files /dev/null and b/wolf3d/base/pics/COPYPROTBOXPIC.tga differ diff --git a/wolf3d/base/pics/COPYPROTTOPPIC.tga b/wolf3d/base/pics/COPYPROTTOPPIC.tga new file mode 100755 index 0000000..cbd8fad Binary files /dev/null and b/wolf3d/base/pics/COPYPROTTOPPIC.tga differ diff --git a/wolf3d/base/pics/C_BACKDROPPIC.tga b/wolf3d/base/pics/C_BACKDROPPIC.tga new file mode 100755 index 0000000..d6a1745 Binary files /dev/null and b/wolf3d/base/pics/C_BACKDROPPIC.tga differ diff --git a/wolf3d/base/pics/C_DISKLOADING0PIC.tga b/wolf3d/base/pics/C_DISKLOADING0PIC.tga new file mode 100755 index 0000000..96b3d9f Binary files /dev/null and b/wolf3d/base/pics/C_DISKLOADING0PIC.tga differ diff --git a/wolf3d/base/pics/C_DISKLOADING1PIC.tga b/wolf3d/base/pics/C_DISKLOADING1PIC.tga new file mode 100755 index 0000000..a3a3a45 Binary files /dev/null and b/wolf3d/base/pics/C_DISKLOADING1PIC.tga differ diff --git a/wolf3d/base/pics/C_HOWTOUGHPIC.tga b/wolf3d/base/pics/C_HOWTOUGHPIC.tga new file mode 100755 index 0000000..3932c8d Binary files /dev/null and b/wolf3d/base/pics/C_HOWTOUGHPIC.tga differ diff --git a/wolf3d/base/pics/C_JOY1PIC.tga b/wolf3d/base/pics/C_JOY1PIC.tga new file mode 100755 index 0000000..a8a034e Binary files /dev/null and b/wolf3d/base/pics/C_JOY1PIC.tga differ diff --git a/wolf3d/base/pics/C_JOY2PIC.tga b/wolf3d/base/pics/C_JOY2PIC.tga new file mode 100755 index 0000000..7e1ee9b Binary files /dev/null and b/wolf3d/base/pics/C_JOY2PIC.tga differ diff --git a/wolf3d/base/pics/C_JOYSTICKPIC.tga b/wolf3d/base/pics/C_JOYSTICKPIC.tga new file mode 100755 index 0000000..2a1a34b Binary files /dev/null and b/wolf3d/base/pics/C_JOYSTICKPIC.tga differ diff --git a/wolf3d/base/pics/C_KEYBOARDPIC.tga b/wolf3d/base/pics/C_KEYBOARDPIC.tga new file mode 100755 index 0000000..d9e9067 Binary files /dev/null and b/wolf3d/base/pics/C_KEYBOARDPIC.tga differ diff --git a/wolf3d/base/pics/C_MOUSEPIC.tga b/wolf3d/base/pics/C_MOUSEPIC.tga new file mode 100755 index 0000000..fae4de9 Binary files /dev/null and b/wolf3d/base/pics/C_MOUSEPIC.tga differ diff --git a/wolf3d/base/pics/C_WONSPEARPIC.tga b/wolf3d/base/pics/C_WONSPEARPIC.tga new file mode 100755 index 0000000..f913305 Binary files /dev/null and b/wolf3d/base/pics/C_WONSPEARPIC.tga differ diff --git a/wolf3d/base/pics/ENDPICPIC.tga b/wolf3d/base/pics/ENDPICPIC.tga new file mode 100755 index 0000000..68b7230 Binary files /dev/null and b/wolf3d/base/pics/ENDPICPIC.tga differ diff --git a/wolf3d/base/pics/ENDSCREEN1PIC.tga b/wolf3d/base/pics/ENDSCREEN1PIC.tga new file mode 100755 index 0000000..4b2a96f Binary files /dev/null and b/wolf3d/base/pics/ENDSCREEN1PIC.tga differ diff --git a/wolf3d/base/pics/ENDSCREEN2PIC.tga b/wolf3d/base/pics/ENDSCREEN2PIC.tga new file mode 100755 index 0000000..5b6e884 Binary files /dev/null and b/wolf3d/base/pics/ENDSCREEN2PIC.tga differ diff --git a/wolf3d/base/pics/ENDSCREEN3PIC.tga b/wolf3d/base/pics/ENDSCREEN3PIC.tga new file mode 100755 index 0000000..0e82650 Binary files /dev/null and b/wolf3d/base/pics/ENDSCREEN3PIC.tga differ diff --git a/wolf3d/base/pics/ENDSCREEN4PIC.tga b/wolf3d/base/pics/ENDSCREEN4PIC.tga new file mode 100755 index 0000000..b74de8e Binary files /dev/null and b/wolf3d/base/pics/ENDSCREEN4PIC.tga differ diff --git a/wolf3d/base/pics/ENDSCREEN5PIC.tga b/wolf3d/base/pics/ENDSCREEN5PIC.tga new file mode 100755 index 0000000..0ad1cb4 Binary files /dev/null and b/wolf3d/base/pics/ENDSCREEN5PIC.tga differ diff --git a/wolf3d/base/pics/ENDSCREEN6PIC.tga b/wolf3d/base/pics/ENDSCREEN6PIC.tga new file mode 100755 index 0000000..d0de47d Binary files /dev/null and b/wolf3d/base/pics/ENDSCREEN6PIC.tga differ diff --git a/wolf3d/base/pics/ENDSCREEN7PIC.tga b/wolf3d/base/pics/ENDSCREEN7PIC.tga new file mode 100755 index 0000000..b2f3465 Binary files /dev/null and b/wolf3d/base/pics/ENDSCREEN7PIC.tga differ diff --git a/wolf3d/base/pics/ENDSCREEN8PIC.tga b/wolf3d/base/pics/ENDSCREEN8PIC.tga new file mode 100755 index 0000000..2b2d590 Binary files /dev/null and b/wolf3d/base/pics/ENDSCREEN8PIC.tga differ diff --git a/wolf3d/base/pics/ENDSCREEN9PIC.tga b/wolf3d/base/pics/ENDSCREEN9PIC.tga new file mode 100755 index 0000000..924a6e7 Binary files /dev/null and b/wolf3d/base/pics/ENDSCREEN9PIC.tga differ diff --git a/wolf3d/base/pics/FACE1APIC.tga b/wolf3d/base/pics/FACE1APIC.tga new file mode 100755 index 0000000..f538bb6 Binary files /dev/null and b/wolf3d/base/pics/FACE1APIC.tga differ diff --git a/wolf3d/base/pics/FACE1BPIC.tga b/wolf3d/base/pics/FACE1BPIC.tga new file mode 100755 index 0000000..e5377a8 Binary files /dev/null and b/wolf3d/base/pics/FACE1BPIC.tga differ diff --git a/wolf3d/base/pics/FACE1CPIC.tga b/wolf3d/base/pics/FACE1CPIC.tga new file mode 100755 index 0000000..64f8c6d Binary files /dev/null and b/wolf3d/base/pics/FACE1CPIC.tga differ diff --git a/wolf3d/base/pics/FACE2APIC.tga b/wolf3d/base/pics/FACE2APIC.tga new file mode 100755 index 0000000..ec5e28a Binary files /dev/null and b/wolf3d/base/pics/FACE2APIC.tga differ diff --git a/wolf3d/base/pics/FACE2BPIC.tga b/wolf3d/base/pics/FACE2BPIC.tga new file mode 100755 index 0000000..65165b2 Binary files /dev/null and b/wolf3d/base/pics/FACE2BPIC.tga differ diff --git a/wolf3d/base/pics/FACE2CPIC.tga b/wolf3d/base/pics/FACE2CPIC.tga new file mode 100755 index 0000000..65d279b Binary files /dev/null and b/wolf3d/base/pics/FACE2CPIC.tga differ diff --git a/wolf3d/base/pics/FACE3APIC.tga b/wolf3d/base/pics/FACE3APIC.tga new file mode 100755 index 0000000..f25f00f Binary files /dev/null and b/wolf3d/base/pics/FACE3APIC.tga differ diff --git a/wolf3d/base/pics/FACE3BPIC.tga b/wolf3d/base/pics/FACE3BPIC.tga new file mode 100755 index 0000000..130ebae Binary files /dev/null and b/wolf3d/base/pics/FACE3BPIC.tga differ diff --git a/wolf3d/base/pics/FACE3CPIC.tga b/wolf3d/base/pics/FACE3CPIC.tga new file mode 100755 index 0000000..397f849 Binary files /dev/null and b/wolf3d/base/pics/FACE3CPIC.tga differ diff --git a/wolf3d/base/pics/FACE4APIC.tga b/wolf3d/base/pics/FACE4APIC.tga new file mode 100755 index 0000000..11d7ccb Binary files /dev/null and b/wolf3d/base/pics/FACE4APIC.tga differ diff --git a/wolf3d/base/pics/FACE4BPIC.tga b/wolf3d/base/pics/FACE4BPIC.tga new file mode 100755 index 0000000..d709385 Binary files /dev/null and b/wolf3d/base/pics/FACE4BPIC.tga differ diff --git a/wolf3d/base/pics/FACE4CPIC.tga b/wolf3d/base/pics/FACE4CPIC.tga new file mode 100755 index 0000000..0c3290c Binary files /dev/null and b/wolf3d/base/pics/FACE4CPIC.tga differ diff --git a/wolf3d/base/pics/FACE5APIC.tga b/wolf3d/base/pics/FACE5APIC.tga new file mode 100755 index 0000000..f5cac30 Binary files /dev/null and b/wolf3d/base/pics/FACE5APIC.tga differ diff --git a/wolf3d/base/pics/FACE5BPIC.tga b/wolf3d/base/pics/FACE5BPIC.tga new file mode 100755 index 0000000..293169f Binary files /dev/null and b/wolf3d/base/pics/FACE5BPIC.tga differ diff --git a/wolf3d/base/pics/FACE5CPIC.tga b/wolf3d/base/pics/FACE5CPIC.tga new file mode 100755 index 0000000..b91eead Binary files /dev/null and b/wolf3d/base/pics/FACE5CPIC.tga differ diff --git a/wolf3d/base/pics/FACE6APIC.tga b/wolf3d/base/pics/FACE6APIC.tga new file mode 100755 index 0000000..d77b9cf Binary files /dev/null and b/wolf3d/base/pics/FACE6APIC.tga differ diff --git a/wolf3d/base/pics/FACE6BPIC.tga b/wolf3d/base/pics/FACE6BPIC.tga new file mode 100755 index 0000000..08b1450 Binary files /dev/null and b/wolf3d/base/pics/FACE6BPIC.tga differ diff --git a/wolf3d/base/pics/FACE6CPIC.tga b/wolf3d/base/pics/FACE6CPIC.tga new file mode 100755 index 0000000..90f7b77 Binary files /dev/null and b/wolf3d/base/pics/FACE6CPIC.tga differ diff --git a/wolf3d/base/pics/FACE7APIC.tga b/wolf3d/base/pics/FACE7APIC.tga new file mode 100755 index 0000000..b57e002 Binary files /dev/null and b/wolf3d/base/pics/FACE7APIC.tga differ diff --git a/wolf3d/base/pics/FACE7BPIC.tga b/wolf3d/base/pics/FACE7BPIC.tga new file mode 100755 index 0000000..633be83 Binary files /dev/null and b/wolf3d/base/pics/FACE7BPIC.tga differ diff --git a/wolf3d/base/pics/FACE7CPIC.tga b/wolf3d/base/pics/FACE7CPIC.tga new file mode 100755 index 0000000..19269b6 Binary files /dev/null and b/wolf3d/base/pics/FACE7CPIC.tga differ diff --git a/wolf3d/base/pics/FACE8APIC.tga b/wolf3d/base/pics/FACE8APIC.tga new file mode 100755 index 0000000..0bab737 Binary files /dev/null and b/wolf3d/base/pics/FACE8APIC.tga differ diff --git a/wolf3d/base/pics/GATLINGGUNPIC.tga b/wolf3d/base/pics/GATLINGGUNPIC.tga new file mode 100755 index 0000000..05fb135 Binary files /dev/null and b/wolf3d/base/pics/GATLINGGUNPIC.tga differ diff --git a/wolf3d/base/pics/GODMODEFACE0PIC.tga b/wolf3d/base/pics/GODMODEFACE0PIC.tga new file mode 100755 index 0000000..6fd3051 Binary files /dev/null and b/wolf3d/base/pics/GODMODEFACE0PIC.tga differ diff --git a/wolf3d/base/pics/GODMODEFACE1PIC.tga b/wolf3d/base/pics/GODMODEFACE1PIC.tga new file mode 100755 index 0000000..3e1a639 Binary files /dev/null and b/wolf3d/base/pics/GODMODEFACE1PIC.tga differ diff --git a/wolf3d/base/pics/GODMODEFACE2PIC.tga b/wolf3d/base/pics/GODMODEFACE2PIC.tga new file mode 100755 index 0000000..23e11ec Binary files /dev/null and b/wolf3d/base/pics/GODMODEFACE2PIC.tga differ diff --git a/wolf3d/base/pics/GOLDKEYPIC.tga b/wolf3d/base/pics/GOLDKEYPIC.tga new file mode 100755 index 0000000..c43d175 Binary files /dev/null and b/wolf3d/base/pics/GOLDKEYPIC.tga differ diff --git a/wolf3d/base/pics/GOTGATLINGPIC.tga b/wolf3d/base/pics/GOTGATLINGPIC.tga new file mode 100755 index 0000000..8f95d09 Binary files /dev/null and b/wolf3d/base/pics/GOTGATLINGPIC.tga differ diff --git a/wolf3d/base/pics/GUNPIC.tga b/wolf3d/base/pics/GUNPIC.tga new file mode 100755 index 0000000..405127f Binary files /dev/null and b/wolf3d/base/pics/GUNPIC.tga differ diff --git a/wolf3d/base/pics/IDGUYSPIC.tga b/wolf3d/base/pics/IDGUYSPIC.tga new file mode 100755 index 0000000..5ffc5d2 Binary files /dev/null and b/wolf3d/base/pics/IDGUYSPIC.tga differ diff --git a/wolf3d/base/pics/KNIFEPIC.tga b/wolf3d/base/pics/KNIFEPIC.tga new file mode 100755 index 0000000..bfa57d6 Binary files /dev/null and b/wolf3d/base/pics/KNIFEPIC.tga differ diff --git a/wolf3d/base/pics/L_BJWINSPIC.tga b/wolf3d/base/pics/L_BJWINSPIC.tga new file mode 100755 index 0000000..85ccbbd Binary files /dev/null and b/wolf3d/base/pics/L_BJWINSPIC.tga differ diff --git a/wolf3d/base/pics/L_FONTPIC.tga b/wolf3d/base/pics/L_FONTPIC.tga new file mode 100755 index 0000000..c40ad5e Binary files /dev/null and b/wolf3d/base/pics/L_FONTPIC.tga differ diff --git a/wolf3d/base/pics/L_GUY0PIC.tga b/wolf3d/base/pics/L_GUY0PIC.tga new file mode 100755 index 0000000..0e3b25c Binary files /dev/null and b/wolf3d/base/pics/L_GUY0PIC.tga differ diff --git a/wolf3d/base/pics/L_GUY1PIC.tga b/wolf3d/base/pics/L_GUY1PIC.tga new file mode 100755 index 0000000..d6f6271 Binary files /dev/null and b/wolf3d/base/pics/L_GUY1PIC.tga differ diff --git a/wolf3d/base/pics/MACHINEGUNPIC.tga b/wolf3d/base/pics/MACHINEGUNPIC.tga new file mode 100755 index 0000000..27d92d5 Binary files /dev/null and b/wolf3d/base/pics/MACHINEGUNPIC.tga differ diff --git a/wolf3d/base/pics/N_NUMPIC.tga b/wolf3d/base/pics/N_NUMPIC.tga new file mode 100755 index 0000000..9777307 Binary files /dev/null and b/wolf3d/base/pics/N_NUMPIC.tga differ diff --git a/wolf3d/base/pics/PAUSEDPIC.tga b/wolf3d/base/pics/PAUSEDPIC.tga new file mode 100755 index 0000000..b1e7953 Binary files /dev/null and b/wolf3d/base/pics/PAUSEDPIC.tga differ diff --git a/wolf3d/base/pics/PC13PIC.tga b/wolf3d/base/pics/PC13PIC.tga new file mode 100755 index 0000000..1709539 Binary files /dev/null and b/wolf3d/base/pics/PC13PIC.tga differ diff --git a/wolf3d/base/pics/SCREDITSPIC.tga b/wolf3d/base/pics/SCREDITSPIC.tga new file mode 100755 index 0000000..9a19018 Binary files /dev/null and b/wolf3d/base/pics/SCREDITSPIC.tga differ diff --git a/wolf3d/base/pics/SC_CONTROLPIC.tga b/wolf3d/base/pics/SC_CONTROLPIC.tga new file mode 100755 index 0000000..f069087 Binary files /dev/null and b/wolf3d/base/pics/SC_CONTROLPIC.tga differ diff --git a/wolf3d/base/pics/SC_CURSOR0PIC.tga b/wolf3d/base/pics/SC_CURSOR0PIC.tga new file mode 100755 index 0000000..a69f2c8 Binary files /dev/null and b/wolf3d/base/pics/SC_CURSOR0PIC.tga differ diff --git a/wolf3d/base/pics/SC_CURSOR1PIC.tga b/wolf3d/base/pics/SC_CURSOR1PIC.tga new file mode 100755 index 0000000..c168c48 Binary files /dev/null and b/wolf3d/base/pics/SC_CURSOR1PIC.tga differ diff --git a/wolf3d/base/pics/SC_CUSTOMIZEPIC.tga b/wolf3d/base/pics/SC_CUSTOMIZEPIC.tga new file mode 100755 index 0000000..ee6208a Binary files /dev/null and b/wolf3d/base/pics/SC_CUSTOMIZEPIC.tga differ diff --git a/wolf3d/base/pics/SC_DIGITITLEPIC.tga b/wolf3d/base/pics/SC_DIGITITLEPIC.tga new file mode 100755 index 0000000..16ae32e Binary files /dev/null and b/wolf3d/base/pics/SC_DIGITITLEPIC.tga differ diff --git a/wolf3d/base/pics/SC_FXTITLEPIC.tga b/wolf3d/base/pics/SC_FXTITLEPIC.tga new file mode 100755 index 0000000..f0d3f20 Binary files /dev/null and b/wolf3d/base/pics/SC_FXTITLEPIC.tga differ diff --git a/wolf3d/base/pics/SC_LOADGAMEPIC.tga b/wolf3d/base/pics/SC_LOADGAMEPIC.tga new file mode 100755 index 0000000..f31d63a Binary files /dev/null and b/wolf3d/base/pics/SC_LOADGAMEPIC.tga differ diff --git a/wolf3d/base/pics/SC_MOUSELBACKPIC.tga b/wolf3d/base/pics/SC_MOUSELBACKPIC.tga new file mode 100755 index 0000000..e629b25 Binary files /dev/null and b/wolf3d/base/pics/SC_MOUSELBACKPIC.tga differ diff --git a/wolf3d/base/pics/SC_MUSICTITLEPIC.tga b/wolf3d/base/pics/SC_MUSICTITLEPIC.tga new file mode 100755 index 0000000..cf05bdc Binary files /dev/null and b/wolf3d/base/pics/SC_MUSICTITLEPIC.tga differ diff --git a/wolf3d/base/pics/SC_NOTSELECTEDPIC.tga b/wolf3d/base/pics/SC_NOTSELECTEDPIC.tga new file mode 100755 index 0000000..4a827f2 Binary files /dev/null and b/wolf3d/base/pics/SC_NOTSELECTEDPIC.tga differ diff --git a/wolf3d/base/pics/SC_OPTIONSPIC.tga b/wolf3d/base/pics/SC_OPTIONSPIC.tga new file mode 100755 index 0000000..2b8c62d Binary files /dev/null and b/wolf3d/base/pics/SC_OPTIONSPIC.tga differ diff --git a/wolf3d/base/pics/SC_SAVEGAMEPIC.tga b/wolf3d/base/pics/SC_SAVEGAMEPIC.tga new file mode 100755 index 0000000..048bea1 Binary files /dev/null and b/wolf3d/base/pics/SC_SAVEGAMEPIC.tga differ diff --git a/wolf3d/base/pics/SC_SELECTEDPIC.tga b/wolf3d/base/pics/SC_SELECTEDPIC.tga new file mode 100755 index 0000000..c8b438f Binary files /dev/null and b/wolf3d/base/pics/SC_SELECTEDPIC.tga differ diff --git a/wolf3d/base/pics/SC_SKILL1PIC.tga b/wolf3d/base/pics/SC_SKILL1PIC.tga new file mode 100755 index 0000000..ff97bde Binary files /dev/null and b/wolf3d/base/pics/SC_SKILL1PIC.tga differ diff --git a/wolf3d/base/pics/SC_SKILL2PIC.tga b/wolf3d/base/pics/SC_SKILL2PIC.tga new file mode 100755 index 0000000..761028d Binary files /dev/null and b/wolf3d/base/pics/SC_SKILL2PIC.tga differ diff --git a/wolf3d/base/pics/SC_SKILL3PIC.tga b/wolf3d/base/pics/SC_SKILL3PIC.tga new file mode 100755 index 0000000..585cafb Binary files /dev/null and b/wolf3d/base/pics/SC_SKILL3PIC.tga differ diff --git a/wolf3d/base/pics/SC_SKILL4PIC.tga b/wolf3d/base/pics/SC_SKILL4PIC.tga new file mode 100755 index 0000000..b826b36 Binary files /dev/null and b/wolf3d/base/pics/SC_SKILL4PIC.tga differ diff --git a/wolf3d/base/pics/SHIGHSCORESPIC.tga b/wolf3d/base/pics/SHIGHSCORESPIC.tga new file mode 100755 index 0000000..898f89e Binary files /dev/null and b/wolf3d/base/pics/SHIGHSCORESPIC.tga differ diff --git a/wolf3d/base/pics/SILVERKEYPIC.tga b/wolf3d/base/pics/SILVERKEYPIC.tga new file mode 100755 index 0000000..ab6f39a Binary files /dev/null and b/wolf3d/base/pics/SILVERKEYPIC.tga differ diff --git a/wolf3d/base/pics/STATUSBARPIC.tga b/wolf3d/base/pics/STATUSBARPIC.tga new file mode 100755 index 0000000..b7b8b8f Binary files /dev/null and b/wolf3d/base/pics/STATUSBARPIC.tga differ diff --git a/wolf3d/base/pics/STITLEPIC.tga b/wolf3d/base/pics/STITLEPIC.tga new file mode 100755 index 0000000..1051642 Binary files /dev/null and b/wolf3d/base/pics/STITLEPIC.tga differ diff --git a/wolf3d/base/pics/font1.tga b/wolf3d/base/pics/font1.tga new file mode 100755 index 0000000..411c22f Binary files /dev/null and b/wolf3d/base/pics/font1.tga differ diff --git a/wolf3d/base/pics/font2.tga b/wolf3d/base/pics/font2.tga new file mode 100755 index 0000000..9238862 Binary files /dev/null and b/wolf3d/base/pics/font2.tga differ diff --git a/wolf3d/base/sodsprites/000.tga b/wolf3d/base/sodsprites/000.tga new file mode 100755 index 0000000..787408a Binary files /dev/null and b/wolf3d/base/sodsprites/000.tga differ diff --git a/wolf3d/base/sodsprites/001.tga b/wolf3d/base/sodsprites/001.tga new file mode 100755 index 0000000..0ab6b16 Binary files /dev/null and b/wolf3d/base/sodsprites/001.tga differ diff --git a/wolf3d/base/sodsprites/002.tga b/wolf3d/base/sodsprites/002.tga new file mode 100755 index 0000000..7110f12 Binary files /dev/null and b/wolf3d/base/sodsprites/002.tga differ diff --git a/wolf3d/base/sodsprites/003.tga b/wolf3d/base/sodsprites/003.tga new file mode 100755 index 0000000..f705d45 Binary files /dev/null and b/wolf3d/base/sodsprites/003.tga differ diff --git a/wolf3d/base/sodsprites/004.tga b/wolf3d/base/sodsprites/004.tga new file mode 100755 index 0000000..bbe3062 Binary files /dev/null and b/wolf3d/base/sodsprites/004.tga differ diff --git a/wolf3d/base/sodsprites/005.tga b/wolf3d/base/sodsprites/005.tga new file mode 100755 index 0000000..f4dca12 Binary files /dev/null and b/wolf3d/base/sodsprites/005.tga differ diff --git a/wolf3d/base/sodsprites/006.tga b/wolf3d/base/sodsprites/006.tga new file mode 100755 index 0000000..0f830d9 Binary files /dev/null and b/wolf3d/base/sodsprites/006.tga differ diff --git a/wolf3d/base/sodsprites/007.tga b/wolf3d/base/sodsprites/007.tga new file mode 100755 index 0000000..dc07eed Binary files /dev/null and b/wolf3d/base/sodsprites/007.tga differ diff --git a/wolf3d/base/sodsprites/008.tga b/wolf3d/base/sodsprites/008.tga new file mode 100755 index 0000000..f98be5a Binary files /dev/null and b/wolf3d/base/sodsprites/008.tga differ diff --git a/wolf3d/base/sodsprites/009.tga b/wolf3d/base/sodsprites/009.tga new file mode 100755 index 0000000..c07b626 Binary files /dev/null and b/wolf3d/base/sodsprites/009.tga differ diff --git a/wolf3d/base/sodsprites/010.tga b/wolf3d/base/sodsprites/010.tga new file mode 100755 index 0000000..e52ffd0 Binary files /dev/null and b/wolf3d/base/sodsprites/010.tga differ diff --git a/wolf3d/base/sodsprites/011.tga b/wolf3d/base/sodsprites/011.tga new file mode 100755 index 0000000..8f89f6b Binary files /dev/null and b/wolf3d/base/sodsprites/011.tga differ diff --git a/wolf3d/base/sodsprites/012.tga b/wolf3d/base/sodsprites/012.tga new file mode 100755 index 0000000..54e9e6e Binary files /dev/null and b/wolf3d/base/sodsprites/012.tga differ diff --git a/wolf3d/base/sodsprites/013.tga b/wolf3d/base/sodsprites/013.tga new file mode 100755 index 0000000..843302a Binary files /dev/null and b/wolf3d/base/sodsprites/013.tga differ diff --git a/wolf3d/base/sodsprites/014.tga b/wolf3d/base/sodsprites/014.tga new file mode 100755 index 0000000..c864b47 Binary files /dev/null and b/wolf3d/base/sodsprites/014.tga differ diff --git a/wolf3d/base/sodsprites/015.tga b/wolf3d/base/sodsprites/015.tga new file mode 100755 index 0000000..6f51d7f Binary files /dev/null and b/wolf3d/base/sodsprites/015.tga differ diff --git a/wolf3d/base/sodsprites/016.tga b/wolf3d/base/sodsprites/016.tga new file mode 100755 index 0000000..9453fbd Binary files /dev/null and b/wolf3d/base/sodsprites/016.tga differ diff --git a/wolf3d/base/sodsprites/017.tga b/wolf3d/base/sodsprites/017.tga new file mode 100755 index 0000000..916a7c9 Binary files /dev/null and b/wolf3d/base/sodsprites/017.tga differ diff --git a/wolf3d/base/sodsprites/018.tga b/wolf3d/base/sodsprites/018.tga new file mode 100755 index 0000000..1c5d637 Binary files /dev/null and b/wolf3d/base/sodsprites/018.tga differ diff --git a/wolf3d/base/sodsprites/019.tga b/wolf3d/base/sodsprites/019.tga new file mode 100755 index 0000000..639cdfd Binary files /dev/null and b/wolf3d/base/sodsprites/019.tga differ diff --git a/wolf3d/base/sodsprites/020.tga b/wolf3d/base/sodsprites/020.tga new file mode 100755 index 0000000..579b854 Binary files /dev/null and b/wolf3d/base/sodsprites/020.tga differ diff --git a/wolf3d/base/sodsprites/021.tga b/wolf3d/base/sodsprites/021.tga new file mode 100755 index 0000000..9dcd2f2 Binary files /dev/null and b/wolf3d/base/sodsprites/021.tga differ diff --git a/wolf3d/base/sodsprites/022.tga b/wolf3d/base/sodsprites/022.tga new file mode 100755 index 0000000..f32bfa8 Binary files /dev/null and b/wolf3d/base/sodsprites/022.tga differ diff --git a/wolf3d/base/sodsprites/023.tga b/wolf3d/base/sodsprites/023.tga new file mode 100755 index 0000000..39c70dd Binary files /dev/null and b/wolf3d/base/sodsprites/023.tga differ diff --git a/wolf3d/base/sodsprites/024.tga b/wolf3d/base/sodsprites/024.tga new file mode 100755 index 0000000..213085f Binary files /dev/null and b/wolf3d/base/sodsprites/024.tga differ diff --git a/wolf3d/base/sodsprites/025.tga b/wolf3d/base/sodsprites/025.tga new file mode 100755 index 0000000..ecfce2b Binary files /dev/null and b/wolf3d/base/sodsprites/025.tga differ diff --git a/wolf3d/base/sodsprites/026.tga b/wolf3d/base/sodsprites/026.tga new file mode 100755 index 0000000..7bc4004 Binary files /dev/null and b/wolf3d/base/sodsprites/026.tga differ diff --git a/wolf3d/base/sodsprites/027.tga b/wolf3d/base/sodsprites/027.tga new file mode 100755 index 0000000..7971885 Binary files /dev/null and b/wolf3d/base/sodsprites/027.tga differ diff --git a/wolf3d/base/sodsprites/028.tga b/wolf3d/base/sodsprites/028.tga new file mode 100755 index 0000000..7a0b784 Binary files /dev/null and b/wolf3d/base/sodsprites/028.tga differ diff --git a/wolf3d/base/sodsprites/029.tga b/wolf3d/base/sodsprites/029.tga new file mode 100755 index 0000000..4f71684 Binary files /dev/null and b/wolf3d/base/sodsprites/029.tga differ diff --git a/wolf3d/base/sodsprites/030.tga b/wolf3d/base/sodsprites/030.tga new file mode 100755 index 0000000..19abf38 Binary files /dev/null and b/wolf3d/base/sodsprites/030.tga differ diff --git a/wolf3d/base/sodsprites/031.tga b/wolf3d/base/sodsprites/031.tga new file mode 100755 index 0000000..b9a4140 Binary files /dev/null and b/wolf3d/base/sodsprites/031.tga differ diff --git a/wolf3d/base/sodsprites/032.tga b/wolf3d/base/sodsprites/032.tga new file mode 100755 index 0000000..32813a7 Binary files /dev/null and b/wolf3d/base/sodsprites/032.tga differ diff --git a/wolf3d/base/sodsprites/033.tga b/wolf3d/base/sodsprites/033.tga new file mode 100755 index 0000000..240db98 Binary files /dev/null and b/wolf3d/base/sodsprites/033.tga differ diff --git a/wolf3d/base/sodsprites/034.tga b/wolf3d/base/sodsprites/034.tga new file mode 100755 index 0000000..8498023 Binary files /dev/null and b/wolf3d/base/sodsprites/034.tga differ diff --git a/wolf3d/base/sodsprites/035.tga b/wolf3d/base/sodsprites/035.tga new file mode 100755 index 0000000..f750019 Binary files /dev/null and b/wolf3d/base/sodsprites/035.tga differ diff --git a/wolf3d/base/sodsprites/036.tga b/wolf3d/base/sodsprites/036.tga new file mode 100755 index 0000000..d285be7 Binary files /dev/null and b/wolf3d/base/sodsprites/036.tga differ diff --git a/wolf3d/base/sodsprites/037.tga b/wolf3d/base/sodsprites/037.tga new file mode 100755 index 0000000..5aadeb6 Binary files /dev/null and b/wolf3d/base/sodsprites/037.tga differ diff --git a/wolf3d/base/sodsprites/038.tga b/wolf3d/base/sodsprites/038.tga new file mode 100755 index 0000000..fd9d66d Binary files /dev/null and b/wolf3d/base/sodsprites/038.tga differ diff --git a/wolf3d/base/sodsprites/039.tga b/wolf3d/base/sodsprites/039.tga new file mode 100755 index 0000000..caaae49 Binary files /dev/null and b/wolf3d/base/sodsprites/039.tga differ diff --git a/wolf3d/base/sodsprites/040.tga b/wolf3d/base/sodsprites/040.tga new file mode 100755 index 0000000..c84d7f0 Binary files /dev/null and b/wolf3d/base/sodsprites/040.tga differ diff --git a/wolf3d/base/sodsprites/041.tga b/wolf3d/base/sodsprites/041.tga new file mode 100755 index 0000000..00f5393 Binary files /dev/null and b/wolf3d/base/sodsprites/041.tga differ diff --git a/wolf3d/base/sodsprites/042.tga b/wolf3d/base/sodsprites/042.tga new file mode 100755 index 0000000..48922b8 Binary files /dev/null and b/wolf3d/base/sodsprites/042.tga differ diff --git a/wolf3d/base/sodsprites/043.tga b/wolf3d/base/sodsprites/043.tga new file mode 100755 index 0000000..28bb481 Binary files /dev/null and b/wolf3d/base/sodsprites/043.tga differ diff --git a/wolf3d/base/sodsprites/044.tga b/wolf3d/base/sodsprites/044.tga new file mode 100755 index 0000000..68527bf Binary files /dev/null and b/wolf3d/base/sodsprites/044.tga differ diff --git a/wolf3d/base/sodsprites/045.tga b/wolf3d/base/sodsprites/045.tga new file mode 100755 index 0000000..4a1fb23 Binary files /dev/null and b/wolf3d/base/sodsprites/045.tga differ diff --git a/wolf3d/base/sodsprites/046.tga b/wolf3d/base/sodsprites/046.tga new file mode 100755 index 0000000..1a2aa97 Binary files /dev/null and b/wolf3d/base/sodsprites/046.tga differ diff --git a/wolf3d/base/sodsprites/047.tga b/wolf3d/base/sodsprites/047.tga new file mode 100755 index 0000000..dc6dba0 Binary files /dev/null and b/wolf3d/base/sodsprites/047.tga differ diff --git a/wolf3d/base/sodsprites/048.tga b/wolf3d/base/sodsprites/048.tga new file mode 100755 index 0000000..bef5188 Binary files /dev/null and b/wolf3d/base/sodsprites/048.tga differ diff --git a/wolf3d/base/sodsprites/049.tga b/wolf3d/base/sodsprites/049.tga new file mode 100755 index 0000000..ec2173b Binary files /dev/null and b/wolf3d/base/sodsprites/049.tga differ diff --git a/wolf3d/base/sodsprites/050.tga b/wolf3d/base/sodsprites/050.tga new file mode 100755 index 0000000..a4b29ce Binary files /dev/null and b/wolf3d/base/sodsprites/050.tga differ diff --git a/wolf3d/base/sodsprites/051.tga b/wolf3d/base/sodsprites/051.tga new file mode 100755 index 0000000..9e6abfe Binary files /dev/null and b/wolf3d/base/sodsprites/051.tga differ diff --git a/wolf3d/base/sodsprites/052.tga b/wolf3d/base/sodsprites/052.tga new file mode 100755 index 0000000..a9b42ec Binary files /dev/null and b/wolf3d/base/sodsprites/052.tga differ diff --git a/wolf3d/base/sodsprites/053.tga b/wolf3d/base/sodsprites/053.tga new file mode 100755 index 0000000..b1da1d9 Binary files /dev/null and b/wolf3d/base/sodsprites/053.tga differ diff --git a/wolf3d/base/sodsprites/054.tga b/wolf3d/base/sodsprites/054.tga new file mode 100755 index 0000000..35b0698 Binary files /dev/null and b/wolf3d/base/sodsprites/054.tga differ diff --git a/wolf3d/base/sodsprites/055.tga b/wolf3d/base/sodsprites/055.tga new file mode 100755 index 0000000..6fc558b Binary files /dev/null and b/wolf3d/base/sodsprites/055.tga differ diff --git a/wolf3d/base/sodsprites/056.tga b/wolf3d/base/sodsprites/056.tga new file mode 100755 index 0000000..93ab4b8 Binary files /dev/null and b/wolf3d/base/sodsprites/056.tga differ diff --git a/wolf3d/base/sodsprites/057.tga b/wolf3d/base/sodsprites/057.tga new file mode 100755 index 0000000..1ae3be5 Binary files /dev/null and b/wolf3d/base/sodsprites/057.tga differ diff --git a/wolf3d/base/sodsprites/058.tga b/wolf3d/base/sodsprites/058.tga new file mode 100755 index 0000000..c10e976 Binary files /dev/null and b/wolf3d/base/sodsprites/058.tga differ diff --git a/wolf3d/base/sodsprites/059.tga b/wolf3d/base/sodsprites/059.tga new file mode 100755 index 0000000..eaa8f0b Binary files /dev/null and b/wolf3d/base/sodsprites/059.tga differ diff --git a/wolf3d/base/sodsprites/060.tga b/wolf3d/base/sodsprites/060.tga new file mode 100755 index 0000000..9801a01 Binary files /dev/null and b/wolf3d/base/sodsprites/060.tga differ diff --git a/wolf3d/base/sodsprites/061.tga b/wolf3d/base/sodsprites/061.tga new file mode 100755 index 0000000..4a23344 Binary files /dev/null and b/wolf3d/base/sodsprites/061.tga differ diff --git a/wolf3d/base/sodsprites/062.tga b/wolf3d/base/sodsprites/062.tga new file mode 100755 index 0000000..0db096a Binary files /dev/null and b/wolf3d/base/sodsprites/062.tga differ diff --git a/wolf3d/base/sodsprites/063.tga b/wolf3d/base/sodsprites/063.tga new file mode 100755 index 0000000..5e50f9e Binary files /dev/null and b/wolf3d/base/sodsprites/063.tga differ diff --git a/wolf3d/base/sodsprites/064.tga b/wolf3d/base/sodsprites/064.tga new file mode 100755 index 0000000..b61e9f4 Binary files /dev/null and b/wolf3d/base/sodsprites/064.tga differ diff --git a/wolf3d/base/sodsprites/065.tga b/wolf3d/base/sodsprites/065.tga new file mode 100755 index 0000000..a780f8c Binary files /dev/null and b/wolf3d/base/sodsprites/065.tga differ diff --git a/wolf3d/base/sodsprites/066.tga b/wolf3d/base/sodsprites/066.tga new file mode 100755 index 0000000..3f5806d Binary files /dev/null and b/wolf3d/base/sodsprites/066.tga differ diff --git a/wolf3d/base/sodsprites/067.tga b/wolf3d/base/sodsprites/067.tga new file mode 100755 index 0000000..f603061 Binary files /dev/null and b/wolf3d/base/sodsprites/067.tga differ diff --git a/wolf3d/base/sodsprites/068.tga b/wolf3d/base/sodsprites/068.tga new file mode 100755 index 0000000..cddef96 Binary files /dev/null and b/wolf3d/base/sodsprites/068.tga differ diff --git a/wolf3d/base/sodsprites/069.tga b/wolf3d/base/sodsprites/069.tga new file mode 100755 index 0000000..6dc67eb Binary files /dev/null and b/wolf3d/base/sodsprites/069.tga differ diff --git a/wolf3d/base/sodsprites/070.tga b/wolf3d/base/sodsprites/070.tga new file mode 100755 index 0000000..9523a4c Binary files /dev/null and b/wolf3d/base/sodsprites/070.tga differ diff --git a/wolf3d/base/sodsprites/071.tga b/wolf3d/base/sodsprites/071.tga new file mode 100755 index 0000000..bff42ff Binary files /dev/null and b/wolf3d/base/sodsprites/071.tga differ diff --git a/wolf3d/base/sodsprites/072.tga b/wolf3d/base/sodsprites/072.tga new file mode 100755 index 0000000..4dc7b97 Binary files /dev/null and b/wolf3d/base/sodsprites/072.tga differ diff --git a/wolf3d/base/sodsprites/073.tga b/wolf3d/base/sodsprites/073.tga new file mode 100755 index 0000000..8701c50 Binary files /dev/null and b/wolf3d/base/sodsprites/073.tga differ diff --git a/wolf3d/base/sodsprites/074.tga b/wolf3d/base/sodsprites/074.tga new file mode 100755 index 0000000..4498e6f Binary files /dev/null and b/wolf3d/base/sodsprites/074.tga differ diff --git a/wolf3d/base/sodsprites/075.tga b/wolf3d/base/sodsprites/075.tga new file mode 100755 index 0000000..a6a257e Binary files /dev/null and b/wolf3d/base/sodsprites/075.tga differ diff --git a/wolf3d/base/sodsprites/076.tga b/wolf3d/base/sodsprites/076.tga new file mode 100755 index 0000000..ee01aa4 Binary files /dev/null and b/wolf3d/base/sodsprites/076.tga differ diff --git a/wolf3d/base/sodsprites/077.tga b/wolf3d/base/sodsprites/077.tga new file mode 100755 index 0000000..d90fd93 Binary files /dev/null and b/wolf3d/base/sodsprites/077.tga differ diff --git a/wolf3d/base/sodsprites/078.tga b/wolf3d/base/sodsprites/078.tga new file mode 100755 index 0000000..29e1012 Binary files /dev/null and b/wolf3d/base/sodsprites/078.tga differ diff --git a/wolf3d/base/sodsprites/079.tga b/wolf3d/base/sodsprites/079.tga new file mode 100755 index 0000000..35047b8 Binary files /dev/null and b/wolf3d/base/sodsprites/079.tga differ diff --git a/wolf3d/base/sodsprites/080.tga b/wolf3d/base/sodsprites/080.tga new file mode 100755 index 0000000..77d1b40 Binary files /dev/null and b/wolf3d/base/sodsprites/080.tga differ diff --git a/wolf3d/base/sodsprites/081.tga b/wolf3d/base/sodsprites/081.tga new file mode 100755 index 0000000..ccb5d86 Binary files /dev/null and b/wolf3d/base/sodsprites/081.tga differ diff --git a/wolf3d/base/sodsprites/082.tga b/wolf3d/base/sodsprites/082.tga new file mode 100755 index 0000000..7dd70f4 Binary files /dev/null and b/wolf3d/base/sodsprites/082.tga differ diff --git a/wolf3d/base/sodsprites/083.tga b/wolf3d/base/sodsprites/083.tga new file mode 100755 index 0000000..0ff374f Binary files /dev/null and b/wolf3d/base/sodsprites/083.tga differ diff --git a/wolf3d/base/sodsprites/084.tga b/wolf3d/base/sodsprites/084.tga new file mode 100755 index 0000000..c9bbb7c Binary files /dev/null and b/wolf3d/base/sodsprites/084.tga differ diff --git a/wolf3d/base/sodsprites/085.tga b/wolf3d/base/sodsprites/085.tga new file mode 100755 index 0000000..e94a135 Binary files /dev/null and b/wolf3d/base/sodsprites/085.tga differ diff --git a/wolf3d/base/sodsprites/086.tga b/wolf3d/base/sodsprites/086.tga new file mode 100755 index 0000000..60e668f Binary files /dev/null and b/wolf3d/base/sodsprites/086.tga differ diff --git a/wolf3d/base/sodsprites/087.tga b/wolf3d/base/sodsprites/087.tga new file mode 100755 index 0000000..b232b30 Binary files /dev/null and b/wolf3d/base/sodsprites/087.tga differ diff --git a/wolf3d/base/sodsprites/088.tga b/wolf3d/base/sodsprites/088.tga new file mode 100755 index 0000000..c412983 Binary files /dev/null and b/wolf3d/base/sodsprites/088.tga differ diff --git a/wolf3d/base/sodsprites/089.tga b/wolf3d/base/sodsprites/089.tga new file mode 100755 index 0000000..f98e918 Binary files /dev/null and b/wolf3d/base/sodsprites/089.tga differ diff --git a/wolf3d/base/sodsprites/090.tga b/wolf3d/base/sodsprites/090.tga new file mode 100755 index 0000000..3a28114 Binary files /dev/null and b/wolf3d/base/sodsprites/090.tga differ diff --git a/wolf3d/base/sodsprites/091.tga b/wolf3d/base/sodsprites/091.tga new file mode 100755 index 0000000..c1a4b05 Binary files /dev/null and b/wolf3d/base/sodsprites/091.tga differ diff --git a/wolf3d/base/sodsprites/092.tga b/wolf3d/base/sodsprites/092.tga new file mode 100755 index 0000000..cd05487 Binary files /dev/null and b/wolf3d/base/sodsprites/092.tga differ diff --git a/wolf3d/base/sodsprites/093.tga b/wolf3d/base/sodsprites/093.tga new file mode 100755 index 0000000..327c661 Binary files /dev/null and b/wolf3d/base/sodsprites/093.tga differ diff --git a/wolf3d/base/sodsprites/094.tga b/wolf3d/base/sodsprites/094.tga new file mode 100755 index 0000000..918703b Binary files /dev/null and b/wolf3d/base/sodsprites/094.tga differ diff --git a/wolf3d/base/sodsprites/095.tga b/wolf3d/base/sodsprites/095.tga new file mode 100755 index 0000000..ac5d80f Binary files /dev/null and b/wolf3d/base/sodsprites/095.tga differ diff --git a/wolf3d/base/sodsprites/096.tga b/wolf3d/base/sodsprites/096.tga new file mode 100755 index 0000000..bc9e7e3 Binary files /dev/null and b/wolf3d/base/sodsprites/096.tga differ diff --git a/wolf3d/base/sodsprites/097.tga b/wolf3d/base/sodsprites/097.tga new file mode 100755 index 0000000..ef027b6 Binary files /dev/null and b/wolf3d/base/sodsprites/097.tga differ diff --git a/wolf3d/base/sodsprites/098.tga b/wolf3d/base/sodsprites/098.tga new file mode 100755 index 0000000..4ac1215 Binary files /dev/null and b/wolf3d/base/sodsprites/098.tga differ diff --git a/wolf3d/base/sodsprites/099.tga b/wolf3d/base/sodsprites/099.tga new file mode 100755 index 0000000..8fc914d Binary files /dev/null and b/wolf3d/base/sodsprites/099.tga differ diff --git a/wolf3d/base/sodsprites/100.tga b/wolf3d/base/sodsprites/100.tga new file mode 100755 index 0000000..9591148 Binary files /dev/null and b/wolf3d/base/sodsprites/100.tga differ diff --git a/wolf3d/base/sodsprites/101.tga b/wolf3d/base/sodsprites/101.tga new file mode 100755 index 0000000..c80eba4 Binary files /dev/null and b/wolf3d/base/sodsprites/101.tga differ diff --git a/wolf3d/base/sodsprites/102.tga b/wolf3d/base/sodsprites/102.tga new file mode 100755 index 0000000..c2bc89b Binary files /dev/null and b/wolf3d/base/sodsprites/102.tga differ diff --git a/wolf3d/base/sodsprites/103.tga b/wolf3d/base/sodsprites/103.tga new file mode 100755 index 0000000..1a73730 Binary files /dev/null and b/wolf3d/base/sodsprites/103.tga differ diff --git a/wolf3d/base/sodsprites/104.tga b/wolf3d/base/sodsprites/104.tga new file mode 100755 index 0000000..5aea74e Binary files /dev/null and b/wolf3d/base/sodsprites/104.tga differ diff --git a/wolf3d/base/sodsprites/105.tga b/wolf3d/base/sodsprites/105.tga new file mode 100755 index 0000000..21c932b Binary files /dev/null and b/wolf3d/base/sodsprites/105.tga differ diff --git a/wolf3d/base/sodsprites/106.tga b/wolf3d/base/sodsprites/106.tga new file mode 100755 index 0000000..3ff5a9f Binary files /dev/null and b/wolf3d/base/sodsprites/106.tga differ diff --git a/wolf3d/base/sodsprites/107.tga b/wolf3d/base/sodsprites/107.tga new file mode 100755 index 0000000..cb61fe3 Binary files /dev/null and b/wolf3d/base/sodsprites/107.tga differ diff --git a/wolf3d/base/sodsprites/108.tga b/wolf3d/base/sodsprites/108.tga new file mode 100755 index 0000000..66f53d3 Binary files /dev/null and b/wolf3d/base/sodsprites/108.tga differ diff --git a/wolf3d/base/sodsprites/109.tga b/wolf3d/base/sodsprites/109.tga new file mode 100755 index 0000000..e10126e Binary files /dev/null and b/wolf3d/base/sodsprites/109.tga differ diff --git a/wolf3d/base/sodsprites/110.tga b/wolf3d/base/sodsprites/110.tga new file mode 100755 index 0000000..120c1c2 Binary files /dev/null and b/wolf3d/base/sodsprites/110.tga differ diff --git a/wolf3d/base/sodsprites/111.tga b/wolf3d/base/sodsprites/111.tga new file mode 100755 index 0000000..6ecf608 Binary files /dev/null and b/wolf3d/base/sodsprites/111.tga differ diff --git a/wolf3d/base/sodsprites/112.tga b/wolf3d/base/sodsprites/112.tga new file mode 100755 index 0000000..5c55e4c Binary files /dev/null and b/wolf3d/base/sodsprites/112.tga differ diff --git a/wolf3d/base/sodsprites/113.tga b/wolf3d/base/sodsprites/113.tga new file mode 100755 index 0000000..b9a8e40 Binary files /dev/null and b/wolf3d/base/sodsprites/113.tga differ diff --git a/wolf3d/base/sodsprites/114.tga b/wolf3d/base/sodsprites/114.tga new file mode 100755 index 0000000..7b9218e Binary files /dev/null and b/wolf3d/base/sodsprites/114.tga differ diff --git a/wolf3d/base/sodsprites/115.tga b/wolf3d/base/sodsprites/115.tga new file mode 100755 index 0000000..fbdb4af Binary files /dev/null and b/wolf3d/base/sodsprites/115.tga differ diff --git a/wolf3d/base/sodsprites/116.tga b/wolf3d/base/sodsprites/116.tga new file mode 100755 index 0000000..452cb36 Binary files /dev/null and b/wolf3d/base/sodsprites/116.tga differ diff --git a/wolf3d/base/sodsprites/117.tga b/wolf3d/base/sodsprites/117.tga new file mode 100755 index 0000000..8f359a8 Binary files /dev/null and b/wolf3d/base/sodsprites/117.tga differ diff --git a/wolf3d/base/sodsprites/118.tga b/wolf3d/base/sodsprites/118.tga new file mode 100755 index 0000000..248e58c Binary files /dev/null and b/wolf3d/base/sodsprites/118.tga differ diff --git a/wolf3d/base/sodsprites/119.tga b/wolf3d/base/sodsprites/119.tga new file mode 100755 index 0000000..e52f626 Binary files /dev/null and b/wolf3d/base/sodsprites/119.tga differ diff --git a/wolf3d/base/sodsprites/120.tga b/wolf3d/base/sodsprites/120.tga new file mode 100755 index 0000000..ede09ca Binary files /dev/null and b/wolf3d/base/sodsprites/120.tga differ diff --git a/wolf3d/base/sodsprites/121.tga b/wolf3d/base/sodsprites/121.tga new file mode 100755 index 0000000..024bee3 Binary files /dev/null and b/wolf3d/base/sodsprites/121.tga differ diff --git a/wolf3d/base/sodsprites/122.tga b/wolf3d/base/sodsprites/122.tga new file mode 100755 index 0000000..171251e Binary files /dev/null and b/wolf3d/base/sodsprites/122.tga differ diff --git a/wolf3d/base/sodsprites/123.tga b/wolf3d/base/sodsprites/123.tga new file mode 100755 index 0000000..76bd592 Binary files /dev/null and b/wolf3d/base/sodsprites/123.tga differ diff --git a/wolf3d/base/sodsprites/124.tga b/wolf3d/base/sodsprites/124.tga new file mode 100755 index 0000000..8b98906 Binary files /dev/null and b/wolf3d/base/sodsprites/124.tga differ diff --git a/wolf3d/base/sodsprites/125.tga b/wolf3d/base/sodsprites/125.tga new file mode 100755 index 0000000..7e41657 Binary files /dev/null and b/wolf3d/base/sodsprites/125.tga differ diff --git a/wolf3d/base/sodsprites/126.tga b/wolf3d/base/sodsprites/126.tga new file mode 100755 index 0000000..da317b5 Binary files /dev/null and b/wolf3d/base/sodsprites/126.tga differ diff --git a/wolf3d/base/sodsprites/127.tga b/wolf3d/base/sodsprites/127.tga new file mode 100755 index 0000000..38458f9 Binary files /dev/null and b/wolf3d/base/sodsprites/127.tga differ diff --git a/wolf3d/base/sodsprites/128.tga b/wolf3d/base/sodsprites/128.tga new file mode 100755 index 0000000..e9de30e Binary files /dev/null and b/wolf3d/base/sodsprites/128.tga differ diff --git a/wolf3d/base/sodsprites/129.tga b/wolf3d/base/sodsprites/129.tga new file mode 100755 index 0000000..15b0ab1 Binary files /dev/null and b/wolf3d/base/sodsprites/129.tga differ diff --git a/wolf3d/base/sodsprites/130.tga b/wolf3d/base/sodsprites/130.tga new file mode 100755 index 0000000..0f6c80e Binary files /dev/null and b/wolf3d/base/sodsprites/130.tga differ diff --git a/wolf3d/base/sodsprites/131.tga b/wolf3d/base/sodsprites/131.tga new file mode 100755 index 0000000..a973c67 Binary files /dev/null and b/wolf3d/base/sodsprites/131.tga differ diff --git a/wolf3d/base/sodsprites/132.tga b/wolf3d/base/sodsprites/132.tga new file mode 100755 index 0000000..77448f6 Binary files /dev/null and b/wolf3d/base/sodsprites/132.tga differ diff --git a/wolf3d/base/sodsprites/133.tga b/wolf3d/base/sodsprites/133.tga new file mode 100755 index 0000000..ab97c28 Binary files /dev/null and b/wolf3d/base/sodsprites/133.tga differ diff --git a/wolf3d/base/sodsprites/134.tga b/wolf3d/base/sodsprites/134.tga new file mode 100755 index 0000000..1024631 Binary files /dev/null and b/wolf3d/base/sodsprites/134.tga differ diff --git a/wolf3d/base/sodsprites/135.tga b/wolf3d/base/sodsprites/135.tga new file mode 100755 index 0000000..b494abd Binary files /dev/null and b/wolf3d/base/sodsprites/135.tga differ diff --git a/wolf3d/base/sodsprites/136.tga b/wolf3d/base/sodsprites/136.tga new file mode 100755 index 0000000..604f028 Binary files /dev/null and b/wolf3d/base/sodsprites/136.tga differ diff --git a/wolf3d/base/sodsprites/137.tga b/wolf3d/base/sodsprites/137.tga new file mode 100755 index 0000000..d2be9cc Binary files /dev/null and b/wolf3d/base/sodsprites/137.tga differ diff --git a/wolf3d/base/sodsprites/138.tga b/wolf3d/base/sodsprites/138.tga new file mode 100755 index 0000000..6507422 Binary files /dev/null and b/wolf3d/base/sodsprites/138.tga differ diff --git a/wolf3d/base/sodsprites/139.tga b/wolf3d/base/sodsprites/139.tga new file mode 100755 index 0000000..b2b0ce7 Binary files /dev/null and b/wolf3d/base/sodsprites/139.tga differ diff --git a/wolf3d/base/sodsprites/140.tga b/wolf3d/base/sodsprites/140.tga new file mode 100755 index 0000000..8b0be4e Binary files /dev/null and b/wolf3d/base/sodsprites/140.tga differ diff --git a/wolf3d/base/sodsprites/141.tga b/wolf3d/base/sodsprites/141.tga new file mode 100755 index 0000000..cf784f6 Binary files /dev/null and b/wolf3d/base/sodsprites/141.tga differ diff --git a/wolf3d/base/sodsprites/142.tga b/wolf3d/base/sodsprites/142.tga new file mode 100755 index 0000000..233aef0 Binary files /dev/null and b/wolf3d/base/sodsprites/142.tga differ diff --git a/wolf3d/base/sodsprites/143.tga b/wolf3d/base/sodsprites/143.tga new file mode 100755 index 0000000..84a4c73 Binary files /dev/null and b/wolf3d/base/sodsprites/143.tga differ diff --git a/wolf3d/base/sodsprites/144.tga b/wolf3d/base/sodsprites/144.tga new file mode 100755 index 0000000..4e016b4 Binary files /dev/null and b/wolf3d/base/sodsprites/144.tga differ diff --git a/wolf3d/base/sodsprites/145.tga b/wolf3d/base/sodsprites/145.tga new file mode 100755 index 0000000..2050627 Binary files /dev/null and b/wolf3d/base/sodsprites/145.tga differ diff --git a/wolf3d/base/sodsprites/146.tga b/wolf3d/base/sodsprites/146.tga new file mode 100755 index 0000000..377b99f Binary files /dev/null and b/wolf3d/base/sodsprites/146.tga differ diff --git a/wolf3d/base/sodsprites/147.tga b/wolf3d/base/sodsprites/147.tga new file mode 100755 index 0000000..9940a2f Binary files /dev/null and b/wolf3d/base/sodsprites/147.tga differ diff --git a/wolf3d/base/sodsprites/148.tga b/wolf3d/base/sodsprites/148.tga new file mode 100755 index 0000000..eb33a4c Binary files /dev/null and b/wolf3d/base/sodsprites/148.tga differ diff --git a/wolf3d/base/sodsprites/149.tga b/wolf3d/base/sodsprites/149.tga new file mode 100755 index 0000000..ccfb180 Binary files /dev/null and b/wolf3d/base/sodsprites/149.tga differ diff --git a/wolf3d/base/sodsprites/150.tga b/wolf3d/base/sodsprites/150.tga new file mode 100755 index 0000000..fb32929 Binary files /dev/null and b/wolf3d/base/sodsprites/150.tga differ diff --git a/wolf3d/base/sodsprites/151.tga b/wolf3d/base/sodsprites/151.tga new file mode 100755 index 0000000..c2c5bb6 Binary files /dev/null and b/wolf3d/base/sodsprites/151.tga differ diff --git a/wolf3d/base/sodsprites/152.tga b/wolf3d/base/sodsprites/152.tga new file mode 100755 index 0000000..43168d6 Binary files /dev/null and b/wolf3d/base/sodsprites/152.tga differ diff --git a/wolf3d/base/sodsprites/153.tga b/wolf3d/base/sodsprites/153.tga new file mode 100755 index 0000000..853aa20 Binary files /dev/null and b/wolf3d/base/sodsprites/153.tga differ diff --git a/wolf3d/base/sodsprites/154.tga b/wolf3d/base/sodsprites/154.tga new file mode 100755 index 0000000..e075fa8 Binary files /dev/null and b/wolf3d/base/sodsprites/154.tga differ diff --git a/wolf3d/base/sodsprites/155.tga b/wolf3d/base/sodsprites/155.tga new file mode 100755 index 0000000..c18c5f3 Binary files /dev/null and b/wolf3d/base/sodsprites/155.tga differ diff --git a/wolf3d/base/sodsprites/156.tga b/wolf3d/base/sodsprites/156.tga new file mode 100755 index 0000000..eb0d181 Binary files /dev/null and b/wolf3d/base/sodsprites/156.tga differ diff --git a/wolf3d/base/sodsprites/157.tga b/wolf3d/base/sodsprites/157.tga new file mode 100755 index 0000000..2ab50ee Binary files /dev/null and b/wolf3d/base/sodsprites/157.tga differ diff --git a/wolf3d/base/sodsprites/158.tga b/wolf3d/base/sodsprites/158.tga new file mode 100755 index 0000000..3ff97f8 Binary files /dev/null and b/wolf3d/base/sodsprites/158.tga differ diff --git a/wolf3d/base/sodsprites/159.tga b/wolf3d/base/sodsprites/159.tga new file mode 100755 index 0000000..8d125fe Binary files /dev/null and b/wolf3d/base/sodsprites/159.tga differ diff --git a/wolf3d/base/sodsprites/160.tga b/wolf3d/base/sodsprites/160.tga new file mode 100755 index 0000000..28ec54e Binary files /dev/null and b/wolf3d/base/sodsprites/160.tga differ diff --git a/wolf3d/base/sodsprites/161.tga b/wolf3d/base/sodsprites/161.tga new file mode 100755 index 0000000..2582058 Binary files /dev/null and b/wolf3d/base/sodsprites/161.tga differ diff --git a/wolf3d/base/sodsprites/162.tga b/wolf3d/base/sodsprites/162.tga new file mode 100755 index 0000000..e9d5037 Binary files /dev/null and b/wolf3d/base/sodsprites/162.tga differ diff --git a/wolf3d/base/sodsprites/163.tga b/wolf3d/base/sodsprites/163.tga new file mode 100755 index 0000000..46da00e Binary files /dev/null and b/wolf3d/base/sodsprites/163.tga differ diff --git a/wolf3d/base/sodsprites/164.tga b/wolf3d/base/sodsprites/164.tga new file mode 100755 index 0000000..ab79590 Binary files /dev/null and b/wolf3d/base/sodsprites/164.tga differ diff --git a/wolf3d/base/sodsprites/165.tga b/wolf3d/base/sodsprites/165.tga new file mode 100755 index 0000000..c201a2e Binary files /dev/null and b/wolf3d/base/sodsprites/165.tga differ diff --git a/wolf3d/base/sodsprites/166.tga b/wolf3d/base/sodsprites/166.tga new file mode 100755 index 0000000..8c72287 Binary files /dev/null and b/wolf3d/base/sodsprites/166.tga differ diff --git a/wolf3d/base/sodsprites/167.tga b/wolf3d/base/sodsprites/167.tga new file mode 100755 index 0000000..ed1d904 Binary files /dev/null and b/wolf3d/base/sodsprites/167.tga differ diff --git a/wolf3d/base/sodsprites/168.tga b/wolf3d/base/sodsprites/168.tga new file mode 100755 index 0000000..75ac923 Binary files /dev/null and b/wolf3d/base/sodsprites/168.tga differ diff --git a/wolf3d/base/sodsprites/169.tga b/wolf3d/base/sodsprites/169.tga new file mode 100755 index 0000000..97f3d80 Binary files /dev/null and b/wolf3d/base/sodsprites/169.tga differ diff --git a/wolf3d/base/sodsprites/170.tga b/wolf3d/base/sodsprites/170.tga new file mode 100755 index 0000000..7a6231a Binary files /dev/null and b/wolf3d/base/sodsprites/170.tga differ diff --git a/wolf3d/base/sodsprites/171.tga b/wolf3d/base/sodsprites/171.tga new file mode 100755 index 0000000..533578b Binary files /dev/null and b/wolf3d/base/sodsprites/171.tga differ diff --git a/wolf3d/base/sodsprites/172.tga b/wolf3d/base/sodsprites/172.tga new file mode 100755 index 0000000..ffa0292 Binary files /dev/null and b/wolf3d/base/sodsprites/172.tga differ diff --git a/wolf3d/base/sodsprites/173.tga b/wolf3d/base/sodsprites/173.tga new file mode 100755 index 0000000..7b05fc1 Binary files /dev/null and b/wolf3d/base/sodsprites/173.tga differ diff --git a/wolf3d/base/sodsprites/174.tga b/wolf3d/base/sodsprites/174.tga new file mode 100755 index 0000000..85195bd Binary files /dev/null and b/wolf3d/base/sodsprites/174.tga differ diff --git a/wolf3d/base/sodsprites/175.tga b/wolf3d/base/sodsprites/175.tga new file mode 100755 index 0000000..aaa3eb5 Binary files /dev/null and b/wolf3d/base/sodsprites/175.tga differ diff --git a/wolf3d/base/sodsprites/176.tga b/wolf3d/base/sodsprites/176.tga new file mode 100755 index 0000000..4d4a9a0 Binary files /dev/null and b/wolf3d/base/sodsprites/176.tga differ diff --git a/wolf3d/base/sodsprites/177.tga b/wolf3d/base/sodsprites/177.tga new file mode 100755 index 0000000..6a6fe6b Binary files /dev/null and b/wolf3d/base/sodsprites/177.tga differ diff --git a/wolf3d/base/sodsprites/178.tga b/wolf3d/base/sodsprites/178.tga new file mode 100755 index 0000000..ee9e93a Binary files /dev/null and b/wolf3d/base/sodsprites/178.tga differ diff --git a/wolf3d/base/sodsprites/179.tga b/wolf3d/base/sodsprites/179.tga new file mode 100755 index 0000000..5e8c1b4 Binary files /dev/null and b/wolf3d/base/sodsprites/179.tga differ diff --git a/wolf3d/base/sodsprites/180.tga b/wolf3d/base/sodsprites/180.tga new file mode 100755 index 0000000..d0b07eb Binary files /dev/null and b/wolf3d/base/sodsprites/180.tga differ diff --git a/wolf3d/base/sodsprites/181.tga b/wolf3d/base/sodsprites/181.tga new file mode 100755 index 0000000..947a374 Binary files /dev/null and b/wolf3d/base/sodsprites/181.tga differ diff --git a/wolf3d/base/sodsprites/182.tga b/wolf3d/base/sodsprites/182.tga new file mode 100755 index 0000000..e3968b2 Binary files /dev/null and b/wolf3d/base/sodsprites/182.tga differ diff --git a/wolf3d/base/sodsprites/183.tga b/wolf3d/base/sodsprites/183.tga new file mode 100755 index 0000000..07b685b Binary files /dev/null and b/wolf3d/base/sodsprites/183.tga differ diff --git a/wolf3d/base/sodsprites/184.tga b/wolf3d/base/sodsprites/184.tga new file mode 100755 index 0000000..284c18c Binary files /dev/null and b/wolf3d/base/sodsprites/184.tga differ diff --git a/wolf3d/base/sodsprites/185.tga b/wolf3d/base/sodsprites/185.tga new file mode 100755 index 0000000..84eed92 Binary files /dev/null and b/wolf3d/base/sodsprites/185.tga differ diff --git a/wolf3d/base/sodsprites/186.tga b/wolf3d/base/sodsprites/186.tga new file mode 100755 index 0000000..76caf9e Binary files /dev/null and b/wolf3d/base/sodsprites/186.tga differ diff --git a/wolf3d/base/sodsprites/187.tga b/wolf3d/base/sodsprites/187.tga new file mode 100755 index 0000000..a3a86dc Binary files /dev/null and b/wolf3d/base/sodsprites/187.tga differ diff --git a/wolf3d/base/sodsprites/188.tga b/wolf3d/base/sodsprites/188.tga new file mode 100755 index 0000000..14ec591 Binary files /dev/null and b/wolf3d/base/sodsprites/188.tga differ diff --git a/wolf3d/base/sodsprites/189.tga b/wolf3d/base/sodsprites/189.tga new file mode 100755 index 0000000..fbd108f Binary files /dev/null and b/wolf3d/base/sodsprites/189.tga differ diff --git a/wolf3d/base/sodsprites/190.tga b/wolf3d/base/sodsprites/190.tga new file mode 100755 index 0000000..a515e6b Binary files /dev/null and b/wolf3d/base/sodsprites/190.tga differ diff --git a/wolf3d/base/sodsprites/191.tga b/wolf3d/base/sodsprites/191.tga new file mode 100755 index 0000000..ba25a04 Binary files /dev/null and b/wolf3d/base/sodsprites/191.tga differ diff --git a/wolf3d/base/sodsprites/192.tga b/wolf3d/base/sodsprites/192.tga new file mode 100755 index 0000000..bd2650d Binary files /dev/null and b/wolf3d/base/sodsprites/192.tga differ diff --git a/wolf3d/base/sodsprites/193.tga b/wolf3d/base/sodsprites/193.tga new file mode 100755 index 0000000..1d1a802 Binary files /dev/null and b/wolf3d/base/sodsprites/193.tga differ diff --git a/wolf3d/base/sodsprites/194.tga b/wolf3d/base/sodsprites/194.tga new file mode 100755 index 0000000..4478d4f Binary files /dev/null and b/wolf3d/base/sodsprites/194.tga differ diff --git a/wolf3d/base/sodsprites/195.tga b/wolf3d/base/sodsprites/195.tga new file mode 100755 index 0000000..8ded133 Binary files /dev/null and b/wolf3d/base/sodsprites/195.tga differ diff --git a/wolf3d/base/sodsprites/196.tga b/wolf3d/base/sodsprites/196.tga new file mode 100755 index 0000000..71b7fd8 Binary files /dev/null and b/wolf3d/base/sodsprites/196.tga differ diff --git a/wolf3d/base/sodsprites/197.tga b/wolf3d/base/sodsprites/197.tga new file mode 100755 index 0000000..55dd243 Binary files /dev/null and b/wolf3d/base/sodsprites/197.tga differ diff --git a/wolf3d/base/sodsprites/198.tga b/wolf3d/base/sodsprites/198.tga new file mode 100755 index 0000000..b9a33dc Binary files /dev/null and b/wolf3d/base/sodsprites/198.tga differ diff --git a/wolf3d/base/sodsprites/199.tga b/wolf3d/base/sodsprites/199.tga new file mode 100755 index 0000000..e52875c Binary files /dev/null and b/wolf3d/base/sodsprites/199.tga differ diff --git a/wolf3d/base/sodsprites/200.tga b/wolf3d/base/sodsprites/200.tga new file mode 100755 index 0000000..c777a1b Binary files /dev/null and b/wolf3d/base/sodsprites/200.tga differ diff --git a/wolf3d/base/sodsprites/201.tga b/wolf3d/base/sodsprites/201.tga new file mode 100755 index 0000000..8739a2e Binary files /dev/null and b/wolf3d/base/sodsprites/201.tga differ diff --git a/wolf3d/base/sodsprites/202.tga b/wolf3d/base/sodsprites/202.tga new file mode 100755 index 0000000..d2c32ca Binary files /dev/null and b/wolf3d/base/sodsprites/202.tga differ diff --git a/wolf3d/base/sodsprites/203.tga b/wolf3d/base/sodsprites/203.tga new file mode 100755 index 0000000..04f6bc9 Binary files /dev/null and b/wolf3d/base/sodsprites/203.tga differ diff --git a/wolf3d/base/sodsprites/204.tga b/wolf3d/base/sodsprites/204.tga new file mode 100755 index 0000000..e9621b7 Binary files /dev/null and b/wolf3d/base/sodsprites/204.tga differ diff --git a/wolf3d/base/sodsprites/205.tga b/wolf3d/base/sodsprites/205.tga new file mode 100755 index 0000000..e3377fe Binary files /dev/null and b/wolf3d/base/sodsprites/205.tga differ diff --git a/wolf3d/base/sodsprites/206.tga b/wolf3d/base/sodsprites/206.tga new file mode 100755 index 0000000..eb3512f Binary files /dev/null and b/wolf3d/base/sodsprites/206.tga differ diff --git a/wolf3d/base/sodsprites/207.tga b/wolf3d/base/sodsprites/207.tga new file mode 100755 index 0000000..3c523ea Binary files /dev/null and b/wolf3d/base/sodsprites/207.tga differ diff --git a/wolf3d/base/sodsprites/208.tga b/wolf3d/base/sodsprites/208.tga new file mode 100755 index 0000000..e60d896 Binary files /dev/null and b/wolf3d/base/sodsprites/208.tga differ diff --git a/wolf3d/base/sodsprites/209.tga b/wolf3d/base/sodsprites/209.tga new file mode 100755 index 0000000..c5f8c8a Binary files /dev/null and b/wolf3d/base/sodsprites/209.tga differ diff --git a/wolf3d/base/sodsprites/210.tga b/wolf3d/base/sodsprites/210.tga new file mode 100755 index 0000000..5d4a8fe Binary files /dev/null and b/wolf3d/base/sodsprites/210.tga differ diff --git a/wolf3d/base/sodsprites/211.tga b/wolf3d/base/sodsprites/211.tga new file mode 100755 index 0000000..8fee0c9 Binary files /dev/null and b/wolf3d/base/sodsprites/211.tga differ diff --git a/wolf3d/base/sodsprites/212.tga b/wolf3d/base/sodsprites/212.tga new file mode 100755 index 0000000..85ff499 Binary files /dev/null and b/wolf3d/base/sodsprites/212.tga differ diff --git a/wolf3d/base/sodsprites/213.tga b/wolf3d/base/sodsprites/213.tga new file mode 100755 index 0000000..ed9fda6 Binary files /dev/null and b/wolf3d/base/sodsprites/213.tga differ diff --git a/wolf3d/base/sodsprites/214.tga b/wolf3d/base/sodsprites/214.tga new file mode 100755 index 0000000..81b0008 Binary files /dev/null and b/wolf3d/base/sodsprites/214.tga differ diff --git a/wolf3d/base/sodsprites/215.tga b/wolf3d/base/sodsprites/215.tga new file mode 100755 index 0000000..44a0a85 Binary files /dev/null and b/wolf3d/base/sodsprites/215.tga differ diff --git a/wolf3d/base/sodsprites/216.tga b/wolf3d/base/sodsprites/216.tga new file mode 100755 index 0000000..4168757 Binary files /dev/null and b/wolf3d/base/sodsprites/216.tga differ diff --git a/wolf3d/base/sodsprites/217.tga b/wolf3d/base/sodsprites/217.tga new file mode 100755 index 0000000..70664a9 Binary files /dev/null and b/wolf3d/base/sodsprites/217.tga differ diff --git a/wolf3d/base/sodsprites/218.tga b/wolf3d/base/sodsprites/218.tga new file mode 100755 index 0000000..e874dd9 Binary files /dev/null and b/wolf3d/base/sodsprites/218.tga differ diff --git a/wolf3d/base/sodsprites/219.tga b/wolf3d/base/sodsprites/219.tga new file mode 100755 index 0000000..5a93d74 Binary files /dev/null and b/wolf3d/base/sodsprites/219.tga differ diff --git a/wolf3d/base/sodsprites/220.tga b/wolf3d/base/sodsprites/220.tga new file mode 100755 index 0000000..faf06ee Binary files /dev/null and b/wolf3d/base/sodsprites/220.tga differ diff --git a/wolf3d/base/sodsprites/221.tga b/wolf3d/base/sodsprites/221.tga new file mode 100755 index 0000000..af444b7 Binary files /dev/null and b/wolf3d/base/sodsprites/221.tga differ diff --git a/wolf3d/base/sodsprites/222.tga b/wolf3d/base/sodsprites/222.tga new file mode 100755 index 0000000..1c42f18 Binary files /dev/null and b/wolf3d/base/sodsprites/222.tga differ diff --git a/wolf3d/base/sodsprites/223.tga b/wolf3d/base/sodsprites/223.tga new file mode 100755 index 0000000..0042844 Binary files /dev/null and b/wolf3d/base/sodsprites/223.tga differ diff --git a/wolf3d/base/sodsprites/224.tga b/wolf3d/base/sodsprites/224.tga new file mode 100755 index 0000000..942576f Binary files /dev/null and b/wolf3d/base/sodsprites/224.tga differ diff --git a/wolf3d/base/sodsprites/225.tga b/wolf3d/base/sodsprites/225.tga new file mode 100755 index 0000000..d354293 Binary files /dev/null and b/wolf3d/base/sodsprites/225.tga differ diff --git a/wolf3d/base/sodsprites/226.tga b/wolf3d/base/sodsprites/226.tga new file mode 100755 index 0000000..7549bd4 Binary files /dev/null and b/wolf3d/base/sodsprites/226.tga differ diff --git a/wolf3d/base/sodsprites/227.tga b/wolf3d/base/sodsprites/227.tga new file mode 100755 index 0000000..8673fac Binary files /dev/null and b/wolf3d/base/sodsprites/227.tga differ diff --git a/wolf3d/base/sodsprites/228.tga b/wolf3d/base/sodsprites/228.tga new file mode 100755 index 0000000..2b343a8 Binary files /dev/null and b/wolf3d/base/sodsprites/228.tga differ diff --git a/wolf3d/base/sodsprites/229.tga b/wolf3d/base/sodsprites/229.tga new file mode 100755 index 0000000..3fe479e Binary files /dev/null and b/wolf3d/base/sodsprites/229.tga differ diff --git a/wolf3d/base/sodsprites/230.tga b/wolf3d/base/sodsprites/230.tga new file mode 100755 index 0000000..337b625 Binary files /dev/null and b/wolf3d/base/sodsprites/230.tga differ diff --git a/wolf3d/base/sodsprites/231.tga b/wolf3d/base/sodsprites/231.tga new file mode 100755 index 0000000..972863b Binary files /dev/null and b/wolf3d/base/sodsprites/231.tga differ diff --git a/wolf3d/base/sodsprites/232.tga b/wolf3d/base/sodsprites/232.tga new file mode 100755 index 0000000..232d7d0 Binary files /dev/null and b/wolf3d/base/sodsprites/232.tga differ diff --git a/wolf3d/base/sodsprites/233.tga b/wolf3d/base/sodsprites/233.tga new file mode 100755 index 0000000..841f61c Binary files /dev/null and b/wolf3d/base/sodsprites/233.tga differ diff --git a/wolf3d/base/sodsprites/234.tga b/wolf3d/base/sodsprites/234.tga new file mode 100755 index 0000000..6cde7c6 Binary files /dev/null and b/wolf3d/base/sodsprites/234.tga differ diff --git a/wolf3d/base/sodsprites/235.tga b/wolf3d/base/sodsprites/235.tga new file mode 100755 index 0000000..972863b Binary files /dev/null and b/wolf3d/base/sodsprites/235.tga differ diff --git a/wolf3d/base/sodsprites/236.tga b/wolf3d/base/sodsprites/236.tga new file mode 100755 index 0000000..cce53c0 Binary files /dev/null and b/wolf3d/base/sodsprites/236.tga differ diff --git a/wolf3d/base/sodsprites/237.tga b/wolf3d/base/sodsprites/237.tga new file mode 100755 index 0000000..e2c72d6 Binary files /dev/null and b/wolf3d/base/sodsprites/237.tga differ diff --git a/wolf3d/base/sodsprites/238.tga b/wolf3d/base/sodsprites/238.tga new file mode 100755 index 0000000..d408cd1 Binary files /dev/null and b/wolf3d/base/sodsprites/238.tga differ diff --git a/wolf3d/base/sodsprites/239.tga b/wolf3d/base/sodsprites/239.tga new file mode 100755 index 0000000..6490dc5 Binary files /dev/null and b/wolf3d/base/sodsprites/239.tga differ diff --git a/wolf3d/base/sodsprites/240.tga b/wolf3d/base/sodsprites/240.tga new file mode 100755 index 0000000..d408cd1 Binary files /dev/null and b/wolf3d/base/sodsprites/240.tga differ diff --git a/wolf3d/base/sodsprites/241.tga b/wolf3d/base/sodsprites/241.tga new file mode 100755 index 0000000..75dbc17 Binary files /dev/null and b/wolf3d/base/sodsprites/241.tga differ diff --git a/wolf3d/base/sodsprites/242.tga b/wolf3d/base/sodsprites/242.tga new file mode 100755 index 0000000..38a1dbf Binary files /dev/null and b/wolf3d/base/sodsprites/242.tga differ diff --git a/wolf3d/base/sodsprites/243.tga b/wolf3d/base/sodsprites/243.tga new file mode 100755 index 0000000..7a71a40 Binary files /dev/null and b/wolf3d/base/sodsprites/243.tga differ diff --git a/wolf3d/base/sodsprites/244.tga b/wolf3d/base/sodsprites/244.tga new file mode 100755 index 0000000..9c20976 Binary files /dev/null and b/wolf3d/base/sodsprites/244.tga differ diff --git a/wolf3d/base/sodsprites/245.tga b/wolf3d/base/sodsprites/245.tga new file mode 100755 index 0000000..8a907a3 Binary files /dev/null and b/wolf3d/base/sodsprites/245.tga differ diff --git a/wolf3d/base/sodsprites/246.tga b/wolf3d/base/sodsprites/246.tga new file mode 100755 index 0000000..9c902db Binary files /dev/null and b/wolf3d/base/sodsprites/246.tga differ diff --git a/wolf3d/base/sodsprites/247.tga b/wolf3d/base/sodsprites/247.tga new file mode 100755 index 0000000..e1b9244 Binary files /dev/null and b/wolf3d/base/sodsprites/247.tga differ diff --git a/wolf3d/base/sodsprites/248.tga b/wolf3d/base/sodsprites/248.tga new file mode 100755 index 0000000..067ce8d Binary files /dev/null and b/wolf3d/base/sodsprites/248.tga differ diff --git a/wolf3d/base/sodsprites/249.tga b/wolf3d/base/sodsprites/249.tga new file mode 100755 index 0000000..aff3b1a Binary files /dev/null and b/wolf3d/base/sodsprites/249.tga differ diff --git a/wolf3d/base/sodsprites/250.tga b/wolf3d/base/sodsprites/250.tga new file mode 100755 index 0000000..af0ee60 Binary files /dev/null and b/wolf3d/base/sodsprites/250.tga differ diff --git a/wolf3d/base/sodsprites/251.tga b/wolf3d/base/sodsprites/251.tga new file mode 100755 index 0000000..7dce2e4 Binary files /dev/null and b/wolf3d/base/sodsprites/251.tga differ diff --git a/wolf3d/base/sodsprites/252.tga b/wolf3d/base/sodsprites/252.tga new file mode 100755 index 0000000..fe36ba7 Binary files /dev/null and b/wolf3d/base/sodsprites/252.tga differ diff --git a/wolf3d/base/sodsprites/253.tga b/wolf3d/base/sodsprites/253.tga new file mode 100755 index 0000000..6314710 Binary files /dev/null and b/wolf3d/base/sodsprites/253.tga differ diff --git a/wolf3d/base/sodsprites/254.tga b/wolf3d/base/sodsprites/254.tga new file mode 100755 index 0000000..1182c5b Binary files /dev/null and b/wolf3d/base/sodsprites/254.tga differ diff --git a/wolf3d/base/sodsprites/255.tga b/wolf3d/base/sodsprites/255.tga new file mode 100755 index 0000000..93974cb Binary files /dev/null and b/wolf3d/base/sodsprites/255.tga differ diff --git a/wolf3d/base/sodsprites/256.tga b/wolf3d/base/sodsprites/256.tga new file mode 100755 index 0000000..54f4a18 Binary files /dev/null and b/wolf3d/base/sodsprites/256.tga differ diff --git a/wolf3d/base/sodsprites/257.tga b/wolf3d/base/sodsprites/257.tga new file mode 100755 index 0000000..5603d0b Binary files /dev/null and b/wolf3d/base/sodsprites/257.tga differ diff --git a/wolf3d/base/sodsprites/258.tga b/wolf3d/base/sodsprites/258.tga new file mode 100755 index 0000000..b6bae6f Binary files /dev/null and b/wolf3d/base/sodsprites/258.tga differ diff --git a/wolf3d/base/sodsprites/259.tga b/wolf3d/base/sodsprites/259.tga new file mode 100755 index 0000000..43a82ad Binary files /dev/null and b/wolf3d/base/sodsprites/259.tga differ diff --git a/wolf3d/base/sodsprites/260.tga b/wolf3d/base/sodsprites/260.tga new file mode 100755 index 0000000..533d0a8 Binary files /dev/null and b/wolf3d/base/sodsprites/260.tga differ diff --git a/wolf3d/base/sodsprites/261.tga b/wolf3d/base/sodsprites/261.tga new file mode 100755 index 0000000..a523b86 Binary files /dev/null and b/wolf3d/base/sodsprites/261.tga differ diff --git a/wolf3d/base/sodsprites/262.tga b/wolf3d/base/sodsprites/262.tga new file mode 100755 index 0000000..4727693 Binary files /dev/null and b/wolf3d/base/sodsprites/262.tga differ diff --git a/wolf3d/base/sodsprites/263.tga b/wolf3d/base/sodsprites/263.tga new file mode 100755 index 0000000..27fd5ee Binary files /dev/null and b/wolf3d/base/sodsprites/263.tga differ diff --git a/wolf3d/base/sodsprites/264.tga b/wolf3d/base/sodsprites/264.tga new file mode 100755 index 0000000..3878afa Binary files /dev/null and b/wolf3d/base/sodsprites/264.tga differ diff --git a/wolf3d/base/sodsprites/265.tga b/wolf3d/base/sodsprites/265.tga new file mode 100755 index 0000000..84b88ed Binary files /dev/null and b/wolf3d/base/sodsprites/265.tga differ diff --git a/wolf3d/base/sodsprites/266.tga b/wolf3d/base/sodsprites/266.tga new file mode 100755 index 0000000..ea31271 Binary files /dev/null and b/wolf3d/base/sodsprites/266.tga differ diff --git a/wolf3d/base/sodsprites/267.tga b/wolf3d/base/sodsprites/267.tga new file mode 100755 index 0000000..49cdc8d Binary files /dev/null and b/wolf3d/base/sodsprites/267.tga differ diff --git a/wolf3d/base/sodsprites/268.tga b/wolf3d/base/sodsprites/268.tga new file mode 100755 index 0000000..22b6d10 Binary files /dev/null and b/wolf3d/base/sodsprites/268.tga differ diff --git a/wolf3d/base/sodsprites/269.tga b/wolf3d/base/sodsprites/269.tga new file mode 100755 index 0000000..90b771e Binary files /dev/null and b/wolf3d/base/sodsprites/269.tga differ diff --git a/wolf3d/base/sodsprites/270.tga b/wolf3d/base/sodsprites/270.tga new file mode 100755 index 0000000..2ca7978 Binary files /dev/null and b/wolf3d/base/sodsprites/270.tga differ diff --git a/wolf3d/base/sodsprites/271.tga b/wolf3d/base/sodsprites/271.tga new file mode 100755 index 0000000..75ec6f0 Binary files /dev/null and b/wolf3d/base/sodsprites/271.tga differ diff --git a/wolf3d/base/sodsprites/272.tga b/wolf3d/base/sodsprites/272.tga new file mode 100755 index 0000000..5df0581 Binary files /dev/null and b/wolf3d/base/sodsprites/272.tga differ diff --git a/wolf3d/base/sodsprites/273.tga b/wolf3d/base/sodsprites/273.tga new file mode 100755 index 0000000..a4379d4 Binary files /dev/null and b/wolf3d/base/sodsprites/273.tga differ diff --git a/wolf3d/base/sodsprites/274.tga b/wolf3d/base/sodsprites/274.tga new file mode 100755 index 0000000..6fdecdb Binary files /dev/null and b/wolf3d/base/sodsprites/274.tga differ diff --git a/wolf3d/base/sodsprites/275.tga b/wolf3d/base/sodsprites/275.tga new file mode 100755 index 0000000..5e42dd5 Binary files /dev/null and b/wolf3d/base/sodsprites/275.tga differ diff --git a/wolf3d/base/sodsprites/276.tga b/wolf3d/base/sodsprites/276.tga new file mode 100755 index 0000000..ada0987 Binary files /dev/null and b/wolf3d/base/sodsprites/276.tga differ diff --git a/wolf3d/base/sodsprites/277.tga b/wolf3d/base/sodsprites/277.tga new file mode 100755 index 0000000..d5e09cc Binary files /dev/null and b/wolf3d/base/sodsprites/277.tga differ diff --git a/wolf3d/base/sodsprites/278.tga b/wolf3d/base/sodsprites/278.tga new file mode 100755 index 0000000..613b269 Binary files /dev/null and b/wolf3d/base/sodsprites/278.tga differ diff --git a/wolf3d/base/sodsprites/279.tga b/wolf3d/base/sodsprites/279.tga new file mode 100755 index 0000000..f6aeae2 Binary files /dev/null and b/wolf3d/base/sodsprites/279.tga differ diff --git a/wolf3d/base/sodsprites/280.tga b/wolf3d/base/sodsprites/280.tga new file mode 100755 index 0000000..61b59e8 Binary files /dev/null and b/wolf3d/base/sodsprites/280.tga differ diff --git a/wolf3d/base/sodsprites/281.tga b/wolf3d/base/sodsprites/281.tga new file mode 100755 index 0000000..c566dd3 Binary files /dev/null and b/wolf3d/base/sodsprites/281.tga differ diff --git a/wolf3d/base/sodsprites/282.tga b/wolf3d/base/sodsprites/282.tga new file mode 100755 index 0000000..4fd5258 Binary files /dev/null and b/wolf3d/base/sodsprites/282.tga differ diff --git a/wolf3d/base/sodsprites/283.tga b/wolf3d/base/sodsprites/283.tga new file mode 100755 index 0000000..c5c648f Binary files /dev/null and b/wolf3d/base/sodsprites/283.tga differ diff --git a/wolf3d/base/sodsprites/284.tga b/wolf3d/base/sodsprites/284.tga new file mode 100755 index 0000000..b313e41 Binary files /dev/null and b/wolf3d/base/sodsprites/284.tga differ diff --git a/wolf3d/base/sodsprites/285.tga b/wolf3d/base/sodsprites/285.tga new file mode 100755 index 0000000..eefdc27 Binary files /dev/null and b/wolf3d/base/sodsprites/285.tga differ diff --git a/wolf3d/base/sodsprites/286.tga b/wolf3d/base/sodsprites/286.tga new file mode 100755 index 0000000..15457c3 Binary files /dev/null and b/wolf3d/base/sodsprites/286.tga differ diff --git a/wolf3d/base/sodsprites/287.tga b/wolf3d/base/sodsprites/287.tga new file mode 100755 index 0000000..890a9d7 Binary files /dev/null and b/wolf3d/base/sodsprites/287.tga differ diff --git a/wolf3d/base/sodsprites/288.tga b/wolf3d/base/sodsprites/288.tga new file mode 100755 index 0000000..bca1abe Binary files /dev/null and b/wolf3d/base/sodsprites/288.tga differ diff --git a/wolf3d/base/sodsprites/289.tga b/wolf3d/base/sodsprites/289.tga new file mode 100755 index 0000000..03580ed Binary files /dev/null and b/wolf3d/base/sodsprites/289.tga differ diff --git a/wolf3d/base/sodsprites/290.tga b/wolf3d/base/sodsprites/290.tga new file mode 100755 index 0000000..de81055 Binary files /dev/null and b/wolf3d/base/sodsprites/290.tga differ diff --git a/wolf3d/base/sodsprites/291.tga b/wolf3d/base/sodsprites/291.tga new file mode 100755 index 0000000..df97d1b Binary files /dev/null and b/wolf3d/base/sodsprites/291.tga differ diff --git a/wolf3d/base/sodsprites/292.tga b/wolf3d/base/sodsprites/292.tga new file mode 100755 index 0000000..cfc99f0 Binary files /dev/null and b/wolf3d/base/sodsprites/292.tga differ diff --git a/wolf3d/base/sodsprites/293.tga b/wolf3d/base/sodsprites/293.tga new file mode 100755 index 0000000..fca72f1 Binary files /dev/null and b/wolf3d/base/sodsprites/293.tga differ diff --git a/wolf3d/base/sodsprites/294.tga b/wolf3d/base/sodsprites/294.tga new file mode 100755 index 0000000..9da33ee Binary files /dev/null and b/wolf3d/base/sodsprites/294.tga differ diff --git a/wolf3d/base/sodsprites/295.tga b/wolf3d/base/sodsprites/295.tga new file mode 100755 index 0000000..7774afd Binary files /dev/null and b/wolf3d/base/sodsprites/295.tga differ diff --git a/wolf3d/base/sodsprites/296.tga b/wolf3d/base/sodsprites/296.tga new file mode 100755 index 0000000..030fe27 Binary files /dev/null and b/wolf3d/base/sodsprites/296.tga differ diff --git a/wolf3d/base/sodsprites/297.tga b/wolf3d/base/sodsprites/297.tga new file mode 100755 index 0000000..a08b656 Binary files /dev/null and b/wolf3d/base/sodsprites/297.tga differ diff --git a/wolf3d/base/sodsprites/298.tga b/wolf3d/base/sodsprites/298.tga new file mode 100755 index 0000000..1693c41 Binary files /dev/null and b/wolf3d/base/sodsprites/298.tga differ diff --git a/wolf3d/base/sodsprites/299.tga b/wolf3d/base/sodsprites/299.tga new file mode 100755 index 0000000..9f5d288 Binary files /dev/null and b/wolf3d/base/sodsprites/299.tga differ diff --git a/wolf3d/base/sodsprites/300.tga b/wolf3d/base/sodsprites/300.tga new file mode 100755 index 0000000..c69aa1a Binary files /dev/null and b/wolf3d/base/sodsprites/300.tga differ diff --git a/wolf3d/base/sodsprites/301.tga b/wolf3d/base/sodsprites/301.tga new file mode 100755 index 0000000..b3e3ad6 Binary files /dev/null and b/wolf3d/base/sodsprites/301.tga differ diff --git a/wolf3d/base/sodsprites/302.tga b/wolf3d/base/sodsprites/302.tga new file mode 100755 index 0000000..31943c5 Binary files /dev/null and b/wolf3d/base/sodsprites/302.tga differ diff --git a/wolf3d/base/sodsprites/303.tga b/wolf3d/base/sodsprites/303.tga new file mode 100755 index 0000000..b86d76b Binary files /dev/null and b/wolf3d/base/sodsprites/303.tga differ diff --git a/wolf3d/base/sodsprites/304.tga b/wolf3d/base/sodsprites/304.tga new file mode 100755 index 0000000..b40d4ec Binary files /dev/null and b/wolf3d/base/sodsprites/304.tga differ diff --git a/wolf3d/base/sodsprites/305.tga b/wolf3d/base/sodsprites/305.tga new file mode 100755 index 0000000..4ff1251 Binary files /dev/null and b/wolf3d/base/sodsprites/305.tga differ diff --git a/wolf3d/base/sodsprites/306.tga b/wolf3d/base/sodsprites/306.tga new file mode 100755 index 0000000..f5fee4b Binary files /dev/null and b/wolf3d/base/sodsprites/306.tga differ diff --git a/wolf3d/base/sodsprites/307.tga b/wolf3d/base/sodsprites/307.tga new file mode 100755 index 0000000..a1155e6 Binary files /dev/null and b/wolf3d/base/sodsprites/307.tga differ diff --git a/wolf3d/base/sodsprites/308.tga b/wolf3d/base/sodsprites/308.tga new file mode 100755 index 0000000..0123d09 Binary files /dev/null and b/wolf3d/base/sodsprites/308.tga differ diff --git a/wolf3d/base/sodsprites/309.tga b/wolf3d/base/sodsprites/309.tga new file mode 100755 index 0000000..82fbfa1 Binary files /dev/null and b/wolf3d/base/sodsprites/309.tga differ diff --git a/wolf3d/base/sodsprites/310.tga b/wolf3d/base/sodsprites/310.tga new file mode 100755 index 0000000..4dba01d Binary files /dev/null and b/wolf3d/base/sodsprites/310.tga differ diff --git a/wolf3d/base/sodsprites/311.tga b/wolf3d/base/sodsprites/311.tga new file mode 100755 index 0000000..6d072af Binary files /dev/null and b/wolf3d/base/sodsprites/311.tga differ diff --git a/wolf3d/base/sodsprites/312.tga b/wolf3d/base/sodsprites/312.tga new file mode 100755 index 0000000..b481a0d Binary files /dev/null and b/wolf3d/base/sodsprites/312.tga differ diff --git a/wolf3d/base/sodsprites/313.tga b/wolf3d/base/sodsprites/313.tga new file mode 100755 index 0000000..274f332 Binary files /dev/null and b/wolf3d/base/sodsprites/313.tga differ diff --git a/wolf3d/base/sodsprites/314.tga b/wolf3d/base/sodsprites/314.tga new file mode 100755 index 0000000..925309e Binary files /dev/null and b/wolf3d/base/sodsprites/314.tga differ diff --git a/wolf3d/base/sodsprites/315.tga b/wolf3d/base/sodsprites/315.tga new file mode 100755 index 0000000..9e24073 Binary files /dev/null and b/wolf3d/base/sodsprites/315.tga differ diff --git a/wolf3d/base/sodsprites/316.tga b/wolf3d/base/sodsprites/316.tga new file mode 100755 index 0000000..6fb65a8 Binary files /dev/null and b/wolf3d/base/sodsprites/316.tga differ diff --git a/wolf3d/base/sodsprites/317.tga b/wolf3d/base/sodsprites/317.tga new file mode 100755 index 0000000..4b94080 Binary files /dev/null and b/wolf3d/base/sodsprites/317.tga differ diff --git a/wolf3d/base/sodsprites/318.tga b/wolf3d/base/sodsprites/318.tga new file mode 100755 index 0000000..44d59dd Binary files /dev/null and b/wolf3d/base/sodsprites/318.tga differ diff --git a/wolf3d/base/sodsprites/319.tga b/wolf3d/base/sodsprites/319.tga new file mode 100755 index 0000000..a8d1aad Binary files /dev/null and b/wolf3d/base/sodsprites/319.tga differ diff --git a/wolf3d/base/sodsprites/320.tga b/wolf3d/base/sodsprites/320.tga new file mode 100755 index 0000000..50ef5f7 Binary files /dev/null and b/wolf3d/base/sodsprites/320.tga differ diff --git a/wolf3d/base/sodsprites/321.tga b/wolf3d/base/sodsprites/321.tga new file mode 100755 index 0000000..8755524 Binary files /dev/null and b/wolf3d/base/sodsprites/321.tga differ diff --git a/wolf3d/base/sodsprites/322.tga b/wolf3d/base/sodsprites/322.tga new file mode 100755 index 0000000..d333122 Binary files /dev/null and b/wolf3d/base/sodsprites/322.tga differ diff --git a/wolf3d/base/sodsprites/323.tga b/wolf3d/base/sodsprites/323.tga new file mode 100755 index 0000000..130001d Binary files /dev/null and b/wolf3d/base/sodsprites/323.tga differ diff --git a/wolf3d/base/sodsprites/324.tga b/wolf3d/base/sodsprites/324.tga new file mode 100755 index 0000000..ec42d86 Binary files /dev/null and b/wolf3d/base/sodsprites/324.tga differ diff --git a/wolf3d/base/sodsprites/325.tga b/wolf3d/base/sodsprites/325.tga new file mode 100755 index 0000000..0d177c3 Binary files /dev/null and b/wolf3d/base/sodsprites/325.tga differ diff --git a/wolf3d/base/sodsprites/326.tga b/wolf3d/base/sodsprites/326.tga new file mode 100755 index 0000000..ce26e96 Binary files /dev/null and b/wolf3d/base/sodsprites/326.tga differ diff --git a/wolf3d/base/sodsprites/327.tga b/wolf3d/base/sodsprites/327.tga new file mode 100755 index 0000000..58857a3 Binary files /dev/null and b/wolf3d/base/sodsprites/327.tga differ diff --git a/wolf3d/base/sodsprites/328.tga b/wolf3d/base/sodsprites/328.tga new file mode 100755 index 0000000..cf2f72c Binary files /dev/null and b/wolf3d/base/sodsprites/328.tga differ diff --git a/wolf3d/base/sodsprites/329.tga b/wolf3d/base/sodsprites/329.tga new file mode 100755 index 0000000..ed53cc2 Binary files /dev/null and b/wolf3d/base/sodsprites/329.tga differ diff --git a/wolf3d/base/sodsprites/330.tga b/wolf3d/base/sodsprites/330.tga new file mode 100755 index 0000000..61ba0a6 Binary files /dev/null and b/wolf3d/base/sodsprites/330.tga differ diff --git a/wolf3d/base/sodsprites/331.tga b/wolf3d/base/sodsprites/331.tga new file mode 100755 index 0000000..7766bd1 Binary files /dev/null and b/wolf3d/base/sodsprites/331.tga differ diff --git a/wolf3d/base/sodsprites/332.tga b/wolf3d/base/sodsprites/332.tga new file mode 100755 index 0000000..19cf1e7 Binary files /dev/null and b/wolf3d/base/sodsprites/332.tga differ diff --git a/wolf3d/base/sodsprites/333.tga b/wolf3d/base/sodsprites/333.tga new file mode 100755 index 0000000..eefcf17 Binary files /dev/null and b/wolf3d/base/sodsprites/333.tga differ diff --git a/wolf3d/base/sodsprites/334.tga b/wolf3d/base/sodsprites/334.tga new file mode 100755 index 0000000..85fb79f Binary files /dev/null and b/wolf3d/base/sodsprites/334.tga differ diff --git a/wolf3d/base/sodsprites/335.tga b/wolf3d/base/sodsprites/335.tga new file mode 100755 index 0000000..39a2576 Binary files /dev/null and b/wolf3d/base/sodsprites/335.tga differ diff --git a/wolf3d/base/sodsprites/336.tga b/wolf3d/base/sodsprites/336.tga new file mode 100755 index 0000000..55de5ce Binary files /dev/null and b/wolf3d/base/sodsprites/336.tga differ diff --git a/wolf3d/base/sodsprites/337.tga b/wolf3d/base/sodsprites/337.tga new file mode 100755 index 0000000..4051159 Binary files /dev/null and b/wolf3d/base/sodsprites/337.tga differ diff --git a/wolf3d/base/sodsprites/338.tga b/wolf3d/base/sodsprites/338.tga new file mode 100755 index 0000000..8826bf5 Binary files /dev/null and b/wolf3d/base/sodsprites/338.tga differ diff --git a/wolf3d/base/sodsprites/339.tga b/wolf3d/base/sodsprites/339.tga new file mode 100755 index 0000000..ea7aa03 Binary files /dev/null and b/wolf3d/base/sodsprites/339.tga differ diff --git a/wolf3d/base/sodsprites/340.tga b/wolf3d/base/sodsprites/340.tga new file mode 100755 index 0000000..6390394 Binary files /dev/null and b/wolf3d/base/sodsprites/340.tga differ diff --git a/wolf3d/base/sodsprites/341.tga b/wolf3d/base/sodsprites/341.tga new file mode 100755 index 0000000..bc7c997 Binary files /dev/null and b/wolf3d/base/sodsprites/341.tga differ diff --git a/wolf3d/base/sodsprites/342.tga b/wolf3d/base/sodsprites/342.tga new file mode 100755 index 0000000..56166c5 Binary files /dev/null and b/wolf3d/base/sodsprites/342.tga differ diff --git a/wolf3d/base/sodsprites/343.tga b/wolf3d/base/sodsprites/343.tga new file mode 100755 index 0000000..d5e63e4 Binary files /dev/null and b/wolf3d/base/sodsprites/343.tga differ diff --git a/wolf3d/base/sodsprites/344.tga b/wolf3d/base/sodsprites/344.tga new file mode 100755 index 0000000..b3ddd21 Binary files /dev/null and b/wolf3d/base/sodsprites/344.tga differ diff --git a/wolf3d/base/sodsprites/345.tga b/wolf3d/base/sodsprites/345.tga new file mode 100755 index 0000000..30c195e Binary files /dev/null and b/wolf3d/base/sodsprites/345.tga differ diff --git a/wolf3d/base/sodsprites/346.tga b/wolf3d/base/sodsprites/346.tga new file mode 100755 index 0000000..8db58f5 Binary files /dev/null and b/wolf3d/base/sodsprites/346.tga differ diff --git a/wolf3d/base/sodsprites/347.tga b/wolf3d/base/sodsprites/347.tga new file mode 100755 index 0000000..7ced98f Binary files /dev/null and b/wolf3d/base/sodsprites/347.tga differ diff --git a/wolf3d/base/sodsprites/348.tga b/wolf3d/base/sodsprites/348.tga new file mode 100755 index 0000000..81cc86f Binary files /dev/null and b/wolf3d/base/sodsprites/348.tga differ diff --git a/wolf3d/base/sodsprites/349.tga b/wolf3d/base/sodsprites/349.tga new file mode 100755 index 0000000..f4652cf Binary files /dev/null and b/wolf3d/base/sodsprites/349.tga differ diff --git a/wolf3d/base/sodsprites/350.tga b/wolf3d/base/sodsprites/350.tga new file mode 100755 index 0000000..165c879 Binary files /dev/null and b/wolf3d/base/sodsprites/350.tga differ diff --git a/wolf3d/base/sodsprites/351.tga b/wolf3d/base/sodsprites/351.tga new file mode 100755 index 0000000..6536dec Binary files /dev/null and b/wolf3d/base/sodsprites/351.tga differ diff --git a/wolf3d/base/sodsprites/352.tga b/wolf3d/base/sodsprites/352.tga new file mode 100755 index 0000000..3c04e61 Binary files /dev/null and b/wolf3d/base/sodsprites/352.tga differ diff --git a/wolf3d/base/sodsprites/353.tga b/wolf3d/base/sodsprites/353.tga new file mode 100755 index 0000000..b5ebc5f Binary files /dev/null and b/wolf3d/base/sodsprites/353.tga differ diff --git a/wolf3d/base/sodsprites/354.tga b/wolf3d/base/sodsprites/354.tga new file mode 100755 index 0000000..e964227 Binary files /dev/null and b/wolf3d/base/sodsprites/354.tga differ diff --git a/wolf3d/base/sodsprites/355.tga b/wolf3d/base/sodsprites/355.tga new file mode 100755 index 0000000..f49586c Binary files /dev/null and b/wolf3d/base/sodsprites/355.tga differ diff --git a/wolf3d/base/sodsprites/356.tga b/wolf3d/base/sodsprites/356.tga new file mode 100755 index 0000000..7110b2e Binary files /dev/null and b/wolf3d/base/sodsprites/356.tga differ diff --git a/wolf3d/base/sodsprites/357.tga b/wolf3d/base/sodsprites/357.tga new file mode 100755 index 0000000..97d9775 Binary files /dev/null and b/wolf3d/base/sodsprites/357.tga differ diff --git a/wolf3d/base/sodsprites/358.tga b/wolf3d/base/sodsprites/358.tga new file mode 100755 index 0000000..fdb03ec Binary files /dev/null and b/wolf3d/base/sodsprites/358.tga differ diff --git a/wolf3d/base/sodsprites/359.tga b/wolf3d/base/sodsprites/359.tga new file mode 100755 index 0000000..90c7e74 Binary files /dev/null and b/wolf3d/base/sodsprites/359.tga differ diff --git a/wolf3d/base/sodsprites/360.tga b/wolf3d/base/sodsprites/360.tga new file mode 100755 index 0000000..2dff803 Binary files /dev/null and b/wolf3d/base/sodsprites/360.tga differ diff --git a/wolf3d/base/sodsprites/361.tga b/wolf3d/base/sodsprites/361.tga new file mode 100755 index 0000000..6ff0191 Binary files /dev/null and b/wolf3d/base/sodsprites/361.tga differ diff --git a/wolf3d/base/sodsprites/362.tga b/wolf3d/base/sodsprites/362.tga new file mode 100755 index 0000000..0181115 Binary files /dev/null and b/wolf3d/base/sodsprites/362.tga differ diff --git a/wolf3d/base/sodsprites/363.tga b/wolf3d/base/sodsprites/363.tga new file mode 100755 index 0000000..8bc7808 Binary files /dev/null and b/wolf3d/base/sodsprites/363.tga differ diff --git a/wolf3d/base/sodsprites/364.tga b/wolf3d/base/sodsprites/364.tga new file mode 100755 index 0000000..d57a8c1 Binary files /dev/null and b/wolf3d/base/sodsprites/364.tga differ diff --git a/wolf3d/base/sodsprites/365.tga b/wolf3d/base/sodsprites/365.tga new file mode 100755 index 0000000..effcc62 Binary files /dev/null and b/wolf3d/base/sodsprites/365.tga differ diff --git a/wolf3d/base/sodsprites/366.tga b/wolf3d/base/sodsprites/366.tga new file mode 100755 index 0000000..84f91bf Binary files /dev/null and b/wolf3d/base/sodsprites/366.tga differ diff --git a/wolf3d/base/sodsprites/367.tga b/wolf3d/base/sodsprites/367.tga new file mode 100755 index 0000000..7f3a3f3 Binary files /dev/null and b/wolf3d/base/sodsprites/367.tga differ diff --git a/wolf3d/base/sodsprites/368.tga b/wolf3d/base/sodsprites/368.tga new file mode 100755 index 0000000..1e1f266 Binary files /dev/null and b/wolf3d/base/sodsprites/368.tga differ diff --git a/wolf3d/base/sodsprites/369.tga b/wolf3d/base/sodsprites/369.tga new file mode 100755 index 0000000..5065cec Binary files /dev/null and b/wolf3d/base/sodsprites/369.tga differ diff --git a/wolf3d/base/sodsprites/370.tga b/wolf3d/base/sodsprites/370.tga new file mode 100755 index 0000000..989c6dd Binary files /dev/null and b/wolf3d/base/sodsprites/370.tga differ diff --git a/wolf3d/base/sodsprites/371.tga b/wolf3d/base/sodsprites/371.tga new file mode 100755 index 0000000..4006cda Binary files /dev/null and b/wolf3d/base/sodsprites/371.tga differ diff --git a/wolf3d/base/sodsprites/372.tga b/wolf3d/base/sodsprites/372.tga new file mode 100755 index 0000000..610be45 Binary files /dev/null and b/wolf3d/base/sodsprites/372.tga differ diff --git a/wolf3d/base/sodsprites/373.tga b/wolf3d/base/sodsprites/373.tga new file mode 100755 index 0000000..2989b69 Binary files /dev/null and b/wolf3d/base/sodsprites/373.tga differ diff --git a/wolf3d/base/sodsprites/374.tga b/wolf3d/base/sodsprites/374.tga new file mode 100755 index 0000000..0eb5835 Binary files /dev/null and b/wolf3d/base/sodsprites/374.tga differ diff --git a/wolf3d/base/sodsprites/375.tga b/wolf3d/base/sodsprites/375.tga new file mode 100755 index 0000000..45814a2 Binary files /dev/null and b/wolf3d/base/sodsprites/375.tga differ diff --git a/wolf3d/base/sodsprites/376.tga b/wolf3d/base/sodsprites/376.tga new file mode 100755 index 0000000..4fd255c Binary files /dev/null and b/wolf3d/base/sodsprites/376.tga differ diff --git a/wolf3d/base/sodsprites/377.tga b/wolf3d/base/sodsprites/377.tga new file mode 100755 index 0000000..0bb40c5 Binary files /dev/null and b/wolf3d/base/sodsprites/377.tga differ diff --git a/wolf3d/base/sodsprites/378.tga b/wolf3d/base/sodsprites/378.tga new file mode 100755 index 0000000..fe7c057 Binary files /dev/null and b/wolf3d/base/sodsprites/378.tga differ diff --git a/wolf3d/base/sodsprites/379.tga b/wolf3d/base/sodsprites/379.tga new file mode 100755 index 0000000..6a7de04 Binary files /dev/null and b/wolf3d/base/sodsprites/379.tga differ diff --git a/wolf3d/base/sodsprites/380.tga b/wolf3d/base/sodsprites/380.tga new file mode 100755 index 0000000..bb742a8 Binary files /dev/null and b/wolf3d/base/sodsprites/380.tga differ diff --git a/wolf3d/base/sodsprites/381.tga b/wolf3d/base/sodsprites/381.tga new file mode 100755 index 0000000..f6e1458 Binary files /dev/null and b/wolf3d/base/sodsprites/381.tga differ diff --git a/wolf3d/base/sodsprites/382.tga b/wolf3d/base/sodsprites/382.tga new file mode 100755 index 0000000..3cc70d9 Binary files /dev/null and b/wolf3d/base/sodsprites/382.tga differ diff --git a/wolf3d/base/sodsprites/383.tga b/wolf3d/base/sodsprites/383.tga new file mode 100755 index 0000000..24061fc Binary files /dev/null and b/wolf3d/base/sodsprites/383.tga differ diff --git a/wolf3d/base/sodsprites/384.tga b/wolf3d/base/sodsprites/384.tga new file mode 100755 index 0000000..d585c6a Binary files /dev/null and b/wolf3d/base/sodsprites/384.tga differ diff --git a/wolf3d/base/sodsprites/385.tga b/wolf3d/base/sodsprites/385.tga new file mode 100755 index 0000000..dbdc7eb Binary files /dev/null and b/wolf3d/base/sodsprites/385.tga differ diff --git a/wolf3d/base/sodsprites/386.tga b/wolf3d/base/sodsprites/386.tga new file mode 100755 index 0000000..aa3b681 Binary files /dev/null and b/wolf3d/base/sodsprites/386.tga differ diff --git a/wolf3d/base/sodsprites/387.tga b/wolf3d/base/sodsprites/387.tga new file mode 100755 index 0000000..65315d8 Binary files /dev/null and b/wolf3d/base/sodsprites/387.tga differ diff --git a/wolf3d/base/sodsprites/388.tga b/wolf3d/base/sodsprites/388.tga new file mode 100755 index 0000000..c894cea Binary files /dev/null and b/wolf3d/base/sodsprites/388.tga differ diff --git a/wolf3d/base/sodsprites/389.tga b/wolf3d/base/sodsprites/389.tga new file mode 100755 index 0000000..012f6a2 Binary files /dev/null and b/wolf3d/base/sodsprites/389.tga differ diff --git a/wolf3d/base/sodsprites/390.tga b/wolf3d/base/sodsprites/390.tga new file mode 100755 index 0000000..5ca9b8a Binary files /dev/null and b/wolf3d/base/sodsprites/390.tga differ diff --git a/wolf3d/base/sodsprites/391.tga b/wolf3d/base/sodsprites/391.tga new file mode 100755 index 0000000..c696ce1 Binary files /dev/null and b/wolf3d/base/sodsprites/391.tga differ diff --git a/wolf3d/base/sodsprites/392.tga b/wolf3d/base/sodsprites/392.tga new file mode 100755 index 0000000..5fd5ea7 Binary files /dev/null and b/wolf3d/base/sodsprites/392.tga differ diff --git a/wolf3d/base/sodsprites/393.tga b/wolf3d/base/sodsprites/393.tga new file mode 100755 index 0000000..01bbe5d Binary files /dev/null and b/wolf3d/base/sodsprites/393.tga differ diff --git a/wolf3d/base/sodsprites/394.tga b/wolf3d/base/sodsprites/394.tga new file mode 100755 index 0000000..fda98ab Binary files /dev/null and b/wolf3d/base/sodsprites/394.tga differ diff --git a/wolf3d/base/sodsprites/395.tga b/wolf3d/base/sodsprites/395.tga new file mode 100755 index 0000000..3f3526c Binary files /dev/null and b/wolf3d/base/sodsprites/395.tga differ diff --git a/wolf3d/base/sodsprites/396.tga b/wolf3d/base/sodsprites/396.tga new file mode 100755 index 0000000..160a270 Binary files /dev/null and b/wolf3d/base/sodsprites/396.tga differ diff --git a/wolf3d/base/sodsprites/397.tga b/wolf3d/base/sodsprites/397.tga new file mode 100755 index 0000000..70bb228 Binary files /dev/null and b/wolf3d/base/sodsprites/397.tga differ diff --git a/wolf3d/base/sodsprites/398.tga b/wolf3d/base/sodsprites/398.tga new file mode 100755 index 0000000..635dd95 Binary files /dev/null and b/wolf3d/base/sodsprites/398.tga differ diff --git a/wolf3d/base/sodsprites/399.tga b/wolf3d/base/sodsprites/399.tga new file mode 100755 index 0000000..238a61b Binary files /dev/null and b/wolf3d/base/sodsprites/399.tga differ diff --git a/wolf3d/base/sodsprites/400.tga b/wolf3d/base/sodsprites/400.tga new file mode 100755 index 0000000..450adcf Binary files /dev/null and b/wolf3d/base/sodsprites/400.tga differ diff --git a/wolf3d/base/sodsprites/401.tga b/wolf3d/base/sodsprites/401.tga new file mode 100755 index 0000000..9f29dae Binary files /dev/null and b/wolf3d/base/sodsprites/401.tga differ diff --git a/wolf3d/base/sodsprites/402.tga b/wolf3d/base/sodsprites/402.tga new file mode 100755 index 0000000..9aad180 Binary files /dev/null and b/wolf3d/base/sodsprites/402.tga differ diff --git a/wolf3d/base/sodsprites/403.tga b/wolf3d/base/sodsprites/403.tga new file mode 100755 index 0000000..7ff8233 Binary files /dev/null and b/wolf3d/base/sodsprites/403.tga differ diff --git a/wolf3d/base/sodsprites/404.tga b/wolf3d/base/sodsprites/404.tga new file mode 100755 index 0000000..fab2822 Binary files /dev/null and b/wolf3d/base/sodsprites/404.tga differ diff --git a/wolf3d/base/sodsprites/405.tga b/wolf3d/base/sodsprites/405.tga new file mode 100755 index 0000000..7ff8233 Binary files /dev/null and b/wolf3d/base/sodsprites/405.tga differ diff --git a/wolf3d/base/sodsprites/406.tga b/wolf3d/base/sodsprites/406.tga new file mode 100755 index 0000000..d406e93 Binary files /dev/null and b/wolf3d/base/sodsprites/406.tga differ diff --git a/wolf3d/base/sodsprites/407.tga b/wolf3d/base/sodsprites/407.tga new file mode 100755 index 0000000..2cd3eaa Binary files /dev/null and b/wolf3d/base/sodsprites/407.tga differ diff --git a/wolf3d/base/sodsprites/408.tga b/wolf3d/base/sodsprites/408.tga new file mode 100755 index 0000000..d785349 Binary files /dev/null and b/wolf3d/base/sodsprites/408.tga differ diff --git a/wolf3d/base/sodsprites/409.tga b/wolf3d/base/sodsprites/409.tga new file mode 100755 index 0000000..6f324f9 Binary files /dev/null and b/wolf3d/base/sodsprites/409.tga differ diff --git a/wolf3d/base/sodsprites/410.tga b/wolf3d/base/sodsprites/410.tga new file mode 100755 index 0000000..a8add3c Binary files /dev/null and b/wolf3d/base/sodsprites/410.tga differ diff --git a/wolf3d/base/sodsprites/411.tga b/wolf3d/base/sodsprites/411.tga new file mode 100755 index 0000000..4e36183 Binary files /dev/null and b/wolf3d/base/sodsprites/411.tga differ diff --git a/wolf3d/base/sodsprites/412.tga b/wolf3d/base/sodsprites/412.tga new file mode 100755 index 0000000..1a9dcf5 Binary files /dev/null and b/wolf3d/base/sodsprites/412.tga differ diff --git a/wolf3d/base/sodsprites/413.tga b/wolf3d/base/sodsprites/413.tga new file mode 100755 index 0000000..70344ec Binary files /dev/null and b/wolf3d/base/sodsprites/413.tga differ diff --git a/wolf3d/base/sodsprites/414.tga b/wolf3d/base/sodsprites/414.tga new file mode 100755 index 0000000..6916fd0 Binary files /dev/null and b/wolf3d/base/sodsprites/414.tga differ diff --git a/wolf3d/base/sodsprites/415.tga b/wolf3d/base/sodsprites/415.tga new file mode 100755 index 0000000..1a9dcf5 Binary files /dev/null and b/wolf3d/base/sodsprites/415.tga differ diff --git a/wolf3d/base/sodsprites/416.tga b/wolf3d/base/sodsprites/416.tga new file mode 100755 index 0000000..ab1f101 Binary files /dev/null and b/wolf3d/base/sodsprites/416.tga differ diff --git a/wolf3d/base/sodsprites/417.tga b/wolf3d/base/sodsprites/417.tga new file mode 100755 index 0000000..981ddde Binary files /dev/null and b/wolf3d/base/sodsprites/417.tga differ diff --git a/wolf3d/base/sodsprites/418.tga b/wolf3d/base/sodsprites/418.tga new file mode 100755 index 0000000..224500a Binary files /dev/null and b/wolf3d/base/sodsprites/418.tga differ diff --git a/wolf3d/base/sodsprites/419.tga b/wolf3d/base/sodsprites/419.tga new file mode 100755 index 0000000..5e7e3d2 Binary files /dev/null and b/wolf3d/base/sodsprites/419.tga differ diff --git a/wolf3d/base/sodsprites/420.tga b/wolf3d/base/sodsprites/420.tga new file mode 100755 index 0000000..5b4bf21 Binary files /dev/null and b/wolf3d/base/sodsprites/420.tga differ diff --git a/wolf3d/base/sodsprites/421.5551 b/wolf3d/base/sodsprites/421.5551 new file mode 100644 index 0000000..f8ccaef Binary files /dev/null and b/wolf3d/base/sodsprites/421.5551 differ diff --git a/wolf3d/base/sodsprites/422.5551 b/wolf3d/base/sodsprites/422.5551 new file mode 100644 index 0000000..9cdd7f9 Binary files /dev/null and b/wolf3d/base/sodsprites/422.5551 differ diff --git a/wolf3d/base/sodsprites/423.5551 b/wolf3d/base/sodsprites/423.5551 new file mode 100644 index 0000000..37bafe8 Binary files /dev/null and b/wolf3d/base/sodsprites/423.5551 differ diff --git a/wolf3d/base/sodsprites/424.5551 b/wolf3d/base/sodsprites/424.5551 new file mode 100644 index 0000000..735616f Binary files /dev/null and b/wolf3d/base/sodsprites/424.5551 differ diff --git a/wolf3d/base/sodsprites/425.5551 b/wolf3d/base/sodsprites/425.5551 new file mode 100644 index 0000000..20b06dd Binary files /dev/null and b/wolf3d/base/sodsprites/425.5551 differ diff --git a/wolf3d/base/sodsprites/426.5551 b/wolf3d/base/sodsprites/426.5551 new file mode 100644 index 0000000..8000aba Binary files /dev/null and b/wolf3d/base/sodsprites/426.5551 differ diff --git a/wolf3d/base/sodsprites/427.5551 b/wolf3d/base/sodsprites/427.5551 new file mode 100644 index 0000000..a7ad818 Binary files /dev/null and b/wolf3d/base/sodsprites/427.5551 differ diff --git a/wolf3d/base/sodsprites/428.5551 b/wolf3d/base/sodsprites/428.5551 new file mode 100644 index 0000000..06f0691 Binary files /dev/null and b/wolf3d/base/sodsprites/428.5551 differ diff --git a/wolf3d/base/sodsprites/429.5551 b/wolf3d/base/sodsprites/429.5551 new file mode 100644 index 0000000..15b648a Binary files /dev/null and b/wolf3d/base/sodsprites/429.5551 differ diff --git a/wolf3d/base/sodsprites/430.5551 b/wolf3d/base/sodsprites/430.5551 new file mode 100644 index 0000000..4d212cd Binary files /dev/null and b/wolf3d/base/sodsprites/430.5551 differ diff --git a/wolf3d/base/sodsprites/431.5551 b/wolf3d/base/sodsprites/431.5551 new file mode 100644 index 0000000..fa7ab94 Binary files /dev/null and b/wolf3d/base/sodsprites/431.5551 differ diff --git a/wolf3d/base/sodsprites/432.5551 b/wolf3d/base/sodsprites/432.5551 new file mode 100644 index 0000000..12d193f Binary files /dev/null and b/wolf3d/base/sodsprites/432.5551 differ diff --git a/wolf3d/base/sodsprites/433.5551 b/wolf3d/base/sodsprites/433.5551 new file mode 100644 index 0000000..1c4999b Binary files /dev/null and b/wolf3d/base/sodsprites/433.5551 differ diff --git a/wolf3d/base/sodsprites/434.5551 b/wolf3d/base/sodsprites/434.5551 new file mode 100644 index 0000000..1764de1 Binary files /dev/null and b/wolf3d/base/sodsprites/434.5551 differ diff --git a/wolf3d/base/sodsprites/435.5551 b/wolf3d/base/sodsprites/435.5551 new file mode 100644 index 0000000..b4d1cd5 Binary files /dev/null and b/wolf3d/base/sodsprites/435.5551 differ diff --git a/wolf3d/base/sodsprites/436.5551 b/wolf3d/base/sodsprites/436.5551 new file mode 100644 index 0000000..167482a Binary files /dev/null and b/wolf3d/base/sodsprites/436.5551 differ diff --git a/wolf3d/base/sodsprites/437.5551 b/wolf3d/base/sodsprites/437.5551 new file mode 100644 index 0000000..56a149c Binary files /dev/null and b/wolf3d/base/sodsprites/437.5551 differ diff --git a/wolf3d/base/sodsprites/438.5551 b/wolf3d/base/sodsprites/438.5551 new file mode 100644 index 0000000..a5b5f8d Binary files /dev/null and b/wolf3d/base/sodsprites/438.5551 differ diff --git a/wolf3d/base/sodsprites/514.5551 b/wolf3d/base/sodsprites/514.5551 new file mode 100644 index 0000000..ebdd1e6 Binary files /dev/null and b/wolf3d/base/sodsprites/514.5551 differ diff --git a/wolf3d/base/sodsprites/515.5551 b/wolf3d/base/sodsprites/515.5551 new file mode 100644 index 0000000..4b821d2 Binary files /dev/null and b/wolf3d/base/sodsprites/515.5551 differ diff --git a/wolf3d/base/sodsprites/516.5551 b/wolf3d/base/sodsprites/516.5551 new file mode 100644 index 0000000..e25bc7f Binary files /dev/null and b/wolf3d/base/sodsprites/516.5551 differ diff --git a/wolf3d/base/sodsprites/517.5551 b/wolf3d/base/sodsprites/517.5551 new file mode 100644 index 0000000..8803a41 Binary files /dev/null and b/wolf3d/base/sodsprites/517.5551 differ diff --git a/wolf3d/base/sodsprites/518.5551 b/wolf3d/base/sodsprites/518.5551 new file mode 100644 index 0000000..e25bc7f Binary files /dev/null and b/wolf3d/base/sodsprites/518.5551 differ diff --git a/wolf3d/base/sodsprites/519.5551 b/wolf3d/base/sodsprites/519.5551 new file mode 100644 index 0000000..5a6a622 Binary files /dev/null and b/wolf3d/base/sodsprites/519.5551 differ diff --git a/wolf3d/base/sodsprites/520.5551 b/wolf3d/base/sodsprites/520.5551 new file mode 100644 index 0000000..d02a938 Binary files /dev/null and b/wolf3d/base/sodsprites/520.5551 differ diff --git a/wolf3d/base/sodsprites/521.5551 b/wolf3d/base/sodsprites/521.5551 new file mode 100644 index 0000000..e98265e Binary files /dev/null and b/wolf3d/base/sodsprites/521.5551 differ diff --git a/wolf3d/base/sodsprites/522.5551 b/wolf3d/base/sodsprites/522.5551 new file mode 100644 index 0000000..6752b7c Binary files /dev/null and b/wolf3d/base/sodsprites/522.5551 differ diff --git a/wolf3d/base/sodsprites/523.5551 b/wolf3d/base/sodsprites/523.5551 new file mode 100644 index 0000000..568aa78 Binary files /dev/null and b/wolf3d/base/sodsprites/523.5551 differ diff --git a/wolf3d/base/sodsprites/524.5551 b/wolf3d/base/sodsprites/524.5551 new file mode 100644 index 0000000..b6cbe6e Binary files /dev/null and b/wolf3d/base/sodsprites/524.5551 differ diff --git a/wolf3d/base/sodsprites/525.5551 b/wolf3d/base/sodsprites/525.5551 new file mode 100644 index 0000000..ab5efd5 Binary files /dev/null and b/wolf3d/base/sodsprites/525.5551 differ diff --git a/wolf3d/base/sodsprites/526.5551 b/wolf3d/base/sodsprites/526.5551 new file mode 100644 index 0000000..6571777 Binary files /dev/null and b/wolf3d/base/sodsprites/526.5551 differ diff --git a/wolf3d/base/sodsprites/527.5551 b/wolf3d/base/sodsprites/527.5551 new file mode 100644 index 0000000..7941a37 Binary files /dev/null and b/wolf3d/base/sodsprites/527.5551 differ diff --git a/wolf3d/base/sodsprites/528.5551 b/wolf3d/base/sodsprites/528.5551 new file mode 100644 index 0000000..ab5efd5 Binary files /dev/null and b/wolf3d/base/sodsprites/528.5551 differ diff --git a/wolf3d/base/sodsprites/529.5551 b/wolf3d/base/sodsprites/529.5551 new file mode 100644 index 0000000..02baa20 Binary files /dev/null and b/wolf3d/base/sodsprites/529.5551 differ diff --git a/wolf3d/base/sodsprites/530.5551 b/wolf3d/base/sodsprites/530.5551 new file mode 100644 index 0000000..3aa485c Binary files /dev/null and b/wolf3d/base/sodsprites/530.5551 differ diff --git a/wolf3d/base/sodsprites/531.5551 b/wolf3d/base/sodsprites/531.5551 new file mode 100644 index 0000000..495ceb2 Binary files /dev/null and b/wolf3d/base/sodsprites/531.5551 differ diff --git a/wolf3d/base/sodsprites/532.5551 b/wolf3d/base/sodsprites/532.5551 new file mode 100644 index 0000000..f7de98e Binary files /dev/null and b/wolf3d/base/sodsprites/532.5551 differ diff --git a/wolf3d/base/sodsprites/533.5551 b/wolf3d/base/sodsprites/533.5551 new file mode 100644 index 0000000..1b95b12 Binary files /dev/null and b/wolf3d/base/sodsprites/533.5551 differ diff --git a/wolf3d/base/sprites/000.tga b/wolf3d/base/sprites/000.tga new file mode 100755 index 0000000..787408a Binary files /dev/null and b/wolf3d/base/sprites/000.tga differ diff --git a/wolf3d/base/sprites/001.tga b/wolf3d/base/sprites/001.tga new file mode 100755 index 0000000..0ab6b16 Binary files /dev/null and b/wolf3d/base/sprites/001.tga differ diff --git a/wolf3d/base/sprites/002.tga b/wolf3d/base/sprites/002.tga new file mode 100755 index 0000000..7110f12 Binary files /dev/null and b/wolf3d/base/sprites/002.tga differ diff --git a/wolf3d/base/sprites/003.tga b/wolf3d/base/sprites/003.tga new file mode 100755 index 0000000..f705d45 Binary files /dev/null and b/wolf3d/base/sprites/003.tga differ diff --git a/wolf3d/base/sprites/004.tga b/wolf3d/base/sprites/004.tga new file mode 100755 index 0000000..bbe3062 Binary files /dev/null and b/wolf3d/base/sprites/004.tga differ diff --git a/wolf3d/base/sprites/005.tga b/wolf3d/base/sprites/005.tga new file mode 100755 index 0000000..f4dca12 Binary files /dev/null and b/wolf3d/base/sprites/005.tga differ diff --git a/wolf3d/base/sprites/006.tga b/wolf3d/base/sprites/006.tga new file mode 100755 index 0000000..0f830d9 Binary files /dev/null and b/wolf3d/base/sprites/006.tga differ diff --git a/wolf3d/base/sprites/007.tga b/wolf3d/base/sprites/007.tga new file mode 100755 index 0000000..dc07eed Binary files /dev/null and b/wolf3d/base/sprites/007.tga differ diff --git a/wolf3d/base/sprites/008.tga b/wolf3d/base/sprites/008.tga new file mode 100755 index 0000000..f98be5a Binary files /dev/null and b/wolf3d/base/sprites/008.tga differ diff --git a/wolf3d/base/sprites/009.tga b/wolf3d/base/sprites/009.tga new file mode 100755 index 0000000..c07b626 Binary files /dev/null and b/wolf3d/base/sprites/009.tga differ diff --git a/wolf3d/base/sprites/010.tga b/wolf3d/base/sprites/010.tga new file mode 100755 index 0000000..e52ffd0 Binary files /dev/null and b/wolf3d/base/sprites/010.tga differ diff --git a/wolf3d/base/sprites/011.tga b/wolf3d/base/sprites/011.tga new file mode 100755 index 0000000..8f89f6b Binary files /dev/null and b/wolf3d/base/sprites/011.tga differ diff --git a/wolf3d/base/sprites/012.tga b/wolf3d/base/sprites/012.tga new file mode 100755 index 0000000..54e9e6e Binary files /dev/null and b/wolf3d/base/sprites/012.tga differ diff --git a/wolf3d/base/sprites/013.tga b/wolf3d/base/sprites/013.tga new file mode 100755 index 0000000..843302a Binary files /dev/null and b/wolf3d/base/sprites/013.tga differ diff --git a/wolf3d/base/sprites/014.tga b/wolf3d/base/sprites/014.tga new file mode 100755 index 0000000..c864b47 Binary files /dev/null and b/wolf3d/base/sprites/014.tga differ diff --git a/wolf3d/base/sprites/015.tga b/wolf3d/base/sprites/015.tga new file mode 100755 index 0000000..6f51d7f Binary files /dev/null and b/wolf3d/base/sprites/015.tga differ diff --git a/wolf3d/base/sprites/016.tga b/wolf3d/base/sprites/016.tga new file mode 100755 index 0000000..9453fbd Binary files /dev/null and b/wolf3d/base/sprites/016.tga differ diff --git a/wolf3d/base/sprites/017.tga b/wolf3d/base/sprites/017.tga new file mode 100755 index 0000000..916a7c9 Binary files /dev/null and b/wolf3d/base/sprites/017.tga differ diff --git a/wolf3d/base/sprites/018.tga b/wolf3d/base/sprites/018.tga new file mode 100755 index 0000000..1c5d637 Binary files /dev/null and b/wolf3d/base/sprites/018.tga differ diff --git a/wolf3d/base/sprites/019.tga b/wolf3d/base/sprites/019.tga new file mode 100755 index 0000000..639cdfd Binary files /dev/null and b/wolf3d/base/sprites/019.tga differ diff --git a/wolf3d/base/sprites/020.tga b/wolf3d/base/sprites/020.tga new file mode 100755 index 0000000..579b854 Binary files /dev/null and b/wolf3d/base/sprites/020.tga differ diff --git a/wolf3d/base/sprites/021.tga b/wolf3d/base/sprites/021.tga new file mode 100755 index 0000000..9dcd2f2 Binary files /dev/null and b/wolf3d/base/sprites/021.tga differ diff --git a/wolf3d/base/sprites/022.tga b/wolf3d/base/sprites/022.tga new file mode 100755 index 0000000..f32bfa8 Binary files /dev/null and b/wolf3d/base/sprites/022.tga differ diff --git a/wolf3d/base/sprites/023.tga b/wolf3d/base/sprites/023.tga new file mode 100755 index 0000000..39c70dd Binary files /dev/null and b/wolf3d/base/sprites/023.tga differ diff --git a/wolf3d/base/sprites/024.tga b/wolf3d/base/sprites/024.tga new file mode 100755 index 0000000..213085f Binary files /dev/null and b/wolf3d/base/sprites/024.tga differ diff --git a/wolf3d/base/sprites/025.tga b/wolf3d/base/sprites/025.tga new file mode 100755 index 0000000..ecfce2b Binary files /dev/null and b/wolf3d/base/sprites/025.tga differ diff --git a/wolf3d/base/sprites/026.tga b/wolf3d/base/sprites/026.tga new file mode 100755 index 0000000..7bc4004 Binary files /dev/null and b/wolf3d/base/sprites/026.tga differ diff --git a/wolf3d/base/sprites/027.tga b/wolf3d/base/sprites/027.tga new file mode 100755 index 0000000..7971885 Binary files /dev/null and b/wolf3d/base/sprites/027.tga differ diff --git a/wolf3d/base/sprites/028.tga b/wolf3d/base/sprites/028.tga new file mode 100755 index 0000000..7a0b784 Binary files /dev/null and b/wolf3d/base/sprites/028.tga differ diff --git a/wolf3d/base/sprites/029.tga b/wolf3d/base/sprites/029.tga new file mode 100755 index 0000000..4f71684 Binary files /dev/null and b/wolf3d/base/sprites/029.tga differ diff --git a/wolf3d/base/sprites/030.tga b/wolf3d/base/sprites/030.tga new file mode 100755 index 0000000..19abf38 Binary files /dev/null and b/wolf3d/base/sprites/030.tga differ diff --git a/wolf3d/base/sprites/031.tga b/wolf3d/base/sprites/031.tga new file mode 100755 index 0000000..b9a4140 Binary files /dev/null and b/wolf3d/base/sprites/031.tga differ diff --git a/wolf3d/base/sprites/032.tga b/wolf3d/base/sprites/032.tga new file mode 100755 index 0000000..32813a7 Binary files /dev/null and b/wolf3d/base/sprites/032.tga differ diff --git a/wolf3d/base/sprites/033.tga b/wolf3d/base/sprites/033.tga new file mode 100755 index 0000000..240db98 Binary files /dev/null and b/wolf3d/base/sprites/033.tga differ diff --git a/wolf3d/base/sprites/034.tga b/wolf3d/base/sprites/034.tga new file mode 100755 index 0000000..8498023 Binary files /dev/null and b/wolf3d/base/sprites/034.tga differ diff --git a/wolf3d/base/sprites/035.tga b/wolf3d/base/sprites/035.tga new file mode 100755 index 0000000..f750019 Binary files /dev/null and b/wolf3d/base/sprites/035.tga differ diff --git a/wolf3d/base/sprites/036.tga b/wolf3d/base/sprites/036.tga new file mode 100755 index 0000000..d285be7 Binary files /dev/null and b/wolf3d/base/sprites/036.tga differ diff --git a/wolf3d/base/sprites/037.tga b/wolf3d/base/sprites/037.tga new file mode 100755 index 0000000..5aadeb6 Binary files /dev/null and b/wolf3d/base/sprites/037.tga differ diff --git a/wolf3d/base/sprites/038.tga b/wolf3d/base/sprites/038.tga new file mode 100755 index 0000000..fd9d66d Binary files /dev/null and b/wolf3d/base/sprites/038.tga differ diff --git a/wolf3d/base/sprites/039.tga b/wolf3d/base/sprites/039.tga new file mode 100755 index 0000000..caaae49 Binary files /dev/null and b/wolf3d/base/sprites/039.tga differ diff --git a/wolf3d/base/sprites/040.tga b/wolf3d/base/sprites/040.tga new file mode 100755 index 0000000..c84d7f0 Binary files /dev/null and b/wolf3d/base/sprites/040.tga differ diff --git a/wolf3d/base/sprites/041.tga b/wolf3d/base/sprites/041.tga new file mode 100755 index 0000000..00f5393 Binary files /dev/null and b/wolf3d/base/sprites/041.tga differ diff --git a/wolf3d/base/sprites/042.tga b/wolf3d/base/sprites/042.tga new file mode 100755 index 0000000..48922b8 Binary files /dev/null and b/wolf3d/base/sprites/042.tga differ diff --git a/wolf3d/base/sprites/043.tga b/wolf3d/base/sprites/043.tga new file mode 100755 index 0000000..28bb481 Binary files /dev/null and b/wolf3d/base/sprites/043.tga differ diff --git a/wolf3d/base/sprites/044.tga b/wolf3d/base/sprites/044.tga new file mode 100755 index 0000000..68527bf Binary files /dev/null and b/wolf3d/base/sprites/044.tga differ diff --git a/wolf3d/base/sprites/045.tga b/wolf3d/base/sprites/045.tga new file mode 100755 index 0000000..4a1fb23 Binary files /dev/null and b/wolf3d/base/sprites/045.tga differ diff --git a/wolf3d/base/sprites/046.tga b/wolf3d/base/sprites/046.tga new file mode 100755 index 0000000..1a2aa97 Binary files /dev/null and b/wolf3d/base/sprites/046.tga differ diff --git a/wolf3d/base/sprites/047.tga b/wolf3d/base/sprites/047.tga new file mode 100755 index 0000000..dc6dba0 Binary files /dev/null and b/wolf3d/base/sprites/047.tga differ diff --git a/wolf3d/base/sprites/048.tga b/wolf3d/base/sprites/048.tga new file mode 100755 index 0000000..bef5188 Binary files /dev/null and b/wolf3d/base/sprites/048.tga differ diff --git a/wolf3d/base/sprites/049.tga b/wolf3d/base/sprites/049.tga new file mode 100755 index 0000000..ec2173b Binary files /dev/null and b/wolf3d/base/sprites/049.tga differ diff --git a/wolf3d/base/sprites/050.tga b/wolf3d/base/sprites/050.tga new file mode 100755 index 0000000..a4b29ce Binary files /dev/null and b/wolf3d/base/sprites/050.tga differ diff --git a/wolf3d/base/sprites/051.tga b/wolf3d/base/sprites/051.tga new file mode 100755 index 0000000..9e6abfe Binary files /dev/null and b/wolf3d/base/sprites/051.tga differ diff --git a/wolf3d/base/sprites/052.tga b/wolf3d/base/sprites/052.tga new file mode 100755 index 0000000..a9b42ec Binary files /dev/null and b/wolf3d/base/sprites/052.tga differ diff --git a/wolf3d/base/sprites/053.tga b/wolf3d/base/sprites/053.tga new file mode 100755 index 0000000..b1da1d9 Binary files /dev/null and b/wolf3d/base/sprites/053.tga differ diff --git a/wolf3d/base/sprites/054.tga b/wolf3d/base/sprites/054.tga new file mode 100755 index 0000000..35b0698 Binary files /dev/null and b/wolf3d/base/sprites/054.tga differ diff --git a/wolf3d/base/sprites/055.tga b/wolf3d/base/sprites/055.tga new file mode 100755 index 0000000..6fc558b Binary files /dev/null and b/wolf3d/base/sprites/055.tga differ diff --git a/wolf3d/base/sprites/056.tga b/wolf3d/base/sprites/056.tga new file mode 100755 index 0000000..93ab4b8 Binary files /dev/null and b/wolf3d/base/sprites/056.tga differ diff --git a/wolf3d/base/sprites/057.tga b/wolf3d/base/sprites/057.tga new file mode 100755 index 0000000..1ae3be5 Binary files /dev/null and b/wolf3d/base/sprites/057.tga differ diff --git a/wolf3d/base/sprites/058.tga b/wolf3d/base/sprites/058.tga new file mode 100755 index 0000000..c10e976 Binary files /dev/null and b/wolf3d/base/sprites/058.tga differ diff --git a/wolf3d/base/sprites/059.tga b/wolf3d/base/sprites/059.tga new file mode 100755 index 0000000..eaa8f0b Binary files /dev/null and b/wolf3d/base/sprites/059.tga differ diff --git a/wolf3d/base/sprites/060.tga b/wolf3d/base/sprites/060.tga new file mode 100755 index 0000000..9801a01 Binary files /dev/null and b/wolf3d/base/sprites/060.tga differ diff --git a/wolf3d/base/sprites/061.tga b/wolf3d/base/sprites/061.tga new file mode 100755 index 0000000..4a23344 Binary files /dev/null and b/wolf3d/base/sprites/061.tga differ diff --git a/wolf3d/base/sprites/062.tga b/wolf3d/base/sprites/062.tga new file mode 100755 index 0000000..0db096a Binary files /dev/null and b/wolf3d/base/sprites/062.tga differ diff --git a/wolf3d/base/sprites/063.tga b/wolf3d/base/sprites/063.tga new file mode 100755 index 0000000..5e50f9e Binary files /dev/null and b/wolf3d/base/sprites/063.tga differ diff --git a/wolf3d/base/sprites/064.tga b/wolf3d/base/sprites/064.tga new file mode 100755 index 0000000..b61e9f4 Binary files /dev/null and b/wolf3d/base/sprites/064.tga differ diff --git a/wolf3d/base/sprites/065.tga b/wolf3d/base/sprites/065.tga new file mode 100755 index 0000000..a780f8c Binary files /dev/null and b/wolf3d/base/sprites/065.tga differ diff --git a/wolf3d/base/sprites/066.tga b/wolf3d/base/sprites/066.tga new file mode 100755 index 0000000..3f5806d Binary files /dev/null and b/wolf3d/base/sprites/066.tga differ diff --git a/wolf3d/base/sprites/067.tga b/wolf3d/base/sprites/067.tga new file mode 100755 index 0000000..f603061 Binary files /dev/null and b/wolf3d/base/sprites/067.tga differ diff --git a/wolf3d/base/sprites/068.tga b/wolf3d/base/sprites/068.tga new file mode 100755 index 0000000..cddef96 Binary files /dev/null and b/wolf3d/base/sprites/068.tga differ diff --git a/wolf3d/base/sprites/069.tga b/wolf3d/base/sprites/069.tga new file mode 100755 index 0000000..6dc67eb Binary files /dev/null and b/wolf3d/base/sprites/069.tga differ diff --git a/wolf3d/base/sprites/070.tga b/wolf3d/base/sprites/070.tga new file mode 100755 index 0000000..9523a4c Binary files /dev/null and b/wolf3d/base/sprites/070.tga differ diff --git a/wolf3d/base/sprites/071.tga b/wolf3d/base/sprites/071.tga new file mode 100755 index 0000000..bff42ff Binary files /dev/null and b/wolf3d/base/sprites/071.tga differ diff --git a/wolf3d/base/sprites/072.tga b/wolf3d/base/sprites/072.tga new file mode 100755 index 0000000..4dc7b97 Binary files /dev/null and b/wolf3d/base/sprites/072.tga differ diff --git a/wolf3d/base/sprites/073.tga b/wolf3d/base/sprites/073.tga new file mode 100755 index 0000000..8701c50 Binary files /dev/null and b/wolf3d/base/sprites/073.tga differ diff --git a/wolf3d/base/sprites/074.tga b/wolf3d/base/sprites/074.tga new file mode 100755 index 0000000..4498e6f Binary files /dev/null and b/wolf3d/base/sprites/074.tga differ diff --git a/wolf3d/base/sprites/075.tga b/wolf3d/base/sprites/075.tga new file mode 100755 index 0000000..a6a257e Binary files /dev/null and b/wolf3d/base/sprites/075.tga differ diff --git a/wolf3d/base/sprites/076.tga b/wolf3d/base/sprites/076.tga new file mode 100755 index 0000000..ee01aa4 Binary files /dev/null and b/wolf3d/base/sprites/076.tga differ diff --git a/wolf3d/base/sprites/077.tga b/wolf3d/base/sprites/077.tga new file mode 100755 index 0000000..d90fd93 Binary files /dev/null and b/wolf3d/base/sprites/077.tga differ diff --git a/wolf3d/base/sprites/078.tga b/wolf3d/base/sprites/078.tga new file mode 100755 index 0000000..29e1012 Binary files /dev/null and b/wolf3d/base/sprites/078.tga differ diff --git a/wolf3d/base/sprites/079.tga b/wolf3d/base/sprites/079.tga new file mode 100755 index 0000000..35047b8 Binary files /dev/null and b/wolf3d/base/sprites/079.tga differ diff --git a/wolf3d/base/sprites/080.tga b/wolf3d/base/sprites/080.tga new file mode 100755 index 0000000..77d1b40 Binary files /dev/null and b/wolf3d/base/sprites/080.tga differ diff --git a/wolf3d/base/sprites/081.tga b/wolf3d/base/sprites/081.tga new file mode 100755 index 0000000..ccb5d86 Binary files /dev/null and b/wolf3d/base/sprites/081.tga differ diff --git a/wolf3d/base/sprites/082.tga b/wolf3d/base/sprites/082.tga new file mode 100755 index 0000000..7dd70f4 Binary files /dev/null and b/wolf3d/base/sprites/082.tga differ diff --git a/wolf3d/base/sprites/083.tga b/wolf3d/base/sprites/083.tga new file mode 100755 index 0000000..0ff374f Binary files /dev/null and b/wolf3d/base/sprites/083.tga differ diff --git a/wolf3d/base/sprites/084.tga b/wolf3d/base/sprites/084.tga new file mode 100755 index 0000000..c9bbb7c Binary files /dev/null and b/wolf3d/base/sprites/084.tga differ diff --git a/wolf3d/base/sprites/085.tga b/wolf3d/base/sprites/085.tga new file mode 100755 index 0000000..e94a135 Binary files /dev/null and b/wolf3d/base/sprites/085.tga differ diff --git a/wolf3d/base/sprites/086.tga b/wolf3d/base/sprites/086.tga new file mode 100755 index 0000000..60e668f Binary files /dev/null and b/wolf3d/base/sprites/086.tga differ diff --git a/wolf3d/base/sprites/087.tga b/wolf3d/base/sprites/087.tga new file mode 100755 index 0000000..b232b30 Binary files /dev/null and b/wolf3d/base/sprites/087.tga differ diff --git a/wolf3d/base/sprites/088.tga b/wolf3d/base/sprites/088.tga new file mode 100755 index 0000000..c412983 Binary files /dev/null and b/wolf3d/base/sprites/088.tga differ diff --git a/wolf3d/base/sprites/089.tga b/wolf3d/base/sprites/089.tga new file mode 100755 index 0000000..f98e918 Binary files /dev/null and b/wolf3d/base/sprites/089.tga differ diff --git a/wolf3d/base/sprites/090.tga b/wolf3d/base/sprites/090.tga new file mode 100755 index 0000000..3a28114 Binary files /dev/null and b/wolf3d/base/sprites/090.tga differ diff --git a/wolf3d/base/sprites/091.tga b/wolf3d/base/sprites/091.tga new file mode 100755 index 0000000..c1a4b05 Binary files /dev/null and b/wolf3d/base/sprites/091.tga differ diff --git a/wolf3d/base/sprites/092.tga b/wolf3d/base/sprites/092.tga new file mode 100755 index 0000000..cd05487 Binary files /dev/null and b/wolf3d/base/sprites/092.tga differ diff --git a/wolf3d/base/sprites/093.tga b/wolf3d/base/sprites/093.tga new file mode 100755 index 0000000..327c661 Binary files /dev/null and b/wolf3d/base/sprites/093.tga differ diff --git a/wolf3d/base/sprites/094.tga b/wolf3d/base/sprites/094.tga new file mode 100755 index 0000000..918703b Binary files /dev/null and b/wolf3d/base/sprites/094.tga differ diff --git a/wolf3d/base/sprites/095.tga b/wolf3d/base/sprites/095.tga new file mode 100755 index 0000000..ac5d80f Binary files /dev/null and b/wolf3d/base/sprites/095.tga differ diff --git a/wolf3d/base/sprites/096.tga b/wolf3d/base/sprites/096.tga new file mode 100755 index 0000000..bc9e7e3 Binary files /dev/null and b/wolf3d/base/sprites/096.tga differ diff --git a/wolf3d/base/sprites/097.tga b/wolf3d/base/sprites/097.tga new file mode 100755 index 0000000..ef027b6 Binary files /dev/null and b/wolf3d/base/sprites/097.tga differ diff --git a/wolf3d/base/sprites/098.tga b/wolf3d/base/sprites/098.tga new file mode 100755 index 0000000..4ac1215 Binary files /dev/null and b/wolf3d/base/sprites/098.tga differ diff --git a/wolf3d/base/sprites/099.tga b/wolf3d/base/sprites/099.tga new file mode 100755 index 0000000..8fc914d Binary files /dev/null and b/wolf3d/base/sprites/099.tga differ diff --git a/wolf3d/base/sprites/100.tga b/wolf3d/base/sprites/100.tga new file mode 100755 index 0000000..9591148 Binary files /dev/null and b/wolf3d/base/sprites/100.tga differ diff --git a/wolf3d/base/sprites/101.tga b/wolf3d/base/sprites/101.tga new file mode 100755 index 0000000..c80eba4 Binary files /dev/null and b/wolf3d/base/sprites/101.tga differ diff --git a/wolf3d/base/sprites/102.tga b/wolf3d/base/sprites/102.tga new file mode 100755 index 0000000..c2bc89b Binary files /dev/null and b/wolf3d/base/sprites/102.tga differ diff --git a/wolf3d/base/sprites/103.tga b/wolf3d/base/sprites/103.tga new file mode 100755 index 0000000..1a73730 Binary files /dev/null and b/wolf3d/base/sprites/103.tga differ diff --git a/wolf3d/base/sprites/104.tga b/wolf3d/base/sprites/104.tga new file mode 100755 index 0000000..5aea74e Binary files /dev/null and b/wolf3d/base/sprites/104.tga differ diff --git a/wolf3d/base/sprites/105.tga b/wolf3d/base/sprites/105.tga new file mode 100755 index 0000000..21c932b Binary files /dev/null and b/wolf3d/base/sprites/105.tga differ diff --git a/wolf3d/base/sprites/106.tga b/wolf3d/base/sprites/106.tga new file mode 100755 index 0000000..3ff5a9f Binary files /dev/null and b/wolf3d/base/sprites/106.tga differ diff --git a/wolf3d/base/sprites/107.tga b/wolf3d/base/sprites/107.tga new file mode 100755 index 0000000..cb61fe3 Binary files /dev/null and b/wolf3d/base/sprites/107.tga differ diff --git a/wolf3d/base/sprites/108.tga b/wolf3d/base/sprites/108.tga new file mode 100755 index 0000000..66f53d3 Binary files /dev/null and b/wolf3d/base/sprites/108.tga differ diff --git a/wolf3d/base/sprites/109.tga b/wolf3d/base/sprites/109.tga new file mode 100755 index 0000000..e10126e Binary files /dev/null and b/wolf3d/base/sprites/109.tga differ diff --git a/wolf3d/base/sprites/110.tga b/wolf3d/base/sprites/110.tga new file mode 100755 index 0000000..120c1c2 Binary files /dev/null and b/wolf3d/base/sprites/110.tga differ diff --git a/wolf3d/base/sprites/111.tga b/wolf3d/base/sprites/111.tga new file mode 100755 index 0000000..6ecf608 Binary files /dev/null and b/wolf3d/base/sprites/111.tga differ diff --git a/wolf3d/base/sprites/112.tga b/wolf3d/base/sprites/112.tga new file mode 100755 index 0000000..5c55e4c Binary files /dev/null and b/wolf3d/base/sprites/112.tga differ diff --git a/wolf3d/base/sprites/113.tga b/wolf3d/base/sprites/113.tga new file mode 100755 index 0000000..b9a8e40 Binary files /dev/null and b/wolf3d/base/sprites/113.tga differ diff --git a/wolf3d/base/sprites/114.tga b/wolf3d/base/sprites/114.tga new file mode 100755 index 0000000..7b9218e Binary files /dev/null and b/wolf3d/base/sprites/114.tga differ diff --git a/wolf3d/base/sprites/115.tga b/wolf3d/base/sprites/115.tga new file mode 100755 index 0000000..fbdb4af Binary files /dev/null and b/wolf3d/base/sprites/115.tga differ diff --git a/wolf3d/base/sprites/116.tga b/wolf3d/base/sprites/116.tga new file mode 100755 index 0000000..452cb36 Binary files /dev/null and b/wolf3d/base/sprites/116.tga differ diff --git a/wolf3d/base/sprites/117.tga b/wolf3d/base/sprites/117.tga new file mode 100755 index 0000000..8f359a8 Binary files /dev/null and b/wolf3d/base/sprites/117.tga differ diff --git a/wolf3d/base/sprites/118.tga b/wolf3d/base/sprites/118.tga new file mode 100755 index 0000000..248e58c Binary files /dev/null and b/wolf3d/base/sprites/118.tga differ diff --git a/wolf3d/base/sprites/119.tga b/wolf3d/base/sprites/119.tga new file mode 100755 index 0000000..e52f626 Binary files /dev/null and b/wolf3d/base/sprites/119.tga differ diff --git a/wolf3d/base/sprites/120.tga b/wolf3d/base/sprites/120.tga new file mode 100755 index 0000000..ede09ca Binary files /dev/null and b/wolf3d/base/sprites/120.tga differ diff --git a/wolf3d/base/sprites/121.tga b/wolf3d/base/sprites/121.tga new file mode 100755 index 0000000..024bee3 Binary files /dev/null and b/wolf3d/base/sprites/121.tga differ diff --git a/wolf3d/base/sprites/122.tga b/wolf3d/base/sprites/122.tga new file mode 100755 index 0000000..171251e Binary files /dev/null and b/wolf3d/base/sprites/122.tga differ diff --git a/wolf3d/base/sprites/123.tga b/wolf3d/base/sprites/123.tga new file mode 100755 index 0000000..76bd592 Binary files /dev/null and b/wolf3d/base/sprites/123.tga differ diff --git a/wolf3d/base/sprites/124.tga b/wolf3d/base/sprites/124.tga new file mode 100755 index 0000000..8b98906 Binary files /dev/null and b/wolf3d/base/sprites/124.tga differ diff --git a/wolf3d/base/sprites/125.tga b/wolf3d/base/sprites/125.tga new file mode 100755 index 0000000..7e41657 Binary files /dev/null and b/wolf3d/base/sprites/125.tga differ diff --git a/wolf3d/base/sprites/126.tga b/wolf3d/base/sprites/126.tga new file mode 100755 index 0000000..da317b5 Binary files /dev/null and b/wolf3d/base/sprites/126.tga differ diff --git a/wolf3d/base/sprites/127.tga b/wolf3d/base/sprites/127.tga new file mode 100755 index 0000000..38458f9 Binary files /dev/null and b/wolf3d/base/sprites/127.tga differ diff --git a/wolf3d/base/sprites/128.tga b/wolf3d/base/sprites/128.tga new file mode 100755 index 0000000..e9de30e Binary files /dev/null and b/wolf3d/base/sprites/128.tga differ diff --git a/wolf3d/base/sprites/129.tga b/wolf3d/base/sprites/129.tga new file mode 100755 index 0000000..15b0ab1 Binary files /dev/null and b/wolf3d/base/sprites/129.tga differ diff --git a/wolf3d/base/sprites/130.tga b/wolf3d/base/sprites/130.tga new file mode 100755 index 0000000..0f6c80e Binary files /dev/null and b/wolf3d/base/sprites/130.tga differ diff --git a/wolf3d/base/sprites/131.tga b/wolf3d/base/sprites/131.tga new file mode 100755 index 0000000..a973c67 Binary files /dev/null and b/wolf3d/base/sprites/131.tga differ diff --git a/wolf3d/base/sprites/132.tga b/wolf3d/base/sprites/132.tga new file mode 100755 index 0000000..77448f6 Binary files /dev/null and b/wolf3d/base/sprites/132.tga differ diff --git a/wolf3d/base/sprites/133.tga b/wolf3d/base/sprites/133.tga new file mode 100755 index 0000000..ab97c28 Binary files /dev/null and b/wolf3d/base/sprites/133.tga differ diff --git a/wolf3d/base/sprites/134.tga b/wolf3d/base/sprites/134.tga new file mode 100755 index 0000000..1024631 Binary files /dev/null and b/wolf3d/base/sprites/134.tga differ diff --git a/wolf3d/base/sprites/135.tga b/wolf3d/base/sprites/135.tga new file mode 100755 index 0000000..b494abd Binary files /dev/null and b/wolf3d/base/sprites/135.tga differ diff --git a/wolf3d/base/sprites/136.tga b/wolf3d/base/sprites/136.tga new file mode 100755 index 0000000..604f028 Binary files /dev/null and b/wolf3d/base/sprites/136.tga differ diff --git a/wolf3d/base/sprites/137.tga b/wolf3d/base/sprites/137.tga new file mode 100755 index 0000000..d2be9cc Binary files /dev/null and b/wolf3d/base/sprites/137.tga differ diff --git a/wolf3d/base/sprites/138.tga b/wolf3d/base/sprites/138.tga new file mode 100755 index 0000000..6507422 Binary files /dev/null and b/wolf3d/base/sprites/138.tga differ diff --git a/wolf3d/base/sprites/139.tga b/wolf3d/base/sprites/139.tga new file mode 100755 index 0000000..b2b0ce7 Binary files /dev/null and b/wolf3d/base/sprites/139.tga differ diff --git a/wolf3d/base/sprites/140.tga b/wolf3d/base/sprites/140.tga new file mode 100755 index 0000000..8b0be4e Binary files /dev/null and b/wolf3d/base/sprites/140.tga differ diff --git a/wolf3d/base/sprites/141.tga b/wolf3d/base/sprites/141.tga new file mode 100755 index 0000000..cf784f6 Binary files /dev/null and b/wolf3d/base/sprites/141.tga differ diff --git a/wolf3d/base/sprites/142.tga b/wolf3d/base/sprites/142.tga new file mode 100755 index 0000000..233aef0 Binary files /dev/null and b/wolf3d/base/sprites/142.tga differ diff --git a/wolf3d/base/sprites/143.tga b/wolf3d/base/sprites/143.tga new file mode 100755 index 0000000..84a4c73 Binary files /dev/null and b/wolf3d/base/sprites/143.tga differ diff --git a/wolf3d/base/sprites/144.tga b/wolf3d/base/sprites/144.tga new file mode 100755 index 0000000..4e016b4 Binary files /dev/null and b/wolf3d/base/sprites/144.tga differ diff --git a/wolf3d/base/sprites/145.tga b/wolf3d/base/sprites/145.tga new file mode 100755 index 0000000..2050627 Binary files /dev/null and b/wolf3d/base/sprites/145.tga differ diff --git a/wolf3d/base/sprites/146.tga b/wolf3d/base/sprites/146.tga new file mode 100755 index 0000000..377b99f Binary files /dev/null and b/wolf3d/base/sprites/146.tga differ diff --git a/wolf3d/base/sprites/147.tga b/wolf3d/base/sprites/147.tga new file mode 100755 index 0000000..9940a2f Binary files /dev/null and b/wolf3d/base/sprites/147.tga differ diff --git a/wolf3d/base/sprites/148.tga b/wolf3d/base/sprites/148.tga new file mode 100755 index 0000000..eb33a4c Binary files /dev/null and b/wolf3d/base/sprites/148.tga differ diff --git a/wolf3d/base/sprites/149.tga b/wolf3d/base/sprites/149.tga new file mode 100755 index 0000000..ccfb180 Binary files /dev/null and b/wolf3d/base/sprites/149.tga differ diff --git a/wolf3d/base/sprites/150.tga b/wolf3d/base/sprites/150.tga new file mode 100755 index 0000000..fb32929 Binary files /dev/null and b/wolf3d/base/sprites/150.tga differ diff --git a/wolf3d/base/sprites/151.tga b/wolf3d/base/sprites/151.tga new file mode 100755 index 0000000..c2c5bb6 Binary files /dev/null and b/wolf3d/base/sprites/151.tga differ diff --git a/wolf3d/base/sprites/152.tga b/wolf3d/base/sprites/152.tga new file mode 100755 index 0000000..43168d6 Binary files /dev/null and b/wolf3d/base/sprites/152.tga differ diff --git a/wolf3d/base/sprites/153.tga b/wolf3d/base/sprites/153.tga new file mode 100755 index 0000000..853aa20 Binary files /dev/null and b/wolf3d/base/sprites/153.tga differ diff --git a/wolf3d/base/sprites/154.tga b/wolf3d/base/sprites/154.tga new file mode 100755 index 0000000..e075fa8 Binary files /dev/null and b/wolf3d/base/sprites/154.tga differ diff --git a/wolf3d/base/sprites/155.tga b/wolf3d/base/sprites/155.tga new file mode 100755 index 0000000..c18c5f3 Binary files /dev/null and b/wolf3d/base/sprites/155.tga differ diff --git a/wolf3d/base/sprites/156.tga b/wolf3d/base/sprites/156.tga new file mode 100755 index 0000000..eb0d181 Binary files /dev/null and b/wolf3d/base/sprites/156.tga differ diff --git a/wolf3d/base/sprites/157.tga b/wolf3d/base/sprites/157.tga new file mode 100755 index 0000000..2ab50ee Binary files /dev/null and b/wolf3d/base/sprites/157.tga differ diff --git a/wolf3d/base/sprites/158.tga b/wolf3d/base/sprites/158.tga new file mode 100755 index 0000000..3ff97f8 Binary files /dev/null and b/wolf3d/base/sprites/158.tga differ diff --git a/wolf3d/base/sprites/159.tga b/wolf3d/base/sprites/159.tga new file mode 100755 index 0000000..8d125fe Binary files /dev/null and b/wolf3d/base/sprites/159.tga differ diff --git a/wolf3d/base/sprites/160.tga b/wolf3d/base/sprites/160.tga new file mode 100755 index 0000000..28ec54e Binary files /dev/null and b/wolf3d/base/sprites/160.tga differ diff --git a/wolf3d/base/sprites/161.tga b/wolf3d/base/sprites/161.tga new file mode 100755 index 0000000..2582058 Binary files /dev/null and b/wolf3d/base/sprites/161.tga differ diff --git a/wolf3d/base/sprites/162.tga b/wolf3d/base/sprites/162.tga new file mode 100755 index 0000000..e9d5037 Binary files /dev/null and b/wolf3d/base/sprites/162.tga differ diff --git a/wolf3d/base/sprites/163.tga b/wolf3d/base/sprites/163.tga new file mode 100755 index 0000000..46da00e Binary files /dev/null and b/wolf3d/base/sprites/163.tga differ diff --git a/wolf3d/base/sprites/164.tga b/wolf3d/base/sprites/164.tga new file mode 100755 index 0000000..ab79590 Binary files /dev/null and b/wolf3d/base/sprites/164.tga differ diff --git a/wolf3d/base/sprites/165.tga b/wolf3d/base/sprites/165.tga new file mode 100755 index 0000000..c201a2e Binary files /dev/null and b/wolf3d/base/sprites/165.tga differ diff --git a/wolf3d/base/sprites/166.tga b/wolf3d/base/sprites/166.tga new file mode 100755 index 0000000..8c72287 Binary files /dev/null and b/wolf3d/base/sprites/166.tga differ diff --git a/wolf3d/base/sprites/167.tga b/wolf3d/base/sprites/167.tga new file mode 100755 index 0000000..ed1d904 Binary files /dev/null and b/wolf3d/base/sprites/167.tga differ diff --git a/wolf3d/base/sprites/168.tga b/wolf3d/base/sprites/168.tga new file mode 100755 index 0000000..75ac923 Binary files /dev/null and b/wolf3d/base/sprites/168.tga differ diff --git a/wolf3d/base/sprites/169.tga b/wolf3d/base/sprites/169.tga new file mode 100755 index 0000000..97f3d80 Binary files /dev/null and b/wolf3d/base/sprites/169.tga differ diff --git a/wolf3d/base/sprites/170.tga b/wolf3d/base/sprites/170.tga new file mode 100755 index 0000000..7a6231a Binary files /dev/null and b/wolf3d/base/sprites/170.tga differ diff --git a/wolf3d/base/sprites/171.tga b/wolf3d/base/sprites/171.tga new file mode 100755 index 0000000..533578b Binary files /dev/null and b/wolf3d/base/sprites/171.tga differ diff --git a/wolf3d/base/sprites/172.tga b/wolf3d/base/sprites/172.tga new file mode 100755 index 0000000..ffa0292 Binary files /dev/null and b/wolf3d/base/sprites/172.tga differ diff --git a/wolf3d/base/sprites/173.tga b/wolf3d/base/sprites/173.tga new file mode 100755 index 0000000..7b05fc1 Binary files /dev/null and b/wolf3d/base/sprites/173.tga differ diff --git a/wolf3d/base/sprites/174.tga b/wolf3d/base/sprites/174.tga new file mode 100755 index 0000000..85195bd Binary files /dev/null and b/wolf3d/base/sprites/174.tga differ diff --git a/wolf3d/base/sprites/175.tga b/wolf3d/base/sprites/175.tga new file mode 100755 index 0000000..aaa3eb5 Binary files /dev/null and b/wolf3d/base/sprites/175.tga differ diff --git a/wolf3d/base/sprites/176.tga b/wolf3d/base/sprites/176.tga new file mode 100755 index 0000000..4d4a9a0 Binary files /dev/null and b/wolf3d/base/sprites/176.tga differ diff --git a/wolf3d/base/sprites/177.tga b/wolf3d/base/sprites/177.tga new file mode 100755 index 0000000..6a6fe6b Binary files /dev/null and b/wolf3d/base/sprites/177.tga differ diff --git a/wolf3d/base/sprites/178.tga b/wolf3d/base/sprites/178.tga new file mode 100755 index 0000000..ee9e93a Binary files /dev/null and b/wolf3d/base/sprites/178.tga differ diff --git a/wolf3d/base/sprites/179.tga b/wolf3d/base/sprites/179.tga new file mode 100755 index 0000000..5e8c1b4 Binary files /dev/null and b/wolf3d/base/sprites/179.tga differ diff --git a/wolf3d/base/sprites/180.tga b/wolf3d/base/sprites/180.tga new file mode 100755 index 0000000..d0b07eb Binary files /dev/null and b/wolf3d/base/sprites/180.tga differ diff --git a/wolf3d/base/sprites/181.tga b/wolf3d/base/sprites/181.tga new file mode 100755 index 0000000..947a374 Binary files /dev/null and b/wolf3d/base/sprites/181.tga differ diff --git a/wolf3d/base/sprites/182.tga b/wolf3d/base/sprites/182.tga new file mode 100755 index 0000000..e3968b2 Binary files /dev/null and b/wolf3d/base/sprites/182.tga differ diff --git a/wolf3d/base/sprites/183.tga b/wolf3d/base/sprites/183.tga new file mode 100755 index 0000000..07b685b Binary files /dev/null and b/wolf3d/base/sprites/183.tga differ diff --git a/wolf3d/base/sprites/184.tga b/wolf3d/base/sprites/184.tga new file mode 100755 index 0000000..284c18c Binary files /dev/null and b/wolf3d/base/sprites/184.tga differ diff --git a/wolf3d/base/sprites/185.tga b/wolf3d/base/sprites/185.tga new file mode 100755 index 0000000..84eed92 Binary files /dev/null and b/wolf3d/base/sprites/185.tga differ diff --git a/wolf3d/base/sprites/186.tga b/wolf3d/base/sprites/186.tga new file mode 100755 index 0000000..76caf9e Binary files /dev/null and b/wolf3d/base/sprites/186.tga differ diff --git a/wolf3d/base/sprites/187.tga b/wolf3d/base/sprites/187.tga new file mode 100755 index 0000000..a3a86dc Binary files /dev/null and b/wolf3d/base/sprites/187.tga differ diff --git a/wolf3d/base/sprites/188.tga b/wolf3d/base/sprites/188.tga new file mode 100755 index 0000000..14ec591 Binary files /dev/null and b/wolf3d/base/sprites/188.tga differ diff --git a/wolf3d/base/sprites/189.tga b/wolf3d/base/sprites/189.tga new file mode 100755 index 0000000..fbd108f Binary files /dev/null and b/wolf3d/base/sprites/189.tga differ diff --git a/wolf3d/base/sprites/190.tga b/wolf3d/base/sprites/190.tga new file mode 100755 index 0000000..a515e6b Binary files /dev/null and b/wolf3d/base/sprites/190.tga differ diff --git a/wolf3d/base/sprites/191.tga b/wolf3d/base/sprites/191.tga new file mode 100755 index 0000000..ba25a04 Binary files /dev/null and b/wolf3d/base/sprites/191.tga differ diff --git a/wolf3d/base/sprites/192.tga b/wolf3d/base/sprites/192.tga new file mode 100755 index 0000000..bd2650d Binary files /dev/null and b/wolf3d/base/sprites/192.tga differ diff --git a/wolf3d/base/sprites/193.tga b/wolf3d/base/sprites/193.tga new file mode 100755 index 0000000..1d1a802 Binary files /dev/null and b/wolf3d/base/sprites/193.tga differ diff --git a/wolf3d/base/sprites/194.tga b/wolf3d/base/sprites/194.tga new file mode 100755 index 0000000..4478d4f Binary files /dev/null and b/wolf3d/base/sprites/194.tga differ diff --git a/wolf3d/base/sprites/195.tga b/wolf3d/base/sprites/195.tga new file mode 100755 index 0000000..8ded133 Binary files /dev/null and b/wolf3d/base/sprites/195.tga differ diff --git a/wolf3d/base/sprites/196.tga b/wolf3d/base/sprites/196.tga new file mode 100755 index 0000000..71b7fd8 Binary files /dev/null and b/wolf3d/base/sprites/196.tga differ diff --git a/wolf3d/base/sprites/197.tga b/wolf3d/base/sprites/197.tga new file mode 100755 index 0000000..55dd243 Binary files /dev/null and b/wolf3d/base/sprites/197.tga differ diff --git a/wolf3d/base/sprites/198.tga b/wolf3d/base/sprites/198.tga new file mode 100755 index 0000000..b9a33dc Binary files /dev/null and b/wolf3d/base/sprites/198.tga differ diff --git a/wolf3d/base/sprites/199.tga b/wolf3d/base/sprites/199.tga new file mode 100755 index 0000000..e52875c Binary files /dev/null and b/wolf3d/base/sprites/199.tga differ diff --git a/wolf3d/base/sprites/200.tga b/wolf3d/base/sprites/200.tga new file mode 100755 index 0000000..c777a1b Binary files /dev/null and b/wolf3d/base/sprites/200.tga differ diff --git a/wolf3d/base/sprites/201.tga b/wolf3d/base/sprites/201.tga new file mode 100755 index 0000000..8739a2e Binary files /dev/null and b/wolf3d/base/sprites/201.tga differ diff --git a/wolf3d/base/sprites/202.tga b/wolf3d/base/sprites/202.tga new file mode 100755 index 0000000..d2c32ca Binary files /dev/null and b/wolf3d/base/sprites/202.tga differ diff --git a/wolf3d/base/sprites/203.tga b/wolf3d/base/sprites/203.tga new file mode 100755 index 0000000..04f6bc9 Binary files /dev/null and b/wolf3d/base/sprites/203.tga differ diff --git a/wolf3d/base/sprites/204.tga b/wolf3d/base/sprites/204.tga new file mode 100755 index 0000000..e9621b7 Binary files /dev/null and b/wolf3d/base/sprites/204.tga differ diff --git a/wolf3d/base/sprites/205.tga b/wolf3d/base/sprites/205.tga new file mode 100755 index 0000000..e3377fe Binary files /dev/null and b/wolf3d/base/sprites/205.tga differ diff --git a/wolf3d/base/sprites/206.tga b/wolf3d/base/sprites/206.tga new file mode 100755 index 0000000..eb3512f Binary files /dev/null and b/wolf3d/base/sprites/206.tga differ diff --git a/wolf3d/base/sprites/207.tga b/wolf3d/base/sprites/207.tga new file mode 100755 index 0000000..3c523ea Binary files /dev/null and b/wolf3d/base/sprites/207.tga differ diff --git a/wolf3d/base/sprites/208.tga b/wolf3d/base/sprites/208.tga new file mode 100755 index 0000000..e60d896 Binary files /dev/null and b/wolf3d/base/sprites/208.tga differ diff --git a/wolf3d/base/sprites/209.tga b/wolf3d/base/sprites/209.tga new file mode 100755 index 0000000..c5f8c8a Binary files /dev/null and b/wolf3d/base/sprites/209.tga differ diff --git a/wolf3d/base/sprites/210.tga b/wolf3d/base/sprites/210.tga new file mode 100755 index 0000000..5d4a8fe Binary files /dev/null and b/wolf3d/base/sprites/210.tga differ diff --git a/wolf3d/base/sprites/211.tga b/wolf3d/base/sprites/211.tga new file mode 100755 index 0000000..8fee0c9 Binary files /dev/null and b/wolf3d/base/sprites/211.tga differ diff --git a/wolf3d/base/sprites/212.tga b/wolf3d/base/sprites/212.tga new file mode 100755 index 0000000..85ff499 Binary files /dev/null and b/wolf3d/base/sprites/212.tga differ diff --git a/wolf3d/base/sprites/213.tga b/wolf3d/base/sprites/213.tga new file mode 100755 index 0000000..ed9fda6 Binary files /dev/null and b/wolf3d/base/sprites/213.tga differ diff --git a/wolf3d/base/sprites/214.tga b/wolf3d/base/sprites/214.tga new file mode 100755 index 0000000..81b0008 Binary files /dev/null and b/wolf3d/base/sprites/214.tga differ diff --git a/wolf3d/base/sprites/215.tga b/wolf3d/base/sprites/215.tga new file mode 100755 index 0000000..44a0a85 Binary files /dev/null and b/wolf3d/base/sprites/215.tga differ diff --git a/wolf3d/base/sprites/216.tga b/wolf3d/base/sprites/216.tga new file mode 100755 index 0000000..4168757 Binary files /dev/null and b/wolf3d/base/sprites/216.tga differ diff --git a/wolf3d/base/sprites/217.tga b/wolf3d/base/sprites/217.tga new file mode 100755 index 0000000..70664a9 Binary files /dev/null and b/wolf3d/base/sprites/217.tga differ diff --git a/wolf3d/base/sprites/218.tga b/wolf3d/base/sprites/218.tga new file mode 100755 index 0000000..e874dd9 Binary files /dev/null and b/wolf3d/base/sprites/218.tga differ diff --git a/wolf3d/base/sprites/219.tga b/wolf3d/base/sprites/219.tga new file mode 100755 index 0000000..5a93d74 Binary files /dev/null and b/wolf3d/base/sprites/219.tga differ diff --git a/wolf3d/base/sprites/220.tga b/wolf3d/base/sprites/220.tga new file mode 100755 index 0000000..faf06ee Binary files /dev/null and b/wolf3d/base/sprites/220.tga differ diff --git a/wolf3d/base/sprites/221.tga b/wolf3d/base/sprites/221.tga new file mode 100755 index 0000000..af444b7 Binary files /dev/null and b/wolf3d/base/sprites/221.tga differ diff --git a/wolf3d/base/sprites/222.tga b/wolf3d/base/sprites/222.tga new file mode 100755 index 0000000..1c42f18 Binary files /dev/null and b/wolf3d/base/sprites/222.tga differ diff --git a/wolf3d/base/sprites/223.tga b/wolf3d/base/sprites/223.tga new file mode 100755 index 0000000..0042844 Binary files /dev/null and b/wolf3d/base/sprites/223.tga differ diff --git a/wolf3d/base/sprites/224.tga b/wolf3d/base/sprites/224.tga new file mode 100755 index 0000000..942576f Binary files /dev/null and b/wolf3d/base/sprites/224.tga differ diff --git a/wolf3d/base/sprites/225.tga b/wolf3d/base/sprites/225.tga new file mode 100755 index 0000000..d354293 Binary files /dev/null and b/wolf3d/base/sprites/225.tga differ diff --git a/wolf3d/base/sprites/226.tga b/wolf3d/base/sprites/226.tga new file mode 100755 index 0000000..7549bd4 Binary files /dev/null and b/wolf3d/base/sprites/226.tga differ diff --git a/wolf3d/base/sprites/227.tga b/wolf3d/base/sprites/227.tga new file mode 100755 index 0000000..8673fac Binary files /dev/null and b/wolf3d/base/sprites/227.tga differ diff --git a/wolf3d/base/sprites/228.tga b/wolf3d/base/sprites/228.tga new file mode 100755 index 0000000..2b343a8 Binary files /dev/null and b/wolf3d/base/sprites/228.tga differ diff --git a/wolf3d/base/sprites/229.tga b/wolf3d/base/sprites/229.tga new file mode 100755 index 0000000..3fe479e Binary files /dev/null and b/wolf3d/base/sprites/229.tga differ diff --git a/wolf3d/base/sprites/230.tga b/wolf3d/base/sprites/230.tga new file mode 100755 index 0000000..337b625 Binary files /dev/null and b/wolf3d/base/sprites/230.tga differ diff --git a/wolf3d/base/sprites/231.tga b/wolf3d/base/sprites/231.tga new file mode 100755 index 0000000..972863b Binary files /dev/null and b/wolf3d/base/sprites/231.tga differ diff --git a/wolf3d/base/sprites/232.tga b/wolf3d/base/sprites/232.tga new file mode 100755 index 0000000..232d7d0 Binary files /dev/null and b/wolf3d/base/sprites/232.tga differ diff --git a/wolf3d/base/sprites/233.tga b/wolf3d/base/sprites/233.tga new file mode 100755 index 0000000..841f61c Binary files /dev/null and b/wolf3d/base/sprites/233.tga differ diff --git a/wolf3d/base/sprites/234.tga b/wolf3d/base/sprites/234.tga new file mode 100755 index 0000000..6cde7c6 Binary files /dev/null and b/wolf3d/base/sprites/234.tga differ diff --git a/wolf3d/base/sprites/235.tga b/wolf3d/base/sprites/235.tga new file mode 100755 index 0000000..972863b Binary files /dev/null and b/wolf3d/base/sprites/235.tga differ diff --git a/wolf3d/base/sprites/236.tga b/wolf3d/base/sprites/236.tga new file mode 100755 index 0000000..cce53c0 Binary files /dev/null and b/wolf3d/base/sprites/236.tga differ diff --git a/wolf3d/base/sprites/237.tga b/wolf3d/base/sprites/237.tga new file mode 100755 index 0000000..e2c72d6 Binary files /dev/null and b/wolf3d/base/sprites/237.tga differ diff --git a/wolf3d/base/sprites/238.tga b/wolf3d/base/sprites/238.tga new file mode 100755 index 0000000..d408cd1 Binary files /dev/null and b/wolf3d/base/sprites/238.tga differ diff --git a/wolf3d/base/sprites/239.tga b/wolf3d/base/sprites/239.tga new file mode 100755 index 0000000..6490dc5 Binary files /dev/null and b/wolf3d/base/sprites/239.tga differ diff --git a/wolf3d/base/sprites/240.tga b/wolf3d/base/sprites/240.tga new file mode 100755 index 0000000..d408cd1 Binary files /dev/null and b/wolf3d/base/sprites/240.tga differ diff --git a/wolf3d/base/sprites/241.tga b/wolf3d/base/sprites/241.tga new file mode 100755 index 0000000..75dbc17 Binary files /dev/null and b/wolf3d/base/sprites/241.tga differ diff --git a/wolf3d/base/sprites/242.tga b/wolf3d/base/sprites/242.tga new file mode 100755 index 0000000..38a1dbf Binary files /dev/null and b/wolf3d/base/sprites/242.tga differ diff --git a/wolf3d/base/sprites/243.tga b/wolf3d/base/sprites/243.tga new file mode 100755 index 0000000..7a71a40 Binary files /dev/null and b/wolf3d/base/sprites/243.tga differ diff --git a/wolf3d/base/sprites/244.tga b/wolf3d/base/sprites/244.tga new file mode 100755 index 0000000..9c20976 Binary files /dev/null and b/wolf3d/base/sprites/244.tga differ diff --git a/wolf3d/base/sprites/245.tga b/wolf3d/base/sprites/245.tga new file mode 100755 index 0000000..8a907a3 Binary files /dev/null and b/wolf3d/base/sprites/245.tga differ diff --git a/wolf3d/base/sprites/246.tga b/wolf3d/base/sprites/246.tga new file mode 100755 index 0000000..9c902db Binary files /dev/null and b/wolf3d/base/sprites/246.tga differ diff --git a/wolf3d/base/sprites/247.tga b/wolf3d/base/sprites/247.tga new file mode 100755 index 0000000..e1b9244 Binary files /dev/null and b/wolf3d/base/sprites/247.tga differ diff --git a/wolf3d/base/sprites/248.tga b/wolf3d/base/sprites/248.tga new file mode 100755 index 0000000..067ce8d Binary files /dev/null and b/wolf3d/base/sprites/248.tga differ diff --git a/wolf3d/base/sprites/249.tga b/wolf3d/base/sprites/249.tga new file mode 100755 index 0000000..aff3b1a Binary files /dev/null and b/wolf3d/base/sprites/249.tga differ diff --git a/wolf3d/base/sprites/250.tga b/wolf3d/base/sprites/250.tga new file mode 100755 index 0000000..af0ee60 Binary files /dev/null and b/wolf3d/base/sprites/250.tga differ diff --git a/wolf3d/base/sprites/251.tga b/wolf3d/base/sprites/251.tga new file mode 100755 index 0000000..7dce2e4 Binary files /dev/null and b/wolf3d/base/sprites/251.tga differ diff --git a/wolf3d/base/sprites/252.tga b/wolf3d/base/sprites/252.tga new file mode 100755 index 0000000..fe36ba7 Binary files /dev/null and b/wolf3d/base/sprites/252.tga differ diff --git a/wolf3d/base/sprites/253.tga b/wolf3d/base/sprites/253.tga new file mode 100755 index 0000000..6314710 Binary files /dev/null and b/wolf3d/base/sprites/253.tga differ diff --git a/wolf3d/base/sprites/254.tga b/wolf3d/base/sprites/254.tga new file mode 100755 index 0000000..1182c5b Binary files /dev/null and b/wolf3d/base/sprites/254.tga differ diff --git a/wolf3d/base/sprites/255.tga b/wolf3d/base/sprites/255.tga new file mode 100755 index 0000000..93974cb Binary files /dev/null and b/wolf3d/base/sprites/255.tga differ diff --git a/wolf3d/base/sprites/256.tga b/wolf3d/base/sprites/256.tga new file mode 100755 index 0000000..54f4a18 Binary files /dev/null and b/wolf3d/base/sprites/256.tga differ diff --git a/wolf3d/base/sprites/257.tga b/wolf3d/base/sprites/257.tga new file mode 100755 index 0000000..5603d0b Binary files /dev/null and b/wolf3d/base/sprites/257.tga differ diff --git a/wolf3d/base/sprites/258.tga b/wolf3d/base/sprites/258.tga new file mode 100755 index 0000000..b6bae6f Binary files /dev/null and b/wolf3d/base/sprites/258.tga differ diff --git a/wolf3d/base/sprites/259.tga b/wolf3d/base/sprites/259.tga new file mode 100755 index 0000000..43a82ad Binary files /dev/null and b/wolf3d/base/sprites/259.tga differ diff --git a/wolf3d/base/sprites/260.tga b/wolf3d/base/sprites/260.tga new file mode 100755 index 0000000..533d0a8 Binary files /dev/null and b/wolf3d/base/sprites/260.tga differ diff --git a/wolf3d/base/sprites/261.tga b/wolf3d/base/sprites/261.tga new file mode 100755 index 0000000..a523b86 Binary files /dev/null and b/wolf3d/base/sprites/261.tga differ diff --git a/wolf3d/base/sprites/262.tga b/wolf3d/base/sprites/262.tga new file mode 100755 index 0000000..4727693 Binary files /dev/null and b/wolf3d/base/sprites/262.tga differ diff --git a/wolf3d/base/sprites/263.tga b/wolf3d/base/sprites/263.tga new file mode 100755 index 0000000..27fd5ee Binary files /dev/null and b/wolf3d/base/sprites/263.tga differ diff --git a/wolf3d/base/sprites/264.tga b/wolf3d/base/sprites/264.tga new file mode 100755 index 0000000..3878afa Binary files /dev/null and b/wolf3d/base/sprites/264.tga differ diff --git a/wolf3d/base/sprites/265.tga b/wolf3d/base/sprites/265.tga new file mode 100755 index 0000000..84b88ed Binary files /dev/null and b/wolf3d/base/sprites/265.tga differ diff --git a/wolf3d/base/sprites/266.tga b/wolf3d/base/sprites/266.tga new file mode 100755 index 0000000..ea31271 Binary files /dev/null and b/wolf3d/base/sprites/266.tga differ diff --git a/wolf3d/base/sprites/267.tga b/wolf3d/base/sprites/267.tga new file mode 100755 index 0000000..49cdc8d Binary files /dev/null and b/wolf3d/base/sprites/267.tga differ diff --git a/wolf3d/base/sprites/268.tga b/wolf3d/base/sprites/268.tga new file mode 100755 index 0000000..22b6d10 Binary files /dev/null and b/wolf3d/base/sprites/268.tga differ diff --git a/wolf3d/base/sprites/269.tga b/wolf3d/base/sprites/269.tga new file mode 100755 index 0000000..90b771e Binary files /dev/null and b/wolf3d/base/sprites/269.tga differ diff --git a/wolf3d/base/sprites/270.tga b/wolf3d/base/sprites/270.tga new file mode 100755 index 0000000..2ca7978 Binary files /dev/null and b/wolf3d/base/sprites/270.tga differ diff --git a/wolf3d/base/sprites/271.tga b/wolf3d/base/sprites/271.tga new file mode 100755 index 0000000..75ec6f0 Binary files /dev/null and b/wolf3d/base/sprites/271.tga differ diff --git a/wolf3d/base/sprites/272.tga b/wolf3d/base/sprites/272.tga new file mode 100755 index 0000000..5df0581 Binary files /dev/null and b/wolf3d/base/sprites/272.tga differ diff --git a/wolf3d/base/sprites/273.tga b/wolf3d/base/sprites/273.tga new file mode 100755 index 0000000..a4379d4 Binary files /dev/null and b/wolf3d/base/sprites/273.tga differ diff --git a/wolf3d/base/sprites/274.tga b/wolf3d/base/sprites/274.tga new file mode 100755 index 0000000..6fdecdb Binary files /dev/null and b/wolf3d/base/sprites/274.tga differ diff --git a/wolf3d/base/sprites/275.tga b/wolf3d/base/sprites/275.tga new file mode 100755 index 0000000..5e42dd5 Binary files /dev/null and b/wolf3d/base/sprites/275.tga differ diff --git a/wolf3d/base/sprites/276.tga b/wolf3d/base/sprites/276.tga new file mode 100755 index 0000000..ada0987 Binary files /dev/null and b/wolf3d/base/sprites/276.tga differ diff --git a/wolf3d/base/sprites/277.tga b/wolf3d/base/sprites/277.tga new file mode 100755 index 0000000..d5e09cc Binary files /dev/null and b/wolf3d/base/sprites/277.tga differ diff --git a/wolf3d/base/sprites/278.tga b/wolf3d/base/sprites/278.tga new file mode 100755 index 0000000..613b269 Binary files /dev/null and b/wolf3d/base/sprites/278.tga differ diff --git a/wolf3d/base/sprites/279.tga b/wolf3d/base/sprites/279.tga new file mode 100755 index 0000000..f6aeae2 Binary files /dev/null and b/wolf3d/base/sprites/279.tga differ diff --git a/wolf3d/base/sprites/280.tga b/wolf3d/base/sprites/280.tga new file mode 100755 index 0000000..61b59e8 Binary files /dev/null and b/wolf3d/base/sprites/280.tga differ diff --git a/wolf3d/base/sprites/281.tga b/wolf3d/base/sprites/281.tga new file mode 100755 index 0000000..c566dd3 Binary files /dev/null and b/wolf3d/base/sprites/281.tga differ diff --git a/wolf3d/base/sprites/282.tga b/wolf3d/base/sprites/282.tga new file mode 100755 index 0000000..4fd5258 Binary files /dev/null and b/wolf3d/base/sprites/282.tga differ diff --git a/wolf3d/base/sprites/283.tga b/wolf3d/base/sprites/283.tga new file mode 100755 index 0000000..c5c648f Binary files /dev/null and b/wolf3d/base/sprites/283.tga differ diff --git a/wolf3d/base/sprites/284.tga b/wolf3d/base/sprites/284.tga new file mode 100755 index 0000000..b313e41 Binary files /dev/null and b/wolf3d/base/sprites/284.tga differ diff --git a/wolf3d/base/sprites/285.tga b/wolf3d/base/sprites/285.tga new file mode 100755 index 0000000..eefdc27 Binary files /dev/null and b/wolf3d/base/sprites/285.tga differ diff --git a/wolf3d/base/sprites/286.tga b/wolf3d/base/sprites/286.tga new file mode 100755 index 0000000..15457c3 Binary files /dev/null and b/wolf3d/base/sprites/286.tga differ diff --git a/wolf3d/base/sprites/287.tga b/wolf3d/base/sprites/287.tga new file mode 100755 index 0000000..890a9d7 Binary files /dev/null and b/wolf3d/base/sprites/287.tga differ diff --git a/wolf3d/base/sprites/288.tga b/wolf3d/base/sprites/288.tga new file mode 100755 index 0000000..bca1abe Binary files /dev/null and b/wolf3d/base/sprites/288.tga differ diff --git a/wolf3d/base/sprites/289.tga b/wolf3d/base/sprites/289.tga new file mode 100755 index 0000000..03580ed Binary files /dev/null and b/wolf3d/base/sprites/289.tga differ diff --git a/wolf3d/base/sprites/290.tga b/wolf3d/base/sprites/290.tga new file mode 100755 index 0000000..de81055 Binary files /dev/null and b/wolf3d/base/sprites/290.tga differ diff --git a/wolf3d/base/sprites/291.tga b/wolf3d/base/sprites/291.tga new file mode 100755 index 0000000..df97d1b Binary files /dev/null and b/wolf3d/base/sprites/291.tga differ diff --git a/wolf3d/base/sprites/292.tga b/wolf3d/base/sprites/292.tga new file mode 100755 index 0000000..cfc99f0 Binary files /dev/null and b/wolf3d/base/sprites/292.tga differ diff --git a/wolf3d/base/sprites/293.tga b/wolf3d/base/sprites/293.tga new file mode 100755 index 0000000..fca72f1 Binary files /dev/null and b/wolf3d/base/sprites/293.tga differ diff --git a/wolf3d/base/sprites/294.tga b/wolf3d/base/sprites/294.tga new file mode 100755 index 0000000..9da33ee Binary files /dev/null and b/wolf3d/base/sprites/294.tga differ diff --git a/wolf3d/base/sprites/295.tga b/wolf3d/base/sprites/295.tga new file mode 100755 index 0000000..7774afd Binary files /dev/null and b/wolf3d/base/sprites/295.tga differ diff --git a/wolf3d/base/sprites/296.tga b/wolf3d/base/sprites/296.tga new file mode 100755 index 0000000..030fe27 Binary files /dev/null and b/wolf3d/base/sprites/296.tga differ diff --git a/wolf3d/base/sprites/297.tga b/wolf3d/base/sprites/297.tga new file mode 100755 index 0000000..a08b656 Binary files /dev/null and b/wolf3d/base/sprites/297.tga differ diff --git a/wolf3d/base/sprites/298.tga b/wolf3d/base/sprites/298.tga new file mode 100755 index 0000000..1693c41 Binary files /dev/null and b/wolf3d/base/sprites/298.tga differ diff --git a/wolf3d/base/sprites/299.tga b/wolf3d/base/sprites/299.tga new file mode 100755 index 0000000..9f5d288 Binary files /dev/null and b/wolf3d/base/sprites/299.tga differ diff --git a/wolf3d/base/sprites/300.tga b/wolf3d/base/sprites/300.tga new file mode 100755 index 0000000..c69aa1a Binary files /dev/null and b/wolf3d/base/sprites/300.tga differ diff --git a/wolf3d/base/sprites/301.tga b/wolf3d/base/sprites/301.tga new file mode 100755 index 0000000..b3e3ad6 Binary files /dev/null and b/wolf3d/base/sprites/301.tga differ diff --git a/wolf3d/base/sprites/302.tga b/wolf3d/base/sprites/302.tga new file mode 100755 index 0000000..31943c5 Binary files /dev/null and b/wolf3d/base/sprites/302.tga differ diff --git a/wolf3d/base/sprites/303.tga b/wolf3d/base/sprites/303.tga new file mode 100755 index 0000000..b86d76b Binary files /dev/null and b/wolf3d/base/sprites/303.tga differ diff --git a/wolf3d/base/sprites/304.tga b/wolf3d/base/sprites/304.tga new file mode 100755 index 0000000..b40d4ec Binary files /dev/null and b/wolf3d/base/sprites/304.tga differ diff --git a/wolf3d/base/sprites/305.tga b/wolf3d/base/sprites/305.tga new file mode 100755 index 0000000..4ff1251 Binary files /dev/null and b/wolf3d/base/sprites/305.tga differ diff --git a/wolf3d/base/sprites/306.tga b/wolf3d/base/sprites/306.tga new file mode 100755 index 0000000..f5fee4b Binary files /dev/null and b/wolf3d/base/sprites/306.tga differ diff --git a/wolf3d/base/sprites/307.tga b/wolf3d/base/sprites/307.tga new file mode 100755 index 0000000..a1155e6 Binary files /dev/null and b/wolf3d/base/sprites/307.tga differ diff --git a/wolf3d/base/sprites/308.tga b/wolf3d/base/sprites/308.tga new file mode 100755 index 0000000..0123d09 Binary files /dev/null and b/wolf3d/base/sprites/308.tga differ diff --git a/wolf3d/base/sprites/309.tga b/wolf3d/base/sprites/309.tga new file mode 100755 index 0000000..82fbfa1 Binary files /dev/null and b/wolf3d/base/sprites/309.tga differ diff --git a/wolf3d/base/sprites/310.tga b/wolf3d/base/sprites/310.tga new file mode 100755 index 0000000..4dba01d Binary files /dev/null and b/wolf3d/base/sprites/310.tga differ diff --git a/wolf3d/base/sprites/311.tga b/wolf3d/base/sprites/311.tga new file mode 100755 index 0000000..6d072af Binary files /dev/null and b/wolf3d/base/sprites/311.tga differ diff --git a/wolf3d/base/sprites/312.tga b/wolf3d/base/sprites/312.tga new file mode 100755 index 0000000..b481a0d Binary files /dev/null and b/wolf3d/base/sprites/312.tga differ diff --git a/wolf3d/base/sprites/313.tga b/wolf3d/base/sprites/313.tga new file mode 100755 index 0000000..274f332 Binary files /dev/null and b/wolf3d/base/sprites/313.tga differ diff --git a/wolf3d/base/sprites/314.tga b/wolf3d/base/sprites/314.tga new file mode 100755 index 0000000..925309e Binary files /dev/null and b/wolf3d/base/sprites/314.tga differ diff --git a/wolf3d/base/sprites/315.tga b/wolf3d/base/sprites/315.tga new file mode 100755 index 0000000..9e24073 Binary files /dev/null and b/wolf3d/base/sprites/315.tga differ diff --git a/wolf3d/base/sprites/316.tga b/wolf3d/base/sprites/316.tga new file mode 100755 index 0000000..6fb65a8 Binary files /dev/null and b/wolf3d/base/sprites/316.tga differ diff --git a/wolf3d/base/sprites/317.tga b/wolf3d/base/sprites/317.tga new file mode 100755 index 0000000..4b94080 Binary files /dev/null and b/wolf3d/base/sprites/317.tga differ diff --git a/wolf3d/base/sprites/318.tga b/wolf3d/base/sprites/318.tga new file mode 100755 index 0000000..44d59dd Binary files /dev/null and b/wolf3d/base/sprites/318.tga differ diff --git a/wolf3d/base/sprites/319.tga b/wolf3d/base/sprites/319.tga new file mode 100755 index 0000000..a8d1aad Binary files /dev/null and b/wolf3d/base/sprites/319.tga differ diff --git a/wolf3d/base/sprites/320.tga b/wolf3d/base/sprites/320.tga new file mode 100755 index 0000000..50ef5f7 Binary files /dev/null and b/wolf3d/base/sprites/320.tga differ diff --git a/wolf3d/base/sprites/321.tga b/wolf3d/base/sprites/321.tga new file mode 100755 index 0000000..8755524 Binary files /dev/null and b/wolf3d/base/sprites/321.tga differ diff --git a/wolf3d/base/sprites/322.tga b/wolf3d/base/sprites/322.tga new file mode 100755 index 0000000..d333122 Binary files /dev/null and b/wolf3d/base/sprites/322.tga differ diff --git a/wolf3d/base/sprites/323.tga b/wolf3d/base/sprites/323.tga new file mode 100755 index 0000000..130001d Binary files /dev/null and b/wolf3d/base/sprites/323.tga differ diff --git a/wolf3d/base/sprites/324.tga b/wolf3d/base/sprites/324.tga new file mode 100755 index 0000000..ec42d86 Binary files /dev/null and b/wolf3d/base/sprites/324.tga differ diff --git a/wolf3d/base/sprites/325.tga b/wolf3d/base/sprites/325.tga new file mode 100755 index 0000000..0d177c3 Binary files /dev/null and b/wolf3d/base/sprites/325.tga differ diff --git a/wolf3d/base/sprites/326.tga b/wolf3d/base/sprites/326.tga new file mode 100755 index 0000000..ce26e96 Binary files /dev/null and b/wolf3d/base/sprites/326.tga differ diff --git a/wolf3d/base/sprites/327.tga b/wolf3d/base/sprites/327.tga new file mode 100755 index 0000000..58857a3 Binary files /dev/null and b/wolf3d/base/sprites/327.tga differ diff --git a/wolf3d/base/sprites/328.tga b/wolf3d/base/sprites/328.tga new file mode 100755 index 0000000..cf2f72c Binary files /dev/null and b/wolf3d/base/sprites/328.tga differ diff --git a/wolf3d/base/sprites/329.tga b/wolf3d/base/sprites/329.tga new file mode 100755 index 0000000..ed53cc2 Binary files /dev/null and b/wolf3d/base/sprites/329.tga differ diff --git a/wolf3d/base/sprites/330.tga b/wolf3d/base/sprites/330.tga new file mode 100755 index 0000000..61ba0a6 Binary files /dev/null and b/wolf3d/base/sprites/330.tga differ diff --git a/wolf3d/base/sprites/331.tga b/wolf3d/base/sprites/331.tga new file mode 100755 index 0000000..7766bd1 Binary files /dev/null and b/wolf3d/base/sprites/331.tga differ diff --git a/wolf3d/base/sprites/332.tga b/wolf3d/base/sprites/332.tga new file mode 100755 index 0000000..19cf1e7 Binary files /dev/null and b/wolf3d/base/sprites/332.tga differ diff --git a/wolf3d/base/sprites/333.tga b/wolf3d/base/sprites/333.tga new file mode 100755 index 0000000..eefcf17 Binary files /dev/null and b/wolf3d/base/sprites/333.tga differ diff --git a/wolf3d/base/sprites/334.tga b/wolf3d/base/sprites/334.tga new file mode 100755 index 0000000..85fb79f Binary files /dev/null and b/wolf3d/base/sprites/334.tga differ diff --git a/wolf3d/base/sprites/335.tga b/wolf3d/base/sprites/335.tga new file mode 100755 index 0000000..39a2576 Binary files /dev/null and b/wolf3d/base/sprites/335.tga differ diff --git a/wolf3d/base/sprites/336.tga b/wolf3d/base/sprites/336.tga new file mode 100755 index 0000000..55de5ce Binary files /dev/null and b/wolf3d/base/sprites/336.tga differ diff --git a/wolf3d/base/sprites/337.tga b/wolf3d/base/sprites/337.tga new file mode 100755 index 0000000..4051159 Binary files /dev/null and b/wolf3d/base/sprites/337.tga differ diff --git a/wolf3d/base/sprites/338.tga b/wolf3d/base/sprites/338.tga new file mode 100755 index 0000000..8826bf5 Binary files /dev/null and b/wolf3d/base/sprites/338.tga differ diff --git a/wolf3d/base/sprites/339.tga b/wolf3d/base/sprites/339.tga new file mode 100755 index 0000000..ea7aa03 Binary files /dev/null and b/wolf3d/base/sprites/339.tga differ diff --git a/wolf3d/base/sprites/340.tga b/wolf3d/base/sprites/340.tga new file mode 100755 index 0000000..6390394 Binary files /dev/null and b/wolf3d/base/sprites/340.tga differ diff --git a/wolf3d/base/sprites/341.tga b/wolf3d/base/sprites/341.tga new file mode 100755 index 0000000..bc7c997 Binary files /dev/null and b/wolf3d/base/sprites/341.tga differ diff --git a/wolf3d/base/sprites/342.tga b/wolf3d/base/sprites/342.tga new file mode 100755 index 0000000..56166c5 Binary files /dev/null and b/wolf3d/base/sprites/342.tga differ diff --git a/wolf3d/base/sprites/343.tga b/wolf3d/base/sprites/343.tga new file mode 100755 index 0000000..d5e63e4 Binary files /dev/null and b/wolf3d/base/sprites/343.tga differ diff --git a/wolf3d/base/sprites/344.tga b/wolf3d/base/sprites/344.tga new file mode 100755 index 0000000..b3ddd21 Binary files /dev/null and b/wolf3d/base/sprites/344.tga differ diff --git a/wolf3d/base/sprites/345.tga b/wolf3d/base/sprites/345.tga new file mode 100755 index 0000000..30c195e Binary files /dev/null and b/wolf3d/base/sprites/345.tga differ diff --git a/wolf3d/base/sprites/346.tga b/wolf3d/base/sprites/346.tga new file mode 100755 index 0000000..8db58f5 Binary files /dev/null and b/wolf3d/base/sprites/346.tga differ diff --git a/wolf3d/base/sprites/347.tga b/wolf3d/base/sprites/347.tga new file mode 100755 index 0000000..7ced98f Binary files /dev/null and b/wolf3d/base/sprites/347.tga differ diff --git a/wolf3d/base/sprites/348.tga b/wolf3d/base/sprites/348.tga new file mode 100755 index 0000000..81cc86f Binary files /dev/null and b/wolf3d/base/sprites/348.tga differ diff --git a/wolf3d/base/sprites/349.tga b/wolf3d/base/sprites/349.tga new file mode 100755 index 0000000..f4652cf Binary files /dev/null and b/wolf3d/base/sprites/349.tga differ diff --git a/wolf3d/base/sprites/350.tga b/wolf3d/base/sprites/350.tga new file mode 100755 index 0000000..165c879 Binary files /dev/null and b/wolf3d/base/sprites/350.tga differ diff --git a/wolf3d/base/sprites/351.tga b/wolf3d/base/sprites/351.tga new file mode 100755 index 0000000..6536dec Binary files /dev/null and b/wolf3d/base/sprites/351.tga differ diff --git a/wolf3d/base/sprites/352.tga b/wolf3d/base/sprites/352.tga new file mode 100755 index 0000000..3c04e61 Binary files /dev/null and b/wolf3d/base/sprites/352.tga differ diff --git a/wolf3d/base/sprites/353.tga b/wolf3d/base/sprites/353.tga new file mode 100755 index 0000000..b5ebc5f Binary files /dev/null and b/wolf3d/base/sprites/353.tga differ diff --git a/wolf3d/base/sprites/354.tga b/wolf3d/base/sprites/354.tga new file mode 100755 index 0000000..e964227 Binary files /dev/null and b/wolf3d/base/sprites/354.tga differ diff --git a/wolf3d/base/sprites/355.tga b/wolf3d/base/sprites/355.tga new file mode 100755 index 0000000..f49586c Binary files /dev/null and b/wolf3d/base/sprites/355.tga differ diff --git a/wolf3d/base/sprites/356.tga b/wolf3d/base/sprites/356.tga new file mode 100755 index 0000000..7110b2e Binary files /dev/null and b/wolf3d/base/sprites/356.tga differ diff --git a/wolf3d/base/sprites/357.tga b/wolf3d/base/sprites/357.tga new file mode 100755 index 0000000..97d9775 Binary files /dev/null and b/wolf3d/base/sprites/357.tga differ diff --git a/wolf3d/base/sprites/358.tga b/wolf3d/base/sprites/358.tga new file mode 100755 index 0000000..fdb03ec Binary files /dev/null and b/wolf3d/base/sprites/358.tga differ diff --git a/wolf3d/base/sprites/359.tga b/wolf3d/base/sprites/359.tga new file mode 100755 index 0000000..90c7e74 Binary files /dev/null and b/wolf3d/base/sprites/359.tga differ diff --git a/wolf3d/base/sprites/360.tga b/wolf3d/base/sprites/360.tga new file mode 100755 index 0000000..2dff803 Binary files /dev/null and b/wolf3d/base/sprites/360.tga differ diff --git a/wolf3d/base/sprites/361.tga b/wolf3d/base/sprites/361.tga new file mode 100755 index 0000000..6ff0191 Binary files /dev/null and b/wolf3d/base/sprites/361.tga differ diff --git a/wolf3d/base/sprites/362.tga b/wolf3d/base/sprites/362.tga new file mode 100755 index 0000000..0181115 Binary files /dev/null and b/wolf3d/base/sprites/362.tga differ diff --git a/wolf3d/base/sprites/363.tga b/wolf3d/base/sprites/363.tga new file mode 100755 index 0000000..8bc7808 Binary files /dev/null and b/wolf3d/base/sprites/363.tga differ diff --git a/wolf3d/base/sprites/364.tga b/wolf3d/base/sprites/364.tga new file mode 100755 index 0000000..d57a8c1 Binary files /dev/null and b/wolf3d/base/sprites/364.tga differ diff --git a/wolf3d/base/sprites/365.tga b/wolf3d/base/sprites/365.tga new file mode 100755 index 0000000..effcc62 Binary files /dev/null and b/wolf3d/base/sprites/365.tga differ diff --git a/wolf3d/base/sprites/366.tga b/wolf3d/base/sprites/366.tga new file mode 100755 index 0000000..84f91bf Binary files /dev/null and b/wolf3d/base/sprites/366.tga differ diff --git a/wolf3d/base/sprites/367.tga b/wolf3d/base/sprites/367.tga new file mode 100755 index 0000000..7f3a3f3 Binary files /dev/null and b/wolf3d/base/sprites/367.tga differ diff --git a/wolf3d/base/sprites/368.tga b/wolf3d/base/sprites/368.tga new file mode 100755 index 0000000..1e1f266 Binary files /dev/null and b/wolf3d/base/sprites/368.tga differ diff --git a/wolf3d/base/sprites/369.tga b/wolf3d/base/sprites/369.tga new file mode 100755 index 0000000..5065cec Binary files /dev/null and b/wolf3d/base/sprites/369.tga differ diff --git a/wolf3d/base/sprites/370.tga b/wolf3d/base/sprites/370.tga new file mode 100755 index 0000000..989c6dd Binary files /dev/null and b/wolf3d/base/sprites/370.tga differ diff --git a/wolf3d/base/sprites/371.tga b/wolf3d/base/sprites/371.tga new file mode 100755 index 0000000..4006cda Binary files /dev/null and b/wolf3d/base/sprites/371.tga differ diff --git a/wolf3d/base/sprites/372.tga b/wolf3d/base/sprites/372.tga new file mode 100755 index 0000000..610be45 Binary files /dev/null and b/wolf3d/base/sprites/372.tga differ diff --git a/wolf3d/base/sprites/373.tga b/wolf3d/base/sprites/373.tga new file mode 100755 index 0000000..2989b69 Binary files /dev/null and b/wolf3d/base/sprites/373.tga differ diff --git a/wolf3d/base/sprites/374.tga b/wolf3d/base/sprites/374.tga new file mode 100755 index 0000000..0eb5835 Binary files /dev/null and b/wolf3d/base/sprites/374.tga differ diff --git a/wolf3d/base/sprites/375.tga b/wolf3d/base/sprites/375.tga new file mode 100755 index 0000000..45814a2 Binary files /dev/null and b/wolf3d/base/sprites/375.tga differ diff --git a/wolf3d/base/sprites/376.tga b/wolf3d/base/sprites/376.tga new file mode 100755 index 0000000..4fd255c Binary files /dev/null and b/wolf3d/base/sprites/376.tga differ diff --git a/wolf3d/base/sprites/377.tga b/wolf3d/base/sprites/377.tga new file mode 100755 index 0000000..0bb40c5 Binary files /dev/null and b/wolf3d/base/sprites/377.tga differ diff --git a/wolf3d/base/sprites/378.tga b/wolf3d/base/sprites/378.tga new file mode 100755 index 0000000..fe7c057 Binary files /dev/null and b/wolf3d/base/sprites/378.tga differ diff --git a/wolf3d/base/sprites/379.tga b/wolf3d/base/sprites/379.tga new file mode 100755 index 0000000..6a7de04 Binary files /dev/null and b/wolf3d/base/sprites/379.tga differ diff --git a/wolf3d/base/sprites/380.tga b/wolf3d/base/sprites/380.tga new file mode 100755 index 0000000..bb742a8 Binary files /dev/null and b/wolf3d/base/sprites/380.tga differ diff --git a/wolf3d/base/sprites/381.tga b/wolf3d/base/sprites/381.tga new file mode 100755 index 0000000..f6e1458 Binary files /dev/null and b/wolf3d/base/sprites/381.tga differ diff --git a/wolf3d/base/sprites/382.tga b/wolf3d/base/sprites/382.tga new file mode 100755 index 0000000..3cc70d9 Binary files /dev/null and b/wolf3d/base/sprites/382.tga differ diff --git a/wolf3d/base/sprites/383.tga b/wolf3d/base/sprites/383.tga new file mode 100755 index 0000000..24061fc Binary files /dev/null and b/wolf3d/base/sprites/383.tga differ diff --git a/wolf3d/base/sprites/384.tga b/wolf3d/base/sprites/384.tga new file mode 100755 index 0000000..d585c6a Binary files /dev/null and b/wolf3d/base/sprites/384.tga differ diff --git a/wolf3d/base/sprites/385.tga b/wolf3d/base/sprites/385.tga new file mode 100755 index 0000000..dbdc7eb Binary files /dev/null and b/wolf3d/base/sprites/385.tga differ diff --git a/wolf3d/base/sprites/386.tga b/wolf3d/base/sprites/386.tga new file mode 100755 index 0000000..aa3b681 Binary files /dev/null and b/wolf3d/base/sprites/386.tga differ diff --git a/wolf3d/base/sprites/387.tga b/wolf3d/base/sprites/387.tga new file mode 100755 index 0000000..65315d8 Binary files /dev/null and b/wolf3d/base/sprites/387.tga differ diff --git a/wolf3d/base/sprites/388.tga b/wolf3d/base/sprites/388.tga new file mode 100755 index 0000000..c894cea Binary files /dev/null and b/wolf3d/base/sprites/388.tga differ diff --git a/wolf3d/base/sprites/389.tga b/wolf3d/base/sprites/389.tga new file mode 100755 index 0000000..012f6a2 Binary files /dev/null and b/wolf3d/base/sprites/389.tga differ diff --git a/wolf3d/base/sprites/390.tga b/wolf3d/base/sprites/390.tga new file mode 100755 index 0000000..5ca9b8a Binary files /dev/null and b/wolf3d/base/sprites/390.tga differ diff --git a/wolf3d/base/sprites/391.tga b/wolf3d/base/sprites/391.tga new file mode 100755 index 0000000..c696ce1 Binary files /dev/null and b/wolf3d/base/sprites/391.tga differ diff --git a/wolf3d/base/sprites/392.tga b/wolf3d/base/sprites/392.tga new file mode 100755 index 0000000..5fd5ea7 Binary files /dev/null and b/wolf3d/base/sprites/392.tga differ diff --git a/wolf3d/base/sprites/393.tga b/wolf3d/base/sprites/393.tga new file mode 100755 index 0000000..01bbe5d Binary files /dev/null and b/wolf3d/base/sprites/393.tga differ diff --git a/wolf3d/base/sprites/394.tga b/wolf3d/base/sprites/394.tga new file mode 100755 index 0000000..fda98ab Binary files /dev/null and b/wolf3d/base/sprites/394.tga differ diff --git a/wolf3d/base/sprites/395.tga b/wolf3d/base/sprites/395.tga new file mode 100755 index 0000000..3f3526c Binary files /dev/null and b/wolf3d/base/sprites/395.tga differ diff --git a/wolf3d/base/sprites/396.tga b/wolf3d/base/sprites/396.tga new file mode 100755 index 0000000..160a270 Binary files /dev/null and b/wolf3d/base/sprites/396.tga differ diff --git a/wolf3d/base/sprites/397.tga b/wolf3d/base/sprites/397.tga new file mode 100755 index 0000000..70bb228 Binary files /dev/null and b/wolf3d/base/sprites/397.tga differ diff --git a/wolf3d/base/sprites/398.tga b/wolf3d/base/sprites/398.tga new file mode 100755 index 0000000..635dd95 Binary files /dev/null and b/wolf3d/base/sprites/398.tga differ diff --git a/wolf3d/base/sprites/399.tga b/wolf3d/base/sprites/399.tga new file mode 100755 index 0000000..238a61b Binary files /dev/null and b/wolf3d/base/sprites/399.tga differ diff --git a/wolf3d/base/sprites/400.tga b/wolf3d/base/sprites/400.tga new file mode 100755 index 0000000..450adcf Binary files /dev/null and b/wolf3d/base/sprites/400.tga differ diff --git a/wolf3d/base/sprites/401.tga b/wolf3d/base/sprites/401.tga new file mode 100755 index 0000000..9f29dae Binary files /dev/null and b/wolf3d/base/sprites/401.tga differ diff --git a/wolf3d/base/sprites/402.tga b/wolf3d/base/sprites/402.tga new file mode 100755 index 0000000..9aad180 Binary files /dev/null and b/wolf3d/base/sprites/402.tga differ diff --git a/wolf3d/base/sprites/403.tga b/wolf3d/base/sprites/403.tga new file mode 100755 index 0000000..7ff8233 Binary files /dev/null and b/wolf3d/base/sprites/403.tga differ diff --git a/wolf3d/base/sprites/404.tga b/wolf3d/base/sprites/404.tga new file mode 100755 index 0000000..fab2822 Binary files /dev/null and b/wolf3d/base/sprites/404.tga differ diff --git a/wolf3d/base/sprites/405.tga b/wolf3d/base/sprites/405.tga new file mode 100755 index 0000000..7ff8233 Binary files /dev/null and b/wolf3d/base/sprites/405.tga differ diff --git a/wolf3d/base/sprites/406.tga b/wolf3d/base/sprites/406.tga new file mode 100755 index 0000000..d406e93 Binary files /dev/null and b/wolf3d/base/sprites/406.tga differ diff --git a/wolf3d/base/sprites/407.tga b/wolf3d/base/sprites/407.tga new file mode 100755 index 0000000..2cd3eaa Binary files /dev/null and b/wolf3d/base/sprites/407.tga differ diff --git a/wolf3d/base/sprites/408.tga b/wolf3d/base/sprites/408.tga new file mode 100755 index 0000000..d785349 Binary files /dev/null and b/wolf3d/base/sprites/408.tga differ diff --git a/wolf3d/base/sprites/409.tga b/wolf3d/base/sprites/409.tga new file mode 100755 index 0000000..6f324f9 Binary files /dev/null and b/wolf3d/base/sprites/409.tga differ diff --git a/wolf3d/base/sprites/410.tga b/wolf3d/base/sprites/410.tga new file mode 100755 index 0000000..a8add3c Binary files /dev/null and b/wolf3d/base/sprites/410.tga differ diff --git a/wolf3d/base/sprites/411.tga b/wolf3d/base/sprites/411.tga new file mode 100755 index 0000000..4e36183 Binary files /dev/null and b/wolf3d/base/sprites/411.tga differ diff --git a/wolf3d/base/sprites/412.tga b/wolf3d/base/sprites/412.tga new file mode 100755 index 0000000..1a9dcf5 Binary files /dev/null and b/wolf3d/base/sprites/412.tga differ diff --git a/wolf3d/base/sprites/413.tga b/wolf3d/base/sprites/413.tga new file mode 100755 index 0000000..70344ec Binary files /dev/null and b/wolf3d/base/sprites/413.tga differ diff --git a/wolf3d/base/sprites/414.tga b/wolf3d/base/sprites/414.tga new file mode 100755 index 0000000..6916fd0 Binary files /dev/null and b/wolf3d/base/sprites/414.tga differ diff --git a/wolf3d/base/sprites/415.tga b/wolf3d/base/sprites/415.tga new file mode 100755 index 0000000..1a9dcf5 Binary files /dev/null and b/wolf3d/base/sprites/415.tga differ diff --git a/wolf3d/base/sprites/416.tga b/wolf3d/base/sprites/416.tga new file mode 100755 index 0000000..ab1f101 Binary files /dev/null and b/wolf3d/base/sprites/416.tga differ diff --git a/wolf3d/base/sprites/417.tga b/wolf3d/base/sprites/417.tga new file mode 100755 index 0000000..981ddde Binary files /dev/null and b/wolf3d/base/sprites/417.tga differ diff --git a/wolf3d/base/sprites/418.tga b/wolf3d/base/sprites/418.tga new file mode 100755 index 0000000..224500a Binary files /dev/null and b/wolf3d/base/sprites/418.tga differ diff --git a/wolf3d/base/sprites/419.tga b/wolf3d/base/sprites/419.tga new file mode 100755 index 0000000..5e7e3d2 Binary files /dev/null and b/wolf3d/base/sprites/419.tga differ diff --git a/wolf3d/base/sprites/420.tga b/wolf3d/base/sprites/420.tga new file mode 100755 index 0000000..5b4bf21 Binary files /dev/null and b/wolf3d/base/sprites/420.tga differ diff --git a/wolf3d/base/walls/000.tga b/wolf3d/base/walls/000.tga new file mode 100755 index 0000000..a92ac40 Binary files /dev/null and b/wolf3d/base/walls/000.tga differ diff --git a/wolf3d/base/walls/001.tga b/wolf3d/base/walls/001.tga new file mode 100755 index 0000000..cd29576 Binary files /dev/null and b/wolf3d/base/walls/001.tga differ diff --git a/wolf3d/base/walls/002.tga b/wolf3d/base/walls/002.tga new file mode 100755 index 0000000..082f7b7 Binary files /dev/null and b/wolf3d/base/walls/002.tga differ diff --git a/wolf3d/base/walls/003.tga b/wolf3d/base/walls/003.tga new file mode 100755 index 0000000..e688539 Binary files /dev/null and b/wolf3d/base/walls/003.tga differ diff --git a/wolf3d/base/walls/004.tga b/wolf3d/base/walls/004.tga new file mode 100755 index 0000000..506b834 Binary files /dev/null and b/wolf3d/base/walls/004.tga differ diff --git a/wolf3d/base/walls/005.tga b/wolf3d/base/walls/005.tga new file mode 100755 index 0000000..c2e6b02 Binary files /dev/null and b/wolf3d/base/walls/005.tga differ diff --git a/wolf3d/base/walls/006.tga b/wolf3d/base/walls/006.tga new file mode 100755 index 0000000..a4aebea Binary files /dev/null and b/wolf3d/base/walls/006.tga differ diff --git a/wolf3d/base/walls/007.tga b/wolf3d/base/walls/007.tga new file mode 100755 index 0000000..cc1baad Binary files /dev/null and b/wolf3d/base/walls/007.tga differ diff --git a/wolf3d/base/walls/008.tga b/wolf3d/base/walls/008.tga new file mode 100755 index 0000000..5328f7f Binary files /dev/null and b/wolf3d/base/walls/008.tga differ diff --git a/wolf3d/base/walls/009.tga b/wolf3d/base/walls/009.tga new file mode 100755 index 0000000..11437fd Binary files /dev/null and b/wolf3d/base/walls/009.tga differ diff --git a/wolf3d/base/walls/010.tga b/wolf3d/base/walls/010.tga new file mode 100755 index 0000000..f9b3674 Binary files /dev/null and b/wolf3d/base/walls/010.tga differ diff --git a/wolf3d/base/walls/011.tga b/wolf3d/base/walls/011.tga new file mode 100755 index 0000000..21aa1a3 Binary files /dev/null and b/wolf3d/base/walls/011.tga differ diff --git a/wolf3d/base/walls/012.tga b/wolf3d/base/walls/012.tga new file mode 100755 index 0000000..8a2ed29 Binary files /dev/null and b/wolf3d/base/walls/012.tga differ diff --git a/wolf3d/base/walls/013.tga b/wolf3d/base/walls/013.tga new file mode 100755 index 0000000..0e706a3 Binary files /dev/null and b/wolf3d/base/walls/013.tga differ diff --git a/wolf3d/base/walls/014.tga b/wolf3d/base/walls/014.tga new file mode 100755 index 0000000..5fe0f1b Binary files /dev/null and b/wolf3d/base/walls/014.tga differ diff --git a/wolf3d/base/walls/015.tga b/wolf3d/base/walls/015.tga new file mode 100755 index 0000000..b4ff808 Binary files /dev/null and b/wolf3d/base/walls/015.tga differ diff --git a/wolf3d/base/walls/016.tga b/wolf3d/base/walls/016.tga new file mode 100755 index 0000000..58af66f Binary files /dev/null and b/wolf3d/base/walls/016.tga differ diff --git a/wolf3d/base/walls/017.tga b/wolf3d/base/walls/017.tga new file mode 100755 index 0000000..443c438 Binary files /dev/null and b/wolf3d/base/walls/017.tga differ diff --git a/wolf3d/base/walls/018.tga b/wolf3d/base/walls/018.tga new file mode 100755 index 0000000..a1750c2 Binary files /dev/null and b/wolf3d/base/walls/018.tga differ diff --git a/wolf3d/base/walls/019.tga b/wolf3d/base/walls/019.tga new file mode 100755 index 0000000..bbfef7a Binary files /dev/null and b/wolf3d/base/walls/019.tga differ diff --git a/wolf3d/base/walls/020.tga b/wolf3d/base/walls/020.tga new file mode 100755 index 0000000..951c183 Binary files /dev/null and b/wolf3d/base/walls/020.tga differ diff --git a/wolf3d/base/walls/021.tga b/wolf3d/base/walls/021.tga new file mode 100755 index 0000000..4a4224f Binary files /dev/null and b/wolf3d/base/walls/021.tga differ diff --git a/wolf3d/base/walls/022.tga b/wolf3d/base/walls/022.tga new file mode 100755 index 0000000..e85d751 Binary files /dev/null and b/wolf3d/base/walls/022.tga differ diff --git a/wolf3d/base/walls/023.tga b/wolf3d/base/walls/023.tga new file mode 100755 index 0000000..8d1765a Binary files /dev/null and b/wolf3d/base/walls/023.tga differ diff --git a/wolf3d/base/walls/024.tga b/wolf3d/base/walls/024.tga new file mode 100755 index 0000000..2b93d0a Binary files /dev/null and b/wolf3d/base/walls/024.tga differ diff --git a/wolf3d/base/walls/025.tga b/wolf3d/base/walls/025.tga new file mode 100755 index 0000000..3aaac0f Binary files /dev/null and b/wolf3d/base/walls/025.tga differ diff --git a/wolf3d/base/walls/026.tga b/wolf3d/base/walls/026.tga new file mode 100755 index 0000000..cee66ef Binary files /dev/null and b/wolf3d/base/walls/026.tga differ diff --git a/wolf3d/base/walls/027.tga b/wolf3d/base/walls/027.tga new file mode 100755 index 0000000..64d817b Binary files /dev/null and b/wolf3d/base/walls/027.tga differ diff --git a/wolf3d/base/walls/028.tga b/wolf3d/base/walls/028.tga new file mode 100755 index 0000000..bccc0a5 Binary files /dev/null and b/wolf3d/base/walls/028.tga differ diff --git a/wolf3d/base/walls/029.tga b/wolf3d/base/walls/029.tga new file mode 100755 index 0000000..f13daff Binary files /dev/null and b/wolf3d/base/walls/029.tga differ diff --git a/wolf3d/base/walls/030.tga b/wolf3d/base/walls/030.tga new file mode 100755 index 0000000..e9034a5 Binary files /dev/null and b/wolf3d/base/walls/030.tga differ diff --git a/wolf3d/base/walls/031.tga b/wolf3d/base/walls/031.tga new file mode 100755 index 0000000..03f7dde Binary files /dev/null and b/wolf3d/base/walls/031.tga differ diff --git a/wolf3d/base/walls/032.tga b/wolf3d/base/walls/032.tga new file mode 100755 index 0000000..33b89d0 Binary files /dev/null and b/wolf3d/base/walls/032.tga differ diff --git a/wolf3d/base/walls/033.tga b/wolf3d/base/walls/033.tga new file mode 100755 index 0000000..49f89f9 Binary files /dev/null and b/wolf3d/base/walls/033.tga differ diff --git a/wolf3d/base/walls/034.tga b/wolf3d/base/walls/034.tga new file mode 100755 index 0000000..721a696 Binary files /dev/null and b/wolf3d/base/walls/034.tga differ diff --git a/wolf3d/base/walls/035.tga b/wolf3d/base/walls/035.tga new file mode 100755 index 0000000..11de1b3 Binary files /dev/null and b/wolf3d/base/walls/035.tga differ diff --git a/wolf3d/base/walls/036.tga b/wolf3d/base/walls/036.tga new file mode 100755 index 0000000..ca6fd16 Binary files /dev/null and b/wolf3d/base/walls/036.tga differ diff --git a/wolf3d/base/walls/037.tga b/wolf3d/base/walls/037.tga new file mode 100755 index 0000000..13b2612 Binary files /dev/null and b/wolf3d/base/walls/037.tga differ diff --git a/wolf3d/base/walls/038.tga b/wolf3d/base/walls/038.tga new file mode 100755 index 0000000..83c6fd3 Binary files /dev/null and b/wolf3d/base/walls/038.tga differ diff --git a/wolf3d/base/walls/039.tga b/wolf3d/base/walls/039.tga new file mode 100755 index 0000000..b57b31b Binary files /dev/null and b/wolf3d/base/walls/039.tga differ diff --git a/wolf3d/base/walls/040.tga b/wolf3d/base/walls/040.tga new file mode 100755 index 0000000..fded1a0 Binary files /dev/null and b/wolf3d/base/walls/040.tga differ diff --git a/wolf3d/base/walls/041.tga b/wolf3d/base/walls/041.tga new file mode 100755 index 0000000..66b8d1e Binary files /dev/null and b/wolf3d/base/walls/041.tga differ diff --git a/wolf3d/base/walls/042.tga b/wolf3d/base/walls/042.tga new file mode 100755 index 0000000..20be996 Binary files /dev/null and b/wolf3d/base/walls/042.tga differ diff --git a/wolf3d/base/walls/043.tga b/wolf3d/base/walls/043.tga new file mode 100755 index 0000000..b7fd8e5 Binary files /dev/null and b/wolf3d/base/walls/043.tga differ diff --git a/wolf3d/base/walls/044.tga b/wolf3d/base/walls/044.tga new file mode 100755 index 0000000..1a3ef25 Binary files /dev/null and b/wolf3d/base/walls/044.tga differ diff --git a/wolf3d/base/walls/045.tga b/wolf3d/base/walls/045.tga new file mode 100755 index 0000000..e1bc1ec Binary files /dev/null and b/wolf3d/base/walls/045.tga differ diff --git a/wolf3d/base/walls/046.tga b/wolf3d/base/walls/046.tga new file mode 100755 index 0000000..446df65 Binary files /dev/null and b/wolf3d/base/walls/046.tga differ diff --git a/wolf3d/base/walls/047.tga b/wolf3d/base/walls/047.tga new file mode 100755 index 0000000..641247a Binary files /dev/null and b/wolf3d/base/walls/047.tga differ diff --git a/wolf3d/base/walls/048.tga b/wolf3d/base/walls/048.tga new file mode 100755 index 0000000..eefa301 Binary files /dev/null and b/wolf3d/base/walls/048.tga differ diff --git a/wolf3d/base/walls/049.tga b/wolf3d/base/walls/049.tga new file mode 100755 index 0000000..64089fb Binary files /dev/null and b/wolf3d/base/walls/049.tga differ diff --git a/wolf3d/base/walls/050.tga b/wolf3d/base/walls/050.tga new file mode 100755 index 0000000..8dc476a Binary files /dev/null and b/wolf3d/base/walls/050.tga differ diff --git a/wolf3d/base/walls/051.tga b/wolf3d/base/walls/051.tga new file mode 100755 index 0000000..25d87a4 Binary files /dev/null and b/wolf3d/base/walls/051.tga differ diff --git a/wolf3d/base/walls/052.tga b/wolf3d/base/walls/052.tga new file mode 100755 index 0000000..1551eb5 Binary files /dev/null and b/wolf3d/base/walls/052.tga differ diff --git a/wolf3d/base/walls/053.tga b/wolf3d/base/walls/053.tga new file mode 100755 index 0000000..62a7052 Binary files /dev/null and b/wolf3d/base/walls/053.tga differ diff --git a/wolf3d/base/walls/054.tga b/wolf3d/base/walls/054.tga new file mode 100755 index 0000000..3517527 Binary files /dev/null and b/wolf3d/base/walls/054.tga differ diff --git a/wolf3d/base/walls/055.tga b/wolf3d/base/walls/055.tga new file mode 100755 index 0000000..806670e Binary files /dev/null and b/wolf3d/base/walls/055.tga differ diff --git a/wolf3d/base/walls/056.tga b/wolf3d/base/walls/056.tga new file mode 100755 index 0000000..07bdf3d Binary files /dev/null and b/wolf3d/base/walls/056.tga differ diff --git a/wolf3d/base/walls/057.tga b/wolf3d/base/walls/057.tga new file mode 100755 index 0000000..3871561 Binary files /dev/null and b/wolf3d/base/walls/057.tga differ diff --git a/wolf3d/base/walls/058.tga b/wolf3d/base/walls/058.tga new file mode 100755 index 0000000..5b5362e Binary files /dev/null and b/wolf3d/base/walls/058.tga differ diff --git a/wolf3d/base/walls/059.tga b/wolf3d/base/walls/059.tga new file mode 100755 index 0000000..561d5a1 Binary files /dev/null and b/wolf3d/base/walls/059.tga differ diff --git a/wolf3d/base/walls/060.tga b/wolf3d/base/walls/060.tga new file mode 100755 index 0000000..d06149b Binary files /dev/null and b/wolf3d/base/walls/060.tga differ diff --git a/wolf3d/base/walls/061.tga b/wolf3d/base/walls/061.tga new file mode 100755 index 0000000..74b6713 Binary files /dev/null and b/wolf3d/base/walls/061.tga differ diff --git a/wolf3d/base/walls/062.tga b/wolf3d/base/walls/062.tga new file mode 100755 index 0000000..de5b0c2 Binary files /dev/null and b/wolf3d/base/walls/062.tga differ diff --git a/wolf3d/base/walls/063.tga b/wolf3d/base/walls/063.tga new file mode 100755 index 0000000..90b487f Binary files /dev/null and b/wolf3d/base/walls/063.tga differ diff --git a/wolf3d/base/walls/064.tga b/wolf3d/base/walls/064.tga new file mode 100755 index 0000000..61c4f30 Binary files /dev/null and b/wolf3d/base/walls/064.tga differ diff --git a/wolf3d/base/walls/065.tga b/wolf3d/base/walls/065.tga new file mode 100755 index 0000000..2672b85 Binary files /dev/null and b/wolf3d/base/walls/065.tga differ diff --git a/wolf3d/base/walls/066.tga b/wolf3d/base/walls/066.tga new file mode 100755 index 0000000..9ced8d4 Binary files /dev/null and b/wolf3d/base/walls/066.tga differ diff --git a/wolf3d/base/walls/067.tga b/wolf3d/base/walls/067.tga new file mode 100755 index 0000000..413a299 Binary files /dev/null and b/wolf3d/base/walls/067.tga differ diff --git a/wolf3d/base/walls/068.tga b/wolf3d/base/walls/068.tga new file mode 100755 index 0000000..aace87c Binary files /dev/null and b/wolf3d/base/walls/068.tga differ diff --git a/wolf3d/base/walls/069.tga b/wolf3d/base/walls/069.tga new file mode 100755 index 0000000..aff3454 Binary files /dev/null and b/wolf3d/base/walls/069.tga differ diff --git a/wolf3d/base/walls/070.tga b/wolf3d/base/walls/070.tga new file mode 100755 index 0000000..d34ac64 Binary files /dev/null and b/wolf3d/base/walls/070.tga differ diff --git a/wolf3d/base/walls/071.tga b/wolf3d/base/walls/071.tga new file mode 100755 index 0000000..4df85c1 Binary files /dev/null and b/wolf3d/base/walls/071.tga differ diff --git a/wolf3d/base/walls/072.tga b/wolf3d/base/walls/072.tga new file mode 100755 index 0000000..09b1436 Binary files /dev/null and b/wolf3d/base/walls/072.tga differ diff --git a/wolf3d/base/walls/073.tga b/wolf3d/base/walls/073.tga new file mode 100755 index 0000000..dfd726a Binary files /dev/null and b/wolf3d/base/walls/073.tga differ diff --git a/wolf3d/base/walls/074.tga b/wolf3d/base/walls/074.tga new file mode 100755 index 0000000..af38b2a Binary files /dev/null and b/wolf3d/base/walls/074.tga differ diff --git a/wolf3d/base/walls/075.tga b/wolf3d/base/walls/075.tga new file mode 100755 index 0000000..4329302 Binary files /dev/null and b/wolf3d/base/walls/075.tga differ diff --git a/wolf3d/base/walls/076.tga b/wolf3d/base/walls/076.tga new file mode 100755 index 0000000..d0328ad Binary files /dev/null and b/wolf3d/base/walls/076.tga differ diff --git a/wolf3d/base/walls/077.tga b/wolf3d/base/walls/077.tga new file mode 100755 index 0000000..51b8a6e Binary files /dev/null and b/wolf3d/base/walls/077.tga differ diff --git a/wolf3d/base/walls/078.tga b/wolf3d/base/walls/078.tga new file mode 100755 index 0000000..b5c1966 Binary files /dev/null and b/wolf3d/base/walls/078.tga differ diff --git a/wolf3d/base/walls/079.tga b/wolf3d/base/walls/079.tga new file mode 100755 index 0000000..3af2cd5 Binary files /dev/null and b/wolf3d/base/walls/079.tga differ diff --git a/wolf3d/base/walls/080.tga b/wolf3d/base/walls/080.tga new file mode 100755 index 0000000..1b02342 Binary files /dev/null and b/wolf3d/base/walls/080.tga differ diff --git a/wolf3d/base/walls/081.tga b/wolf3d/base/walls/081.tga new file mode 100755 index 0000000..9e9c6ff Binary files /dev/null and b/wolf3d/base/walls/081.tga differ diff --git a/wolf3d/base/walls/082.tga b/wolf3d/base/walls/082.tga new file mode 100755 index 0000000..7e63512 Binary files /dev/null and b/wolf3d/base/walls/082.tga differ diff --git a/wolf3d/base/walls/083.tga b/wolf3d/base/walls/083.tga new file mode 100755 index 0000000..7f5feaa Binary files /dev/null and b/wolf3d/base/walls/083.tga differ diff --git a/wolf3d/base/walls/084.tga b/wolf3d/base/walls/084.tga new file mode 100755 index 0000000..d97ca84 Binary files /dev/null and b/wolf3d/base/walls/084.tga differ diff --git a/wolf3d/base/walls/085.tga b/wolf3d/base/walls/085.tga new file mode 100755 index 0000000..809f1d7 Binary files /dev/null and b/wolf3d/base/walls/085.tga differ diff --git a/wolf3d/base/walls/086.tga b/wolf3d/base/walls/086.tga new file mode 100755 index 0000000..a92953d Binary files /dev/null and b/wolf3d/base/walls/086.tga differ diff --git a/wolf3d/base/walls/087.tga b/wolf3d/base/walls/087.tga new file mode 100755 index 0000000..f22cff9 Binary files /dev/null and b/wolf3d/base/walls/087.tga differ diff --git a/wolf3d/base/walls/088.tga b/wolf3d/base/walls/088.tga new file mode 100755 index 0000000..de69552 Binary files /dev/null and b/wolf3d/base/walls/088.tga differ diff --git a/wolf3d/base/walls/089.tga b/wolf3d/base/walls/089.tga new file mode 100755 index 0000000..983514a Binary files /dev/null and b/wolf3d/base/walls/089.tga differ diff --git a/wolf3d/base/walls/090.tga b/wolf3d/base/walls/090.tga new file mode 100755 index 0000000..e99ca71 Binary files /dev/null and b/wolf3d/base/walls/090.tga differ diff --git a/wolf3d/base/walls/091.tga b/wolf3d/base/walls/091.tga new file mode 100755 index 0000000..f968d2a Binary files /dev/null and b/wolf3d/base/walls/091.tga differ diff --git a/wolf3d/base/walls/092.tga b/wolf3d/base/walls/092.tga new file mode 100755 index 0000000..356cddb Binary files /dev/null and b/wolf3d/base/walls/092.tga differ diff --git a/wolf3d/base/walls/093.tga b/wolf3d/base/walls/093.tga new file mode 100755 index 0000000..122a429 Binary files /dev/null and b/wolf3d/base/walls/093.tga differ diff --git a/wolf3d/base/walls/094.tga b/wolf3d/base/walls/094.tga new file mode 100755 index 0000000..0e21037 Binary files /dev/null and b/wolf3d/base/walls/094.tga differ diff --git a/wolf3d/base/walls/095.tga b/wolf3d/base/walls/095.tga new file mode 100755 index 0000000..73adb89 Binary files /dev/null and b/wolf3d/base/walls/095.tga differ diff --git a/wolf3d/base/walls/096.tga b/wolf3d/base/walls/096.tga new file mode 100755 index 0000000..566b273 Binary files /dev/null and b/wolf3d/base/walls/096.tga differ diff --git a/wolf3d/base/walls/097.tga b/wolf3d/base/walls/097.tga new file mode 100755 index 0000000..e7c3970 Binary files /dev/null and b/wolf3d/base/walls/097.tga differ diff --git a/wolf3d/base/walls/098.tga b/wolf3d/base/walls/098.tga new file mode 100755 index 0000000..74fcb62 Binary files /dev/null and b/wolf3d/base/walls/098.tga differ diff --git a/wolf3d/base/walls/099.tga b/wolf3d/base/walls/099.tga new file mode 100755 index 0000000..6e43164 Binary files /dev/null and b/wolf3d/base/walls/099.tga differ diff --git a/wolf3d/base/walls/100.tga b/wolf3d/base/walls/100.tga new file mode 100755 index 0000000..d1a687a Binary files /dev/null and b/wolf3d/base/walls/100.tga differ diff --git a/wolf3d/base/walls/101.tga b/wolf3d/base/walls/101.tga new file mode 100755 index 0000000..69d1cc3 Binary files /dev/null and b/wolf3d/base/walls/101.tga differ diff --git a/wolf3d/base/walls/102.tga b/wolf3d/base/walls/102.tga new file mode 100755 index 0000000..82ef445 Binary files /dev/null and b/wolf3d/base/walls/102.tga differ diff --git a/wolf3d/base/walls/103.tga b/wolf3d/base/walls/103.tga new file mode 100755 index 0000000..a977073 Binary files /dev/null and b/wolf3d/base/walls/103.tga differ diff --git a/wolf3d/base/walls/104.tga b/wolf3d/base/walls/104.tga new file mode 100755 index 0000000..5250ccb Binary files /dev/null and b/wolf3d/base/walls/104.tga differ diff --git a/wolf3d/base/walls/105.tga b/wolf3d/base/walls/105.tga new file mode 100755 index 0000000..5dd1b4e Binary files /dev/null and b/wolf3d/base/walls/105.tga differ diff --git a/wolf3d/base/walls/106.tga b/wolf3d/base/walls/106.tga new file mode 100755 index 0000000..c7015e1 Binary files /dev/null and b/wolf3d/base/walls/106.tga differ diff --git a/wolf3d/base/walls/107.tga b/wolf3d/base/walls/107.tga new file mode 100755 index 0000000..442cde4 Binary files /dev/null and b/wolf3d/base/walls/107.tga differ diff --git a/wolf3d/base/walls/108.tga b/wolf3d/base/walls/108.tga new file mode 100755 index 0000000..cf3c695 Binary files /dev/null and b/wolf3d/base/walls/108.tga differ diff --git a/wolf3d/base/walls/109.tga b/wolf3d/base/walls/109.tga new file mode 100755 index 0000000..9ecf8d1 Binary files /dev/null and b/wolf3d/base/walls/109.tga differ diff --git a/wolf3d/base/walls/110.tga b/wolf3d/base/walls/110.tga new file mode 100755 index 0000000..e3fc000 Binary files /dev/null and b/wolf3d/base/walls/110.tga differ diff --git a/wolf3d/base/walls/111.tga b/wolf3d/base/walls/111.tga new file mode 100755 index 0000000..dd44115 Binary files /dev/null and b/wolf3d/base/walls/111.tga differ diff --git a/wolf3d/base/walls/112.tga b/wolf3d/base/walls/112.tga new file mode 100755 index 0000000..38740d8 Binary files /dev/null and b/wolf3d/base/walls/112.tga differ diff --git a/wolf3d/base/walls/113.tga b/wolf3d/base/walls/113.tga new file mode 100755 index 0000000..40ab1bd Binary files /dev/null and b/wolf3d/base/walls/113.tga differ diff --git a/wolf3d/base/walls/114.tga b/wolf3d/base/walls/114.tga new file mode 100755 index 0000000..bb5a1c2 Binary files /dev/null and b/wolf3d/base/walls/114.tga differ diff --git a/wolf3d/base/walls/115.tga b/wolf3d/base/walls/115.tga new file mode 100755 index 0000000..5cd1215 Binary files /dev/null and b/wolf3d/base/walls/115.tga differ diff --git a/wolf3d/base/walls/116.tga b/wolf3d/base/walls/116.tga new file mode 100755 index 0000000..fde2fa1 Binary files /dev/null and b/wolf3d/base/walls/116.tga differ diff --git a/wolf3d/base/walls/117.tga b/wolf3d/base/walls/117.tga new file mode 100755 index 0000000..229289a Binary files /dev/null and b/wolf3d/base/walls/117.tga differ diff --git a/wolf3d/base/walls/118.tga b/wolf3d/base/walls/118.tga new file mode 100755 index 0000000..569aac6 Binary files /dev/null and b/wolf3d/base/walls/118.tga differ diff --git a/wolf3d/base/walls/119.tga b/wolf3d/base/walls/119.tga new file mode 100755 index 0000000..62e22d1 Binary files /dev/null and b/wolf3d/base/walls/119.tga differ diff --git a/wolf3d/base/walls/120.tga b/wolf3d/base/walls/120.tga new file mode 100755 index 0000000..527f41f Binary files /dev/null and b/wolf3d/base/walls/120.tga differ diff --git a/wolf3d/base/walls/121.tga b/wolf3d/base/walls/121.tga new file mode 100755 index 0000000..b171ec5 Binary files /dev/null and b/wolf3d/base/walls/121.tga differ diff --git a/wolf3d/base/walls/122.tga b/wolf3d/base/walls/122.tga new file mode 100755 index 0000000..0a859dc Binary files /dev/null and b/wolf3d/base/walls/122.tga differ diff --git a/wolf3d/base/walls/123.tga b/wolf3d/base/walls/123.tga new file mode 100755 index 0000000..f8ac85c Binary files /dev/null and b/wolf3d/base/walls/123.tga differ diff --git a/wolf3d/base/walls/124.tga b/wolf3d/base/walls/124.tga new file mode 100755 index 0000000..87e7b62 Binary files /dev/null and b/wolf3d/base/walls/124.tga differ diff --git a/wolf3d/base/walls/125.tga b/wolf3d/base/walls/125.tga new file mode 100755 index 0000000..9b04a55 Binary files /dev/null and b/wolf3d/base/walls/125.tga differ diff --git a/wolf3d/base/walls/126.tga b/wolf3d/base/walls/126.tga new file mode 100755 index 0000000..c69d442 Binary files /dev/null and b/wolf3d/base/walls/126.tga differ diff --git a/wolf3d/base/walls/127.tga b/wolf3d/base/walls/127.tga new file mode 100755 index 0000000..5fffb0a Binary files /dev/null and b/wolf3d/base/walls/127.tga differ diff --git a/wolf3d/base/walls/128.tga b/wolf3d/base/walls/128.tga new file mode 100755 index 0000000..be9a249 Binary files /dev/null and b/wolf3d/base/walls/128.tga differ diff --git a/wolf3d/base/walls/129.tga b/wolf3d/base/walls/129.tga new file mode 100755 index 0000000..ae75598 Binary files /dev/null and b/wolf3d/base/walls/129.tga differ diff --git a/wolf3d/base/walls/130.tga b/wolf3d/base/walls/130.tga new file mode 100755 index 0000000..87f4b54 Binary files /dev/null and b/wolf3d/base/walls/130.tga differ diff --git a/wolf3d/base/walls/131.tga b/wolf3d/base/walls/131.tga new file mode 100755 index 0000000..72fd614 Binary files /dev/null and b/wolf3d/base/walls/131.tga differ diff --git a/wolf3d/base/walls/132.tga b/wolf3d/base/walls/132.tga new file mode 100755 index 0000000..eec2189 Binary files /dev/null and b/wolf3d/base/walls/132.tga differ diff --git a/wolf3d/base/walls/133.tga b/wolf3d/base/walls/133.tga new file mode 100755 index 0000000..b208ce9 Binary files /dev/null and b/wolf3d/base/walls/133.tga differ diff --git a/wolf3d/code/.DS_Store b/wolf3d/code/.DS_Store deleted file mode 100644 index 390aed0..0000000 Binary files a/wolf3d/code/.DS_Store and /dev/null differ diff --git a/wolf3d/code/env/cmd.c b/wolf3d/code/env/cmd.c index b8644bd..fc7f80e 100644 --- a/wolf3d/code/env/cmd.c +++ b/wolf3d/code/env/cmd.c @@ -133,7 +133,7 @@ PUBLIC void Cbuf_AddText( const char *text ) return; } - SZ_Write( &cmd_text, (void *)text, length ); + SZ_Write( &cmd_text, (void *)text, (int)length ); } /* @@ -174,7 +174,7 @@ PUBLIC void Cbuf_InsertText( char *text ) // add the copied off data if( templen ) { - SZ_Write( &cmd_text, temp, templen ); + SZ_Write( &cmd_text, temp, (int)templen ); Z_Free( temp ); } } @@ -501,7 +501,7 @@ PRIVATE void Cmd_Exec_f( void ) return; } - len = FS_GetFileSize( hfile ); + len = (int)FS_GetFileSize( hfile ); Com_Printf( "execing %s\n", Cmd_Argv( 1 ) ); @@ -725,7 +725,7 @@ PRIVATE char *Cmd_MacroExpandString( char *text ) inquote = false; scan = text; - len = strlen( scan ); + len = (int)strlen( scan ); if( len >= MAX_STRING_CHARS ) { Com_Printf( "Line exceeded %i chars, discarded.\n", MAX_STRING_CHARS ); @@ -753,7 +753,7 @@ PRIVATE char *Cmd_MacroExpandString( char *text ) token = Cvar_VariableString (token); - j = strlen(token); + j = (int)strlen(token); len += j; if (len >= MAX_STRING_CHARS) { @@ -851,7 +851,7 @@ PUBLIC void Cmd_TokenizeString( char *text, _boolean macroExpand ) my_strlcpy( cmd_args, text, sizeof( cmd_args ) - 1 ); // strip off any trailing whitespace - l = strlen( cmd_args ) - 1; + l = (int)strlen( cmd_args ) - 1; for( ; l >= 0 ; --l ) { if (cmd_args[l] <= ' ') @@ -1019,7 +1019,7 @@ PUBLIC char *Cmd_CompleteCommand( char *partial ) cmdalias_t *a; W32 hashid; - len = strlen( partial ); + len = (int)strlen( partial ); if( ! len ) { diff --git a/wolf3d/code/env/com_string.c b/wolf3d/code/env/com_string.c index 400007e..c311a63 100644 --- a/wolf3d/code/env/com_string.c +++ b/wolf3d/code/env/com_string.c @@ -454,7 +454,7 @@ PUBLIC double StringToFloat( const char *string, W32 *error ) const char *ptr = string; double number = 0; SW32 exponent = 0; - W32 expError; + W32 expError = 0; _boolean bNegative = false; *error = 0; diff --git a/wolf3d/code/env/common.c b/wolf3d/code/env/common.c index 1572967..de7c350 100644 --- a/wolf3d/code/env/common.c +++ b/wolf3d/code/env/common.c @@ -399,7 +399,7 @@ PUBLIC void SZ_Print( sizebuf_t *buf, W8 *data ) { int len; - len = strlen( (char *)data ) + 1; + len = (int)strlen( (char *)data ) + 1; if (buf->cursize) { @@ -585,9 +585,9 @@ PUBLIC void COM_AddParm( char *parm ) ----------------------------------------------------------------------------- */ -PRIVATE void Com_Error_f (void) -{ - Com_Error( ERR_FATAL, "%s", Cmd_Argv( 1 ) ); -} +//PRIVATE void Com_Error_f (void) +//{ +// Com_Error( ERR_FATAL, "%s", Cmd_Argv( 1 ) ); +//} diff --git a/wolf3d/code/env/console.c b/wolf3d/code/env/console.c index 735ab86..06d76f7 100644 --- a/wolf3d/code/env/console.c +++ b/wolf3d/code/env/console.c @@ -67,10 +67,10 @@ colour3_t colourconLLGray = { 192, 192, 192 }; ----------------------------------------------------------------------------- */ -PRIVATE void DrawString( int x, int y, char *s ) -{ - Font_put_line( FONT0, x, y, s ); -} +//PRIVATE void DrawString( int x, int y, char *s ) +//{ +// Font_put_line( FONT0, x, y, s ); +//} /* ----------------------------------------------------------------------------- @@ -479,7 +479,7 @@ PUBLIC void Con_CenteredPrint( const char *text ) int length; char buffer[ 1024 ]; - length = strlen( text ); + length = (int)strlen( text ); length = ( con.linewidth - length ) >> 1; if( length < 0 ) { @@ -532,7 +532,7 @@ PRIVATE void Con_DrawInput( void ) return; } strcpy( buf, SysIPhoneGetConsoleTextField() ); - key_linepos = strlen( buf ); + key_linepos = (int)strlen( buf ); buf[key_linepos+1] = 0; text = buf; } @@ -610,7 +610,7 @@ PUBLIC void Con_DrawNotify( void ) continue; } - time = FloatToInt( con.times[ i % NUM_CON_TIMES ] ); + time = (int)FloatToInt( con.times[ i % NUM_CON_TIMES ] ); if( time == 0 ) { continue; @@ -681,15 +681,15 @@ PUBLIC void Con_DrawConsole( float frac ) // // Draw the background // - R_Draw_Fill( 0, -viddef.height + lines, viddef.width, viddef.height, colourBlack ); - R_Draw_Fill( 0, lines-2, viddef.width, 2, colourconLGray ); + R_Draw_Fill( 0, (int)(-viddef.height + lines), viddef.width, viddef.height, colourBlack ); + R_Draw_Fill( 0, (int)(lines-2), viddef.width, 2, colourconLGray ); Font_SetColour( FONT0, colourconLLGray ); // // Draw the text // - con.vislines = lines; + con.vislines = (int)lines; #if 0 @@ -699,9 +699,9 @@ PUBLIC void Con_DrawConsole( float frac ) #else - rows = (lines - 22) >> 3; // rows of text to draw + rows = ((int)lines - 22) >> 3; // rows of text to draw - y = lines - 30; + y = (int)lines - 30; #endif diff --git a/wolf3d/code/env/fileio.c b/wolf3d/code/env/fileio.c index e5c9e2c..8fcc254 100644 --- a/wolf3d/code/env/fileio.c +++ b/wolf3d/code/env/fileio.c @@ -244,7 +244,7 @@ PUBLIC filehandle_t *FS_OpenFile( const char *filename, W32 FlagsAndAttributes ) hFile = Z_Malloc( sizeof( filehandle_t ) ); memset( hFile, 0, sizeof( filehandle_t ) ); - hFile->filesize = s.st_size; + hFile->filesize = (W32)s.st_size; #ifdef USE_MMAP hFile->filedata = mmap( NULL, hFile->filesize, PROT_READ, MAP_FILE|MAP_PRIVATE, fd, 0 ); if ( (int)hFile->filedata == -1 ) { diff --git a/wolf3d/code/env/files.c b/wolf3d/code/env/files.c index 7c552fd..7f86360 100644 --- a/wolf3d/code/env/files.c +++ b/wolf3d/code/env/files.c @@ -109,53 +109,53 @@ PUBLIC char *FS_ForceGamedir( void ) ----------------------------------------------------------------------------- */ -PRIVATE char **FS_ListFiles( char *findname, int *numfiles, unsigned musthave, unsigned canthave ) -{ - char *s; - int nfiles = 0; - char **list = 0; - - s = FS_FindFirst( findname, musthave, canthave ); - while ( s ) - { - if ( s[strlen(s)-1] != '.' ) - nfiles++; - s = FS_FindNext( musthave, canthave ); - } - FS_FindClose (); - - if ( !nfiles ) - return NULL; - - nfiles++; // add space for a guard - *numfiles = nfiles; - - list = MM_MALLOC( sizeof( char * ) * nfiles ); - if( list == NULL ) - { - MM_OUTOFMEM( "list" ); - } - - memset( list, 0, sizeof( char * ) * nfiles ); - - s = FS_FindFirst( findname, musthave, canthave ); - nfiles = 0; - while( s ) - { - if( s[ strlen( s ) - 1 ] != '.' ) - { - list[ nfiles ] = strdup( s ); - - (void)my_strlwr( list[ nfiles ] ); - - nfiles++; - } - s = FS_FindNext( musthave, canthave ); - } - FS_FindClose(); - - return list; -} +//PRIVATE char **FS_ListFiles( char *findname, int *numfiles, unsigned musthave, unsigned canthave ) +//{ +// char *s; +// int nfiles = 0; +// char **list = 0; +// +// s = FS_FindFirst( findname, musthave, canthave ); +// while ( s ) +// { +// if ( s[strlen(s)-1] != '.' ) +// nfiles++; +// s = FS_FindNext( musthave, canthave ); +// } +// FS_FindClose (); +// +// if ( !nfiles ) +// return NULL; +// +// nfiles++; // add space for a guard +// *numfiles = nfiles; +// +// list = MM_MALLOC( sizeof( char * ) * nfiles ); +// if( list == NULL ) +// { +// MM_OUTOFMEM( "list" ); +// } +// +// memset( list, 0, sizeof( char * ) * nfiles ); +// +// s = FS_FindFirst( findname, musthave, canthave ); +// nfiles = 0; +// while( s ) +// { +// if( s[ strlen( s ) - 1 ] != '.' ) +// { +// list[ nfiles ] = strdup( s ); +// +// (void)my_strlwr( list[ nfiles ] ); +// +// nfiles++; +// } +// s = FS_FindNext( musthave, canthave ); +// } +// FS_FindClose(); +// +// return list; +//} /* diff --git a/wolf3d/code/env/font_manager.c b/wolf3d/code/env/font_manager.c index b4bf57e..120f55a 100644 --- a/wolf3d/code/env/font_manager.c +++ b/wolf3d/code/env/font_manager.c @@ -315,7 +315,7 @@ void Font_put_lineR2L( FONTSELECT fs, int x, int y, const char *string ) for ( i = 0; i < strlen( string ); ++i ) { - charindex = strlen( string ) - i - 1; + charindex = (int)strlen( string ) - i - 1; mx -= myfonts[ fs ]->nCharWidth[ string[ charindex ]-32 ] * myfonts[ fs ]->nSize; R_Draw_Character( mx, y, string[ charindex ], myfonts[ fs ] ); diff --git a/wolf3d/code/env/glob.c b/wolf3d/code/env/glob.c index 02a68e1..cce073c 100644 --- a/wolf3d/code/env/glob.c +++ b/wolf3d/code/env/glob.c @@ -64,41 +64,41 @@ static int glob_match_after_star( char *pattern, char *text ) } /* Return nonzero if PATTERN has any special globbing chars in it. */ -static int glob_pattern_p( char *pattern ) -{ - register char *p = pattern; - register char c; - int open = 0; - - while( (c = *p++) != '\0' ) - { - switch( c ) - { - case '?': - case '*': - return 1; - - case '[': /* Only accept an open brace if there is a close */ - open++; /* brace to match it. Bracket expressions must be */ - continue; /* complete, according to Posix.2 */ - case ']': - if( open ) - { - return 1; - } - continue; - - case '\\': - if( *p++ == '\0' ) - { - return 0; - } - } - - } - - return 0; -} +//static int glob_pattern_p( char *pattern ) +//{ +// register char *p = pattern; +// register char c; +// int open = 0; +// +// while( (c = *p++) != '\0' ) +// { +// switch( c ) +// { +// case '?': +// case '*': +// return 1; +// +// case '[': /* Only accept an open brace if there is a close */ +// open++; /* brace to match it. Bracket expressions must be */ +// continue; /* complete, according to Posix.2 */ +// case ']': +// if( open ) +// { +// return 1; +// } +// continue; +// +// case '\\': +// if( *p++ == '\0' ) +// { +// return 0; +// } +// } +// +// } +// +// return 0; +//} /* Match the pattern PATTERN against the string TEXT; return 1 if it matches, 0 otherwise. diff --git a/wolf3d/code/env/oggfile.c b/wolf3d/code/env/oggfile.c index 6e66488..2391bdc 100644 --- a/wolf3d/code/env/oggfile.c +++ b/wolf3d/code/env/oggfile.c @@ -36,7 +36,7 @@ PRIVATE size_t ovc_read( void *ptr, size_t size, size_t nmemb, void *dataSource PRIVATE int ovc_seek( void *dataSource, ogg_int64_t offset, int whence ) { - return FS_FileSeek( fh, offset, whence ); + return (int)FS_FileSeek( fh, (long)offset, whence ); } PRIVATE int ovc_close( void *dataSource ) @@ -79,7 +79,7 @@ PUBLIC _boolean LoadOggInfo( const char *filename, W8 **wav, soundInfo_t *info ) newFilename = strdup( filename ); - len = strlen( newFilename ); + len = (int)strlen( newFilename ); if ( len < 5 || strcmp( newFilename + len - 4, ".wav" ) ) { free( newFilename ); return false; @@ -121,7 +121,7 @@ PUBLIC _boolean LoadOggInfo( const char *filename, W8 **wav, soundInfo_t *info ) while( size < BUFFER_SIZE ) { int read = 0; - read = ov_read( &vorbisFile, (char *)data + size, BUFFER_SIZE - size, &dummy ); + read = (int)ov_read( &vorbisFile, (char *)data + size, BUFFER_SIZE - size, &dummy ); if( read == 0 ) { break; diff --git a/wolf3d/code/env/opengl_draw.c b/wolf3d/code/env/opengl_draw.c index 62ec23e..8ad54f9 100644 --- a/wolf3d/code/env/opengl_draw.c +++ b/wolf3d/code/env/opengl_draw.c @@ -75,7 +75,7 @@ PUBLIC void R_Draw_Character( int x, int y, int num, font_t *myfont ) return; // totally off screen } - scale = myfont->nSize; + scale = (int)myfont->nSize; sh = myfont->nMaxHeight; row = (num >> 4) - 2; diff --git a/wolf3d/code/env/opengl_local.h b/wolf3d/code/env/opengl_local.h index a4f738a..a911b7a 100644 --- a/wolf3d/code/env/opengl_local.h +++ b/wolf3d/code/env/opengl_local.h @@ -235,7 +235,7 @@ IMPLEMENTATION SPECIFIC FUNCTIONS extern "C" { #endif -void GLimp_BeginFrame(); +void GLimp_BeginFrame(void); _boolean GLimp_Init( void *hinstance, void *hWnd ); void GLimp_Shutdown( void ); int GLimp_SetMode( int *pwidth, int *pheight, int mode, _boolean fullscreen ); diff --git a/wolf3d/code/env/random_number.c b/wolf3d/code/env/random_number.c index 7256694..7f6a3fc 100644 --- a/wolf3d/code/env/random_number.c +++ b/wolf3d/code/env/random_number.c @@ -101,7 +101,7 @@ PUBLIC int US_RndT( void ) rndindex++; rndindex &= 0xFF; - return rndtable[ rndindex ]; + return (int)rndtable[ rndindex ]; } diff --git a/wolf3d/code/env/sound.c b/wolf3d/code/env/sound.c index 5282838..b27380d 100644 --- a/wolf3d/code/env/sound.c +++ b/wolf3d/code/env/sound.c @@ -289,8 +289,8 @@ PUBLIC channel_t *Sound_PickChannel( W32 entNum, W32 entChannel ) ch = &s_channels[ firstToDie ]; - ch->entNum = entNum; - ch->entChannel = entChannel; + ch->entNum = (int)entNum; + ch->entChannel = (int)entChannel; ch->startTime = iphoneFrameNum; // Make sure this channel is stopped diff --git a/wolf3d/code/env/sound_local.h b/wolf3d/code/env/sound_local.h index ec19e2c..59ef8bf 100644 --- a/wolf3d/code/env/sound_local.h +++ b/wolf3d/code/env/sound_local.h @@ -106,8 +106,8 @@ extern sfx_t *Sound_FindSound( const char *name ); extern _boolean Sound_Device_Setup( void ); extern void Sound_Device_Shutdown( void ); -void AL_CheckErrors(); -void ALC_CheckErrors(); +void AL_CheckErrors(void); +void ALC_CheckErrors(void); #endif /* __SOUND_LOCAL_H__ */ diff --git a/wolf3d/code/env/sound_sfx_id.c b/wolf3d/code/env/sound_sfx_id.c index 7e757f4..cd8e188 100644 --- a/wolf3d/code/env/sound_sfx_id.c +++ b/wolf3d/code/env/sound_sfx_id.c @@ -176,10 +176,10 @@ PUBLIC _boolean Sound_LoadSound( sfx_t *sfx ) } sfx->loaded = true; - sfx->samples = info.samples; - sfx->rate = info.sample_rate; + sfx->samples = (int)info.samples; + sfx->rate = (int)info.sample_rate; - Sound_UploadSound( data, info.sample_size, info.channels, sfx ); + Sound_UploadSound( data, (int)info.sample_size, (int)info.channels, sfx ); Z_Free( data ); diff --git a/wolf3d/code/env/sound_stream.c b/wolf3d/code/env/sound_stream.c index b101730..742aa48 100644 --- a/wolf3d/code/env/sound_stream.c +++ b/wolf3d/code/env/sound_stream.c @@ -112,7 +112,7 @@ PRIVATE int ovc_seek( void *datasource, ogg_int64_t offset, int whence ) { musicTrack_t *track = (musicTrack_t *)datasource; - return FS_FileSeek( track->hFile, offset, whence ); + return (int)FS_FileSeek( track->hFile, (long)offset, whence ); } /* @@ -218,8 +218,8 @@ PRIVATE _boolean Sound_OpenBGTrack( const char *name, musicTrack_t *track ) return false; } - track->start = ov_raw_tell( vorbisFile ); - track->rate = vorbisInfo->rate; + track->start = (int)ov_raw_tell( vorbisFile ); + track->rate = (int)vorbisInfo->rate; track->format = (vorbisInfo->channels == 2) ? AL_FORMAT_STEREO16 : AL_FORMAT_MONO16; return true; @@ -308,7 +308,7 @@ PUBLIC void Sound_StreamBGTrack( void ) // Stream from disk while( size < BUFFER_SIZE ) { - read = ov_read( bgTrack.vorbisFile, (char *)data + size, BUFFER_SIZE - size, &dummy ); + read = (int)ov_read( bgTrack.vorbisFile, (char *)data + size, BUFFER_SIZE - size, &dummy ); if( read == 0 ) { // End of file @@ -331,7 +331,7 @@ PUBLIC void Sound_StreamBGTrack( void ) ov_raw_seek( bgTrack.vorbisFile, (ogg_int64_t)bgTrack.start ); // Try streaming again - read = ov_read( bgTrack.vorbisFile, (char *)data + size, BUFFER_SIZE - size, &dummy ); + read = (int)ov_read( bgTrack.vorbisFile, (char *)data + size, BUFFER_SIZE - size, &dummy ); } if( read <= 0 ) diff --git a/wolf3d/code/env/texture_manager.c b/wolf3d/code/env/texture_manager.c index 5886557..5ccc9da 100644 --- a/wolf3d/code/env/texture_manager.c +++ b/wolf3d/code/env/texture_manager.c @@ -268,8 +268,8 @@ PUBLIC texture_t *TM_LoadTexture( const char *name, W8 *data, int width, int hei tex->MipMap = false; tex->WrapS = Clamp; tex->WrapT = Clamp; - tex->MinFilter = Nearest; - tex->MagFilter = NearestMipMapOff; + tex->MinFilter = NearestMipMapOff; + tex->MagFilter = Nearest; break; case TT_Wall: @@ -284,8 +284,8 @@ PUBLIC texture_t *TM_LoadTexture( const char *name, W8 *data, int width, int hei default: tex->WrapS = Repeat; tex->WrapT = Repeat; - tex->MinFilter = Nearest; - tex->MagFilter = NearestMipMapOff; + tex->MinFilter = NearestMipMapOff; + tex->MagFilter = Nearest; break; } @@ -465,7 +465,7 @@ PUBLIC texture_t *TM_FindTexture( const char *name, texturetype_t type ) } // Check for file extension - len = strlen( name ); + len = (int)strlen( name ); if( len < 5 ) { return r_notexture; @@ -625,7 +625,7 @@ PUBLIC texture_t *TM_FindTexture( const char *name, texturetype_t type ) Com_Printf( "Failed to find texture %s\n", name ); return r_notexture; } //else { //added the else...gsh - jpgSize = FS_GetFileSize( fh ); + jpgSize = (int)FS_GetFileSize( fh ); jpgData = fh->ptrStart; SysIPhoneLoadJPG( jpgData, jpgSize, &data, &width, &height, &bytes ); diff --git a/wolf3d/code/env/tga.c b/wolf3d/code/env/tga.c index 82312db..93107e5 100644 --- a/wolf3d/code/env/tga.c +++ b/wolf3d/code/env/tga.c @@ -616,7 +616,7 @@ PRIVATE void rle_write( FILE *fp, /* next pixel is different */ if( repeat ) { - putc( 128 + repeat, fp ); + putc( 128 + (int)repeat, fp ); fwrite( from, bytes, 1, fp ); from = buffer + bytes; /* point to first different pixel */ repeat = 0; @@ -632,7 +632,7 @@ PRIVATE void rle_write( FILE *fp, /* next pixel is the same */ if( direct ) { - putc( direct - 1, fp ); + putc( (int)direct - 1, fp ); fwrite( from, bytes, direct, fp ); from = buffer; /* point to first identical pixel */ direct = 0; @@ -666,12 +666,12 @@ PRIVATE void rle_write( FILE *fp, if( repeat > 0 ) { - putc( 128 + repeat, fp ); + putc( 128 + (int)repeat, fp ); fwrite( from, bytes, 1, fp ); } else { - putc( direct, fp ); + putc( (int)direct, fp ); fwrite( from, bytes, direct + 1, fp ); } } diff --git a/wolf3d/code/env/unix_timer.c b/wolf3d/code/env/unix_timer.c index 38b6f42..d4392da 100644 --- a/wolf3d/code/env/unix_timer.c +++ b/wolf3d/code/env/unix_timer.c @@ -57,7 +57,7 @@ PUBLIC W32 Sys_Milliseconds( void ) if( ! secbase ) { - secbase = tp.tv_sec; + secbase = (int)tp.tv_sec; return tp.tv_usec / 1000; } diff --git a/wolf3d/code/env/wavfile.c b/wolf3d/code/env/wavfile.c index 47e89ea..d030a70 100644 --- a/wolf3d/code/env/wavfile.c +++ b/wolf3d/code/env/wavfile.c @@ -108,23 +108,23 @@ PRIVATE void Wav_FindChunk( const char *name ) Wav_FindNextChunk( name ); } -PRIVATE void DumpChunks( void ) -{ - char str[ 5 ]; - - str[ 4 ] = 0; - iff_pdata = iff_data; - do - { - memcpy( str, iff_pdata, 4 ); - iff_pdata += 4; - iff_chunk_len = Wav_GetLittleLong(); - Com_Printf( "0x%x : %s (%d)\n", (int)(iff_pdata - 4), str, iff_chunk_len ); - iff_pdata += (iff_chunk_len + 1) & ~1; - - } while( iff_pdata < iff_end ); - -} +//PRIVATE void DumpChunks( void ) +//{ +// char str[ 5 ]; +// +// str[ 4 ] = 0; +// iff_pdata = iff_data; +// do +// { +// memcpy( str, iff_pdata, 4 ); +// iff_pdata += 4; +// iff_chunk_len = Wav_GetLittleLong(); +// Com_Printf( "0x%x : %s (%d)\n", (int)(iff_pdata - 4), str, iff_chunk_len ); +// iff_pdata += (iff_chunk_len + 1) & ~1; +// +// } while( iff_pdata < iff_end ); +// +//} /* diff --git a/wolf3d/code/env/zmem.c b/wolf3d/code/env/zmem.c index 872d594..a2e8f9e 100644 --- a/wolf3d/code/env/zmem.c +++ b/wolf3d/code/env/zmem.c @@ -161,7 +161,7 @@ PUBLIC void *Z_TagMalloc( size_t size, int tag ) z_bytes += size; z->magic = Z_MAGIC; z->tag = tag; - z->size = size; + z->size = (int)size; // Add new memory block to chain. z->next = z_chain.next; diff --git a/wolf3d/code/iphone/.DS_Store b/wolf3d/code/iphone/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/wolf3d/code/iphone/.DS_Store and /dev/null differ diff --git a/wolf3d/code/iphone/CreditsView.xib b/wolf3d/code/iphone/CreditsView.xib index 5789a36..99bf18a 100644 --- a/wolf3d/code/iphone/CreditsView.xib +++ b/wolf3d/code/iphone/CreditsView.xib @@ -1,1483 +1,112 @@ - - - 1056 - 10K549 - 851 - 1038.36 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 141 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - YES - - - 256 - {480, 320} - - NO - YES - 1 - YES - IBCocoaTouchFramework - - NSImage - credits_bg.png - - - - - 292 - {{21, 265}, {32, 32}} - - 1 - NO - IBCocoaTouchFramework - - NSImage - back_arrow.png - - - - - 292 - {{20, 242}, {66, 29}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - BACK - - POSITYPE-idSettler_v10.2 - 18 - 16 - - - 3 - MQA - - - 1 - 10 - 5 - - - - 301 - {{3, 237}, {69, 69}} - - NO - NO - 1 - IBCocoaTouchFramework - 0 - 0 - - Helvetica-Bold - 15 - 16 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - NSImage - button_highlight.png - - - - - 292 - - YES - - - 292 - {{94, 733}, {271, 116}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Wolfenstein 3D and Spear of Destiny originally created by id Software - - Helvetica-Bold - 20 - 16 - - - - - 1 - MCAwIDAAA - - {1, 1} - 1 - 10 - 4 - 1 - 0 - - - - 292 - {{99, 20}, {275, 59}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Wolfenstein 3D Classic Platinum - - Helvetica-Bold - 22 - 16 - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{86, 87}, {307, 36}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Programming - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{86, 294}, {307, 36}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Art - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{86, 421}, {307, 36}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Audio - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{85, 910}, {307, 36}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Programming - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{85, 1024}, {307, 36}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Design - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{85, 1174}, {307, 36}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Art - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{85, 1303}, {307, 36}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Audio - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{86, 532}, {307, 36}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Production - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{87, 639}, {307, 36}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - QA Testing - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{184, 140}, {111, 21}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - John Carmack - - Helvetica - 17 - 16 - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{183, 954}, {111, 21}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - John Carmack - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{183, 1068}, {111, 21}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - John Ramero - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{183, 1094}, {111, 21}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Tom Hall - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{178, 1218}, {121, 23}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Adrian Carmack - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{183, 1246}, {111, 21}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Kevin Cloud - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{183, 1351}, {111, 21}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Bobby Prince - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{185, 338}, {111, 21}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - John Burnett - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{185, 367}, {111, 21}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Mike Horton - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{171, 465}, {137, 26}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Christian Antkow - - - - - {1, 1} - 1 - NO - 10 - 1 - - - - 292 - {{171, 576}, {137, 26}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Rafael Brown - - - - - {1, 1} - 1 - NO - 10 - 1 - - - - 292 - {{172, 683}, {137, 26}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Sean Palomino - - - - - {1, 1} - 1 - NO - 10 - 1 - - - - 292 - {{184, 169}, {111, 21}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Jeff Farrand - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{184, 198}, {111, 21}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Ryan Gerleve - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{184, 234}, {111, 21}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Greg Hodges - - - - - {1, 1} - 1 - 10 - 1 - - - {{83, 320}, {460, 1400}} - - - 3 - MCAwAA - - NO - - 3 - - IBCocoaTouchFramework - - - {480, 320} - - - 3 - MAA - - - 3 - - IBCocoaTouchFramework - - - - - YES - - - view - - - - 6 - - - - creditsRoll - - - - 20 - - - - back: - - - 7 - - 21 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 9 - - - - - 10 - - - - - 11 - - - - - 8 - - - - - 12 - - - YES - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Credtis text roll - - - 40 - - - - - 13 - - - - - 39 - - - - - 38 - - - - - 37 - - - - - 36 - - - - - 35 - - - - - 34 - - - - - 33 - - - - - 32 - - - - - 31 - - - - - 30 - - - - - 29 - - - - - 28 - - - - - 27 - - - - - 26 - - - - - 25 - - - - - 24 - - - - - 23 - - - - - 22 - - - - - 19 - - - - - 18 - - - - - 17 - - - - - 16 - - - - - 15 - - - - - 14 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 10.CustomClassName - 10.IBPluginDependency - 10.IBViewBoundsToFrameTransform - 11.IBPluginDependency - 11.IBViewBoundsToFrameTransform - 12.IBEditorWindowLastContentRect - 12.IBPluginDependency - 12.IBViewBoundsToFrameTransform - 13.IBPluginDependency - 13.IBViewBoundsToFrameTransform - 14.IBPluginDependency - 14.IBViewBoundsToFrameTransform - 15.IBPluginDependency - 15.IBViewBoundsToFrameTransform - 16.IBPluginDependency - 16.IBViewBoundsToFrameTransform - 17.IBPluginDependency - 17.IBViewBoundsToFrameTransform - 18.IBPluginDependency - 18.IBViewBoundsToFrameTransform - 19.IBPluginDependency - 19.IBViewBoundsToFrameTransform - 22.IBPluginDependency - 22.IBViewBoundsToFrameTransform - 23.IBPluginDependency - 23.IBViewBoundsToFrameTransform - 24.IBPluginDependency - 24.IBViewBoundsToFrameTransform - 25.IBPluginDependency - 25.IBViewBoundsToFrameTransform - 26.IBPluginDependency - 26.IBViewBoundsToFrameTransform - 27.IBPluginDependency - 27.IBViewBoundsToFrameTransform - 28.IBPluginDependency - 28.IBViewBoundsToFrameTransform - 29.IBPluginDependency - 29.IBViewBoundsToFrameTransform - 30.IBPluginDependency - 30.IBViewBoundsToFrameTransform - 31.IBPluginDependency - 31.IBViewBoundsToFrameTransform - 32.IBPluginDependency - 32.IBViewBoundsToFrameTransform - 33.IBPluginDependency - 33.IBViewBoundsToFrameTransform - 34.IBPluginDependency - 34.IBViewBoundsToFrameTransform - 35.IBPluginDependency - 35.IBViewBoundsToFrameTransform - 36.IBPluginDependency - 36.IBViewBoundsToFrameTransform - 37.IBPluginDependency - 37.IBViewBoundsToFrameTransform - 38.IBPluginDependency - 38.IBViewBoundsToFrameTransform - 39.IBPluginDependency - 39.IBViewBoundsToFrameTransform - 40.IBPluginDependency - 40.IBViewBoundsToFrameTransform - 8.IBViewBoundsToFrameTransform - 9.IBPluginDependency - 9.IBViewBoundsToFrameTransform - - - YES - CreditsViewController - UIResponder - {{522, 817}, {480, 320}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABBoAAAw4aAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUIUAABDg4AAA - - {{387, 0}, {475, 1156}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAAAAAAAAxK7AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCkgAAxFPAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCqgAAwuwAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUKsAABCrgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUM4AABDDAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDQAAAw2QAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDQAAAw4CAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDQAAAw48AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUKsAABDkwAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUM5AABDyQAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUM5AABD14AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUKsAABD0oAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUMrAABEBEAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUKsAABEFQAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUMrAABEIAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCrgAAwz4AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUM7AABDTAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCrgAAw0UAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUKqAABEgAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCrgAAxATAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUM3AABEboAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCrgAAw8oAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUM3AABEhYAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUM3AABEiMAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUM3AABEmEAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDOQAAwyQAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUM3AABEmEAAA - - - P4AAAL+AAAAAAAAAw58AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUBAAABDbQAAA - - - - - YES - - - YES - - - - - YES - - - YES - - - - 40 - - - - YES - - CreditsViewController - UIViewController - - back: - id - - - back: - - back: - id - - - - creditsRoll - UIView - - - creditsRoll - - creditsRoll - UIView - - - - IBProjectSource - CreditsViewController.h - - - - UIFontLabel - UILabel - - IBProjectSource - UIFontLabel.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIButton - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UIButton.h - - - - UIControl - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIControl.h - - - - UIImageView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIImageView.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIPrintFormatter.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - wolf3d.xcodeproj - 3 - - YES - - YES - back_arrow.png - button_highlight.png - credits_bg.png - - - YES - {65, 63} - {4, 4} - {960, 640} - - - 141 - - + + + + + + + + + + + + Helvetica-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/CreditsViewController.h b/wolf3d/code/iphone/CreditsViewController.h index 16bf0b9..0096831 100644 --- a/wolf3d/code/iphone/CreditsViewController.h +++ b/wolf3d/code/iphone/CreditsViewController.h @@ -24,9 +24,8 @@ #import -@interface CreditsViewController : UIViewController { - @private - IBOutlet UIView* creditsRoll; +@interface CreditsViewController : UIViewController { + IBOutlet UITableView *creditsList; } - (IBAction)back:(id)sender; diff --git a/wolf3d/code/iphone/CreditsViewController.m b/wolf3d/code/iphone/CreditsViewController.m index bf90572..28a8666 100644 --- a/wolf3d/code/iphone/CreditsViewController.m +++ b/wolf3d/code/iphone/CreditsViewController.m @@ -22,72 +22,131 @@ */ #import "CreditsViewController.h" -#import - -#define CREDITS_ANIMATION_POINTS_PER_SECOND ( 320.0f / 6.0f ) // Six seconds to scroll up - // an iPhone screen. +#import "wolfiphone.h" @interface CreditsViewController () - @property (nonatomic, retain) UIView* creditsRoll; +@property (nonatomic, retain) UITableView *creditsList; @end @implementation CreditsViewController -@synthesize creditsRoll; +@synthesize creditsList; -// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. -/* -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - // Custom initialization. - } - return self; -} -*/ +#define CREDITS_LINES 48 -/* -// Implement loadView to create a view hierarchy programmatically, without using a nib. -- (void)loadView { -} -*/ +// 1 - heading 1 +// 2 - heading 2 +// 3 - normal text +// 4 - tiny text + +static const char * const CreditText[CREDITS_LINES] = { + "Wolfenstein 3D Classic Platinum", + "", + "Programming", + "", + "John Carmack", + "Jeff Farrand", + "Ryan Gerleve", + "Greg Hodges", + "", + "Art", + "", + "John Burnett", + "Mike Horton", + "", + "Audio", + "", + "Christian Antkow", + "", + "Production", + "", + "Rafael Brown", + "", + "QA Testing", + "", + "Sean Palomino", + "", + "", + "Wolfenstein 3D and Spear of Destiny", + "originally created by id Software", + "", + "", + "Programming", + "", + "John Carmack", + "", + "Design", + "", + "John Romero", + "Tom Hall", + "", + "Art", + "", + "Adrian Carmack", + "Kevin Cloud", + "", + "Audio", + "", + "Bobby Prince" +}; + +static const int CreditSizes[CREDITS_LINES] = { + 1, + 4, + 2, + 4, + 3, + 3, + 3, + 3, + 4, + 2, + 4, + 3, + 3, + 4, + 2, + 4, + 3, + 4, + 2, + 4, + 3, + 4, + 2, + 4, + 3, + 4, + 4, + 5, + 5, + 4, + 4, + 2, + 4, + 3, + 4, + 2, + 4, + 3, + 3, + 4, + 2, + 4, + 3, + 3, + 4, + 2, + 4, + 3 +}; // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; - - // This is the starting position of the credits text. - CGPoint startPoint = self.creditsRoll.center; - - // Set up the end point. We can stop the animation as soon as the bottom of the credits - // get to the top of the screen. - CGPoint endPoint = startPoint; - - endPoint.y = -self.creditsRoll.bounds.size.height; - - // Start credits animation - CABasicAnimation *theAnimation; - - theAnimation=[CABasicAnimation animationWithKeyPath:@"position"]; - - CGFloat pointDistance = endPoint.y - startPoint.y; - - theAnimation.duration= fabs( pointDistance ) * ( 1.0f / CREDITS_ANIMATION_POINTS_PER_SECOND ); - - theAnimation.fromValue=[NSValue valueWithCGPoint:startPoint]; - theAnimation.toValue=[NSValue valueWithCGPoint:endPoint]; - - [self.creditsRoll.layer addAnimation:theAnimation forKey:@"animatePosition"]; -} - - -// Override to allow orientations other than the default portrait orientation. -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - // Return YES for supported orientations. - return UIInterfaceOrientationIsLandscape(interfaceOrientation); } - (void)didReceiveMemoryWarning { @@ -97,14 +156,6 @@ - (void)didReceiveMemoryWarning { // Release any cached data, images, etc. that aren't in use. } -- (void)viewDidUnload { - [super viewDidUnload]; - // Release any retained subviews of the main view. - // e.g. self.myOutlet = nil; - self.creditsRoll = nil; -} - - - (void)dealloc { [super dealloc]; } @@ -113,4 +164,95 @@ - (IBAction)back:(id)sender { [self.navigationController popViewControllerAnimated:YES]; } +/* + ======================== + + UITableView interface + + ======================== + */ + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return CREDITS_LINES; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + static NSString *MyIdentifier = @"MyIdentifier"; + + UITableViewCell *cell = (UITableViewCell*)[self.creditsList dequeueReusableCellWithIdentifier:MyIdentifier]; + + if (cell == nil) { + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:MyIdentifier] autorelease]; + } + + cell.selectionStyle = UITableViewCellSelectionStyleNone; + + cell.textLabel.text = [NSString stringWithCString:CreditText[indexPath.row] encoding:NSASCIIStringEncoding]; + + cell.backgroundColor = UIColor.clearColor; + + cell.textLabel.textColor = UIColor.whiteColor; + + CGFloat points = cell.textLabel.font.pointSize; + + switch (CreditSizes[indexPath.row]) { + case 1: + points = 22; + break; + case 2: + points = 20; + break; + case 3: + points = 17; + break; + case 4: + points = 14; + break; + case 5: + points = 20; + break; + + default: + break; + } + + if (IS_IPAD) { + cell.textLabel.font =[UIFont systemFontOfSize:points weight:UIFontWeightBold]; + } else { + cell.textLabel.font =[UIFont systemFontOfSize:points-5 weight:UIFontWeightBold]; + } + + cell.textLabel.textAlignment = NSTextAlignmentCenter; + + return cell; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { + + CGFloat size = 40; + + switch (CreditSizes[indexPath.row]) { + case 1: + size = 60; + break; + case 2: + size = 40; + break; + case 3: + size = 20; + break; + case 4: + size = 10; + break; + case 5: + size = 24; + break; + + default: + break; + } + + return size; +} + @end diff --git a/wolf3d/code/iphone/EAGLView.m b/wolf3d/code/iphone/EAGLView.m index cd3f59f..5674408 100644 --- a/wolf3d/code/iphone/EAGLView.m +++ b/wolf3d/code/iphone/EAGLView.m @@ -96,7 +96,10 @@ - (id)initWithFrame:(CGRect)aRect { eaglview = self; if ( self ) { + +#if !TARGET_OS_TV [self setMultipleTouchEnabled:YES]; +#endif // Support rendering at native resolution on devices with Retina displays. if( [self respondsToSelector:@selector(contentScaleFactor)] ) { @@ -263,9 +266,9 @@ - (BOOL)presentFramebuffer } - loggedTimes[iphoneFrameNum&(MAX_LOGGED_TIMES-1)].beforeSwap = Sys_Milliseconds(); + loggedTimes[iphoneFrameNum&(MAX_LOGGED_TIMES-1)].beforeSwap = (int)Sys_Milliseconds(); success = [context presentRenderbuffer:GL_RENDERBUFFER_OES]; - loggedTimes[iphoneFrameNum&(MAX_LOGGED_TIMES-1)].afterSwap = Sys_Milliseconds(); + loggedTimes[iphoneFrameNum&(MAX_LOGGED_TIMES-1)].afterSwap = (int)Sys_Milliseconds(); } return success; @@ -276,7 +279,7 @@ - (void)layoutSubviews { //float widthRatio = ( self.bounds.size.width * deviceScale ) / REFERENCE_WIDTH; //float heightRatio = ( self.bounds.size.height * deviceScale ) / REFERENCE_HEIGHT; - [self deleteFramebuffer]; + [self deleteFramebuffer]; /* if ( widthRatio < heightRatio ) { @@ -305,6 +308,7 @@ - (void)dealloc { } - (void) handleTouches:(NSSet*)touches withEvent:(UIEvent*)event { +#if !TARGET_OS_TV int touchCount = 0; int points[16]; static int previousTouchCount = 0; @@ -317,10 +321,15 @@ - (void) handleTouches:(NSSet*)touches withEvent:(UIEvent*)event { for (UITouch *myTouch in t) { CGPoint touchLocation = [myTouch locationInView:self]; - - points[ 2 * touchCount + 0 ] = touchLocation.x; - points[ 2 * touchCount + 1 ] = touchLocation.y; // ( h - 1 ) - touchLocation.y; - + + if ([[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeLeft) { + points[ 2 * touchCount + 1 ] = self.bounds.size.width - (self.bounds.size.width - touchLocation.x); + points[ 2 * touchCount + 0 ] = self.bounds.size.height - touchLocation.y; + } else { + points[ 2 * touchCount + 1 ] = self.bounds.size.width - touchLocation.x; + points[ 2 * touchCount + 0 ] = self.bounds.size.height - (self.bounds.size.height - touchLocation.y); + } + touchCount++; if (myTouch.phase == UITouchPhaseBegan) { @@ -353,7 +362,7 @@ - (void) handleTouches:(NSSet*)touches withEvent:(UIEvent*)event { textField.autocorrectionType = UITextAutocorrectionTypeNo; [textField becomeFirstResponder]; } else { - void iphoneDeactivateConsole(); + void iphoneDeactivateConsole(void); [textField resignFirstResponder]; [textField removeFromSuperview]; textField = nil; @@ -364,6 +373,7 @@ - (void) handleTouches:(NSSet*)touches withEvent:(UIEvent*)event { previousTouchCount = touchCount; iphoneTouchEvent( touchCount, points ); +#endif } @@ -467,7 +477,7 @@ void SysIPhoneOpenURL( const char *url ) { Com_Printf( "OpenURL char *: %s\n", url ); NSString *nss = [NSString stringWithCString: url encoding: NSASCIIStringEncoding]; - [[UIApplication sharedApplication] openURL:[NSURL URLWithString: nss]]; + [[UIApplication sharedApplication] openURL:[NSURL URLWithString: nss] options:@{} completionHandler:nil]; } void SysIPhoneLoadJPG( W8* jpegData, int jpegBytes, W8 **pic, W16 *width, W16 *height, W16 *bytes ) { @@ -479,7 +489,7 @@ void SysIPhoneLoadJPG( W8* jpegData, int jpegBytes, W8 **pic, W16 *width, W16 *h *height = img.size.height; imgBytes = (int)(*width) * (int)(*height) * 4; data = CGDataProviderCopyData( CGImageGetDataProvider( img.CGImage ) ); - dataBytes = CFDataGetLength( data ); + dataBytes = (int)CFDataGetLength( data ); *bytes = 4; if ( dataBytes > imgBytes ) { *pic = NULL; diff --git a/wolf3d/code/iphone/EpisodeCell.xib b/wolf3d/code/iphone/EpisodeCell.xib index cedbbab..ad4957d 100644 --- a/wolf3d/code/iphone/EpisodeCell.xib +++ b/wolf3d/code/iphone/EpisodeCell.xib @@ -1,698 +1,67 @@ - - - 1056 - 10K540 - 851 - 1038.36 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 141 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 1298 - - YES - - - 1280 - - YES - - - -2147482332 - {{0, 2}, {328, 100}} - - 3 - NO - 2 - IBCocoaTouchFramework - - NSImage - highlight_bracket.png - - - - - 1316 - {{4, 6}, {319, 92}} - - NO - 2 - IBCocoaTouchFramework - - NSImage - episode_bracket.png - - - - - 1316 - {{13, 32}, {260, 3}} - - NO - 2 - IBCocoaTouchFramework - - NSImage - episode_divider.png - - - - - 1316 - {{12, 10}, {314, 34}} - - NO - YES - 7 - 1 - NO - 2 - IBCocoaTouchFramework - Episode Number - - POSITYPE-idSettler_v10.2 - 20 - 16 - - - 3 - MC42NjY2NjY2NjY3AA - - - 3 - MC4zMzMzMzMzMzMzAA - - 1 - 10 - - - - 1316 - {{12, 37}, {323, 41}} - - NO - YES - 9 - 2 - NO - 2 - IBCocoaTouchFramework - Episode Name - - POSITYPE-idSettler_v10.2 - 32 - 16 - - - 3 - MQA - - - 1 - NO - 10 - - - - 1316 - {{12, 64}, {323, 41}} - - NO - YES - 9 - 2 - NO - 2 - IBCocoaTouchFramework - - - - - 1 - NO - 10 - - - {336, 103} - - - 3 - MCAwAA - - NO - YES - 4 - YES - IBCocoaTouchFramework - - - {336, 103} - - - 1 - MSAxIDEAA - - 2 - IBCocoaTouchFramework - 1 - - 0 - MyIdentifier - - - - - YES - - - episodeCell - - - - 7 - - - - - YES - - 0 - - - - - - -1 - - - File's Owner - - - -2 - - - - - 2 - - - YES - - - - - - - - - - - 3 - - - - - 4 - - - - - 8 - - - - - 9 - - - - - 10 - - - - - 11 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 10.CustomClassName - 10.IBPluginDependency - 10.IBViewBoundsToFrameTransform - 11.IBPluginDependency - 11.IBViewBoundsToFrameTransform - 2.IBEditorWindowLastContentRect - 2.IBPluginDependency - 3.CustomClassName - 3.IBPluginDependency - 3.IBViewBoundsToFrameTransform - 4.CustomClassName - 4.IBPluginDependency - 4.IBViewBoundsToFrameTransform - 8.IBPluginDependency - 8.IBViewBoundsToFrameTransform - 9.IBPluginDependency - 9.IBViewBoundsToFrameTransform - - - YES - EpisodeViewController - UIResponder - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABBoAAAwtgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AQAAAABAAAAAA - - {{614, 707}, {672, 206}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCsAAAwjQAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUDgAABCHAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUJgAABCMAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AQAAAABAoAAAA - - - - - YES - - - YES - - - - - YES - - - YES - - - - 11 - - - - YES - - EpisodeViewController - UIViewController - - YES - - YES - back: - next: - setEpisode: - - - YES - id - id - id - - - - YES - - YES - back: - next: - setEpisode: - - - YES - - back: - id - - - next: - id - - - setEpisode: - id - - - - - YES - - YES - episodeCell - episodeList - - - YES - UITableViewCell - UITableView - - - - YES - - YES - episodeCell - episodeList - - - YES - - episodeCell - UITableViewCell - - - episodeList - UITableView - - - - - IBProjectSource - EpisodeViewController.h - - - - UIFontLabel - UILabel - - IBProjectSource - UIFontLabel.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIImageView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIImageView.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UIScrollView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIScrollView.h - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UITableView - UIScrollView - - IBFrameworkSource - UIKit.framework/Headers/UITableView.h - - - - UITableViewCell - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITableViewCell.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIPrintFormatter.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - wolf3d.xcodeproj - 3 - - YES - - YES - episode_bracket.png - episode_divider.png - highlight_bracket.png - - - YES - {606, 168} - {387, 3} - {623, 189} - - - 141 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/EpisodeView.xib b/wolf3d/code/iphone/EpisodeView.xib index a1b52fa..c612b4b 100644 --- a/wolf3d/code/iphone/EpisodeView.xib +++ b/wolf3d/code/iphone/EpisodeView.xib @@ -1,935 +1,189 @@ - - - 1056 - 10K549 - 851 - 1038.36 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 141 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - YES - - - 274 - {480, 320} - - NO - YES - 1 - YES - IBCocoaTouchFramework - - NSImage - wolf_bg.png - - - - - 274 - {{25, 259}, {32, 32}} - - 1 - NO - IBCocoaTouchFramework - - NSImage - back_arrow.png - - - - - 274 - {{422, 259}, {32, 32}} - - 1 - NO - IBCocoaTouchFramework - - NSImage - next_arrow.png - - - - - 274 - {{24, 240}, {66, 29}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - BACK - - POSITYPE-idSettler_v10.2 - 18 - 16 - - - 3 - MQA - - - 1 - 10 - 5 - - - - 274 - {{421, 240}, {66, 29}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - NEXT - - - - 1 - 10 - 5 - - - - 274 - {{81, 8}, {128, 31}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Episode Select - - POSITYPE-idSettler_v10.2 - 24 - 16 - - - - 1 - 10 - 5 - - - - 274 - {{20, 231}, {52, 62}} - - NO - NO - 1 - IBCocoaTouchFramework - 0 - 0 - - Helvetica-Bold - 15 - 16 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - NSImage - button_highlight.png - - - - - 274 - {{416, 231}, {50, 62}} - - NO - NO - 1 - IBCocoaTouchFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - 274 - {{220, 299}, {46, 24}} - - NO - NO - 1 - IBCocoaTouchFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - NSImage - down_arrow.png - - - - - 274 - {{220, 11}, {46, 24}} - - NO - NO - 1 - IBCocoaTouchFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - NSImage - up_arrow.png - - - - - 274 - {{79.5, 35}, {336, 260}} - - - 3 - MCAwAA - - YES - IBCocoaTouchFramework - YES - NO - 2 - 0 - YES - 103 - - - {480, 320} - - - 1 - MCAwIDAAA - - - 3 - - IBCocoaTouchFramework - - - - - YES - - - view - - - - 13 - - - - back: - - - 7 - - 36 - - - - episodeList - - - - 62 - - - - dataSource - - - - 63 - - - - delegate - - - - 64 - - - - next: - - - 7 - - 65 - - - - pageDown: - - - 7 - - 66 - - - - pageUp: - - - 7 - - 67 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - - - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 31 - - - - - 32 - - - - - 33 - - - - - 35 - - - - - 28 - - - - - 49 - - - - - 51 - - - - - 53 - - - - - 54 - - - - - 55 - - - - - 61 - - - Episode List - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 28.IBViewBoundsToFrameTransform - 31.CustomClassName - 31.IBPluginDependency - 31.IBViewBoundsToFrameTransform - 32.CustomClassName - 32.IBPluginDependency - 32.IBViewBoundsToFrameTransform - 33.IBPluginDependency - 33.IBViewBoundsToFrameTransform - 35.IBPluginDependency - 35.IBViewBoundsToFrameTransform - 49.IBPluginDependency - 49.IBViewBoundsToFrameTransform - 51.IBPluginDependency - 51.IBViewBoundsToFrameTransform - 53.IBPluginDependency - 53.IBViewBoundsToFrameTransform - 54.CustomClassName - 54.IBPluginDependency - 54.IBViewBoundsToFrameTransform - 55.IBPluginDependency - 55.IBViewBoundsToFrameTransform - 61.IBPluginDependency - - - YES - EpisodeViewController - UIResponder - {{647, 827}, {480, 320}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAAAAAAAAw58AAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUIEAABDbQAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUK4AABBUAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABBoAAAw2cAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCFAAAw5KAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUNcAABDlYAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDNgAAw5SAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUIUAABDg4AAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUIEAABDbQAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABD0oAAw2cAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 67 - - - - YES - - EpisodeViewController - UIViewController - - YES - - YES - back: - next: - pageDown: - pageUp: - setEpisode: - - - YES - id - id - id - id - id - - - - YES - - YES - back: - next: - pageDown: - pageUp: - setEpisode: - - - YES - - back: - id - - - next: - id - - - pageDown: - id - - - pageUp: - id - - - setEpisode: - id - - - - - YES - - YES - episodeCell - episodeList - - - YES - UITableViewCell - UITableView - - - - YES - - YES - episodeCell - episodeList - - - YES - - episodeCell - UITableViewCell - - - episodeList - UITableView - - - - - IBProjectSource - EpisodeViewController.h - - - - UIFontLabel - UILabel - - IBProjectSource - UIFontLabel.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIButton - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UIButton.h - - - - UIControl - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIControl.h - - - - UIImageView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIImageView.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UIScrollView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIScrollView.h - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UITableView - UIScrollView - - IBFrameworkSource - UIKit.framework/Headers/UITableView.h - - - - UITableViewCell - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITableViewCell.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIPrintFormatter.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - wolf3d.xcodeproj - 3 - - YES - - YES - back_arrow.png - button_highlight.png - down_arrow.png - next_arrow.png - up_arrow.png - wolf_bg.png - - - YES - {65, 63} - {4, 4} - {80, 36} - {65, 63} - {80, 36} - {480, 320} - - - 141 - - + + + + + + + + + + + + Helvetica-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/EpisodeViewController.m b/wolf3d/code/iphone/EpisodeViewController.m index 149ba66..7cd623c 100644 --- a/wolf3d/code/iphone/EpisodeViewController.m +++ b/wolf3d/code/iphone/EpisodeViewController.m @@ -23,6 +23,7 @@ #import "EpisodeViewController.h" #import "LevelSelectViewController.h" +#import "wolf3dAppDelegate.h" #import "wolfiphone.h" @@ -86,40 +87,24 @@ - (void)viewDidLoad { // TODO: Select the current episode. Haven't yet figured out a good way to get the table // view to load with a default row selected, so for now always select episode 1. +#if !TARGET_OS_TV int initialEpisode = 0; NSIndexPath *initialPath = [NSIndexPath indexPathForRow:initialEpisode inSection:0]; [self.episodeList selectRowAtIndexPath:initialPath animated:YES scrollPosition:UITableViewScrollPositionNone]; [self handleSelectionAtIndexPath:initialPath]; +#endif } - - -// Override to allow orientations other than the default portrait orientation. -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - // Return YES for supported orientations. - return UIInterfaceOrientationIsLandscape(interfaceOrientation); -} - - - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; - // Release any cached data, images, etc. that aren't in use. + [self.episodeList release]; + self.episodeList = nil; } -- (void)viewDidUnload { - [super viewDidUnload]; - // Release any retained subviews of the main view. - // e.g. self.myOutlet = nil; - - [self.episodeList release]; - self.episodeList = nil; -} - - - (void)dealloc { [super dealloc]; } @@ -143,7 +128,8 @@ - (IBAction)back:(id)sender { } - (IBAction)next:(id)sender { - LevelSelectViewController *lsc = [[LevelSelectViewController alloc] initWithNibName:@"LevelSelectView" bundle:nil]; + wolf3dAppDelegate* app = (wolf3dAppDelegate*)[[UIApplication sharedApplication] delegate]; + LevelSelectViewController *lsc = [[LevelSelectViewController alloc] initWithNibName:[app GetNibNameForDevice: @"LevelSelectView"] bundle:nil]; [self.navigationController pushViewController:lsc animated:YES]; [lsc release]; } @@ -159,7 +145,7 @@ - (IBAction)pageDown:(id)sender { int maxRow = 0; for ( NSIndexPath* path in visibleIndexPaths ) { - maxRow = maxRow < path.row ? path.row: maxRow; + maxRow = maxRow < path.row ? (int)path.row: maxRow; } const int rowToMakeVisible = maxRow + 1; @@ -180,7 +166,7 @@ - (IBAction)pageUp:(id)sender { int minRow = TOTAL_EPISODES - 1; for ( NSIndexPath* path in visibleIndexPaths ) { - minRow = minRow < path.row ? minRow: path.row; + minRow = minRow < path.row ? minRow: (int)path.row; } const int rowToMakeVisible = minRow - 1; @@ -281,7 +267,8 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N if (cell == nil) { //cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:MyIdentifier] autorelease]; - [[NSBundle mainBundle] loadNibNamed:@"EpisodeCell" owner:self options:nil]; + wolf3dAppDelegate* app = (wolf3dAppDelegate*)[[UIApplication sharedApplication] delegate]; + [[NSBundle mainBundle] loadNibNamed:[app GetNibNameForDevice:@"EpisodeCell"] owner:self options:nil]; if ( episodeCell == nil ) { // Couldn't create from nib file, load a default cell. @@ -312,9 +299,10 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N episodeNameLabel = (UILabel *)[cell viewWithTag:2]; NSString* episodeNameText = [NSString stringWithCString:EpisodeNames[indexPath.row][1] encoding:NSASCIIStringEncoding]; - CGSize expectedLabelSize = [episodeNameText sizeWithFont:episodeNameLabel.font - constrainedToSize:maximumNameLabelFrame.size - lineBreakMode:episodeNameLabel.lineBreakMode]; + CGSize expectedLabelSize = [episodeNameText boundingRectWithSize:maximumNameLabelFrame.size + options:NSStringDrawingUsesLineFragmentOrigin + attributes:@{NSFontAttributeName: episodeNameLabel.font} + context:nil].size; //adjust the label the the new height. CGRect newFrame = maximumNameLabelFrame; @@ -322,6 +310,10 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N episodeNameLabel.frame = newFrame; episodeNameLabel.text = episodeNameText; + + cell.backgroundColor = UIColor.clearColor; + + cell.contentView.backgroundColor = UIColor.blackColor; return cell; } @@ -335,19 +327,48 @@ - (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPat [self setCellSelected:NO atIndexPath:indexPath]; } +#if TARGET_OS_TV +- (void)didUpdateFocusInContext:(UIFocusUpdateContext *)context withAnimationCoordinator:(UIFocusAnimationCoordinator *)coordinator { + + [super didUpdateFocusInContext:context withAnimationCoordinator:coordinator]; + + if ([context.nextFocusedView isKindOfClass:[UITableViewCell class]]) { + [coordinator addCoordinatedAnimations:^{ + + [((UITableViewCell *)context.nextFocusedView).contentView setBackgroundColor:[UIColor blackColor]]; + [((UITableViewCell *)context.nextFocusedView) viewWithTag:3].hidden = false; + + + if ([context.previouslyFocusedView isKindOfClass:[UITableViewCell class]]) { + [((UITableViewCell *)context.previouslyFocusedView).contentView setBackgroundColor:[UIColor blackColor]]; + [((UITableViewCell *)context.previouslyFocusedView) viewWithTag:3].hidden = true; + } + + [context.nextFocusedView setBackgroundColor:[UIColor blackColor]]; + [context.previouslyFocusedView setBackgroundColor:[UIColor clearColor]]; + } completion:nil]; + } +} +#endif + - (void)setCellSelected:(BOOL)selected atIndexPath:(NSIndexPath*)indexPath { // Get the cell that was selected. +#if TARGET_OS_TV + [self next:self]; +#else UITableViewCell * cell = [episodeList cellForRowAtIndexPath:indexPath]; - [self setCellSelected:selected cell:cell]; +#endif } - (void)setCellSelected:(BOOL)selected cell:(UITableViewCell*)cell { - // Get the "selected" image - UIView * selectionFrame = [cell viewWithTag:3]; - - // Show the selected image +#if !TARGET_OS_TV + // Get the "selected" image + UIView * selectionFrame = [cell viewWithTag:3]; + + // Show the selected image selectionFrame.hidden = !selected; +#endif } diff --git a/wolf3d/code/iphone/FSCopyObject.c b/wolf3d/code/iphone/FSCopyObject.c deleted file mode 100644 index d4580be..0000000 --- a/wolf3d/code/iphone/FSCopyObject.c +++ /dev/null @@ -1,1986 +0,0 @@ -/* - File: FSCopyObject.c - - Contains: A Copy/Delete Files/Folders engine which uses HFS+ API's. - This code takes some tricks/techniques from MoreFilesX and - MPFileCopy, wraps them all up into an easy to use API, and - adds a bunch of features. It will run on Mac OS 9.1 through - 9.2.x and 10.1.x and up (Classic, Carbon and Mach-O) - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - Copyright © 2002-2004 Apple Computer, Inc., All Rights Reserved -*/ - -#include "FSCopyObject.h" -#include "GenLinkedList.h" -#if !TARGET_API_MAC_OSX -#include -#endif -#include -#include - -#pragma mark ----- Tunable Parameters ----- - -/* The following constants control the behavior of the copy engine. */ - -enum { /* BufferSizeForVolSpeed */ -/* kDefaultCopyBufferSize = 2L * 1024 * 1024,*/ /* 2MB, Fast but not very responsive. */ - kDefaultCopyBufferSize = 256L * 1024, /* 256kB, Slower but can still use machine. */ - kMaximumCopyBufferSize = 2L * 1024 * 1024, - kMinimumCopyBufferSize = 1024 -}; - -enum { /* CheckForDestInsideSrc */ - errFSDestInsideSource = -1234 -}; - -enum { - /* for use with PBHGetDirAccess in IsDropBox */ - kPrivilegesMask = kioACAccessUserWriteMask | kioACAccessUserReadMask | kioACAccessUserSearchMask, - - /* for use with FSGetCatalogInfo and FSPermissionInfo->mode */ - /* from sys/stat.h... note -- sys/stat.h definitions are in octal */ - /* */ - /* You can use these values to adjust the users/groups permissions */ - /* on a file/folder with FSSetCatalogInfo and extracting the */ - /* kFSCatInfoPermissions field. See code below for examples */ - kRWXUserAccessMask = 0x01C0, - kReadAccessUser = 0x0100, - kWriteAccessUser = 0x0080, - kExecuteAccessUser = 0x0040, - - kRWXGroupAccessMask = 0x0038, - kReadAccessGroup = 0x0020, - kWriteAccessGroup = 0x0010, - kExecuteAccessGroup = 0x0008, - - kRWXOtherAccessMask = 0x0007, - kReadAccessOther = 0x0004, - kWriteAccessOther = 0x0002, - kExecuteAccessOther = 0x0001, - - kDropFolderValue = kWriteAccessOther | kExecuteAccessOther -}; - -#define kNumObjects 80 - -#define VolHasCopyFile(volParms) (((volParms)->vMAttrib & (1L << bHasCopyFile)) != 0) - -#pragma mark ----- Struct Definitions ----- - - /* The CopyParams data structure holds the copy buffer used */ - /* when copying the forks over, as well as special case */ - /* info on the destination */ -struct CopyParams { - void *copyBuffer; - ByteCount copyBufferSize; - Boolean copyingToDropFolder; - Boolean copyingToLocalVolume; - Boolean volHasCopyFile; - DupeAction dupeAction; -}; -typedef struct CopyParams CopyParams; - - /* The FilterParams data structure holds the date and info */ - /* that the caller wants passed into the Filter Proc, as well */ - /* as the Filter Proc Pointer itself */ -struct FilterParams { - FSCatalogInfoBitmap whichInfo; - CopyObjectFilterProcPtr filterProcPtr; - Boolean containerChanged; - Boolean wantSpec; - Boolean wantName; - void *yourDataPtr; -}; -typedef struct FilterParams FilterParams; - - /* The ForkTracker data structure holds information about a specific fork, */ - /* specifically the name and the refnum. We use this to build a list of */ - /* all the forks before we start copying them. We need to do this because */ - /* if we're copying into a drop folder, we must open all the forks before */ - /* we start copying data into any of them. */ - /* Plus it's a convenient way to keep track of all the forks... */ -struct ForkTracker { - HFSUniStr255 forkName; - SInt64 forkSize; - SInt16 forkDestRefNum; -}; -typedef struct ForkTracker ForkTracker; -typedef ForkTracker *ForkTrackerPtr; - - /* The FolderListData data structure holds FSRefs to the source and */ - /* coorisponding destination folder, as well as which level its on */ - /* for use in ProcessFolderList. */ -struct FolderListData -{ - FSRef sourceDirRef; - FSRef destDirRef; - UInt32 level; -}; -typedef struct FolderListData FolderListData; - - /* The FSCopyFolderGlobals data structure holds the information needed to */ - /* copy a directory */ -struct FSCopyFolderGlobals -{ - FSRef *sourceDirRef; - FSRef *destDirRef; - - FSCatalogInfo *catInfoList; - FSRef *srcRefList; - HFSUniStr255 *nameList; - - GenLinkedList folderList; - GenIteratorPtr folderListIter; - - CopyParams *copyParams; - FilterParams *filterParams; - Boolean containerChanged; - - ItemCount maxLevels; - ItemCount currentLevel; -}; -typedef struct FSCopyFolderGlobals FSCopyFolderGlobals; - - /* The FSDeleteObjectGlobals data structure holds information needed to */ - /* recursively delete a directory */ -struct FSDeleteObjectGlobals -{ - FSCatalogInfo catalogInfo; /* FSCatalogInfo */ - ItemCount actualObjects; /* number of objects returned */ - OSErr result; /* result */ -}; -typedef struct FSDeleteObjectGlobals FSDeleteObjectGlobals; - -#pragma mark ----- Local Prototypes ----- - -static OSErr FSCopyObjectPreflight ( const FSRef *source, - const FSRef *destDir, - const DupeAction dupeAction, - FSCatalogInfo *sourceCatInfo, - CopyParams *copyParams, /* can be NULL */ - HFSUniStr255 *newObjectName, - FSRef *deleteMeRef, - Boolean *isReplacing, - Boolean *isDirectory ); - -static OSErr FSCopyFile ( const FSRef *source, - const FSRef *destDir, - const FSCatalogInfo *sourceCatInfo, - const HFSUniStr255 *newFileName, - CopyParams *copyParams, - FilterParams *filterParams, - FSRef *newFileRef, /* can be NULL */ - FSSpec *newFileSpec ); /* can be NULL */ - -static OSErr CopyFile ( const FSRef *source, - FSCatalogInfo *sourceCatInfo, - const FSRef *destDir, - const HFSUniStr255 *destName, /* can be NULL */ - CopyParams *copyParams, - FSRef *newRef, /* can be NULL */ - FSSpec *newSpec ); /* can be NULL */ - -static OSErr FSUsePBHCopyFile ( const FSRef *srcFileRef, - const FSRef *dstDirectoryRef, - const HFSUniStr255 *destName, /* can be NULL (no rename during copy) */ - TextEncoding textEncodingHint, - FSRef *newRef, /* can be NULL */ - FSSpec *newSpec ); /* can be NULL */ - -static OSErr DoCopyFile ( const FSRef *source, - FSCatalogInfo *sourceCatInfo, - const FSRef *destDir, - const HFSUniStr255 *destName, - CopyParams *params, - FSRef *newRef, /* can be NULL */ - FSSpec *newSpec ); /* can be NULL */ - -static OSErr FSCopyFolder ( const FSRef *source, - const FSRef *destDir, - const FSCatalogInfo *sourceCatInfo, - const HFSUniStr255 *newFoldName, - CopyParams *copyParams, - FilterParams *filterParams, - ItemCount maxLevels, - FSRef *outDirRef, /* can be NULL */ - FSSpec *outDirSpec ); /* can be NULL */ - -static OSErr ProcessFolderList ( FSCopyFolderGlobals *folderGlobals ); - -static OSErr CopyFolder ( FSCopyFolderGlobals *folderGlobals ); - -static OSErr CheckForDestInsideSrc ( const FSRef *source, - const FSRef *destDir ); - -static OSErr CopyForks ( const FSRef *source, - const FSRef *dest, - CopyParams *params ); - -static OSErr CopyForksToDisk ( const FSRef *source, - const FSRef *dest, - CopyParams *params ); - -static OSErr CopyForksToDropBox ( const FSRef *source, - const FSRef *dest, - CopyParams *params ); - -static OSErr OpenAllForks ( const FSRef *dest, - GenLinkedList *forkList ); - -static OSErr WriteFork ( const SInt16 srcRefNum, - const SInt16 destRefNum, - const CopyParams *params, - const SInt64 forkSize ); - -static UInt32 CalcBufferSizeForVol ( const GetVolParmsInfoBuffer *volParms, - UInt32 volParmsSize ); - -static UInt32 BufferSizeForVolSpeed ( UInt32 volumeBytesPerSecond ); - -static OSErr FSDeleteFolder ( const FSRef *container ); - -static void FSDeleteFolderLevel ( const FSRef *container, - FSDeleteObjectGlobals *theGlobals ); - -static OSErr IsDropBox ( const FSRef *source, - Boolean *isDropBox ); - -static OSErr GetMagicBusyCreateDate( UTCDateTime *date ); - -static OSErr FSGetVRefNum ( const FSRef *ref, - FSVolumeRefNum *vRefNum ); - -static OSErr FSGetVolParms ( FSVolumeRefNum volRefNum, - UInt32 bufferSize, - GetVolParmsInfoBuffer*volParmsInfo, - UInt32 *actualInfoSize ); /* Can Be NULL */ - -static OSErr UniStrToPStr ( const HFSUniStr255 *uniStr, - TextEncoding textEncodingHint, - Boolean isVolumeName, - Str255 pStr ); - -static OSErr FSMakeFSRef ( FSVolumeRefNum volRefNum, - SInt32 dirID, - ConstStr255Param name, - FSRef *ref ); - -static OSErr SetupDestination ( const FSRef *destDir, - const DupeAction dupeAction, - HFSUniStr255 *sourceName, - FSRef *deleteMeRef, - Boolean *isReplacing); - -static OSErr GetUniqueName ( const FSRef *destDir, - HFSUniStr255 *sourceName ); - -static OSErr GetObjectName ( const FSRef *sourceRef, - HFSUniStr255 *sourceName, - TextEncoding *sourceEncoding ); - -static OSErr CreateFolder ( const FSRef *sourceRef, - const FSRef *destDirRef, - const FSCatalogInfo *catalogInfo, - const HFSUniStr255 *folderName, - CopyParams *params, - FSRef *newFSRefPtr, - FSSpec *newFSSpecPtr ); - -static OSErr DoCreateFolder ( const FSRef *sourceRef, - const FSRef *destDirRef, - const FSCatalogInfo *catalogInfo, - const HFSUniStr255 *folderName, - CopyParams *params, - FSRef *newFSRefPtr, - FSSpec *newFSSpecPtr); - -static pascal void MyDisposeDataProc ( void *pData ); - -static pascal void MyCloseForkProc ( void *pData ); - -/*****************************************************************************/ -/*****************************************************************************/ -/*****************************************************************************/ - -#pragma mark ----- Copy Objects ----- - - /* This routine acts as the top level of the copy engine. */ -OSErr FSCopyObject( const FSRef *source, - const FSRef *destDir, - ItemCount maxLevels, - FSCatalogInfoBitmap whichInfo, - DupeAction dupeAction, - const HFSUniStr255 *newObjectName, /* can be NULL */ - Boolean wantFSSpec, - Boolean wantName, - CopyObjectFilterProcPtr filterProcPtr, /* can be NULL */ - void *yourDataPtr, /* can be NULL */ - FSRef *newObjectRef, /* can be NULL */ - FSSpec *newObjectSpec) /* can be NULL */ -{ - CopyParams copyParams; - FilterParams filterParams; - FSCatalogInfo sourceCatInfo; - HFSUniStr255 sourceName, - tmpObjectName; - FSRef tmpObjectRef, - deleteMeRef; - Boolean isDirectory, - isReplacing = false; - OSErr err = ( source != NULL && destDir != NULL ) ? noErr : paramErr; - - /* Zero out these two FSRefs in case an error occurs before or */ - /* inside FSCopyObjectPreflight. Paranoia mainly... */ - BlockZero( &deleteMeRef, sizeof( FSRef ) ); - BlockZero( &tmpObjectRef, sizeof( FSRef ) ); - - /* setup filterParams */ - filterParams.whichInfo = whichInfo; - filterParams.filterProcPtr = filterProcPtr; - filterParams.wantSpec = ( filterProcPtr && wantFSSpec ); /* only get this info if */ - filterParams.wantName = ( filterProcPtr && wantName ); /* a filterProc is provied */ - filterParams.yourDataPtr = yourDataPtr; - - /* Get and store away the name of the source object */ - /* and setup the initial name of the new object */ - if( err == noErr ) - err = GetObjectName( source, &sourceName, NULL ); - if( err == noErr ) - tmpObjectName = (newObjectName != NULL) ? *newObjectName : sourceName; - - if( err == noErr ) /* preflight/prep the destination and our internal variables */ - err = FSCopyObjectPreflight( source, destDir, dupeAction, &sourceCatInfo, ©Params, &tmpObjectName, &deleteMeRef, &isReplacing, &isDirectory ); - - /* now that we have some info, lets print it */ - if( err == noErr ) - { - dwarning(( "%s -- err: %d, maxLevels: %u, whichInfo: %08x,\n", __FUNCTION__, err, (unsigned int)maxLevels, (int)whichInfo )); - dwarning(( "\t\t\t\tdupeAction: %s, wantSpec: %s, wantName: %s,\n", ((dupeAction == kDupeActionReplace) ? "replace" : ((dupeAction == kDupeActionRename) ? "rename" : "standard")), (filterParams.wantSpec)?"yes":"no", (filterParams.wantName)?"yes":"no" )); - dwarning(( "\t\t\t\tfilterProcPtr: 0x%08x, yourDataPtr: 0x%08x,\n", (unsigned int)filterProcPtr, (unsigned int)yourDataPtr )); - dwarning(( "\t\t\t\tnewObjectRef: 0x%08x, newObjectSpec: 0x%08x,\n", (unsigned int)newObjectRef, (unsigned int)newObjectSpec )); - dwarning(( "\t\t\t\tcopyBufferSize: %dkB, isDirectory: %s, isLocal: %s,\n", (int)copyParams.copyBufferSize/1024, (isDirectory)?"yes":"no", (copyParams.copyingToLocalVolume)?"yes":"no" )); - dwarning(( "\t\t\t\tisDropBox: %s, PBHCopyFileSync supported: %s\n\n", (copyParams.copyingToDropFolder)?"yes":"no", (copyParams.volHasCopyFile)?"yes":"no" )); - } - - if( err == noErr ) /* now copy the file/folder... */ - { /* is it a folder? */ - if ( isDirectory ) - { /* yes */ - err = CheckForDestInsideSrc(source, destDir); - if( err == noErr ) - err = FSCopyFolder( source, destDir, &sourceCatInfo, &tmpObjectName, ©Params, &filterParams, maxLevels, &tmpObjectRef, newObjectSpec ); - } - else /* no */ - err = FSCopyFile(source, destDir, &sourceCatInfo, &tmpObjectName, ©Params, &filterParams, &tmpObjectRef, newObjectSpec); - } - - /* if an object existed in the destination with the same name as */ - /* the source and the caller wants to replace it, we had renamed it */ - /* to ".DeleteMe" earlier. If no errors, we delete it, else delete */ - /* the one we just created and rename the origenal back to its */ - /* origenal name. */ - /* */ - /* This is done mainly to cover the case of the source being in the */ - /* destination directory when kDupeActionReplace is selected */ - /* (3188701) */ - if( copyParams.dupeAction == kDupeActionReplace && isReplacing == true ) - { - dwarning(("%s -- Cleaning up, this might take a moment. err : %d\n", __FUNCTION__, err)); - - if( err == noErr ) - err = FSDeleteObjects( &deleteMeRef ); - else - { /* not much we can do if the delete or rename fails, we need to preserve */ - /* the origenal error code that got us here. */ - /* */ - /* If an error occurs before or inside SetupDestination, newFileRef and */ - /* deleteMeRef will be invalid so the delete and rename will simply fail */ - /* leaving the source and destination unchanged */ - myverify_noerr( FSDeleteObjects( &tmpObjectRef ) ); - myverify_noerr( FSRenameUnicode( &deleteMeRef, sourceName.length, sourceName.unicode, sourceCatInfo.textEncodingHint, NULL ) ); - } - } - - if( err == noErr && newObjectRef != NULL ) - *newObjectRef = tmpObjectRef; - - /* Clean up for space and safety... Who me? */ - if( copyParams.copyBuffer != NULL ) - DisposePtr((char*)copyParams.copyBuffer); - - mycheck_noerr( err ); - - return err; -} - -/*****************************************************************************/ - - /* Does a little preflighting (as the name suggests) to figure out the optimal */ - /* buffer size, if its a drop box, on a remote volume etc */ -static OSErr FSCopyObjectPreflight( const FSRef *source, - const FSRef *destDir, - const DupeAction dupeAction, - FSCatalogInfo *sourceCatInfo, - CopyParams *copyParams, - HFSUniStr255 *newObjectName, - FSRef *deleteMeRef, - Boolean *isReplacing, - Boolean *isDirectory) -{ - GetVolParmsInfoBuffer srcVolParms, - destVolParms; - UInt32 srcVolParmsSize = 0, - destVolParmsSize = 0; - FSVolumeRefNum srcVRefNum, - destVRefNum; - OSErr err = ( source != NULL && destDir != NULL && - sourceCatInfo != NULL && copyParams != NULL && - newObjectName != NULL && deleteMeRef != NULL && - isDirectory != NULL ) ? noErr : paramErr; - - BlockZero( copyParams, sizeof( CopyParams ) ); - - copyParams->dupeAction = dupeAction; - - if( err == noErr ) /* Get the info we will need later about the source object */ - err = FSGetCatalogInfo( source, kFSCatInfoSettableInfo, sourceCatInfo, NULL, NULL, NULL ); - if( err == noErr ) /* get the source's vRefNum */ - err = FSGetVRefNum( source, &srcVRefNum ); - if( err == noErr ) /* get the source's volParams */ - err = FSGetVolParms( srcVRefNum, sizeof(GetVolParmsInfoBuffer), &srcVolParms, &srcVolParmsSize ); - if( err == noErr ) /* get the destination's vRefNum */ - err = FSGetVRefNum( destDir, &destVRefNum ); - if( err == noErr ) - { - /* Calculate the optimal copy buffer size for the src vol */ - copyParams->copyBufferSize = CalcBufferSizeForVol( &srcVolParms, srcVolParmsSize ); - - /* if src and dest on different volumes, get its vol parms */ - /* and calculate its optimal buffer size */ - /* else destVolParms = srcVolParms */ - if( srcVRefNum != destVRefNum ) - { - err = FSGetVolParms( destVRefNum, sizeof(GetVolParmsInfoBuffer), &destVolParms, &destVolParmsSize ); - if( err == noErr ) - { - ByteCount tmpBufferSize = CalcBufferSizeForVol( &destVolParms, destVolParmsSize ); - if( tmpBufferSize < copyParams->copyBufferSize ) - copyParams->copyBufferSize = tmpBufferSize; - } - } - else - destVolParms = srcVolParms; - } - if( err == noErr ) - err = ((copyParams->copyBuffer = NewPtr( copyParams->copyBufferSize )) != NULL ) ? noErr : MemError(); - - /* figure out if source is a file or folder */ - /* if it is on a local volume, */ - /* if destination is a drop box */ - /* if source and dest are on same server */ - /* and if it supports PBHCopyFile */ - if( err == noErr ) /* is the destination a Drop Box */ - err = IsDropBox( destDir, ©Params->copyingToDropFolder ); - if( err == noErr ) - { - /* Is it a directory */ - *isDirectory = ((sourceCatInfo->nodeFlags & kFSNodeIsDirectoryMask) != 0); - /* destVolParms.vMServerAdr is non-zero for remote volumes */ - copyParams->copyingToLocalVolume = (destVolParms.vMServerAdr == 0); - if( !copyParams->copyingToLocalVolume ) - { - /* If the destination is on a remote volume, and source and dest are on */ - /* the same server, then it might support PBHCopyFileSync */ - /* If not, then PBHCopyFileSync won't work */ - - /* figure out if the volumes support PBHCopyFileSync */ - copyParams->volHasCopyFile = ( err == noErr && destVolParms.vMServerAdr == srcVolParms.vMServerAdr ) ? - VolHasCopyFile(&srcVolParms) : false; - } - } - - if( err == noErr ) - err = SetupDestination( destDir, copyParams->dupeAction, newObjectName, deleteMeRef, isReplacing ); - - return err; -} - -#pragma mark ----- Copy Files ----- - -/*****************************************************************************/ - -static OSErr FSCopyFile( const FSRef *source, - const FSRef *destDir, - const FSCatalogInfo *sourceCatInfo, - const HFSUniStr255 *newFileName, - CopyParams *copyParams, - FilterParams *filterParams, - FSRef *outFileRef, - FSSpec *outFileSpec ) -{ - FSCatalogInfo catInfo = *sourceCatInfo; - FSRef newFileRef; - FSSpec newFileSpec; - OSErr err = ( source != NULL && destDir != NULL && - copyParams != NULL && filterParams != NULL ) ? noErr : paramErr; - - /* If you would like a Pre-Copy filter (i.e to weed out objects */ - /* you don't want to copy) you should add it here */ - - if( err == noErr ) /* copy the file over */ - err = CopyFile( source, &catInfo, destDir, newFileName, copyParams, &newFileRef, (filterParams->wantSpec || outFileSpec) ? &newFileSpec : NULL ); - - /* Call the IterateFilterProc _after_ the new file was created even if an error occured. */ - /* Note: if an error occured above, the FSRef and other info might not be valid */ - if( filterParams->filterProcPtr != NULL ) - { - /* get the extra info the user wanted on the new file that we don't have */ - if( err == noErr && (filterParams->whichInfo & ~kFSCatInfoSettableInfo) != kFSCatInfoNone ) - err = FSGetCatalogInfo( &newFileRef, filterParams->whichInfo & ~kFSCatInfoSettableInfo, &catInfo, NULL, NULL, NULL ); - - err = CallCopyObjectFilterProc( filterParams->filterProcPtr, false, 0, err, &catInfo, &newFileRef, - (filterParams->wantSpec) ? &newFileSpec : NULL, - (filterParams->wantName) ? newFileName : NULL, - filterParams->yourDataPtr); - } - - if( err == noErr ) - { - if( outFileRef != NULL ) - *outFileRef = newFileRef; - if( outFileSpec != NULL ) - *outFileSpec = newFileSpec; - } - - mycheck_noerr(err); - - return err; -} - -/*****************************************************************************/ - -static OSErr CopyFile( const FSRef *source, - FSCatalogInfo *sourceCatInfo, - const FSRef *destDir, - const HFSUniStr255 *destName, /* can be NULL */ - CopyParams *params, - FSRef *newFile, /* can be NULL */ - FSSpec *newSpec ) /* can be NULL */ -{ - OSErr err = paramErr; - - /* Clear the "inited" bit so that the Finder positions the icon for us. */ - ((FInfo *)(sourceCatInfo->finderInfo))->fdFlags &= ~kHasBeenInited; - - /* if the volumes support PBHCopyFileSync, try to use it */ - if( params->volHasCopyFile == true ) - err = FSUsePBHCopyFile( source, destDir, destName, kTextEncodingUnknown, newFile, newSpec ); - - /* if PBHCopyFile didn't work or not supported, */ - if( err != noErr ) /* then try old school file transfer */ - err = DoCopyFile( source, sourceCatInfo, destDir, destName, params, newFile, newSpec ); - - mycheck_noerr(err); - - return err; -} - -/*****************************************************************************/ - - /* Wrapper function for PBHCopyFileSync */ -static OSErr FSUsePBHCopyFile( const FSRef *srcFileRef, - const FSRef *dstDirectoryRef, - const HFSUniStr255 *destName, /* can be NULL */ - TextEncoding textEncodingHint, - FSRef *newRef, /* can be NULL */ - FSSpec *newSpec) /* can be NULL */ -{ - FSSpec srcFileSpec; - FSCatalogInfo catalogInfo; - HParamBlockRec pb; - Str255 hfsName; - OSErr err = ( srcFileRef != NULL && dstDirectoryRef != NULL ) ? noErr : paramErr; - - if( err == noErr ) /* get FSSpec of source FSRef */ - err = FSGetCatalogInfo(srcFileRef, kFSCatInfoNone, NULL, NULL, &srcFileSpec, NULL); - if( err == noErr ) /* get the destination vRefNum and nodeID (nodeID is the dirID) */ - err = FSGetCatalogInfo(dstDirectoryRef, kFSCatInfoVolume | kFSCatInfoNodeID, &catalogInfo, NULL, NULL, NULL); - if( err == noErr ) /* gather all the info needed */ - { - pb.copyParam.ioVRefNum = srcFileSpec.vRefNum; - pb.copyParam.ioDirID = srcFileSpec.parID; - pb.copyParam.ioNamePtr = (StringPtr)srcFileSpec.name; - pb.copyParam.ioDstVRefNum = catalogInfo.volume; - pb.copyParam.ioNewDirID = (long)catalogInfo.nodeID; - pb.copyParam.ioNewName = NULL; - if( destName != NULL ) - err = UniStrToPStr( destName, textEncodingHint, false, hfsName ); - pb.copyParam.ioCopyName = ( destName != NULL && err == noErr ) ? hfsName : NULL; - } - if( err == noErr ) /* tell the server to copy the object */ - err = PBHCopyFileSync(&pb); - - if( err == noErr ) - { - if( newSpec != NULL ) /* caller wants an FSSpec, so make it */ - myverify_noerr(FSMakeFSSpec( pb.copyParam.ioDstVRefNum, pb.copyParam.ioNewDirID, pb.copyParam.ioCopyName, newSpec)); - if( newRef != NULL ) /* caller wants an FSRef, so make it */ - myverify_noerr(FSMakeFSRef( pb.copyParam.ioDstVRefNum, pb.copyParam.ioNewDirID, pb.copyParam.ioCopyName, newRef)); - } - - if( err != paramErr ) /* returning paramErr is ok, it means PBHCopyFileSync was not supported */ - mycheck_noerr(err); - - return err; -} - -/*****************************************************************************/ - - /* Copies a file referenced by source to the directory referenced by */ - /* destDir. destName is the name the file we are going to copy to the */ - /* destination. sourceCatInfo is the catalog info of the file, which */ - /* is passed in as an optimization (we could get it by doing a */ - /* FSGetCatalogInfo but the caller has already done that so we might as */ - /* well take advantage of that). */ - /* */ -static OSErr DoCopyFile(const FSRef *source, - FSCatalogInfo *sourceCatInfo, - const FSRef *destDir, - const HFSUniStr255 *destName, - CopyParams *params, - FSRef *newRef, - FSSpec *newSpec ) -{ - FSRef dest; - FSSpec tmpSpec; - FSPermissionInfo originalPermissions; - OSType originalFileType = 'xxxx'; - UInt16 originalNodeFlags = kFSCatInfoNone; - Boolean getSpec; - OSErr err = noErr; - - /* If we're copying to a drop folder, we won't be able to reset this */ - /* information once the copy is done, so we don't mess it up in */ - /* the first place. We still clear the locked bit though; items dropped */ - /* into a drop folder always become unlocked. */ - if (!params->copyingToDropFolder) - { - /* Remember to clear the file's type, so the Finder doesn't */ - /* look at the file until we're done. */ - originalFileType = ((FInfo *) &sourceCatInfo->finderInfo)->fdType; - ((FInfo *) &sourceCatInfo->finderInfo)->fdType = kFirstMagicBusyFiletype; - - /* Remember and clear the file's locked status, so that we can */ - /* actually write the forks we're about to create. */ - originalNodeFlags = sourceCatInfo->nodeFlags; - } - sourceCatInfo->nodeFlags &= ~kFSNodeLockedMask; - - /* figure out if we should get the FSSpec to the new file or not */ - /* If the caller asked for it, or if we need it for symlinks */ - getSpec = ( ( newSpec != NULL ) || ( !params->copyingToDropFolder && originalFileType == 'slnk' && ((FInfo *) &sourceCatInfo->finderInfo)->fdCreator == 'rhap' ) ); - - /* we need to have user level read/write/execute access to the file we are */ - /* going to create otherwise FSCreateFileUnicode will return */ - /* -5000 (afpAccessDenied), and the FSRef returned will be invalid, yet */ - /* the file is created (size 0k)... bug? */ - originalPermissions = *((FSPermissionInfo*)sourceCatInfo->permissions); - ((FSPermissionInfo*)sourceCatInfo->permissions)->mode |= kRWXUserAccessMask; - - /* Classic only supports 9.1 and higher, so we don't have to worry */ - /* about 2397324 */ - if( err == noErr ) - err = FSCreateFileUnicode(destDir, destName->length, destName->unicode, kFSCatInfoSettableInfo, sourceCatInfo, &dest, ( getSpec ) ? &tmpSpec : NULL ); - if( err == noErr ) /* Copy the forks over to the new file */ - err = CopyForks(source, &dest, params); - - /* Restore the original file type, creation and modification dates, */ - /* locked status and permissions. */ - /* This is one of the places where we need to handle drop */ - /* folders as a special case because this FSSetCatalogInfo will fail for */ - /* an item in a drop folder, so we don't even attempt it. */ - if (err == noErr && !params->copyingToDropFolder) - { - ((FInfo *) &sourceCatInfo->finderInfo)->fdType = originalFileType; - sourceCatInfo->nodeFlags = originalNodeFlags; - *((FSPermissionInfo*)sourceCatInfo->permissions) = originalPermissions; - - /* 2796751, FSSetCatalogInfo returns -36 when setting the Finder Info */ - /* for a symlink. To workaround this, when the file is a */ - /* symlink (slnk/rhap) we will finish the copy in two steps. First */ - /* setting everything but the Finder Info on the file, then calling */ - /* FSpSetFInfo to set the Finder Info for the file. I would rather use */ - /* an FSRef function to set the Finder Info, but FSSetCatalogInfo is */ - /* the only one... catch-22... */ - /* */ - /* The Carbon File Manager always sets the type/creator of a symlink to */ - /* slnk/rhap if the file is a symlink we do the two step, if it isn't */ - /* we use FSSetCatalogInfo to do all the work. */ - if ((originalFileType == 'slnk') && (((FInfo *) &sourceCatInfo->finderInfo)->fdCreator == 'rhap')) - { /* Its a symlink */ - /* set all the info, except the Finder info */ - err = FSSetCatalogInfo(&dest, kFSCatInfoNodeFlags | kFSCatInfoPermissions, sourceCatInfo); - if ( err == noErr ) /* set the Finder Info to that file */ - err = FSpSetFInfo( &tmpSpec, ((FInfo *) &sourceCatInfo->finderInfo) ); - } - else /* its a regular file */ - err = FSSetCatalogInfo(&dest, kFSCatInfoNodeFlags | kFSCatInfoFinderInfo | kFSCatInfoPermissions, sourceCatInfo); - } - - /* If we created the file and the copy failed, try to clean up by */ - /* deleting the file we created. We do this because, while it's */ - /* possible for the copy to fail halfway through and the File Manager */ - /* doesn't really clean up that well in that case, we *really* don't want */ - /* any half-created files being left around. */ - /* if the file already existed, we don't want to delete it */ - if( err == noErr || err == dupFNErr ) - { /* if everything was fine, then return the new file Spec/Ref */ - if( newRef != NULL ) - *newRef = dest; - if( newSpec != NULL ) - *newSpec = tmpSpec; - } - else - myverify_noerr( FSDeleteObjects(&dest) ); - - mycheck_noerr(err); - - return err; -} - -/*****************************************************************************/ - -#pragma mark ----- Copy Folders ----- - -static OSErr FSCopyFolder( const FSRef *source, - const FSRef *destDir, - const FSCatalogInfo *sourceCatInfo, - const HFSUniStr255 *newObjectName, - CopyParams *copyParams, - FilterParams *filterParams, - ItemCount maxLevels, - FSRef *outDirRef, - FSSpec *outDirSpec ) -{ - FSCopyFolderGlobals folderGlobals; - FolderListData *tmpListData = NULL; - FSCatalogInfo catInfo = *sourceCatInfo; - FSRef newDirRef; - FSSpec newDirSpec; - OSErr err; - - /* setup folder globals */ - folderGlobals.catInfoList = (FSCatalogInfo*) NewPtr( sizeof( FSCatalogInfo ) * kNumObjects ); - folderGlobals.srcRefList = (FSRef*) NewPtr( sizeof( FSRef ) * kNumObjects ); - folderGlobals.nameList = (HFSUniStr255*) NewPtr( sizeof( HFSUniStr255 ) * kNumObjects ); - folderGlobals.folderListIter = NULL; - folderGlobals.copyParams = copyParams; - folderGlobals.filterParams = filterParams; - folderGlobals.maxLevels = maxLevels; - folderGlobals.currentLevel = 0; - - /* if any of the NewPtr calls failed, we MUST bail */ - err = ( folderGlobals.catInfoList != NULL && - folderGlobals.srcRefList != NULL && - folderGlobals.nameList != NULL ) ? noErr : memFullErr; - - /* init the linked list we will use to keep track of the folders */ - InitLinkedList( &folderGlobals.folderList, MyDisposeDataProc ); - - if( err == noErr && !copyParams->copyingToDropFolder ) - err = GetMagicBusyCreateDate( &catInfo.createDate ); - if( err == noErr ) /* create the directory */ - err = DoCreateFolder( source, destDir, &catInfo, newObjectName, folderGlobals.copyParams, &newDirRef, (filterParams->wantSpec || outDirSpec ) ? &newDirSpec : NULL ); - - /* Note: if an error occured above, the FSRef and other info might not be valid */ - if( filterParams->filterProcPtr != NULL ) - { - /* get the info the user wanted about the source directory we don't have */ - if( err == noErr && (filterParams->whichInfo & ~kFSCatInfoSettableInfo) != kFSCatInfoNone ) - err = FSGetCatalogInfo(&newDirRef, filterParams->whichInfo & ~kFSCatInfoSettableInfo, &catInfo, NULL, NULL, NULL); - - err = CallCopyObjectFilterProc(filterParams->filterProcPtr, false, folderGlobals.currentLevel, - err, &catInfo, &newDirRef, - ( filterParams->wantSpec ) ? &newDirSpec : NULL, - ( filterParams->wantName ) ? newObjectName : NULL, - filterParams->yourDataPtr); - } - if( err == noErr ) /* create the memory for this folder */ - err = ( ( tmpListData = (FolderListData*) NewPtr( sizeof( FolderListData ) ) ) != NULL ) ? noErr : MemError(); - if( err == noErr ) - { /* setup the folder info */ - tmpListData->sourceDirRef = *source; - tmpListData->destDirRef = newDirRef; - tmpListData->level = folderGlobals.currentLevel; - /* add this folder to the list to give ProcessFolderList something to chew on */ - err = AddToTail( &folderGlobals.folderList, tmpListData ); - if( err == noErr ) /* tmpListData added successfully */ - err = ProcessFolderList( &folderGlobals ); - else /* error occured, so dispose of memory */ - DisposePtr( (char*) tmpListData ); - } - - dwarning(("\n%s -- %u folders were found\n", __FUNCTION__, (unsigned int)GetNumberOfItems( &folderGlobals.folderList ) )); - - /* when we're done destroy the list and free up any memory we allocated */ - DestroyList( &folderGlobals.folderList ); - - /* now that the copy is complete, we can set things back to normal */ - /* for the directory we just created. */ - /* We have to do this only for the top directory of the copy */ - /* all subdirectories were created all at once */ - if( err == noErr && !folderGlobals.copyParams->copyingToDropFolder ) - err = FSSetCatalogInfo( &newDirRef, kFSCatInfoCreateDate | kFSCatInfoPermissions, sourceCatInfo ); - - /* Copy went as planned, and caller wants an FSRef/FSSpec to the new directory */ - if( err == noErr ) - { - if( outDirRef != NULL) - *outDirRef = newDirRef; - if( outDirSpec != NULL ) - *outDirSpec = newDirSpec; - } - - /* clean up for space and safety, who me? */ - if( folderGlobals.catInfoList ) - DisposePtr( (char*) folderGlobals.catInfoList ); - if( folderGlobals.srcRefList ) - DisposePtr( (char*) folderGlobals.srcRefList ); - if( folderGlobals.nameList ) - DisposePtr( (char*) folderGlobals.nameList ); - - mycheck_noerr(err); - - return ( err ); -} - -/*****************************************************************************/ - - /* We now store a list of all the folders/subfolders we encounter in the source */ - /* Each node in the list contains an FSRef to the source, an FSRef to the */ - /* mirror folder in the destination, and the level in the source that folder */ - /* is on. This is done so that we can use FSGetCatalogInfoBulk to its full */ - /* potential (getting items in bulk). We copy the source one folder at a time. */ - /* Copying over the contents of each folder before we continue on to the next */ - /* folder in the list. This allows us to use the File Manager's own caching */ - /* system to our advantage. */ -static OSErr ProcessFolderList( FSCopyFolderGlobals *folderGlobals ) -{ - FolderListData *folderListData; - OSErr err = noErr; - - /* iterate through the list of folders and copy over each one individually */ - for( InitIterator( &folderGlobals->folderList, &folderGlobals->folderListIter ); folderGlobals->folderListIter != NULL && err == noErr; Next( &folderGlobals->folderListIter ) ) - { - /* Get the data for this folder */ - folderListData = (FolderListData*) GetData( folderGlobals->folderListIter ); - if( folderListData != NULL ) - { - #if DEBUG && !TARGET_API_MAC_OS8 - { - char path[1024]; - myverify_noerr(FSRefMakePath( &(folderListData->sourceDirRef), (unsigned char*)path, 1024 )); - dwarning(("\n\n%s -- Copying contents of\n\t%s\n", __FUNCTION__, path)); - myverify_noerr(FSRefMakePath( &(folderListData->destDirRef), (unsigned char*)path, 1024 )); - dwarning(("\t\tto\n\t%s\n", path)); - } - #endif - - /* stuff the data into our globals */ - folderGlobals->sourceDirRef = &(folderListData->sourceDirRef); - folderGlobals->destDirRef = &(folderListData->destDirRef); - folderGlobals->currentLevel = folderListData->level; - - /* Copy over this folder and add any subfolders to our list of folders */ - /* so they will get processed later */ - err = CopyFolder( folderGlobals ); - } - } - - return err; -} - -/*****************************************************************************/ - - /* Copy the contents of the source into the destination. If any subfolders */ - /* are found, add them to a local list of folders during the loop stage */ - /* Once the copy is done, insert the local list into the global list right */ - /* after the current position in the list. This is done so we don't jump */ - /* all over the disk getting the different folders to copy */ -static OSErr CopyFolder( FSCopyFolderGlobals *folderGlobals ) -{ - GenLinkedList tmpList; - FolderListData *tmpListData = NULL; - FilterParams *filterPtr = folderGlobals->filterParams; - FSIterator iterator; - FSRef newRef; - FSSpec newSpec; - UInt32 actualObjects; - OSErr err, - junkErr; - int i; - - /* Init the local list */ - InitLinkedList( &tmpList, MyDisposeDataProc); - - err = FSOpenIterator( folderGlobals->sourceDirRef, kFSIterateFlat, &iterator ); - if( err == noErr ) - { - do - { - /* grab a bunch of objects (kNumObjects) from this folder and copy them over */ - err = FSGetCatalogInfoBulk( iterator, kNumObjects, &actualObjects, &filterPtr->containerChanged, - kFSCatInfoSettableInfo, folderGlobals->catInfoList, folderGlobals->srcRefList, - NULL, folderGlobals->nameList ); - if( ( err == noErr || err == errFSNoMoreItems ) && - ( actualObjects != 0 ) ) - { - dwarning(("%s -- actualObjects retrieved from FSGetCatalogInfoBulk: %u\n",__FUNCTION__, (unsigned int)actualObjects )); - - /* iterate over the objects actually returned */ - for( i = 0; i < actualObjects; i++ ) - { - /* Any errors in here will be passed to the filter proc */ - /* we don't want an error in here to prematurely cancel the copy */ - - /* If you would like a Pre-Copy filter (i.e to weed out objects */ - /* you don't want to copy) you should add it here */ - - /* Is the new object a directory? */ - if( ( folderGlobals->catInfoList[i].nodeFlags & kFSNodeIsDirectoryMask ) != 0 ) - { /* yes */ - junkErr = CreateFolder( &folderGlobals->srcRefList[i], folderGlobals->destDirRef, - &folderGlobals->catInfoList[i], &folderGlobals->nameList[i], - folderGlobals->copyParams, &newRef, (filterPtr->wantSpec) ? &newSpec : NULL ); - /* If maxLevels is zero, we aren't checking levels */ - /* If currentLevel+1 < maxLevels, add this folder to the list */ - if( folderGlobals->maxLevels == 0 || (folderGlobals->currentLevel + 1) < folderGlobals->maxLevels ) - { - if( junkErr == noErr ) /* Create memory for folder list data */ - junkErr = ( ( tmpListData = (FolderListData*) NewPtr( sizeof( FolderListData ) ) ) != NULL ) ? noErr : MemError(); - if( junkErr == noErr ) - { /* Setup the folder list data */ - tmpListData->sourceDirRef = folderGlobals->srcRefList[i]; - tmpListData->destDirRef = newRef; - tmpListData->level = folderGlobals->currentLevel + 1; - - /* Add it to the local list */ - junkErr = AddToTail( &tmpList, tmpListData ); - } - /* If an error occured and memory was created, we need to dispose of it */ - /* since it was not added to the list */ - if( junkErr != noErr && tmpListData != NULL ) - DisposePtr( (char*) tmpListData ); - } - } - else - { /* no */ - junkErr = CopyFile( &folderGlobals->srcRefList[i], &folderGlobals->catInfoList[i], - folderGlobals->destDirRef, &folderGlobals->nameList[i], - folderGlobals->copyParams, &newRef, ( filterPtr->wantSpec ) ? &newSpec : NULL ); - } - - /* Note: if an error occured above, the FSRef and other info might not be valid */ - if( filterPtr->filterProcPtr != NULL ) - { - if( junkErr == noErr && (filterPtr->whichInfo & ~kFSCatInfoSettableInfo) != kFSCatInfoNone ) /* get the extra info about the new object that the user wanted that we don't already have */ - junkErr = FSGetCatalogInfo( &newRef, filterPtr->whichInfo & ~kFSCatInfoSettableInfo, &folderGlobals->catInfoList[i], NULL, NULL, NULL ); - - err = CallCopyObjectFilterProc( filterPtr->filterProcPtr, filterPtr->containerChanged, - folderGlobals->currentLevel, junkErr, - &folderGlobals->catInfoList[i], &newRef, - ( filterPtr->wantSpec ) ? &newSpec : NULL, - ( filterPtr->wantName ) ? &folderGlobals->nameList[i] : NULL, - filterPtr->yourDataPtr); - } - } - } - }while( err == noErr ); - - /* errFSNoMoreItems is OK - it only means we hit the end of this level */ - /* afpAccessDenied is OK too - it only means we cannot see inside the directory */ - if( err == errFSNoMoreItems || err == afpAccessDenied ) - err = noErr; - - /* Insert the local list of folders from the current folder into our global list. Even */ - /* if no items were added to the local list (due to error, or empty folder), InsertList */ - /* handles it correctly. We add the local list even if an error occurred. It will get */ - /* disposed of when the global list is destroyed. Doesn't hurt to have a couple extra */ - /* steps when we're going to bail anyways. */ - InsertList( &folderGlobals->folderList, &tmpList, folderGlobals->folderListIter ); - - /* Close the FSIterator (closing an open iterator should never fail) */ - (void) FSCloseIterator(iterator); - } - - mycheck_noerr( err ); - - return err; -} - -/*****************************************************************************/ - - /* Determines whether the destination directory is equal to the source */ - /* item, or whether it's nested inside the source item. Returns a */ - /* errFSDestInsideSource if that's the case. We do this to prevent */ - /* endless recursion while copying. */ - /* */ -static OSErr CheckForDestInsideSrc( const FSRef *source, - const FSRef *destDir) -{ - FSRef thisDir = *destDir; - FSCatalogInfo thisDirInfo; - Boolean done = false; - OSErr err; - - do - { - err = FSCompareFSRefs(source, &thisDir); - if (err == noErr) - err = errFSDestInsideSource; - else if (err == diffVolErr) - { - err = noErr; - done = true; - } - else if (err == errFSRefsDifferent) - { - /* This is somewhat tricky. We can ask for the parent of thisDir */ - /* by setting the parentRef parameter to FSGetCatalogInfo but, if */ - /* thisDir is the volume's FSRef, this will give us back junk. */ - /* So we also ask for the parent's dir ID to be returned in the */ - /* FSCatalogInfo record, and then check that against the node */ - /* ID of the root's parent (ie 1). If we match that, we've made */ - /* it to the top of the hierarchy without hitting source, so */ - /* we leave with no error. */ - - err = FSGetCatalogInfo(&thisDir, kFSCatInfoParentDirID, &thisDirInfo, NULL, NULL, &thisDir); - if( ( err == noErr ) && ( thisDirInfo.parentDirID == fsRtParID ) ) - done = true; - } - } while ( err == noErr && ! done ); - - mycheck_noerr( err ); - - return err; -} - -/*****************************************************************************/ - -#pragma mark ----- Copy Forks ----- - - /* This is where the majority of the work is done. I special cased */ - /* DropBoxes in order to use FSIterateForks to its full potential for */ - /* the more common case (read/write permissions). It also simplifies */ - /* the code to have it seperate. */ -static OSErr CopyForks( const FSRef *source, - const FSRef *dest, - CopyParams *params) -{ - OSErr err; - - err = ( !params->copyingToDropFolder ) ? CopyForksToDisk ( source, dest, params ) : - CopyForksToDropBox ( source, dest, params ); - - mycheck_noerr( err ); - - return err; -} - - /* Open each fork individually and copy them over to the destination */ -static OSErr CopyForksToDisk( const FSRef *source, - const FSRef *dest, - CopyParams *params ) -{ - HFSUniStr255 forkName; - CatPositionRec iterator; - SInt64 forkSize; - SInt16 srcRefNum, - destRefNum; - OSErr err; - - /* need to initialize the iterator before using it */ - iterator.initialize = 0; - - do - { - err = FSIterateForks( source, &iterator, &forkName, &forkSize, NULL ); - - /* Create the fork. Note: Data and Resource forks are automatically */ - /* created when the file is created. FSCreateFork returns noErr for them */ - /* We also want to create the fork even if there is no data to preserve */ - /* empty forks */ - if( err == noErr ) - err = FSCreateFork( dest, forkName.length, forkName.unicode ); - - /* Mac OS 9.0 has a bug (in the AppleShare external file system, */ - /* I think) [2410374] that causes FSCreateFork to return an errFSForkExists */ - /* error even though the fork is empty. The following code swallows */ - /* the error (which is harmless) in that case. */ - if( err == errFSForkExists && !params->copyingToLocalVolume ) - err = noErr; - - /* The remainder of this code only applies if there is actual data */ - /* in the source fork. */ - - if( err == noErr && forkSize > 0 ) - { - destRefNum = srcRefNum = 0; - - /* Open the destination fork */ - err = FSOpenFork(dest, forkName.length, forkName.unicode, fsWrPerm, &destRefNum); - if( err == noErr ) /* Open the source fork */ - err = FSOpenFork(source, forkName.length, forkName.unicode, fsRdPerm, &srcRefNum); - if( err == noErr ) /* Write the fork to disk */ - err = WriteFork( srcRefNum, destRefNum, params, forkSize ); - - if( destRefNum != 0 ) /* Close the destination fork */ - myverify_noerr( FSCloseFork( destRefNum ) ); - if( srcRefNum != 0 ) /* Close the source fork */ - myverify_noerr( FSCloseFork( srcRefNum ) ); - } - } - while( err == noErr ); - - if( err == errFSNoMoreItems ) - err = noErr; - - mycheck_noerr( err ); - - return err; -} - - /* If we're copying to a DropBox, we have to handle the copy process a little */ - /* differently then when we are copying to a regular folder. */ -static OSErr CopyForksToDropBox( const FSRef *source, - const FSRef *dest, - CopyParams *params ) -{ - GenLinkedList forkList; - GenIteratorPtr pIter; - ForkTrackerPtr forkPtr; - SInt16 srcRefNum; - OSErr err; - - InitLinkedList( &forkList, MyCloseForkProc ); - - /* If we're copying into a drop folder, open up all of those forks. */ - /* We have to do this because once we've started writing to a fork */ - /* in a drop folder, we can't open any more forks. */ - err = OpenAllForks( dest, &forkList ); - - /* Copy each fork over to the destination */ - for( InitIterator( &forkList, &pIter ); pIter != NULL && err == noErr; Next( &pIter ) ) - { - srcRefNum = 0; - forkPtr = GetData( pIter ); - /* Open the source fork */ - err = FSOpenFork(source, forkPtr->forkName.length, forkPtr->forkName.unicode, fsRdPerm, &srcRefNum); - if( err == noErr ) /* Write the data over */ - err = WriteFork( srcRefNum, forkPtr->forkDestRefNum, params, forkPtr->forkSize ); - - if( srcRefNum != 0 ) /* Close the source fork */ - myverify_noerr( FSCloseFork( srcRefNum ) ); - } - /* we're done, so destroy the list even if an error occured */ - /* the DisposeDataProc will close any open forks */ - DestroyList( &forkList ); - - mycheck_noerr( err ); - - return err; -} - -/*****************************************************************************/ - - /* Create and open all the forks in the destination file. We need to do this when */ - /* we're copying into a drop folder, where you must open all the forks before starting */ - /* to write to any of them. */ - /* */ - /* IMPORTANT: If it fails, this routine won't close forks that opened successfully. */ - /* Make sure that the DisposeDataProc for the forkList closed any open forks */ - /* Or you close each one manually before destroying the list */ -static OSErr OpenAllForks( const FSRef *dest, - GenLinkedList *forkList ) -{ - ForkTrackerPtr forkPtr; - HFSUniStr255 forkName; - CatPositionRec iterator; - SInt64 forkSize; - OSErr err = ( dest != NULL && forkList != NULL ) ? noErr : paramErr; - - /* need to initialize the iterator before using it */ - iterator.initialize = 0; - - /* Iterate over the list of forks */ - while( err == noErr ) - { - forkPtr = NULL; /* init forkPtr */ - - err = FSIterateForks( dest, &iterator, &forkName, &forkSize, NULL ); - if( err == noErr ) - err = ( forkPtr = (ForkTrackerPtr) NewPtr( sizeof( ForkTracker ) ) ) != NULL ? noErr : MemError(); - if( err == noErr ) - { - forkPtr->forkName = forkName; - forkPtr->forkSize = forkSize; - forkPtr->forkDestRefNum = 0; - - /* Create the fork. Note: Data and Resource forks are automatically */ - /* created when the file is created. FSCreateFork returns noErr for them */ - /* We also want to create the fork even if there is no data to preserve */ - /* empty forks */ - err = FSCreateFork( dest, forkName.length, forkName.unicode ); - - /* Swallow afpAccessDenied because this operation causes the external file */ - /* system compatibility shim in Mac OS 9 to generate a GetCatInfo request */ - /* to the AppleShare external file system, which in turn causes an AFP */ - /* GetFileDirParms request on the wire, which the AFP server bounces with */ - /* afpAccessDenied because the file is in a drop folder. As there's no */ - /* native support for non-classic forks in current AFP, there's no way I */ - /* can decide how I should handle this in a non-test case. So I just */ - /* swallow the error and hope that when native AFP support arrives, the */ - /* right thing will happen. */ - if( err == afpAccessDenied ) - err = noErr; - - /* only open the fork if the fork has some data */ - if( err == noErr && forkPtr->forkSize > 0 ) - err = FSOpenFork( dest, forkPtr->forkName.length, forkPtr->forkName.unicode, fsWrPerm, &forkPtr->forkDestRefNum ); - - /* if everything is ok, add this fork to the list */ - if( err == noErr ) - err = AddToTail( forkList, forkPtr ); - } - - if( err != noErr && forkPtr != NULL ) - DisposePtr( (char*) forkPtr ); - } - - if( err == errFSNoMoreItems ) - err = noErr; - - mycheck_noerr( err ); - - return err; -} - -/*****************************************************************************/ - - /* Writes the fork from the source, references by srcRefNum, to the destination fork */ - /* references by destRefNum */ -static OSErr WriteFork( const SInt16 srcRefNum, - const SInt16 destRefNum, - const CopyParams *params, - const SInt64 forkSize ) -{ - UInt64 bytesRemaining; - UInt64 bytesToReadThisTime; - UInt64 bytesToWriteThisTime; - OSErr err; - - - /* Here we create space for the entire fork on the destination volume. */ - /* FSAllocateFork has the right semantics on both traditional Mac OS */ - /* and Mac OS X. On traditional Mac OS it will allocate space for the */ - /* file in one hit without any other special action. On Mac OS X, */ - /* FSAllocateFork is preferable to FSSetForkSize because it prevents */ - /* the system from zero filling the bytes that were added to the end */ - /* of the fork (which would be waste because we're about to write over */ - /* those bytes anyway. */ - err = FSAllocateFork(destRefNum, kFSAllocNoRoundUpMask, fsFromStart, 0, forkSize, NULL); - - /* Copy the file from the source to the destination in chunks of */ - /* no more than params->copyBufferSize bytes. This is fairly */ - /* boring code except for the bytesToReadThisTime/bytesToWriteThisTime */ - /* distinction. On the last chunk, we round bytesToWriteThisTime */ - /* up to the next 512 byte boundary and then, after we exit the loop, */ - /* we set the file's EOF back to the real location (if the fork size */ - /* is not a multiple of 512 bytes). */ - /* */ - /* This technique works around a 'bug' in the traditional Mac OS File Manager, */ - /* where the File Manager will put the last 512-byte block of a large write into */ - /* the cache (even if we specifically request no caching) if that block is not */ - /* full. If the block goes into the cache it will eventually have to be */ - /* flushed, which causes sub-optimal disk performance. */ - /* */ - /* This is only done if the destination volume is local. For a network */ - /* volume, it's better to just write the last bytes directly. */ - /* */ - /* This is extreme over-optimization given the other limits of this */ - /* sample, but I will hopefully get to the other limits eventually. */ - bytesRemaining = forkSize; - while( err == noErr && bytesRemaining != 0 ) - { - if( bytesRemaining > params->copyBufferSize ) - { - bytesToReadThisTime = params->copyBufferSize; - bytesToWriteThisTime = bytesToReadThisTime; - } - else - { - bytesToReadThisTime = bytesRemaining; - bytesToWriteThisTime = ( params->copyingToLocalVolume ) ? - ( (bytesRemaining + 0x01FF ) & ~0x01FF ) : bytesRemaining; - } - - err = FSReadFork( srcRefNum, fsAtMark + noCacheMask, 0, bytesToReadThisTime, params->copyBuffer, NULL ); - if( err == noErr ) - err = FSWriteFork( destRefNum, fsAtMark + noCacheMask, 0, bytesToWriteThisTime, params->copyBuffer, NULL ); - if( err == noErr ) - bytesRemaining -= bytesToReadThisTime; - } - - if (err == noErr && params->copyingToLocalVolume && ( forkSize & 0x01FF ) != 0 ) - err = FSSetForkSize( destRefNum, fsFromStart, forkSize ); - - return err; -} - -/*****************************************************************************/ - -#pragma mark ----- Calculate Buffer Size ----- - - /* This routine calculates the appropriate buffer size for */ - /* the given volParms. It's a simple composition of FSGetVolParms */ - /* BufferSizeForVolSpeed. */ -static UInt32 CalcBufferSizeForVol(const GetVolParmsInfoBuffer *volParms, UInt32 volParmsSize) -{ - UInt32 volumeBytesPerSecond = 0; - - /* Version 1 of the GetVolParmsInfoBuffer included the vMAttrib */ - /* field, so we don't really need to test actualSize. A noErr */ - /* result indicates that we have the info we need. This is */ - /* just a paranoia check. */ - - mycheck(volParmsSize >= offsetof(GetVolParmsInfoBuffer, vMVolumeGrade)); - - /* On the other hand, vMVolumeGrade was not introduced until */ - /* version 2 of the GetVolParmsInfoBuffer, so we have to explicitly */ - /* test whether we got a useful value. */ - - if( ( volParmsSize >= offsetof(GetVolParmsInfoBuffer, vMForeignPrivID) ) && - ( volParms->vMVolumeGrade <= 0 ) ) - { - volumeBytesPerSecond = -volParms->vMVolumeGrade; - } - - return BufferSizeForVolSpeed(volumeBytesPerSecond); -} - -/*****************************************************************************/ - - /* Calculate an appropriate copy buffer size based on the volumes */ - /* rated speed. Our target is to use a buffer that takes 0.25 */ - /* seconds to fill. This is necessary because the volume might be */ - /* mounted over a very slow link (like ARA), and if we do a 256 KB */ - /* read over an ARA link we'll block the File Manager queue for */ - /* so long that other clients (who might have innocently just */ - /* called PBGetCatInfoSync) will block for a noticeable amount of time. */ - /* */ - /* Note that volumeBytesPerSecond might be 0, in which case we assume */ - /* some default value. */ -static UInt32 BufferSizeForVolSpeed(UInt32 volumeBytesPerSecond) -{ - ByteCount bufferSize; - - if (volumeBytesPerSecond == 0) - bufferSize = kDefaultCopyBufferSize; - else - { /* We want to issue a single read that takes 0.25 of a second, */ - /* so devide the bytes per second by 4. */ - bufferSize = volumeBytesPerSecond / 4; - } - - /* Round bufferSize down to 512 byte boundary. */ - bufferSize &= ~0x01FF; - - /* Clip to sensible limits. */ - if (bufferSize < kMinimumCopyBufferSize) - bufferSize = kMinimumCopyBufferSize; - else if (bufferSize > kMaximumCopyBufferSize) - bufferSize = kMaximumCopyBufferSize; - - return bufferSize; -} - -/*****************************************************************************/ - -#pragma mark ----- Delete Objects ----- - -OSErr FSDeleteObjects( const FSRef *source ) -{ - FSCatalogInfo catalogInfo; - OSErr err = ( source != NULL ) ? noErr : paramErr; - - #if DEBUG && !TARGET_API_MAC_OS8 - if( err == noErr ) - { - char path[1024]; - myverify_noerr(FSRefMakePath( source, (unsigned char*)path, 1024 )); - dwarning(("\n%s -- Deleting %s\n", __FUNCTION__, path)); - } - #endif - - /* get nodeFlags for container */ - if( err == noErr ) - err = FSGetCatalogInfo(source, kFSCatInfoNodeFlags, &catalogInfo, NULL, NULL,NULL); - if( err == noErr && (catalogInfo.nodeFlags & kFSNodeIsDirectoryMask) != 0 ) - { /* its a directory, so delete its contents before we delete it */ - err = FSDeleteFolder(source); - } - if( err == noErr && (catalogInfo.nodeFlags & kFSNodeLockedMask) != 0 ) /* is object locked? */ - { /* then attempt to unlock the object (ignore err since FSDeleteObject will set it correctly) */ - catalogInfo.nodeFlags &= ~kFSNodeLockedMask; - (void) FSSetCatalogInfo(source, kFSCatInfoNodeFlags, &catalogInfo); - } - if( err == noErr ) /* delete the object (if it was a directory it is now empty, so we can delete it) */ - err = FSDeleteObject(source); - - mycheck_noerr( err ); - - return ( err ); -} - -/*****************************************************************************/ - -#pragma mark ----- Delete Folders ----- - -static OSErr FSDeleteFolder( const FSRef *container ) -{ - FSDeleteObjectGlobals theGlobals; - - theGlobals.result = ( container != NULL ) ? noErr : paramErr; - - /* delete container's contents */ - if( theGlobals.result == noErr ) - FSDeleteFolderLevel(container, &theGlobals); - - mycheck_noerr( theGlobals.result ); - - return ( theGlobals.result ); -} - -/*****************************************************************************/ - -static void FSDeleteFolderLevel(const FSRef *container, - FSDeleteObjectGlobals *theGlobals ) -{ - FSIterator iterator; - FSRef itemToDelete; - UInt16 nodeFlags; - - /* Open FSIterator for flat access and give delete optimization hint */ - theGlobals->result = FSOpenIterator(container, kFSIterateFlat + kFSIterateDelete, &iterator); - if ( theGlobals->result == noErr ) - { - do /* delete the contents of the directory */ - { - /* get 1 item to delete */ - theGlobals->result = FSGetCatalogInfoBulk( iterator, 1, &theGlobals->actualObjects, - NULL, kFSCatInfoNodeFlags, &theGlobals->catalogInfo, - &itemToDelete, NULL, NULL); - if ( (theGlobals->result == noErr) && (theGlobals->actualObjects == 1) ) - { - /* save node flags in local in case we have to recurse */ - nodeFlags = theGlobals->catalogInfo.nodeFlags; - - /* is it a directory? */ - if ( (nodeFlags & kFSNodeIsDirectoryMask) != 0 ) - { /* yes -- delete its contents before attempting to delete it */ - FSDeleteFolderLevel(&itemToDelete, theGlobals); - } - if ( theGlobals->result == noErr) /* are we still OK to delete? */ - { - if ( (nodeFlags & kFSNodeLockedMask) != 0 ) /* is item locked? */ - { /* then attempt to unlock it (ignore result since FSDeleteObject will set it correctly) */ - theGlobals->catalogInfo.nodeFlags = nodeFlags & ~kFSNodeLockedMask; - (void) FSSetCatalogInfo(&itemToDelete, kFSCatInfoNodeFlags, &theGlobals->catalogInfo); - } - /* delete the item */ - theGlobals->result = FSDeleteObject(&itemToDelete); - } - } - } while ( theGlobals->result == noErr ); - - /* we found the end of the items normally, so return noErr */ - if ( theGlobals->result == errFSNoMoreItems ) - theGlobals->result = noErr; - - /* close the FSIterator (closing an open iterator should never fail) */ - myverify_noerr(FSCloseIterator(iterator)); - } - - mycheck_noerr( theGlobals->result ); - - return; -} - -/*****************************************************************************/ - -#pragma mark ----- Utilities ----- - - /* Figures out if the given directory is a drop box or not */ - /* if it is, the Copy Engine will behave slightly differently */ -static OSErr IsDropBox( const FSRef* source, - Boolean *isDropBox ) -{ - FSCatalogInfo tmpCatInfo; - FSSpec sourceSpec; - Boolean isDrop = false; - OSErr err; - - /* get info about the destination, and an FSSpec to it for PBHGetDirAccess */ - err = FSGetCatalogInfo(source, kFSCatInfoNodeFlags | kFSCatInfoPermissions, &tmpCatInfo, NULL, &sourceSpec, NULL); - if( err == noErr ) /* make sure the source is a directory */ - err = ((tmpCatInfo.nodeFlags & kFSNodeIsDirectoryMask) != 0) ? noErr : errFSNotAFolder; - if( err == noErr ) - { - HParamBlockRec hPB; - - BlockZero( &hPB, sizeof( HParamBlockRec ) ); - - hPB.accessParam.ioNamePtr = sourceSpec.name; - hPB.accessParam.ioVRefNum = sourceSpec.vRefNum; - hPB.accessParam.ioDirID = sourceSpec.parID; - - /* This is the official way (reads: the way X Finder does it) to figure */ - /* out the current users access privileges to a given directory */ - err = PBHGetDirAccessSync(&hPB); - if( err == noErr ) /* its a drop folder if the current user only has write access */ - isDrop = (hPB.accessParam.ioACAccess & kPrivilegesMask) == kioACAccessUserWriteMask; - else if ( err == paramErr ) - { - /* There is a bug (2908703) in the Classic File System (not OS 9.x or Carbon) */ - /* on 10.1.x where PBHGetDirAccessSync sometimes returns paramErr even when the */ - /* data passed in is correct. This is a workaround/hack for that problem, */ - /* but is not as accurate. */ - /* Basically, if "Everyone" has only Write/Search access then its a drop folder */ - /* that is the most common case when its a drop folder */ - FSPermissionInfo *tmpPerm = (FSPermissionInfo *)tmpCatInfo.permissions; - isDrop = ((tmpPerm->mode & kRWXOtherAccessMask) == kDropFolderValue); - err = noErr; - } - } - - *isDropBox = isDrop; - - mycheck_noerr( err ); - - return err; -} - -/*****************************************************************************/ - - /* The copy engine is going to set the item's creation date */ - /* to kMagicBusyCreationDate while it's copying the item. */ - /* But kMagicBusyCreationDate is an old-style 32-bit date/time, */ - /* while the HFS Plus APIs use the new 64-bit date/time. So */ - /* we have to call a happy UTC utilities routine to convert from */ - /* the local time kMagicBusyCreationDate to a UTCDateTime */ - /* gMagicBusyCreationDate, which the File Manager will store */ - /* on disk and which the Finder we read back using the old */ - /* APIs, whereupon the File Manager will convert it back */ - /* to local time (and hopefully get the kMagicBusyCreationDate */ - /* back!). */ -static OSErr GetMagicBusyCreateDate( UTCDateTime *date ) -{ - static UTCDateTime magicDate = { 0, 0xDEADBEEF, 0 }; - OSErr err = ( date != NULL ) ? noErr : paramErr; - - if( err == noErr && magicDate.lowSeconds == 0xDEADBEEF ) - err = ConvertLocalTimeToUTC( kMagicBusyCreationDate, &magicDate.lowSeconds ); - if( err == noErr ) - *date = magicDate; - - mycheck_noerr( err ); - - return err; -} - -/*****************************************************************************/ - -static OSErr FSGetVRefNum( const FSRef *ref, - FSVolumeRefNum *vRefNum) -{ - FSCatalogInfo catalogInfo; - OSErr err = ( ref != NULL && vRefNum != NULL ) ? noErr : paramErr; - - if( err == noErr ) /* get the volume refNum from the FSRef */ - err = FSGetCatalogInfo(ref, kFSCatInfoVolume, &catalogInfo, NULL, NULL, NULL); - if( err == noErr ) - *vRefNum = catalogInfo.volume; - - mycheck_noerr( err ); - - return err; -} - -/*****************************************************************************/ - -static OSErr FSGetVolParms( FSVolumeRefNum volRefNum, - UInt32 bufferSize, - GetVolParmsInfoBuffer *volParmsInfo, - UInt32 *actualInfoSize) /* Can Be NULL */ -{ - HParamBlockRec pb; - OSErr err = ( volParmsInfo != NULL ) ? noErr : paramErr; - - if( err == noErr ) - { - pb.ioParam.ioNamePtr = NULL; - pb.ioParam.ioVRefNum = volRefNum; - pb.ioParam.ioBuffer = (Ptr)volParmsInfo; - pb.ioParam.ioReqCount = (SInt32)bufferSize; - err = PBHGetVolParmsSync(&pb); - } - /* return number of bytes the file system returned in volParmsInfo buffer */ - if( err == noErr && actualInfoSize != NULL) - *actualInfoSize = (UInt32)pb.ioParam.ioActCount; - - mycheck_noerr( err ); - - return ( err ); -} - -/*****************************************************************************/ - -/* Converts a unicode string to a PString */ -/* If your code is only for OS X, you can use CFString functions to do all this */ -/* Since this sample code supports OS 9.1 -> OS X, I have to do this the */ -/* old fashioned way. */ -static OSErr UniStrToPStr( const HFSUniStr255 *uniStr, - TextEncoding textEncodingHint, - Boolean isVolumeName, - Str255 pStr ) -{ - UnicodeMapping uMapping; - UnicodeToTextInfo utInfo; - ByteCount unicodeByteLength = 0; - ByteCount unicodeBytesConverted; - ByteCount actualPascalBytes; - OSErr err = (uniStr != NULL && pStr != NULL) ? noErr : paramErr; - - /* make sure output is valid in case we get errors or there's nothing to convert */ - pStr[0] = 0; - - if( err == noErr ) - unicodeByteLength = uniStr->length * sizeof(UniChar); /* length can be zero, which is fine */ - if( err == noErr && unicodeByteLength != 0 ) - { - /* if textEncodingHint is kTextEncodingUnknown, get a "default" textEncodingHint */ - if ( kTextEncodingUnknown == textEncodingHint ) - { - ScriptCode script; - RegionCode region; - - script = (ScriptCode)GetScriptManagerVariable(smSysScript); - region = (RegionCode)GetScriptManagerVariable(smRegionCode); - err = UpgradeScriptInfoToTextEncoding(script, kTextLanguageDontCare, - region, NULL, &textEncodingHint ); - if ( err == paramErr ) - { /* ok, ignore the region and try again */ - err = UpgradeScriptInfoToTextEncoding(script, kTextLanguageDontCare, - kTextRegionDontCare, NULL, - &textEncodingHint ); - } - if ( err != noErr ) /* ok... try something */ - textEncodingHint = kTextEncodingMacRoman; - } - - uMapping.unicodeEncoding = CreateTextEncoding( kTextEncodingUnicodeV2_0, - kUnicodeCanonicalDecompVariant, - kUnicode16BitFormat); - uMapping.otherEncoding = GetTextEncodingBase(textEncodingHint); - uMapping.mappingVersion = kUnicodeUseHFSPlusMapping; - - err = CreateUnicodeToTextInfo(&uMapping, &utInfo); - if( err == noErr ) - { - err = ConvertFromUnicodeToText( utInfo, unicodeByteLength, uniStr->unicode, kUnicodeLooseMappingsMask, - 0, NULL, 0, NULL, /* offsetCounts & offsetArrays */ - isVolumeName ? kHFSMaxVolumeNameChars : kHFSPlusMaxFileNameChars, - &unicodeBytesConverted, &actualPascalBytes, &pStr[1]); - } - if( err == noErr ) - pStr[0] = actualPascalBytes; - - /* verify the result in debug builds -- there's really not anything you can do if it fails */ - myverify_noerr(DisposeUnicodeToTextInfo(&utInfo)); - } - - mycheck_noerr( err ); - - return ( err ); -} - -/*****************************************************************************/ - - /* Yeah I know there is FSpMakeFSRef, but this way I don't have to */ - /* actually have an FSSpec created to make the FSRef, and this is */ - /* what FSpMakeFSRef does anyways */ -static OSErr FSMakeFSRef( FSVolumeRefNum volRefNum, - SInt32 dirID, - ConstStr255Param name, - FSRef *ref ) -{ - FSRefParam pb; - OSErr err = ( ref != NULL ) ? noErr : paramErr; - - if( err == noErr ) - { - pb.ioVRefNum = volRefNum; - pb.ioDirID = dirID; - pb.ioNamePtr = (StringPtr)name; - pb.newRef = ref; - err = PBMakeFSRefSync(&pb); - } - - mycheck_noerr( err ); - - return ( err ); -} - -/*****************************************************************************/ - - /* This checks the destination to see if an object of the same name as the source */ - /* exists or not. If it does we have to special handle the DupeActions */ - /* */ - /* If kDupeActionReplace we move aside the object by renameing it to ".DeleteMe" */ - /* so that it will be invisible (X only), and give a suggestion on what to do with */ - /* it if for some unknown reason it survives the copy and the user finds it. This */ - /* rename is mainly done to handle the case where the source is in the destination */ - /* and the user wants to replace. Basically keeping the source around throughout */ - /* the copy, deleting it afterwards. Its also done cause its a good idea not to */ - /* dispose of the existing object in case the copy fails */ - /* */ - /* If kDupeActionRename, we create a unique name for the new object and pass */ - /* it back to the caller */ -static OSErr SetupDestination( const FSRef *destDir, - const DupeAction dupeAction, - HFSUniStr255 *sourceName, - FSRef *deleteMeRef, - Boolean *isReplacing ) -{ - FSRef tmpRef; - OSErr err; - - /* check if an object of the same name already exists in the destination */ - err = FSMakeFSRefUnicode( destDir, sourceName->length, sourceName->unicode, kTextEncodingUnknown, &tmpRef ); - if( err == noErr ) - { /* if the user wants to replace the existing */ - /* object, rename it to .DeleteMe first. Delete it */ - if( dupeAction == kDupeActionReplace ) /* only after copying the new one successfully */ - { - err = FSRenameUnicode( &tmpRef, 9, (UniChar*)"\0.\0D\0e\0l\0e\0t\0e\0M\0e", kTextEncodingMacRoman, deleteMeRef ); - *isReplacing = ( err == noErr ) ? true : false; - } - else if( dupeAction == kDupeActionRename ) /* if the user wants to just rename it */ - err = GetUniqueName( destDir, sourceName ); /* then we get a unique name for the new object */ - } - else if ( err == fnfErr ) /* if no object exists then */ - err = noErr; /* continue with no error */ - - return err; -} - -/*****************************************************************************/ - - /* Given a directory and a name, GetUniqueName will check if an object */ - /* with the same name already exists, and if it does it will create */ - /* a new, unique name for and return it. */ - /* it simply appends a number to the end of the name. It is not */ - /* fool proof, and it is limited... I'll take care of that in a */ - /* later release */ - /* If anyone has any suggestions/better techniques I would love to hear */ - /* about them */ -static OSErr GetUniqueName( const FSRef *destDir, - HFSUniStr255 *sourceName ) -{ - HFSUniStr255 tmpName = *sourceName; - FSRef tmpRef; - unsigned char hexStr[17] = "123456789"; /* yeah, only 9... I'm lazy, sosumi */ - long count = 0; - int index; - OSErr err; - - /* find the dot, if there is one */ - for( index = tmpName.length; index >= 0 && tmpName.unicode[index] != (UniChar) '.'; index-- ) { /* Do Nothing */ } - - if( index <= 0) /* no dot or first char is a dot (invisible file), so append to end of name */ - index = tmpName.length; - else /* shift the extension up two spots to make room for our digits */ - BlockMoveData( tmpName.unicode + index, tmpName.unicode + index + 2, (tmpName.length - index) * 2 ); - - /* add the space to the name */ - tmpName.unicode[ index ] = (UniChar)' '; - /* we're adding two characters to the name */ - tmpName.length += 2; - - do { /* add the digit to the name */ - tmpName.unicode[ index + 1 ] = hexStr[count]; - /* check if the file with this new name already exists */ - err = FSMakeFSRefUnicode( destDir, tmpName.length, tmpName.unicode, kTextEncodingUnknown, &tmpRef ); - count++; - } while( err == noErr && count < 10 ); - - if( err == fnfErr ) - { - err = noErr; - *sourceName = tmpName; - } - - return err; -} - -/*****************************************************************************/ - -static OSErr GetObjectName( const FSRef *sourceRef, - HFSUniStr255 *sourceName, /* can be NULL */ - TextEncoding *sourceEncoding ) /* can be NULL */ -{ - FSCatalogInfo catInfo; - FSCatalogInfoBitmap whichInfo = (sourceEncoding != NULL) ? kFSCatInfoTextEncoding : kFSCatInfoNone; - OSErr err; - - err = FSGetCatalogInfo( sourceRef, whichInfo, &catInfo, sourceName, NULL, NULL ); - if( err == noErr && sourceEncoding != NULL ) - *sourceEncoding = catInfo.textEncodingHint; - - return err; -} - -/*****************************************************************************/ - -static OSErr CreateFolder( const FSRef *sourceRef, - const FSRef *destDirRef, - const FSCatalogInfo *catalogInfo, - const HFSUniStr255 *folderName, - CopyParams *params, - FSRef *newFSRefPtr, - FSSpec *newFSSpecPtr ) -{ - FSCatalogInfo tmpCatInfo; - FSPermissionInfo origPermissions; - OSErr err = ( sourceRef != NULL && destDirRef != NULL && catalogInfo != NULL && - folderName != NULL && newFSRefPtr != NULL ) ? noErr : paramErr; - - if( err == noErr ) - { /* store away the catInfo, create date and permissions on the orig folder */ - tmpCatInfo = *catalogInfo; - origPermissions = *((FSPermissionInfo*)catalogInfo->permissions); - } - if( err == noErr ) /* create the new folder */ - err = DoCreateFolder( sourceRef, destDirRef, &tmpCatInfo, folderName, params, newFSRefPtr, newFSSpecPtr ); - if( err == noErr && !params->copyingToDropFolder ) - { /* if its not a drop box, set the permissions on the new folder */ - *((FSPermissionInfo*)tmpCatInfo.permissions) = origPermissions; - err = FSSetCatalogInfo( newFSRefPtr, kFSCatInfoPermissions, &tmpCatInfo ); - } - - mycheck_noerr( err ); - - return err; -} - -/*****************************************************************************/ - -static OSErr DoCreateFolder(const FSRef *sourceRef, - const FSRef *destDirRef, - const FSCatalogInfo *catalogInfo, - const HFSUniStr255 *folderName, - CopyParams *params, - FSRef *newFSRefPtr, - FSSpec *newFSSpecPtr) -{ - FSCatalogInfo catInfo = *catalogInfo; - OSErr err; - - /* Clear the "inited" bit so that the Finder positions the icon for us. */ - ((FInfo *)(catInfo.finderInfo))->fdFlags &= ~kHasBeenInited; - - /* we need to have user level read/write/execute access to the folder we are going to create, */ - /* otherwise FSCreateDirectoryUnicode will return -5000 (afpAccessDenied), */ - /* and the FSRef returned will be invalid, yet the folder is created... bug? */ - ((FSPermissionInfo*) catInfo.permissions)->mode |= kRWXUserAccessMask; - - err = FSCreateDirectoryUnicode( destDirRef, folderName->length, - folderName->unicode, kFSCatInfoSettableInfo, - &catInfo, newFSRefPtr, - newFSSpecPtr, NULL); - - /* With the new APIs, folders can have forks as well as files. Before */ - /* we start copying items in the folder, we must copy over the forks */ - /* Currently, MacOS doesn't support any file systems that have forks in */ - /* folders, but the API supports it so (for possible future */ - /* compatability) I kept this in here. */ - if( err == noErr ) - err = CopyForks( sourceRef, newFSRefPtr, params ); - - mycheck_noerr( err ); - - return err; -} - -/*****************************************************************************/ - - /* This is the DisposeDataProc that is used by the GenLinkedList in FSCopyFolder */ - /* Simply disposes of the data we created and returns */ -static pascal void MyDisposeDataProc( void *pData ) -{ - if( pData != NULL ) - DisposePtr( (char*) pData ); -} - -/*****************************************************************************/ - - /* This is the DisposeDataProc that is used by the GenLinkedList in CopyItemForks */ - /* Simply closes the resource fork (if opened, != 0) and disposes of the memory */ -static pascal void MyCloseForkProc( void *pData ) -{ - SInt16 refNum; - - if( pData == NULL ) - return; - - refNum = ((ForkTrackerPtr)pData)->forkDestRefNum; - if( refNum != 0 ) - myverify_noerr( FSCloseFork( refNum ) ); /* the fork was opened, so close it */ - - DisposePtr( (char*) pData ); -} diff --git a/wolf3d/code/iphone/FSCopyObject.h b/wolf3d/code/iphone/FSCopyObject.h deleted file mode 100644 index 3189f00..0000000 --- a/wolf3d/code/iphone/FSCopyObject.h +++ /dev/null @@ -1,258 +0,0 @@ -/* - File: FSCopyObject.h - - Contains: A Copy/Delete Files/Folders engine which uses the HFS+ API's - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - Copyright © 2002-2004 Apple Computer, Inc., All Rights Reserved -*/ - - -#ifndef __FSCOPYOBJECT_H__ -#define __FSCOPYOBJECT_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -#if TARGET_API_MAC_OSX || defined( __APPLE_CC__ ) -#include -#endif - -#define DEBUG 1 /* set to zero if you don't want debug spew */ - -#if DEBUG - #include - - #define QuoteExceptionString(x) #x - - #define dwarning(s) do { printf s; fflush(stderr); } while( 0 ) - - #define mycheck_noerr( error ) \ - do { \ - if( (OSErr) error != noErr ) { \ - dwarning((QuoteExceptionString(error) " != noErr in File: %s, Function: %s, Line: %d, Error: %d\n", \ - __FILE__, __FUNCTION__, __LINE__, (OSErr) error)); \ - } \ - } while( false ) - - #define mycheck( assertion ) \ - do { \ - if( ! assertion ) { \ - dwarning((QuoteExceptionString(assertion) " failed in File: %s, Function: %s, Line: %d\n", \ - __FILE__, __FUNCTION__, __LINE__)); \ - } \ - } while( false ) - - #define myverify(assertion) mycheck(assertion) - #define myverify_noerr(assertion) mycheck_noerr( (assertion) ) -#else - #define dwarning(s) - - #define mycheck(assertion) - #define mycheck_noerr(err) - #define myverify(assertion) do { (void) (assertion); } while (0) - #define myverify_noerr(assertion) myverify(assertion) -#endif - -/* - This code takes some tricks/techniques from MoreFilesX (by Jim Luther) and - MPFileCopy (by Quinn), wraps them all up into an easy to use API, and adds a bunch of - features and bug fixes. It will run on Mac OS 9.1 through 9.2.x and 10.1.x - and up (Classic, Carbon and Mach-O) -*/ - - /* Different options that FSCopyObject can take during a copy */ -typedef UInt32 DupeAction; -enum { - kDupeActionStandard, /* will do the copy with no frills */ - kDupeActionReplace, /* will delete the existing object and then copy over the new one */ - kDupeActionRename /* will rename the new object if an object of the same name exists */ -}; - -/*****************************************************************************/ - -#pragma mark CopyObjectFilterProcPtr - -/* - This is the prototype for the CallCopyObjectFilterProc function which - is called once for each file and directory found by FSCopyObject. - The CallCopyObjectFilterProc can use the read-only data it receives for - whatever it wants. - - The result of the CallCopyObjectFilterProc function indicates if - the copy should be stopped. To stop the copy, return an error; to continue - the copy, return noErr. - - The yourDataPtr parameter can point to whatever data structure you might - want to access from within the CallCopyObjectFilterProc. - - Note: If an error had occured during the copy of the current object - (currentOSErr != noErr) the FSRef etc might not be valid - - containerChanged --> Set to true if the container's contents changed - during iteration. - currentLevel --> The current recursion level into the container. - 1 = the container, 2 = the container's immediate - subdirectories, etc. - currentOSErr --> The current error code, shows the results of the - copy of the current object (ref) - catalogInfo --> The catalog information for the current object. - Only the fields requested by the whichInfo - parameter passed to FSIterateContainer are valid. - ref --> The FSRef to the current object. - spec --> The FSSpec to the current object if the wantFSSpec - parameter passed to FSCopyObject is true. - name --> The name of the current object if the wantName - parameter passed to FSCopyObject is true. - yourDataPtr --> An optional pointer to whatever data structure you - might want to access from within the - CallCopyObjectFilterProc. - result <-- To continue the copy, return noErr - - __________ - - Also see: FSCopyObject -*/ - -typedef CALLBACK_API( OSErr , CopyObjectFilterProcPtr ) ( - Boolean containerChanged, - ItemCount currentLevel, - OSErr currentOSErr, - const FSCatalogInfo *catalogInfo, - const FSRef *ref, - const FSSpec *spec, - const HFSUniStr255 *name, - void *yourDataPtr); - - -/*****************************************************************************/ - -#pragma mark CallCopyObjectFilterProc - -#define CallCopyObjectFilterProc(userRoutine, containerChanged, currentLevel, currentOSErr, catalogInfo, ref, spec, name, yourDataPtr) \ - (*(userRoutine))((containerChanged), (currentLevel), (currentOSErr), (catalogInfo), (ref), (spec), (name), (yourDataPtr)) - -/*****************************************************************************/ - -#pragma mark FSCopyObject - -/* - The FSCopyObject function takes a source object (can be a file or directory) - and copies it (and its contents if it's a directory) to the new destination - directory. - - It will call your CopyObjectFilterProcPtr once for each object copied - - The maxLevels parameter is only used when the object is a directory, - ignored otherwise. - It lets you control how deep the recursion goes. - If maxLevels is 1, FSCopyObject only scans the specified directory; - if maxLevels is 2, FSCopyObject scans the specified directory and - one subdirectory below the specified directory; etc. Set maxLevels to - zero to scan all levels. - - The yourDataPtr parameter can point to whatever data structure you might - want to access from within your CopyObjectFilterProcPtr. - - source --> The FSRef to the object you want to copy - destDir --> The FSRef to the directory you wish to copy source to - maxLevels --> Maximum number of directory levels to scan or - zero to scan all directory levels, ignored if the - object is a file - whichInfo --> The fields of the FSCatalogInfo you wish passed - to you in your CopyObjectFilterProc - dupeAction --> The action to take if an object of the same name exists - in the destination - newName --> The name you want the new object to have. If you pass - in NULL, the source object name will be used. - wantFSSpec --> Set to true if you want the FSSpec to each - object passed to your CopyObjectFilterProc. - wantName --> Set to true if you want the name of each - object passed to your CopyObjectFilterProc. - filterProcPtr --> A pointer to the CopyObjectFilterProc you - want called once for each object found - by FSCopyObject. - yourDataPtr --> An optional pointer to whatever data structure you - might want to access from within the - CopyObjectFilterProc. - newObjectRef --> An optional pointer to an FSRef that, on return, - references the new object. If you don't want this - info returned, pass in NULL - newObjectSpec --> An optional pointer to an FSSPec that, on return, - references the new object. If you don't want this - info returned, pass in NULL -*/ - -OSErr FSCopyObject( const FSRef *source, - const FSRef *destDir, - ItemCount maxLevels, - FSCatalogInfoBitmap whichInfo, - DupeAction dupeAction, - const HFSUniStr255 *newName, /* can be NULL */ - Boolean wantFSSpec, - Boolean wantName, - CopyObjectFilterProcPtr filterProcPtr, /* can be NULL */ - void *yourDataPtr, /* can be NULL */ - FSRef *newObjectRef, /* can be NULL */ - FSSpec *newObjectSpec); /* can be NULL */ - -/*****************************************************************************/ - -#pragma mark FSDeleteObjects - -/* - The FSDeleteObjects function takes an FSRef to a file or directory - and attempts to delete it. If the object is a directory, all files - and subdirectories in the specified directory are deleted. If a - locked file or directory is encountered, it is unlocked and then - deleted. After deleting the directory's contents, the directory - is deleted. If any unexpected errors are encountered, - FSDeleteContainer quits and returns to the caller. - - source --> FSRef to an object (can be file or directory). - - __________ -*/ - -OSErr FSDeleteObjects( const FSRef *source ); - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file diff --git a/wolf3d/code/iphone/GenLinkedList.c b/wolf3d/code/iphone/GenLinkedList.c deleted file mode 100644 index 50a3761..0000000 --- a/wolf3d/code/iphone/GenLinkedList.c +++ /dev/null @@ -1,212 +0,0 @@ -/* - File: GenLinkedList.c - - Contains: Linked List utility routines - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - Copyright © 2003-2004 Apple Computer, Inc., All Rights Reserved -*/ - -#include "GenLinkedList.h" - -#pragma mark --- Data Structures --- - - /* This is the internal data structure for the nodes in the linked list. */ - /* */ - /* Note: The memory pointed to by pNext is owned by the list and is disposed of */ - /* in DestroyList. It should not be disposed of in any other way. */ - /* */ - /* Note: The memory pointed to by pData is owned by the caller of the linked */ - /* list. The caller is responsible for disposing of this memory. This can be */ - /* done by simply implementing a DisposeDataProc that will be called on each */ - /* node in the list, giving the caller a chance to dispose of any memory */ - /* created. The DisposeDataProc is called from DestroyList */ -struct GenNode -{ - struct GenNode *pNext; /* Pointer to the next node in the list */ - GenDataPtr pData; /* The data for this node, owned by caller */ -}; -typedef struct GenNode GenNode; - -#pragma mark --- List Implementation --- - - /* Initializes the given GenLinkedList to an empty list. This MUST be */ - /* called before any operations are performed on the list, otherwise bad things */ - /* will happen. */ -void InitLinkedList( GenLinkedList *pList, DisposeDataProcPtr disposeProcPtr) -{ - if( pList == NULL ) - return; - - pList->pHead = pList->pTail = NULL; - pList->NumberOfItems = 0; - pList->DisposeProcPtr = disposeProcPtr; -} - - /* returns the current number of items in the given list. */ - /* If pList == NULL, it returns 0 */ -ItemCount GetNumberOfItems( GenLinkedList *pList ) -{ - return (pList) ? pList->NumberOfItems : 0; -} - - /* Creates a new node, containing pData, and adds it to the tail of pList. */ - /* Note: if an error occurs, pList is unchanged. */ -OSErr AddToTail( GenLinkedList *pList, void *pData ) -{ - OSErr err = paramErr; - GenNode *tmpNode = NULL; - - if( pList == NULL || pData == NULL ) - return err; - - /* create memory for new node, if this fails we _must_ bail */ - err = ( ( tmpNode = (GenNode*) NewPtr( sizeof( GenNode ) ) ) != NULL ) ? noErr : MemError(); - if( err == noErr ) - { - tmpNode->pData = pData; /* Setup new node */ - tmpNode->pNext = NULL; - - if( pList->pTail != NULL ) /* more then one item already */ - ((GenNode*) pList->pTail)->pNext = (void*) tmpNode; /* so append to tail */ - else - pList->pHead = (void*) tmpNode; /* no items, so adjust head */ - - pList->pTail = (void*) tmpNode; - pList->NumberOfItems += 1; - } - - return err; -} - - /* Takes pSrcList and inserts it into pDestList at the location pIter points to. */ - /* The lists must have the same DisposeProcPtr, but the Data can be different. If pSrcList */ - /* is empty, it does nothing and just returns */ - /* */ - /* If pIter == NULL, insert pSrcList before the head */ - /* else If pIter == pTail, append pSrcList to the tail */ - /* else insert pSrcList in the middle somewhere */ - /* On return: pSrcList is cleared and is an empty list. */ - /* The data that was owned by pSrcList is now owned by pDestList */ -void InsertList( GenLinkedList *pDestList, GenLinkedList *pSrcList, GenIteratorPtr pIter ) -{ - if( pDestList == NULL || pSrcList == NULL || - pSrcList->pHead == NULL || pSrcList->pTail == NULL || - pDestList->DisposeProcPtr != pSrcList->DisposeProcPtr ) - return; - - if( pDestList->pHead == NULL && pDestList->pTail == NULL ) /* empty list */ - { - pDestList->pHead = pSrcList->pHead; - pDestList->pTail = pSrcList->pTail; - } - else if( pIter == NULL ) /* insert before head */ - { - /* attach the list */ - ((GenNode*)pSrcList->pTail)->pNext = pDestList->pHead; - /* fix up head */ - pDestList->pHead = pSrcList->pHead; - } - else if( pIter == pDestList->pTail ) /* append to tail */ - { - /* attach the list */ - ((GenNode*)pDestList->pTail)->pNext = pSrcList->pHead; - /* fix up tail */ - pDestList->pTail = pSrcList->pTail; - } - else /* insert in middle somewhere */ - { - GenNode *tmpNode = ((GenNode*)pIter)->pNext; - ((GenNode*)pIter)->pNext = pSrcList->pHead; - ((GenNode*)pSrcList->pTail)->pNext = tmpNode; - } - - pDestList->NumberOfItems += pSrcList->NumberOfItems; /* sync up NumberOfItems */ - - InitLinkedList( pSrcList, NULL); /* reset the source list */ -} - - /* Goes through the list and disposes of any memory we allocated. Calls the DisposeProcPtr,*/ - /* if it exists, to give the caller a chance to free up their memory */ -void DestroyList( GenLinkedList *pList ) -{ - GenIteratorPtr pIter = NULL, - pNextIter = NULL; - - if( pList == NULL ) - return; - - for( InitIterator( pList, &pIter ), pNextIter = pIter; pIter != NULL; pIter = pNextIter ) - { - Next( &pNextIter ); /* get the next node before we blow away the link */ - - if( pList->DisposeProcPtr != NULL ) - CallDisposeDataProc( pList->DisposeProcPtr, GetData( pIter ) ); - DisposePtr( (char*) pIter ); - } - - InitLinkedList( pList, NULL); -} - -/*#############################################*/ -/*#############################################*/ -/*#############################################*/ - -#pragma mark - -#pragma mark --- Iterator Implementation --- - - /* Initializes pIter to point at the head of pList */ - /* This must be called before performing any operations with pIter */ -void InitIterator( GenLinkedList *pList, GenIteratorPtr *pIter ) -{ - if( pList != NULL && pIter != NULL ) - *pIter = pList->pHead; -} - - /* On return, pIter points to the next node in the list. NULL if its gone */ - /* past the end of the list */ -void Next( GenIteratorPtr *pIter ) -{ - if( pIter != NULL ) - *pIter = ((GenNode*)*pIter)->pNext; -} - - /* Returns the data of the current node that pIter points to */ -GenDataPtr GetData( GenIteratorPtr pIter ) -{ - return ( pIter != NULL ) ? ((GenNode*)pIter)->pData : NULL; -} diff --git a/wolf3d/code/iphone/GenLinkedList.h b/wolf3d/code/iphone/GenLinkedList.h deleted file mode 100644 index c6dd69a..0000000 --- a/wolf3d/code/iphone/GenLinkedList.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - File: GenLinkedList.h - - Contains: Linked List utility routines prototypes - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - Copyright © 2003-2004 Apple Computer, Inc., All Rights Reserved -*/ - - -#ifndef __GENLINKEDLIST__ -#define __GENLINKEDLIST__ - -#ifdef __cplusplus -extern "C" { -#endif - -#if TARGET_API_MAC_OSX || defined( __APPLE_CC__ ) -#include -#endif - -/* This is a quick, simple and generic linked list implementation. I tried */ -/* to setup the code so that you could use any linked list implementation you */ -/* want. They just need to support these few functions. */ - -typedef void* GenIteratorPtr; -typedef void* GenDataPtr; - - /* This is a callback that is called from DestroyList for each node in the */ - /* list. It gives the caller the oportunity to free any memory they might */ - /* allocated in each node. */ -typedef CALLBACK_API( void , DisposeDataProcPtr ) ( GenDataPtr pData ); - -#define CallDisposeDataProc( userRoutine, pData ) (*(userRoutine))((pData)) - -struct GenLinkedList -{ - GenDataPtr pHead; /* Pointer to the head of the list */ - GenDataPtr pTail; /* Pointer to the tail of the list */ - ItemCount NumberOfItems; /* Number of items in the list (mostly for debugging) */ - DisposeDataProcPtr DisposeProcPtr; /* rountine called to dispose of caller data, can be NULL */ -}; -typedef struct GenLinkedList GenLinkedList; - -void InitLinkedList ( GenLinkedList *pList, DisposeDataProcPtr disposeProcPtr ); -ItemCount GetNumberOfItems( GenLinkedList *pList ); -OSErr AddToTail ( GenLinkedList *pList, GenDataPtr pData ); -void InsertList ( GenLinkedList *pDestList, GenLinkedList *pSrcList, GenIteratorPtr pIter ); -void DestroyList ( GenLinkedList *pList ); - -void InitIterator ( GenLinkedList *pList, GenIteratorPtr *pIter ); -void Next ( GenIteratorPtr *pIter ); -GenDataPtr GetData ( GenIteratorPtr pIter ); - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file diff --git a/wolf3d/code/iphone/Info.plist b/wolf3d/code/iphone/Info.plist index 87d0c63..1c71377 100644 --- a/wolf3d/code/iphone/Info.plist +++ b/wolf3d/code/iphone/Info.plist @@ -15,7 +15,7 @@ WOLF_72 CFBundleIdentifier - com.idsoftware.${PRODUCT_NAME:identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -23,7 +23,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - + $(MARKETING_VERSION) CFBundleSignature ???? CFBundleVersion @@ -36,8 +36,12 @@ UIInterfaceOrientation UIInterfaceOrientationLandscapeLeft + UILaunchStoryboardName + Launch Screen UIPrerenderedIcon + UIRequiresFullScreen + UIStatusBarHidden UISupportedInterfaceOrientations @@ -47,8 +51,8 @@ UISupportedInterfaceOrientations~ipad - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft diff --git a/wolf3d/code/iphone/Launch Screen.storyboard b/wolf3d/code/iphone/Launch Screen.storyboard new file mode 100644 index 0000000..cf5b145 --- /dev/null +++ b/wolf3d/code/iphone/Launch Screen.storyboard @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/LegalView.xib b/wolf3d/code/iphone/LegalView.xib index b9545d6..b121da9 100644 --- a/wolf3d/code/iphone/LegalView.xib +++ b/wolf3d/code/iphone/LegalView.xib @@ -1,657 +1,134 @@ - - - 1056 - 10K549 - 851 - 1038.36 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 141 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - YES - - - 292 - {480, 320} - - NO - IBCocoaTouchFramework - - NSImage - credits_bg.png - - - - - 292 - {{245, 14}, {134, 52}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Legal - - POSITYPE-idSettler_v10.2 - 36 - 16 - - - 3 - MQA - - - - 1 - MCAwIDAAA - - {2, 2} - 1 - 10 - 1 - - - - 292 - {{20, 265}, {32, 32}} - - 1 - NO - IBCocoaTouchFramework - - NSImage - back_arrow.png - - - - - 292 - {{20, 243}, {66, 29}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - BACK - - POSITYPE-idSettler_v10.2 - 18 - 16 - - - - 1 - 10 - 5 - - - - 301 - {{6, 239}, {69, 69}} - - NO - NO - 1 - IBCocoaTouchFramework - 0 - 0 - - Helvetica-Bold - 15 - 16 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - NSImage - button_highlight.png - - - - - 292 - {{185, 59}, {255, 242}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Wolfenstein® 3D Classic Platinum© 2009-2011 id Software LLC, a ZeniMax Media company. Wolfenstein, id, id Software, id Tech and related logos are registered trademarks or trademarks of id Software LLC in the U.S. and/or other countries. Bethesda, Bethesda Softworks, ZeniMax and related logos are registered trademarks or trademarks of ZeniMax Media Inc. in the U.S. and/or other countries. All Rights Reserved. - - POSITYPE-idSettler_v10.2 - 14 - 16 - - - 1 - MSAxIDEAA - - 1 - - - - - 1 - 10 - 12 - 1 - 0 - - - - 292 - {{163, 69}, {298, 7}} - - NO - IBCocoaTouchFramework - - NSImage - settings_divider.png - - - - {480, 320} - - - 3 - MAA - - - 3 - - IBCocoaTouchFramework - - - - - YES - - - view - - - - 3 - - - - back: - - - 7 - - 12 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - 7 - - - - - 10 - - - - - 11 - - - - - 9 - - - - - 18 - - - - - 19 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 10.IBPluginDependency - 10.IBViewBoundsToFrameTransform - 11.CustomClassName - 11.IBPluginDependency - 11.IBViewBoundsToFrameTransform - 18.IBPluginDependency - 19.IBPluginDependency - 4.CustomClassName - 4.IBPluginDependency - 4.IBViewBoundsToFrameTransform - 7.IBPluginDependency - 7.IBViewBoundsToFrameTransform - 9.IBPluginDependency - 9.IBViewBoundsToFrameTransform - - - YES - LegalViewController - UIResponder - {{369, 805}, {480, 320}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABChgAAw5EAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABChgAAw4SAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDLQAAwpQAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAAAAAAAAw58AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUDAAABDbwAAA - - - - - YES - - - YES - - - - - YES - - - YES - - - - 19 - - - - YES - - LegalViewController - UIViewController - - back: - id - - - back: - - back: - id - - - - IBProjectSource - LegalViewController.h - - - - UIFontLabel - UILabel - - IBProjectSource - UIFontLabel.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIButton - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UIButton.h - - - - UIControl - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIControl.h - - - - UIImageView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIImageView.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIPrintFormatter.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - wolf3d.xcodeproj - 3 - - YES - - YES - back_arrow.png - button_highlight.png - credits_bg.png - settings_divider.png - - - YES - {65, 63} - {4, 4} - {960, 640} - {597, 13} - - - 141 - - + + + + + + + + + + + + Helvetica-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/LegalViewController.m b/wolf3d/code/iphone/LegalViewController.m index 4d27604..86d7951 100644 --- a/wolf3d/code/iphone/LegalViewController.m +++ b/wolf3d/code/iphone/LegalViewController.m @@ -50,13 +50,6 @@ - (void)viewDidLoad { } */ -// Override to allow orientations other than the default portrait orientation. -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - // Return YES for supported orientations. - return UIInterfaceOrientationIsLandscape(interfaceOrientation); -} - - - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; @@ -64,13 +57,6 @@ - (void)didReceiveMemoryWarning { // Release any cached data, images, etc. that aren't in use. } -- (void)viewDidUnload { - [super viewDidUnload]; - // Release any retained subviews of the main view. - // e.g. self.myOutlet = nil; -} - - - (void)dealloc { [super dealloc]; } diff --git a/wolf3d/code/iphone/LevelSelectView.xib b/wolf3d/code/iphone/LevelSelectView.xib index 01cfd72..73015e6 100644 --- a/wolf3d/code/iphone/LevelSelectView.xib +++ b/wolf3d/code/iphone/LevelSelectView.xib @@ -1,976 +1,193 @@ - - - 1056 - 10K549 - 851 - 1038.36 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 141 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - YES - - - 256 - {480, 320} - - NO - YES - 1 - YES - IBCocoaTouchFramework - - NSImage - episode_bg.png - - - - - 292 - {{32, 260}, {32, 32}} - - 1 - NO - IBCocoaTouchFramework - - NSImage - back_arrow.png - - - - - 292 - {{421, 260}, {32, 32}} - - 1 - NO - IBCocoaTouchFramework - - NSImage - next_arrow.png - - - - - 292 - {{31, 237}, {66, 29}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - BACK - - POSITYPE-idSettler_v10.2 - 18 - 16 - - - 3 - MQA - - - 1 - 10 - 5 - - - - 292 - {{420, 237}, {66, 29}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - PLAY - - - - 1 - 10 - 5 - - - - 292 - {{92, 13}, {102, 29}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - MISSION - - POSITYPE-idSettler_v10.2 - 24 - 16 - - - - 1 - 10 - - - - 301 - {{23, 238}, {52, 56}} - - - 3 - MC42NjY2NjY2NjY3IDAAA - - NO - NO - 1 - IBCocoaTouchFramework - 0 - 0 - - Helvetica-Bold - 15 - 16 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - NSImage - button_highlight.png - - - - - 301 - {{412, 238}, {52, 56}} - - NO - NO - 1 - IBCocoaTouchFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - 274 - {{92, 42}, {297, 246}} - - - 3 - MCAwAA - - YES - IBCocoaTouchFramework - YES - NO - 2 - 0 - YES - 38 - - - - 274 - {{217, 296}, {46, 24}} - - NO - NO - 1 - IBCocoaTouchFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - NSImage - down_arrow.png - - - - - 274 - {{217, 8}, {46, 24}} - - NO - NO - 1 - IBCocoaTouchFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - NSImage - up_arrow.png - - - - {480, 320} - - - - 3 - - IBCocoaTouchFramework - - - - - YES - - - view - - - - 4 - - - - next: - - - 7 - - 24 - - - - back: - - - 7 - - 25 - - - - dataSource - - - - 35 - - - - delegate - - - - 36 - - - - missionList - - - - 37 - - - - pageDown: - - - 7 - - 56 - - - - pageUp: - - - 7 - - 57 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - - - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 13 - - - - - 14 - - - - - 15 - - - - - 16 - - - - - 20 - - - - - 21 - - - - - 22 - - - - - 23 - - - - - 34 - - - Mission List - - - 54 - - - - - 55 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 1.IBUserGuides - 14.CustomClassName - 14.IBPluginDependency - 14.IBViewBoundsToFrameTransform - 15.CustomClassName - 15.IBPluginDependency - 15.IBViewBoundsToFrameTransform - 16.CustomClassName - 16.IBPluginDependency - 16.IBViewBoundsToFrameTransform - 20.IBPluginDependency - 20.IBViewBoundsToFrameTransform - 21.IBPluginDependency - 21.IBViewBoundsToFrameTransform - 22.IBPluginDependency - 22.IBViewBoundsToFrameTransform - 23.IBPluginDependency - 23.IBViewBoundsToFrameTransform - 34.IBPluginDependency - 54.IBPluginDependency - 54.IBViewBoundsToFrameTransform - 55.IBPluginDependency - 55.IBViewBoundsToFrameTransform - - - YES - LevelSelectViewController - UIResponder - {{299, 832}, {480, 320}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - YES - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUIEAABDbQAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUK4AABBUAAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCuAAAw4QAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABBuAAAw5GAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUIUAABDg4AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDzgAAw5GAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUPSgABDg4AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUNhAABDmAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUNhAABBgAAAA - - - - - YES - - - YES - - - - - YES - - - YES - - - - 57 - - - - YES - - LevelSelectViewController - UIViewController - - YES - - YES - back: - next: - pageDown: - pageUp: - selectDifficulty1: - selectDifficulty2: - selectDifficulty3: - selectDifficulty4: - - - YES - id - id - id - id - id - id - id - id - - - - YES - - YES - back: - next: - pageDown: - pageUp: - selectDifficulty1: - selectDifficulty2: - selectDifficulty3: - selectDifficulty4: - - - YES - - back: - id - - - next: - id - - - pageDown: - id - - - pageUp: - id - - - selectDifficulty1: - id - - - selectDifficulty2: - id - - - selectDifficulty3: - id - - - selectDifficulty4: - id - - - - - YES - - YES - difficultyBox - difficultyText1 - difficultyText2 - difficultyText3 - difficultyText4 - missionList - - - YES - UIView - UIView - UIView - UIView - UIView - UITableView - - - - YES - - YES - difficultyBox - difficultyText1 - difficultyText2 - difficultyText3 - difficultyText4 - missionList - - - YES - - difficultyBox - UIView - - - difficultyText1 - UIView - - - difficultyText2 - UIView - - - difficultyText3 - UIView - - - difficultyText4 - UIView - - - missionList - UITableView - - - - - IBProjectSource - LevelSelectViewController.h - - - - UIFontLabel - UILabel - - IBProjectSource - UIFontLabel.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIButton - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UIButton.h - - - - UIControl - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIControl.h - - - - UIImageView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIImageView.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UIScrollView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIScrollView.h - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UITableView - UIScrollView - - IBFrameworkSource - UIKit.framework/Headers/UITableView.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIPrintFormatter.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - wolf3d.xcodeproj - 3 - - YES - - YES - back_arrow.png - button_highlight.png - down_arrow.png - episode_bg.png - next_arrow.png - up_arrow.png - - - YES - {65, 63} - {4, 4} - {80, 36} - {480, 320} - {65, 63} - {80, 36} - - - 141 - - + + + + + + + + + + + + Helvetica-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/LevelSelectViewController.m b/wolf3d/code/iphone/LevelSelectViewController.m index 8f8b07a..234f1cb 100644 --- a/wolf3d/code/iphone/LevelSelectViewController.m +++ b/wolf3d/code/iphone/LevelSelectViewController.m @@ -102,7 +102,7 @@ - (void)viewDidLoad { - (void)handleSelectionAtIndexPath:(NSIndexPath*)indexPath { int episodeIndex = episode->value; - int levelIndex = indexPath.row; + int levelIndex = (int)indexPath.row; // Prompt for In-App Purchase when the user selects a level that is not currently available. if ( SysIPhoneGetContentVersion() == CONTENT_LITE ) { @@ -165,10 +165,10 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N cell.selectionStyle = UITableViewCellSelectionStyleNone; // Cell text configuration - NSString* levelName = [NSString stringWithFormat:@"Level %d", indexPath.row + 1 ]; + NSString* levelName = [NSString stringWithFormat:@"Level %lu", (long)(indexPath.row + 1) ]; int episodeIndex = episode->value; - int levelIndex = indexPath.row; + int levelIndex = (int)indexPath.row; if ( episodeIndex < NUM_ORIGINAL_EPISODES ) { // Wolfenstein episodes are the first six, and they all follow the pattern of 8 levels, @@ -203,6 +203,8 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N cell.textLabel.textColor = [UIColor lightGrayColor]; cell.textLabel.highlightedTextColor = [UIColor colorWithRed:98.0/255.0 green:149.0/255.0 blue:212.0/255.0 alpha:1.0]; + + cell.backgroundColor = UIColor.clearColor; return cell; } @@ -223,32 +225,24 @@ - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)ce - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [self handleSelectionAtIndexPath:indexPath]; +#if TARGET_OS_TV + [self next:self]; +#endif } -// Override to allow orientations other than the default portrait orientation. -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - // Return YES for supported orientations. - return UIInterfaceOrientationIsLandscape(interfaceOrientation); +#if TARGET_OS_TV +-(NSArray> *)preferredFocusEnvironments { + return @[missionList]; } - +#endif - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; - // Release any cached data, images, etc. that aren't in use. + self.missionList = nil; } -- (void)viewDidUnload { - [super viewDidUnload]; - // Release any retained subviews of the main view. - // e.g. self.myOutlet = nil; - - self.missionList = nil; - -} - - - (void)dealloc { [super dealloc]; } diff --git a/wolf3d/code/iphone/MainMenuView.xib b/wolf3d/code/iphone/MainMenuView.xib index c90d0ca..dd6032a 100644 --- a/wolf3d/code/iphone/MainMenuView.xib +++ b/wolf3d/code/iphone/MainMenuView.xib @@ -1,1034 +1,319 @@ - - - 800 - 10K540 - 851 - 1038.36 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 141 - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 1298 - - - - 1298 - {480, 320} - - - YES - 1 - YES - 2 - IBCocoaTouchFramework - - NSImage - main_bg.png - - - - - 1343 - {{291, 243}, {157, 50}} - - NO - 2 - IBCocoaTouchFramework - 0 - 0 - - POSITYPE-idSettler_v10.2 - 42 - 16 - - {2, 2} - Resume - - 3 - MC4zMzMzMzMzMzMzAA - - - 3 - MQA - - - 1 - MCAwIDAAA - - - - - 1343 - {{40, 98}, {187, 50}} - - - NO - 2 - IBCocoaTouchFramework - 0 - - {2, 2} - New Game - - - - - - - 1343 - {{48, 147}, {152, 50}} - - - NO - 2 - IBCocoaTouchFramework - 0 - - {2, 2} - Settings - - - - - - - 1343 - {{63, 194}, {110, 50}} - - - NO - 2 - IBCocoaTouchFramework - 0 - - {2, 2} - About - - - - - - - -2147482305 - {{48, 147}, {134, 50}} - - NO - 2 - IBCocoaTouchFramework - 0 - - {2, 2} - Legal - - - - - - - -2147482305 - {{40, 98}, {134, 50}} - - NO - 2 - IBCocoaTouchFramework - 0 - - {2, 2} - Credits - - - - - - - -2147482305 - {{40, 98}, {181, 50}} - - NO - 2 - IBCocoaTouchFramework - 0 - - {2, 2} - id Games - - - - - - - -2147482305 - {{48, 147}, {211, 50}} - - NO - 2 - IBCocoaTouchFramework - 0 - - {2, 2} - id Software - - - - - - - -2147482305 - {{63, 194}, {134, 50}} - - NO - 2 - IBCocoaTouchFramework - 0 - - {2, 2} - Trivia - - - - - - - -2147482305 - {{74, 243}, {134, 50}} - - NO - 2 - IBCocoaTouchFramework - 0 - - {2, 2} - Back - - - - - - - 1343 - {{74, 243}, {120, 50}} - - - NO - 2 - IBCocoaTouchFramework - 0 - - {2, 2} - Extras - - - - - - - 1316 - {{425, 245}, {30, 30}} - - NO - 2 - IBCocoaTouchFramework - - NSImage - star_icon.png - - - - {480, 320} - - - - 3 - MAA - - - 3 - - 2 - IBCocoaTouchFramework - - - - - - - view - - - - 3 - - - - resume: - - - 7 - - 9 - - - - newGame: - - - 7 - - 10 - - - - settings: - - - 7 - - 11 - - - - about: - - - 7 - - 12 - - - - extras: - - - 7 - - 13 - - - - legal: - - - 7 - - 34 - - - - aboutButton - - - - 35 - - - - extrasButton - - - - 37 - - - - legalButton - - - - 38 - - - - newGameButton - - - - 39 - - - - resumeButton - - - - 40 - - - - settingsButton - - - - 41 - - - - backButton - - - - 44 - - - - back: - - - 7 - - 45 - - - - creditsButton - - - - 50 - - - - credits: - - - 7 - - 51 - - - - idGamesButton - - - - 58 - - - - idSoftwareButton - - - - 59 - - - - triviaButton - - - - 60 - - - - idGames: - - - 7 - - 61 - - - - idSoftware: - - - 7 - - 62 - - - - trivia: - - - 7 - - 63 - - - - resumeStar - - - - 65 - - - - - - 0 - - - - - - 1 - - - - - - - - - - - - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - 5 - - - - - 6 - - - - - 7 - - - - - 8 - - - - - 16 - - - - - 32 - - - - - 42 - - - - - 47 - - - - - 52 - - - - - 54 - - - - - 56 - - - - - 64 - - - - - - - MainMenuViewController - UIResponder - {{440, 404}, {960, 640}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAADDcAAAwx4AAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUJAAABDEwAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDkYAAw5GAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDgYAAwxkAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUIgAABCxAAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCIAAAwwkAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDagAAwrYAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDawAAwsIAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCVAAAw0gAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUI8AABDEwAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDHAAAwq4AAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUJYAABDQgAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUKSAABDbwAAA - - - - - - - 65 - - - - - MainMenuViewController - UIViewController - - id - id - id - id - id - id - id - id - id - id - id - id - - - - about: - id - - - back: - id - - - credits: - id - - - extras: - id - - - idGames: - id - - - idSoftware: - id - - - legal: - id - - - newGame: - id - - - oldNewGame: - id - - - resume: - id - - - settings: - id - - - trivia: - id - - - - UIButton - UIButton - UIButton - UIButton - UIButton - UIButton - UIButton - UIButton - UIButton - UIView - UIButton - UIButton - - - - aboutButton - UIButton - - - backButton - UIButton - - - creditsButton - UIButton - - - extrasButton - UIButton - - - idGamesButton - UIButton - - - idSoftwareButton - UIButton - - - legalButton - UIButton - - - newGameButton - UIButton - - - resumeButton - UIButton - - - resumeStar - UIView - - - settingsButton - UIButton - - - triviaButton - UIButton - - - - IBProjectSource - MainMenuViewController.h - - - - UIFontButton - UIButton - - IBProjectSource - UIFontButton.h - - - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIButton - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UIButton.h - - - - UIControl - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIControl.h - - - - UIImageView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIImageView.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIPrintFormatter.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - YES - wolf3d.xcodeproj - 3 - - {960, 640} - {41, 39} - - 141 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/MainMenuViewController.h b/wolf3d/code/iphone/MainMenuViewController.h index fc430d4..edae31e 100644 --- a/wolf3d/code/iphone/MainMenuViewController.h +++ b/wolf3d/code/iphone/MainMenuViewController.h @@ -28,7 +28,7 @@ @private // Main menu IBOutlet UIButton *resumeButton; - IBOutlet UIButton *newGameButton; + IBOutlet UIButton *startNewGameButton; IBOutlet UIButton *settingsButton; IBOutlet UIButton *aboutButton; IBOutlet UIButton *extrasButton; diff --git a/wolf3d/code/iphone/MainMenuViewController.m b/wolf3d/code/iphone/MainMenuViewController.m index 7251192..f69014c 100644 --- a/wolf3d/code/iphone/MainMenuViewController.m +++ b/wolf3d/code/iphone/MainMenuViewController.m @@ -29,12 +29,15 @@ #import "CreditsViewController.h" #import "LegalViewController.h" #import "TriviaViewController.h" + +#if !TARGET_OS_TV #import "SettingsViewController.h" +#endif @interface MainMenuViewController () @property (nonatomic, retain) IBOutlet UIButton *resumeButton; - @property (nonatomic, retain) IBOutlet UIButton *newGameButton; + @property (nonatomic, retain) IBOutlet UIButton *startNewGameButton; @property (nonatomic, retain) IBOutlet UIButton *settingsButton; @property (nonatomic, retain) IBOutlet UIButton *aboutButton; @property (nonatomic, retain) IBOutlet UIButton *extrasButton; @@ -57,35 +60,34 @@ - (void) setExtrasHidden:(BOOL)hide; @implementation MainMenuViewController -@synthesize resumeButton, newGameButton, settingsButton, aboutButton, extrasButton, resumeStar; +@synthesize resumeButton, startNewGameButton, settingsButton, aboutButton, extrasButton, resumeStar; @synthesize creditsButton, legalButton; @synthesize idGamesButton, idSoftwareButton, triviaButton; @synthesize backButton; -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - return UIInterfaceOrientationIsLandscape(interfaceOrientation); -} +BOOL subMenu = NO; -- (void)viewDidUnload { - [super viewDidUnload]; +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; - - self.resumeButton = nil; - self.newGameButton = nil; - self.settingsButton = nil; - self.aboutButton = nil; - self.extrasButton = nil; - self.resumeStar = nil; - - self.idGamesButton = nil; - self.idSoftwareButton = nil; - self.triviaButton = nil; - - self.creditsButton = nil; - self.legalButton = nil; - - self.backButton = nil; + + self.resumeButton = nil; + self.startNewGameButton = nil; + self.settingsButton = nil; + self.aboutButton = nil; + self.extrasButton = nil; + self.resumeStar = nil; + + self.idGamesButton = nil; + self.idSoftwareButton = nil; + self.triviaButton = nil; + + self.creditsButton = nil; + self.legalButton = nil; + + self.backButton = nil; } - (IBAction)resume:(id)sender { @@ -96,15 +98,18 @@ - (IBAction)resume:(id)sender { - (IBAction)newGame:(id)sender { - SkillViewController *svc = [[SkillViewController alloc] initWithNibName:@"SkillView" bundle:nil]; + wolf3dAppDelegate* app = (wolf3dAppDelegate*)[[UIApplication sharedApplication] delegate]; + SkillViewController *svc = [[SkillViewController alloc] initWithNibName:[app GetNibNameForDevice:@"SkillView"] bundle:nil]; [self.navigationController pushViewController:svc animated:YES]; [svc release]; } - (IBAction)settings:(id)sender { +#if !TARGET_OS_TV SettingsViewController *evc = [[SettingsViewController alloc] initWithNibName:@"SettingsView" bundle:nil]; [self.navigationController pushViewController:evc animated:YES]; - [evc release]; + [evc release]; +#endif } - (IBAction)about:(id)sender { @@ -118,19 +123,21 @@ - (IBAction)extras:(id)sender { } - (IBAction)credits:(id)sender { - CreditsViewController *cvc = [[CreditsViewController alloc] initWithNibName:@"CreditsView" bundle:nil]; + wolf3dAppDelegate* app = (wolf3dAppDelegate*)[[UIApplication sharedApplication] delegate]; + CreditsViewController *cvc = [[CreditsViewController alloc] initWithNibName:[app GetNibNameForDevice:@"CreditsView"] bundle:nil]; [self.navigationController pushViewController:cvc animated:YES]; [cvc release]; } - (IBAction)legal:(id)sender { - LegalViewController *lvc = [[LegalViewController alloc] initWithNibName:@"LegalView" bundle:nil]; + wolf3dAppDelegate* app = (wolf3dAppDelegate*)[[UIApplication sharedApplication] delegate]; + LegalViewController *lvc = [[LegalViewController alloc] initWithNibName:[app GetNibNameForDevice:@"LegalView"] bundle:nil]; [self.navigationController pushViewController:lvc animated:YES]; [lvc release]; } - (IBAction)idGames:(id)sender { - [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms-apps://itunes.com/apps/idsoftware"]]; + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms-apps://itunes.com/apps/idsoftware"] options:@{} completionHandler:nil]; } - (IBAction)idSoftware:(id)sender { @@ -139,7 +146,8 @@ - (IBAction)idSoftware:(id)sender { } - (IBAction)trivia:(id)sender { - TriviaViewController *tvc = [[TriviaViewController alloc] initWithNibName:@"TriviaView" bundle:nil]; + wolf3dAppDelegate* app = (wolf3dAppDelegate*)[[UIApplication sharedApplication] delegate]; + TriviaViewController *tvc = [[TriviaViewController alloc] initWithNibName:[app GetNibNameForDevice:@"TriviaView"] bundle:nil]; [self.navigationController pushViewController:tvc animated:YES]; [tvc release]; @@ -157,12 +165,12 @@ - (IBAction)back:(id)sender { - (void)setMainHidden:(BOOL)hide { // Set the main menu visibility [self.resumeButton setHidden:hide]; - [self.newGameButton setHidden:hide]; + [self.startNewGameButton setHidden:hide]; [self.settingsButton setHidden:hide]; [self.aboutButton setHidden:hide]; [self.extrasButton setHidden:hide]; [self.resumeStar setHidden:hide]; - + subMenu = hide; } - (void)setAboutHidden:(BOOL)hide { @@ -188,5 +196,42 @@ - (IBAction)oldNewGame:(id)sender { [app showOpenGL]; } +#if TARGET_OS_TV +- (void)pressesBegan:(NSSet *)presses withEvent:(UIPressesEvent *)event { + for (UIPress* press in presses) { + switch (press.type) { + case UIPressTypeMenu: + if (subMenu) { + break; + } else { + [super pressesBegan: presses withEvent: event]; + } + default: + [super pressesBegan: presses withEvent: event]; + break; + } + } +} + +- (void)pressesEnded:(NSSet *)presses withEvent:(UIPressesEvent *)event { + for (UIPress* press in presses) { + switch (press.type) { + case UIPressTypeMenu: + if (subMenu) { + [self setAboutHidden:YES]; + [self setExtrasHidden:YES]; + [self setMainHidden:NO]; + } else { + [super pressesEnded: presses withEvent: event]; + } + break; + default: + [super pressesEnded: presses withEvent: event]; + break; + } + } +} + +#endif -@end \ No newline at end of file +@end diff --git a/wolf3d/code/iphone/MainWindow.xib b/wolf3d/code/iphone/MainWindow.xib deleted file mode 100644 index fc76dc5..0000000 --- a/wolf3d/code/iphone/MainWindow.xib +++ /dev/null @@ -1,223 +0,0 @@ - - - - 528 - 9E17 - 672 - 949.33 - 352.00 - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - IBFilesOwner - - - IBFirstResponder - - - - - 1316 - - YES - - - 1298 - {320, 480} - - - 3 - MQA - - 2 - - - NO - - - - {320, 480} - - - 1 - MSAxIDEAA - - NO - YES - - - - - YES - - - delegate - - - - 4 - - - - window - - - - 5 - - - - glView - - - - 9 - - - - - YES - - 0 - - YES - - - - - - 2 - - - YES - - - - - - -1 - - - RmlsZSdzIE93bmVyA - - - 3 - - - - - 8 - - - - - -2 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 2.IBAttributePlaceholdersKey - 2.IBEditorWindowLastContentRect - 2.IBPluginDependency - 3.CustomClassName - 3.IBPluginDependency - 8.CustomClassName - 8.IBPluginDependency - - - YES - UIApplication - UIResponder - - YES - - YES - - - YES - - - {{500, 343}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - wolf3dAppDelegate - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - EAGLView - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - YES - - - YES - - - - - YES - - YES - - - YES - - - - 9 - - - - YES - - EAGLView - UIView - - IBProjectSource - Classes/EAGLView.h - - - - wolf3dAppDelegate - NSObject - - YES - - YES - glView - window - - - YES - EAGLView - UIWindow - - - - IBProjectSource - Classes/wolf3dAppDelegate.h - - - - - 0 - wolf3d.xcodeproj - 3 - - diff --git a/wolf3d/code/iphone/POSITYPE-idSettler10v2.otf b/wolf3d/code/iphone/POSITYPE-idSettler10v2.otf new file mode 100755 index 0000000..1e07fe5 Binary files /dev/null and b/wolf3d/code/iphone/POSITYPE-idSettler10v2.otf differ diff --git a/wolf3d/code/iphone/Resources-iPad/CreditsView~ipad.xib b/wolf3d/code/iphone/Resources-iPad/CreditsView~ipad.xib index eca309b..6b15bce 100644 --- a/wolf3d/code/iphone/Resources-iPad/CreditsView~ipad.xib +++ b/wolf3d/code/iphone/Resources-iPad/CreditsView~ipad.xib @@ -1,1482 +1,95 @@ - - - 1056 - 10K549 - 851 - 1038.36 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 141 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBIPadFramework - - - IBFirstResponder - IBIPadFramework - - - - 274 - - YES - - - 274 - {1024, 768} - - NO - YES - YES - IBIPadFramework - - NSImage - credits_bg.png - - - - - 292 - {{26, 45}, {63, 65}} - - 1 - NO - IBIPadFramework - - NSImage - back_arrow.png - - - - - 292 - {{23, 16}, {99, 43}} - - NO - YES - 7 - NO - IBIPadFramework - BACK - - POSITYPE-idSettler_v10.2 - 36 - 16 - - - 3 - MQA - - - 1 - 10 - 5 - - - - 301 - {{22, 11}, {70, 100}} - - NO - NO - 1 - IBIPadFramework - 0 - 0 - - Helvetica-Bold - 15 - 16 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - NSImage - button_highlight.png - - - - - 292 - - YES - - - 292 - {{55, 794}, {379, 55}} - - NO - YES - 7 - NO - IBIPadFramework - Wolfenstein 3D and Spear of Destiny originally created by id Software - - Helvetica-Bold - 20 - 16 - - - - - 1 - MCAwIDAAA - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{73, 20}, {344, 36}} - - NO - YES - 7 - NO - IBIPadFramework - Wolfenstein 3D Classic Platinum - - Helvetica-Bold - 22 - 16 - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{86, 87}, {307, 36}} - - NO - YES - 7 - NO - IBIPadFramework - Programming - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{86, 294}, {307, 36}} - - NO - YES - 7 - NO - IBIPadFramework - Art - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{86, 421}, {307, 36}} - - NO - YES - 7 - NO - IBIPadFramework - Audio - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{85, 910}, {307, 36}} - - NO - YES - 7 - NO - IBIPadFramework - Programming - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{85, 1024}, {307, 36}} - - NO - YES - 7 - NO - IBIPadFramework - Design - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{85, 1174}, {307, 36}} - - NO - YES - 7 - NO - IBIPadFramework - Art - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{85, 1303}, {307, 36}} - - NO - YES - 7 - NO - IBIPadFramework - Audio - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{86, 532}, {307, 36}} - - NO - YES - 7 - NO - IBIPadFramework - Production - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{87, 639}, {307, 36}} - - NO - YES - 7 - NO - IBIPadFramework - QA Testing - - - - - {1, 1} - 1 - 10 - 2 - 1 - 0 - - - - 292 - {{184, 140}, {111, 21}} - - NO - YES - 7 - NO - IBIPadFramework - John Carmack - - Helvetica - 17 - 16 - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{183, 954}, {111, 21}} - - NO - YES - 7 - NO - IBIPadFramework - John Carmack - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{183, 1068}, {111, 21}} - - NO - YES - 7 - NO - IBIPadFramework - John Ramero - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{183, 1094}, {111, 21}} - - NO - YES - 7 - NO - IBIPadFramework - Tom Hall - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{178, 1218}, {121, 23}} - - NO - YES - 7 - NO - IBIPadFramework - Adrian Carmack - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{183, 1246}, {111, 21}} - - NO - YES - 7 - NO - IBIPadFramework - Kevin Cloud - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{183, 1351}, {111, 21}} - - NO - YES - 7 - NO - IBIPadFramework - Bobby Prince - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{185, 338}, {111, 21}} - - NO - YES - 7 - NO - IBIPadFramework - John Burnett - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{185, 367}, {111, 21}} - - NO - YES - 7 - NO - IBIPadFramework - Mike Horton - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{171, 465}, {137, 26}} - - NO - YES - 7 - NO - IBIPadFramework - Christian Antkow - - - - - {1, 1} - 1 - NO - 10 - 1 - - - - 292 - {{171, 576}, {137, 26}} - - NO - YES - 7 - NO - IBIPadFramework - Rafael Brown - - - - - {1, 1} - 1 - NO - 10 - 1 - - - - 292 - {{172, 683}, {137, 26}} - - NO - YES - 7 - NO - IBIPadFramework - Sean Palomino - - - - - {1, 1} - 1 - NO - 10 - 1 - - - - 292 - {{184, 169}, {111, 21}} - - NO - YES - 7 - NO - IBIPadFramework - Jeff Farrand - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{184, 198}, {111, 21}} - - NO - YES - 7 - NO - IBIPadFramework - Ryan Gerleve - - - - - {1, 1} - 1 - 10 - 1 - - - - 292 - {{184, 234}, {111, 21}} - - NO - YES - 7 - NO - IBIPadFramework - Greg Hodges - - - - - {1, 1} - 1 - 10 - 1 - - - {{442, 768}, {460, 1400}} - - - 3 - MCAwAA - - NO - - 3 - - IBIPadFramework - - - {1024, 768} - - - 3 - MAA - - - 3 - - IBIPadFramework - - - - - YES - - - view - - - - 6 - - - - creditsRoll - - - - 20 - - - - back: - - - 7 - - 21 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 9 - - - - - 10 - - - - - 11 - - - - - 8 - - - - - 12 - - - YES - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Credtis text roll - - - 40 - - - - - 13 - - - - - 39 - - - - - 38 - - - - - 37 - - - - - 36 - - - - - 35 - - - - - 34 - - - - - 33 - - - - - 32 - - - - - 31 - - - - - 30 - - - - - 29 - - - - - 28 - - - - - 27 - - - - - 26 - - - - - 25 - - - - - 24 - - - - - 23 - - - - - 22 - - - - - 19 - - - - - 18 - - - - - 17 - - - - - 16 - - - - - 15 - - - - - 14 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 10.CustomClassName - 10.IBPluginDependency - 10.IBViewBoundsToFrameTransform - 11.IBPluginDependency - 11.IBViewBoundsToFrameTransform - 12.IBEditorWindowLastContentRect - 12.IBPluginDependency - 12.IBViewBoundsToFrameTransform - 13.IBPluginDependency - 13.IBViewBoundsToFrameTransform - 14.IBPluginDependency - 14.IBViewBoundsToFrameTransform - 15.IBPluginDependency - 15.IBViewBoundsToFrameTransform - 16.IBPluginDependency - 16.IBViewBoundsToFrameTransform - 17.IBPluginDependency - 17.IBViewBoundsToFrameTransform - 18.IBPluginDependency - 18.IBViewBoundsToFrameTransform - 19.IBPluginDependency - 19.IBViewBoundsToFrameTransform - 22.IBPluginDependency - 22.IBViewBoundsToFrameTransform - 23.IBPluginDependency - 23.IBViewBoundsToFrameTransform - 24.IBPluginDependency - 24.IBViewBoundsToFrameTransform - 25.IBPluginDependency - 25.IBViewBoundsToFrameTransform - 26.IBPluginDependency - 26.IBViewBoundsToFrameTransform - 27.IBPluginDependency - 27.IBViewBoundsToFrameTransform - 28.IBPluginDependency - 28.IBViewBoundsToFrameTransform - 29.IBPluginDependency - 29.IBViewBoundsToFrameTransform - 30.IBPluginDependency - 30.IBViewBoundsToFrameTransform - 31.IBPluginDependency - 31.IBViewBoundsToFrameTransform - 32.IBPluginDependency - 32.IBViewBoundsToFrameTransform - 33.IBPluginDependency - 33.IBViewBoundsToFrameTransform - 34.IBPluginDependency - 34.IBViewBoundsToFrameTransform - 35.IBPluginDependency - 35.IBViewBoundsToFrameTransform - 36.IBPluginDependency - 36.IBViewBoundsToFrameTransform - 37.IBPluginDependency - 37.IBViewBoundsToFrameTransform - 38.IBPluginDependency - 38.IBViewBoundsToFrameTransform - 39.IBPluginDependency - 39.IBViewBoundsToFrameTransform - 40.IBPluginDependency - 40.IBViewBoundsToFrameTransform - 8.IBViewBoundsToFrameTransform - 9.IBPluginDependency - 9.IBViewBoundsToFrameTransform - - - YES - CreditsViewController - UIResponder - {{174, 377}, {1024, 768}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDkgAAw/aAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDkoAAxAHAAA - - {{387, 0}, {475, 1156}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAAAAAAAAxK7AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCkgAAxFPAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCqgAAwuwAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUKsAABCrgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUM4AABDDAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDQAAAw2QAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDQAAAw4CAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDQAAAw48AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUKsAABDkwAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUM5AABDyQAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUM5AABD14AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUKsAABD0oAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUMrAABEBEAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUKsAABEFQAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUMrAABEIAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCrgAAwz4AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUM7AABDTAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCrgAAw0UAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUKqAABEgAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCrgAAxATAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUM3AABEboAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCrgAAw8oAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUM3AABEhYAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUM3AABEiMAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUM3AABEmEAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDOQAAwyQAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUM3AABEmEAAA - - - P4AAAL+AAAAAAAAAw58AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUGwAABBoAAAA - - - - - YES - - - YES - - - - - YES - - - YES - - - - 40 - - - - YES - - CreditsViewController - UIViewController - - back: - id - - - back: - - back: - id - - - - creditsRoll - UIView - - - creditsRoll - - creditsRoll - UIView - - - - IBProjectSource - CreditsViewController.h - - - - UIFontLabel - UILabel - - IBProjectSource - UIFontLabel.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIButton - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UIButton.h - - - - UIControl - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIControl.h - - - - UIImageView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIImageView.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIPrintFormatter.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBIPadFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - ../wolf3d.xcodeproj - 3 - - YES - - YES - back_arrow.png - button_highlight.png - credits_bg.png - - - YES - {65, 63} - {4, 4} - {960, 640} - - - 141 - - + + + + + + + + + + + + Helvetica-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/Resources-iPad/EpisodeView~ipad.xib b/wolf3d/code/iphone/Resources-iPad/EpisodeView~ipad.xib index f192f9a..d03444e 100644 --- a/wolf3d/code/iphone/Resources-iPad/EpisodeView~ipad.xib +++ b/wolf3d/code/iphone/Resources-iPad/EpisodeView~ipad.xib @@ -1,938 +1,187 @@ - - - 1056 - 10K549 - 851 - 1038.36 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 141 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBIPadFramework - - - IBFirstResponder - IBIPadFramework - - - - 274 - - YES - - - 274 - {1024, 768} - - NO - YES - YES - IBIPadFramework - - NSImage - episode_bg.png - - - - - 274 - {{68, 87}, {63, 65}} - - 1 - NO - IBIPadFramework - - NSImage - back_arrow.png - - - - - 274 - {{66, 58}, {99, 43}} - - NO - YES - 7 - NO - IBIPadFramework - BACK - - POSITYPE-idSettler_v10.2 - 36 - 16 - - - 3 - MQA - - - 1 - 10 - 5 - - - - 274 - {{899, 87}, {63, 65}} - - 1 - NO - IBIPadFramework - - NSImage - next_arrow.png - - - - - 274 - {{897, 58}, {99, 43}} - - NO - YES - 7 - NO - IBIPadFramework - NEXT - - - - 1 - 10 - 5 - - - - 274 - {{191, 47}, {214, 57}} - - NO - YES - 7 - NO - IBIPadFramework - EPISODE - - POSITYPE-idSettler_v10.2 - 48 - 16 - - - - 1 - 10 - 5 - - - - 274 - {{205, 104}, {625, 577}} - - - 3 - MCAwAA - - YES - IBIPadFramework - YES - NO - 2 - 0 - YES - 189 - - - - 274 - {{63, 49}, {73, 105}} - - NO - NO - 1 - IBIPadFramework - 0 - 0 - - Helvetica-Bold - 15 - 16 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - NSImage - button_highlight.png - - - - - 274 - {{893, 50}, {73, 105}} - - NO - NO - 1 - IBIPadFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - 274 - {{478, 715}, {80, 36}} - - NO - NO - 1 - IBIPadFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - NSImage - down_arrow.png - - - - - 274 - {{478, 37}, {80, 36}} - - NO - NO - 1 - IBIPadFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - NSImage - up_arrow.png - - - - {1024, 768} - - - 1 - MCAwIDAAA - - - 3 - - IBIPadFramework - - - - - YES - - - view - - - - 13 - - - - back: - - - 7 - - 36 - - - - dataSource - - - - 51 - - - - delegate - - - - 52 - - - - episodeList - - - - 53 - - - - pageUp: - - - 7 - - 54 - - - - pageDown: - - - 7 - - 55 - - - - next: - - - 7 - - 58 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - - - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 28 - - - - - 31 - - - - - 32 - - - - - 33 - - - - - 35 - - - - - 48 - - - - - 49 - - - - - 50 - - - Episode List - - - 56 - - - - - 59 - - - - - 60 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 28.IBViewBoundsToFrameTransform - 31.CustomClassName - 31.IBPluginDependency - 31.IBViewBoundsToFrameTransform - 32.CustomClassName - 32.IBPluginDependency - 32.IBViewBoundsToFrameTransform - 33.IBPluginDependency - 33.IBViewBoundsToFrameTransform - 35.IBPluginDependency - 35.IBViewBoundsToFrameTransform - 48.IBPluginDependency - 48.IBViewBoundsToFrameTransform - 49.IBPluginDependency - 49.IBViewBoundsToFrameTransform - 50.IBPluginDependency - 50.IBViewBoundsToFrameTransform - 56.IBPluginDependency - 56.IBViewBoundsToFrameTransform - 59.IBPluginDependency - 59.IBViewBoundsToFrameTransform - 60.CustomClassName - 60.IBPluginDependency - 60.IBViewBoundsToFrameTransform - - - YES - EpisodeViewController - UIResponder - {{179, 382}, {1024, 768}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAAAAAAAAxD+AAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUKEAABCaAAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDtgAAw4QAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCaAAAw56AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUKIAABCrgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABD+wAAw7GAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABD+wAAw7GAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUNNAABC4AAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEX0AAw8eAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCkgAAwxYAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCjgAAwsYAAA - - - - - YES - - - YES - - - - - YES - - - YES - - - - 60 - - - - YES - - EpisodeViewController - UIViewController - - YES - - YES - back: - next: - pageDown: - pageUp: - setEpisode: - - - YES - id - id - id - id - id - - - - YES - - YES - back: - next: - pageDown: - pageUp: - setEpisode: - - - YES - - back: - id - - - next: - id - - - pageDown: - id - - - pageUp: - id - - - setEpisode: - id - - - - - YES - - YES - episodeCell - episodeList - - - YES - UITableViewCell - UITableView - - - - YES - - YES - episodeCell - episodeList - - - YES - - episodeCell - UITableViewCell - - - episodeList - UITableView - - - - - IBProjectSource - EpisodeViewController.h - - - - UIFontLabel - UILabel - - IBProjectSource - UIFontLabel.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIButton - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UIButton.h - - - - UIControl - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIControl.h - - - - UIImageView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIImageView.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UIScrollView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIScrollView.h - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UITableView - UIScrollView - - IBFrameworkSource - UIKit.framework/Headers/UITableView.h - - - - UITableViewCell - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITableViewCell.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIPrintFormatter.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBIPadFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - ../wolf3d.xcodeproj - 3 - - YES - - YES - back_arrow.png - button_highlight.png - down_arrow.png - episode_bg.png - next_arrow.png - up_arrow.png - - - YES - {65, 63} - {4, 4} - {80, 36} - {480, 320} - {65, 63} - {80, 36} - - - 141 - - + + + + + + + + + + + + Helvetica-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/Resources-iPad/LegalView~ipad.xib b/wolf3d/code/iphone/Resources-iPad/LegalView~ipad.xib index 6ffcd43..07b6dcd 100644 --- a/wolf3d/code/iphone/Resources-iPad/LegalView~ipad.xib +++ b/wolf3d/code/iphone/Resources-iPad/LegalView~ipad.xib @@ -1,639 +1,107 @@ - - - 1056 - 10K549 - 851 - 1038.36 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 141 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBIPadFramework - - - IBFirstResponder - IBIPadFramework - - - - 274 - - YES - - - 292 - {1024, 768} - - NO - IBIPadFramework - - NSImage - credits_bg.png - - - - - 292 - {{26, 45}, {63, 65}} - - 1 - NO - IBIPadFramework - - NSImage - back_arrow.png - - - - - 292 - {{22.5, 15.5}, {99, 43}} - - NO - YES - 7 - NO - IBIPadFramework - BACK - - POSITYPE-idSettler_v10.2 - 36 - 16 - - - 3 - MQA - - - 1 - 10 - 5 - - - - 301 - {{21, 10}, {75, 102}} - - NO - NO - 1 - IBIPadFramework - 0 - 0 - - Helvetica-Bold - 15 - 16 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - NSImage - button_highlight.png - - - - - 292 - {{396, -27}, {556, 510}} - - NO - YES - 7 - NO - IBIPadFramework - Wolfenstein® 3D Classic Platinum© 2009-2011 id Software LLC, a ZeniMax Media company. Wolfenstein, id, id Software, id Tech and related logos are registered trademarks or trademarks of id Software LLC in the U.S. and/or other countries. Bethesda, Bethesda Softworks, ZeniMax and related logos are registered trademarks or trademarks of ZeniMax Media Inc. in the U.S. and/or other countries. All Rights Reserved. - - POSITYPE-idSettler_v10.2 - 22 - 16 - - - 1 - MSAxIDEAA - - 1 - - - - - 1 - MCAwIDAAA - - 1 - 10 - 10 - 1 - 0 - - - - 292 - {{607, 44}, {134, 54}} - - NO - YES - 7 - NO - IBIPadFramework - Legal - - POSITYPE-idSettler_v10.2 - 44 - 16 - - - - - {2, 2} - 1 - 10 - 1 - - - {1024, 768} - - - 3 - MAA - - - 3 - - IBIPadFramework - - - - - YES - - - view - - - - 3 - - - - back: - - - 7 - - 12 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 7 - - - - - 10 - - - - - 11 - - - - - 9 - - - - - 17 - - - - - 4 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 10.IBPluginDependency - 10.IBViewBoundsToFrameTransform - 11.CustomClassName - 11.IBPluginDependency - 11.IBViewBoundsToFrameTransform - 17.IBPluginDependency - 17.IBViewBoundsToFrameTransform - 4.CustomClassName - 4.IBPluginDependency - 4.IBViewBoundsToFrameTransform - 7.IBPluginDependency - 7.IBViewBoundsToFrameTransform - 9.IBPluginDependency - 9.IBViewBoundsToFrameTransform - - - YES - LegalViewController - UIResponder - {{140, 350}, {1024, 768}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABBoAAAw5OAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABBoAAAw4cAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUPGAADBAAAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABD3oAAw8wAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAAAAAAAAxD+AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCGAAAxCBAAA - - - - - YES - - - YES - - - - - YES - - - YES - - - - 17 - - - - YES - - LegalViewController - UIViewController - - back: - id - - - back: - - back: - id - - - - IBProjectSource - LegalViewController.h - - - - UIFontLabel - UILabel - - IBProjectSource - UIFontLabel.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIButton - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UIButton.h - - - - UIControl - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIControl.h - - - - UIImageView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIImageView.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIPrintFormatter.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBIPadFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - ../wolf3d.xcodeproj - 3 - - YES - - YES - back_arrow.png - button_highlight.png - credits_bg.png - - - YES - {65, 63} - {4, 4} - {960, 640} - - - 141 - - + + + + + + + + + Helvetica-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/Resources-iPad/LevelSelectView~ipad.xib b/wolf3d/code/iphone/Resources-iPad/LevelSelectView~ipad.xib index 0d28b71..6734801 100644 --- a/wolf3d/code/iphone/Resources-iPad/LevelSelectView~ipad.xib +++ b/wolf3d/code/iphone/Resources-iPad/LevelSelectView~ipad.xib @@ -1,898 +1,191 @@ - - - 1056 - 10K540 - 851 - 1038.36 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 141 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBIPadFramework - - - IBFirstResponder - IBIPadFramework - - - - 274 - - YES - - - 256 - {1024, 768} - - NO - YES - YES - IBIPadFramework - - NSImage - episode_bg.png - - - - - 292 - {{61, 87}, {65, 63}} - - 1 - NO - IBIPadFramework - - NSImage - back_arrow.png - - - - - 292 - {{900, 87}, {65, 63}} - - 1 - NO - IBIPadFramework - - NSImage - next_arrow.png - - - - - 292 - {{60, 56}, {99, 43}} - - NO - YES - 7 - NO - IBIPadFramework - BACK - - POSITYPE-idSettler_v10.2 - 36 - 16 - - - 3 - MQA - - - 1 - 10 - 5 - - - - 292 - {{899, 56}, {93, 43}} - - NO - YES - 7 - NO - IBIPadFramework - PLAY - - - - 1 - 10 - 5 - - - - 292 - {{190, 48}, {186, 52}} - - NO - YES - 7 - NO - IBIPadFramework - MISSION - - POSITYPE-idSettler_v10.2 - 44 - 16 - - - - 1 - 10 - - - - 274 - {{204, 104}, {625, 593}} - - - 3 - MCAwAA - - YES - IBIPadFramework - YES - NO - 2 - 0 - YES - 50 - - - - 274 - {{472, 712}, {80, 36}} - - NO - NO - 1 - IBIPadFramework - 0 - 0 - - Helvetica-Bold - 15 - 16 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - NSImage - button_highlight.png - - - NSImage - down_arrow.png - - - - - 274 - {{472, 37}, {80, 36}} - - NO - NO - 1 - IBIPadFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - NSImage - up_arrow.png - - - - - 301 - {{896, 45}, {73, 105}} - - NO - NO - 1 - IBIPadFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - 301 - {{58, 46}, {75, 108}} - - - 3 - MC42NjY2NjY2NjY3IDAAA - - NO - NO - 1 - IBIPadFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - {1024, 768} - - - - 3 - - IBIPadFramework - - - - - YES - - - view - - - - 4 - - - - next: - - - 7 - - 24 - - - - back: - - - 7 - - 25 - - - - dataSource - - - - 35 - - - - delegate - - - - 36 - - - - missionList - - - - 37 - - - - pageDown: - - - 7 - - 56 - - - - pageUp: - - - 7 - - 57 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - - - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 13 - - - - - 14 - - - - - 15 - - - - - 16 - - - - - 21 - - - - - 23 - - - - - 34 - - - Mission List - - - 54 - - - - - 55 - - - - - 22 - - - - - 20 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 1.IBUserGuides - 14.CustomClassName - 14.IBPluginDependency - 14.IBViewBoundsToFrameTransform - 15.CustomClassName - 15.IBPluginDependency - 15.IBViewBoundsToFrameTransform - 16.CustomClassName - 16.IBPluginDependency - 16.IBViewBoundsToFrameTransform - 20.IBPluginDependency - 20.IBViewBoundsToFrameTransform - 21.IBPluginDependency - 21.IBViewBoundsToFrameTransform - 22.IBPluginDependency - 22.IBViewBoundsToFrameTransform - 23.IBPluginDependency - 23.IBViewBoundsToFrameTransform - 34.IBPluginDependency - 54.IBPluginDependency - 54.IBViewBoundsToFrameTransform - 55.IBPluginDependency - 55.IBViewBoundsToFrameTransform - - - YES - LevelSelectViewController - UIResponder - {{218, 349}, {1024, 768}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - YES - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABChgAAxCoAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDtgAAw4QAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEY4AAxCoAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEXMAAww0AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCiAAAxDbAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEYAAAw6AAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEY8AAxDbAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABD7AAAxAkAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABD7AAAw4IAAA - - - - - YES - - - YES - - - - - YES - - - YES - - - - 57 - - - - YES - - LevelSelectViewController - UIViewController - - YES - - YES - back: - next: - pageDown: - pageUp: - - - YES - id - id - id - id - - - - YES - - YES - back: - next: - pageDown: - pageUp: - - - YES - - back: - id - - - next: - id - - - pageDown: - id - - - pageUp: - id - - - - - missionList - UITableView - - - missionList - - missionList - UITableView - - - - IBProjectSource - LevelSelectViewController.h - - - - UIFontLabel - UILabel - - IBProjectSource - UIFontLabel.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIButton - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UIButton.h - - - - UIControl - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIControl.h - - - - UIImageView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIImageView.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UIScrollView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIScrollView.h - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UITableView - UIScrollView - - IBFrameworkSource - UIKit.framework/Headers/UITableView.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIPrintFormatter.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBIPadFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - ../wolf3d.xcodeproj - 3 - - YES - - YES - back_arrow.png - button_highlight.png - down_arrow.png - episode_bg.png - next_arrow.png - up_arrow.png - - - YES - {65, 63} - {4, 4} - {80, 36} - {480, 320} - {65, 63} - {80, 36} - - - 141 - - + + + + + + + + + + + + Helvetica-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/Resources-iPad/MainMenuView~ipad.xib b/wolf3d/code/iphone/Resources-iPad/MainMenuView~ipad.xib index 7954dad..867985f 100644 --- a/wolf3d/code/iphone/Resources-iPad/MainMenuView~ipad.xib +++ b/wolf3d/code/iphone/Resources-iPad/MainMenuView~ipad.xib @@ -1,1017 +1,305 @@ - - - 800 - 10K540 - 851 - 1038.36 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 141 - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - IBFilesOwner - IBIPadFramework - - - IBFirstResponder - IBIPadFramework - - - - 274 - - - - 274 - {1024, 768} - - - YES - YES - IBIPadFramework - - NSImage - main_bg.png - - - - - 319 - {{660, 610.5}, {239, 75}} - - NO - IBIPadFramework - 0 - 0 - - POSITYPE-idSettler_v10.2 - 64 - 16 - - {2, 2} - Resume - - 3 - MC4zMzMzMzMzMzMzAA - - - 3 - MQA - - - 1 - MCAwIDAAA - - - - - 319 - {{88, 269}, {322, 75}} - - - NO - IBIPadFramework - 0 - - {2, 2} - New Game - - - - - - - 319 - {{105, 383}, {232, 75}} - - - NO - IBIPadFramework - 0 - - {2, 2} - Settings - - - - - - - 319 - {{137, 499}, {168, 75}} - - - NO - IBIPadFramework - 0 - - {2, 2} - About - - - - - - - -2147483329 - {{105, 383}, {157, 75}} - - NO - IBIPadFramework - 0 - - {2, 2} - Legal - - - - - - - -2147483329 - {{88, 269}, {203, 75}} - - NO - IBIPadFramework - 0 - - {2, 2} - Credits - - - - - - - -2147483329 - {{168, 611}, {143, 75}} - - NO - IBIPadFramework - 0 - - {2, 2} - Back - - - - - - - 319 - {{168, 611}, {182, 75}} - - - NO - IBIPadFramework - 0 - - {2, 2} - Extras - - - - - - - -2147483329 - {{90, 269}, {275, 75}} - - NO - IBIPadFramework - 0 - - {2, 2} - id Games - - - - - - - -2147483329 - {{105, 383}, {321, 75}} - - NO - IBIPadFramework - 0 - - {2, 2} - id Software - - - - - - - -2147483329 - {{131, 499}, {157, 75}} - - NO - IBIPadFramework - 0 - - {2, 2} - Trivia - - - - - - - 274 - {{864, 619}, {41, 39}} - - YES - YES - IBIPadFramework - - NSImage - star_icon.png - - - - {1024, 768} - - - - 3 - MAA - - - 3 - - IBIPadFramework - - - - - - - view - - - - 3 - - - - resume: - - - 7 - - 9 - - - - newGame: - - - 7 - - 10 - - - - settings: - - - 7 - - 11 - - - - about: - - - 7 - - 12 - - - - extras: - - - 7 - - 13 - - - - legal: - - - 7 - - 34 - - - - aboutButton - - - - 35 - - - - extrasButton - - - - 37 - - - - legalButton - - - - 38 - - - - newGameButton - - - - 39 - - - - resumeButton - - - - 40 - - - - settingsButton - - - - 41 - - - - backButton - - - - 44 - - - - back: - - - 7 - - 45 - - - - creditsButton - - - - 50 - - - - idGamesButton - - - - 57 - - - - idSoftwareButton - - - - 58 - - - - triviaButton - - - - 59 - - - - idGames: - - - 7 - - 60 - - - - idSoftware: - - - 7 - - 61 - - - - trivia: - - - 7 - - 62 - - - - credits: - - - 7 - - 63 - - - - resumeStar - - - - 65 - - - - - - 0 - - - - - - 1 - - - - - - - - - - - - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - 5 - - - - - 6 - - - - - 7 - - - - - 8 - - - - - 16 - - - - - 32 - - - - - 42 - - - - - 47 - - - - - 54 - - - - - 55 - - - - - 56 - - - - - 64 - - - - - - - MainMenuViewController - UIResponder - {{138, 377}, {1024, 768}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUJAAABDEwAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUOTAABDYgAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDgYAAwxkAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCVAAAw0gAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCIAAAwwkAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABELEAAw8aAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEKIAAw8aAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEMkAAw8aAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUI8AABDEwAAA - - - AURWgABEGsAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUJYAABDQgAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUKSAABDbwAAA - - - - - - - 65 - - - - - MainMenuViewController - UIViewController - - id - id - id - id - id - id - id - id - id - id - id - id - - - - about: - id - - - back: - id - - - credits: - id - - - extras: - id - - - idGames: - id - - - idSoftware: - id - - - legal: - id - - - newGame: - id - - - oldNewGame: - id - - - resume: - id - - - settings: - id - - - trivia: - id - - - - UIButton - UIButton - UIButton - UIButton - UIButton - UIButton - UIButton - UIButton - UIButton - UIView - UIButton - UIButton - - - - aboutButton - UIButton - - - backButton - UIButton - - - creditsButton - UIButton - - - extrasButton - UIButton - - - idGamesButton - UIButton - - - idSoftwareButton - UIButton - - - legalButton - UIButton - - - newGameButton - UIButton - - - resumeButton - UIButton - - - resumeStar - UIView - - - settingsButton - UIButton - - - triviaButton - UIButton - - - - IBProjectSource - MainMenuViewController.h - - - - UIFontButton - UIButton - - IBProjectSource - UIFontButton.h - - - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIButton - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UIButton.h - - - - UIControl - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIControl.h - - - - UIImageView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIImageView.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIPrintFormatter.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBIPadFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - YES - ../wolf3d.xcodeproj - 3 - - {480, 320} - {41, 39} - - 141 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/Resources-iPad/SettingsView~ipad.xib b/wolf3d/code/iphone/Resources-iPad/SettingsView~ipad.xib index 3c21dbb..4d37024 100644 --- a/wolf3d/code/iphone/Resources-iPad/SettingsView~ipad.xib +++ b/wolf3d/code/iphone/Resources-iPad/SettingsView~ipad.xib @@ -1,1675 +1,433 @@ - - - 1056 - 10K549 - 851 - 1038.36 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 141 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBIPadFramework - - - IBFirstResponder - IBIPadFramework - - - - 1298 - - YES - - - 1316 - {1024, 768} - - - NO - 1 - IBIPadFramework - - NSImage - credits_bg.png - - - - - 1316 - {{413, 29}, {562, 192}} - - NO - 1 - IBIPadFramework - - NSImage - settings_line_art.png - - - - - 1316 - {{929, 692}, {65, 63}} - - 1 - NO - 1 - IBIPadFramework - - NSImage - next_arrow.png - - - - - 1316 - {{415.5, 692}, {65, 63}} - - NO - 1 - IBIPadFramework - - NSImage - adv_btn.png - - - - - 1316 - {{397, 668}, {597, 13}} - - NO - 1 - IBIPadFramework - - NSImage - settings_divider.png - - - - - 1316 - {{397, 311}, {597, 13}} - - NO - 1 - IBIPadFramework - - - - - 1316 - {{543, 375}, {307, 46}} - - - NO - YES - 7 - NO - 1 - IBIPadFramework - SENSITIVITY: - - POSITYPE-idSettler_v10.2 - 38 - 16 - - - 3 - MC42NjY2NjY2NjY3AA - - - 3 - MQA - - 1 - 10 - 2 - - - - 1316 - {{621, 264}, {160, 56}} - - - NO - YES - 7 - NO - 1 - IBIPadFramework - Preset - - POSITYPE-idSettler_v10.2 - 44 - 16 - - - - 1 - NO - 10 - - - - 1316 - {{406, 458}, {444, 46}} - - - NO - YES - 7 - NO - 1 - IBIPadFramework - TILT MOVE SPEED: - - - - 1 - 10 - 2 - - - - 1316 - {{409, 545}, {436, 47}} - - - NO - YES - 4 - NO - 1 - IBIPadFramework - TILT TURN SPEED: - - - - 1 - 10 - 2 - - - - 1316 - {{557, 632}, {288, 41}} - - - NO - YES - 7 - NO - 1 - IBIPadFramework - HUD ALPHA: - - - - 1 - 10 - 2 - - - - 1316 - {{422, 596}, {535, 23}} - - - NO - 1 - IBIPadFramework - 0 - 0 - 0.5 - - - - 1316 - {{422, 512}, {535, 23}} - - - NO - 1 - IBIPadFramework - 0 - 0 - 0.5 - 500 - 3000 - - - - 1316 - {{422, 422}, {535, 23}} - - - NO - 1 - IBIPadFramework - 0 - 0 - 0.5 - 5000 - 30000 - - - - 1316 - {{422, 332}, {535, 23}} - - - NO - 1 - IBIPadFramework - 0 - 0 - 0.5 - - - - 1316 - {{828, 727}, {93, 41}} - - - NO - YES - 7 - NO - 1 - IBIPadFramework - BACK - - POSITYPE-idSettler_v10.2 - 34 - 16 - - - - 1 - 10 - 2 - 5 - - - - 1316 - {{486, 727}, {152, 41}} - - NO - YES - 7 - NO - 1 - IBIPadFramework - Advanced - - - - 1 - 10 - 5 - - - - 1325 - {{828, 691}, {166, 66}} - - - NO - NO - 1 - 1 - IBIPadFramework - 0 - 0 - - Helvetica-Bold - 15 - 16 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - NSImage - button_highlight.png - - - - - 1325 - {{415, 689}, {223, 66}} - - NO - NO - 1 - 1 - IBIPadFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - 1316 - {{898, 97}, {66, 80}} - - NO - 1 - IBIPadFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - NSImage - right_chevron.png - - - - - 1316 - {{421, 97}, {66, 80}} - - NO - 1 - IBIPadFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - NSImage - left_chevron.png - - - - - 1316 - {{860, 371}, {123, 37}} - - NO - YES - 7 - NO - 1 - IBIPadFramework - 100% - - - - 1 - 10 - - - - 1316 - {{860, 456}, {123, 37}} - - NO - YES - 7 - NO - 1 - IBIPadFramework - 100% - - - - 1 - 10 - - - - 1316 - {{860, 542}, {123, 37}} - - NO - YES - 7 - NO - 1 - IBIPadFramework - 100% - - - - 1 - 10 - - - - 1316 - {{860, 628}, {123, 35}} - - NO - YES - 7 - NO - 1 - IBIPadFramework - 100% - - - - 1 - 10 - - - - 1316 - {{519, 19}, {348, 236}} - - 1 - NO - 1 - IBIPadFramework - - NSImage - iphone_preset_1.png - - - - - -2147482332 - {{519, 19}, {348, 236}} - - 2 - NO - 1 - IBIPadFramework - - NSImage - iphone_preset_2.png - - - - - -2147482332 - {{519, 19}, {348, 236}} - - 3 - NO - 1 - IBIPadFramework - - NSImage - iphone_preset_3.png - - - - - -2147482332 - {{519, 19}, {348, 236}} - - 4 - NO - 1 - IBIPadFramework - - NSImage - iphone_preset_4.png - - - - {1024, 768} - - - 1 - MCAwIDAAA - - - 3 - - 1 - IBIPadFramework - - - - - YES - - - view - - - - 22 - - - - SensitivityValChanged - - - 13 - - 23 - - - - TiltMoveSpeedValChanged - - - 13 - - 24 - - - - TiltTurnSpeedValChanged - - - 13 - - 25 - - - - HudAlphaValChanged - - - 13 - - 26 - - - - hudAlphaSlider - - - - 27 - - - - sensitivitySlider - - - - 28 - - - - tiltTurnSpeedSlider - - - - 30 - - - - tiltMoveSpeedSlider - - - - 31 - - - - back: - - - 7 - - 32 - - - - AdvancedPressed - - - 7 - - 64 - - - - hudAlphaLabel - - - - 72 - - - - sensitivityLabel - - - - 73 - - - - tiltMoveSpeedLabel - - - - 74 - - - - tiltTurnSpeedLabel - - - - 75 - - - - nextPreset - - - 7 - - 80 - - - - previousPreset - - - 7 - - 81 - - - - presetLabel - - - - 82 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - 5 - - - - - 6 - - - - - 7 - - - - - 8 - - - - - 9 - - - - - 10 - - - - - 11 - - - - - 12 - - - - - 13 - - - - - 14 - - - - - 15 - - - - - 46 - - - - - 57 - - - - - 58 - - - - - 60 - - - - - 62 - - - - - 65 - - - - - 66 - - - - - 67 - - - - - 68 - - - - - 69 - - - - - 70 - - - - - 71 - - - - - 76 - - - - - 77 - - - - - 78 - - - - - 79 - - - - - 83 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 10.CustomClassName - 10.IBPluginDependency - 10.IBViewBoundsToFrameTransform - 11.CustomClassName - 11.IBPluginDependency - 11.IBViewBoundsToFrameTransform - 12.IBPluginDependency - 12.IBViewBoundsToFrameTransform - 13.CustomClassName - 13.IBPluginDependency - 13.IBViewBoundsToFrameTransform - 14.IBPluginDependency - 14.IBViewBoundsToFrameTransform - 15.IBPluginDependency - 15.IBViewBoundsToFrameTransform - 4.IBPluginDependency - 4.IBViewBoundsToFrameTransform - 46.CustomClassName - 46.IBPluginDependency - 46.IBViewBoundsToFrameTransform - 5.IBPluginDependency - 5.IBViewBoundsToFrameTransform - 57.IBPluginDependency - 57.IBViewBoundsToFrameTransform - 58.IBPluginDependency - 58.IBViewBoundsToFrameTransform - 6.IBPluginDependency - 6.IBViewBoundsToFrameTransform - 60.IBPluginDependency - 60.IBViewBoundsToFrameTransform - 62.IBPluginDependency - 62.IBViewBoundsToFrameTransform - 65.IBPluginDependency - 65.IBViewBoundsToFrameTransform - 66.IBPluginDependency - 66.IBViewBoundsToFrameTransform - 67.IBPluginDependency - 67.IBViewBoundsToFrameTransform - 68.IBPluginDependency - 68.IBViewBoundsToFrameTransform - 69.IBPluginDependency - 69.IBViewBoundsToFrameTransform - 7.CustomClassName - 7.IBPluginDependency - 7.IBViewBoundsToFrameTransform - 70.IBPluginDependency - 70.IBViewBoundsToFrameTransform - 71.IBPluginDependency - 71.IBViewBoundsToFrameTransform - 76.IBPluginDependency - 76.IBViewBoundsToFrameTransform - 77.IBPluginDependency - 77.IBViewBoundsToFrameTransform - 78.IBPluginDependency - 78.IBViewBoundsToFrameTransform - 79.IBPluginDependency - 79.IBViewBoundsToFrameTransform - 8.CustomClassName - 8.IBPluginDependency - 8.IBViewBoundsToFrameTransform - 83.CustomClassName - 83.IBPluginDependency - 83.IBViewBoundsToFrameTransform - 9.CustomClassName - 9.IBPluginDependency - 9.IBViewBoundsToFrameTransform - - - YES - SettingsViewController - UIResponder - {{265, 386}, {1024, 768}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDzIAAxAzAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEC0AAxCNAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABENEAAxDxAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEWQAAxEEAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEDAAAxDrAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAAAAAAAAxD+AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEDIAAw+KAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEJ8AAw5YAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEDIAAw88AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDj4AAxDjAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEWwAAwzYAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEDIAAw7wAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDugAAw46AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDsIAAxDXAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDwAAAw/oAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDbwAAw6CAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDLAAAw0MAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEYsAAw9MAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEYsAAxAAAAA - - WolfSlider - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEDIAAw6qAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEYsAAxBEAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEVwAAxCHAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABA4AAAxBlAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABBmAAAxBSAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABBmAAAxBcAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDfAAAw1EAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEK0AAw9MAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEWkAAxD9AAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEE0AAxAAAAA - - - - - YES - - - YES - - - - - YES - - - YES - - - - 83 - - - - YES - - SettingsViewController - UIViewController - - YES - - YES - AdvancedPressed - ControlScheme1Pressed - ControlScheme2Pressed - ControlScheme3Pressed - ControlScheme4Pressed - HudAlphaValChanged - SensitivityValChanged - TiltMoveSpeedValChanged - TiltTurnSpeedValChanged - back: - nextPreset - previousPreset - - - YES - id - id - id - id - id - id - id - id - id - id - id - id - - - - YES - - YES - AdvancedPressed - ControlScheme1Pressed - ControlScheme2Pressed - ControlScheme3Pressed - ControlScheme4Pressed - HudAlphaValChanged - SensitivityValChanged - TiltMoveSpeedValChanged - TiltTurnSpeedValChanged - back: - nextPreset - previousPreset - - - YES - - AdvancedPressed - id - - - ControlScheme1Pressed - id - - - ControlScheme2Pressed - id - - - ControlScheme3Pressed - id - - - ControlScheme4Pressed - id - - - HudAlphaValChanged - id - - - SensitivityValChanged - id - - - TiltMoveSpeedValChanged - id - - - TiltTurnSpeedValChanged - id - - - back: - id - - - nextPreset - id - - - previousPreset - id - - - - - YES - - YES - controlScheme1Button - controlScheme2Button - controlScheme3Button - controlScheme4Button - hudAlphaLabel - hudAlphaSlider - presetLabel - sensitivityLabel - sensitivitySlider - tiltMoveSpeedLabel - tiltMoveSpeedSlider - tiltTurnSpeedLabel - tiltTurnSpeedSlider - - - YES - UIButton - UIButton - UIButton - UIButton - UILabel - UISlider - UILabel - UILabel - UISlider - UILabel - UISlider - UILabel - UISlider - - - - YES - - YES - controlScheme1Button - controlScheme2Button - controlScheme3Button - controlScheme4Button - hudAlphaLabel - hudAlphaSlider - presetLabel - sensitivityLabel - sensitivitySlider - tiltMoveSpeedLabel - tiltMoveSpeedSlider - tiltTurnSpeedLabel - tiltTurnSpeedSlider - - - YES - - controlScheme1Button - UIButton - - - controlScheme2Button - UIButton - - - controlScheme3Button - UIButton - - - controlScheme4Button - UIButton - - - hudAlphaLabel - UILabel - - - hudAlphaSlider - UISlider - - - presetLabel - UILabel - - - sensitivityLabel - UILabel - - - sensitivitySlider - UISlider - - - tiltMoveSpeedLabel - UILabel - - - tiltMoveSpeedSlider - UISlider - - - tiltTurnSpeedLabel - UILabel - - - tiltTurnSpeedSlider - UISlider - - - - - IBProjectSource - SettingsViewController.h - - - - UIFontLabel - UILabel - - IBProjectSource - UIFontLabel.h - - - - WolfSlider - UISlider - - IBProjectSource - WolfSlider.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIButton - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UIButton.h - - - - UIControl - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIControl.h - - - - UIImageView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIImageView.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UISlider - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UISlider.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIPrintFormatter.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBIPadFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - ../wolf3d.xcodeproj - 3 - - YES - - YES - adv_btn.png - button_highlight.png - credits_bg.png - iphone_preset_1.png - iphone_preset_2.png - iphone_preset_3.png - iphone_preset_4.png - left_chevron.png - next_arrow.png - right_chevron.png - settings_divider.png - settings_line_art.png - - - YES - {56, 55} - {4, 4} - {960, 640} - {306, 208} - {306, 208} - {306, 208} - {306, 208} - {66, 80} - {65, 63} - {66, 80} - {597, 13} - {562, 192} - - - 141 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/Resources-iPad/SkillView~ipad.xib b/wolf3d/code/iphone/Resources-iPad/SkillView~ipad.xib index be18a19..6cb2b0d 100644 --- a/wolf3d/code/iphone/Resources-iPad/SkillView~ipad.xib +++ b/wolf3d/code/iphone/Resources-iPad/SkillView~ipad.xib @@ -1,1250 +1,340 @@ - - - 1056 - 10K549 - 851 - 1038.36 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 141 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBIPadFramework - - - IBFirstResponder - IBIPadFramework - - - - 1298 - - YES - - - 1298 - {1024, 768} - - NO - YES - 2 - YES - 1 - IBIPadFramework - - NSImage - wolf_bg.png - - - - - 1316 - {{200, 70}, {623, 174}} - - NO - 1 - IBIPadFramework - - NSImage - highlight_bracket.png - - - - - 1316 - {{209, 80}, {606, 151}} - - 1 - NO - 1 - IBIPadFramework - - NSImage - episode_bracket.png - - - - - 1316 - {{209, 252.5}, {606, 151}} - - 2 - NO - 1 - IBIPadFramework - - - - - 1316 - {{208, 423.5}, {606, 151}} - - 3 - NO - 1 - IBIPadFramework - - - - - 1316 - {{208, 595.5}, {606, 151}} - - 4 - NO - 1 - IBIPadFramework - - - - - 1316 - {{207, 29}, {302, 52}} - - NO - YES - 7 - NO - 1 - IBIPadFramework - Difficulty Select - - POSITYPE-idSettler_v10.2 - 44 - 16 - - - 3 - MQA - - - 1 - 10 - - - - 1298 - {{68, 78}, {65, 63}} - - 1 - NO - 1 - IBIPadFramework - - NSImage - back_arrow.png - - - - - 1298 - {{67, 48}, {99, 43}} - - NO - YES - 7 - NO - 1 - IBIPadFramework - BACK - - POSITYPE-idSettler_v10.2 - 36 - 16 - - - - 1 - 10 - 5 - - - - 1316 - {{891, 78}, {65, 63}} - - 1 - NO - 1 - IBIPadFramework - - NSImage - next_arrow.png - - - - - 1316 - {{890, 47}, {97, 43}} - - NO - YES - 7 - NO - 1 - IBIPadFramework - NEXT - - - - 1 - 10 - 5 - - - - 1325 - {{882, 42}, {78, 101}} - - NO - NO - 1 - 1 - IBIPadFramework - 0 - 0 - - Helvetica-Bold - 15 - 16 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - NSImage - button_highlight.png - - - - - 1298 - {{62, 42}, {81, 99}} - - NO - NO - 1 - 1 - IBIPadFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - 1298 - {{316, 80}, {488, 151}} - - NO - NO - 1 - 1 - IBIPadFramework - 0 - - Helvetica-Bold - 48 - 16 - - Can I Play, Daddy? - - - - - - - 1298 - {{316, 253}, {498, 150}} - - NO - NO - 1 - 1 - IBIPadFramework - 0 - - Don't Hurt Me - - - - - - - 1298 - {{310, 424}, {504, 150}} - - NO - NO - 1 - 1 - IBIPadFramework - 0 - - Bring 'Em On! - - - - - - - 1298 - {{310, 596}, {504, 150}} - - NO - NO - 1 - 1 - IBIPadFramework - 3 - - 0 - I am Death Incarnate! - - - - - - - 1298 - {{229, 102}, {79, 107}} - - NO - NO - 1 - 1 - IBIPadFramework - 2 - - Helvetica-Bold - 24 - 16 - - NO - - - - - NSImage - difficulty_head1.png - - - - - 1298 - {{224.5, 274.5}, {79, 107}} - - NO - NO - 1 - 1 - IBIPadFramework - 2 - - NO - - - - - NSImage - difficulty_head2.png - - - - - 1298 - {{224.5, 446.5}, {79, 107}} - - NO - NO - 1 - 1 - IBIPadFramework - 2 - - NO - - - - - NSImage - difficulty_head3.png - - - - - 1298 - {{224, 618}, {79, 107}} - - NO - NO - 1 - 1 - IBIPadFramework - 2 - - NO - - - - - NSImage - difficulty_head4.png - - - - {1024, 768} - - - 3 - MQA - - 2 - - - - 3 - - 1 - IBIPadFramework - - - - - YES - - - view - - - - 3 - - - - back: - - - 7 - - 29 - - - - BringEmOn: - - - 7 - - 30 - - - - canIPlayDaddy: - - - 7 - - 31 - - - - dontHurtMe: - - - 7 - - 32 - - - - IAmDeathIncarnate: - - - 7 - - 33 - - - - next: - - - 7 - - 34 - - - - selectionFrame - - - - 37 - - - - canIPlayDaddy: - - - 7 - - 41 - - - - dontHurtMe: - - - 7 - - 44 - - - - BringEmOn: - - - 7 - - 47 - - - - IAmDeathIncarnate: - - - 7 - - 50 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - - - - - - - - - - - - - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - 5 - - - - - 6 - - - - - 9 - - - - - 10 - - - - - 8 - - - - - 7 - - - - - 11 - - - - - 12 - - - - - 13 - - - - - 14 - - - - - 15 - - - - - 21 - - - - - 22 - - - - - 23 - - - - - 24 - - - - - 35 - - - - - 40 - - - - - 42 - - - - - 45 - - - - - 48 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 10.CustomClassName - 10.IBPluginDependency - 10.IBViewBoundsToFrameTransform - 11.CustomClassName - 11.IBPluginDependency - 11.IBViewBoundsToFrameTransform - 12.IBPluginDependency - 12.IBViewBoundsToFrameTransform - 13.IBPluginDependency - 13.IBViewBoundsToFrameTransform - 14.IBPluginDependency - 14.IBViewBoundsToFrameTransform - 15.IBPluginDependency - 15.IBViewBoundsToFrameTransform - 21.CustomClassName - 21.IBPluginDependency - 21.IBViewBoundsToFrameTransform - 22.CustomClassName - 22.IBPluginDependency - 22.IBViewBoundsToFrameTransform - 23.CustomClassName - 23.IBPluginDependency - 23.IBViewBoundsToFrameTransform - 24.CustomClassName - 24.IBPluginDependency - 24.IBViewBoundsToFrameTransform - 35.IBPluginDependency - 35.IBViewBoundsToFrameTransform - 4.IBViewBoundsToFrameTransform - 40.IBPluginDependency - 40.IBViewBoundsToFrameTransform - 42.IBPluginDependency - 42.IBViewBoundsToFrameTransform - 45.IBPluginDependency - 45.IBViewBoundsToFrameTransform - 48.IBPluginDependency - 48.IBViewBoundsToFrameTransform - 5.CustomClassName - 5.IBPluginDependency - 5.IBViewBoundsToFrameTransform - 6.IBPluginDependency - 6.IBViewBoundsToFrameTransform - 7.IBPluginDependency - 7.IBViewBoundsToFrameTransform - 8.IBEditorWindowLastContentRect - 8.IBPluginDependency - 8.IBViewBoundsToFrameTransform - 9.IBPluginDependency - 9.IBViewBoundsToFrameTransform - - - YES - SkillViewController - UIResponder - {{141, 378}, {1024, 768}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABELEAAw/9AAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDdgAAwngAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDUQAAw9EAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDtQAAw/UAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDq4AAxDKAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDq4AAxFAAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDzQAAw56AAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUOeAABDfQAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUObAABD1AAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUObAABEFQAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDswAAw/2AAA - - - P4AAAL+AAAAAAAAAxD+AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDagAAwzUAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDKAAAw88AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDOAAAw/mAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDGAAAxBjAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDk4AAw/+AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDlAAAxAVAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABBoAAAxAVAAA - - {{323, 1045}, {52, 56}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEaYAAw/8AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABELIAAxAVAAA - - - - - YES - - - YES - - - - - YES - - - YES - - - - 50 - - - - YES - - SkillViewController - UIViewController - - YES - - YES - BringEmOn: - IAmDeathIncarnate: - back: - canIPlayDaddy: - dontHurtMe: - next: - - - YES - id - id - id - id - id - id - - - - YES - - YES - BringEmOn: - IAmDeathIncarnate: - back: - canIPlayDaddy: - dontHurtMe: - next: - - - YES - - BringEmOn: - id - - - IAmDeathIncarnate: - id - - - back: - id - - - canIPlayDaddy: - id - - - dontHurtMe: - id - - - next: - id - - - - - selectionFrame - UIView - - - selectionFrame - - selectionFrame - UIView - - - - IBProjectSource - SkillViewController.h - - - - UIFontButton - UIButton - - IBProjectSource - UIFontButton.h - - - - UIFontLabel - UILabel - - IBProjectSource - UIFontLabel.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIButton - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UIButton.h - - - - UIControl - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIControl.h - - - - UIImageView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIImageView.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIPrintFormatter.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBIPadFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - ../wolf3d.xcodeproj - 3 - - YES - - YES - back_arrow.png - button_highlight.png - difficulty_head1.png - difficulty_head2.png - difficulty_head3.png - difficulty_head4.png - episode_bracket.png - highlight_bracket.png - next_arrow.png - wolf_bg.png - - - YES - {65, 63} - {4, 4} - {64, 87} - {60, 82} - {60, 78} - {59, 79} - {606, 168} - {623, 189} - {65, 63} - {480, 320} - - - 141 - - + + + + + + + + + + + + Helvetica-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/Resources-iPad/TriviaView~ipad.xib b/wolf3d/code/iphone/Resources-iPad/TriviaView~ipad.xib index 2d8bfed..b8969e7 100644 --- a/wolf3d/code/iphone/Resources-iPad/TriviaView~ipad.xib +++ b/wolf3d/code/iphone/Resources-iPad/TriviaView~ipad.xib @@ -1,1323 +1,388 @@ - - - 1056 - 10K549 - 851 - 1038.36 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 141 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBIPadFramework - - - IBFirstResponder - IBIPadFramework - - - - 274 - - YES - - - 274 - {1024, 768} - - NO - IBIPadFramework - - NSImage - wolf_bg.png - - - - - 292 - {{435, 20}, {159, 77}} - - NO - YES - 7 - NO - IBIPadFramework - Trivia - - POSITYPE-idSettler_v10.2 - 48 - 16 - - - 3 - MQA - - - - 1 - MCAwIDAAA - - {2, 2} - 1 - 10 - 1 - - - - 274 - {{155, 140}, {713, 400}} - - NO - YES - 7 - 1 - NO - IBIPadFramework - ORIGINAL WOLF: The original release of Wolfenstein 3D only contained 3 Episodes. Episodes 4, 5, and 6 were sold separately as "The Nocturnal Missions", and were intended to act as a prequel to the original trilogy of Episodes. Subsequent releases of the game included all 6 Episodes together. - - Helvetica - 30 - 16 - - - - - {2, 2} - 0 - 10 - 11 - 1 - 0 - - - - -2147483374 - {{162, 140}, {700, 400}} - - NO - YES - 7 - 2 - NO - IBIPadFramework - BJ, THE MAN: William Joseph Blazkowicz was born August 15, 1911, to Polish immigrants. Blazkowicz was a top spy for the Allied Forces, eventually receiving the Congressional Medal of Honor. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483374 - {{162, 140}, {700, 400}} - - NO - YES - 7 - 3 - NO - IBIPadFramework - BOX ART: Ken Rieger was the talented illustrator who created the cover art for Spear of Destiny, Wolfenstein3D and Commander Keen. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483374 - {{162, 140}, {700, 400}} - - NO - YES - 7 - 4 - NO - IBIPadFramework - THE REAL SPEAR: The Spear of Destiny, also known as The Spear or The Holy Lance, is believed to have been the weapon used to pierce the side of Jesus Christ at the Crucifixion. The Spear soon became a symbol of God's favor and those who possessed it were believed to be invincible. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483374 - {{162, 140}, {700, 400}} - - NO - YES - 7 - 5 - NO - IBIPadFramework - THE SPEAR AND HITLER: Hitler is believed to have acquired the Spear at the beginning of WWII. Near the end of that war, it is rumored that General Patton discovered the Spear and that the downfall of Germany began that day. It is fabled that the U.S. was destined to succeed Germany as the New World Power once ownership of the Spear changed hands. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483374 - {{162, 140}, {700, 400}} - - NO - YES - 7 - 6 - NO - IBIPadFramework - DEATH DIMENSION: It is said that Hitler made a pact with the Angel of Death, promising the souls of his Nazi soldiers, to protect the Spear of Destiny. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483374 - {{162, 140}, {700, 400}} - - NO - YES - 7 - 7 - NO - IBIPadFramework - GOD MODE: In the game, if you can access god mode, BJ's eyes will glow with eerie golden light. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483374 - {{162, 140}, {700, 400}} - - NO - YES - 7 - 8 - NO - IBIPadFramework - A PRINCE: Robert Prince, wrote the music for Commander Keen, Wolfenstein 3-D, and Doom. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483374 - {{142, 140}, {740, 400}} - - NO - YES - 7 - 9 - NO - IBIPadFramework - DELAYED DEVELOPMENT: It is rumored that work on Spear of Destiny was hindered by the development team's time spent playing Fatal Fury (which Jay Wilbur called 'Fatal Productivity'), and Street Fighter II. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483374 - {{142, 140}, {740, 400}} - - NO - YES - 7 - 10 - NO - IBIPadFramework - A MATTER OF DEGREES: John Carmack is known for his innovations in 3D graphics and rocketry but what is less known is that this self-taught engineer has no degrees - he dropped out of school after one semester. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483374 - {{162, 140}, {700, 400}} - - NO - YES - 7 - 11 - NO - IBIPadFramework - THE CARMACK: John Carmack, one of the founders of id Software, preferred to work at a pizza joint and make games rather than go to college. His favorite programming food is pizza and diet coke. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483374 - {{142, 140}, {740, 400}} - - NO - YES - 7 - 12 - NO - IBIPadFramework - DREAMING IN DIGITAL: Doom was reported to cause gamers to dream in pixels and lower productivity. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483374 - {{212, 140}, {600, 400}} - - NO - YES - 7 - 13 - NO - IBIPadFramework - KEEPING IT IN THE FAMILY: BJ is Commander Keen's grandfather. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483374 - {{242, 140}, {540, 400}} - - NO - YES - 7 - 14 - NO - IBIPadFramework - WHAT'S IN A NAME: The original name for Doom was "It's Green and Pissed" - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483374 - {{192, 140}, {640, 400}} - - NO - YES - 9 - 15 - NO - IBIPadFramework - GIBS: Gibs, pronounced with a hard 'g', is sometimes confused as 'jibs' due to its pronunciation. The term came from the imagery of flying chicken giblets, or gibs for short. - - - - - {2, 2} - 1 - NO - 10 - 7 - 1 - 0 - - - - -2147483374 - {{155, 140}, {713, 400}} - - NO - YES - 7 - 16 - NO - IBIPadFramework - WOLFENSTEIN 3D: The game was originally designed to have more complex gameplay. Though dragging bodies, stealth kills and uniforms were already programmed, it was decided that they slowed down the pace of the game and were removed. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - 292 - {{34, 66}, {63, 65}} - - NO - IBIPadFramework - - NSImage - back_arrow.png - - - - - 292 - {{31.5, 33.5}, {99, 43}} - - NO - YES - 7 - NO - IBIPadFramework - BACK - - POSITYPE-idSettler_v10.2 - 36 - 16 - - - - 1 - 10 - 5 - - - - 319 - {{693, 510}, {99, 57}} - - NO - IBIPadFramework - 0 - 0 - - {2, 2} - Next - - 3 - MC4zMzMzMzMzMzMzAA - - - - - - - 319 - {{440, 510}, {187, 57}} - - NO - IBIPadFramework - 0 - 0 - - {2, 2} - Previous - - - - - - - 301 - {{31, 27}, {72, 107}} - - NO - NO - 1 - IBIPadFramework - 0 - 0 - - Helvetica-Bold - 15 - 16 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - NSImage - button_highlight.png - - - - {1024, 768} - - - 3 - MAA - - - 3 - - IBIPadFramework - - - - - YES - - - view - - - - 3 - - - - nextTrivia: - - - 7 - - 18 - - - - previousTrivia: - - - 7 - - 19 - - - - firstTrivia - - - - 24 - - - - lastTrivia - - - - 43 - - - - back: - - - 7 - - 47 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 5 - - - - - 16 - - - - - 17 - - - - - 20 - - - - - 26 - - - - - 27 - - - - - 28 - - - - - 29 - - - - - 30 - - - - - 31 - - - - - 32 - - - - - 33 - - - - - 34 - - - - - 35 - - - - - 36 - - - - - 37 - - - - - 38 - - - - - 39 - - - - - 40 - - - - - 44 - - - - - 45 - - - - - 46 - - - - - 48 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 16.CustomClassName - 16.IBPluginDependency - 16.IBViewBoundsToFrameTransform - 17.CustomClassName - 17.IBPluginDependency - 17.IBViewBoundsToFrameTransform - 20.IBPluginDependency - 20.IBViewBoundsToFrameTransform - 26.IBPluginDependency - 26.IBViewBoundsToFrameTransform - 27.IBPluginDependency - 27.IBViewBoundsToFrameTransform - 28.IBPluginDependency - 28.IBViewBoundsToFrameTransform - 29.IBPluginDependency - 29.IBViewBoundsToFrameTransform - 30.IBPluginDependency - 30.IBViewBoundsToFrameTransform - 31.IBPluginDependency - 31.IBViewBoundsToFrameTransform - 32.IBPluginDependency - 32.IBViewBoundsToFrameTransform - 33.IBPluginDependency - 33.IBViewBoundsToFrameTransform - 34.IBPluginDependency - 34.IBViewBoundsToFrameTransform - 35.IBPluginDependency - 35.IBViewBoundsToFrameTransform - 36.IBPluginDependency - 36.IBViewBoundsToFrameTransform - 37.IBPluginDependency - 37.IBViewBoundsToFrameTransform - 38.IBPluginDependency - 38.IBViewBoundsToFrameTransform - 39.IBPluginDependency - 39.IBViewBoundsToFrameTransform - 40.IBPluginDependency - 40.IBViewBoundsToFrameTransform - 44.CustomClassName - 44.IBPluginDependency - 44.IBViewBoundsToFrameTransform - 45.IBPluginDependency - 45.IBViewBoundsToFrameTransform - 46.IBPluginDependency - 46.IBViewBoundsToFrameTransform - 48.IBPluginDependency - 48.IBViewBoundsToFrameTransform - 5.CustomClassName - 5.IBPluginDependency - 5.IBViewBoundsToFrameTransform - - - YES - TriviaViewController - UIResponder - {{196, 385}, {1024, 768}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABEZMAAxDXAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABELYAAxDXAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUGgAABCaAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUHIAABCfAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUHwAABCiAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUHIAABCfAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUIMAABCkgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUIgAABCnAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUI0AABCpgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABBoAAAw2MAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUJIAABCsAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUI0AABCpgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUI0AABCpgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUI0AABCpgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUI0AABCpgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUI0AABCpgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUI0AABCpgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUI0AABCpgAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDkIAAw/cAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABB0AAAw9mAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUHQAABCNAAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUMtAABBoAAAA - - - - - YES - - - YES - - - - - YES - - - YES - - - - 48 - - - - YES - - TriviaViewController - UIViewController - - YES - - YES - back: - nextTrivia: - previousTrivia: - - - YES - id - id - id - - - - YES - - YES - back: - nextTrivia: - previousTrivia: - - - YES - - back: - id - - - nextTrivia: - id - - - previousTrivia: - id - - - - - YES - - YES - firstTrivia - lastTrivia - - - YES - UIView - UIView - - - - YES - - YES - firstTrivia - lastTrivia - - - YES - - firstTrivia - UIView - - - lastTrivia - UIView - - - - - IBProjectSource - TriviaViewController.h - - - - UIFontButton - UIButton - - IBProjectSource - UIFontButton.h - - - - UIFontLabel - UILabel - - IBProjectSource - UIFontLabel.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIButton - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UIButton.h - - - - UIControl - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIControl.h - - - - UIImageView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIImageView.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIPrintFormatter.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBIPadFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - ../wolf3d.xcodeproj - 3 - - YES - - YES - back_arrow.png - button_highlight.png - wolf_bg.png - - - YES - {65, 63} - {4, 4} - {480, 320} - - - 141 - - + + + + + + + + + Helvetica + Helvetica-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/Resources-tvOS/views/CreditsView-tvos.xib b/wolf3d/code/iphone/Resources-tvOS/views/CreditsView-tvos.xib new file mode 100644 index 0000000..f4d2387 --- /dev/null +++ b/wolf3d/code/iphone/Resources-tvOS/views/CreditsView-tvos.xib @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/Resources-tvOS/views/EpisodeCell-tvos.xib b/wolf3d/code/iphone/Resources-tvOS/views/EpisodeCell-tvos.xib new file mode 100644 index 0000000..e277ebe --- /dev/null +++ b/wolf3d/code/iphone/Resources-tvOS/views/EpisodeCell-tvos.xib @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/Resources-tvOS/views/EpisodeView-tvos.xib b/wolf3d/code/iphone/Resources-tvOS/views/EpisodeView-tvos.xib new file mode 100644 index 0000000..813b782 --- /dev/null +++ b/wolf3d/code/iphone/Resources-tvOS/views/EpisodeView-tvos.xib @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/Resources-tvOS/views/LegalView-tvos.xib b/wolf3d/code/iphone/Resources-tvOS/views/LegalView-tvos.xib new file mode 100644 index 0000000..e432a86 --- /dev/null +++ b/wolf3d/code/iphone/Resources-tvOS/views/LegalView-tvos.xib @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/Resources-tvOS/views/LevelSelectView-tvos.xib b/wolf3d/code/iphone/Resources-tvOS/views/LevelSelectView-tvos.xib new file mode 100644 index 0000000..ff848d1 --- /dev/null +++ b/wolf3d/code/iphone/Resources-tvOS/views/LevelSelectView-tvos.xib @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/Resources-tvOS/views/MainMenuView-tvos.xib b/wolf3d/code/iphone/Resources-tvOS/views/MainMenuView-tvos.xib new file mode 100644 index 0000000..a054b9e --- /dev/null +++ b/wolf3d/code/iphone/Resources-tvOS/views/MainMenuView-tvos.xib @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/Resources-tvOS/views/SkillView-tvos.xib b/wolf3d/code/iphone/Resources-tvOS/views/SkillView-tvos.xib new file mode 100644 index 0000000..aad930c --- /dev/null +++ b/wolf3d/code/iphone/Resources-tvOS/views/SkillView-tvos.xib @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/Resources-tvOS/views/TriviaView-tvos.xib b/wolf3d/code/iphone/Resources-tvOS/views/TriviaView-tvos.xib new file mode 100644 index 0000000..a444baf --- /dev/null +++ b/wolf3d/code/iphone/Resources-tvOS/views/TriviaView-tvos.xib @@ -0,0 +1,348 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/SettingsView.xib b/wolf3d/code/iphone/SettingsView.xib index f3579d9..c1508dc 100644 --- a/wolf3d/code/iphone/SettingsView.xib +++ b/wolf3d/code/iphone/SettingsView.xib @@ -1,1684 +1,433 @@ - - - 1056 - 10K549 - 851 - 1038.36 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 141 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 1298 - - YES - - - 1316 - {480, 320} - - - NO - 2 - IBCocoaTouchFramework - - NSImage - credits_bg.png - - - - - 1316 - {{172.5, 5}, {281, 96}} - - NO - 2 - IBCocoaTouchFramework - - NSImage - settings_line_art.png - - - - - 1316 - {{431.5, 281}, {31, 32}} - - - 1 - NO - 2 - IBCocoaTouchFramework - - NSImage - next_arrow.png - - - - - 1316 - {{158.5, 281}, {31, 32}} - - NO - 2 - IBCocoaTouchFramework - - NSImage - adv_btn.png - - - - - 1316 - {{165, 270}, {298, 6}} - - NO - 2 - IBCocoaTouchFramework - - NSImage - settings_divider.png - - - - - 1316 - {{166.5, 107.5}, {298, 6}} - - NO - 2 - IBCocoaTouchFramework - - - - - 1316 - {{213, 134}, {192, 30}} - - - NO - YES - 7 - NO - 2 - IBCocoaTouchFramework - SENSITIVITY: - - POSITYPE-idSettler_v10.2 - 17 - 16 - - - 3 - MC42NjY2NjY2NjY3AA - - - 3 - MQA - - 1 - 10 - 2 - - - - 1316 - {{274, 83}, {79, 33}} - - - NO - YES - 7 - NO - 2 - IBCocoaTouchFramework - Preset - - POSITYPE-idSettler_v10.2 - 22 - 16 - - - - 1 - 10 - - - - 1316 - {{213, 171}, {192, 30}} - - - NO - YES - 7 - NO - 2 - IBCocoaTouchFramework - TILT MOVE SPEED: - - - - 1 - 10 - 2 - - - - 1316 - {{210, 210}, {195, 30}} - - - NO - YES - 4 - NO - 2 - IBCocoaTouchFramework - TILT TURN SPEED: - - - - 1 - 10 - 2 - - - - 1316 - {{210, 248}, {195, 30}} - - - NO - YES - 7 - NO - 2 - IBCocoaTouchFramework - HUD ALPHA: - - - - 1 - 10 - 2 - - - - 1316 - {{177, 229}, {274, 23}} - - - NO - 2 - IBCocoaTouchFramework - 0 - 0 - 0.5 - - - - 1316 - {{177, 190}, {274, 23}} - - - NO - 2 - IBCocoaTouchFramework - 0 - 0 - 0.5 - 500 - 3000 - - - - 1316 - {{177, 152}, {274, 23}} - - - NO - 2 - IBCocoaTouchFramework - 0 - 0 - 0.5 - 5000 - 30000 - - - - 1316 - {{177, 117}, {274, 23}} - - - NO - 2 - IBCocoaTouchFramework - 0 - 0 - 0.5 - - - - 1316 - {{375, 295}, {53, 29}} - - - NO - YES - 7 - NO - 2 - IBCocoaTouchFramework - BACK - - POSITYPE-idSettler_v10.2 - 18 - 16 - - - - 1 - 10 - 2 - 5 - - - - 1316 - {{194, 302}, {84, 19}} - - NO - 2 - IBCocoaTouchFramework - 2 - - Advanced - - - - 3 - MC41AA - - - - - 1325 - {{375, 278}, {91, 40}} - - - NO - NO - 1 - 2 - IBCocoaTouchFramework - 0 - 0 - - Helvetica-Bold - 15 - 16 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - NSImage - button_highlight.png - - - - - 1325 - {{157, 279}, {117, 40}} - - NO - NO - 1 - 2 - IBCocoaTouchFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - 1316 - {{385, 21}, {40, 49}} - - NO - 2 - IBCocoaTouchFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - NSImage - right_chevron.png - - - - - 1316 - {{196, 21}, {40, 49}} - - NO - 2 - IBCocoaTouchFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - NSImage - left_chevron.png - - - - - 1316 - {{406, 135}, {42, 21}} - - NO - YES - 7 - NO - 2 - IBCocoaTouchFramework - 100% - - - - 1 - 10 - - - - 1316 - {{406.5, 171.5}, {42, 21}} - - NO - YES - 7 - NO - 2 - IBCocoaTouchFramework - 100% - - - - 1 - 10 - - - - 1316 - {{406, 211}, {42, 21}} - - NO - YES - 7 - NO - 2 - IBCocoaTouchFramework - 100% - - - - 1 - 10 - - - - 1316 - {{406.5, 248.5}, {42, 21}} - - NO - YES - 7 - NO - 2 - IBCocoaTouchFramework - 100% - - - - 1 - 10 - - - - 1316 - {{252, 3.5}, {118, 79}} - - 1 - NO - 2 - IBCocoaTouchFramework - - NSImage - iphone_preset_1.png - - - - - -2147482332 - {{252, 3.5}, {118, 79}} - - 2 - NO - 2 - IBCocoaTouchFramework - - NSImage - iphone_preset_2.png - - - - - -2147482332 - {{252, 3.5}, {118, 79}} - - 3 - NO - 2 - IBCocoaTouchFramework - - NSImage - iphone_preset_3.png - - - - - -2147482332 - {{252, 3.5}, {118, 79}} - - 4 - NO - 2 - IBCocoaTouchFramework - - NSImage - iphone_preset_4.png - - - - {480, 320} - - - 1 - MCAwIDAAA - - - 3 - - 2 - IBCocoaTouchFramework - - - - - YES - - - view - - - - 22 - - - - SensitivityValChanged - - - 13 - - 23 - - - - TiltMoveSpeedValChanged - - - 13 - - 24 - - - - TiltTurnSpeedValChanged - - - 13 - - 25 - - - - HudAlphaValChanged - - - 13 - - 26 - - - - hudAlphaSlider - - - - 27 - - - - sensitivitySlider - - - - 28 - - - - tiltTurnSpeedSlider - - - - 30 - - - - tiltMoveSpeedSlider - - - - 31 - - - - back: - - - 7 - - 32 - - - - AdvancedPressed - - - 7 - - 47 - - - - AdvancedPressed - - - 7 - - 64 - - - - hudAlphaLabel - - - - 72 - - - - sensitivityLabel - - - - 73 - - - - tiltMoveSpeedLabel - - - - 74 - - - - tiltTurnSpeedLabel - - - - 75 - - - - nextPreset - - - 7 - - 80 - - - - previousPreset - - - 7 - - 81 - - - - presetLabel - - - - 82 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - 5 - - - - - 6 - - - - - 7 - - - - - 8 - - - - - 9 - - - - - 10 - - - - - 11 - - - - - 12 - - - - - 13 - - - - - 14 - - - - - 15 - - - - - 45 - - - - - 46 - - - - - 57 - - - - - 58 - - - - - 60 - - - - - 62 - - - - - 65 - - - - - 66 - - - - - 67 - - - - - 68 - - - - - 69 - - - - - 70 - - - - - 71 - - - - - 76 - - - - - 77 - - - - - 78 - - - - - 79 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 10.CustomClassName - 10.IBPluginDependency - 10.IBViewBoundsToFrameTransform - 11.CustomClassName - 11.IBPluginDependency - 11.IBViewBoundsToFrameTransform - 12.IBPluginDependency - 12.IBViewBoundsToFrameTransform - 13.CustomClassName - 13.IBPluginDependency - 13.IBViewBoundsToFrameTransform - 14.IBPluginDependency - 14.IBViewBoundsToFrameTransform - 15.IBPluginDependency - 15.IBViewBoundsToFrameTransform - 4.IBPluginDependency - 4.IBViewBoundsToFrameTransform - 45.CustomClassName - 45.IBPluginDependency - 45.IBViewBoundsToFrameTransform - 46.CustomClassName - 46.IBPluginDependency - 46.IBViewBoundsToFrameTransform - 5.IBPluginDependency - 5.IBViewBoundsToFrameTransform - 57.IBPluginDependency - 57.IBViewBoundsToFrameTransform - 58.IBPluginDependency - 58.IBViewBoundsToFrameTransform - 6.IBPluginDependency - 6.IBViewBoundsToFrameTransform - 60.IBPluginDependency - 60.IBViewBoundsToFrameTransform - 62.IBPluginDependency - 62.IBViewBoundsToFrameTransform - 65.IBPluginDependency - 65.IBViewBoundsToFrameTransform - 66.IBPluginDependency - 66.IBViewBoundsToFrameTransform - 67.IBPluginDependency - 67.IBViewBoundsToFrameTransform - 68.IBPluginDependency - 68.IBViewBoundsToFrameTransform - 69.IBPluginDependency - 69.IBViewBoundsToFrameTransform - 7.CustomClassName - 7.IBPluginDependency - 7.IBViewBoundsToFrameTransform - 70.IBPluginDependency - 70.IBViewBoundsToFrameTransform - 71.IBPluginDependency - 76.IBPluginDependency - 76.IBViewBoundsToFrameTransform - 77.IBPluginDependency - 77.IBViewBoundsToFrameTransform - 78.IBPluginDependency - 78.IBViewBoundsToFrameTransform - 79.IBPluginDependency - 79.IBViewBoundsToFrameTransform - 8.CustomClassName - 8.IBPluginDependency - 8.IBViewBoundsToFrameTransform - 9.CustomClassName - 9.IBPluginDependency - 9.IBViewBoundsToFrameTransform - - - YES - SettingsViewController - UIResponder - {{313, 508}, {960, 640}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDRwAAw2uAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDRwAAw4nAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDvQAAw56AAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABD1wAAw40AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABBYAAAw5gAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAAAAAAAAw58AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDZwAAw3oAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUNCAABDlgAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDegAAwtIAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDZwAAw1cAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCQAAAw5gAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDtoAAwnwAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDLwAAw1sAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDQoAAwn4AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABAoAAAw56AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUMlAABDhwAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABC+QAAwnIAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABBoAAAw2EAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUPSgABDDAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUPSwABDMIAAA - - WolfSlider - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDZwAAwxQAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUPSgABDWAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUN8AABAYAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUGgAABBUAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUGgAABC1gAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABBoAAAw4qAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDSgAAwxcAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDSgAAwz+AAA - - - - - YES - - - YES - - - - - YES - - - YES - - - - 82 - - - - YES - - SettingsViewController - UIViewController - - YES - - YES - AdvancedPressed - ControlScheme1Pressed - ControlScheme2Pressed - ControlScheme3Pressed - ControlScheme4Pressed - HudAlphaValChanged - SensitivityValChanged - TiltMoveSpeedValChanged - TiltTurnSpeedValChanged - back: - nextPreset - previousPreset - - - YES - id - id - id - id - id - id - id - id - id - id - id - id - - - - YES - - YES - AdvancedPressed - ControlScheme1Pressed - ControlScheme2Pressed - ControlScheme3Pressed - ControlScheme4Pressed - HudAlphaValChanged - SensitivityValChanged - TiltMoveSpeedValChanged - TiltTurnSpeedValChanged - back: - nextPreset - previousPreset - - - YES - - AdvancedPressed - id - - - ControlScheme1Pressed - id - - - ControlScheme2Pressed - id - - - ControlScheme3Pressed - id - - - ControlScheme4Pressed - id - - - HudAlphaValChanged - id - - - SensitivityValChanged - id - - - TiltMoveSpeedValChanged - id - - - TiltTurnSpeedValChanged - id - - - back: - id - - - nextPreset - id - - - previousPreset - id - - - - - YES - - YES - controlScheme1Button - controlScheme2Button - controlScheme3Button - controlScheme4Button - hudAlphaLabel - hudAlphaSlider - presetLabel - sensitivityLabel - sensitivitySlider - tiltMoveSpeedLabel - tiltMoveSpeedSlider - tiltTurnSpeedLabel - tiltTurnSpeedSlider - - - YES - UIButton - UIButton - UIButton - UIButton - UILabel - UISlider - UILabel - UILabel - UISlider - UILabel - UISlider - UILabel - UISlider - - - - YES - - YES - controlScheme1Button - controlScheme2Button - controlScheme3Button - controlScheme4Button - hudAlphaLabel - hudAlphaSlider - presetLabel - sensitivityLabel - sensitivitySlider - tiltMoveSpeedLabel - tiltMoveSpeedSlider - tiltTurnSpeedLabel - tiltTurnSpeedSlider - - - YES - - controlScheme1Button - UIButton - - - controlScheme2Button - UIButton - - - controlScheme3Button - UIButton - - - controlScheme4Button - UIButton - - - hudAlphaLabel - UILabel - - - hudAlphaSlider - UISlider - - - presetLabel - UILabel - - - sensitivityLabel - UILabel - - - sensitivitySlider - UISlider - - - tiltMoveSpeedLabel - UILabel - - - tiltMoveSpeedSlider - UISlider - - - tiltTurnSpeedLabel - UILabel - - - tiltTurnSpeedSlider - UISlider - - - - - IBProjectSource - SettingsViewController.h - - - - UIFontButton - UIButton - - IBProjectSource - UIFontButton.h - - - - UIFontLabel - UILabel - - IBProjectSource - UIFontLabel.h - - - - WolfSlider - UISlider - - IBProjectSource - WolfSlider.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIButton - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UIButton.h - - - - UIControl - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIControl.h - - - - UIImageView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIImageView.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UISlider - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UISlider.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIPrintFormatter.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - wolf3d.xcodeproj - 3 - - YES - - YES - adv_btn.png - button_highlight.png - credits_bg.png - iphone_preset_1.png - iphone_preset_2.png - iphone_preset_3.png - iphone_preset_4.png - left_chevron.png - next_arrow.png - right_chevron.png - settings_divider.png - settings_line_art.png - - - YES - {56, 55} - {4, 4} - {960, 640} - {306, 208} - {306, 208} - {306, 208} - {306, 208} - {66, 80} - {65, 63} - {66, 80} - {597, 13} - {562, 192} - - - 141 - - + + + + + + + + + + + + Helvetica-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/SettingsViewController.h b/wolf3d/code/iphone/SettingsViewController.h index be9f6fa..d0117af 100644 --- a/wolf3d/code/iphone/SettingsViewController.h +++ b/wolf3d/code/iphone/SettingsViewController.h @@ -26,10 +26,12 @@ @interface SettingsViewController : UIViewController { +#if !TARGET_OS_TV IBOutlet UISlider * sensitivitySlider; IBOutlet UISlider * tiltMoveSpeedSlider; IBOutlet UISlider * tiltTurnSpeedSlider; IBOutlet UISlider * hudAlphaSlider; +#endif IBOutlet UILabel * sensitivityLabel; IBOutlet UILabel * tiltMoveSpeedLabel; diff --git a/wolf3d/code/iphone/SettingsViewController.m b/wolf3d/code/iphone/SettingsViewController.m index 945ae00..b30b3bf 100644 --- a/wolf3d/code/iphone/SettingsViewController.m +++ b/wolf3d/code/iphone/SettingsViewController.m @@ -125,36 +125,24 @@ - (void) LoadSettings { [self setPresetVisibility]; } -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - return UIInterfaceOrientationIsLandscape(interfaceOrientation); -} - - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc. that aren't in use. + self.sensitivitySlider = nil; + self.tiltTurnSpeedSlider = nil; + self.tiltMoveSpeedSlider = nil; + self.hudAlphaSlider = nil; + + self.sensitivityLabel = nil; + self.tiltTurnSpeedLabel = nil; + self.tiltMoveSpeedLabel = nil; + self.hudAlphaSlider = nil; + + self.presetLabel = nil; } -- (void)viewDidUnload { - [super viewDidUnload]; - // Release any retained subviews of the main view. - // e.g. self.myOutlet = nil; - - self.sensitivitySlider = nil; - self.tiltTurnSpeedSlider = nil; - self.tiltMoveSpeedSlider = nil; - self.hudAlphaSlider = nil; - - self.sensitivityLabel = nil; - self.tiltTurnSpeedLabel = nil; - self.tiltMoveSpeedLabel = nil; - self.hudAlphaSlider = nil; - - self.presetLabel = nil; -} - - - (void)dealloc { [super dealloc]; } diff --git a/wolf3d/code/iphone/SkillView.xib b/wolf3d/code/iphone/SkillView.xib index 933bc45..90d9a12 100644 --- a/wolf3d/code/iphone/SkillView.xib +++ b/wolf3d/code/iphone/SkillView.xib @@ -1,1250 +1,339 @@ - - - 1056 - 10K549 - 851 - 1038.36 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 141 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 1298 - - YES - - - 1298 - {480, 320} - - NO - YES - 1 - YES - 2 - IBCocoaTouchFramework - - NSImage - wolf_bg.png - - - - - 1316 - {{86, 96}, {308, 73}} - - NO - 2 - IBCocoaTouchFramework - - NSImage - highlight_bracket.png - - - - - 1316 - {{90, 28}, {300, 65}} - - 1 - NO - 2 - IBCocoaTouchFramework - - NSImage - episode_bracket.png - - - - - 1316 - {{90, 100}, {300, 65}} - - 2 - NO - 2 - IBCocoaTouchFramework - - - - - 1316 - {{90, 173}, {300, 65}} - - 3 - NO - 2 - IBCocoaTouchFramework - - - - - 1316 - {{90, 246}, {300, 65}} - - 4 - NO - 2 - IBCocoaTouchFramework - - - - - 1316 - {{90, 1}, {169, 29}} - - NO - YES - 7 - NO - 2 - IBCocoaTouchFramework - Difficulty Select - - POSITYPE-idSettler_v10.2 - 24 - 16 - - - 3 - MQA - - - 1 - 10 - - - - 1298 - {{24, 279}, {32, 32}} - - 1 - NO - 2 - IBCocoaTouchFramework - - NSImage - back_arrow.png - - - - - 1298 - {{23, 260}, {66, 29}} - - NO - YES - 7 - NO - 2 - IBCocoaTouchFramework - BACK - - POSITYPE-idSettler_v10.2 - 18 - 16 - - - - 1 - 10 - 5 - - - - 1316 - {{418, 279}, {32, 32}} - - 1 - NO - 2 - IBCocoaTouchFramework - - NSImage - next_arrow.png - - - - - 1316 - {{417, 259.5}, {66, 29}} - - NO - YES - 7 - NO - 2 - IBCocoaTouchFramework - NEXT - - - - 1 - 10 - 5 - - - - 1325 - {{409, 257}, {52, 56}} - - NO - NO - 1 - 2 - IBCocoaTouchFramework - 0 - 0 - - Helvetica-Bold - 15 - 16 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - NSImage - button_highlight.png - - - - - 1298 - {{17, 259}, {53, 54}} - - NO - NO - 1 - 2 - IBCocoaTouchFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - 1298 - {{138, 31}, {249, 64}} - - NO - NO - 1 - 2 - IBCocoaTouchFramework - 2 - - Helvetica-Bold - 32 - 16 - - Can I Play, Daddy? - - - - - - - 1298 - {{100, 38}, {32, 45}} - - NO - NO - 1 - 2 - IBCocoaTouchFramework - 2 - - Helvetica-Bold - 24 - 16 - - NO - - - - - NSImage - difficulty_head1.png - - - - - 1298 - {{100, 109.5}, {32, 45}} - - NO - NO - 1 - 2 - IBCocoaTouchFramework - 2 - - NO - - - - - NSImage - difficulty_head2.png - - - - - 1298 - {{100, 182}, {32, 45}} - - NO - NO - 1 - 2 - IBCocoaTouchFramework - 2 - - NO - - - - - NSImage - difficulty_head3.png - - - - - 1298 - {{100, 255.5}, {32, 45}} - - NO - NO - 1 - 2 - IBCocoaTouchFramework - 2 - - NO - - - - - NSImage - difficulty_head4.png - - - - - 1298 - {{138, 103}, {249, 64}} - - NO - NO - 1 - 2 - IBCocoaTouchFramework - 2 - - Don't Hurt Me - - - - - - - 1298 - {{138, 175}, {249, 63}} - - NO - NO - 1 - 2 - IBCocoaTouchFramework - 2 - - Bring 'Em On! - - - - - - - 1298 - {{138, 248}, {249, 63}} - - NO - NO - 1 - 2 - IBCocoaTouchFramework - 2 - - 0 - I am Death Incarnate! - - - - - - {480, 320} - - - 3 - MQA - - 2 - - - - 3 - - 2 - IBCocoaTouchFramework - - - - - YES - - - view - - - - 3 - - - - back: - - - 7 - - 29 - - - - BringEmOn: - - - 7 - - 30 - - - - canIPlayDaddy: - - - 7 - - 31 - - - - dontHurtMe: - - - 7 - - 32 - - - - IAmDeathIncarnate: - - - 7 - - 33 - - - - next: - - - 7 - - 34 - - - - selectionFrame - - - - 37 - - - - canIPlayDaddy: - - - 7 - - 41 - - - - dontHurtMe: - - - 7 - - 44 - - - - BringEmOn: - - - 7 - - 47 - - - - IAmDeathIncarnate: - - - 7 - - 50 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - - - - - - - - - - - - - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - 5 - - - - - 6 - - - - - 9 - - - - - 10 - - - - - 8 - - - - - 7 - - - - - 11 - - - - - 12 - - - - - 13 - - - - - 14 - - - - - 15 - - - - - 21 - - - - - 22 - - - - - 23 - - - - - 24 - - - - - 35 - - - - - 40 - - - - - 42 - - - - - 45 - - - - - 48 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 10.CustomClassName - 10.IBPluginDependency - 10.IBViewBoundsToFrameTransform - 11.CustomClassName - 11.IBPluginDependency - 11.IBViewBoundsToFrameTransform - 12.IBPluginDependency - 12.IBViewBoundsToFrameTransform - 13.IBPluginDependency - 13.IBViewBoundsToFrameTransform - 14.IBPluginDependency - 14.IBViewBoundsToFrameTransform - 15.IBPluginDependency - 15.IBViewBoundsToFrameTransform - 21.CustomClassName - 21.IBPluginDependency - 21.IBViewBoundsToFrameTransform - 22.CustomClassName - 22.IBPluginDependency - 22.IBViewBoundsToFrameTransform - 23.CustomClassName - 23.IBPluginDependency - 23.IBViewBoundsToFrameTransform - 24.CustomClassName - 24.IBPluginDependency - 24.IBViewBoundsToFrameTransform - 35.IBPluginDependency - 35.IBViewBoundsToFrameTransform - 4.IBViewBoundsToFrameTransform - 40.IBPluginDependency - 40.IBViewBoundsToFrameTransform - 42.IBPluginDependency - 42.IBViewBoundsToFrameTransform - 45.IBPluginDependency - 45.IBViewBoundsToFrameTransform - 48.IBPluginDependency - 48.IBViewBoundsToFrameTransform - 5.CustomClassName - 5.IBPluginDependency - 5.IBViewBoundsToFrameTransform - 6.IBPluginDependency - 6.IBViewBoundsToFrameTransform - 7.IBPluginDependency - 7.IBViewBoundsToFrameTransform - 8.IBEditorWindowLastContentRect - 8.IBPluginDependency - 8.IBViewBoundsToFrameTransform - 9.IBPluginDependency - 9.IBViewBoundsToFrameTransform - - - YES - SkillViewController - UIResponder - {{303, 509}, {960, 640}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUPUgABDdQAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUK0AAA/gAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUK0AABBvAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUK0AABCwAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUK0AABDKQAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUK0AABDcgAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUMWAABCCAAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUMWAABC1AAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUMWAABDMwAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDGAAAwtoAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCrAAAwyMAAA - - - P4AAAL+AAAAAAAAAw58AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AULOAABCCAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUIeAABC0wAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUIcAABDMgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABCEAAAwrAAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUIEAABDbQAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUIUAABDg4AAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABBgAAAw3QAAA - - {{323, 1045}, {52, 56}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDzAAAw3QAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUPOgABDg4AAA - - - - - YES - - - YES - - - - - YES - - - YES - - - - 50 - - - - YES - - SkillViewController - UIViewController - - YES - - YES - BringEmOn: - IAmDeathIncarnate: - back: - canIPlayDaddy: - dontHurtMe: - next: - - - YES - id - id - id - id - id - id - - - - YES - - YES - BringEmOn: - IAmDeathIncarnate: - back: - canIPlayDaddy: - dontHurtMe: - next: - - - YES - - BringEmOn: - id - - - IAmDeathIncarnate: - id - - - back: - id - - - canIPlayDaddy: - id - - - dontHurtMe: - id - - - next: - id - - - - - selectionFrame - UIView - - - selectionFrame - - selectionFrame - UIView - - - - IBProjectSource - SkillViewController.h - - - - UIFontButton - UIButton - - IBProjectSource - UIFontButton.h - - - - UIFontLabel - UILabel - - IBProjectSource - UIFontLabel.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIButton - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UIButton.h - - - - UIControl - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIControl.h - - - - UIImageView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIImageView.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIPrintFormatter.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - wolf3d.xcodeproj - 3 - - YES - - YES - back_arrow.png - button_highlight.png - difficulty_head1.png - difficulty_head2.png - difficulty_head3.png - difficulty_head4.png - episode_bracket.png - highlight_bracket.png - next_arrow.png - wolf_bg.png - - - YES - {65, 63} - {4, 4} - {64, 87} - {60, 82} - {60, 78} - {59, 79} - {606, 168} - {623, 189} - {65, 63} - {480, 320} - - - 141 - - + + + + + + + + + + + + Helvetica-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/SkillViewController.m b/wolf3d/code/iphone/SkillViewController.m index 4dfac40..52f5504 100644 --- a/wolf3d/code/iphone/SkillViewController.m +++ b/wolf3d/code/iphone/SkillViewController.m @@ -24,6 +24,7 @@ #import "SkillViewController.h" #import "EpisodeViewController.h" #import "wolf_local.h" +#import "wolf3dAppDelegate.h" @interface SkillViewController () @@ -65,16 +66,13 @@ - (void)setSelectionFrame { // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; - - [self setSelectionFrame]; +#if TARGET_OS_TV + self.selectionFrame.hidden = YES; +#endif } - - -// Override to allow orientations other than the default portrait orientation. -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - // Return YES for supported orientations. - return UIInterfaceOrientationIsLandscape(interfaceOrientation); +- (void)viewDidLayoutSubviews { + [self setSelectionFrame]; } @@ -82,18 +80,9 @@ - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; - // Release any cached data, images, etc. that aren't in use. + self.selectionFrame = nil; } -- (void)viewDidUnload { - [super viewDidUnload]; - // Release any retained subviews of the main view. - // e.g. self.myOutlet = nil; - - self.selectionFrame = nil; -} - - - (void)dealloc { [super dealloc]; } @@ -105,7 +94,8 @@ - (IBAction)back:(id)sender { } - (IBAction)next:(id)sender { - EpisodeViewController *evc = [[EpisodeViewController alloc] initWithNibName:@"EpisodeView" bundle:nil]; + wolf3dAppDelegate* app = (wolf3dAppDelegate*)[[UIApplication sharedApplication] delegate]; + EpisodeViewController *evc = [[EpisodeViewController alloc] initWithNibName:[app GetNibNameForDevice:@"EpisodeView"] bundle:nil]; [self.navigationController pushViewController:evc animated:YES]; [evc release]; } @@ -114,21 +104,33 @@ - (IBAction)next:(id)sender { -(IBAction)canIPlayDaddy:(id)sender { Cvar_SetValue( skill->name, 0 ); [self setSelectionFrame]; +#if TARGET_OS_TV + [self next:sender]; +#endif } -(IBAction)dontHurtMe:(id)sender { Cvar_SetValue( skill->name, 1 ); [self setSelectionFrame]; +#if TARGET_OS_TV + [self next:sender]; +#endif } -(IBAction)BringEmOn:(id)sender { Cvar_SetValue( skill->name, 2 ); [self setSelectionFrame]; +#if TARGET_OS_TV + [self next:sender]; +#endif } -(IBAction)IAmDeathIncarnate:(id)sender { Cvar_SetValue( skill->name, 3 ); [self setSelectionFrame]; +#if TARGET_OS_TV + [self next:sender]; +#endif } @end diff --git a/wolf3d/code/iphone/TriviaView.xib b/wolf3d/code/iphone/TriviaView.xib index 6e78c8a..f7cfd42 100644 --- a/wolf3d/code/iphone/TriviaView.xib +++ b/wolf3d/code/iphone/TriviaView.xib @@ -1,1327 +1,388 @@ - - - 1056 - 10K540 - 851 - 1038.36 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 141 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - YES - - - 292 - {480, 320} - - NO - IBCocoaTouchFramework - - NSImage - wolf_bg.png - - - - - 292 - {{163, 16}, {134, 52}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - Trivia - - POSITYPE-idSettler_v10.2 - 42 - 16 - - - 3 - MQA - - - - 1 - MCAwIDAAA - - {2, 2} - 1 - 10 - 1 - - - - 288 - {{20, 50}, {440, 171}} - - NO - YES - 7 - 1 - NO - IBCocoaTouchFramework - ORIGINAL WOLF: The original release of Wolfenstein 3D only contained 3 Episodes. Episodes 4, 5, and 6 were sold separately as "The Nocturnal Missions", and were intended to act as a prequel to the original trilogy of Episodes. Subsequent releases of the game included all 6 Episodes together. - - Helvetica - 18 - 16 - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483360 - {{20, 27}, {440, 171}} - - NO - YES - 7 - 2 - NO - IBCocoaTouchFramework - BJ, THE MAN: William Joseph Blazkowicz was born August 15, 1911, to Polish immigrants. Blazkowicz was a top spy for the Allied Forces, eventually receiving the Congressional Medal of Honor. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483360 - {{20, 16}, {440, 171}} - - NO - YES - 7 - 3 - NO - IBCocoaTouchFramework - BOX ART: Ken Rieger was the talented illustrator who created the cover art for Spear of Destiny, Wolfenstein3D and Commander Keen. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483360 - {{20, 50}, {440, 171}} - - NO - YES - 7 - 4 - NO - IBCocoaTouchFramework - THE REAL SPEAR: The Spear of Destiny, also known as The Spear or The Holy Lance, is believed to have been the weapon used to pierce the side of Jesus Christ at the Crucifixion. The Spear soon became a symbol of God's favor and those who possessed it were believed to be invincible. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483360 - {{20, 60}, {440, 171}} - - NO - YES - 7 - 5 - NO - IBCocoaTouchFramework - THE SPEAR AND HITLER: Hitler is believed to have acquired the Spear at the beginning of WWII. Near the end of that war, it is rumored that General Patton discovered the Spear and that the downfall of Germany began that day. It is fabled that the U.S. was destined to succeed Germany as the New World Power once ownership of the Spear changed hands. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483360 - {{20, 16}, {440, 171}} - - NO - YES - 7 - 6 - NO - IBCocoaTouchFramework - DEATH DIMENSION: It is said that Hitler made a pact with the Angel of Death, promising the souls of his Nazi soldiers, to protect the Spear of Destiny. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483360 - {{20, 5}, {440, 171}} - - NO - YES - 7 - 7 - NO - IBCocoaTouchFramework - GOD MODE: In the game, if you can access god mode, BJ's eyes will glow with eerie golden light. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483360 - {{20, 5}, {440, 171}} - - NO - YES - 7 - 8 - NO - IBCocoaTouchFramework - A PRINCE: Robert Prince, wrote the music for Commander Keen, Wolfenstein 3-D, and Doom. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483360 - {{20, 37}, {440, 171}} - - NO - YES - 7 - 9 - NO - IBCocoaTouchFramework - DELAYED DEVELOPMENT: It is rumored that work on Spear of Destiny was hindered by the development team's time spent playing Fatal Fury (which Jay Wilbur called 'Fatal Productivity'), and Street Fighter II. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483360 - {{20, 38}, {440, 171}} - - NO - YES - 7 - 10 - NO - IBCocoaTouchFramework - A MATTER OF DEGREES: John Carmack is known for his innovations in 3D graphics and rocketry but what is less known is that this self-taught engineer has no degrees - he dropped out of school after one semester. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483360 - {{20, 28}, {440, 171}} - - NO - YES - 7 - 11 - NO - IBCocoaTouchFramework - THE CARMACK: John Carmack, one of the founders of id Software, preferred to work at a pizza joint and make games rather than go to college. His favorite programming food is pizza and diet coke. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483360 - {{20, 17}, {440, 171}} - - NO - YES - 7 - 12 - NO - IBCocoaTouchFramework - DREAMING IN DIGITAL: Doom was reported to cause gamers to dream in pixels and lower productivity. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483360 - {{20, 8}, {440, 171}} - - NO - YES - 7 - 13 - NO - IBCocoaTouchFramework - KEEPING IT IN THE FAMILY: BJ is Commander Keen's grandfather. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483360 - {{20, -6}, {440, 195}} - - NO - YES - 7 - 14 - NO - IBCocoaTouchFramework - WHAT'S IN A NAME: The original name for Doom was "It's Green and Pissed" - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - -2147483360 - {{20, 69}, {440, 92}} - - NO - YES - 9 - 15 - NO - IBCocoaTouchFramework - GIBS: Gibs, pronounced with a hard 'g', is sometimes confused as 'jibs' due to its pronunciation. The term came from the imagery of flying chicken giblets, or gibs for short. - - - - - {2, 2} - 1 - NO - 10 - 7 - 1 - 0 - - - - -2147483360 - {{20, 38}, {440, 171}} - - NO - YES - 7 - 16 - NO - IBCocoaTouchFramework - WOLFENSTEIN 3D: The game was originally designed to have more complex gameplay. Though dragging bodies, stealth kills and uniforms were already programmed, it was decided that they slowed down the pace of the game and were removed. - - - - - {2, 2} - 1 - 10 - 7 - 1 - 0 - - - - 292 - {{18, 268}, {32, 32}} - - NO - IBCocoaTouchFramework - - NSImage - back_arrow.png - - - - - 292 - {{17, 243}, {66, 29}} - - NO - YES - 7 - NO - IBCocoaTouchFramework - BACK - - POSITYPE-idSettler_v10.2 - 18 - 16 - - - - 1 - 10 - 5 - - - - 319 - {{394, 256}, {66, 38}} - - NO - IBCocoaTouchFramework - 0 - 0 - - POSITYPE-idSettler_v10.2 - 32 - 16 - - {2, 2} - Next - - 3 - MC4zMzMzMzMzMzMzAA - - - - - - - 319 - {{173, 256}, {125, 38}} - - NO - IBCocoaTouchFramework - 0 - 0 - - {2, 2} - Previous - - - - - - - 301 - {{9, 244}, {60, 60}} - - NO - NO - 1 - IBCocoaTouchFramework - 0 - 0 - - Helvetica-Bold - 15 - 16 - - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - NSImage - button_highlight.png - - - - {480, 320} - - - 3 - MAA - - - 3 - - IBCocoaTouchFramework - - - - - YES - - - view - - - - 3 - - - - nextTrivia: - - - 7 - - 18 - - - - previousTrivia: - - - 7 - - 19 - - - - firstTrivia - - - - 24 - - - - lastTrivia - - - - 43 - - - - back: - - - 7 - - 48 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 5 - - - - - 16 - - - - - 17 - - - - - 20 - - - - - 26 - - - - - 27 - - - - - 28 - - - - - 29 - - - - - 30 - - - - - 31 - - - - - 32 - - - - - 33 - - - - - 34 - - - - - 35 - - - - - 36 - - - - - 37 - - - - - 38 - - - - - 39 - - - - - 40 - - - - - 44 - - - - - 45 - - - - - 46 - - - - - 47 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 16.CustomClassName - 16.IBPluginDependency - 16.IBViewBoundsToFrameTransform - 17.CustomClassName - 17.IBPluginDependency - 17.IBViewBoundsToFrameTransform - 20.IBPluginDependency - 20.IBViewBoundsToFrameTransform - 26.IBPluginDependency - 26.IBViewBoundsToFrameTransform - 27.IBPluginDependency - 27.IBViewBoundsToFrameTransform - 28.IBPluginDependency - 28.IBViewBoundsToFrameTransform - 29.IBPluginDependency - 29.IBViewBoundsToFrameTransform - 30.IBPluginDependency - 30.IBViewBoundsToFrameTransform - 31.IBPluginDependency - 31.IBViewBoundsToFrameTransform - 32.IBPluginDependency - 32.IBViewBoundsToFrameTransform - 33.IBPluginDependency - 33.IBViewBoundsToFrameTransform - 34.IBPluginDependency - 34.IBViewBoundsToFrameTransform - 35.IBPluginDependency - 35.IBViewBoundsToFrameTransform - 36.IBPluginDependency - 36.IBViewBoundsToFrameTransform - 37.IBPluginDependency - 37.IBViewBoundsToFrameTransform - 38.IBPluginDependency - 38.IBViewBoundsToFrameTransform - 39.IBPluginDependency - 39.IBViewBoundsToFrameTransform - 40.IBPluginDependency - 40.IBViewBoundsToFrameTransform - 44.CustomClassName - 44.IBPluginDependency - 44.IBViewBoundsToFrameTransform - 45.IBPluginDependency - 45.IBViewBoundsToFrameTransform - 46.IBPluginDependency - 46.IBViewBoundsToFrameTransform - 47.IBPluginDependency - 47.IBViewBoundsToFrameTransform - 5.CustomClassName - 5.IBPluginDependency - 5.IBViewBoundsToFrameTransform - - - YES - TriviaViewController - UIResponder - {{376, 816}, {480, 320}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABDroAAw5IAAA - - UIFontButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABC8gAAw5IAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUGgAABCaAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUHIAABCfAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUHwAABCiAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUHIAABCfAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUIMAABCkgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUIgAABCnAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUI0AABCpgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAABBoAAAw2MAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUJIAABCsAAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUI0AABCpgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUI0AABCpgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUI0AABCpgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUI0AABCpgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUI0AABCpgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUI0AABCpgAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUI0AABCpgAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUIEAABDbQAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUK2AABDgYAAA - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUFgAABDcwAAA - - UIFontLabel - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - AUMtAABBoAAAA - - - - - YES - - - YES - - - - - YES - - - YES - - - - 48 - - - - YES - - TriviaViewController - UIViewController - - YES - - YES - back: - nextTrivia: - previousTrivia: - - - YES - id - id - id - - - - YES - - YES - back: - nextTrivia: - previousTrivia: - - - YES - - back: - id - - - nextTrivia: - id - - - previousTrivia: - id - - - - - YES - - YES - firstTrivia - lastTrivia - - - YES - UIView - UIView - - - - YES - - YES - firstTrivia - lastTrivia - - - YES - - firstTrivia - UIView - - - lastTrivia - UIView - - - - - IBProjectSource - TriviaViewController.h - - - - UIFontButton - UIButton - - IBProjectSource - UIFontButton.h - - - - UIFontLabel - UILabel - - IBProjectSource - UIFontLabel.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIButton - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UIButton.h - - - - UIControl - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIControl.h - - - - UIImageView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIImageView.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIPrintFormatter.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - wolf3d.xcodeproj - 3 - - YES - - YES - back_arrow.png - button_highlight.png - wolf_bg.png - - - YES - {65, 63} - {4, 4} - {960, 640} - - - 141 - - + + + + + + + + + Helvetica + Helvetica-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wolf3d/code/iphone/TriviaViewController.m b/wolf3d/code/iphone/TriviaViewController.m index 509ab38..df91a88 100644 --- a/wolf3d/code/iphone/TriviaViewController.m +++ b/wolf3d/code/iphone/TriviaViewController.m @@ -64,32 +64,16 @@ - (void)viewDidLoad { } -// Override to allow orientations other than the default portrait orientation. -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - // Return YES for supported orientations. - return UIInterfaceOrientationIsLandscape(interfaceOrientation); -} - - - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; - // Release any cached data, images, etc. that aren't in use. -} - -- (void)viewDidUnload { - [super viewDidUnload]; - // Release any retained subviews of the main view. - // e.g. self.myOutlet = nil; - - self.firstTrivia = nil; - self.lastTrivia = nil; - - self.currentTrivia = nil; + self.firstTrivia = nil; + self.lastTrivia = nil; + + self.currentTrivia = nil; } - - (void)dealloc { [super dealloc]; } diff --git a/wolf3d/code/iphone/UIFontButton.m b/wolf3d/code/iphone/UIFontButton.m index 4243fc2..70b2587 100644 --- a/wolf3d/code/iphone/UIFontButton.m +++ b/wolf3d/code/iphone/UIFontButton.m @@ -25,7 +25,16 @@ @implementation UIFontButton +#if TARGET_OS_TV + +- (BOOL)canBecomeFocused { + return YES; +} + +#endif + - (void)awakeFromNib { + [super awakeFromNib]; CGFloat points = self.titleLabel.font.pointSize; self.titleLabel.font = [UIFont fontWithName:@"POSITYPE idSettler v10.2" size:points]; diff --git a/wolf3d/code/iphone/UIFontLabel.m b/wolf3d/code/iphone/UIFontLabel.m index f6f2096..f19f38f 100644 --- a/wolf3d/code/iphone/UIFontLabel.m +++ b/wolf3d/code/iphone/UIFontLabel.m @@ -26,6 +26,7 @@ @implementation UIFontLabel - (void)awakeFromNib { + [super awakeFromNib]; CGFloat points = self.font.pointSize; self.font = [UIFont fontWithName:@"POSITYPE idSettler v10.2" size:points]; diff --git a/wolf3d/code/iphone/UITableViewScrolling.m b/wolf3d/code/iphone/UITableViewScrolling.m index 0b7d88c..84a0933 100644 --- a/wolf3d/code/iphone/UITableViewScrolling.m +++ b/wolf3d/code/iphone/UITableViewScrolling.m @@ -34,7 +34,7 @@ void UITableViewScrollingPageDown( UITableView * table, int totalRows ) { int maxRow = 0; for ( NSIndexPath* path in visibleIndexPaths ) { - maxRow = maxRow < path.row ? path.row: maxRow; + maxRow = maxRow < path.row ? (int)path.row: maxRow; } const int rowToMakeVisible = maxRow + 1; @@ -54,7 +54,7 @@ void UITableViewScrollingPageUp( UITableView * table, int totalRows ) { int minRow = totalRows - 1; for ( NSIndexPath* path in visibleIndexPaths ) { - minRow = minRow < path.row ? minRow: path.row; + minRow = minRow < path.row ? minRow: (int)path.row; } const int rowToMakeVisible = minRow - 1; diff --git a/wolf3d/code/iphone/WOLF_114.png b/wolf3d/code/iphone/WOLF_114.png new file mode 100755 index 0000000..825c424 Binary files /dev/null and b/wolf3d/code/iphone/WOLF_114.png differ diff --git a/wolf3d/code/iphone/WOLF_57.png b/wolf3d/code/iphone/WOLF_57.png new file mode 100755 index 0000000..dfb2765 Binary files /dev/null and b/wolf3d/code/iphone/WOLF_57.png differ diff --git a/wolf3d/code/iphone/WOLF_72.png b/wolf3d/code/iphone/WOLF_72.png new file mode 100755 index 0000000..e224a4e Binary files /dev/null and b/wolf3d/code/iphone/WOLF_72.png differ diff --git a/wolf3d/code/iphone/WolfSlider.m b/wolf3d/code/iphone/WolfSlider.m index 68f3c11..e1d9fb9 100644 --- a/wolf3d/code/iphone/WolfSlider.m +++ b/wolf3d/code/iphone/WolfSlider.m @@ -32,8 +32,9 @@ - (CGRect)trackRectForBounds:(CGRect)bounds { UIImage* trackImage = [self minimumTrackImageForState:UIControlStateNormal]; CGFloat trackImageHeight = trackImage.size.height; - - return CGRectMake(bounds.origin.x, bounds.origin.y, self.bounds.size.width, trackImageHeight); + + // return CGRectMake(bounds.origin.x, bounds.origin.y, self.bounds.size.height, trackImageHeight); + return CGRectMake(bounds.origin.x, bounds.origin.y, self.bounds.size.width, trackImageHeight); } diff --git a/wolf3d/code/iphone/default.png b/wolf3d/code/iphone/default.png index c3505d4..3c327c4 100644 Binary files a/wolf3d/code/iphone/default.png and b/wolf3d/code/iphone/default.png differ diff --git a/wolf3d/code/iphone/default_wolf3dlite.png b/wolf3d/code/iphone/default_wolf3dlite.png deleted file mode 100644 index f4cfce5..0000000 Binary files a/wolf3d/code/iphone/default_wolf3dlite.png and /dev/null differ diff --git a/wolf3d/code/iphone/dist.plist b/wolf3d/code/iphone/dist.plist index ce373e1..6631ffa 100644 --- a/wolf3d/code/iphone/dist.plist +++ b/wolf3d/code/iphone/dist.plist @@ -2,7 +2,5 @@ - get-task-allow - diff --git a/wolf3d/code/iphone/gles_glue.h b/wolf3d/code/iphone/gles_glue.h index 0f9e4e8..5758fc4 100644 --- a/wolf3d/code/iphone/gles_glue.h +++ b/wolf3d/code/iphone/gles_glue.h @@ -61,10 +61,10 @@ void pfglColor4f( GLfloat r, GLfloat g, GLfloat b, GLfloat a ); void pfglTexCoord2i( GLint s, GLint t ); void pfglTexCoord2f( GLfloat s, GLfloat t ); -void pfglEnd(); +void pfglEnd(void); #ifdef __cplusplus } #endif -#endif \ No newline at end of file +#endif diff --git a/wolf3d/code/iphone/hud.c b/wolf3d/code/iphone/hud.c index 9472bc0..d327f15 100644 --- a/wolf3d/code/iphone/hud.c +++ b/wolf3d/code/iphone/hud.c @@ -23,16 +23,16 @@ #include "../wolfiphone.h" -extern int BackButton(); -extern int MenuButton(); +extern int BackButton(void); +extern int MenuButton(void); hud_t huds; -void HudDraw(); +void HudDraw(void); -void HudWrite(); +void HudWrite(void); -void HudRead(); +void HudRead(void); hudPic_t *dragHud; int dragX, dragY; diff --git a/wolf3d/code/iphone/iphone_alerts.h b/wolf3d/code/iphone/iphone_alerts.h index f7ffd5f..0c429f7 100644 --- a/wolf3d/code/iphone/iphone_alerts.h +++ b/wolf3d/code/iphone/iphone_alerts.h @@ -25,8 +25,8 @@ #define __IPHONE_ALERTS__ void iphoneMessageBox(char *title, char *message); -void iphoneKillMessageBox(); +void iphoneKillMessageBox(void); void iphoneNewMessageBox(char *title, char *message); void iphoneYesNoBox(char *title, char *message); -#endif \ No newline at end of file +#endif diff --git a/wolf3d/code/iphone/iphone_alerts.m b/wolf3d/code/iphone/iphone_alerts.m index 7ec2f3c..c512d35 100644 --- a/wolf3d/code/iphone/iphone_alerts.m +++ b/wolf3d/code/iphone/iphone_alerts.m @@ -31,38 +31,51 @@ Provides a basic pop-up message box =================================== */ + +// For now, no message boxes will be shown in tvOS. The messages will just go into oblivion. +// We need to transfer it to use UIAlertViewControllers and also be able to be presented from a utility class +// and I just don't want to spend the time on that right now -tkidd + +#if !TARGET_OS_TV UIAlertView *alert; +#endif void InitAlert() { - alert = [[UIAlertView alloc] initWithTitle:@"Title" +#if !TARGET_OS_TV + alert = [[UIAlertView alloc] initWithTitle:@"Title" message:@"Message" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil]; +#endif } void iphoneMessageBox(char *title, char *message) { //check if alert exists and initialize if it isn't +#if !TARGET_OS_TV if (!alert) { InitAlert(); } - NSString *nsTitle = [[NSString alloc] initWithCString:title]; - NSString *nsMessage = [[NSString alloc] initWithCString:message]; + NSString *nsTitle = [[NSString alloc] initWithCString:title encoding:NSUTF8StringEncoding]; + NSString *nsMessage = [[NSString alloc] initWithCString:message encoding:NSUTF8StringEncoding]; alert.title = nsTitle; alert.message = nsMessage; [alert show]; +#endif } void iphoneKillMessageBox() { - [alert dismissWithClickedButtonIndex:alert.cancelButtonIndex animated:NO]; +#if !TARGET_OS_TV +[alert dismissWithClickedButtonIndex:alert.cancelButtonIndex animated:NO]; +#endif } /* @@ -74,6 +87,7 @@ void iphoneKillMessageBox() */ void iphoneNewMessageBox(char *title, char *message) { +#if !TARGET_OS_TV UIAlertView *newAlert; newAlert = [[UIAlertView alloc] initWithTitle:@"Title" message:@"Message" @@ -82,14 +96,15 @@ void iphoneNewMessageBox(char *title, char *message) otherButtonTitles: nil]; - NSString *nsTitle = [[NSString alloc] initWithCString:title]; - NSString *nsMessage = [[NSString alloc] initWithCString:message]; + NSString *nsTitle = [[NSString alloc] initWithCString:title encoding:NSUTF8StringEncoding]; + NSString *nsMessage = [[NSString alloc] initWithCString:message encoding:NSUTF8StringEncoding]; newAlert.title = nsTitle; newAlert.message = nsMessage; [newAlert show]; [newAlert release]; +#endif } @@ -103,30 +118,36 @@ void iphoneNewMessageBox(char *title, char *message) ClickedButton call. =================================== */ +#if !TARGET_OS_TV UIAlertView *alertYesNo; +#endif void InitAlertYesNo() { - alertYesNo = [[UIAlertView alloc] initWithTitle:@"Title" +#if !TARGET_OS_TV + alertYesNo = [[UIAlertView alloc] initWithTitle:@"Title" message:@"Message" delegate:(wolf3dAppDelegate *)[UIApplication sharedApplication].delegate//nil cancelButtonTitle:@"No" - otherButtonTitles:@"Yes", nil]; + otherButtonTitles:@"Yes", nil]; +#endif } void iphoneYesNoBox(char *title, char *message) { +#if !TARGET_OS_TV if (!alertYesNo) { InitAlertYesNo(); } - NSString *nsTitle = [[NSString alloc] initWithCString:title]; - NSString *nsMessage = [[NSString alloc] initWithCString:message]; + NSString *nsTitle = [[NSString alloc] initWithCString:title encoding:NSUTF8StringEncoding]; + NSString *nsMessage = [[NSString alloc] initWithCString:message encoding:NSUTF8StringEncoding]; alertYesNo.title = nsTitle; alertYesNo.message = nsMessage; [alertYesNo show]; +#endif } #endif diff --git a/wolf3d/code/iphone/iphone_downloadSOD.m b/wolf3d/code/iphone/iphone_downloadSOD.m index 74efe5c..050fc37 100644 --- a/wolf3d/code/iphone/iphone_downloadSOD.m +++ b/wolf3d/code/iphone/iphone_downloadSOD.m @@ -106,6 +106,9 @@ int TestURLConnection() //----------------------------- void OpenURLConnection( const char *url ) { + // the entire bit with downloading the SOD expansion is disabled on tvOS for now -tkidd + +#if !TARGET_OS_TV Com_Printf( "ConnectURL char *: %s\n", url ); //convert url to nsstring @@ -115,7 +118,7 @@ void OpenURLConnection( const char *url ) NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:nssURL] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; - + // create the connection with the request // and start loading the data NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:theRequest @@ -132,6 +135,7 @@ void OpenURLConnection( const char *url ) //return to main menu menuState = IPM_MAIN; } +#endif } //============================ @@ -506,7 +510,7 @@ void WriteInstallLog() // Installs the needed files for SOD and // removes any unwanted data //================================ -extern void iphoneWriteConfig(); +extern void iphoneWriteConfig(void); void FinalizeDownload() { // get the documents directory diff --git a/wolf3d/code/iphone/iphone_downloadUserMap.m b/wolf3d/code/iphone/iphone_downloadUserMap.m index d66140a..cacc633 100644 --- a/wolf3d/code/iphone/iphone_downloadUserMap.m +++ b/wolf3d/code/iphone/iphone_downloadUserMap.m @@ -53,14 +53,14 @@ void DownloadURLConnection( char *url ) { Com_Printf( "ConnectURL char *: %s\n", url ); - int length = strlen(url); + int length = (int)strlen(url); if (length <= 4) { iphoneMessageBox("error", "url is not a valid map name. Maps must end in \".map\""); return; } - length = strlen(url); + length = (int)strlen(url); //acquire file name of map int pos = length; while (pos > 0) @@ -111,7 +111,10 @@ void DownloadURLConnection( char *url ) //convert url to nsstring - NSString *nssURL = [NSString stringWithUTF8String: url]; + // the entire bit with downloading user maps is disabled on tvOS for now -tkidd + +#if !TARGET_OS_TV + NSString *nssURL = [NSString stringWithUTF8String: url]; // create the request NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:nssURL] @@ -136,6 +139,7 @@ void DownloadURLConnection( char *url ) } menuState = IPM_DOWNLOADPROGRESS; +#endif } unsigned int userDataAmount = 0; diff --git a/wolf3d/code/iphone/iphone_loop.c b/wolf3d/code/iphone/iphone_loop.c index 6d4a00c..cdd484f 100644 --- a/wolf3d/code/iphone/iphone_loop.c +++ b/wolf3d/code/iphone/iphone_loop.c @@ -156,6 +156,24 @@ int isTouchMoving = 0; //gsh int touchCoordinateScale = 1; float deviceScale = 1.0f; +bool isiPhoneX; + +// Game controller stuff +bool controllerConnected = false; +bool leftTriggerPressed = false; +bool rightTriggerPressed = false; +bool leftShoulderPressed = false; +bool rightShoulderPressed = false; +bool buttonAPressed = false; +bool buttonBPressed = false; +bool buttonXPressed = false; +bool buttonYPressed = false; +// TODO: d-pad +float leftThumbstickYAxis = 0.0; +float leftThumbstickXAxis = 0.0; +float rightThumbstickYAxis = 0.0; +float rightThumbstickXAxis = 0.0; + deviceOrientation_t deviceOrientation = ORIENTATION_LANDSCAPE_LEFT; @@ -309,7 +327,7 @@ void iphoneSavePrevTouches() { */ extern font_t *myfonts[ 1 ]; int iphoneCenterText( int x, int y, const char *str ) { - int l = strlen( str ); + int l = (int)strlen( str ); int i; font_t *myfont = myfonts[0]; int scale; @@ -492,7 +510,7 @@ int iphoneCenterArialText( int x, int y, float scale, const char *str ) */ int iphoneDrawArialTextInBox( rect_t paragraph, int lineLength, const char *str, rect_t boxRect ) { - int l = strlen( str ); + int l = (int)strlen( str ); int i; if (paragraph.x > boxRect.x + boxRect.width) @@ -615,7 +633,7 @@ int iphoneDrawArialTextInBox( rect_t paragraph, int lineLength, const char *str, int iphoneDrawText( int x, int y, int width, int height, const char *str ) { - int l = strlen( str ); + int l = (int)strlen( str ); int i; font_t *myfont = myfonts[0]; // int scale; @@ -719,7 +737,7 @@ void iphoneDrawMapName( rect_t rect, const char *str ) { ================== */ int iphoneDrawTextInBox( rect_t paragraph, int lineLength, const char *str, rect_t boxRect ) { - int l = strlen( str ); + int l = (int)strlen( str ); int i; font_t *myfont = myfonts[0]; @@ -941,6 +959,9 @@ int TouchDown( int x, int y, int w, int h ) { int i; for ( i = 0 ; i < numTouches ; i++ ) { + +// Com_Printf("touch %i: %i %i | x: %i y: %i w: %i h: %i x+w: %i y+h: %i hit: %s\n", i, touches[i][0], touches[i][1], x, y, w, h, x + w, y + h, ( touches[i][0] >= x && touches[i][1] >= y && touches[i][0] < x + w && touches[i][1] < y + h ) ? "true" : "false" ); + if ( touches[i][0] >= x && touches[i][1] >= y && touches[i][0] < x + w && touches[i][1] < y + h ) { return 1; @@ -1278,8 +1299,17 @@ PRIVATE void CreateIphoneUserCmd() float forwardAxisHit = AxisHit( &huds.forwardStick ); float sideAxisHit = AxisHit( &huds.sideStick ); float turnAxisHit = AxisHit( &huds.turnStick ); - - static bool printSticks = false; + + if (controllerConnected) { + forwardAxisHit += -leftThumbstickYAxis + -rightThumbstickYAxis; + turnAxisHit += leftThumbstickXAxis + rightThumbstickXAxis; + + if (rightTriggerPressed) { + cmd->buttons |= BUTTON_ATTACK; + } + } + + static bool printSticks = false; if ( printSticks ) { printf( "Forward: %.4f \nSide: %.4f\nTurn: %.4f\n", forwardAxisHit, sideAxisHit, turnAxisHit ); @@ -1746,7 +1776,7 @@ void iphoneFrame() { unsigned char blendColor[4] = { 0, 0, 0, 0 }; iphoneFrameNum++; - loggedTimes[iphoneFrameNum&(MAX_LOGGED_TIMES-1)].enterFrame = Sys_Milliseconds(); + loggedTimes[iphoneFrameNum&(MAX_LOGGED_TIMES-1)].enterFrame = (int)Sys_Milliseconds(); // check for delayed intermission trigger after boss kill if ( intermissionTriggerFrame > 0 && iphoneFrameNum >= intermissionTriggerFrame ) { @@ -1781,7 +1811,7 @@ void iphoneFrame() { iphoneSet2D(); CFAbsoluteTime menuStartTime = CFAbsoluteTimeGetCurrent(); - iphoneDrawMenus( vnull, vnull, vnull, vnull ); + iphoneDrawMenus(); CFAbsoluteTime menuEndTime = CFAbsoluteTimeGetCurrent(); menuTime = menuEndTime - menuStartTime; @@ -1804,7 +1834,7 @@ void iphoneFrame() { if( Player.playstate != ex_dead ) { CreateIphoneUserCmd(); - Player.position.angle = NormalizeAngle( Player.position.angle ); + Player.position.angle = (int)NormalizeAngle( (int)Player.position.angle ); PL_Process( &Player, r_world ); // Player processing if ( !slowAI->value || --slowAIFrame < 0 ) { @@ -1903,14 +1933,23 @@ void iphoneFrame() { iphoneDrawNotifyText(); //gsh +#if !TARGET_OS_TV iphoneDrawReturnButton(); +#endif iphoneDrawMapView(); iphoneDrawFace(); - iphoneDrawNumber( huds.ammo.x + huds.ammo.width / 2, huds.ammo.y, Player.ammo[AMMO_BULLETS], 48, 48 ); +#if !TARGET_OS_TV + + // TODO: make the ammo count scooch over for the notch when the iPhone X is being held with the notch to the right. + iphoneDrawNumber( huds.ammo.x + huds.ammo.width / 2, huds.ammo.y, Player.ammo[AMMO_BULLETS], 48 * screenScale, 48 * screenScale ); +#else + iphoneDrawNumber( huds.ammo.x + huds.ammo.width / 2, (viddef.height - huds.ammo.height) - 2, Player.ammo[AMMO_BULLETS], 48 * screenScale, 48 * screenScale ); +#endif +#if !TARGET_OS_TV if ( hideControls->value != 1 ) { iphoneDrawHudControl( &huds.forwardStick ); iphoneDrawHudControl( &huds.sideStick ); @@ -1925,6 +1964,7 @@ void iphoneFrame() { if ( iphoneDrawHudButton( &huds.map ) ) { iphoneOpenAutomap(); } +#endif Client_Screen_DrawConsole(); @@ -1950,4 +1990,38 @@ void iphoneDrawLoading() //SysIPhoneSwapBuffers(); // do the swapbuffers } +void iPhoneSetControllerConnected( bool _controllerConnected ) +{ + controllerConnected = _controllerConnected; +} + +void iPhoneSetLeftThumbstickXValue( float _leftThumbstickXAxis ) +{ + leftThumbstickXAxis = _leftThumbstickXAxis; +} + +void iPhoneSetLeftThumbstickYValue( float _leftThumbstickYAxis ) +{ + leftThumbstickYAxis = _leftThumbstickYAxis; +} + +void iPhoneSetRightThumbstickXValue( float _rightThumbstickXAxis ) +{ + rightThumbstickXAxis = _rightThumbstickXAxis; +} + +void iPhoneSetRightThumbstickYValue( float _rightThumbstickYAxis ) +{ + rightThumbstickYAxis = _rightThumbstickYAxis; +} + +void iPhoneSetRightTriggerPressed( bool _rightTriggerPressed ) +{ + rightTriggerPressed = _rightTriggerPressed; +} + +void iPhoneSetButtonAPressed( bool _buttonAPressed ) +{ + buttonAPressed = _buttonAPressed; +} diff --git a/wolf3d/code/iphone/iphone_main.c b/wolf3d/code/iphone/iphone_main.c index bdd4914..b588a90 100644 --- a/wolf3d/code/iphone/iphone_main.c +++ b/wolf3d/code/iphone/iphone_main.c @@ -115,7 +115,7 @@ void Reset_f() { */ void iphoneStartup() { char *s; - int start = Sys_Milliseconds(); + int start = (int)Sys_Milliseconds(); static bool firstInit = true; if ( !firstInit ) { @@ -129,7 +129,7 @@ void iphoneStartup() { CheckForStorekitExistence(); #endif - InAppPurchaseInit(); +// InAppPurchaseInit(); // temporary const char *systemVersion = SysIPhoneGetOSVersion(); @@ -291,7 +291,7 @@ void iphoneStartGameplay() { =================== */ void iphonePreloadBeforePlay() { - int start = Sys_Milliseconds(); + int start = (int)Sys_Milliseconds(); // the texnums might have been different in the savegame HudSetTexnums(); diff --git a/wolf3d/code/iphone/iphone_mapselector.c b/wolf3d/code/iphone/iphone_mapselector.c index 8f83384..63499d5 100644 --- a/wolf3d/code/iphone/iphone_mapselector.c +++ b/wolf3d/code/iphone/iphone_mapselector.c @@ -112,7 +112,7 @@ const char levelNames[][29] = { int dragVelocity = 0; //velocity for the scrolling maps int dragPosition = 32; //position for the scrolling maps -extern int BackButton(); +extern int BackButton(void); #ifdef SPEARSTOREKIT extern void GetSpearOfDestiny( int x, int y ); #endif @@ -236,7 +236,7 @@ int iphoneDrawUserMaps(int Yoffset, int height, int spacing, int skillValue) struct dirent *ep; char mapBuffer[1024]; - int length = strlen(iphoneDocDirectory); + int length = (int)strlen(iphoneDocDirectory); strcpy(mapBuffer, iphoneDocDirectory); strcpy(mapBuffer + length, "/usermaps/"); diff --git a/wolf3d/code/iphone/iphone_menus.c b/wolf3d/code/iphone/iphone_menus.c index 8e7de9a..5b47c48 100644 --- a/wolf3d/code/iphone/iphone_menus.c +++ b/wolf3d/code/iphone/iphone_menus.c @@ -844,9 +844,9 @@ void SaveTheGame() { LevelData_t copiedLevelData = levelData; for ( i = 0 ; i < copiedLevelData.Doors.doornum ; i++ ) { - int index = r_world->Doors.Doors[i] - &r_world->Doors.DoorMap[0][0]; + int index = (int)(r_world->Doors.Doors[i] - &r_world->Doors.DoorMap[0][0]); assert( index >= 0 && index < 4096 ); - copiedLevelData.Doors.Doors[i] = (void *)index; + copiedLevelData.Doors.Doors[i] = (void *)(intptr_t)index; } // this is only used for the mutant death face, so just @@ -963,7 +963,7 @@ int iphoneGetUserMapName(int mapNumber, char *mapName) struct dirent *ep; char mapBuffer[1024]; - int length = strlen(iphoneDocDirectory); + int length = (int)strlen(iphoneDocDirectory); strcpy(mapBuffer, iphoneDocDirectory); strcpy(mapBuffer + length, "/usermaps/"); @@ -1023,7 +1023,7 @@ int iphoneGetUserMapLevelByName(const char *mapName) struct dirent *ep; char mapBuffer[1024]; - int length = strlen(iphoneDocDirectory); + int length = (int)strlen(iphoneDocDirectory); strcpy(mapBuffer, iphoneDocDirectory); strcpy(mapBuffer + length, "/usermaps/"); @@ -3248,9 +3248,9 @@ void DrawIntermissionStats() { // ratios int correction = 8; - DrawRatio( 124+offset-1*correction, levelstate.killed_monsters, levelstate.total_monsters, "iphone/kills.tga" ); - DrawRatio( 189+offset-2*correction, levelstate.found_secrets, levelstate.total_secrets, "iphone/secrets.tga" ); - DrawRatio( 255+offset-3*correction, levelstate.found_treasure, levelstate.total_treasure, "iphone/treasure.tga" ); + DrawRatio( 124+offset-1*correction, (int)levelstate.killed_monsters, (int)levelstate.total_monsters, "iphone/kills.tga" ); + DrawRatio( 189+offset-2*correction, (int)levelstate.found_secrets, (int)levelstate.total_secrets, "iphone/secrets.tga" ); + DrawRatio( 255+offset-3*correction, (int)levelstate.found_treasure, (int)levelstate.total_treasure, "iphone/treasure.tga" ); } /* @@ -3276,8 +3276,12 @@ void iphoneIntermission() { //---------------------- // tap for next level //---------------------- - if ( !TouchReleased( 0, 0, viddef.width, viddef.height ) ) { - return; + if (buttonAPressed) { + // do nothing! + } else if ( !TouchReleased( 0, 0, viddef.width, viddef.height ) ) { + if (!buttonAPressed) { + return; + } } menuState = IPM_GAME; @@ -3525,7 +3529,7 @@ void iphoneOpenAutomap() { } // sort the tiles to be drawn by texture - numMapTiles = mt - mapTiles; + numMapTiles = (int)(mt - mapTiles); qsort( mapTiles, numMapTiles, sizeof( mapTiles[0] ), MapTileSort ); } @@ -3598,7 +3602,7 @@ void iphoneAutomap() { //touch down if ( numTouches == 1 && numPrevTouches == 0) { - timeTouchDown = Sys_Milliseconds(); + timeTouchDown = (int)Sys_Milliseconds(); prevTapX = tapX; prevTapY = tapY; tapX = touches[0][0]; @@ -3606,7 +3610,7 @@ void iphoneAutomap() { } //touch up if ( numTouches == 0 && numPrevTouches == 1 ) { - unsigned int currentTime = Sys_Milliseconds(); + unsigned int currentTime = (int)Sys_Milliseconds(); //check if time between last tap and current time is too long if (Sys_Milliseconds() - lastTapTime > 500 || zoom) @@ -3617,7 +3621,7 @@ void iphoneAutomap() { //record tap time if first tap if (numTaps < 1) - lastTapTime = Sys_Milliseconds(); + lastTapTime = (int)Sys_Milliseconds(); ++numTaps; /* @@ -3689,7 +3693,7 @@ void iphoneAutomap() { //Com_Printf("dist: %f\n\n", dist); float tolerance = 0.5f;//3; - if ( abs(mapOrigin[0] - TargetX) < tolerance && abs(mapOrigin[1] - TargetY) < tolerance && abs(scale - TargetZoom) < tolerance/2) + if ( abs((int)mapOrigin[0] - (int)TargetX) < tolerance && abs((int)mapOrigin[1] - (int)TargetY) < tolerance && abs((int)scale - (int)TargetZoom) < tolerance/2) { mapOrigin[0] = TargetX; mapOrigin[1] = TargetY; @@ -4401,7 +4405,7 @@ void iphoneDownloadInstructionsMenu() #endif //gsh -extern void iphoneSelectMapMenu(); +extern void iphoneSelectMapMenu(void); #if SPEARSTOREKIT extern void iphoneStoreKit(); #endif diff --git a/wolf3d/code/iphone/iphone_store.m b/wolf3d/code/iphone/iphone_store.m index b771539..883c107 100644 --- a/wolf3d/code/iphone/iphone_store.m +++ b/wolf3d/code/iphone/iphone_store.m @@ -80,7 +80,7 @@ - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProdu // For now, immediately request payment for any items the user has requested. for (SKProduct *product in myProduct) { - SKPayment *payment = [SKPayment paymentWithProductIdentifier:[product productIdentifier]]; + SKPayment *payment = [SKPayment paymentWithProduct:product]; [[SKPaymentQueue defaultQueue] addPayment:payment]; } @@ -162,6 +162,7 @@ - (void)failedTransaction:(SKPaymentTransaction *)transaction { if (transaction.error.code != SKErrorPaymentCancelled) { +#if !TARGET_OS_TV UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"In-App Purchase error" message:[transaction.error localizedDescription] delegate:nil @@ -170,6 +171,7 @@ - (void)failedTransaction:(SKPaymentTransaction *)transaction [alert show]; [alert release]; +#endif } [[SKPaymentQueue defaultQueue] finishTransaction: transaction]; @@ -286,6 +288,7 @@ void InAppPurchaseStartPurchase( const char * productIdentifier ) { } else { // User has disabled In-App purchases in settings. Kindly remind him that he can // enable purchases again. +#if !TARGET_OS_TV UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"In-App Purchases are disabled" message:@"You can enable In-App purchases in your device's settings." delegate:nil @@ -294,6 +297,7 @@ void InAppPurchaseStartPurchase( const char * productIdentifier ) { [alert show]; [alert release]; +#endif } } diff --git a/wolf3d/code/iphone/iphone_sys.m b/wolf3d/code/iphone/iphone_sys.m index 22948c0..5b73999 100644 --- a/wolf3d/code/iphone/iphone_sys.m +++ b/wolf3d/code/iphone/iphone_sys.m @@ -27,37 +27,52 @@ #import "wolf3dAppDelegate.h" #import +#include #import #import void interruptionListener( void *inUserData, UInt32 inInterruption) { +#if !TARGET_OS_TV printf("Session interrupted! --- %s ---", inInterruption == kAudioSessionBeginInterruption ? "Begin Interruption" : "End Interruption"); if ( inInterruption == kAudioSessionEndInterruption ) { // make sure we are again the active session - UInt32 audioCategory = kAudioSessionCategory_AmbientSound; - AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(audioCategory), &audioCategory); - AudioSessionSetActive( true ); +// UInt32 audioCategory = kAudioSessionCategory_AmbientSound; +// AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(audioCategory), &audioCategory); +// AudioSessionSetActive( true ); // do we need to re-initialize the sound subsystem in this case? + + AVAudioSession *session = [AVAudioSession sharedInstance]; + + NSError *setCategoryError = nil; + if (![session setCategory:AVAudioSessionCategoryAmbient + error:&setCategoryError]) { + // handle error + } } +#endif } int otherAudioIsPlaying; void SysIPhoneInitAudioSession() { - OSStatus status = 0; - status = AudioSessionInitialize(NULL, NULL, interruptionListener, NULL); // else "couldn't initialize audio session" - UInt32 audioCategory = kAudioSessionCategory_AmbientSound; - status = AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(audioCategory), &audioCategory); - - AudioSessionPropertyID propOtherAudioIsPlaying = kAudioSessionProperty_OtherAudioIsPlaying; - UInt32 size = sizeof( otherAudioIsPlaying ); - AudioSessionGetProperty( propOtherAudioIsPlaying, &size, &otherAudioIsPlaying ); - - status = AudioSessionSetActive(true); // else "couldn't set audio session active\n" -} + +// OSStatus status = 0; + [[AVAudioSession sharedInstance] setActive:YES error:nil]; + NSString* audioCategory = AVAudioSessionCategoryAmbient; + [[AVAudioSession sharedInstance] setCategory:audioCategory error:nil]; +// status = AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(audioCategory), &audioCategory); + +// AudioSessionPropertyID propOtherAudioIsPlaying = kAudioSessionProperty_OtherAudioIsPlaying; +// UInt32 size = sizeof( otherAudioIsPlaying ); +// AudioSessionGetProperty( propOtherAudioIsPlaying, &size, &otherAudioIsPlaying ); + + otherAudioIsPlaying = [[AVAudioSession sharedInstance] isOtherAudioPlaying]; + +// status = AudioSessionSetActive(true); // else "couldn't set audio session active\n" +} int SysIPhoneOtherAudioIsPlaying() { static int called = 0; @@ -118,7 +133,7 @@ int SysIPhoneGetPathToMainBundleLength( void ) { NSString *path = [mainBundle bundlePath]; - return [path length]; + return (int)[path length]; } @@ -147,14 +162,26 @@ void SysIPhoneGetPathToMainBundle( char * outPath, int maxLength ) { ================== */ void iphoneRotateForLandscape() { - switch ( deviceOrientation ) { - case ORIENTATION_LANDSCAPE_LEFT: - pfglRotatef( 90.0f, 0.0f, 0.0f, 1.0f ); - break; - default: - pfglRotatef( -90.0f, 0.0f, 0.0f, 1.0f ); - break; - } + + // TODO: get this working after a rotate, or before one. + // could this be related to why we have to dink with the X touches? + +// switch ( deviceOrientation ) { +// case ORIENTATION_LANDSCAPE_LEFT: +// pfglRotatef( 0.0f, 0.0f, 0.0f, 1.0f ); +// break; +// default: +// pfglRotatef( -180.0f, 0.0f, 0.0f, 1.0f ); +// break; +// } +// switch ( deviceOrientation ) { +// case ORIENTATION_LANDSCAPE_LEFT: +// pfglRotatef( 90.0f, 0.0f, 0.0f, 1.0f ); +// break; +// default: +// pfglRotatef( -90.0f, 0.0f, 0.0f, 1.0f ); +// break; +// } } /* diff --git a/wolf3d/code/iphone/iphone_wolf.h b/wolf3d/code/iphone/iphone_wolf.h index e54335d..96fb795 100644 --- a/wolf3d/code/iphone/iphone_wolf.h +++ b/wolf3d/code/iphone/iphone_wolf.h @@ -59,7 +59,7 @@ typedef enum menuState { extern menuState_t menuState; -void iphoneDrawMenus(); +void iphoneDrawMenus(void); // bumped to 107 on moving powerups structure into leveldata // bumped to 108 with custom huds @@ -215,16 +215,16 @@ int iphoneDrawPicWithTouch( int x, int y, int w, int h, const char *pic ); int iphoneDrawPicRectWithTouch( rectFloat_t rect, const char *pic ); void iphoneDrawPicNum( int x, int y, int w, int h, int glTexNum ); void R_Draw_Blend( int x, int y, int w, int h, colour4_t c ); -void SaveTheGame(); -int LoadTheGame(); -void StartGame(); -void iphoneOpenAutomap(); -void iphoneDrawFace(); -void iphoneDrawNotifyText(); -void iphonePreloadBeforePlay(); +void SaveTheGame(void); +int LoadTheGame(void); +void StartGame(void); +void iphoneOpenAutomap(void); +void iphoneDrawFace(void); +void iphoneDrawNotifyText(void); +void iphonePreloadBeforePlay(void); -void InitImmediateModeGL(); -void iphoneRotateForLandscape(); +void InitImmediateModeGL(void); +void iphoneRotateForLandscape(void); void ScaleToScreen( int * value); void ScalePosition( float * x, float * y ); @@ -275,9 +275,9 @@ typedef struct { extern hud_t huds; void HudSetForScheme( int schemeNum ); -void HudSetTexnums(); -void HudEditFrame(); -void iphoneHudEditFrame(); +void HudSetTexnums(void); +void HudEditFrame(void); +void iphoneHudEditFrame(void); //--------------------------------------- @@ -291,51 +291,58 @@ typedef enum { //--------------------------------------- // interfaces from the original game code //--------------------------------------- -void iphoneStartBonusFlash(); +void iphoneStartBonusFlash(void); void iphoneStartDamageFlash( int points ); void iphoneSetAttackDirection( int dir ); void iphoneStartIntermission( int framesFromNow ); void iphoneSetNotifyText( const char *str, ... ); -void iphoneSetLevelNotifyText(); //gsh +void iphoneSetLevelNotifyText(void); //gsh //--------------------------------------- // interfaces to Objective-C land //--------------------------------------- -void SysIPhoneSwapBuffers(); -void SysIPhoneVibrate(); +void SysIPhoneSwapBuffers(void); +void SysIPhoneVibrate(void); void SysIPhoneOpenURL( const char *url ); void SysIPhoneLoadJPG( W8* jpegData, int jpegBytes, W8 **pic, W16 *width, W16 *height, W16 *bytes ); -const char * SysIPhoneGetConsoleTextField(); +const char * SysIPhoneGetConsoleTextField(void); void SysIPhoneSetConsoleTextField(const char *); -void SysIPhoneInitAudioSession(); -int SysIPhoneOtherAudioIsPlaying(); -const char *SysIPhoneGetOSVersion(); -contentVersion_t SysIPhoneGetContentVersion(); +void SysIPhoneInitAudioSession(void); +int SysIPhoneOtherAudioIsPlaying(void); +const char *SysIPhoneGetOSVersion(void); +contentVersion_t SysIPhoneGetContentVersion(void); int SysIPhoneGetPathToMainBundleLength( void ); void SysIPhoneGetPathToMainBundle( char * outPath, int maxLength ); -void iphoneStartPreviousMenu(); -void iphoneStartMainMenu(); -void iphonePromptToBuyPlatinum(); +void iphoneStartPreviousMenu(void); +void iphoneStartMainMenu(void); +void iphonePromptToBuyPlatinum(void); -void iphoneInitMenuMusic(); -void iphoneStartMenuMusic(); -void iphoneStopMenuMusic(); +void iphoneInitMenuMusic(void); +void iphoneStartMenuMusic(void); +void iphoneStopMenuMusic(void); //--------------------------------------- // interfaces from Objective-C land //--------------------------------------- -void iphoneStartup(); -void iphoneShutdown(); -void iphoneFrame(); +void iphoneStartup(void); +void iphoneShutdown(void); +void iphoneFrame(void); void iphoneTiltEvent( float *tilts ); void iphoneTouchEvent( int numTouches, int touches[16] ); -void iphoneActivateConsole(); -void iphoneDeactivateConsole(); -void iphoneExecuteCommandLine(); -void iphoneStartGameplay(); - -void iphoneResume(); +void iphoneActivateConsole(void); +void iphoneDeactivateConsole(void); +void iphoneExecuteCommandLine(void); +void iphoneStartGameplay(void); +void iPhoneSetControllerConnected( bool _controllerConnected ); +void iPhoneSetLeftThumbstickXValue( float _leftThumbstickXAxis ); +void iPhoneSetLeftThumbstickYValue( float _leftThumbstickYAxis ); +void iPhoneSetRightThumbstickXValue( float _rightThumbstickXAxis ); +void iPhoneSetRightThumbstickYValue( float _rightThumbstickYAxis ); +void iPhoneSetRightTriggerPressed( bool _rightTriggerPressed ); +void iPhoneSetButtonAPressed( bool _buttonAPressed ); + +void iphoneResume(void); void LoadPNG( const char *filename, W8 **pic, W16 *width, W16 *height, W16 *bytes ); diff --git a/wolf3d/code/iphone/untgz.c b/wolf3d/code/iphone/untgz.c deleted file mode 100644 index e8ddd27..0000000 --- a/wolf3d/code/iphone/untgz.c +++ /dev/null @@ -1,703 +0,0 @@ -/* - * untgz.c -- Display contents and extract files from a gzip'd TAR file - * - * written by Pedro A. Aranda Gutierrez - * adaptation to Unix by Jean-loup Gailly - * various fixes by Cosmin Truta - */ - -// This file was originally authored by the people above. -// It has been modified for this program. - -#include -#include -#include -#include -#include - -#include "../wolfiphone.h" - -extern int chmod(const char *, mode_t) __DARWIN_ALIAS(chmod); -extern int mkdir(const char *, mode_t); -extern void Com_Printf( const char *fmt, ... ); - -#include "zlib.h" - -//Note: in order to link the zlib library into the build from usr/lib/libz.ylib -// the flag -lz was added to the OTHER_LDFLAGS under the build options. -// To get there: right click on the wolf3d project. choose get info. -// Click on build and scroll to "Other Link Flags" under "Linking" - - -#define unix - -#ifdef unix -# include -#else -# include -# include -#endif - -#ifdef WIN32 -#include -# ifndef F_OK -# define F_OK 0 -# endif -# define mkdir(dirname,mode) _mkdir(dirname) -# ifdef _MSC_VER -# define access(path,mode) _access(path,mode) -# define chmod(path,mode) _chmod(path,mode) -# define strdup(str) _strdup(str) -# endif -#else -# include -#endif - - -//extern int iphoneCenterText( int x, int y, const char *str ); - -/* values used in typeflag field */ - -#define REGTYPE '0' /* regular file */ -#define AREGTYPE '\0' /* regular file */ -#define LNKTYPE '1' /* link */ -#define SYMTYPE '2' /* reserved */ -#define CHRTYPE '3' /* character special */ -#define BLKTYPE '4' /* block special */ -#define DIRTYPE '5' /* directory */ -#define FIFOTYPE '6' /* FIFO special */ -#define CONTTYPE '7' /* reserved */ - -/* GNU tar extensions */ - -#define GNUTYPE_DUMPDIR 'D' /* file names from dumped directory */ -#define GNUTYPE_LONGLINK 'K' /* long link name */ -#define GNUTYPE_LONGNAME 'L' /* long file name */ -#define GNUTYPE_MULTIVOL 'M' /* continuation of file from another volume */ -#define GNUTYPE_NAMES 'N' /* file name that does not fit into main hdr */ -#define GNUTYPE_SPARSE 'S' /* sparse file */ -#define GNUTYPE_VOLHDR 'V' /* tape/volume header */ - - -/* tar header */ - -#define BLOCKSIZE 512 -#define SHORTNAMESIZE 100 - -struct tar_header -{ /* byte offset */ - char name[100]; /* 0 */ - char mode[8]; /* 100 */ - char uid[8]; /* 108 */ - char gid[8]; /* 116 */ - char size[12]; /* 124 */ - char mtime[12]; /* 136 */ - char chksum[8]; /* 148 */ - char typeflag; /* 156 */ - char linkname[100]; /* 157 */ - char magic[6]; /* 257 */ - char version[2]; /* 263 */ - char uname[32]; /* 265 */ - char gname[32]; /* 297 */ - char devmajor[8]; /* 329 */ - char devminor[8]; /* 337 */ - char prefix[155]; /* 345 */ - /* 500 */ -}; - -union tar_buffer -{ - char buffer[BLOCKSIZE]; - struct tar_header header; -}; - -struct attr_item -{ - struct attr_item *next; - char *fname; - int mode; - time_t time; -}; - -enum { TGZ_EXTRACT, TGZ_LIST, TGZ_INVALID }; - -char *TGZfname OF((const char *)); -void TGZnotfound OF((const char *)); - -int getoct OF((char *, int)); -char *strtime OF((time_t *)); -int setfiletime OF((char *, time_t)); -void push_attr OF((struct attr_item **, char *, int, time_t)); -void restore_attr OF((struct attr_item **)); - -int ExprMatch OF((char *, char *)); - -int makedir OF((char *)); -int matchname OF((int, int, char **, char *)); - -void error OF((const char *)); -int tar OF((gzFile, int, int, int, char **)); - -void help OF((int)); -int main OF((int, char **)); - -char *prog; - -const char *TGZsuffix[] = { "\0", ".tar", ".tar.gz", ".taz", ".tgz", NULL }; - -extern char iphoneDocDirectory[1024]; - -//returns the fname along with the appdocdirectory tagged onto the front -char *DirFName (const char* fname) -{ - static char buffer[1024]; - int origlen;//, i; - -// Com_Printf("iphone Doc Direct: %s\n", iphoneDocDirectory); - - //copy the directory into the buffer - strcpy(buffer, iphoneDocDirectory); - origlen = strlen(buffer); - - //add the '/' to the end of the iphoneDocDirectory - buffer[origlen] = '/'; - ++origlen; - buffer[origlen] = '\0'; - - //copy the file name into the buffer - strcpy(buffer+origlen, fname); - - Com_Printf("extracting file: %s\n", buffer); - -// colour4_t backgroundColor = { 10, 10, 10, 255 }; -// R_Draw_Blend( 40, 150, 4*100, 20, backgroundColor ); //this is not actually drawing. The draw thread is somehow pausing - - return buffer; -} - - -/* return the file name of the TGZ archive */ -/* or NULL if it does not exist */ - -char *TGZfname (const char *arcname) -{ - static char buffer[1024]; - int origlen,i; - - strcpy(buffer,arcname); - origlen = strlen(buffer); - - for (i=0; TGZsuffix[i]; i++) - { - strcpy(buffer+origlen,TGZsuffix[i]); - if (access(buffer,F_OK) == 0) - return buffer; - } - return NULL; -} - - -/* error message for the filename */ - -void TGZnotfound (const char *arcname) -{ - int i; - - fprintf(stderr,"%s: Couldn't find ",prog); - for (i=0;TGZsuffix[i];i++) - fprintf(stderr,(TGZsuffix[i+1]) ? "%s%s, " : "or %s%s\n", - arcname, - TGZsuffix[i]); - exit(1); -} - - -/* convert octal digits to int */ -/* on error return -1 */ - -int getoct (char *p,int width) -{ - int result = 0; - char c; - - while (width--) - { - c = *p++; - if (c == 0) - break; - if (c == ' ') - continue; - if (c < '0' || c > '7') - return -1; - result = result * 8 + (c - '0'); - } - return result; -} - - -/* convert time_t to string */ -/* use the "YYYY/MM/DD hh:mm:ss" format */ - -char *strtime (time_t *t) -{ - struct tm *local; - static char result[32]; - - local = localtime(t); - sprintf(result,"%4d/%02d/%02d %02d:%02d:%02d", - local->tm_year+1900, local->tm_mon+1, local->tm_mday, - local->tm_hour, local->tm_min, local->tm_sec); - return result; -} - - -/* set file time */ - -int setfiletime (char *fname,time_t ftime) -{ -#ifdef WIN32 - static int isWinNT = -1; - SYSTEMTIME st; - FILETIME locft, modft; - struct tm *loctm; - HANDLE hFile; - int result; - - loctm = localtime(&ftime); - if (loctm == NULL) - return -1; - - st.wYear = (WORD)loctm->tm_year + 1900; - st.wMonth = (WORD)loctm->tm_mon + 1; - st.wDayOfWeek = (WORD)loctm->tm_wday; - st.wDay = (WORD)loctm->tm_mday; - st.wHour = (WORD)loctm->tm_hour; - st.wMinute = (WORD)loctm->tm_min; - st.wSecond = (WORD)loctm->tm_sec; - st.wMilliseconds = 0; - if (!SystemTimeToFileTime(&st, &locft) || - !LocalFileTimeToFileTime(&locft, &modft)) - return -1; - - if (isWinNT < 0) - isWinNT = (GetVersion() < 0x80000000) ? 1 : 0; - hFile = CreateFile(fname, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, - (isWinNT ? FILE_FLAG_BACKUP_SEMANTICS : 0), - NULL); - if (hFile == INVALID_HANDLE_VALUE) - return -1; - result = SetFileTime(hFile, NULL, NULL, &modft) ? 0 : -1; - CloseHandle(hFile); - return result; -#else - struct utimbuf settime; - - settime.actime = settime.modtime = ftime; - return utime(fname,&settime); -#endif -} - - -/* push file attributes */ - -void push_attr(struct attr_item **list,char *fname,int mode,time_t time) -{ - struct attr_item *item; - - item = (struct attr_item *)malloc(sizeof(struct attr_item)); - if (item == NULL) - error("Out of memory"); - item->fname = strdup(fname); - item->mode = mode; - item->time = time; - item->next = *list; - *list = item; -} - - -/* restore file attributes */ - -void restore_attr(struct attr_item **list) -{ - struct attr_item *item, *prev; - - for (item = *list; item != NULL; ) - { - setfiletime(item->fname,item->time); - chmod(item->fname,item->mode); - prev = item; - item = item->next; - free(prev); - } - *list = NULL; -} - - -/* match regular expression */ - -#define ISSPECIAL(c) (((c) == '*') || ((c) == '/')) - -int ExprMatch (char *string,char *expr) -{ - while (1) - { - if (ISSPECIAL(*expr)) - { - if (*expr == '/') - { - if (*string != '\\' && *string != '/') - return 0; - string ++; expr++; - } - else if (*expr == '*') - { - if (*expr ++ == 0) - return 1; - while (*++string != *expr) - if (*string == 0) - return 0; - } - } - else - { - if (*string != *expr) - return 0; - if (*expr++ == 0) - return 1; - string++; - } - } -} - - -/* recursive mkdir */ -/* abort on ENOENT; ignore other errors like "directory already exists" */ -/* return 1 if OK */ -/* 0 on error */ - -int makedir (char *newdir) -{ - char *buffer = strdup(newdir); - char *p; - int len = strlen(buffer); - - if (len <= 0) { - free(buffer); - return 0; - } - if (buffer[len-1] == '/') { - buffer[len-1] = '\0'; - } - if (mkdir(buffer, 0755) == 0) - { - free(buffer); - return 1; - } - - p = buffer+1; - while (1) - { - char hold; - - while(*p && *p != '\\' && *p != '/') - p++; - hold = *p; - *p = 0; - if ((mkdir(buffer, 0755) == -1) && (errno == ENOENT)) - { - fprintf(stderr,"%s: Couldn't create directory %s\n",prog,buffer); - free(buffer); - return 0; - } - if (hold == 0) - break; - *p++ = hold; - } - free(buffer); - return 1; -} - - -int matchname (int arg,int argc,char **argv,char *fname) -{ - if (arg == argc) /* no arguments given (untgz tgzarchive) */ - return 1; - - while (arg < argc) - if (ExprMatch(fname,argv[arg++])) - return 1; - - return 0; /* ignore this for the moment being */ -} - - -/* tar file list or extract */ - - -int tar2 (gzFile in,int action) -{ - union tar_buffer buffer; - int len; - int err; - int getheader = 1; - int remaining = 0; - FILE *outfile = NULL; - char fname[BLOCKSIZE]; - //char dirfname; - int tarmode; - time_t tartime; - struct attr_item *attributes = NULL; - - if (action == TGZ_LIST) - printf(" date time size file\n" - " ---------- -------- --------- -------------------------------------\n"); - while (1) - { - len = gzread(in, &buffer, BLOCKSIZE); - if (len < 0) - error(gzerror(in, &err)); - /* - * Always expect complete blocks to process - * the tar information. - */ - if (len != BLOCKSIZE) - { - action = TGZ_INVALID; /* force error exit */ - remaining = 0; /* force I/O cleanup */ - } - - /* - * If we have to get a tar header - */ - if (getheader >= 1) - { - /* - * if we met the end of the tar - * or the end-of-tar block, - * we are done - */ - if (len == 0 || buffer.header.name[0] == 0) - break; - - tarmode = getoct(buffer.header.mode,8); - tartime = (time_t)getoct(buffer.header.mtime,12); - if (tarmode == -1 || tartime == (time_t)-1) - { - buffer.header.name[0] = 0; - action = TGZ_INVALID; - } - - if (getheader == 1) - { - strncpy(fname,buffer.header.name,SHORTNAMESIZE); - if (fname[SHORTNAMESIZE-1] != 0) - fname[SHORTNAMESIZE] = 0; - } - else - { - /* - * The file name is longer than SHORTNAMESIZE - */ - if (strncmp(fname,buffer.header.name,SHORTNAMESIZE-1) != 0) - error("bad long name"); - getheader = 1; - } - - /* - * Act according to the type flag - */ - switch (buffer.header.typeflag) - { - - case DIRTYPE: - if (action == TGZ_LIST) - { - printf(" %s %s\n",strtime(&tartime),fname); - Com_Printf("case DIRTYPE: %s\n", DirFName(fname)); - } - if (action == TGZ_EXTRACT) - { - Com_Printf("blah blah DIRTYPE:action == TGZ_EXTRACT, make directory\n"); - makedir(fname); - //makedir(DirFName(fname)); - push_attr(&attributes,fname,tarmode,tartime); - } - break; - case REGTYPE: - case AREGTYPE: - remaining = getoct(buffer.header.size,12); - if (remaining == -1) - { - action = TGZ_INVALID; - break; - } - if (action == TGZ_LIST) - printf(" %s %9d %s\n",strtime(&tartime),remaining,fname); - else if (action == TGZ_EXTRACT) - { - if (1)//gsh matchname(arg,argc,argv,fname)) - { - //Com_Printf("call just before iphonedocdirectory\n"); - //Com_Printf("iphonedocdirect: %s\n", iphoneDocDirectory); - char* outname = DirFName(fname); - //Com_Printf("outname is: %s\n", outname); - outfile = fopen(outname,"wb"); - if (outfile == NULL) { - // try creating directory - char *p = strrchr(outname, '/'); - if (p != NULL) { - *p = '\0'; - makedir(outname); - *p = '/'; - outfile = fopen(outname,"wb"); - } - }/* - if (outfile != NULL) - Com_Printf("Extracting %s\n",fname); - else - Com_Printf("%s: Couldn't create %s",prog,fname);*/ - /* - outfile = fopen(fname,"wb"); - if (outfile == NULL) { - /* try creating directory * - char *p = strrchr(fname, '/'); - if (p != NULL) { - *p = '\0'; - makedir(fname); - *p = '/'; - outfile = fopen(fname,"wb"); - } - } - if (outfile != NULL) - printf("Extracting %s\n",fname); - else - fprintf(stderr, "%s: Couldn't create %s",prog,fname);*/ - } - else - outfile = NULL; - } - getheader = 0; - break; - case GNUTYPE_LONGLINK: - case GNUTYPE_LONGNAME: - remaining = getoct(buffer.header.size,12); - if (remaining < 0 || remaining >= BLOCKSIZE) - { - action = TGZ_INVALID; - break; - } - len = gzread(in, fname, BLOCKSIZE); - if (len < 0) - error(gzerror(in, &err)); - if (fname[BLOCKSIZE-1] != 0 || (int)strlen(fname) > remaining) - { - action = TGZ_INVALID; - break; - } - getheader = 2; - break; - default: - if (action == TGZ_LIST) - printf(" %s <---> %s\n",strtime(&tartime),fname); - break; - } - } - else - { - //Com_Printf("else called\n"); - unsigned int bytes = (remaining > BLOCKSIZE) ? BLOCKSIZE : remaining; - - if (outfile != NULL) - { - if (fwrite(&buffer,sizeof(char),bytes,outfile) != bytes) - { - fprintf(stderr, - "%s: Error writing %s -- skipping\n",prog,fname); - fclose(outfile); - outfile = NULL; - remove(fname); - } - } - remaining -= bytes; - } - - if (remaining == 0) - { - getheader = 1; - if (outfile != NULL) - { - fclose(outfile); - outfile = NULL; - if (action != TGZ_INVALID) - push_attr(&attributes,fname,tarmode,tartime); - } - } - - /* - * Abandon if errors are found - */ - if (action == TGZ_INVALID) - { - error("broken archive"); - break; - } - } - - /* - * Restore file modes and time stamps - */ - restore_attr(&attributes); - - if (gzclose(in) != Z_OK) - error("failed gzclose"); - - return 0; -} - - - -/* ============================================================ */ - -void help(int exitval) -{ - printf("untgz version 0.2.1\n" - " using zlib version %s\n\n", - zlibVersion()); - printf("Usage: untgz file.tgz extract all files\n" - " untgz file.tgz fname ... extract selected files\n" - " untgz -l file.tgz list archive contents\n" - " untgz -h display this help\n"); - exit(exitval); -} - -void error(const char *msg) -{ - fprintf(stderr, "%s: %s\n", prog, msg); - exit(1); -} - - -/* ============================================================ */ - -#if defined(WIN32) && defined(__GNUC__) -int _CRT_glob = 0; /* disable argument globbing in MinGW */ -#endif - - -int StartUntgz(char *TGZfile) -{ - int action = TGZ_EXTRACT; - gzFile *f; - f = gzopen(TGZfile,"rb"); - if (f == NULL) - { - Com_Printf("%s: Couldn't gzopen %s\n",prog,TGZfile); - return 1; - } - - return tar2(f, action); -} - - - - diff --git a/wolf3d/code/iphone/victory_wolf3dlite.tga b/wolf3d/code/iphone/victory_wolf3dlite.tga deleted file mode 100644 index f58fc0f..0000000 Binary files a/wolf3d/code/iphone/victory_wolf3dlite.tga and /dev/null differ diff --git a/wolf3d/code/iphone/wolf3d.xcodeproj/project.pbxproj b/wolf3d/code/iphone/wolf3d.xcodeproj/project.pbxproj index b9f1ec0..1e830c5 100644 --- a/wolf3d/code/iphone/wolf3d.xcodeproj/project.pbxproj +++ b/wolf3d/code/iphone/wolf3d.xcodeproj/project.pbxproj @@ -15,25 +15,17 @@ 35048AAD13E0A03A00516B10 /* credits_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 35048AAC13E0A03A00516B10 /* credits_bg.png */; }; 35048ABC13E0D2EA00516B10 /* wolf_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 35048ABB13E0D2EA00516B10 /* wolf_bg.png */; }; 35048AC113E0D51600516B10 /* iphone_preset_1.png in Resources */ = {isa = PBXBuildFile; fileRef = 35048ABD13E0D51600516B10 /* iphone_preset_1.png */; }; - 35048ADA13E0E98800516B10 /* difficulty_star1.png in Resources */ = {isa = PBXBuildFile; fileRef = 35048AD613E0E98800516B10 /* difficulty_star1.png */; }; - 35048ADB13E0E98800516B10 /* difficulty_star2.png in Resources */ = {isa = PBXBuildFile; fileRef = 35048AD713E0E98800516B10 /* difficulty_star2.png */; }; - 35048ADC13E0E98800516B10 /* difficulty_star3.png in Resources */ = {isa = PBXBuildFile; fileRef = 35048AD813E0E98800516B10 /* difficulty_star3.png */; }; - 35048ADD13E0E98800516B10 /* difficulty_star4.png in Resources */ = {isa = PBXBuildFile; fileRef = 35048AD913E0E98800516B10 /* difficulty_star4.png */; }; 350BA59813F34F7900FAE7E4 /* difficulty_head1.png in Resources */ = {isa = PBXBuildFile; fileRef = 350BA59413F34F7900FAE7E4 /* difficulty_head1.png */; }; 350BA59913F34F7900FAE7E4 /* difficulty_head2.png in Resources */ = {isa = PBXBuildFile; fileRef = 350BA59513F34F7900FAE7E4 /* difficulty_head2.png */; }; 350BA59A13F34F7900FAE7E4 /* difficulty_head3.png in Resources */ = {isa = PBXBuildFile; fileRef = 350BA59613F34F7900FAE7E4 /* difficulty_head3.png */; }; 350BA59B13F34F7900FAE7E4 /* difficulty_head4.png in Resources */ = {isa = PBXBuildFile; fileRef = 350BA59713F34F7900FAE7E4 /* difficulty_head4.png */; }; 350CCF9B13DF8B0E003303AB /* episode_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 350CCF9A13DF8B0E003303AB /* episode_bg.png */; }; 350CCF9F13DF8C47003303AB /* back_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 350CCF9D13DF8C47003303AB /* back_arrow.png */; }; - 350CCFA013DF8C47003303AB /* difficulty_selection_box.png in Resources */ = {isa = PBXBuildFile; fileRef = 350CCF9E13DF8C47003303AB /* difficulty_selection_box.png */; }; - 350CCFCE13DF8DED003303AB /* mission_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 350CCFCD13DF8DED003303AB /* mission_bg.png */; }; 3534C87513E208F400740F63 /* CreditsView~ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3534C87313E208F400740F63 /* CreditsView~ipad.xib */; }; 3534C87613E208F400740F63 /* TriviaView~ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3534C87413E208F400740F63 /* TriviaView~ipad.xib */; }; 3534C88F13E220CE00740F63 /* LegalView~ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3534C88E13E220CE00740F63 /* LegalView~ipad.xib */; }; 3534C95C13E241AB00740F63 /* LevelSelectView~ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3534C95B13E241AB00740F63 /* LevelSelectView~ipad.xib */; }; 3534C95E13E241B100740F63 /* EpisodeView~ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3534C95D13E241B100740F63 /* EpisodeView~ipad.xib */; }; - 3534C96A13E2485F00740F63 /* adv_button_frame.png in Resources */ = {isa = PBXBuildFile; fileRef = 3534C96913E2485F00740F63 /* adv_button_frame.png */; }; - 3534C96C13E2486700740F63 /* preset_frame.png in Resources */ = {isa = PBXBuildFile; fileRef = 3534C96B13E2486700740F63 /* preset_frame.png */; }; 3534C97F13E24E0E00740F63 /* SettingsView~ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3534C97E13E24E0E00740F63 /* SettingsView~ipad.xib */; }; 3555CC4013E2001A006E7D2F /* button_highlight.png in Resources */ = {isa = PBXBuildFile; fileRef = 3555CC3F13E2001A006E7D2F /* button_highlight.png */; }; 356D306D13F9820400EDDACE /* EpisodeCell~ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 356D306C13F9820400EDDACE /* EpisodeCell~ipad.xib */; }; @@ -56,8 +48,6 @@ 3D10C39F13F3212A00DF5856 /* WolfSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D10C39E13F3212A00DF5856 /* WolfSlider.m */; }; 3D10C3E413F33AB700DF5856 /* SkillViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D10C3E313F33AB700DF5856 /* SkillViewController.m */; }; 3D10C3F213F33D3700DF5856 /* SkillView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3D10C3F113F33D3700DF5856 /* SkillView.xib */; }; - 3D24009E13D89BF4009FC7A7 /* iphone_store.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D24009D13D89BF4009FC7A7 /* iphone_store.m */; }; - 3D24FF3913D77577009FC7A7 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D24FF3813D77577009FC7A7 /* StoreKit.framework */; }; 3D3ED73F13BF554400C5B1DF /* wolf3dViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D3ED73E13BF554400C5B1DF /* wolf3dViewController.m */; }; 3D3ED8D113BF775B00C5B1DF /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D3ED8D013BF775B00C5B1DF /* OpenAL.framework */; }; 3D3ED8EB13BF77A800C5B1DF /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D3ED8EA13BF77A800C5B1DF /* QuartzCore.framework */; }; @@ -90,59 +80,17 @@ 3DDD3A2413DF231100967735 /* UIFontButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DDD3A2313DF231100967735 /* UIFontButton.m */; }; 3DE8828613E35E5000C95AE8 /* arialImageLAL_white-alpha.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8824713E35E5000C95AE8 /* arialImageLAL_white-alpha.png */; }; 3DE8828713E35E5000C95AE8 /* arialImageLAL.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8824813E35E5000C95AE8 /* arialImageLAL.png */; }; - 3DE8828813E35E5000C95AE8 /* button_back.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8824913E35E5000C95AE8 /* button_back.png */; }; - 3DE8828913E35E5000C95AE8 /* button_downloads.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8824A13E35E5000C95AE8 /* button_downloads.png */; }; - 3DE8828A13E35E5000C95AE8 /* button_knife.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8824B13E35E5000C95AE8 /* button_knife.png */; }; - 3DE8828B13E35E5000C95AE8 /* button_left.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8824C13E35E5000C95AE8 /* button_left.png */; }; - 3DE8828C13E35E5000C95AE8 /* button_more.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8824D13E35E5000C95AE8 /* button_more.png */; }; - 3DE8828D13E35E5000C95AE8 /* button_new.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8824E13E35E5000C95AE8 /* button_new.png */; }; - 3DE8828E13E35E5000C95AE8 /* button_pistol.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8824F13E35E5000C95AE8 /* button_pistol.png */; }; - 3DE8828F13E35E5000C95AE8 /* button_resume.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8825013E35E5000C95AE8 /* button_resume.png */; }; - 3DE8829013E35E5000C95AE8 /* button_right.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8825113E35E5000C95AE8 /* button_right.png */; }; - 3DE8829113E35E5000C95AE8 /* button_settings.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8825213E35E5000C95AE8 /* button_settings.png */; }; - 3DE8829213E35E5000C95AE8 /* button_trivia.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8825313E35E5000C95AE8 /* button_trivia.png */; }; - 3DE8829313E35E5000C95AE8 /* button_web.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8825413E35E5000C95AE8 /* button_web.png */; }; - 3DE8829413E35E5000C95AE8 /* diractional_01.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8825513E35E5000C95AE8 /* diractional_01.png */; }; - 3DE8829513E35E5000C95AE8 /* diractional_02.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8825613E35E5000C95AE8 /* diractional_02.png */; }; - 3DE8829613E35E5000C95AE8 /* diractional_03.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8825713E35E5000C95AE8 /* diractional_03.png */; }; - 3DE8829A13E35E5000C95AE8 /* GODMODEFACE0PIC.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8825B13E35E5000C95AE8 /* GODMODEFACE0PIC.png */; }; - 3DE8829B13E35E5000C95AE8 /* GODMODEFACE1PIC.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8825C13E35E5000C95AE8 /* GODMODEFACE1PIC.png */; }; - 3DE8829C13E35E5000C95AE8 /* GODMODEFACE2PIC.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8825D13E35E5000C95AE8 /* GODMODEFACE2PIC.png */; }; - 3DE8829D13E35E5000C95AE8 /* header_advanced.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8825E13E35E5000C95AE8 /* header_advanced.png */; }; - 3DE8829E13E35E5000C95AE8 /* header_ep1.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8825F13E35E5000C95AE8 /* header_ep1.png */; }; - 3DE8829F13E35E5000C95AE8 /* header_ep2.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826013E35E5000C95AE8 /* header_ep2.png */; }; - 3DE882A013E35E5000C95AE8 /* header_ep3.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826113E35E5000C95AE8 /* header_ep3.png */; }; - 3DE882A113E35E5000C95AE8 /* header_ep4.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826213E35E5000C95AE8 /* header_ep4.png */; }; - 3DE882A213E35E5000C95AE8 /* header_ep5.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826313E35E5000C95AE8 /* header_ep5.png */; }; - 3DE882A313E35E5000C95AE8 /* header_ep6.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826413E35E5000C95AE8 /* header_ep6.png */; }; - 3DE882A413E35E5000C95AE8 /* header_ep7.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826513E35E5000C95AE8 /* header_ep7.png */; }; - 3DE882A513E35E5000C95AE8 /* header_ep8.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826613E35E5000C95AE8 /* header_ep8.png */; }; - 3DE882A613E35E5000C95AE8 /* header_ep9.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826713E35E5000C95AE8 /* header_ep9.png */; }; - 3DE882A713E35E5000C95AE8 /* header_ep10.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826813E35E5000C95AE8 /* header_ep10.png */; }; - 3DE882A813E35E5000C95AE8 /* header_ep11.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826913E35E5000C95AE8 /* header_ep11.png */; }; 3DE882A913E35E5000C95AE8 /* intermission.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826A13E35E5000C95AE8 /* intermission.png */; }; 3DE882AA13E35E5000C95AE8 /* iphone_image.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826B13E35E5000C95AE8 /* iphone_image.png */; }; 3DE882AB13E35E5000C95AE8 /* kills_shadow.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826C13E35E5000C95AE8 /* kills_shadow.png */; }; 3DE882AC13E35E5000C95AE8 /* kills.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826D13E35E5000C95AE8 /* kills.png */; }; 3DE882AD13E35E5000C95AE8 /* map_background.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826E13E35E5000C95AE8 /* map_background.png */; }; - 3DE882AE13E35E5000C95AE8 /* map.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826F13E35E5000C95AE8 /* map.png */; }; - 3DE882AF13E35E5000C95AE8 /* menu_bar.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827013E35E5000C95AE8 /* menu_bar.png */; }; - 3DE882B013E35E5000C95AE8 /* menu.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827113E35E5000C95AE8 /* menu.png */; }; - 3DE882B113E35E5000C95AE8 /* music_off.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827213E35E5000C95AE8 /* music_off.png */; }; - 3DE882B213E35E5000C95AE8 /* music_on.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827313E35E5000C95AE8 /* music_on.png */; }; 3DE882B313E35E5000C95AE8 /* partime_shadow.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827413E35E5000C95AE8 /* partime_shadow.png */; }; 3DE882B413E35E5000C95AE8 /* partime.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827513E35E5000C95AE8 /* partime.png */; }; 3DE882B513E35E5000C95AE8 /* secrets_shadow.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827613E35E5000C95AE8 /* secrets_shadow.png */; }; 3DE882B613E35E5000C95AE8 /* secrets.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827713E35E5000C95AE8 /* secrets.png */; }; - 3DE882B713E35E5000C95AE8 /* shoot.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827813E35E5000C95AE8 /* shoot.png */; }; - 3DE882B813E35E5000C95AE8 /* side_2_side.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827913E35E5000C95AE8 /* side_2_side.png */; }; - 3DE882B913E35E5000C95AE8 /* slider_bar_rainbow.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827A13E35E5000C95AE8 /* slider_bar_rainbow.png */; }; - 3DE882BA13E35E5000C95AE8 /* slider_bar_underlay.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827B13E35E5000C95AE8 /* slider_bar_underlay.png */; }; - 3DE882BB13E35E5000C95AE8 /* slider_bar.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827C13E35E5000C95AE8 /* slider_bar.png */; }; - 3DE882BC13E35E5000C95AE8 /* slider_knob.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827D13E35E5000C95AE8 /* slider_knob.png */; }; 3DE882BD13E35E5000C95AE8 /* stats_large.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827E13E35E5000C95AE8 /* stats_large.png */; }; 3DE882BE13E35E5000C95AE8 /* stats.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827F13E35E5000C95AE8 /* stats.png */; }; - 3DE882BF13E35E5000C95AE8 /* status_hud.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8828013E35E5000C95AE8 /* status_hud.png */; }; 3DE882C013E35E5000C95AE8 /* submenus_background_image.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8828113E35E5000C95AE8 /* submenus_background_image.png */; }; 3DE882C113E35E5000C95AE8 /* treasure_shadow.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8828213E35E5000C95AE8 /* treasure_shadow.png */; }; 3DE882C213E35E5000C95AE8 /* treasure.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8828313E35E5000C95AE8 /* treasure.png */; }; @@ -177,21 +125,21 @@ 7229CC570F6B3222004123C5 /* wolf_sprites.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC410F6B3222004123C5 /* wolf_sprites.c */; }; 7229CC580F6B3222004123C5 /* wolf_sv_ccmds.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC430F6B3222004123C5 /* wolf_sv_ccmds.c */; }; 7229CC590F6B3222004123C5 /* wolf_weapon.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC440F6B3222004123C5 /* wolf_weapon.c */; }; - 7229CC7D0F6B3295004123C5 /* bitwise.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC5D0F6B3295004123C5 /* bitwise.c */; }; - 7229CC7E0F6B3295004123C5 /* block.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC5E0F6B3295004123C5 /* block.c */; }; - 7229CC7F0F6B3295004123C5 /* codebook.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC600F6B3295004123C5 /* codebook.c */; }; - 7229CC800F6B3295004123C5 /* floor0.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC640F6B3295004123C5 /* floor0.c */; }; - 7229CC810F6B3295004123C5 /* floor1.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC650F6B3295004123C5 /* floor1.c */; }; - 7229CC820F6B3295004123C5 /* framing.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC660F6B3295004123C5 /* framing.c */; }; - 7229CC830F6B3295004123C5 /* info.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC670F6B3295004123C5 /* info.c */; }; - 7229CC850F6B3295004123C5 /* mapping0.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC6C0F6B3295004123C5 /* mapping0.c */; }; - 7229CC860F6B3295004123C5 /* mdct.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC6D0F6B3295004123C5 /* mdct.c */; }; - 7229CC870F6B3295004123C5 /* registry.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC740F6B3295004123C5 /* registry.c */; }; - 7229CC880F6B3295004123C5 /* res012.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC760F6B3295004123C5 /* res012.c */; }; - 7229CC890F6B3295004123C5 /* sharedbook.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC770F6B3295004123C5 /* sharedbook.c */; }; - 7229CC8A0F6B3295004123C5 /* synthesis.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC780F6B3295004123C5 /* synthesis.c */; }; - 7229CC8B0F6B3295004123C5 /* vorbisfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC790F6B3295004123C5 /* vorbisfile.c */; }; - 7229CC8C0F6B3295004123C5 /* window.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC7A0F6B3295004123C5 /* window.c */; }; + 7229CC7D0F6B3295004123C5 /* bitwise.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC5D0F6B3295004123C5 /* bitwise.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + 7229CC7E0F6B3295004123C5 /* block.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC5E0F6B3295004123C5 /* block.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + 7229CC7F0F6B3295004123C5 /* codebook.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC600F6B3295004123C5 /* codebook.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + 7229CC800F6B3295004123C5 /* floor0.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC640F6B3295004123C5 /* floor0.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + 7229CC810F6B3295004123C5 /* floor1.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC650F6B3295004123C5 /* floor1.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + 7229CC820F6B3295004123C5 /* framing.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC660F6B3295004123C5 /* framing.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + 7229CC830F6B3295004123C5 /* info.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC670F6B3295004123C5 /* info.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + 7229CC850F6B3295004123C5 /* mapping0.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC6C0F6B3295004123C5 /* mapping0.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + 7229CC860F6B3295004123C5 /* mdct.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC6D0F6B3295004123C5 /* mdct.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + 7229CC870F6B3295004123C5 /* registry.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC740F6B3295004123C5 /* registry.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + 7229CC880F6B3295004123C5 /* res012.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC760F6B3295004123C5 /* res012.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + 7229CC890F6B3295004123C5 /* sharedbook.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC770F6B3295004123C5 /* sharedbook.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + 7229CC8A0F6B3295004123C5 /* synthesis.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC780F6B3295004123C5 /* synthesis.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + 7229CC8B0F6B3295004123C5 /* vorbisfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC790F6B3295004123C5 /* vorbisfile.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + 7229CC8C0F6B3295004123C5 /* window.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC7A0F6B3295004123C5 /* window.c */; settings = {COMPILER_FLAGS = "-w"; }; }; 7229CE4A0F6C89F8004123C5 /* EAGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7229CE460F6C89F8004123C5 /* EAGLView.m */; }; 7229CE4C0F6C89F8004123C5 /* wolf3dAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7229CE490F6C89F8004123C5 /* wolf3dAppDelegate.m */; }; 7229CE550F6C8CDE004123C5 /* gles_glue.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CE540F6C8CDE004123C5 /* gles_glue.c */; }; @@ -230,9 +178,214 @@ 72935BA20F6B2D9D0085DD28 /* zmem.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B720F6B2D9D0085DD28 /* zmem.c */; }; 72A7E8F70F5F2063005B83C0 /* iphone_menus.c in Sources */ = {isa = PBXBuildFile; fileRef = 72A7E8F60F5F2063005B83C0 /* iphone_menus.c */; }; 72B5FF390F7E5C3D00C8A372 /* hud.c in Sources */ = {isa = PBXBuildFile; fileRef = 72B5FF380F7E5C3D00C8A372 /* hud.c */; }; + A1129052206A808100BEDEB5 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A1129051206A808100BEDEB5 /* Launch Screen.storyboard */; }; + A112905E206DF0DB00BEDEB5 /* header_advanced.png in Resources */ = {isa = PBXBuildFile; fileRef = A112905D206DF0DA00BEDEB5 /* header_advanced.png */; }; + A12D765020913DB900B4A4BB /* MainMenuView-tvos.xib in Resources */ = {isa = PBXBuildFile; fileRef = A12D764D20913B9C00B4A4BB /* MainMenuView-tvos.xib */; }; + A12D765120913E1900B4A4BB /* base in Resources */ = {isa = PBXBuildFile; fileRef = A19BF3691FD6E4C800DAC4C1 /* base */; }; + A12D76542091491900B4A4BB /* CreditsView-tvos.xib in Resources */ = {isa = PBXBuildFile; fileRef = A12D76522091491500B4A4BB /* CreditsView-tvos.xib */; }; + A12D76582091496E00B4A4BB /* EpisodeView-tvos.xib in Resources */ = {isa = PBXBuildFile; fileRef = A12D76572091496E00B4A4BB /* EpisodeView-tvos.xib */; }; + A12D765A2091498000B4A4BB /* LegalView-tvos.xib in Resources */ = {isa = PBXBuildFile; fileRef = A12D76592091498000B4A4BB /* LegalView-tvos.xib */; }; + A12D765C209149A100B4A4BB /* LevelSelectView-tvos.xib in Resources */ = {isa = PBXBuildFile; fileRef = A12D765B209149A100B4A4BB /* LevelSelectView-tvos.xib */; }; + A12D765E209149BF00B4A4BB /* SkillView-tvos.xib in Resources */ = {isa = PBXBuildFile; fileRef = A12D765D209149BF00B4A4BB /* SkillView-tvos.xib */; }; + A12D7660209149CF00B4A4BB /* TriviaView-tvos.xib in Resources */ = {isa = PBXBuildFile; fileRef = A12D765F209149CF00B4A4BB /* TriviaView-tvos.xib */; }; + A12D766520914F8700B4A4BB /* EpisodeCell-tvos.xib in Resources */ = {isa = PBXBuildFile; fileRef = A12D766320914F8700B4A4BB /* EpisodeCell-tvos.xib */; }; + A1337A1A2090BAE400F4D670 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A1337A192090BAE400F4D670 /* Assets.xcassets */; }; + A1337A282090BBA700F4D670 /* CreditsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D5C0CF613DF9A5D008ECBD1 /* CreditsViewController.m */; }; + A1337A292090BBA700F4D670 /* EpisodeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D5C0C2A13DF6836008ECBD1 /* EpisodeViewController.m */; }; + A1337A2A2090BBA700F4D670 /* LegalViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D5C0CF913DF9A8E008ECBD1 /* LegalViewController.m */; }; + A1337A2B2090BBA700F4D670 /* LevelSelectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D5C0C4A13DF800E008ECBD1 /* LevelSelectViewController.m */; }; + A1337A2C2090BBA700F4D670 /* MainMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D86CF8C13DDE51800186487 /* MainMenuViewController.m */; }; + A1337A2D2090BBA700F4D670 /* wolf3dViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D3ED73E13BF554400C5B1DF /* wolf3dViewController.m */; }; + A1337A2E2090BBA700F4D670 /* TriviaViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D5C0DE113E05D4D008ECBD1 /* TriviaViewController.m */; }; + A1337A2F2090BBA700F4D670 /* SkillViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D10C3E313F33AB700DF5856 /* SkillViewController.m */; }; + A1337A302090BC4C00F4D670 /* EAGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7229CE460F6C89F8004123C5 /* EAGLView.m */; }; + A1337A312090BC6C00F4D670 /* gles_glue.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CE540F6C8CDE004123C5 /* gles_glue.c */; }; + A1337A322090BC6C00F4D670 /* hud.c in Sources */ = {isa = PBXBuildFile; fileRef = 72B5FF380F7E5C3D00C8A372 /* hud.c */; }; + A1337A332090BC6C00F4D670 /* iphone_alerts.m in Sources */ = {isa = PBXBuildFile; fileRef = ED0A8D0C1069ACA8001E0547 /* iphone_alerts.m */; }; + A1337A342090BC6C00F4D670 /* iphone_downloadSOD.m in Sources */ = {isa = PBXBuildFile; fileRef = ED0A8D0D1069ACA8001E0547 /* iphone_downloadSOD.m */; }; + A1337A352090BC6C00F4D670 /* iphone_downloadUserMap.m in Sources */ = {isa = PBXBuildFile; fileRef = ED0A8D0E1069ACA8001E0547 /* iphone_downloadUserMap.m */; }; + A1337A362090BC6C00F4D670 /* iphone_loop.c in Sources */ = {isa = PBXBuildFile; fileRef = 43CF03090F56D5C200E4A23D /* iphone_loop.c */; }; + A1337A372090BC6C00F4D670 /* iphone_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 43E8D2DF0F4FC61E003F09B2 /* iphone_main.c */; }; + A1337A382090BC6C00F4D670 /* iphone_mapselector.c in Sources */ = {isa = PBXBuildFile; fileRef = ED0A8D0F1069ACA8001E0547 /* iphone_mapselector.c */; }; + A1337A392090BC6C00F4D670 /* iphone_menus.c in Sources */ = {isa = PBXBuildFile; fileRef = 72A7E8F60F5F2063005B83C0 /* iphone_menus.c */; }; + A1337A3B2090BC6C00F4D670 /* iphone_sys.m in Sources */ = {isa = PBXBuildFile; fileRef = 43AF6B940F996DA200777569 /* iphone_sys.m */; }; + A1337A3C2090BC6C00F4D670 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; + A1337A3D2090BC6C00F4D670 /* MissionTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D5C0FD713E10204008ECBD1 /* MissionTableViewCell.m */; }; + A1337A3E2090BC8700F4D670 /* bitwise.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC5D0F6B3295004123C5 /* bitwise.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + A1337A3F2090BC8700F4D670 /* block.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC5E0F6B3295004123C5 /* block.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + A1337A402090BC8700F4D670 /* codebook.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC600F6B3295004123C5 /* codebook.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + A1337A412090BC8700F4D670 /* floor0.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC640F6B3295004123C5 /* floor0.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + A1337A422090BC8700F4D670 /* floor1.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC650F6B3295004123C5 /* floor1.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + A1337A432090BC8700F4D670 /* framing.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC660F6B3295004123C5 /* framing.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + A1337A442090BC8700F4D670 /* info.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC670F6B3295004123C5 /* info.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + A1337A452090BC8700F4D670 /* mapping0.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC6C0F6B3295004123C5 /* mapping0.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + A1337A462090BC8700F4D670 /* registry.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC740F6B3295004123C5 /* registry.c */; }; + A1337A472090BC8700F4D670 /* res012.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC760F6B3295004123C5 /* res012.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + A1337A482090BC8700F4D670 /* sharedbook.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC770F6B3295004123C5 /* sharedbook.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + A1337A492090BC8700F4D670 /* synthesis.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC780F6B3295004123C5 /* synthesis.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + A1337A4A2090BC8700F4D670 /* vorbisfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC790F6B3295004123C5 /* vorbisfile.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + A1337A4B2090BC8700F4D670 /* window.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC7A0F6B3295004123C5 /* window.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + A1337A4C2090BCA700F4D670 /* UIFontButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DDD3A2313DF231100967735 /* UIFontButton.m */; }; + A1337A4D2090BCA700F4D670 /* UIFontLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D5C0C6F13DF8920008ECBD1 /* UIFontLabel.m */; }; + A1337A4F2090BCA700F4D670 /* UITableViewScrolling.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DBC68B213F58BCC002A8253 /* UITableViewScrolling.m */; }; + A1337A502090BCB800F4D670 /* wolf3dAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7229CE490F6C89F8004123C5 /* wolf3dAppDelegate.m */; }; + A1337A512090BCBF00F4D670 /* POSITYPE-idSettler10v2.otf in Resources */ = {isa = PBXBuildFile; fileRef = 3D86D68A13DF172B00186487 /* POSITYPE-idSettler10v2.otf */; }; + A1337A522090BCCF00F4D670 /* dist.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4364BF3E0F5CB25900F29317 /* dist.plist */; }; + A1337A532090BCE100F4D670 /* GODMODEFACE0PIC.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B98206E07C300D46B47 /* GODMODEFACE0PIC.png */; }; + A1337A542090BCE100F4D670 /* GODMODEFACE1PIC.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B99206E07C300D46B47 /* GODMODEFACE1PIC.png */; }; + A1337A552090BCE100F4D670 /* GODMODEFACE2PIC.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B9A206E07C300D46B47 /* GODMODEFACE2PIC.png */; }; + A1337A562090BCE100F4D670 /* adv_btn.png in Resources */ = {isa = PBXBuildFile; fileRef = 35E6E15413F3172F0010F530 /* adv_btn.png */; }; + A1337A572090BCE100F4D670 /* arialImageLAL_white-alpha.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8824713E35E5000C95AE8 /* arialImageLAL_white-alpha.png */; }; + A1337A582090BCE100F4D670 /* arialImageLAL.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8824813E35E5000C95AE8 /* arialImageLAL.png */; }; + A1337A592090BCE100F4D670 /* back_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 350CCF9D13DF8C47003303AB /* back_arrow.png */; }; + A1337A5A2090BCE100F4D670 /* button_highlight.png in Resources */ = {isa = PBXBuildFile; fileRef = 3555CC3F13E2001A006E7D2F /* button_highlight.png */; }; + A1337A5B2090BCE100F4D670 /* credits_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 35048AAC13E0A03A00516B10 /* credits_bg.png */; }; + A1337A5C2090BCE100F4D670 /* difficulty_head1.png in Resources */ = {isa = PBXBuildFile; fileRef = 350BA59413F34F7900FAE7E4 /* difficulty_head1.png */; }; + A1337A5D2090BCE100F4D670 /* difficulty_head2.png in Resources */ = {isa = PBXBuildFile; fileRef = 350BA59513F34F7900FAE7E4 /* difficulty_head2.png */; }; + A1337A5E2090BCE100F4D670 /* difficulty_head3.png in Resources */ = {isa = PBXBuildFile; fileRef = 350BA59613F34F7900FAE7E4 /* difficulty_head3.png */; }; + A1337A5F2090BCE100F4D670 /* difficulty_head4.png in Resources */ = {isa = PBXBuildFile; fileRef = 350BA59713F34F7900FAE7E4 /* difficulty_head4.png */; }; + A1337A602090BCE100F4D670 /* down_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 35E6E16813F318A50010F530 /* down_arrow.png */; }; + A1337A612090BCE100F4D670 /* episode_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 350CCF9A13DF8B0E003303AB /* episode_bg.png */; }; + A1337A622090BCE100F4D670 /* episode_bracket.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DF1804213F44D6700ED668A /* episode_bracket.png */; }; + A1337A632090BCE100F4D670 /* episode_divider.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DF1804313F44D6700ED668A /* episode_divider.png */; }; + A1337A642090BCE100F4D670 /* header_advanced.png in Resources */ = {isa = PBXBuildFile; fileRef = A112905D206DF0DA00BEDEB5 /* header_advanced.png */; }; + A1337A652090BCE100F4D670 /* header_ep1.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B84206DFC2D00D46B47 /* header_ep1.png */; }; + A1337A662090BCE100F4D670 /* header_ep2.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B86206DFC2D00D46B47 /* header_ep2.png */; }; + A1337A672090BCE100F4D670 /* header_ep3.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B8B206DFC2E00D46B47 /* header_ep3.png */; }; + A1337A682090BCE100F4D670 /* header_ep4.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B85206DFC2D00D46B47 /* header_ep4.png */; }; + A1337A692090BCE100F4D670 /* header_ep5.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B88206DFC2D00D46B47 /* header_ep5.png */; }; + A1337A6A2090BCE100F4D670 /* header_ep6.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B87206DFC2D00D46B47 /* header_ep6.png */; }; + A1337A6B2090BCE100F4D670 /* header_ep7.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B8A206DFC2E00D46B47 /* header_ep7.png */; }; + A1337A6C2090BCE100F4D670 /* header_ep8.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B82206DFC2D00D46B47 /* header_ep8.png */; }; + A1337A6D2090BCE100F4D670 /* header_ep9.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B89206DFC2E00D46B47 /* header_ep9.png */; }; + A1337A6E2090BCE100F4D670 /* header_ep10.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B83206DFC2D00D46B47 /* header_ep10.png */; }; + A1337A6F2090BCE100F4D670 /* header_ep11.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B8C206DFC2E00D46B47 /* header_ep11.png */; }; + A1337A702090BCE100F4D670 /* highlight_bracket.png in Resources */ = {isa = PBXBuildFile; fileRef = 35E6E16313F318600010F530 /* highlight_bracket.png */; }; + A1337A712090BCE100F4D670 /* intermission.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826A13E35E5000C95AE8 /* intermission.png */; }; + A1337A722090BCE100F4D670 /* iphone_image.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826B13E35E5000C95AE8 /* iphone_image.png */; }; + A1337A732090BCE100F4D670 /* iphone_preset_1.png in Resources */ = {isa = PBXBuildFile; fileRef = 35048ABD13E0D51600516B10 /* iphone_preset_1.png */; }; + A1337A742090BCE100F4D670 /* iphone_preset_2.png in Resources */ = {isa = PBXBuildFile; fileRef = 3D5C0F7F13E0FC46008ECBD1 /* iphone_preset_2.png */; }; + A1337A752090BCE100F4D670 /* iphone_preset_3.png in Resources */ = {isa = PBXBuildFile; fileRef = 3D5C0F8013E0FC46008ECBD1 /* iphone_preset_3.png */; }; + A1337A762090BCE100F4D670 /* iphone_preset_4.png in Resources */ = {isa = PBXBuildFile; fileRef = 3D5C0F8113E0FC46008ECBD1 /* iphone_preset_4.png */; }; + A1337A772090BCE100F4D670 /* kills_shadow.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826C13E35E5000C95AE8 /* kills_shadow.png */; }; + A1337A782090BCE100F4D670 /* kills.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826D13E35E5000C95AE8 /* kills.png */; }; + A1337A792090BCE100F4D670 /* left_chevron.png in Resources */ = {isa = PBXBuildFile; fileRef = 35E6E15E13F318420010F530 /* left_chevron.png */; }; + A1337A7A2090BCE100F4D670 /* main_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 3D5C0D0913DF9B41008ECBD1 /* main_bg.png */; }; + A1337A7B2090BCE100F4D670 /* map_background.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8826E13E35E5000C95AE8 /* map_background.png */; }; + A1337A7C2090BCE100F4D670 /* next_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 35048AA913E07E7800516B10 /* next_arrow.png */; }; + A1337A7D2090BCE100F4D670 /* partime_shadow.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827413E35E5000C95AE8 /* partime_shadow.png */; }; + A1337A7E2090BCE100F4D670 /* partime.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827513E35E5000C95AE8 /* partime.png */; }; + A1337A7F2090BCE100F4D670 /* right_chevron.png in Resources */ = {isa = PBXBuildFile; fileRef = 35E6E15F13F318420010F530 /* right_chevron.png */; }; + A1337A802090BCE100F4D670 /* secrets_shadow.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827613E35E5000C95AE8 /* secrets_shadow.png */; }; + A1337A812090BCE100F4D670 /* secrets.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827713E35E5000C95AE8 /* secrets.png */; }; + A1337A822090BCE100F4D670 /* settings_divider.png in Resources */ = {isa = PBXBuildFile; fileRef = 35E6E15913F3182C0010F530 /* settings_divider.png */; }; + A1337A832090BCE100F4D670 /* settings_line_art.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DBC68E613F599B4002A8253 /* settings_line_art.png */; }; + A1337A842090BCE100F4D670 /* settings_slider_blue.png in Resources */ = {isa = PBXBuildFile; fileRef = 35E6E19F13F321A50010F530 /* settings_slider_blue.png */; }; + A1337A852090BCE100F4D670 /* settings_slider_blue~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3589EBA513F5E3DC005FBE56 /* settings_slider_blue~ipad.png */; }; + A1337A862090BCE100F4D670 /* settings_slider_grey.png in Resources */ = {isa = PBXBuildFile; fileRef = 35E6E1A013F321A50010F530 /* settings_slider_grey.png */; }; + A1337A872090BCE100F4D670 /* settings_slider_grey~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3589EBA613F5E3DC005FBE56 /* settings_slider_grey~ipad.png */; }; + A1337A882090BCE100F4D670 /* settings_slider_white.png in Resources */ = {isa = PBXBuildFile; fileRef = 35E6E1A113F321A50010F530 /* settings_slider_white.png */; }; + A1337A892090BCE100F4D670 /* settings_slider_white~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3589EBA713F5E3DC005FBE56 /* settings_slider_white~ipad.png */; }; + A1337A8A2090BCE100F4D670 /* star_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 35E6E17413F3196A0010F530 /* star_icon.png */; }; + A1337A8B2090BCE100F4D670 /* stats_large.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827E13E35E5000C95AE8 /* stats_large.png */; }; + A1337A8C2090BCE100F4D670 /* stats.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8827F13E35E5000C95AE8 /* stats.png */; }; + A1337A8D2090BCE100F4D670 /* submenus_background_image.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8828113E35E5000C95AE8 /* submenus_background_image.png */; }; + A1337A8E2090BCE100F4D670 /* treasure_shadow.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8828213E35E5000C95AE8 /* treasure_shadow.png */; }; + A1337A8F2090BCE100F4D670 /* treasure.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8828313E35E5000C95AE8 /* treasure.png */; }; + A1337A902090BCE100F4D670 /* up_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 35E6E15A13F3182C0010F530 /* up_arrow.png */; }; + A1337A912090BCE100F4D670 /* up_down.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8828413E35E5000C95AE8 /* up_down.png */; }; + A1337A922090BCE100F4D670 /* victory_256.png in Resources */ = {isa = PBXBuildFile; fileRef = 3DE8828513E35E5000C95AE8 /* victory_256.png */; }; + A1337A932090BCE100F4D670 /* wolf_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 35048ABB13E0D2EA00516B10 /* wolf_bg.png */; }; + A1337A942090BCE100F4D670 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 43CF02FE0F56974E00E4A23D /* Default.png */; }; + A1337A952090BCEA00F4D670 /* wondering.caf in Resources */ = {isa = PBXBuildFile; fileRef = 3DB873FE13FB3C0E0050FB2A /* wondering.caf */; }; + A1337A962090BCF000F4D670 /* wolf3d_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 43CF02EC0F56955F00E4A23D /* wolf3d_icon.png */; }; + A1337A972090BCF000F4D670 /* wolf3dlite_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 43E341280F9BB4B6003C5D00 /* wolf3dlite_icon.png */; }; + A1337A982090BCF800F4D670 /* WOLF_57.png in Resources */ = {isa = PBXBuildFile; fileRef = C8D1CFE313E22B5200F0EAC6 /* WOLF_57.png */; }; + A1337A992090BCF800F4D670 /* WOLF_72.png in Resources */ = {isa = PBXBuildFile; fileRef = C8D1CFE713E22B6800F0EAC6 /* WOLF_72.png */; }; + A1337A9A2090BCF800F4D670 /* WOLF_114.png in Resources */ = {isa = PBXBuildFile; fileRef = C8D1CFE513E22B5B00F0EAC6 /* WOLF_114.png */; }; + A1337AA52090BDC300F4D670 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1337A9B2090BDC100F4D670 /* AudioToolbox.framework */; }; + A1337AA62090BDC300F4D670 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1337A9C2090BDC200F4D670 /* OpenGLES.framework */; }; + A1337AA82090BDC300F4D670 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1337A9E2090BDC200F4D670 /* SystemConfiguration.framework */; }; + A1337AA92090BDC300F4D670 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1337A9F2090BDC200F4D670 /* AVFoundation.framework */; }; + A1337AAA2090BDC300F4D670 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1337AA02090BDC200F4D670 /* UIKit.framework */; }; + A1337AAB2090BDC300F4D670 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1337AA12090BDC200F4D670 /* Foundation.framework */; }; + A1337AAC2090BDC300F4D670 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1337AA22090BDC200F4D670 /* OpenAL.framework */; }; + A1337AAD2090BDC300F4D670 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1337AA32090BDC200F4D670 /* CoreGraphics.framework */; }; + A1337AAE2090BDC300F4D670 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1337AA42090BDC200F4D670 /* GameController.framework */; }; + A1337AB02090BDEA00F4D670 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1337AAF2090BDEA00F4D670 /* QuartzCore.framework */; }; + A1337AB12091388600F4D670 /* wolf_actor_ai.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC250F6B3222004123C5 /* wolf_actor_ai.c */; }; + A1337AB22091388600F4D670 /* wolf_actors.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC270F6B3222004123C5 /* wolf_actors.c */; }; + A1337AB32091388600F4D670 /* wolf_ai_com.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC290F6B3222004123C5 /* wolf_ai_com.c */; }; + A1337AB42091388600F4D670 /* wolf_areas.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC2B0F6B3222004123C5 /* wolf_areas.c */; }; + A1337AB52091388600F4D670 /* wolf_bj.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC2C0F6B3222004123C5 /* wolf_bj.c */; }; + A1337AB62091388600F4D670 /* wolf_client_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC2E0F6B3222004123C5 /* wolf_client_main.c */; }; + A1337AB72091388600F4D670 /* wolf_doors.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC300F6B3222004123C5 /* wolf_doors.c */; }; + A1337AB82091388600F4D670 /* wolf_level.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC310F6B3222004123C5 /* wolf_level.c */; }; + A1337AB92091388600F4D670 /* wolf_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC340F6B3222004123C5 /* wolf_main.c */; }; + A1337ABA2091388600F4D670 /* wolf_math.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC350F6B3222004123C5 /* wolf_math.c */; }; + A1337ABB2091388600F4D670 /* wolf_opengl.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC370F6B3222004123C5 /* wolf_opengl.c */; }; + A1337ABC2091388600F4D670 /* wolf_player.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC380F6B3222004123C5 /* wolf_player.c */; }; + A1337ABD2091388600F4D670 /* wolf_powerups.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC3A0F6B3222004123C5 /* wolf_powerups.c */; }; + A1337ABE2091388600F4D670 /* wolf_pushwalls.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC3C0F6B3222004123C5 /* wolf_pushwalls.c */; }; + A1337ABF2091388600F4D670 /* wolf_raycast.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC3D0F6B3222004123C5 /* wolf_raycast.c */; }; + A1337AC02091388600F4D670 /* wolf_renderer.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC3F0F6B3222004123C5 /* wolf_renderer.c */; }; + A1337AC12091388600F4D670 /* wolf_sprites.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC410F6B3222004123C5 /* wolf_sprites.c */; }; + A1337AC22091388600F4D670 /* wolf_sv_ccmds.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC430F6B3222004123C5 /* wolf_sv_ccmds.c */; }; + A1337AC32091388600F4D670 /* wolf_weapon.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC440F6B3222004123C5 /* wolf_weapon.c */; }; + A1337AC4209138FA00F4D670 /* angle.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B1A0F6B2D9D0085DD28 /* angle.c */; }; + A1337AC5209138FA00F4D670 /* arch.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B1D0F6B2D9D0085DD28 /* arch.c */; }; + A1337AC6209138FA00F4D670 /* cmd.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B230F6B2D9D0085DD28 /* cmd.c */; }; + A1337AC7209138FA00F4D670 /* com_string.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B250F6B2D9D0085DD28 /* com_string.c */; }; + A1337AC8209138FA00F4D670 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B270F6B2D9D0085DD28 /* common.c */; }; + A1337AC9209138FA00F4D670 /* console.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B2A0F6B2D9D0085DD28 /* console.c */; }; + A1337ACA209138FA00F4D670 /* cvar.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B2D0F6B2D9D0085DD28 /* cvar.c */; }; + A1337ACB209138FA00F4D670 /* fileio.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B2F0F6B2D9D0085DD28 /* fileio.c */; }; + A1337ACC209138FA00F4D670 /* files.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B310F6B2D9D0085DD28 /* files.c */; }; + A1337ACD209138FA00F4D670 /* filestring.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B320F6B2D9D0085DD28 /* filestring.c */; }; + A1337ACE209138FA00F4D670 /* font_manager.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B350F6B2D9D0085DD28 /* font_manager.c */; }; + A1337ACF209138FA00F4D670 /* glob.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B370F6B2D9D0085DD28 /* glob.c */; }; + A1337AD0209138FA00F4D670 /* math.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B3E0F6B2D9D0085DD28 /* math.c */; }; + A1337AD1209138FA00F4D670 /* matrix.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B3F0F6B2D9D0085DD28 /* matrix.c */; }; + A1337AD2209138FA00F4D670 /* memory.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B410F6B2D9D0085DD28 /* memory.c */; }; + A1337AD3209138FA00F4D670 /* oggfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B490F6B2D9D0085DD28 /* oggfile.c */; }; + A1337AD4209138FA00F4D670 /* openal_binding.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B4B0F6B2D9D0085DD28 /* openal_binding.c */; }; + A1337AD5209138FA00F4D670 /* openal_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B4D0F6B2D9D0085DD28 /* openal_main.c */; }; + A1337AD6209138FA00F4D670 /* opengl_draw.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B500F6B2D9D0085DD28 /* opengl_draw.c */; }; + A1337AD7209138FA00F4D670 /* opengl_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B530F6B2D9D0085DD28 /* opengl_main.c */; }; + A1337AD8209138FA00F4D670 /* opengl_texture.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B540F6B2D9D0085DD28 /* opengl_texture.c */; }; + A1337AD9209138FA00F4D670 /* random_number.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B560F6B2D9D0085DD28 /* random_number.c */; }; + A1337ADA209138FA00F4D670 /* share.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B590F6B2D9D0085DD28 /* share.c */; }; + A1337ADB209138FA00F4D670 /* sound.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B5A0F6B2D9D0085DD28 /* sound.c */; }; + A1337ADC209138FA00F4D670 /* sound_sfx_id.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B5D0F6B2D9D0085DD28 /* sound_sfx_id.c */; }; + A1337ADD209138FA00F4D670 /* sound_stream.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B5E0F6B2D9D0085DD28 /* sound_stream.c */; }; + A1337ADE209138FA00F4D670 /* texture_manager.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B610F6B2D9D0085DD28 /* texture_manager.c */; }; + A1337ADF209138FA00F4D670 /* tga.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B630F6B2D9D0085DD28 /* tga.c */; }; + A1337AE0209138FA00F4D670 /* unix_file.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B680F6B2D9D0085DD28 /* unix_file.c */; }; + A1337AE1209138FA00F4D670 /* unix_timer.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B6A0F6B2D9D0085DD28 /* unix_timer.c */; }; + A1337AE2209138FA00F4D670 /* vector.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B6B0F6B2D9D0085DD28 /* vector.c */; }; + A1337AE3209138FA00F4D670 /* wavfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B6E0F6B2D9D0085DD28 /* wavfile.c */; }; + A1337AE4209138FA00F4D670 /* zmem.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B720F6B2D9D0085DD28 /* zmem.c */; }; + A1337AE52091396900F4D670 /* mdct.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC6D0F6B3295004123C5 /* mdct.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + A19BF36A1FD6E4E100DAC4C1 /* base in Resources */ = {isa = PBXBuildFile; fileRef = A19BF3691FD6E4C800DAC4C1 /* base */; }; + A1B3746D2036A6CA00E1C7BE /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1B3746C2036A6CA00E1C7BE /* CoreMotion.framework */; }; + A1B7CA33209D195B00743C98 /* Default-Portrait.png in Resources */ = {isa = PBXBuildFile; fileRef = A1B7CA31209D195B00743C98 /* Default-Portrait.png */; }; + A1B7CA34209D195B00743C98 /* Default-Portrait~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = A1B7CA32209D195B00743C98 /* Default-Portrait~ipad.png */; }; + A1BB8B8D206DFC2E00D46B47 /* header_ep8.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B82206DFC2D00D46B47 /* header_ep8.png */; }; + A1BB8B8E206DFC2E00D46B47 /* header_ep10.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B83206DFC2D00D46B47 /* header_ep10.png */; }; + A1BB8B8F206DFC2E00D46B47 /* header_ep1.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B84206DFC2D00D46B47 /* header_ep1.png */; }; + A1BB8B90206DFC2E00D46B47 /* header_ep4.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B85206DFC2D00D46B47 /* header_ep4.png */; }; + A1BB8B91206DFC2E00D46B47 /* header_ep2.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B86206DFC2D00D46B47 /* header_ep2.png */; }; + A1BB8B92206DFC2E00D46B47 /* header_ep6.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B87206DFC2D00D46B47 /* header_ep6.png */; }; + A1BB8B93206DFC2E00D46B47 /* header_ep5.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B88206DFC2D00D46B47 /* header_ep5.png */; }; + A1BB8B94206DFC2E00D46B47 /* header_ep9.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B89206DFC2E00D46B47 /* header_ep9.png */; }; + A1BB8B95206DFC2E00D46B47 /* header_ep7.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B8A206DFC2E00D46B47 /* header_ep7.png */; }; + A1BB8B96206DFC2E00D46B47 /* header_ep3.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B8B206DFC2E00D46B47 /* header_ep3.png */; }; + A1BB8B97206DFC2E00D46B47 /* header_ep11.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B8C206DFC2E00D46B47 /* header_ep11.png */; }; + A1BB8B9B206E07C300D46B47 /* GODMODEFACE0PIC.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B98206E07C300D46B47 /* GODMODEFACE0PIC.png */; }; + A1BB8B9C206E07C300D46B47 /* GODMODEFACE1PIC.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B99206E07C300D46B47 /* GODMODEFACE1PIC.png */; }; + A1BB8B9D206E07C300D46B47 /* GODMODEFACE2PIC.png in Resources */ = {isa = PBXBuildFile; fileRef = A1BB8B9A206E07C300D46B47 /* GODMODEFACE2PIC.png */; }; + A1C78236203FBADE00F2D2DE /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1C78235203FBADE00F2D2DE /* GameController.framework */; }; C81E11A913E2112100B1049A /* SettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C81E11A813E2112100B1049A /* SettingsViewController.m */; }; - C81E121C13E225FB00B1049A /* slider.png in Resources */ = {isa = PBXBuildFile; fileRef = C81E121B13E225FB00B1049A /* slider.png */; }; - C8D1CFE013E22A6700F0EAC6 /* Default-Portrait~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = C8D1CFDF13E22A6700F0EAC6 /* Default-Portrait~ipad.png */; }; C8D1CFE413E22B5200F0EAC6 /* WOLF_57.png in Resources */ = {isa = PBXBuildFile; fileRef = C8D1CFE313E22B5200F0EAC6 /* WOLF_57.png */; }; C8D1CFE613E22B5B00F0EAC6 /* WOLF_114.png in Resources */ = {isa = PBXBuildFile; fileRef = C8D1CFE513E22B5B00F0EAC6 /* WOLF_114.png */; }; C8D1CFE813E22B6800F0EAC6 /* WOLF_72.png in Resources */ = {isa = PBXBuildFile; fileRef = C8D1CFE713E22B6800F0EAC6 /* WOLF_72.png */; }; @@ -254,25 +407,17 @@ 35048AAC13E0A03A00516B10 /* credits_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = credits_bg.png; path = ../../menu_art/credits_bg.png; sourceTree = SOURCE_ROOT; }; 35048ABB13E0D2EA00516B10 /* wolf_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = wolf_bg.png; path = ../../menu_art/wolf_bg.png; sourceTree = SOURCE_ROOT; }; 35048ABD13E0D51600516B10 /* iphone_preset_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = iphone_preset_1.png; path = ../../menu_art/iphone_preset_1.png; sourceTree = SOURCE_ROOT; }; - 35048AD613E0E98800516B10 /* difficulty_star1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = difficulty_star1.png; path = ../../menu_art/difficulty_star1.png; sourceTree = SOURCE_ROOT; }; - 35048AD713E0E98800516B10 /* difficulty_star2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = difficulty_star2.png; path = ../../menu_art/difficulty_star2.png; sourceTree = SOURCE_ROOT; }; - 35048AD813E0E98800516B10 /* difficulty_star3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = difficulty_star3.png; path = ../../menu_art/difficulty_star3.png; sourceTree = SOURCE_ROOT; }; - 35048AD913E0E98800516B10 /* difficulty_star4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = difficulty_star4.png; path = ../../menu_art/difficulty_star4.png; sourceTree = SOURCE_ROOT; }; 350BA59413F34F7900FAE7E4 /* difficulty_head1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = difficulty_head1.png; path = ../../menu_art/difficulty_head1.png; sourceTree = SOURCE_ROOT; }; 350BA59513F34F7900FAE7E4 /* difficulty_head2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = difficulty_head2.png; path = ../../menu_art/difficulty_head2.png; sourceTree = SOURCE_ROOT; }; 350BA59613F34F7900FAE7E4 /* difficulty_head3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = difficulty_head3.png; path = ../../menu_art/difficulty_head3.png; sourceTree = SOURCE_ROOT; }; 350BA59713F34F7900FAE7E4 /* difficulty_head4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = difficulty_head4.png; path = ../../menu_art/difficulty_head4.png; sourceTree = SOURCE_ROOT; }; 350CCF9A13DF8B0E003303AB /* episode_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = episode_bg.png; path = ../../menu_art/episode_bg.png; sourceTree = SOURCE_ROOT; }; 350CCF9D13DF8C47003303AB /* back_arrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = back_arrow.png; path = ../../menu_art/back_arrow.png; sourceTree = SOURCE_ROOT; }; - 350CCF9E13DF8C47003303AB /* difficulty_selection_box.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = difficulty_selection_box.png; path = ../../menu_art/difficulty_selection_box.png; sourceTree = SOURCE_ROOT; }; - 350CCFCD13DF8DED003303AB /* mission_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = mission_bg.png; path = ../../menu_art/mission_bg.png; sourceTree = SOURCE_ROOT; }; 3534C87313E208F400740F63 /* CreditsView~ipad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "CreditsView~ipad.xib"; path = "Resources-iPad/CreditsView~ipad.xib"; sourceTree = ""; }; 3534C87413E208F400740F63 /* TriviaView~ipad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "TriviaView~ipad.xib"; path = "Resources-iPad/TriviaView~ipad.xib"; sourceTree = ""; }; 3534C88E13E220CE00740F63 /* LegalView~ipad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "LegalView~ipad.xib"; path = "Resources-iPad/LegalView~ipad.xib"; sourceTree = ""; }; 3534C95B13E241AB00740F63 /* LevelSelectView~ipad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "LevelSelectView~ipad.xib"; path = "Resources-iPad/LevelSelectView~ipad.xib"; sourceTree = ""; }; 3534C95D13E241B100740F63 /* EpisodeView~ipad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "EpisodeView~ipad.xib"; path = "Resources-iPad/EpisodeView~ipad.xib"; sourceTree = ""; }; - 3534C96913E2485F00740F63 /* adv_button_frame.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = adv_button_frame.png; path = ../../menu_art/adv_button_frame.png; sourceTree = SOURCE_ROOT; }; - 3534C96B13E2486700740F63 /* preset_frame.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = preset_frame.png; path = ../../menu_art/preset_frame.png; sourceTree = SOURCE_ROOT; }; 3534C97E13E24E0E00740F63 /* SettingsView~ipad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "SettingsView~ipad.xib"; path = "Resources-iPad/SettingsView~ipad.xib"; sourceTree = ""; }; 3555CC3F13E2001A006E7D2F /* button_highlight.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = button_highlight.png; path = ../../menu_art/button_highlight.png; sourceTree = SOURCE_ROOT; }; 356D306C13F9820400EDDACE /* EpisodeCell~ipad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "EpisodeCell~ipad.xib"; path = "Resources-iPad/EpisodeCell~ipad.xib"; sourceTree = ""; }; @@ -298,7 +443,6 @@ 3D10C3E313F33AB700DF5856 /* SkillViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SkillViewController.m; sourceTree = ""; }; 3D10C3F113F33D3700DF5856 /* SkillView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SkillView.xib; sourceTree = ""; }; 3D24009D13D89BF4009FC7A7 /* iphone_store.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = iphone_store.m; sourceTree = ""; }; - 3D24FF3813D77577009FC7A7 /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; }; 3D3ED73D13BF554400C5B1DF /* wolf3dViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wolf3dViewController.h; sourceTree = ""; }; 3D3ED73E13BF554400C5B1DF /* wolf3dViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = wolf3dViewController.m; sourceTree = ""; }; 3D3ED8D013BF775B00C5B1DF /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; @@ -342,59 +486,17 @@ 3DDD3A2513DF232900967735 /* UIFontButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIFontButton.h; sourceTree = ""; }; 3DE8824713E35E5000C95AE8 /* arialImageLAL_white-alpha.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "arialImageLAL_white-alpha.png"; path = "../../menu_art/arialImageLAL_white-alpha.png"; sourceTree = SOURCE_ROOT; }; 3DE8824813E35E5000C95AE8 /* arialImageLAL.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = arialImageLAL.png; path = ../../menu_art/arialImageLAL.png; sourceTree = SOURCE_ROOT; }; - 3DE8824913E35E5000C95AE8 /* button_back.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = button_back.png; path = ../../menu_art/button_back.png; sourceTree = SOURCE_ROOT; }; - 3DE8824A13E35E5000C95AE8 /* button_downloads.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = button_downloads.png; path = ../../menu_art/button_downloads.png; sourceTree = SOURCE_ROOT; }; - 3DE8824B13E35E5000C95AE8 /* button_knife.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = button_knife.png; path = ../../menu_art/button_knife.png; sourceTree = SOURCE_ROOT; }; - 3DE8824C13E35E5000C95AE8 /* button_left.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = button_left.png; path = ../../menu_art/button_left.png; sourceTree = SOURCE_ROOT; }; - 3DE8824D13E35E5000C95AE8 /* button_more.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = button_more.png; path = ../../menu_art/button_more.png; sourceTree = SOURCE_ROOT; }; - 3DE8824E13E35E5000C95AE8 /* button_new.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = button_new.png; path = ../../menu_art/button_new.png; sourceTree = SOURCE_ROOT; }; - 3DE8824F13E35E5000C95AE8 /* button_pistol.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = button_pistol.png; path = ../../menu_art/button_pistol.png; sourceTree = SOURCE_ROOT; }; - 3DE8825013E35E5000C95AE8 /* button_resume.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = button_resume.png; path = ../../menu_art/button_resume.png; sourceTree = SOURCE_ROOT; }; - 3DE8825113E35E5000C95AE8 /* button_right.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = button_right.png; path = ../../menu_art/button_right.png; sourceTree = SOURCE_ROOT; }; - 3DE8825213E35E5000C95AE8 /* button_settings.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = button_settings.png; path = ../../menu_art/button_settings.png; sourceTree = SOURCE_ROOT; }; - 3DE8825313E35E5000C95AE8 /* button_trivia.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = button_trivia.png; path = ../../menu_art/button_trivia.png; sourceTree = SOURCE_ROOT; }; - 3DE8825413E35E5000C95AE8 /* button_web.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = button_web.png; path = ../../menu_art/button_web.png; sourceTree = SOURCE_ROOT; }; - 3DE8825513E35E5000C95AE8 /* diractional_01.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = diractional_01.png; path = ../../menu_art/diractional_01.png; sourceTree = SOURCE_ROOT; }; - 3DE8825613E35E5000C95AE8 /* diractional_02.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = diractional_02.png; path = ../../menu_art/diractional_02.png; sourceTree = SOURCE_ROOT; }; - 3DE8825713E35E5000C95AE8 /* diractional_03.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = diractional_03.png; path = ../../menu_art/diractional_03.png; sourceTree = SOURCE_ROOT; }; - 3DE8825B13E35E5000C95AE8 /* GODMODEFACE0PIC.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = GODMODEFACE0PIC.png; path = ../../menu_art/GODMODEFACE0PIC.png; sourceTree = SOURCE_ROOT; }; - 3DE8825C13E35E5000C95AE8 /* GODMODEFACE1PIC.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = GODMODEFACE1PIC.png; path = ../../menu_art/GODMODEFACE1PIC.png; sourceTree = SOURCE_ROOT; }; - 3DE8825D13E35E5000C95AE8 /* GODMODEFACE2PIC.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = GODMODEFACE2PIC.png; path = ../../menu_art/GODMODEFACE2PIC.png; sourceTree = SOURCE_ROOT; }; - 3DE8825E13E35E5000C95AE8 /* header_advanced.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_advanced.png; path = ../../menu_art/header_advanced.png; sourceTree = SOURCE_ROOT; }; - 3DE8825F13E35E5000C95AE8 /* header_ep1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep1.png; path = ../../menu_art/header_ep1.png; sourceTree = SOURCE_ROOT; }; - 3DE8826013E35E5000C95AE8 /* header_ep2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep2.png; path = ../../menu_art/header_ep2.png; sourceTree = SOURCE_ROOT; }; - 3DE8826113E35E5000C95AE8 /* header_ep3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep3.png; path = ../../menu_art/header_ep3.png; sourceTree = SOURCE_ROOT; }; - 3DE8826213E35E5000C95AE8 /* header_ep4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep4.png; path = ../../menu_art/header_ep4.png; sourceTree = SOURCE_ROOT; }; - 3DE8826313E35E5000C95AE8 /* header_ep5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep5.png; path = ../../menu_art/header_ep5.png; sourceTree = SOURCE_ROOT; }; - 3DE8826413E35E5000C95AE8 /* header_ep6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep6.png; path = ../../menu_art/header_ep6.png; sourceTree = SOURCE_ROOT; }; - 3DE8826513E35E5000C95AE8 /* header_ep7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep7.png; path = ../../menu_art/header_ep7.png; sourceTree = SOURCE_ROOT; }; - 3DE8826613E35E5000C95AE8 /* header_ep8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep8.png; path = ../../menu_art/header_ep8.png; sourceTree = SOURCE_ROOT; }; - 3DE8826713E35E5000C95AE8 /* header_ep9.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep9.png; path = ../../menu_art/header_ep9.png; sourceTree = SOURCE_ROOT; }; - 3DE8826813E35E5000C95AE8 /* header_ep10.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep10.png; path = ../../menu_art/header_ep10.png; sourceTree = SOURCE_ROOT; }; - 3DE8826913E35E5000C95AE8 /* header_ep11.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep11.png; path = ../../menu_art/header_ep11.png; sourceTree = SOURCE_ROOT; }; 3DE8826A13E35E5000C95AE8 /* intermission.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = intermission.png; path = ../../menu_art/intermission.png; sourceTree = SOURCE_ROOT; }; 3DE8826B13E35E5000C95AE8 /* iphone_image.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = iphone_image.png; path = ../../menu_art/iphone_image.png; sourceTree = SOURCE_ROOT; }; 3DE8826C13E35E5000C95AE8 /* kills_shadow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = kills_shadow.png; path = ../../menu_art/kills_shadow.png; sourceTree = SOURCE_ROOT; }; 3DE8826D13E35E5000C95AE8 /* kills.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = kills.png; path = ../../menu_art/kills.png; sourceTree = SOURCE_ROOT; }; 3DE8826E13E35E5000C95AE8 /* map_background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = map_background.png; path = ../../menu_art/map_background.png; sourceTree = SOURCE_ROOT; }; - 3DE8826F13E35E5000C95AE8 /* map.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = map.png; path = ../../menu_art/map.png; sourceTree = SOURCE_ROOT; }; - 3DE8827013E35E5000C95AE8 /* menu_bar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = menu_bar.png; path = ../../menu_art/menu_bar.png; sourceTree = SOURCE_ROOT; }; - 3DE8827113E35E5000C95AE8 /* menu.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = menu.png; path = ../../menu_art/menu.png; sourceTree = SOURCE_ROOT; }; - 3DE8827213E35E5000C95AE8 /* music_off.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = music_off.png; path = ../../menu_art/music_off.png; sourceTree = SOURCE_ROOT; }; - 3DE8827313E35E5000C95AE8 /* music_on.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = music_on.png; path = ../../menu_art/music_on.png; sourceTree = SOURCE_ROOT; }; 3DE8827413E35E5000C95AE8 /* partime_shadow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = partime_shadow.png; path = ../../menu_art/partime_shadow.png; sourceTree = SOURCE_ROOT; }; 3DE8827513E35E5000C95AE8 /* partime.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = partime.png; path = ../../menu_art/partime.png; sourceTree = SOURCE_ROOT; }; 3DE8827613E35E5000C95AE8 /* secrets_shadow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = secrets_shadow.png; path = ../../menu_art/secrets_shadow.png; sourceTree = SOURCE_ROOT; }; 3DE8827713E35E5000C95AE8 /* secrets.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = secrets.png; path = ../../menu_art/secrets.png; sourceTree = SOURCE_ROOT; }; - 3DE8827813E35E5000C95AE8 /* shoot.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = shoot.png; path = ../../menu_art/shoot.png; sourceTree = SOURCE_ROOT; }; - 3DE8827913E35E5000C95AE8 /* side_2_side.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = side_2_side.png; path = ../../menu_art/side_2_side.png; sourceTree = SOURCE_ROOT; }; - 3DE8827A13E35E5000C95AE8 /* slider_bar_rainbow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = slider_bar_rainbow.png; path = ../../menu_art/slider_bar_rainbow.png; sourceTree = SOURCE_ROOT; }; - 3DE8827B13E35E5000C95AE8 /* slider_bar_underlay.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = slider_bar_underlay.png; path = ../../menu_art/slider_bar_underlay.png; sourceTree = SOURCE_ROOT; }; - 3DE8827C13E35E5000C95AE8 /* slider_bar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = slider_bar.png; path = ../../menu_art/slider_bar.png; sourceTree = SOURCE_ROOT; }; - 3DE8827D13E35E5000C95AE8 /* slider_knob.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = slider_knob.png; path = ../../menu_art/slider_knob.png; sourceTree = SOURCE_ROOT; }; 3DE8827E13E35E5000C95AE8 /* stats_large.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = stats_large.png; path = ../../menu_art/stats_large.png; sourceTree = SOURCE_ROOT; }; 3DE8827F13E35E5000C95AE8 /* stats.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = stats.png; path = ../../menu_art/stats.png; sourceTree = SOURCE_ROOT; }; - 3DE8828013E35E5000C95AE8 /* status_hud.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = status_hud.png; path = ../../menu_art/status_hud.png; sourceTree = SOURCE_ROOT; }; 3DE8828113E35E5000C95AE8 /* submenus_background_image.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = submenus_background_image.png; path = ../../menu_art/submenus_background_image.png; sourceTree = SOURCE_ROOT; }; 3DE8828213E35E5000C95AE8 /* treasure_shadow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = treasure_shadow.png; path = ../../menu_art/treasure_shadow.png; sourceTree = SOURCE_ROOT; }; 3DE8828313E35E5000C95AE8 /* treasure.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = treasure.png; path = ../../menu_art/treasure.png; sourceTree = SOURCE_ROOT; }; @@ -551,10 +653,54 @@ 72A7E8F60F5F2063005B83C0 /* iphone_menus.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = iphone_menus.c; sourceTree = ""; }; 72B5FF380F7E5C3D00C8A372 /* hud.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hud.c; sourceTree = ""; }; 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; + A1129051206A808100BEDEB5 /* Launch Screen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = ""; }; + A112905A206DA37A00BEDEB5 /* iphone_qgl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iphone_qgl.h; sourceTree = ""; }; + A112905B206DA37A00BEDEB5 /* gles_glue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gles_glue.h; sourceTree = ""; }; + A112905C206DA37A00BEDEB5 /* iphone_qgl_enumerants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iphone_qgl_enumerants.h; sourceTree = ""; }; + A112905D206DF0DA00BEDEB5 /* header_advanced.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_advanced.png; path = ../../menu_art/header_advanced.png; sourceTree = ""; }; + A12D764D20913B9C00B4A4BB /* MainMenuView-tvos.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = "MainMenuView-tvos.xib"; sourceTree = ""; }; + A12D76522091491500B4A4BB /* CreditsView-tvos.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = "CreditsView-tvos.xib"; sourceTree = ""; }; + A12D76572091496E00B4A4BB /* EpisodeView-tvos.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = "EpisodeView-tvos.xib"; sourceTree = ""; }; + A12D76592091498000B4A4BB /* LegalView-tvos.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = "LegalView-tvos.xib"; sourceTree = ""; }; + A12D765B209149A100B4A4BB /* LevelSelectView-tvos.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = "LevelSelectView-tvos.xib"; sourceTree = ""; }; + A12D765D209149BF00B4A4BB /* SkillView-tvos.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = "SkillView-tvos.xib"; sourceTree = ""; }; + A12D765F209149CF00B4A4BB /* TriviaView-tvos.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = "TriviaView-tvos.xib"; sourceTree = ""; }; + A12D766320914F8700B4A4BB /* EpisodeCell-tvos.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = "EpisodeCell-tvos.xib"; sourceTree = ""; }; + A1337A0E2090BAE300F4D670 /* wolf3dTV.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = wolf3dTV.app; sourceTree = BUILT_PRODUCTS_DIR; }; + A1337A192090BAE400F4D670 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + A1337A1B2090BAE400F4D670 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A1337A9B2090BDC100F4D670 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS11.3.sdk/System/Library/Frameworks/AudioToolbox.framework; sourceTree = DEVELOPER_DIR; }; + A1337A9C2090BDC200F4D670 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS11.3.sdk/System/Library/Frameworks/OpenGLES.framework; sourceTree = DEVELOPER_DIR; }; + A1337A9E2090BDC200F4D670 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS11.3.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; }; + A1337A9F2090BDC200F4D670 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS11.3.sdk/System/Library/Frameworks/AVFoundation.framework; sourceTree = DEVELOPER_DIR; }; + A1337AA02090BDC200F4D670 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS11.3.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + A1337AA12090BDC200F4D670 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS11.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + A1337AA22090BDC200F4D670 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS11.3.sdk/System/Library/Frameworks/OpenAL.framework; sourceTree = DEVELOPER_DIR; }; + A1337AA32090BDC200F4D670 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS11.3.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; }; + A1337AA42090BDC200F4D670 /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS11.3.sdk/System/Library/Frameworks/GameController.framework; sourceTree = DEVELOPER_DIR; }; + A1337AAF2090BDEA00F4D670 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS11.3.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; + A19BF3691FD6E4C800DAC4C1 /* base */ = {isa = PBXFileReference; lastKnownFileType = folder; name = base; path = ../../base; sourceTree = ""; }; + A1B3746C2036A6CA00E1C7BE /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; + A1B3746E2036B0F100E1C7BE /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../../../README.md; sourceTree = ""; }; + A1B7CA31209D195B00743C98 /* Default-Portrait.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Portrait.png"; path = "../../menu_art/Default-Portrait.png"; sourceTree = ""; }; + A1B7CA32209D195B00743C98 /* Default-Portrait~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Portrait~ipad.png"; path = "../../menu_art/Default-Portrait~ipad.png"; sourceTree = ""; }; + A1BB8B82206DFC2D00D46B47 /* header_ep8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep8.png; path = ../../menu_art/header_ep8.png; sourceTree = ""; }; + A1BB8B83206DFC2D00D46B47 /* header_ep10.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep10.png; path = ../../menu_art/header_ep10.png; sourceTree = ""; }; + A1BB8B84206DFC2D00D46B47 /* header_ep1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep1.png; path = ../../menu_art/header_ep1.png; sourceTree = ""; }; + A1BB8B85206DFC2D00D46B47 /* header_ep4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep4.png; path = ../../menu_art/header_ep4.png; sourceTree = ""; }; + A1BB8B86206DFC2D00D46B47 /* header_ep2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep2.png; path = ../../menu_art/header_ep2.png; sourceTree = ""; }; + A1BB8B87206DFC2D00D46B47 /* header_ep6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep6.png; path = ../../menu_art/header_ep6.png; sourceTree = ""; }; + A1BB8B88206DFC2D00D46B47 /* header_ep5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep5.png; path = ../../menu_art/header_ep5.png; sourceTree = ""; }; + A1BB8B89206DFC2E00D46B47 /* header_ep9.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep9.png; path = ../../menu_art/header_ep9.png; sourceTree = ""; }; + A1BB8B8A206DFC2E00D46B47 /* header_ep7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep7.png; path = ../../menu_art/header_ep7.png; sourceTree = ""; }; + A1BB8B8B206DFC2E00D46B47 /* header_ep3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep3.png; path = ../../menu_art/header_ep3.png; sourceTree = ""; }; + A1BB8B8C206DFC2E00D46B47 /* header_ep11.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = header_ep11.png; path = ../../menu_art/header_ep11.png; sourceTree = ""; }; + A1BB8B98206E07C300D46B47 /* GODMODEFACE0PIC.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = GODMODEFACE0PIC.png; path = ../../menu_art/GODMODEFACE0PIC.png; sourceTree = ""; }; + A1BB8B99206E07C300D46B47 /* GODMODEFACE1PIC.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = GODMODEFACE1PIC.png; path = ../../menu_art/GODMODEFACE1PIC.png; sourceTree = ""; }; + A1BB8B9A206E07C300D46B47 /* GODMODEFACE2PIC.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = GODMODEFACE2PIC.png; path = ../../menu_art/GODMODEFACE2PIC.png; sourceTree = ""; }; + A1C78235203FBADE00F2D2DE /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; }; C81E11A713E2112100B1049A /* SettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingsViewController.h; sourceTree = ""; }; C81E11A813E2112100B1049A /* SettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingsViewController.m; sourceTree = ""; }; - C81E121B13E225FB00B1049A /* slider.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = slider.png; path = ../../menu_art/slider.png; sourceTree = SOURCE_ROOT; }; - C8D1CFDF13E22A6700F0EAC6 /* Default-Portrait~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait~ipad.png"; sourceTree = ""; }; C8D1CFE313E22B5200F0EAC6 /* WOLF_57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = WOLF_57.png; sourceTree = ""; }; C8D1CFE513E22B5B00F0EAC6 /* WOLF_114.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = WOLF_114.png; sourceTree = ""; }; C8D1CFE713E22B6800F0EAC6 /* WOLF_72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = WOLF_72.png; sourceTree = ""; }; @@ -573,6 +719,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + A1C78236203FBADE00F2D2DE /* GameController.framework in Frameworks */, + A1B3746D2036A6CA00E1C7BE /* CoreMotion.framework in Frameworks */, 43AE7E9F0F67387500B2F562 /* CoreGraphics.framework in Frameworks */, 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 3D3ED8D113BF775B00C5B1DF /* OpenAL.framework in Frameworks */, @@ -581,11 +729,27 @@ ED3703B4106C1CD40059C5F8 /* SystemConfiguration.framework in Frameworks */, 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 3D3ED95B13BF77FA00C5B1DF /* AudioToolbox.framework in Frameworks */, - 3D24FF3913D77577009FC7A7 /* StoreKit.framework in Frameworks */, 3DB8734113FACAD20050FB2A /* AVFoundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; + A1337A0B2090BAE300F4D670 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A1337AB02090BDEA00F4D670 /* QuartzCore.framework in Frameworks */, + A1337AA52090BDC300F4D670 /* AudioToolbox.framework in Frameworks */, + A1337AA62090BDC300F4D670 /* OpenGLES.framework in Frameworks */, + A1337AA82090BDC300F4D670 /* SystemConfiguration.framework in Frameworks */, + A1337AA92090BDC300F4D670 /* AVFoundation.framework in Frameworks */, + A1337AAA2090BDC300F4D670 /* UIKit.framework in Frameworks */, + A1337AAB2090BDC300F4D670 /* Foundation.framework in Frameworks */, + A1337AAC2090BDC300F4D670 /* OpenAL.framework in Frameworks */, + A1337AAD2090BDC300F4D670 /* CoreGraphics.framework in Frameworks */, + A1337AAE2090BDC300F4D670 /* GameController.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -594,6 +758,7 @@ children = ( 1D6058910D05DD3D006BFB54 /* wolf3d.app */, 4364BF3E0F5CB25900F29317 /* dist.plist */, + A1337A0E2090BAE300F4D670 /* wolf3dTV.app */, ); name = Products; sourceTree = ""; @@ -601,16 +766,20 @@ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( - C8D1CFE713E22B6800F0EAC6 /* WOLF_72.png */, - C8D1CFE513E22B5B00F0EAC6 /* WOLF_114.png */, - C8D1CFE313E22B5200F0EAC6 /* WOLF_57.png */, - C8D1CFDF13E22A6700F0EAC6 /* Default-Portrait~ipad.png */, - 3D86D68A13DF172B00186487 /* POSITYPE-idSettler10v2.otf */, + A19BF3691FD6E4C800DAC4C1 /* base */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + A1129051206A808100BEDEB5 /* Launch Screen.storyboard */, 29B97315FDCFA39411CA2CEA /* Other Sources */, + 3D86D68A13DF172B00186487 /* POSITYPE-idSettler10v2.otf */, + 19C28FACFE9D520D11CA2CBB /* Products */, + A1B3746E2036B0F100E1C7BE /* README.md */, 29B97317FDCFA39411CA2CEA /* Resources */, 3D15A41A13C6BA0B00FBFAA2 /* Resources-iPad */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, + A1337AE620913B2D00F4D670 /* Resources-tvOS */, + C8D1CFE313E22B5200F0EAC6 /* WOLF_57.png */, + C8D1CFE713E22B6800F0EAC6 /* WOLF_72.png */, + C8D1CFE513E22B5B00F0EAC6 /* WOLF_114.png */, + A1337A0F2090BAE300F4D670 /* wolf3dTV */, ); name = CustomTemplate; sourceTree = ""; @@ -618,6 +787,9 @@ 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( + A112905B206DA37A00BEDEB5 /* gles_glue.h */, + A112905C206DA37A00BEDEB5 /* iphone_qgl_enumerants.h */, + A112905A206DA37A00BEDEB5 /* iphone_qgl.h */, ED0A8D0A1069ACA8001E0547 /* arialGlyphRects.h */, 3D5C0C7513DF8F78008ECBD1 /* controllers */, 7229CE450F6C89F8004123C5 /* EAGLView.h */, @@ -668,6 +840,18 @@ 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( + A1337AAF2090BDEA00F4D670 /* QuartzCore.framework */, + A1C78235203FBADE00F2D2DE /* GameController.framework */, + A1337A9B2090BDC100F4D670 /* AudioToolbox.framework */, + A1337A9F2090BDC200F4D670 /* AVFoundation.framework */, + A1337AA32090BDC200F4D670 /* CoreGraphics.framework */, + A1337AA12090BDC200F4D670 /* Foundation.framework */, + A1337AA42090BDC200F4D670 /* GameController.framework */, + A1337AA22090BDC200F4D670 /* OpenAL.framework */, + A1337A9C2090BDC200F4D670 /* OpenGLES.framework */, + A1337A9E2090BDC200F4D670 /* SystemConfiguration.framework */, + A1337AA02090BDC200F4D670 /* UIKit.framework */, + A1B3746C2036A6CA00E1C7BE /* CoreMotion.framework */, 3D3ED95A13BF77FA00C5B1DF /* AudioToolbox.framework */, 43AE7E9E0F67387500B2F562 /* CoreGraphics.framework */, 1D30AB110D05D00D00671497 /* Foundation.framework */, @@ -676,7 +860,6 @@ 3D3ED8EA13BF77A800C5B1DF /* QuartzCore.framework */, ED3703B3106C1CD40059C5F8 /* SystemConfiguration.framework */, 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 3D24FF3813D77577009FC7A7 /* StoreKit.framework */, 3DB8734013FACAD20050FB2A /* AVFoundation.framework */, ); name = Frameworks; @@ -733,56 +916,37 @@ 3D5C0CFD13DF9ABF008ECBD1 /* menu_art */ = { isa = PBXGroup; children = ( + A1B7CA31209D195B00743C98 /* Default-Portrait.png */, + A1B7CA32209D195B00743C98 /* Default-Portrait~ipad.png */, + A1BB8B98206E07C300D46B47 /* GODMODEFACE0PIC.png */, + A1BB8B99206E07C300D46B47 /* GODMODEFACE1PIC.png */, + A1BB8B9A206E07C300D46B47 /* GODMODEFACE2PIC.png */, 35E6E15413F3172F0010F530 /* adv_btn.png */, - 3534C96913E2485F00740F63 /* adv_button_frame.png */, - 3DE8824813E35E5000C95AE8 /* arialImageLAL.png */, 3DE8824713E35E5000C95AE8 /* arialImageLAL_white-alpha.png */, + 3DE8824813E35E5000C95AE8 /* arialImageLAL.png */, 350CCF9D13DF8C47003303AB /* back_arrow.png */, - 3DE8824913E35E5000C95AE8 /* button_back.png */, - 3DE8824A13E35E5000C95AE8 /* button_downloads.png */, 3555CC3F13E2001A006E7D2F /* button_highlight.png */, - 3DE8824B13E35E5000C95AE8 /* button_knife.png */, - 3DE8824C13E35E5000C95AE8 /* button_left.png */, - 3DE8824D13E35E5000C95AE8 /* button_more.png */, - 3DE8824E13E35E5000C95AE8 /* button_new.png */, - 3DE8824F13E35E5000C95AE8 /* button_pistol.png */, - 3DE8825013E35E5000C95AE8 /* button_resume.png */, - 3DE8825113E35E5000C95AE8 /* button_right.png */, - 3DE8825213E35E5000C95AE8 /* button_settings.png */, - 3DE8825313E35E5000C95AE8 /* button_trivia.png */, - 3DE8825413E35E5000C95AE8 /* button_web.png */, 35048AAC13E0A03A00516B10 /* credits_bg.png */, 350BA59413F34F7900FAE7E4 /* difficulty_head1.png */, 350BA59513F34F7900FAE7E4 /* difficulty_head2.png */, 350BA59613F34F7900FAE7E4 /* difficulty_head3.png */, 350BA59713F34F7900FAE7E4 /* difficulty_head4.png */, - 350CCF9E13DF8C47003303AB /* difficulty_selection_box.png */, - 35048AD613E0E98800516B10 /* difficulty_star1.png */, - 35048AD713E0E98800516B10 /* difficulty_star2.png */, - 35048AD813E0E98800516B10 /* difficulty_star3.png */, - 35048AD913E0E98800516B10 /* difficulty_star4.png */, - 3DE8825513E35E5000C95AE8 /* diractional_01.png */, - 3DE8825613E35E5000C95AE8 /* diractional_02.png */, - 3DE8825713E35E5000C95AE8 /* diractional_03.png */, 35E6E16813F318A50010F530 /* down_arrow.png */, 350CCF9A13DF8B0E003303AB /* episode_bg.png */, 3DF1804213F44D6700ED668A /* episode_bracket.png */, 3DF1804313F44D6700ED668A /* episode_divider.png */, - 3DE8825B13E35E5000C95AE8 /* GODMODEFACE0PIC.png */, - 3DE8825C13E35E5000C95AE8 /* GODMODEFACE1PIC.png */, - 3DE8825D13E35E5000C95AE8 /* GODMODEFACE2PIC.png */, - 3DE8825E13E35E5000C95AE8 /* header_advanced.png */, - 3DE8825F13E35E5000C95AE8 /* header_ep1.png */, - 3DE8826813E35E5000C95AE8 /* header_ep10.png */, - 3DE8826913E35E5000C95AE8 /* header_ep11.png */, - 3DE8826013E35E5000C95AE8 /* header_ep2.png */, - 3DE8826113E35E5000C95AE8 /* header_ep3.png */, - 3DE8826213E35E5000C95AE8 /* header_ep4.png */, - 3DE8826313E35E5000C95AE8 /* header_ep5.png */, - 3DE8826413E35E5000C95AE8 /* header_ep6.png */, - 3DE8826513E35E5000C95AE8 /* header_ep7.png */, - 3DE8826613E35E5000C95AE8 /* header_ep8.png */, - 3DE8826713E35E5000C95AE8 /* header_ep9.png */, + A112905D206DF0DA00BEDEB5 /* header_advanced.png */, + A1BB8B84206DFC2D00D46B47 /* header_ep1.png */, + A1BB8B86206DFC2D00D46B47 /* header_ep2.png */, + A1BB8B8B206DFC2E00D46B47 /* header_ep3.png */, + A1BB8B85206DFC2D00D46B47 /* header_ep4.png */, + A1BB8B88206DFC2D00D46B47 /* header_ep5.png */, + A1BB8B87206DFC2D00D46B47 /* header_ep6.png */, + A1BB8B8A206DFC2E00D46B47 /* header_ep7.png */, + A1BB8B82206DFC2D00D46B47 /* header_ep8.png */, + A1BB8B89206DFC2E00D46B47 /* header_ep9.png */, + A1BB8B83206DFC2D00D46B47 /* header_ep10.png */, + A1BB8B8C206DFC2E00D46B47 /* header_ep11.png */, 35E6E16313F318600010F530 /* highlight_bracket.png */, 3DE8826A13E35E5000C95AE8 /* intermission.png */, 3DE8826B13E35E5000C95AE8 /* iphone_image.png */, @@ -790,24 +954,17 @@ 3D5C0F7F13E0FC46008ECBD1 /* iphone_preset_2.png */, 3D5C0F8013E0FC46008ECBD1 /* iphone_preset_3.png */, 3D5C0F8113E0FC46008ECBD1 /* iphone_preset_4.png */, - 3DE8826D13E35E5000C95AE8 /* kills.png */, 3DE8826C13E35E5000C95AE8 /* kills_shadow.png */, + 3DE8826D13E35E5000C95AE8 /* kills.png */, 35E6E15E13F318420010F530 /* left_chevron.png */, 3D5C0D0913DF9B41008ECBD1 /* main_bg.png */, - 3DE8826F13E35E5000C95AE8 /* map.png */, 3DE8826E13E35E5000C95AE8 /* map_background.png */, - 3DE8827113E35E5000C95AE8 /* menu.png */, - 3DE8827013E35E5000C95AE8 /* menu_bar.png */, - 350CCFCD13DF8DED003303AB /* mission_bg.png */, - 3DE8827213E35E5000C95AE8 /* music_off.png */, - 3DE8827313E35E5000C95AE8 /* music_on.png */, 35048AA913E07E7800516B10 /* next_arrow.png */, - 3DE8827513E35E5000C95AE8 /* partime.png */, 3DE8827413E35E5000C95AE8 /* partime_shadow.png */, - 3534C96B13E2486700740F63 /* preset_frame.png */, + 3DE8827513E35E5000C95AE8 /* partime.png */, 35E6E15F13F318420010F530 /* right_chevron.png */, - 3DE8827713E35E5000C95AE8 /* secrets.png */, 3DE8827613E35E5000C95AE8 /* secrets_shadow.png */, + 3DE8827713E35E5000C95AE8 /* secrets.png */, 35E6E15913F3182C0010F530 /* settings_divider.png */, 3DBC68E613F599B4002A8253 /* settings_line_art.png */, 35E6E19F13F321A50010F530 /* settings_slider_blue.png */, @@ -816,20 +973,12 @@ 3589EBA613F5E3DC005FBE56 /* settings_slider_grey~ipad.png */, 35E6E1A113F321A50010F530 /* settings_slider_white.png */, 3589EBA713F5E3DC005FBE56 /* settings_slider_white~ipad.png */, - 3DE8827813E35E5000C95AE8 /* shoot.png */, - 3DE8827913E35E5000C95AE8 /* side_2_side.png */, - C81E121B13E225FB00B1049A /* slider.png */, - 3DE8827C13E35E5000C95AE8 /* slider_bar.png */, - 3DE8827A13E35E5000C95AE8 /* slider_bar_rainbow.png */, - 3DE8827B13E35E5000C95AE8 /* slider_bar_underlay.png */, - 3DE8827D13E35E5000C95AE8 /* slider_knob.png */, 35E6E17413F3196A0010F530 /* star_icon.png */, - 3DE8827F13E35E5000C95AE8 /* stats.png */, 3DE8827E13E35E5000C95AE8 /* stats_large.png */, - 3DE8828013E35E5000C95AE8 /* status_hud.png */, + 3DE8827F13E35E5000C95AE8 /* stats.png */, 3DE8828113E35E5000C95AE8 /* submenus_background_image.png */, - 3DE8828313E35E5000C95AE8 /* treasure.png */, 3DE8828213E35E5000C95AE8 /* treasure_shadow.png */, + 3DE8828313E35E5000C95AE8 /* treasure.png */, 35E6E15A13F3182C0010F530 /* up_arrow.png */, 3DE8828413E35E5000C95AE8 /* up_down.png */, 3DE8828513E35E5000C95AE8 /* victory_256.png */, @@ -841,15 +990,15 @@ 3D5C0CFE13DF9AD5008ECBD1 /* views */ = { isa = PBXGroup; children = ( + 3D5C0D3013DFA0DF008ECBD1 /* CreditsView.xib */, + 3D10C37A13F310F700DF5856 /* EpisodeCell.xib */, 3D5C0C2613DF6701008ECBD1 /* EpisodeView.xib */, + 3D5C0D3213DFA0EA008ECBD1 /* LegalView.xib */, + 3D5C0C4C13DF8084008ECBD1 /* LevelSelectView.xib */, 3D86CF8A13DDE51800186487 /* MainMenuView.xib */, 3DDD3A2013DF228500967735 /* SettingsView.xib */, - 3D5C0C4C13DF8084008ECBD1 /* LevelSelectView.xib */, - 3D5C0D3013DFA0DF008ECBD1 /* CreditsView.xib */, - 3D5C0D3213DFA0EA008ECBD1 /* LegalView.xib */, - 3D5C0DF413E063F5008ECBD1 /* TriviaView.xib */, 3D10C3F113F33D3700DF5856 /* SkillView.xib */, - 3D10C37A13F310F700DF5856 /* EpisodeCell.xib */, + 3D5C0DF413E063F5008ECBD1 /* TriviaView.xib */, ); name = views; sourceTree = ""; @@ -857,15 +1006,15 @@ 3D5C0D0F13DF9B82008ECBD1 /* views */ = { isa = PBXGroup; children = ( - 3534C97E13E24E0E00740F63 /* SettingsView~ipad.xib */, - 3534C95B13E241AB00740F63 /* LevelSelectView~ipad.xib */, - 3534C95D13E241B100740F63 /* EpisodeView~ipad.xib */, + 3534C87313E208F400740F63 /* CreditsView~ipad.xib */, 356D306C13F9820400EDDACE /* EpisodeCell~ipad.xib */, - 356D306E13F9820900EDDACE /* SkillView~ipad.xib */, + 3534C95D13E241B100740F63 /* EpisodeView~ipad.xib */, 3534C88E13E220CE00740F63 /* LegalView~ipad.xib */, - 3534C87313E208F400740F63 /* CreditsView~ipad.xib */, - 3534C87413E208F400740F63 /* TriviaView~ipad.xib */, + 3534C95B13E241AB00740F63 /* LevelSelectView~ipad.xib */, 3D5C0D2B13DF9D9B008ECBD1 /* MainMenuView~ipad.xib */, + 3534C97E13E24E0E00740F63 /* SettingsView~ipad.xib */, + 356D306E13F9820900EDDACE /* SkillView~ipad.xib */, + 3534C87413E208F400740F63 /* TriviaView~ipad.xib */, ); name = views; sourceTree = ""; @@ -1022,6 +1171,38 @@ name = wolf; sourceTree = ""; }; + A12D764F20913BC200B4A4BB /* views */ = { + isa = PBXGroup; + children = ( + A12D76522091491500B4A4BB /* CreditsView-tvos.xib */, + A12D76572091496E00B4A4BB /* EpisodeView-tvos.xib */, + A12D76592091498000B4A4BB /* LegalView-tvos.xib */, + A12D765B209149A100B4A4BB /* LevelSelectView-tvos.xib */, + A12D764D20913B9C00B4A4BB /* MainMenuView-tvos.xib */, + A12D765D209149BF00B4A4BB /* SkillView-tvos.xib */, + A12D765F209149CF00B4A4BB /* TriviaView-tvos.xib */, + A12D766320914F8700B4A4BB /* EpisodeCell-tvos.xib */, + ); + path = views; + sourceTree = ""; + }; + A1337A0F2090BAE300F4D670 /* wolf3dTV */ = { + isa = PBXGroup; + children = ( + A1337A192090BAE400F4D670 /* Assets.xcassets */, + A1337A1B2090BAE400F4D670 /* Info.plist */, + ); + path = wolf3dTV; + sourceTree = ""; + }; + A1337AE620913B2D00F4D670 /* Resources-tvOS */ = { + isa = PBXGroup; + children = ( + A12D764F20913BC200B4A4BB /* views */, + ); + path = "Resources-tvOS"; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -1032,7 +1213,6 @@ 1D60588D0D05DD3D006BFB54 /* Resources */, 1D60588E0D05DD3D006BFB54 /* Sources */, 1D60588F0D05DD3D006BFB54 /* Frameworks */, - 435F41A90F532CA300887552 /* ShellScript */, ); buildRules = ( ); @@ -1043,26 +1223,53 @@ productReference = 1D6058910D05DD3D006BFB54 /* wolf3d.app */; productType = "com.apple.product-type.application"; }; + A1337A0D2090BAE300F4D670 /* wolf3dTV */ = { + isa = PBXNativeTarget; + buildConfigurationList = A1337A262090BAE400F4D670 /* Build configuration list for PBXNativeTarget "wolf3dTV" */; + buildPhases = ( + A1337A0C2090BAE300F4D670 /* Resources */, + A1337A0A2090BAE300F4D670 /* Sources */, + A1337A0B2090BAE300F4D670 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = wolf3dTV; + productName = wolf3dTV; + productReference = A1337A0E2090BAE300F4D670 /* wolf3dTV.app */; + productType = "com.apple.product-type.application"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; + attributes = { + LastUpgradeCheck = 1340; + TargetAttributes = { + A1337A0D2090BAE300F4D670 = { + CreatedOnToolsVersion = 9.3; + }; + }; + }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "wolf3d" */; compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( - English, - Japanese, - French, - German, + Base, + ja, + de, + en, + fr, ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; projectDirPath = ""; projectRoot = ../../../; targets = ( 1D6058900D05DD3D006BFB54 /* wolf3d */, + A1337A0D2090BAE300F4D670 /* wolf3dTV */, ); }; /* End PBXProject section */ @@ -1072,6 +1279,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + A19BF36A1FD6E4E100DAC4C1 /* base in Resources */, 43CF02ED0F56955F00E4A23D /* wolf3d_icon.png in Resources */, 43CF02FF0F56974E00E4A23D /* Default.png in Resources */, 4364BF3F0F5CB25900F29317 /* dist.plist in Resources */, @@ -1083,8 +1291,6 @@ 3D5C0C4D13DF8084008ECBD1 /* LevelSelectView.xib in Resources */, 350CCF9B13DF8B0E003303AB /* episode_bg.png in Resources */, 350CCF9F13DF8C47003303AB /* back_arrow.png in Resources */, - 350CCFA013DF8C47003303AB /* difficulty_selection_box.png in Resources */, - 350CCFCE13DF8DED003303AB /* mission_bg.png in Resources */, 3D5C0D0A13DF9B41008ECBD1 /* main_bg.png in Resources */, 3D5C0D2C13DF9D9B008ECBD1 /* MainMenuView~ipad.xib in Resources */, 3D5C0D3113DFA0DF008ECBD1 /* CreditsView.xib in Resources */, @@ -1092,12 +1298,9 @@ 3D5C0DF513E063F5008ECBD1 /* TriviaView.xib in Resources */, 35048AAA13E07E7800516B10 /* next_arrow.png in Resources */, 35048AAD13E0A03A00516B10 /* credits_bg.png in Resources */, + A112905E206DF0DB00BEDEB5 /* header_advanced.png in Resources */, 35048ABC13E0D2EA00516B10 /* wolf_bg.png in Resources */, 35048AC113E0D51600516B10 /* iphone_preset_1.png in Resources */, - 35048ADA13E0E98800516B10 /* difficulty_star1.png in Resources */, - 35048ADB13E0E98800516B10 /* difficulty_star2.png in Resources */, - 35048ADC13E0E98800516B10 /* difficulty_star3.png in Resources */, - 35048ADD13E0E98800516B10 /* difficulty_star4.png in Resources */, 3D5C0F8213E0FC46008ECBD1 /* iphone_preset_2.png in Resources */, 3D5C0F8313E0FC46008ECBD1 /* iphone_preset_3.png in Resources */, 3D5C0F8413E0FC46008ECBD1 /* iphone_preset_4.png in Resources */, @@ -1105,71 +1308,37 @@ 3534C87513E208F400740F63 /* CreditsView~ipad.xib in Resources */, 3534C87613E208F400740F63 /* TriviaView~ipad.xib in Resources */, 3534C88F13E220CE00740F63 /* LegalView~ipad.xib in Resources */, - C81E121C13E225FB00B1049A /* slider.png in Resources */, - C8D1CFE013E22A6700F0EAC6 /* Default-Portrait~ipad.png in Resources */, C8D1CFE413E22B5200F0EAC6 /* WOLF_57.png in Resources */, C8D1CFE613E22B5B00F0EAC6 /* WOLF_114.png in Resources */, C8D1CFE813E22B6800F0EAC6 /* WOLF_72.png in Resources */, + A1BB8B9B206E07C300D46B47 /* GODMODEFACE0PIC.png in Resources */, 3534C95C13E241AB00740F63 /* LevelSelectView~ipad.xib in Resources */, + A1BB8B8F206DFC2E00D46B47 /* header_ep1.png in Resources */, + A1BB8B8E206DFC2E00D46B47 /* header_ep10.png in Resources */, + A1129052206A808100BEDEB5 /* Launch Screen.storyboard in Resources */, 3534C95E13E241B100740F63 /* EpisodeView~ipad.xib in Resources */, - 3534C96A13E2485F00740F63 /* adv_button_frame.png in Resources */, - 3534C96C13E2486700740F63 /* preset_frame.png in Resources */, 3534C97F13E24E0E00740F63 /* SettingsView~ipad.xib in Resources */, + A1BB8B93206DFC2E00D46B47 /* header_ep5.png in Resources */, 3DE8828613E35E5000C95AE8 /* arialImageLAL_white-alpha.png in Resources */, + A1BB8B90206DFC2E00D46B47 /* header_ep4.png in Resources */, 3DE8828713E35E5000C95AE8 /* arialImageLAL.png in Resources */, - 3DE8828813E35E5000C95AE8 /* button_back.png in Resources */, - 3DE8828913E35E5000C95AE8 /* button_downloads.png in Resources */, - 3DE8828A13E35E5000C95AE8 /* button_knife.png in Resources */, - 3DE8828B13E35E5000C95AE8 /* button_left.png in Resources */, - 3DE8828C13E35E5000C95AE8 /* button_more.png in Resources */, - 3DE8828D13E35E5000C95AE8 /* button_new.png in Resources */, - 3DE8828E13E35E5000C95AE8 /* button_pistol.png in Resources */, - 3DE8828F13E35E5000C95AE8 /* button_resume.png in Resources */, - 3DE8829013E35E5000C95AE8 /* button_right.png in Resources */, - 3DE8829113E35E5000C95AE8 /* button_settings.png in Resources */, - 3DE8829213E35E5000C95AE8 /* button_trivia.png in Resources */, - 3DE8829313E35E5000C95AE8 /* button_web.png in Resources */, - 3DE8829413E35E5000C95AE8 /* diractional_01.png in Resources */, - 3DE8829513E35E5000C95AE8 /* diractional_02.png in Resources */, - 3DE8829613E35E5000C95AE8 /* diractional_03.png in Resources */, - 3DE8829A13E35E5000C95AE8 /* GODMODEFACE0PIC.png in Resources */, - 3DE8829B13E35E5000C95AE8 /* GODMODEFACE1PIC.png in Resources */, - 3DE8829C13E35E5000C95AE8 /* GODMODEFACE2PIC.png in Resources */, - 3DE8829D13E35E5000C95AE8 /* header_advanced.png in Resources */, - 3DE8829E13E35E5000C95AE8 /* header_ep1.png in Resources */, - 3DE8829F13E35E5000C95AE8 /* header_ep2.png in Resources */, - 3DE882A013E35E5000C95AE8 /* header_ep3.png in Resources */, - 3DE882A113E35E5000C95AE8 /* header_ep4.png in Resources */, - 3DE882A213E35E5000C95AE8 /* header_ep5.png in Resources */, - 3DE882A313E35E5000C95AE8 /* header_ep6.png in Resources */, - 3DE882A413E35E5000C95AE8 /* header_ep7.png in Resources */, - 3DE882A513E35E5000C95AE8 /* header_ep8.png in Resources */, - 3DE882A613E35E5000C95AE8 /* header_ep9.png in Resources */, - 3DE882A713E35E5000C95AE8 /* header_ep10.png in Resources */, - 3DE882A813E35E5000C95AE8 /* header_ep11.png in Resources */, + A1B7CA33209D195B00743C98 /* Default-Portrait.png in Resources */, 3DE882A913E35E5000C95AE8 /* intermission.png in Resources */, 3DE882AA13E35E5000C95AE8 /* iphone_image.png in Resources */, 3DE882AB13E35E5000C95AE8 /* kills_shadow.png in Resources */, + A1B7CA34209D195B00743C98 /* Default-Portrait~ipad.png in Resources */, 3DE882AC13E35E5000C95AE8 /* kills.png in Resources */, 3DE882AD13E35E5000C95AE8 /* map_background.png in Resources */, - 3DE882AE13E35E5000C95AE8 /* map.png in Resources */, - 3DE882AF13E35E5000C95AE8 /* menu_bar.png in Resources */, - 3DE882B013E35E5000C95AE8 /* menu.png in Resources */, - 3DE882B113E35E5000C95AE8 /* music_off.png in Resources */, - 3DE882B213E35E5000C95AE8 /* music_on.png in Resources */, + A1BB8B97206DFC2E00D46B47 /* header_ep11.png in Resources */, 3DE882B313E35E5000C95AE8 /* partime_shadow.png in Resources */, + A1BB8B9C206E07C300D46B47 /* GODMODEFACE1PIC.png in Resources */, 3DE882B413E35E5000C95AE8 /* partime.png in Resources */, + A1BB8B9D206E07C300D46B47 /* GODMODEFACE2PIC.png in Resources */, 3DE882B513E35E5000C95AE8 /* secrets_shadow.png in Resources */, 3DE882B613E35E5000C95AE8 /* secrets.png in Resources */, - 3DE882B713E35E5000C95AE8 /* shoot.png in Resources */, - 3DE882B813E35E5000C95AE8 /* side_2_side.png in Resources */, - 3DE882B913E35E5000C95AE8 /* slider_bar_rainbow.png in Resources */, - 3DE882BA13E35E5000C95AE8 /* slider_bar_underlay.png in Resources */, - 3DE882BB13E35E5000C95AE8 /* slider_bar.png in Resources */, - 3DE882BC13E35E5000C95AE8 /* slider_knob.png in Resources */, + A1BB8B92206DFC2E00D46B47 /* header_ep6.png in Resources */, 3DE882BD13E35E5000C95AE8 /* stats_large.png in Resources */, 3DE882BE13E35E5000C95AE8 /* stats.png in Resources */, - 3DE882BF13E35E5000C95AE8 /* status_hud.png in Resources */, 3DE882C013E35E5000C95AE8 /* submenus_background_image.png in Resources */, 3DE882C113E35E5000C95AE8 /* treasure_shadow.png in Resources */, 3DE882C213E35E5000C95AE8 /* treasure.png in Resources */, @@ -1177,8 +1346,11 @@ 3DE882C413E35E5000C95AE8 /* victory_256.png in Resources */, 35E6E15513F3172F0010F530 /* adv_btn.png in Resources */, 35E6E15B13F3182C0010F530 /* settings_divider.png in Resources */, + A1BB8B96206DFC2E00D46B47 /* header_ep3.png in Resources */, 35E6E15C13F3182C0010F530 /* up_arrow.png in Resources */, + A1BB8B94206DFC2E00D46B47 /* header_ep9.png in Resources */, 35E6E16013F318420010F530 /* left_chevron.png in Resources */, + A1BB8B91206DFC2E00D46B47 /* header_ep2.png in Resources */, 35E6E16113F318420010F530 /* right_chevron.png in Resources */, 35E6E16413F318600010F530 /* highlight_bracket.png in Resources */, 35E6E16913F318A50010F530 /* down_arrow.png in Resources */, @@ -1192,6 +1364,8 @@ 350BA59913F34F7900FAE7E4 /* difficulty_head2.png in Resources */, 350BA59A13F34F7900FAE7E4 /* difficulty_head3.png in Resources */, 350BA59B13F34F7900FAE7E4 /* difficulty_head4.png in Resources */, + A1BB8B95206DFC2E00D46B47 /* header_ep7.png in Resources */, + A1BB8B8D206DFC2E00D46B47 /* header_ep8.png in Resources */, 3DF1804413F44D6700ED668A /* episode_bracket.png in Resources */, 3DF1804513F44D6700ED668A /* episode_divider.png in Resources */, 3DBC68E713F599B4002A8253 /* settings_line_art.png in Resources */, @@ -1204,23 +1378,98 @@ ); runOnlyForDeploymentPostprocessing = 0; }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 435F41A90F532CA300887552 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; + A1337A0C2090BAE300F4D670 /* Resources */ = { + isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - ); - inputPaths = ( - ); - outputPaths = ( + A12D765120913E1900B4A4BB /* base in Resources */, + A1337A962090BCF000F4D670 /* wolf3d_icon.png in Resources */, + A1337A572090BCE100F4D670 /* arialImageLAL_white-alpha.png in Resources */, + A1337A9A2090BCF800F4D670 /* WOLF_114.png in Resources */, + A1337A6F2090BCE100F4D670 /* header_ep11.png in Resources */, + A1337A6D2090BCE100F4D670 /* header_ep9.png in Resources */, + A1337A882090BCE100F4D670 /* settings_slider_white.png in Resources */, + A1337A922090BCE100F4D670 /* victory_256.png in Resources */, + A1337A992090BCF800F4D670 /* WOLF_72.png in Resources */, + A1337A6A2090BCE100F4D670 /* header_ep6.png in Resources */, + A1337A952090BCEA00F4D670 /* wondering.caf in Resources */, + A12D766520914F8700B4A4BB /* EpisodeCell-tvos.xib in Resources */, + A1337A862090BCE100F4D670 /* settings_slider_grey.png in Resources */, + A1337A672090BCE100F4D670 /* header_ep3.png in Resources */, + A1337A5C2090BCE100F4D670 /* difficulty_head1.png in Resources */, + A1337A832090BCE100F4D670 /* settings_line_art.png in Resources */, + A1337A932090BCE100F4D670 /* wolf_bg.png in Resources */, + A1337A7E2090BCE100F4D670 /* partime.png in Resources */, + A1337A842090BCE100F4D670 /* settings_slider_blue.png in Resources */, + A1337A942090BCE100F4D670 /* Default.png in Resources */, + A1337A792090BCE100F4D670 /* left_chevron.png in Resources */, + A1337A552090BCE100F4D670 /* GODMODEFACE2PIC.png in Resources */, + A1337A782090BCE100F4D670 /* kills.png in Resources */, + A1337A5D2090BCE100F4D670 /* difficulty_head2.png in Resources */, + A1337A602090BCE100F4D670 /* down_arrow.png in Resources */, + A12D765C209149A100B4A4BB /* LevelSelectView-tvos.xib in Resources */, + A1337A632090BCE100F4D670 /* episode_divider.png in Resources */, + A1337A6C2090BCE100F4D670 /* header_ep8.png in Resources */, + A1337A912090BCE100F4D670 /* up_down.png in Resources */, + A1337A732090BCE100F4D670 /* iphone_preset_1.png in Resources */, + A1337A7D2090BCE100F4D670 /* partime_shadow.png in Resources */, + A1337A892090BCE100F4D670 /* settings_slider_white~ipad.png in Resources */, + A1337A592090BCE100F4D670 /* back_arrow.png in Resources */, + A1337A582090BCE100F4D670 /* arialImageLAL.png in Resources */, + A1337A712090BCE100F4D670 /* intermission.png in Resources */, + A1337A772090BCE100F4D670 /* kills_shadow.png in Resources */, + A1337A722090BCE100F4D670 /* iphone_image.png in Resources */, + A1337A642090BCE100F4D670 /* header_advanced.png in Resources */, + A1337A742090BCE100F4D670 /* iphone_preset_2.png in Resources */, + A1337A8E2090BCE100F4D670 /* treasure_shadow.png in Resources */, + A1337A7C2090BCE100F4D670 /* next_arrow.png in Resources */, + A1337A562090BCE100F4D670 /* adv_btn.png in Resources */, + A1337A692090BCE100F4D670 /* header_ep5.png in Resources */, + A1337A872090BCE100F4D670 /* settings_slider_grey~ipad.png in Resources */, + A1337A762090BCE100F4D670 /* iphone_preset_4.png in Resources */, + A1337A8D2090BCE100F4D670 /* submenus_background_image.png in Resources */, + A1337A8C2090BCE100F4D670 /* stats.png in Resources */, + A12D7660209149CF00B4A4BB /* TriviaView-tvos.xib in Resources */, + A12D765020913DB900B4A4BB /* MainMenuView-tvos.xib in Resources */, + A1337A662090BCE100F4D670 /* header_ep2.png in Resources */, + A1337A752090BCE100F4D670 /* iphone_preset_3.png in Resources */, + A1337A822090BCE100F4D670 /* settings_divider.png in Resources */, + A1337A5E2090BCE100F4D670 /* difficulty_head3.png in Resources */, + A1337A622090BCE100F4D670 /* episode_bracket.png in Resources */, + A1337A532090BCE100F4D670 /* GODMODEFACE0PIC.png in Resources */, + A1337A8F2090BCE100F4D670 /* treasure.png in Resources */, + A1337A702090BCE100F4D670 /* highlight_bracket.png in Resources */, + A1337A6E2090BCE100F4D670 /* header_ep10.png in Resources */, + A1337A612090BCE100F4D670 /* episode_bg.png in Resources */, + A1337A512090BCBF00F4D670 /* POSITYPE-idSettler10v2.otf in Resources */, + A1337A522090BCCF00F4D670 /* dist.plist in Resources */, + A1337A7B2090BCE100F4D670 /* map_background.png in Resources */, + A1337A7F2090BCE100F4D670 /* right_chevron.png in Resources */, + A1337A1A2090BAE400F4D670 /* Assets.xcassets in Resources */, + A1337A542090BCE100F4D670 /* GODMODEFACE1PIC.png in Resources */, + A1337A812090BCE100F4D670 /* secrets.png in Resources */, + A12D76542091491900B4A4BB /* CreditsView-tvos.xib in Resources */, + A1337A972090BCF000F4D670 /* wolf3dlite_icon.png in Resources */, + A12D76582091496E00B4A4BB /* EpisodeView-tvos.xib in Resources */, + A1337A7A2090BCE100F4D670 /* main_bg.png in Resources */, + A1337A982090BCF800F4D670 /* WOLF_57.png in Resources */, + A1337A852090BCE100F4D670 /* settings_slider_blue~ipad.png in Resources */, + A12D765A2091498000B4A4BB /* LegalView-tvos.xib in Resources */, + A1337A8B2090BCE100F4D670 /* stats_large.png in Resources */, + A1337A5A2090BCE100F4D670 /* button_highlight.png in Resources */, + A1337A902090BCE100F4D670 /* up_arrow.png in Resources */, + A1337A682090BCE100F4D670 /* header_ep4.png in Resources */, + A1337A5B2090BCE100F4D670 /* credits_bg.png in Resources */, + A1337A802090BCE100F4D670 /* secrets_shadow.png in Resources */, + A1337A6B2090BCE100F4D670 /* header_ep7.png in Resources */, + A12D765E209149BF00B4A4BB /* SkillView-tvos.xib in Resources */, + A1337A8A2090BCE100F4D670 /* star_icon.png in Resources */, + A1337A5F2090BCE100F4D670 /* difficulty_head4.png in Resources */, + A1337A652090BCE100F4D670 /* header_ep1.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; - shellPath = "/bin/sh -x"; - shellScript = "PBXCP=${DEVELOPER_DIR}/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp\nBASE=${PROJECT_DIR}/../../base\nDST=${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\n${PBXCP} -exclude .svn ${BASE} ${DST}\n# \"${PROJECT_DIR}/../../base\" \"${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/\"\nSCRIPTS=${PROJECT_DIR}/../../scripts\n/usr/bin/perl ${SCRIPTS}/scrubBase.pl ${BASE} ${DST}\n\n"; }; -/* End PBXShellScriptBuildPhase section */ +/* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 1D60588E0D05DD3D006BFB54 /* Sources */ = { @@ -1308,7 +1557,6 @@ ED0A8D141069ACA8001E0547 /* iphone_downloadUserMap.m in Sources */, ED0A8D151069ACA8001E0547 /* iphone_mapselector.c in Sources */, 3D3ED73F13BF554400C5B1DF /* wolf3dViewController.m in Sources */, - 3D24009E13D89BF4009FC7A7 /* iphone_store.m in Sources */, 3D86CF8E13DDE51800186487 /* MainMenuViewController.m in Sources */, 3DDD3A2413DF231100967735 /* UIFontButton.m in Sources */, 3D5C0C2B13DF6836008ECBD1 /* EpisodeViewController.m in Sources */, @@ -1325,6 +1573,105 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A1337A0A2090BAE300F4D670 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A1337A422090BC8700F4D670 /* floor1.c in Sources */, + A1337A2A2090BBA700F4D670 /* LegalViewController.m in Sources */, + A1337AB12091388600F4D670 /* wolf_actor_ai.c in Sources */, + A1337A402090BC8700F4D670 /* codebook.c in Sources */, + A1337ABD2091388600F4D670 /* wolf_powerups.c in Sources */, + A1337A332090BC6C00F4D670 /* iphone_alerts.m in Sources */, + A1337AD6209138FA00F4D670 /* opengl_draw.c in Sources */, + A1337A3B2090BC6C00F4D670 /* iphone_sys.m in Sources */, + A1337AE2209138FA00F4D670 /* vector.c in Sources */, + A1337ADC209138FA00F4D670 /* sound_sfx_id.c in Sources */, + A1337AD3209138FA00F4D670 /* oggfile.c in Sources */, + A1337ACA209138FA00F4D670 /* cvar.c in Sources */, + A1337A442090BC8700F4D670 /* info.c in Sources */, + A1337AC7209138FA00F4D670 /* com_string.c in Sources */, + A1337AC12091388600F4D670 /* wolf_sprites.c in Sources */, + A1337AB32091388600F4D670 /* wolf_ai_com.c in Sources */, + A1337A382090BC6C00F4D670 /* iphone_mapselector.c in Sources */, + A1337A2D2090BBA700F4D670 /* wolf3dViewController.m in Sources */, + A1337AC6209138FA00F4D670 /* cmd.c in Sources */, + A1337A3F2090BC8700F4D670 /* block.c in Sources */, + A1337AC5209138FA00F4D670 /* arch.c in Sources */, + A1337ADA209138FA00F4D670 /* share.c in Sources */, + A1337A342090BC6C00F4D670 /* iphone_downloadSOD.m in Sources */, + A1337AB82091388600F4D670 /* wolf_level.c in Sources */, + A1337AE3209138FA00F4D670 /* wavfile.c in Sources */, + A1337AC4209138FA00F4D670 /* angle.c in Sources */, + A1337A2F2090BBA700F4D670 /* SkillViewController.m in Sources */, + A1337A322090BC6C00F4D670 /* hud.c in Sources */, + A1337AB72091388600F4D670 /* wolf_doors.c in Sources */, + A1337A302090BC4C00F4D670 /* EAGLView.m in Sources */, + A1337A2B2090BBA700F4D670 /* LevelSelectViewController.m in Sources */, + A1337AD0209138FA00F4D670 /* math.c in Sources */, + A1337ADF209138FA00F4D670 /* tga.c in Sources */, + A1337A502090BCB800F4D670 /* wolf3dAppDelegate.m in Sources */, + A1337ABB2091388600F4D670 /* wolf_opengl.c in Sources */, + A1337ABE2091388600F4D670 /* wolf_pushwalls.c in Sources */, + A1337AC02091388600F4D670 /* wolf_renderer.c in Sources */, + A1337AD2209138FA00F4D670 /* memory.c in Sources */, + A1337ABA2091388600F4D670 /* wolf_math.c in Sources */, + A1337A4B2090BC8700F4D670 /* window.c in Sources */, + A1337A4C2090BCA700F4D670 /* UIFontButton.m in Sources */, + A1337AB62091388600F4D670 /* wolf_client_main.c in Sources */, + A1337A352090BC6C00F4D670 /* iphone_downloadUserMap.m in Sources */, + A1337A412090BC8700F4D670 /* floor0.c in Sources */, + A1337AD4209138FA00F4D670 /* openal_binding.c in Sources */, + A1337ACB209138FA00F4D670 /* fileio.c in Sources */, + A1337AC8209138FA00F4D670 /* common.c in Sources */, + A1337AD9209138FA00F4D670 /* random_number.c in Sources */, + A1337AE4209138FA00F4D670 /* zmem.c in Sources */, + A1337ABC2091388600F4D670 /* wolf_player.c in Sources */, + A1337A432090BC8700F4D670 /* framing.c in Sources */, + A1337ACF209138FA00F4D670 /* glob.c in Sources */, + A1337ACC209138FA00F4D670 /* files.c in Sources */, + A1337A362090BC6C00F4D670 /* iphone_loop.c in Sources */, + A1337AD7209138FA00F4D670 /* opengl_main.c in Sources */, + A1337A482090BC8700F4D670 /* sharedbook.c in Sources */, + A1337AB22091388600F4D670 /* wolf_actors.c in Sources */, + A1337ACD209138FA00F4D670 /* filestring.c in Sources */, + A1337A472090BC8700F4D670 /* res012.c in Sources */, + A1337AD1209138FA00F4D670 /* matrix.c in Sources */, + A1337A282090BBA700F4D670 /* CreditsViewController.m in Sources */, + A1337AD8209138FA00F4D670 /* opengl_texture.c in Sources */, + A1337AE52091396900F4D670 /* mdct.c in Sources */, + A1337AC22091388600F4D670 /* wolf_sv_ccmds.c in Sources */, + A1337A4A2090BC8700F4D670 /* vorbisfile.c in Sources */, + A1337A462090BC8700F4D670 /* registry.c in Sources */, + A1337ADD209138FA00F4D670 /* sound_stream.c in Sources */, + A1337AE0209138FA00F4D670 /* unix_file.c in Sources */, + A1337A4F2090BCA700F4D670 /* UITableViewScrolling.m in Sources */, + A1337A3D2090BC6C00F4D670 /* MissionTableViewCell.m in Sources */, + A1337AB52091388600F4D670 /* wolf_bj.c in Sources */, + A1337A492090BC8700F4D670 /* synthesis.c in Sources */, + A1337AD5209138FA00F4D670 /* openal_main.c in Sources */, + A1337AB42091388600F4D670 /* wolf_areas.c in Sources */, + A1337AC32091388600F4D670 /* wolf_weapon.c in Sources */, + A1337A2C2090BBA700F4D670 /* MainMenuViewController.m in Sources */, + A1337A292090BBA700F4D670 /* EpisodeViewController.m in Sources */, + A1337AC9209138FA00F4D670 /* console.c in Sources */, + A1337A3E2090BC8700F4D670 /* bitwise.c in Sources */, + A1337AE1209138FA00F4D670 /* unix_timer.c in Sources */, + A1337A4D2090BCA700F4D670 /* UIFontLabel.m in Sources */, + A1337AB92091388600F4D670 /* wolf_main.c in Sources */, + A1337A372090BC6C00F4D670 /* iphone_main.c in Sources */, + A1337ACE209138FA00F4D670 /* font_manager.c in Sources */, + A1337ADE209138FA00F4D670 /* texture_manager.c in Sources */, + A1337A392090BC6C00F4D670 /* iphone_menus.c in Sources */, + A1337A312090BC6C00F4D670 /* gles_glue.c in Sources */, + A1337A3C2090BC6C00F4D670 /* main.m in Sources */, + A1337A452090BC8700F4D670 /* mapping0.c in Sources */, + A1337ADB209138FA00F4D670 /* sound.c in Sources */, + A1337A2E2090BBA700F4D670 /* TriviaViewController.m in Sources */, + A1337ABF2091388600F4D670 /* wolf_raycast.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ @@ -1332,18 +1679,27 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ENABLE_OBJC_WEAK = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; + DEVELOPMENT_TEAM = 9UY8SFDNQ8; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = wolf3d_Prefix.pch; GCC_PREPROCESSOR_DEFINITIONS = IPHONE; HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MARKETING_VERSION = 1; + PRODUCT_BUNDLE_IDENTIFIER = "com.idsoftware.${PRODUCT_NAME:identifier}"; PRODUCT_NAME = wolf3d; PROFILE_PREFIX = nu.r3; + PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; }; name = Debug; }; @@ -1351,33 +1707,65 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ENABLE_OBJC_WEAK = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = YES; + DEVELOPMENT_TEAM = 9UY8SFDNQ8; + GCC_NO_COMMON_BLOCKS = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = wolf3d_Prefix.pch; GCC_PREPROCESSOR_DEFINITIONS = IPHONE; HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MARKETING_VERSION = 1; + PRODUCT_BUNDLE_IDENTIFIER = "com.idsoftware.${PRODUCT_NAME:identifier}"; PRODUCT_NAME = wolf3d; PROFILE_PREFIX = nu.r3; + PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; }; name = Release; }; 431181700F994C5400FF9351 /* AdHocDistLite */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_ENTITLEMENTS = dist.plist; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Cass Everitt"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = YES; GCC_THUMB_SUPPORT = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_VERSION = ""; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 3.2; - PREBINDING = NO; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; "PROVISIONING_PROFILE[sdk=iphoneos*]" = "E2E91433-8CD1-46DB-9DC5-B7E4C84FD1C2"; SDKROOT = iphoneos; SYMROOT = ../../build; @@ -1388,8 +1776,12 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ENABLE_OBJC_WEAK = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = YES; + DEVELOPMENT_TEAM = 9UY8SFDNQ8; + GCC_NO_COMMON_BLOCKS = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = wolf3d_Prefix.pch; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -1398,26 +1790,53 @@ ); HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MARKETING_VERSION = 1; PRODUCT_NAME = wolf3dlite; PROFILE_PREFIX = nu.r3; + PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; }; name = AdHocDistLite; }; 4364BF480F5CB27300F29317 /* AdHocDist */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_ENTITLEMENTS = dist.plist; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: id Software"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = YES; GCC_THUMB_SUPPORT = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_VERSION = ""; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 3.2; - PREBINDING = NO; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; "PROVISIONING_PROFILE[sdk=iphoneos*]" = "E2E91433-8CD1-46DB-9DC5-B7E4C84FD1C2"; SDKROOT = iphoneos; SYMROOT = ../../build; @@ -1428,32 +1847,64 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ENABLE_OBJC_WEAK = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = YES; + DEVELOPMENT_TEAM = 9UY8SFDNQ8; + GCC_NO_COMMON_BLOCKS = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = wolf3d_Prefix.pch; GCC_PREPROCESSOR_DEFINITIONS = IPHONE; HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MARKETING_VERSION = 1; + PRODUCT_BUNDLE_IDENTIFIER = "com.idsoftware.${PRODUCT_NAME:identifier}"; PRODUCT_NAME = wolf3d; PROFILE_PREFIX = nu.r3; + PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; }; name = AdHocDist; }; 43AE7CA40F61EC4E00B2F562 /* ReleaseLite */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = YES; GCC_THUMB_SUPPORT = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_VERSION = ""; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 3.2; - PREBINDING = NO; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; SDKROOT = iphoneos; SYMROOT = ../../build; @@ -1464,8 +1915,12 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ENABLE_OBJC_WEAK = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = YES; + DEVELOPMENT_TEAM = 9UY8SFDNQ8; + GCC_NO_COMMON_BLOCKS = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = wolf3d_Prefix.pch; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -1474,26 +1929,55 @@ ); HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MARKETING_VERSION = 1; PRODUCT_NAME = wolf3dlite; PROFILE_PREFIX = nu.r3; + PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; }; name = ReleaseLite; }; 43AE7CAE0F61FC9200B2F562 /* DebugLite */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = "-DDEBUG"; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_VERSION = ""; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 3.2; - PREBINDING = NO; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SYMROOT = ../../build; }; @@ -1503,9 +1987,13 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ENABLE_OBJC_WEAK = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; + DEVELOPMENT_TEAM = 9UY8SFDNQ8; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = wolf3d_Prefix.pch; @@ -1515,27 +2003,406 @@ ); HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MARKETING_VERSION = 1; PRODUCT_NAME = wolf3dlite; PROFILE_PREFIX = nu.r3; + PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; }; name = DebugLite; }; + A1337A1E2090BAE400F4D670 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES_NONAGGRESSIVE; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; + CLANG_CXX_LANGUAGE_STANDARD = "compiler-default"; + CLANG_CXX_LIBRARY = "compiler-default"; + CLANG_ENABLE_MODULES = NO; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = 9UY8SFDNQ8; + ENABLE_NS_ASSERTIONS = YES; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = wolf3d_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = IPHONE; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + INFOPLIST_FILE = wolf3dTV/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ""; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.tomkiddconsulting.wolf3dTV; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 12.0; + VALIDATE_PRODUCT = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; + }; + name = Debug; + }; + A1337A1F2090BAE400F4D670 /* DebugLite */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES_NONAGGRESSIVE; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; + CLANG_CXX_LANGUAGE_STANDARD = "compiler-default"; + CLANG_CXX_LIBRARY = "compiler-default"; + CLANG_ENABLE_MODULES = NO; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = 9UY8SFDNQ8; + ENABLE_NS_ASSERTIONS = YES; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = wolf3d_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + LITE, + IPHONE, + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + INFOPLIST_FILE = wolf3dTV/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ""; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.tomkiddconsulting.wolf3dTV; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 12.0; + VALIDATE_PRODUCT = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; + }; + name = DebugLite; + }; + A1337A202090BAE400F4D670 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES_NONAGGRESSIVE; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; + CLANG_CXX_LANGUAGE_STANDARD = "compiler-default"; + CLANG_CXX_LIBRARY = "compiler-default"; + CLANG_ENABLE_MODULES = NO; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = 9UY8SFDNQ8; + ENABLE_NS_ASSERTIONS = YES; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = wolf3d_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = IPHONE; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + INFOPLIST_FILE = wolf3dTV/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ""; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = com.tomkiddconsulting.wolf3dTV; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 12.0; + VALIDATE_PRODUCT = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; + }; + name = Release; + }; + A1337A212090BAE400F4D670 /* ReleaseLite */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES_NONAGGRESSIVE; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; + CLANG_CXX_LANGUAGE_STANDARD = "compiler-default"; + CLANG_CXX_LIBRARY = "compiler-default"; + CLANG_ENABLE_MODULES = NO; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = 9UY8SFDNQ8; + ENABLE_NS_ASSERTIONS = YES; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = wolf3d_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + LITE, + IPHONE, + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + INFOPLIST_FILE = wolf3dTV/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ""; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = com.tomkiddconsulting.wolf3dTV; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 12.0; + VALIDATE_PRODUCT = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; + }; + name = ReleaseLite; + }; + A1337A222090BAE400F4D670 /* AdHocDist */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES_NONAGGRESSIVE; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; + CLANG_CXX_LANGUAGE_STANDARD = "compiler-default"; + CLANG_CXX_LIBRARY = "compiler-default"; + CLANG_ENABLE_MODULES = NO; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = 9UY8SFDNQ8; + ENABLE_NS_ASSERTIONS = YES; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = wolf3d_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = IPHONE; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + INFOPLIST_FILE = wolf3dTV/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ""; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = com.tomkiddconsulting.wolf3dTV; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 12.0; + VALIDATE_PRODUCT = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; + }; + name = AdHocDist; + }; + A1337A232090BAE400F4D670 /* AdHocDistLite */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES_NONAGGRESSIVE; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; + CLANG_CXX_LANGUAGE_STANDARD = "compiler-default"; + CLANG_CXX_LIBRARY = "compiler-default"; + CLANG_ENABLE_MODULES = NO; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = 9UY8SFDNQ8; + ENABLE_NS_ASSERTIONS = YES; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = wolf3d_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + LITE, + IPHONE, + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + INFOPLIST_FILE = wolf3dTV/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ""; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = com.tomkiddconsulting.wolf3dTV; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 12.0; + VALIDATE_PRODUCT = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; + }; + name = AdHocDistLite; + }; + A1337A242090BAE400F4D670 /* Distribution */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES_NONAGGRESSIVE; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; + CLANG_CXX_LANGUAGE_STANDARD = "compiler-default"; + CLANG_CXX_LIBRARY = "compiler-default"; + CLANG_ENABLE_MODULES = NO; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = 9UY8SFDNQ8; + ENABLE_NS_ASSERTIONS = YES; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = wolf3d_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = IPHONE; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + INFOPLIST_FILE = wolf3dTV/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ""; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = com.tomkiddconsulting.wolf3dTV; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 12.0; + VALIDATE_PRODUCT = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; + }; + name = Distribution; + }; + A1337A252090BAE400F4D670 /* DistributionLite */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES_NONAGGRESSIVE; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; + CLANG_CXX_LANGUAGE_STANDARD = "compiler-default"; + CLANG_CXX_LIBRARY = "compiler-default"; + CLANG_ENABLE_MODULES = NO; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = 9UY8SFDNQ8; + ENABLE_NS_ASSERTIONS = YES; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = wolf3d_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + LITE, + IPHONE, + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + INFOPLIST_FILE = wolf3dTV/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ""; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = com.tomkiddconsulting.wolf3dTV; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 12.0; + VALIDATE_PRODUCT = NO; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; + }; + name = DistributionLite; + }; C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = "-DDEBUG"; - GCC_TREAT_WARNINGS_AS_ERRORS = YES; - GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_TREAT_WARNINGS_AS_ERRORS = NO; + GCC_VERSION = ""; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 3.2; - PREBINDING = NO; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SYMROOT = ../../build; }; @@ -1544,19 +2411,42 @@ C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_DYNAMIC_NO_PIC = YES; GCC_ENABLE_OBJC_EXCEPTIONS = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 3; GCC_THUMB_SUPPORT = NO; GCC_UNROLL_LOOPS = YES; - GCC_VERSION = 4.2; + GCC_VERSION = ""; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 3.2; - PREBINDING = NO; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; SDKROOT = iphoneos; SYMROOT = ../../build; @@ -1566,15 +2456,38 @@ C8139B6B13FC40750094C2C0 /* DistributionLite */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: id Software"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = YES; GCC_THUMB_SUPPORT = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_VERSION = ""; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 3.2; - PREBINDING = NO; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; "PROVISIONING_PROFILE[sdk=iphoneos*]" = "31C73095-0DD9-4ABA-BB25-8D23F661F10F"; SDKROOT = iphoneos; SYMROOT = ../../build; @@ -1585,8 +2498,12 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ENABLE_OBJC_WEAK = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = YES; + DEVELOPMENT_TEAM = 9UY8SFDNQ8; + GCC_NO_COMMON_BLOCKS = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = wolf3d_Prefix.pch; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -1595,25 +2512,52 @@ ); HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MARKETING_VERSION = 1; PRODUCT_NAME = wolf3dlite; PROFILE_PREFIX = nu.r3; + PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; }; name = DistributionLite; }; ED2751531083BE8C009C891E /* Distribution */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: id Software"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = YES; GCC_THUMB_SUPPORT = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_VERSION = ""; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 3.2; - PREBINDING = NO; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; "PROVISIONING_PROFILE[sdk=iphoneos*]" = "31C73095-0DD9-4ABA-BB25-8D23F661F10F"; SDKROOT = iphoneos; SYMROOT = ../../build; @@ -1624,17 +2568,26 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ENABLE_OBJC_WEAK = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = YES; + DEVELOPMENT_TEAM = 9UY8SFDNQ8; + GCC_NO_COMMON_BLOCKS = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = wolf3d_Prefix.pch; GCC_PREPROCESSOR_DEFINITIONS = IPHONE; HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MARKETING_VERSION = 1; + PRODUCT_BUNDLE_IDENTIFIER = "com.idsoftware.${PRODUCT_NAME:identifier}"; PRODUCT_NAME = wolf3d; PROFILE_PREFIX = nu.r3; + PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGLES; }; name = Distribution; }; @@ -1656,6 +2609,21 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + A1337A262090BAE400F4D670 /* Build configuration list for PBXNativeTarget "wolf3dTV" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A1337A1E2090BAE400F4D670 /* Debug */, + A1337A1F2090BAE400F4D670 /* DebugLite */, + A1337A202090BAE400F4D670 /* Release */, + A1337A212090BAE400F4D670 /* ReleaseLite */, + A1337A222090BAE400F4D670 /* AdHocDist */, + A1337A232090BAE400F4D670 /* AdHocDistLite */, + A1337A242090BAE400F4D670 /* Distribution */, + A1337A252090BAE400F4D670 /* DistributionLite */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; C01FCF4E08A954540054247B /* Build configuration list for PBXProject "wolf3d" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/wolf3d/code/iphone/wolf3d.xcodeproj/project.xcworkspace/xcuserdata/ryan.gerleve.xcuserdatad/UserInterfaceState.xcuserstate b/wolf3d/code/iphone/wolf3d.xcodeproj/project.xcworkspace/xcuserdata/ryan.gerleve.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index d358fa0..0000000 --- a/wolf3d/code/iphone/wolf3d.xcodeproj/project.xcworkspace/xcuserdata/ryan.gerleve.xcuserdatad/UserInterfaceState.xcuserstate +++ /dev/null @@ -1,13352 +0,0 @@ - - - - - $archiver - NSKeyedArchiver - $objects - - $null - - $class - - CF$UID - 87 - - NS.keys - - - CF$UID - 2 - - - CF$UID - 3 - - - NS.objects - - - CF$UID - 4 - - - CF$UID - 618 - - - - 04A960C0-F0FB-4FFE-8B33-9A3E3166F3A7 - IDEWorkspaceDocument - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 5 - - - CF$UID - 6 - - - CF$UID - 7 - - - CF$UID - 8 - - - CF$UID - 9 - - - CF$UID - 10 - - - NS.objects - - - CF$UID - 7 - - - CF$UID - 11 - - - CF$UID - 13 - - - CF$UID - 617 - - - CF$UID - 497 - - - CF$UID - 2 - - - - IDEActiveWorkspaceTabController - IDEOrderedWorkspaceTabControllers - IDEWorkspaceTabController_C6037F83-CE47-4CA3-8F0B-75B835318606 - IDEWindowFrame - IDEWindowToolbarIsVisible - IDEWorkspaceWindowControllerUniqueIdentifier - - $class - - CF$UID - 12 - - NS.objects - - - CF$UID - 7 - - - - - $classes - - NSArray - NSObject - - $classname - NSArray - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 14 - - - CF$UID - 15 - - - CF$UID - 16 - - - CF$UID - 17 - - - CF$UID - 18 - - - CF$UID - 19 - - - CF$UID - 20 - - - CF$UID - 21 - - - NS.objects - - - CF$UID - 22 - - - CF$UID - 497 - - - CF$UID - 460 - - - CF$UID - 507 - - - CF$UID - 513 - - - CF$UID - 607 - - - CF$UID - 497 - - - CF$UID - 616 - - - - IDEEditorArea - IDEShowNavigator - AssistantEditorsLayout - IDEWorkspaceTabControllerUtilityAreaSplitView - IDENavigatorArea - IDEWorkspaceTabControllerDesignAreaSplitView - IDEShowUtilities - IDETabLabel - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 23 - - - CF$UID - 24 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 27 - - - CF$UID - 28 - - - CF$UID - 29 - - - CF$UID - 30 - - - NS.objects - - - CF$UID - 31 - - - CF$UID - 49 - - - CF$UID - 471 - - - CF$UID - 497 - - - CF$UID - 460 - - - CF$UID - 498 - - - CF$UID - 506 - - - CF$UID - 497 - - - - layoutTree - IDEEditorMode_Standard - IDEEDitorArea_DebugArea - IDEShowEditor - EditorMode - DebuggerSplitView - DefaultPersistentRepresentations - ShowDebuggerArea - - $class - - CF$UID - 48 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 32 - - rootLayoutTreeNode - - CF$UID - 45 - - - - $class - - CF$UID - 47 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 33 - - orientation - 0 - parent - - CF$UID - 45 - - - - $class - - CF$UID - 44 - - DocumentLocation - - CF$UID - 40 - - DomainIdentifier - - CF$UID - 34 - - IdentifierPath - - CF$UID - 35 - - IndexOfDocumentIdentifier - - CF$UID - 39 - - - Xcode.IDENavigableItemDomain.WorkspaceStructure - - $class - - CF$UID - 12 - - NS.objects - - - CF$UID - 36 - - - - - $class - - CF$UID - 38 - - Identifier - - CF$UID - 37 - - - wolf3d - - $classes - - IDEArchivableStringIndexPair - NSObject - - $classname - IDEArchivableStringIndexPair - - 9223372036854775807 - - $class - - CF$UID - 43 - - documentURL - - CF$UID - 41 - - timestamp - - CF$UID - 0 - - - - $class - - CF$UID - 42 - - NS.string - file://localhost/Work/ryan.gerleve/idMobileDepot/Wolfenstein3DPlatinumDepot/wolf3d/code/iphone/wolf3d.xcodeproj/ - - - $classes - - NSMutableString - NSString - NSObject - - $classname - NSMutableString - - - $classes - - DVTDocumentLocation - NSObject - - $classname - DVTDocumentLocation - - - $classes - - IDENavigableItemArchivableRepresentation - NSObject - - $classname - IDENavigableItemArchivableRepresentation - - - $class - - CF$UID - 47 - - children - - CF$UID - 46 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 12 - - NS.objects - - - CF$UID - 32 - - - - - $classes - - IDEWorkspaceTabControllerLayoutTreeNode - NSObject - - $classname - IDEWorkspaceTabControllerLayoutTreeNode - - - $classes - - IDEWorkspaceTabControllerLayoutTree - NSObject - - $classname - IDEWorkspaceTabControllerLayoutTree - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 50 - - - NS.objects - - - CF$UID - 51 - - - - EditorLayout_PersistentRepresentation - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 52 - - - NS.objects - - - CF$UID - 53 - - - - Main - - $class - - CF$UID - 87 - - NS.keys - - - CF$UID - 54 - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 57 - - - CF$UID - 460 - - - CF$UID - 469 - - - - EditorLayout_StateSavingStateDictionaries - EditorLayout_Selected - EditorLayout_Geometry - - $class - - CF$UID - 12 - - NS.objects - - - CF$UID - 58 - - - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - NS.objects - - - CF$UID - 66 - - - CF$UID - 67 - - - CF$UID - 72 - - - CF$UID - 464 - - - CF$UID - 464 - - - CF$UID - 465 - - - CF$UID - 466 - - - - FileDataType - ArchivableRepresentation - EditorState - NavigableItemName - DocumentNavigableItemName - DocumentExtensionIdentifier - DocumentURL - com.apple.xcode.project - - $class - - CF$UID - 44 - - DocumentLocation - - CF$UID - 40 - - DomainIdentifier - - CF$UID - 34 - - IdentifierPath - - CF$UID - 68 - - IndexOfDocumentIdentifier - - CF$UID - 71 - - - - $class - - CF$UID - 12 - - NS.objects - - - CF$UID - 69 - - - - - $class - - CF$UID - 38 - - Identifier - - CF$UID - 70 - - - wolf3d - 9223372036854775807 - - $class - - CF$UID - 87 - - NS.keys - - - CF$UID - 73 - - - CF$UID - 74 - - - CF$UID - 75 - - - CF$UID - 76 - - - CF$UID - 77 - - - NS.objects - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 92 - - - CF$UID - 93 - - - CF$UID - 463 - - - - Xcode3ProjectEditorPreviousProjectEditorClass - Xcode3ProjectEditor.sourceList.splitview - Xcode3ProjectEditorPreviousTargetEditorClass - Xcode3ProjectEditorSelectedDocumentLocations - Xcode3ProjectEditor_Xcode3BuildSettingsEditor - Xcode3ProjectInfoEditor - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 80 - - - NS.objects - - - CF$UID - 81 - - - - DVTSplitViewItems - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 82 - - - CF$UID - 88 - - - - - $class - - CF$UID - 87 - - NS.keys - - - CF$UID - 83 - - - CF$UID - 84 - - - NS.objects - - - CF$UID - 85 - - - CF$UID - 86 - - - - DVTIdentifier - DVTViewMagnitude - - 170 - - $classes - - NSDictionary - NSObject - - $classname - NSDictionary - - - $class - - CF$UID - 87 - - NS.keys - - - CF$UID - 83 - - - CF$UID - 84 - - - NS.objects - - - CF$UID - 85 - - - CF$UID - 89 - - - - 931 - - $classes - - NSMutableArray - NSArray - NSObject - - $classname - NSMutableArray - - - $classes - - NSMutableDictionary - NSDictionary - NSObject - - $classname - NSMutableDictionary - - Xcode3BuildSettingsEditor - - $class - - CF$UID - 12 - - NS.objects - - - CF$UID - 94 - - - - - $class - - CF$UID - 462 - - documentURL - - CF$UID - 95 - - selection - - CF$UID - 97 - - timestamp - - CF$UID - 96 - - - file://localhost/Work/ryan.gerleve/idMobileDepot/Wolfenstein3DPlatinumDepot/wolf3d/code/iphone/wolf3d.xcodeproj/ - 334881995.84964103 - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - NS.objects - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - - Editor - Target - Xcode3BuildSettingsEditorLocations - Xcode3BuildSettingsEditor - wolf3d - - $class - - CF$UID - 12 - - NS.objects - - - CF$UID - 104 - - - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 105 - - - CF$UID - 106 - - - CF$UID - 107 - - - CF$UID - 108 - - - CF$UID - 109 - - - CF$UID - 110 - - - NS.objects - - - CF$UID - 111 - - - CF$UID - 458 - - - CF$UID - 460 - - - CF$UID - 460 - - - CF$UID - 460 - - - CF$UID - 461 - - - - Collapsed Build Property Categories - Selected Build Properties - Xcode3BuildSettingsEditorDisplayMode - Xcode3BuildPropertyValueDisplayMode - Xcode3BuildSettingsEditorMode - Xcode3BuildPropertyNameDisplayMode - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 112 - - - CF$UID - 113 - - - CF$UID - 114 - - - CF$UID - 115 - - - CF$UID - 116 - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - CF$UID - 120 - - - CF$UID - 121 - - - CF$UID - 122 - - - CF$UID - 123 - - - CF$UID - 124 - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - CF$UID - 131 - - - CF$UID - 132 - - - CF$UID - 133 - - - CF$UID - 134 - - - CF$UID - 135 - - - CF$UID - 136 - - - CF$UID - 137 - - - CF$UID - 138 - - - CF$UID - 139 - - - CF$UID - 140 - - - CF$UID - 141 - - - CF$UID - 142 - - - CF$UID - 143 - - - CF$UID - 144 - - - CF$UID - 145 - - - CF$UID - 146 - - - CF$UID - 147 - - - CF$UID - 148 - - - CF$UID - 149 - - - CF$UID - 150 - - - CF$UID - 151 - - - CF$UID - 152 - - - CF$UID - 153 - - - CF$UID - 154 - - - CF$UID - 155 - - - CF$UID - 156 - - - CF$UID - 157 - - - CF$UID - 158 - - - CF$UID - 159 - - - CF$UID - 160 - - - CF$UID - 161 - - - CF$UID - 162 - - - CF$UID - 163 - - - CF$UID - 164 - - - CF$UID - 165 - - - CF$UID - 166 - - - CF$UID - 167 - - - CF$UID - 168 - - - CF$UID - 169 - - - CF$UID - 170 - - - CF$UID - 171 - - - CF$UID - 172 - - - CF$UID - 173 - - - CF$UID - 174 - - - CF$UID - 175 - - - CF$UID - 176 - - - CF$UID - 177 - - - CF$UID - 178 - - - CF$UID - 179 - - - CF$UID - 180 - - - CF$UID - 181 - - - CF$UID - 182 - - - CF$UID - 183 - - - CF$UID - 184 - - - CF$UID - 185 - - - CF$UID - 186 - - - CF$UID - 187 - - - CF$UID - 188 - - - CF$UID - 189 - - - CF$UID - 190 - - - CF$UID - 191 - - - CF$UID - 192 - - - CF$UID - 193 - - - CF$UID - 194 - - - CF$UID - 195 - - - CF$UID - 196 - - - CF$UID - 197 - - - CF$UID - 198 - - - CF$UID - 199 - - - CF$UID - 200 - - - CF$UID - 201 - - - CF$UID - 202 - - - CF$UID - 203 - - - CF$UID - 204 - - - CF$UID - 205 - - - CF$UID - 206 - - - CF$UID - 207 - - - CF$UID - 208 - - - CF$UID - 209 - - - CF$UID - 210 - - - CF$UID - 211 - - - CF$UID - 212 - - - CF$UID - 213 - - - CF$UID - 214 - - - CF$UID - 215 - - - CF$UID - 216 - - - CF$UID - 217 - - - CF$UID - 218 - - - CF$UID - 219 - - - CF$UID - 220 - - - CF$UID - 221 - - - CF$UID - 222 - - - CF$UID - 223 - - - CF$UID - 224 - - - CF$UID - 225 - - - CF$UID - 226 - - - CF$UID - 227 - - - CF$UID - 228 - - - CF$UID - 229 - - - CF$UID - 230 - - - CF$UID - 231 - - - CF$UID - 232 - - - CF$UID - 233 - - - CF$UID - 234 - - - CF$UID - 235 - - - CF$UID - 236 - - - CF$UID - 237 - - - CF$UID - 238 - - - CF$UID - 239 - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - CF$UID - 244 - - - CF$UID - 245 - - - CF$UID - 246 - - - CF$UID - 247 - - - CF$UID - 248 - - - CF$UID - 249 - - - CF$UID - 250 - - - CF$UID - 251 - - - CF$UID - 252 - - - CF$UID - 253 - - - CF$UID - 254 - - - CF$UID - 255 - - - CF$UID - 256 - - - CF$UID - 257 - - - CF$UID - 258 - - - CF$UID - 259 - - - CF$UID - 260 - - - CF$UID - 261 - - - CF$UID - 262 - - - CF$UID - 263 - - - CF$UID - 264 - - - CF$UID - 265 - - - CF$UID - 266 - - - CF$UID - 267 - - - CF$UID - 268 - - - CF$UID - 269 - - - CF$UID - 270 - - - CF$UID - 271 - - - CF$UID - 272 - - - CF$UID - 273 - - - CF$UID - 274 - - - CF$UID - 275 - - - CF$UID - 276 - - - CF$UID - 277 - - - CF$UID - 278 - - - CF$UID - 279 - - - CF$UID - 280 - - - CF$UID - 281 - - - CF$UID - 282 - - - CF$UID - 283 - - - CF$UID - 284 - - - CF$UID - 285 - - - CF$UID - 286 - - - CF$UID - 287 - - - CF$UID - 288 - - - CF$UID - 289 - - - CF$UID - 290 - - - CF$UID - 291 - - - CF$UID - 292 - - - CF$UID - 293 - - - CF$UID - 294 - - - CF$UID - 295 - - - CF$UID - 296 - - - CF$UID - 297 - - - CF$UID - 298 - - - CF$UID - 299 - - - CF$UID - 300 - - - CF$UID - 301 - - - CF$UID - 302 - - - CF$UID - 303 - - - CF$UID - 304 - - - CF$UID - 305 - - - CF$UID - 306 - - - CF$UID - 307 - - - CF$UID - 308 - - - CF$UID - 309 - - - CF$UID - 310 - - - CF$UID - 311 - - - CF$UID - 312 - - - CF$UID - 313 - - - CF$UID - 314 - - - CF$UID - 315 - - - CF$UID - 316 - - - CF$UID - 317 - - - CF$UID - 318 - - - CF$UID - 319 - - - CF$UID - 320 - - - CF$UID - 321 - - - CF$UID - 322 - - - CF$UID - 323 - - - CF$UID - 324 - - - CF$UID - 325 - - - CF$UID - 326 - - - CF$UID - 327 - - - CF$UID - 328 - - - CF$UID - 329 - - - CF$UID - 330 - - - CF$UID - 331 - - - CF$UID - 332 - - - CF$UID - 333 - - - CF$UID - 334 - - - CF$UID - 335 - - - CF$UID - 336 - - - CF$UID - 337 - - - CF$UID - 338 - - - CF$UID - 339 - - - CF$UID - 340 - - - CF$UID - 341 - - - CF$UID - 342 - - - CF$UID - 343 - - - CF$UID - 344 - - - CF$UID - 345 - - - CF$UID - 346 - - - CF$UID - 347 - - - CF$UID - 348 - - - CF$UID - 349 - - - CF$UID - 350 - - - CF$UID - 351 - - - CF$UID - 352 - - - CF$UID - 353 - - - CF$UID - 354 - - - CF$UID - 355 - - - CF$UID - 356 - - - CF$UID - 357 - - - CF$UID - 358 - - - CF$UID - 359 - - - CF$UID - 360 - - - CF$UID - 361 - - - CF$UID - 362 - - - CF$UID - 363 - - - CF$UID - 364 - - - CF$UID - 365 - - - CF$UID - 366 - - - CF$UID - 367 - - - CF$UID - 368 - - - CF$UID - 369 - - - CF$UID - 370 - - - CF$UID - 371 - - - CF$UID - 372 - - - CF$UID - 373 - - - CF$UID - 374 - - - CF$UID - 375 - - - CF$UID - 376 - - - CF$UID - 377 - - - CF$UID - 378 - - - CF$UID - 379 - - - CF$UID - 380 - - - CF$UID - 381 - - - CF$UID - 382 - - - CF$UID - 383 - - - CF$UID - 384 - - - CF$UID - 385 - - - CF$UID - 386 - - - CF$UID - 387 - - - CF$UID - 388 - - - CF$UID - 389 - - - CF$UID - 390 - - - CF$UID - 391 - - - CF$UID - 392 - - - CF$UID - 393 - - - CF$UID - 394 - - - CF$UID - 395 - - - CF$UID - 396 - - - CF$UID - 397 - - - CF$UID - 398 - - - CF$UID - 399 - - - CF$UID - 400 - - - CF$UID - 401 - - - CF$UID - 402 - - - CF$UID - 403 - - - CF$UID - 404 - - - CF$UID - 405 - - - CF$UID - 406 - - - CF$UID - 407 - - - CF$UID - 408 - - - CF$UID - 409 - - - CF$UID - 410 - - - CF$UID - 411 - - - CF$UID - 412 - - - CF$UID - 413 - - - CF$UID - 414 - - - CF$UID - 415 - - - CF$UID - 416 - - - CF$UID - 417 - - - CF$UID - 418 - - - CF$UID - 419 - - - CF$UID - 420 - - - CF$UID - 421 - - - CF$UID - 422 - - - CF$UID - 423 - - - CF$UID - 424 - - - CF$UID - 425 - - - CF$UID - 426 - - - CF$UID - 427 - - - CF$UID - 428 - - - CF$UID - 429 - - - CF$UID - 430 - - - CF$UID - 431 - - - CF$UID - 432 - - - CF$UID - 433 - - - CF$UID - 434 - - - CF$UID - 435 - - - CF$UID - 436 - - - CF$UID - 437 - - - CF$UID - 438 - - - CF$UID - 439 - - - CF$UID - 440 - - - CF$UID - 441 - - - CF$UID - 442 - - - CF$UID - 443 - - - CF$UID - 444 - - - CF$UID - 445 - - - CF$UID - 446 - - - CF$UID - 447 - - - CF$UID - 448 - - - CF$UID - 449 - - - CF$UID - 450 - - - CF$UID - 451 - - - CF$UID - 452 - - - CF$UID - 453 - - - CF$UID - 454 - - - CF$UID - 455 - - - CF$UID - 456 - - - CF$UID - 457 - - - - - $class - - CF$UID - 42 - - NS.string - Architectures||ADDITIONAL_SDKS - - - $class - - CF$UID - 42 - - NS.string - Architectures||ARCHS - - - $class - - CF$UID - 42 - - NS.string - Architectures||SDKROOT - - - $class - - CF$UID - 42 - - NS.string - Architectures||ONLY_ACTIVE_ARCH - - - $class - - CF$UID - 42 - - NS.string - Architectures||SUPPORTED_PLATFORMS - - - $class - - CF$UID - 42 - - NS.string - Architectures||VALID_ARCHS - - - $class - - CF$UID - 42 - - NS.string - Build Locations||SYMROOT - - - $class - - CF$UID - 42 - - NS.string - Build Locations||OBJROOT - - - $class - - CF$UID - 42 - - NS.string - Build Locations||SHARED_PRECOMPS_DIR - - - $class - - CF$UID - 42 - - NS.string - Build Options||BUILD_VARIANTS - - - $class - - CF$UID - 42 - - NS.string - Build Options||DEBUG_INFORMATION_FORMAT - - - $class - - CF$UID - 42 - - NS.string - Build Options||ENABLE_OPENMP_SUPPORT - - - $class - - CF$UID - 42 - - NS.string - Build Options||GENERATE_PROFILING_CODE - - - $class - - CF$UID - 42 - - NS.string - Build Options||PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR - - - $class - - CF$UID - 42 - - NS.string - Build Options||RUN_CLANG_STATIC_ANALYZER - - - $class - - CF$UID - 42 - - NS.string - Build Options||SCAN_ALL_SOURCE_FILES_FOR_INCLUDES - - - $class - - CF$UID - 42 - - NS.string - Build Options||VALIDATE_PRODUCT - - - $class - - CF$UID - 42 - - NS.string - Code Signing||CODE_SIGN_RESOURCE_RULES_PATH - - - $class - - CF$UID - 42 - - NS.string - Code Signing||OTHER_CODE_SIGN_FLAGS - - - $class - - CF$UID - 42 - - NS.string - Deployment||STRIPFLAGS - - - $class - - CF$UID - 42 - - NS.string - Deployment||ALTERNATE_GROUP - - - $class - - CF$UID - 42 - - NS.string - Deployment||ALTERNATE_OWNER - - - $class - - CF$UID - 42 - - NS.string - Deployment||ALTERNATE_MODE - - - $class - - CF$UID - 42 - - NS.string - Deployment||ALTERNATE_PERMISSIONS_FILES - - - $class - - CF$UID - 42 - - NS.string - Deployment||COMBINE_HIDPI_IMAGES - - - $class - - CF$UID - 42 - - NS.string - Deployment||DEPLOYMENT_LOCATION - - - $class - - CF$UID - 42 - - NS.string - Deployment||DEPLOYMENT_POSTPROCESSING - - - $class - - CF$UID - 42 - - NS.string - Deployment||INSTALL_GROUP - - - $class - - CF$UID - 42 - - NS.string - Deployment||INSTALL_OWNER - - - $class - - CF$UID - 42 - - NS.string - Deployment||INSTALL_MODE_FLAG - - - $class - - CF$UID - 42 - - NS.string - Deployment||DSTROOT - - - $class - - CF$UID - 42 - - NS.string - Deployment||INSTALL_PATH - - - $class - - CF$UID - 42 - - NS.string - Deployment||MACOSX_DEPLOYMENT_TARGET - - - $class - - CF$UID - 42 - - NS.string - Deployment||SKIP_INSTALL - - - $class - - CF$UID - 42 - - NS.string - Deployment||STRIP_INSTALLED_PRODUCT - - - $class - - CF$UID - 42 - - NS.string - Deployment||STRIP_STYLE - - - $class - - CF$UID - 42 - - NS.string - Deployment||TARGETED_DEVICE_FAMILY - - - $class - - CF$UID - 42 - - NS.string - Deployment||SEPARATE_STRIP - - - $class - - CF$UID - 42 - - NS.string - Deployment||IPHONEOS_DEPLOYMENT_TARGET - - - $class - - CF$UID - 42 - - NS.string - Kernel Module||MODULE_NAME - - - $class - - CF$UID - 42 - - NS.string - Kernel Module||MODULE_START - - - $class - - CF$UID - 42 - - NS.string - Kernel Module||MODULE_STOP - - - $class - - CF$UID - 42 - - NS.string - Kernel Module||MODULE_VERSION - - - $class - - CF$UID - 42 - - NS.string - Linking||BUNDLE_LOADER - - - $class - - CF$UID - 42 - - NS.string - Linking||STANDARD_C_PLUS_PLUS_LIBRARY_TYPE - - - $class - - CF$UID - 42 - - NS.string - Linking||DYLIB_COMPATIBILITY_VERSION - - - $class - - CF$UID - 42 - - NS.string - Linking||DYLIB_CURRENT_VERSION - - - $class - - CF$UID - 42 - - NS.string - Linking||DEAD_CODE_STRIPPING - - - $class - - CF$UID - 42 - - NS.string - Linking||LINKER_DISPLAYS_MANGLED_NAMES - - - $class - - CF$UID - 42 - - NS.string - Linking||LD_NO_PIE - - - $class - - CF$UID - 42 - - NS.string - Linking||PRESERVE_DEAD_CODE_INITS_AND_TERMS - - - $class - - CF$UID - 42 - - NS.string - Linking||LD_DYLIB_INSTALL_NAME - - - $class - - CF$UID - 42 - - NS.string - Linking||EXPORTED_SYMBOLS_FILE - - - $class - - CF$UID - 42 - - NS.string - Linking||INIT_ROUTINE - - - $class - - CF$UID - 42 - - NS.string - Linking||LINK_WITH_STANDARD_LIBRARIES - - - $class - - CF$UID - 42 - - NS.string - Linking||MACH_O_TYPE - - - $class - - CF$UID - 42 - - NS.string - Linking||LD_OPENMP_FLAGS - - - $class - - CF$UID - 42 - - NS.string - Linking||ORDER_FILE - - - $class - - CF$UID - 42 - - NS.string - Linking||OTHER_LDFLAGS - - - $class - - CF$UID - 42 - - NS.string - Linking||GENERATE_MASTER_OBJECT_FILE - - - $class - - CF$UID - 42 - - NS.string - Linking||PRELINK_LIBS - - - $class - - CF$UID - 42 - - NS.string - Linking||KEEP_PRIVATE_EXTERNS - - - $class - - CF$UID - 42 - - NS.string - Linking||LD_RUNPATH_SEARCH_PATHS - - - $class - - CF$UID - 42 - - NS.string - Linking||SEPARATE_SYMBOL_EDIT - - - $class - - CF$UID - 42 - - NS.string - Linking||PRELINK_FLAGS - - - $class - - CF$UID - 42 - - NS.string - Linking||SECTORDER_FLAGS - - - $class - - CF$UID - 42 - - NS.string - Linking||UNEXPORTED_SYMBOLS_FILE - - - $class - - CF$UID - 42 - - NS.string - Linking||WARNING_LDFLAGS - - - $class - - CF$UID - 42 - - NS.string - Linking||LD_GENERATE_MAP_FILE - - - $class - - CF$UID - 42 - - NS.string - Packaging||COMPRESS_PNG_FILES - - - $class - - CF$UID - 42 - - NS.string - Packaging||APPLY_RULES_IN_COPY_FILES - - - $class - - CF$UID - 42 - - NS.string - Packaging||EXECUTABLE_EXTENSION - - - $class - - CF$UID - 42 - - NS.string - Packaging||EXECUTABLE_PREFIX - - - $class - - CF$UID - 42 - - NS.string - Packaging||INFOPLIST_EXPAND_BUILD_SETTINGS - - - $class - - CF$UID - 42 - - NS.string - Packaging||GENERATE_PKGINFO_FILE - - - $class - - CF$UID - 42 - - NS.string - Packaging||FRAMEWORK_VERSION - - - $class - - CF$UID - 42 - - NS.string - Packaging||INFOPLIST_FILE - - - $class - - CF$UID - 42 - - NS.string - Packaging||INFOPLIST_OTHER_PREPROCESSOR_FLAGS - - - $class - - CF$UID - 42 - - NS.string - Packaging||INFOPLIST_OUTPUT_FORMAT - - - $class - - CF$UID - 42 - - NS.string - Packaging||INFOPLIST_PREPROCESSOR_DEFINITIONS - - - $class - - CF$UID - 42 - - NS.string - Packaging||INFOPLIST_PREFIX_HEADER - - - $class - - CF$UID - 42 - - NS.string - Packaging||INFOPLIST_PREPROCESS - - - $class - - CF$UID - 42 - - NS.string - Packaging||COPYING_PRESERVES_HFS_DATA - - - $class - - CF$UID - 42 - - NS.string - Packaging||PLIST_FILE_OUTPUT_FORMAT - - - $class - - CF$UID - 42 - - NS.string - Packaging||STRINGS_FILE_OUTPUT_ENCODING - - - $class - - CF$UID - 42 - - NS.string - Packaging||WRAPPER_EXTENSION - - - $class - - CF$UID - 42 - - NS.string - Search Paths||ALWAYS_SEARCH_USER_PATHS - - - $class - - CF$UID - 42 - - NS.string - Search Paths||FRAMEWORK_SEARCH_PATHS - - - $class - - CF$UID - 42 - - NS.string - Search Paths||HEADER_SEARCH_PATHS - - - $class - - CF$UID - 42 - - NS.string - Search Paths||LIBRARY_SEARCH_PATHS - - - $class - - CF$UID - 42 - - NS.string - Search Paths||REZ_SEARCH_PATHS - - - $class - - CF$UID - 42 - - NS.string - Search Paths||EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES - - - $class - - CF$UID - 42 - - NS.string - Search Paths||INCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES - - - $class - - CF$UID - 42 - - NS.string - Search Paths||USER_HEADER_SEARCH_PATHS - - - $class - - CF$UID - 42 - - NS.string - Unit Testing||OTHER_TEST_FLAGS - - - $class - - CF$UID - 42 - - NS.string - Unit Testing||TEST_AFTER_BUILD - - - $class - - CF$UID - 42 - - NS.string - Unit Testing||TEST_HOST - - - $class - - CF$UID - 42 - - NS.string - Unit Testing||TEST_RIG - - - $class - - CF$UID - 42 - - NS.string - Versioning||CURRENT_PROJECT_VERSION - - - $class - - CF$UID - 42 - - NS.string - Versioning||VERSION_INFO_EXPORT_DECL - - - $class - - CF$UID - 42 - - NS.string - Versioning||VERSION_INFO_PREFIX - - - $class - - CF$UID - 42 - - NS.string - Versioning||VERSION_INFO_SUFFIX - - - $class - - CF$UID - 42 - - NS.string - Versioning||VERSIONING_SYSTEM - - - $class - - CF$UID - 42 - - NS.string - Versioning||VERSION_INFO_BUILDER - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_FAST_OBJC_DISPATCH - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_OBJC_CALL_CXX_CDTORS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_ENABLE_SSE3_EXTENSIONS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_ENABLE_SSE41_EXTENSIONS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_ENABLE_SSE42_EXTENSIONS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_STRICT_ALIASING - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_FEEDBACK_DIRECTED_OPTIMIZATION - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_GENERATE_DEBUGGING_SYMBOLS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_GENERATE_TEST_COVERAGE_FILES - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_INLINES_ARE_PRIVATE_EXTERN - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_INSTRUMENT_PROGRAM_FLOW_ARCS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_ENABLE_KERNEL_DEVELOPMENT - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_DEBUGGING_SYMBOLS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_REUSE_STRINGS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_NO_COMMON_BLOCKS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_ENABLE_OBJC_GC - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_FAST_MATH - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_ENABLE_SYMBOL_SEPARATION - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_THREADSAFE_STATICS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_SYMBOLS_PRIVATE_EXTERN - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_CHAR_IS_UNSIGNED_CHAR - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_ENABLE_ASM_KEYWORD - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_C_LANGUAGE_STANDARD - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_CHECK_RETURN_VALUE_OF_OPERATOR_NEW - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_CW_ASM_SYNTAX - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_INPUT_FILETYPE - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_ENABLE_CPP_EXCEPTIONS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_ENABLE_CPP_RTTI - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_LINK_WITH_DYNAMIC_LIBRARIES - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_ENABLE_TRIGRAPHS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_ENABLE_FLOATING_POINT_LIBRARY_CALLS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_USE_INDIRECT_FUNCTION_CALLS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_USE_REGISTER_FUNCTION_CALLS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_INCREASE_PRECOMPILED_HEADER_SHARING - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||OTHER_CFLAGS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||OTHER_CPLUSPLUSFLAGS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_PRECOMPILE_PREFIX_HEADER - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_PREFIX_HEADER - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_ENABLE_BUILTIN_FUNCTIONS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_ENABLE_PASCAL_STRINGS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_FORCE_CPU_SUBTYPE_ALL - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_SHORT_ENUMS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_USE_STANDARD_INCLUDE_SEARCHING - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Preprocessing||GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_CHECK_SWITCH_STATEMENTS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_FOUR_CHARACTER_CONSTANTS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_SHADOW - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_64_TO_32_BIT_CONVERSION - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_INHIBIT_ALL_WARNINGS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_ABOUT_RETURN_TYPE - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_MISSING_PARENTHESES - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_ABOUT_MISSING_PROTOTYPES - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_ABOUT_MISSING_NEWLINE - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_NON_VIRTUAL_DESTRUCTOR - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||WARNING_CFLAGS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_PEDANTIC - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_ABOUT_POINTER_SIGNEDNESS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_PROTOTYPE_CONVERSION - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_SIGN_COMPARE - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_STRICT_SELECTOR_MATCH - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_TREAT_NONCONFORMANT_CODE_ERRORS_AS_WARNINGS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_TYPECHECK_CALLS_TO_PRINTF - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_UNDECLARED_SELECTOR - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_UNINITIALIZED_AUTOS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_UNKNOWN_PRAGMAS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_UNUSED_FUNCTION - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_UNUSED_LABEL - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_UNUSED_PARAMETER - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_UNUSED_VALUE - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_UNUSED_VARIABLE - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO - - - $class - - CF$UID - 42 - - NS.string - Interface Builder XIB Compiler - Options||IBC_FLATTEN_NIBS - - - $class - - CF$UID - 42 - - NS.string - Interface Builder XIB Compiler - Options||IBC_OTHER_FLAGS - - - $class - - CF$UID - 42 - - NS.string - Interface Builder XIB Compiler - Options||IBC_OVERRIDING_PLUGINS_AND_FRAMEWORKS_DIR - - - $class - - CF$UID - 42 - - NS.string - Interface Builder XIB Compiler - Options||IBC_PLUGIN_SEARCH_PATHS - - - $class - - CF$UID - 42 - - NS.string - Interface Builder XIB Compiler - Options||IBC_PLUGINS - - - $class - - CF$UID - 42 - - NS.string - Interface Builder XIB Compiler - Options||IBC_ERRORS - - - $class - - CF$UID - 42 - - NS.string - Interface Builder XIB Compiler - Options||IBC_NOTICES - - - $class - - CF$UID - 42 - - NS.string - Interface Builder XIB Compiler - Options||IBC_WARNINGS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_FAST_OBJC_DISPATCH - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_OBJC_CALL_CXX_CDTORS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_SSE3_EXTENSIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_SSE41_EXTENSIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_SSE42_EXTENSIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_STRICT_ALIASING - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_FEEDBACK_DIRECTED_OPTIMIZATION - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_GENERATE_DEBUGGING_SYMBOLS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_GENERATE_TEST_COVERAGE_FILES - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_INLINES_ARE_PRIVATE_EXTERN - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_INSTRUMENT_PROGRAM_FLOW_ARCS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_KERNEL_DEVELOPMENT - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_DEBUGGING_SYMBOLS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||LLVM_LTO - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_REUSE_STRINGS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_NO_COMMON_BLOCKS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_OBJC_GC - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_FAST_MATH - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_SYMBOL_SEPARATION - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_THREADSAFE_STATICS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_SYMBOLS_PRIVATE_EXTERN - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_CHAR_IS_UNSIGNED_CHAR - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_ASM_KEYWORD - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_C_LANGUAGE_STANDARD - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_CHECK_RETURN_VALUE_OF_OPERATOR_NEW - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_CW_ASM_SYNTAX - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_INPUT_FILETYPE - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_CPP_EXCEPTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_CPP_RTTI - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_LINK_WITH_DYNAMIC_LIBRARIES - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_TRIGRAPHS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_FLOATING_POINT_LIBRARY_CALLS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_USE_INDIRECT_FUNCTION_CALLS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_USE_REGISTER_FUNCTION_CALLS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_INCREASE_PRECOMPILED_HEADER_SHARING - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||OTHER_CFLAGS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||OTHER_CPLUSPLUSFLAGS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_PRECOMPILE_PREFIX_HEADER - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_PREFIX_HEADER - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_BUILTIN_FUNCTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_PASCAL_STRINGS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_FORCE_CPU_SUBTYPE_ALL - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_SHORT_ENUMS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_USE_STANDARD_INCLUDE_SEARCHING - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Preprocessing||GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_CHECK_SWITCH_STATEMENTS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_FOUR_CHARACTER_CONSTANTS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_SHADOW - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_64_TO_32_BIT_CONVERSION - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_INHIBIT_ALL_WARNINGS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_RETURN_TYPE - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_MISSING_PARENTHESES - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_MISSING_PROTOTYPES - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_MISSING_NEWLINE - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_NON_VIRTUAL_DESTRUCTOR - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||WARNING_CFLAGS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_PEDANTIC - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_POINTER_SIGNEDNESS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_PROTOTYPE_CONVERSION - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_SIGN_COMPARE - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_STRICT_SELECTOR_MATCH - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_TREAT_NONCONFORMANT_CODE_ERRORS_AS_WARNINGS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_TYPECHECK_CALLS_TO_PRINTF - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNDECLARED_SELECTOR - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNINITIALIZED_AUTOS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNKNOWN_PRAGMAS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNUSED_FUNCTION - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNUSED_LABEL - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNUSED_PARAMETER - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNUSED_VALUE - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNUSED_VARIABLE - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_FAST_OBJC_DISPATCH - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_ENABLE_SSE3_EXTENSIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_ENABLE_SSE41_EXTENSIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_ENABLE_SSE42_EXTENSIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_STRICT_ALIASING - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_GENERATE_DEBUGGING_SYMBOLS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_INLINES_ARE_PRIVATE_EXTERN - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_ENABLE_KERNEL_DEVELOPMENT - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||LLVM_LTO - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_REUSE_STRINGS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_NO_COMMON_BLOCKS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_ENABLE_OBJC_GC - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_FAST_MATH - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_THREADSAFE_STATICS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_SYMBOLS_PRIVATE_EXTERN - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_CHAR_IS_UNSIGNED_CHAR - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_ASM_KEYWORD - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_C_LANGUAGE_STANDARD - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_CW_ASM_SYNTAX - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_INPUT_FILETYPE - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_CPP_EXCEPTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_CPP_RTTI - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_LINK_WITH_DYNAMIC_LIBRARIES - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_TRIGRAPHS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_FLOATING_POINT_LIBRARY_CALLS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_USE_INDIRECT_FUNCTION_CALLS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_USE_REGISTER_FUNCTION_CALLS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_INCREASE_PRECOMPILED_HEADER_SHARING - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||OTHER_CFLAGS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||OTHER_CPLUSPLUSFLAGS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_PRECOMPILE_PREFIX_HEADER - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_PREFIX_HEADER - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_BUILTIN_FUNCTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_PASCAL_STRINGS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_FORCE_CPU_SUBTYPE_ALL - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_SHORT_ENUMS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_USE_STANDARD_INCLUDE_SEARCHING - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Preprocessing||GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_CHECK_SWITCH_STATEMENTS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_FOUR_CHARACTER_CONSTANTS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_SHADOW - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_64_TO_32_BIT_CONVERSION - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_INHIBIT_ALL_WARNINGS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_RETURN_TYPE - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_MISSING_PARENTHESES - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_MISSING_PROTOTYPES - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_MISSING_NEWLINE - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_NON_VIRTUAL_DESTRUCTOR - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||WARNING_CFLAGS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_PEDANTIC - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_POINTER_SIGNEDNESS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_SIGN_COMPARE - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_STRICT_SELECTOR_MATCH - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_TYPECHECK_CALLS_TO_PRINTF - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNDECLARED_SELECTOR - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNINITIALIZED_AUTOS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNKNOWN_PRAGMAS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNUSED_FUNCTION - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNUSED_LABEL - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNUSED_PARAMETER - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNUSED_VALUE - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNUSED_VARIABLE - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO - - - $class - - CF$UID - 42 - - NS.string - User-Defined||PREBINDING - - - $class - - CF$UID - 42 - - NS.string - User-Defined||PROFILE_PREFIX - - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 459 - - - - - $class - - CF$UID - 42 - - NS.string - Deployment||ALTERNATE_GROUP - - 0 - 1 - - $classes - - Xcode3ProjectDocumentLocation - DVTDocumentLocation - NSObject - - $classname - Xcode3ProjectDocumentLocation - - - $class - - CF$UID - 91 - - NS.keys - - NS.objects - - - wolf3d - Xcode.Xcode3ProjectSupport.EditorDocument.Xcode3Project - - $class - - CF$UID - 468 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 467 - - - file://localhost/Work/ryan.gerleve/idMobileDepot/Wolfenstein3DPlatinumDepot/wolf3d/code/iphone/wolf3d.xcodeproj/ - - $classes - - NSURL - NSObject - - $classname - NSURL - - - $class - - CF$UID - 12 - - NS.objects - - - CF$UID - 470 - - - - {{0, 0}, {1101, 716}} - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 472 - - - CF$UID - 473 - - - CF$UID - 474 - - - CF$UID - 475 - - - CF$UID - 476 - - - CF$UID - 477 - - - NS.objects - - - CF$UID - 461 - - - CF$UID - 478 - - - CF$UID - 480 - - - CF$UID - 461 - - - CF$UID - 483 - - - CF$UID - 491 - - - - LayoutFocusMode - console - variables - LayoutMode - IDEDebuggerAreaSplitView - IDEDebugArea_SplitView - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 479 - - - NS.objects - - - CF$UID - 460 - - - - ConsoleFilterMode - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 481 - - - NS.objects - - - CF$UID - 482 - - - - DBGVariablesViewFilterMode - 2 - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 80 - - - NS.objects - - - CF$UID - 484 - - - - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 485 - - - CF$UID - 488 - - - - - $class - - CF$UID - 87 - - NS.keys - - - CF$UID - 83 - - - CF$UID - 84 - - - NS.objects - - - CF$UID - 486 - - - CF$UID - 487 - - - - VariablesView - 373 - - $class - - CF$UID - 87 - - NS.keys - - - CF$UID - 83 - - - CF$UID - 84 - - - NS.objects - - - CF$UID - 489 - - - CF$UID - 490 - - - - ConsoleArea - 727 - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 80 - - - NS.objects - - - CF$UID - 492 - - - - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 493 - - - CF$UID - 495 - - - - - $class - - CF$UID - 87 - - NS.keys - - - CF$UID - 83 - - - CF$UID - 84 - - - NS.objects - - - CF$UID - 486 - - - CF$UID - 494 - - - - 373 - - $class - - CF$UID - 87 - - NS.keys - - - CF$UID - 83 - - - CF$UID - 84 - - - NS.objects - - - CF$UID - 489 - - - CF$UID - 496 - - - - 727 - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 80 - - - NS.objects - - - CF$UID - 499 - - - - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 500 - - - CF$UID - 503 - - - - - $class - - CF$UID - 87 - - NS.keys - - - CF$UID - 83 - - - CF$UID - 84 - - - NS.objects - - - CF$UID - 501 - - - CF$UID - 502 - - - - IDEEditor - 738 - - $class - - CF$UID - 87 - - NS.keys - - - CF$UID - 83 - - - CF$UID - 84 - - - NS.objects - - - CF$UID - 504 - - - CF$UID - 505 - - - - IDEDebuggerArea - 214 - - $class - - CF$UID - 91 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 80 - - - NS.objects - - - CF$UID - 508 - - - - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 509 - - - CF$UID - 511 - - - - - $class - - CF$UID - 87 - - NS.keys - - - CF$UID - 83 - - - CF$UID - 84 - - - NS.objects - - - CF$UID - 85 - - - CF$UID - 510 - - - - 728 - - $class - - CF$UID - 87 - - NS.keys - - - CF$UID - 83 - - - CF$UID - 84 - - - NS.objects - - - CF$UID - 85 - - - CF$UID - 512 - - - - 224 - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 514 - - - CF$UID - 515 - - - CF$UID - 516 - - - CF$UID - 517 - - - CF$UID - 518 - - - CF$UID - 519 - - - CF$UID - 520 - - - CF$UID - 521 - - - NS.objects - - - CF$UID - 522 - - - CF$UID - 534 - - - CF$UID - 538 - - - CF$UID - 520 - - - CF$UID - 551 - - - CF$UID - 571 - - - CF$UID - 580 - - - CF$UID - 598 - - - - Xcode.IDEKit.Navigator.Symbol - Xcode.DebuggerKit.ThreadsStacksNavigator - Xcode.IDEKit.Navigator.BatchFind - SelectedNavigator - Xcode.IDEKit.Navigator.Issues - Xcode.IDEKit.Navigator.Breakpoints - Xcode.IDEKit.Navigator.Structure - Xcode.IDEKit.Navigator.Logs - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 523 - - - CF$UID - 524 - - - CF$UID - 525 - - - CF$UID - 526 - - - CF$UID - 527 - - - CF$UID - 528 - - - CF$UID - 529 - - - NS.objects - - - CF$UID - 530 - - - CF$UID - 497 - - - CF$UID - 497 - - - CF$UID - 497 - - - CF$UID - 531 - - - CF$UID - 532 - - - CF$UID - 533 - - - - IDEExpandedItems - IDESymbolNavigatorShowHierarchy - IDESymbolNavigatorShowWorkspaceOnly - IDESymbolNavigatorShowClassesOnly - IDESymbolNamePatternString - IDESymbolNavigatorSelectedSymbols - IDESymbolNavigatorShowContainersOnly - - $class - - CF$UID - 90 - - NS.objects - - - - - $class - - CF$UID - 90 - - NS.objects - - - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 535 - - - CF$UID - 536 - - - CF$UID - 537 - - - NS.objects - - - CF$UID - 482 - - - CF$UID - 460 - - - CF$UID - 533 - - - - IDEStackCompressionValue - IDEThreadsOrQueuesMode - IDEHideAncestorForNonInterestingFrames - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 539 - - - CF$UID - 540 - - - CF$UID - 541 - - - CF$UID - 542 - - - CF$UID - 543 - - - CF$UID - 544 - - - CF$UID - 545 - - - NS.objects - - - CF$UID - 460 - - - CF$UID - 533 - - - CF$UID - 531 - - - CF$UID - 546 - - - CF$UID - 547 - - - CF$UID - 460 - - - CF$UID - 549 - - - - IDEBatchFindNavigatorScrollPosition - IDEBatchFindNavigatorShowsOptions - IDEBatchFindNavigatorReplaceString - IDEBatchFindNavigatorFindString - IDEBatchFindNavigatorSelectedRowIndexes - IDEBatchFindNavigatorFindMode - IDEBatchFindNavigatorCollapsedGroups - enabled - - $class - - CF$UID - 548 - - NSRangeCount - 0 - - - $classes - - NSIndexSet - NSObject - - $classname - NSIndexSet - - - $class - - CF$UID - 550 - - NSRangeCount - 0 - - - $classes - - NSMutableIndexSet - NSIndexSet - NSObject - - $classname - NSMutableIndexSet - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 552 - - - CF$UID - 553 - - - CF$UID - 554 - - - CF$UID - 555 - - - CF$UID - 556 - - - CF$UID - 557 - - - CF$UID - 558 - - - CF$UID - 559 - - - CF$UID - 560 - - - CF$UID - 561 - - - NS.objects - - - CF$UID - 533 - - - CF$UID - 562 - - - CF$UID - 563 - - - CF$UID - 567 - - - CF$UID - 568 - - - CF$UID - 533 - - - CF$UID - 533 - - - CF$UID - 569 - - - CF$UID - 533 - - - CF$UID - 570 - - - - IDEErrorFilteringEnabled - IDEVisibleRect - IDECollapsedFiles - IDEExpandedIssues - IDESelectedNavigables - IDEShowsByType - IDESchemeFilteringEnabled - IDECollapsedTypes - IDERecentFilteringEnabled - IDECollapsedGroups - {{0, 0}, {467, 886}} - - $class - - CF$UID - 566 - - NS.objects - - - CF$UID - 564 - - - CF$UID - 565 - - - - wolf3d/Work/ryan.gerleve/idMobileDepot/Wolfenstein3DPlatinumDepot/wolf3d/code/iphone/iphone_downloadUserMap.m - wolf3d/Work/ryan.gerleve/idMobileDepot/Wolfenstein3DPlatinumDepot/wolf3d/code/iphone/iphone_downloadSOD.m - - $classes - - NSMutableSet - NSSet - NSObject - - $classname - NSMutableSet - - - $class - - CF$UID - 566 - - NS.objects - - - - $class - - CF$UID - 90 - - NS.objects - - - - $class - - CF$UID - 566 - - NS.objects - - - - $class - - CF$UID - 566 - - NS.objects - - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 572 - - - CF$UID - 573 - - - CF$UID - 574 - - - CF$UID - 575 - - - NS.objects - - - CF$UID - 576 - - - CF$UID - 533 - - - CF$UID - 578 - - - CF$UID - 579 - - - - IDECollapsedtemsSet - IDEBreakpointNavigatorFilterOnEnabled - IDESelectedObjects - IDEVisibleRect - - $class - - CF$UID - 577 - - NS.objects - - - - $classes - - NSSet - NSObject - - $classname - NSSet - - - $class - - CF$UID - 12 - - NS.objects - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 581 - - - CF$UID - 582 - - - CF$UID - 583 - - - CF$UID - 584 - - - CF$UID - 585 - - - CF$UID - 586 - - - CF$UID - 587 - - - NS.objects - - - CF$UID - 588 - - - CF$UID - 533 - - - CF$UID - 576 - - - CF$UID - 533 - - - CF$UID - 533 - - - CF$UID - 589 - - - CF$UID - 592 - - - - IDEVisibleRect - IDEUnsavedDocumentFilteringEnabled - IDENavigatorExpandedItemsBeforeFilteringSet - IDERecentDocumentFilteringEnabled - IDESCMStatusFilteringEnabled - IDESelectedObjects - IDEExpandedItemsSet - {{0, 0}, {467, 908}} - - $class - - CF$UID - 12 - - NS.objects - - - CF$UID - 590 - - - - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 591 - - - - wolf3d - - $class - - CF$UID - 577 - - NS.objects - - - CF$UID - 593 - - - CF$UID - 595 - - - CF$UID - 596 - - - - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 591 - - - CF$UID - 594 - - - - Resources - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 591 - - - - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 591 - - - CF$UID - 597 - - - - Other Sources - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 599 - - - CF$UID - 600 - - - CF$UID - 601 - - - CF$UID - 602 - - - NS.objects - - - CF$UID - 603 - - - CF$UID - 604 - - - CF$UID - 533 - - - CF$UID - 579 - - - - IDELogNavigatorExpandedItemsStateKey - IDELogNavigatorSelectedObjectsStateKey - IDELogNavigatorRecentFilterStateKey - IDELogNavigatorVisibleRectStateKey - - $class - - CF$UID - 90 - - NS.objects - - - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 605 - - - - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 606 - - - - Debug wolf3dlite : Recording - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 80 - - - NS.objects - - - CF$UID - 608 - - - - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 609 - - - CF$UID - 611 - - - CF$UID - 613 - - - - - $class - - CF$UID - 87 - - NS.keys - - - CF$UID - 83 - - - CF$UID - 84 - - - NS.objects - - - CF$UID - 18 - - - CF$UID - 610 - - - - 468 - - $class - - CF$UID - 87 - - NS.keys - - - CF$UID - 83 - - - CF$UID - 84 - - - NS.objects - - - CF$UID - 14 - - - CF$UID - 612 - - - - 1101 - - $class - - CF$UID - 87 - - NS.keys - - - CF$UID - 83 - - - CF$UID - 84 - - - NS.objects - - - CF$UID - 614 - - - CF$UID - 615 - - - - IDEUtilitiesArea - 260 - wolf3d.xcodeproj - {{193, 224}, {1829, 1028}} - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 619 - - - CF$UID - 620 - - - CF$UID - 621 - - - CF$UID - 622 - - - CF$UID - 623 - - - CF$UID - 624 - - - CF$UID - 625 - - - CF$UID - 626 - - - CF$UID - 627 - - - CF$UID - 628 - - - NS.objects - - - CF$UID - 497 - - - CF$UID - 629 - - - CF$UID - 460 - - - CF$UID - 1057 - - - CF$UID - 1062 - - - CF$UID - 1065 - - - CF$UID - 1096 - - - CF$UID - 1097 - - - CF$UID - 533 - - - CF$UID - 533 - - - - BreakpointsActivated - DefaultEditorStatesForURLs - DebuggingWindowBehavior - ActiveRunDestination - ActiveScheme - LastCompletedPersistentSchemeBasedActivityReport - DocumentWindows - RecentEditorDocumentURLs - AppFocusInMiniDebugging - MiniDebuggingConsole - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 630 - - - CF$UID - 631 - - - CF$UID - 632 - - - CF$UID - 633 - - - NS.objects - - - CF$UID - 634 - - - CF$UID - 646 - - - CF$UID - 1015 - - - CF$UID - 1026 - - - - Xcode.IDEKit.EditorDocument.DebuggerLogDocument - Xcode.Xcode3ProjectSupport.EditorDocument.Xcode3Project - Xcode.IDEKit.EditorDocument.SourceCode - Xcode.IDEKit.CocoaTouchIntegration.EditorDocument.CocoaTouch - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 635 - - - CF$UID - 637 - - - CF$UID - 639 - - - NS.objects - - - CF$UID - 641 - - - CF$UID - 644 - - - CF$UID - 645 - - - - - $class - - CF$UID - 468 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 636 - - - x-xcode-log://4BF82FB6-F0D7-4DDF-B6AE-4585D10E874A - - $class - - CF$UID - 468 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 638 - - - x-xcode-log://DEBBC139-B188-4803-B26F-26EA15213A40 - - $class - - CF$UID - 468 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 640 - - - x-xcode-log://28B63DA2-5E7A-4CF4-B710-F42908E00231 - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 642 - - - NS.objects - - - CF$UID - 643 - - - - DBGConsoleLogEditorScrollRange - {0, 0} - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 642 - - - NS.objects - - - CF$UID - 643 - - - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 642 - - - NS.objects - - - CF$UID - 643 - - - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 647 - - - NS.objects - - - CF$UID - 648 - - - - - $class - - CF$UID - 468 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 41 - - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 73 - - - CF$UID - 74 - - - CF$UID - 75 - - - CF$UID - 76 - - - CF$UID - 77 - - - NS.objects - - - CF$UID - 649 - - - CF$UID - 650 - - - CF$UID - 656 - - - CF$UID - 657 - - - CF$UID - 1014 - - - - Xcode3ProjectInfoEditor - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 80 - - - NS.objects - - - CF$UID - 651 - - - - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 652 - - - CF$UID - 654 - - - - - $class - - CF$UID - 87 - - NS.keys - - - CF$UID - 83 - - - CF$UID - 84 - - - NS.objects - - - CF$UID - 85 - - - CF$UID - 653 - - - - 170 - - $class - - CF$UID - 87 - - NS.keys - - - CF$UID - 83 - - - CF$UID - 84 - - - NS.objects - - - CF$UID - 85 - - - CF$UID - 655 - - - - 931 - Xcode3BuildSettingsEditor - - $class - - CF$UID - 12 - - NS.objects - - - CF$UID - 658 - - - - - $class - - CF$UID - 462 - - documentURL - - CF$UID - 95 - - selection - - CF$UID - 660 - - timestamp - - CF$UID - 659 - - - 334881995.84233099 - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 661 - - - NS.objects - - - CF$UID - 662 - - - CF$UID - 102 - - - CF$UID - 663 - - - - Xcode3BuildSettingsEditorLocations - Xcode3BuildSettingsEditor - - $class - - CF$UID - 12 - - NS.objects - - - CF$UID - 664 - - - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 105 - - - CF$UID - 106 - - - CF$UID - 107 - - - CF$UID - 108 - - - CF$UID - 109 - - - CF$UID - 110 - - - NS.objects - - - CF$UID - 665 - - - CF$UID - 1012 - - - CF$UID - 460 - - - CF$UID - 460 - - - CF$UID - 460 - - - CF$UID - 461 - - - - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 666 - - - CF$UID - 667 - - - CF$UID - 668 - - - CF$UID - 669 - - - CF$UID - 670 - - - CF$UID - 671 - - - CF$UID - 672 - - - CF$UID - 673 - - - CF$UID - 674 - - - CF$UID - 675 - - - CF$UID - 676 - - - CF$UID - 677 - - - CF$UID - 678 - - - CF$UID - 679 - - - CF$UID - 680 - - - CF$UID - 681 - - - CF$UID - 682 - - - CF$UID - 683 - - - CF$UID - 684 - - - CF$UID - 685 - - - CF$UID - 686 - - - CF$UID - 687 - - - CF$UID - 688 - - - CF$UID - 689 - - - CF$UID - 690 - - - CF$UID - 691 - - - CF$UID - 692 - - - CF$UID - 693 - - - CF$UID - 694 - - - CF$UID - 695 - - - CF$UID - 696 - - - CF$UID - 697 - - - CF$UID - 698 - - - CF$UID - 699 - - - CF$UID - 700 - - - CF$UID - 701 - - - CF$UID - 702 - - - CF$UID - 703 - - - CF$UID - 704 - - - CF$UID - 705 - - - CF$UID - 706 - - - CF$UID - 707 - - - CF$UID - 708 - - - CF$UID - 709 - - - CF$UID - 710 - - - CF$UID - 711 - - - CF$UID - 712 - - - CF$UID - 713 - - - CF$UID - 714 - - - CF$UID - 715 - - - CF$UID - 716 - - - CF$UID - 717 - - - CF$UID - 718 - - - CF$UID - 719 - - - CF$UID - 720 - - - CF$UID - 721 - - - CF$UID - 722 - - - CF$UID - 723 - - - CF$UID - 724 - - - CF$UID - 725 - - - CF$UID - 726 - - - CF$UID - 727 - - - CF$UID - 728 - - - CF$UID - 729 - - - CF$UID - 730 - - - CF$UID - 731 - - - CF$UID - 732 - - - CF$UID - 733 - - - CF$UID - 734 - - - CF$UID - 735 - - - CF$UID - 736 - - - CF$UID - 737 - - - CF$UID - 738 - - - CF$UID - 739 - - - CF$UID - 740 - - - CF$UID - 741 - - - CF$UID - 742 - - - CF$UID - 743 - - - CF$UID - 744 - - - CF$UID - 745 - - - CF$UID - 746 - - - CF$UID - 747 - - - CF$UID - 748 - - - CF$UID - 749 - - - CF$UID - 750 - - - CF$UID - 751 - - - CF$UID - 752 - - - CF$UID - 753 - - - CF$UID - 754 - - - CF$UID - 755 - - - CF$UID - 756 - - - CF$UID - 757 - - - CF$UID - 758 - - - CF$UID - 759 - - - CF$UID - 760 - - - CF$UID - 761 - - - CF$UID - 762 - - - CF$UID - 763 - - - CF$UID - 764 - - - CF$UID - 765 - - - CF$UID - 766 - - - CF$UID - 767 - - - CF$UID - 768 - - - CF$UID - 769 - - - CF$UID - 770 - - - CF$UID - 771 - - - CF$UID - 772 - - - CF$UID - 773 - - - CF$UID - 774 - - - CF$UID - 775 - - - CF$UID - 776 - - - CF$UID - 777 - - - CF$UID - 778 - - - CF$UID - 779 - - - CF$UID - 780 - - - CF$UID - 781 - - - CF$UID - 782 - - - CF$UID - 783 - - - CF$UID - 784 - - - CF$UID - 785 - - - CF$UID - 786 - - - CF$UID - 787 - - - CF$UID - 788 - - - CF$UID - 789 - - - CF$UID - 790 - - - CF$UID - 791 - - - CF$UID - 792 - - - CF$UID - 793 - - - CF$UID - 794 - - - CF$UID - 795 - - - CF$UID - 796 - - - CF$UID - 797 - - - CF$UID - 798 - - - CF$UID - 799 - - - CF$UID - 800 - - - CF$UID - 801 - - - CF$UID - 802 - - - CF$UID - 803 - - - CF$UID - 804 - - - CF$UID - 805 - - - CF$UID - 806 - - - CF$UID - 807 - - - CF$UID - 808 - - - CF$UID - 809 - - - CF$UID - 810 - - - CF$UID - 811 - - - CF$UID - 812 - - - CF$UID - 813 - - - CF$UID - 814 - - - CF$UID - 815 - - - CF$UID - 816 - - - CF$UID - 817 - - - CF$UID - 818 - - - CF$UID - 819 - - - CF$UID - 820 - - - CF$UID - 821 - - - CF$UID - 822 - - - CF$UID - 823 - - - CF$UID - 824 - - - CF$UID - 825 - - - CF$UID - 826 - - - CF$UID - 827 - - - CF$UID - 828 - - - CF$UID - 829 - - - CF$UID - 830 - - - CF$UID - 831 - - - CF$UID - 832 - - - CF$UID - 833 - - - CF$UID - 834 - - - CF$UID - 835 - - - CF$UID - 836 - - - CF$UID - 837 - - - CF$UID - 838 - - - CF$UID - 839 - - - CF$UID - 840 - - - CF$UID - 841 - - - CF$UID - 842 - - - CF$UID - 843 - - - CF$UID - 844 - - - CF$UID - 845 - - - CF$UID - 846 - - - CF$UID - 847 - - - CF$UID - 848 - - - CF$UID - 849 - - - CF$UID - 850 - - - CF$UID - 851 - - - CF$UID - 852 - - - CF$UID - 853 - - - CF$UID - 854 - - - CF$UID - 855 - - - CF$UID - 856 - - - CF$UID - 857 - - - CF$UID - 858 - - - CF$UID - 859 - - - CF$UID - 860 - - - CF$UID - 861 - - - CF$UID - 862 - - - CF$UID - 863 - - - CF$UID - 864 - - - CF$UID - 865 - - - CF$UID - 866 - - - CF$UID - 867 - - - CF$UID - 868 - - - CF$UID - 869 - - - CF$UID - 870 - - - CF$UID - 871 - - - CF$UID - 872 - - - CF$UID - 873 - - - CF$UID - 874 - - - CF$UID - 875 - - - CF$UID - 876 - - - CF$UID - 877 - - - CF$UID - 878 - - - CF$UID - 879 - - - CF$UID - 880 - - - CF$UID - 881 - - - CF$UID - 882 - - - CF$UID - 883 - - - CF$UID - 884 - - - CF$UID - 885 - - - CF$UID - 886 - - - CF$UID - 887 - - - CF$UID - 888 - - - CF$UID - 889 - - - CF$UID - 890 - - - CF$UID - 891 - - - CF$UID - 892 - - - CF$UID - 893 - - - CF$UID - 894 - - - CF$UID - 895 - - - CF$UID - 896 - - - CF$UID - 897 - - - CF$UID - 898 - - - CF$UID - 899 - - - CF$UID - 900 - - - CF$UID - 901 - - - CF$UID - 902 - - - CF$UID - 903 - - - CF$UID - 904 - - - CF$UID - 905 - - - CF$UID - 906 - - - CF$UID - 907 - - - CF$UID - 908 - - - CF$UID - 909 - - - CF$UID - 910 - - - CF$UID - 911 - - - CF$UID - 912 - - - CF$UID - 913 - - - CF$UID - 914 - - - CF$UID - 915 - - - CF$UID - 916 - - - CF$UID - 917 - - - CF$UID - 918 - - - CF$UID - 919 - - - CF$UID - 920 - - - CF$UID - 921 - - - CF$UID - 922 - - - CF$UID - 923 - - - CF$UID - 924 - - - CF$UID - 925 - - - CF$UID - 926 - - - CF$UID - 927 - - - CF$UID - 928 - - - CF$UID - 929 - - - CF$UID - 930 - - - CF$UID - 931 - - - CF$UID - 932 - - - CF$UID - 933 - - - CF$UID - 934 - - - CF$UID - 935 - - - CF$UID - 936 - - - CF$UID - 937 - - - CF$UID - 938 - - - CF$UID - 939 - - - CF$UID - 940 - - - CF$UID - 941 - - - CF$UID - 942 - - - CF$UID - 943 - - - CF$UID - 944 - - - CF$UID - 945 - - - CF$UID - 946 - - - CF$UID - 947 - - - CF$UID - 948 - - - CF$UID - 949 - - - CF$UID - 950 - - - CF$UID - 951 - - - CF$UID - 952 - - - CF$UID - 953 - - - CF$UID - 954 - - - CF$UID - 955 - - - CF$UID - 956 - - - CF$UID - 957 - - - CF$UID - 958 - - - CF$UID - 959 - - - CF$UID - 960 - - - CF$UID - 961 - - - CF$UID - 962 - - - CF$UID - 963 - - - CF$UID - 964 - - - CF$UID - 965 - - - CF$UID - 966 - - - CF$UID - 967 - - - CF$UID - 968 - - - CF$UID - 969 - - - CF$UID - 970 - - - CF$UID - 971 - - - CF$UID - 972 - - - CF$UID - 973 - - - CF$UID - 974 - - - CF$UID - 975 - - - CF$UID - 976 - - - CF$UID - 977 - - - CF$UID - 978 - - - CF$UID - 979 - - - CF$UID - 980 - - - CF$UID - 981 - - - CF$UID - 982 - - - CF$UID - 983 - - - CF$UID - 984 - - - CF$UID - 985 - - - CF$UID - 986 - - - CF$UID - 987 - - - CF$UID - 988 - - - CF$UID - 989 - - - CF$UID - 990 - - - CF$UID - 991 - - - CF$UID - 992 - - - CF$UID - 993 - - - CF$UID - 994 - - - CF$UID - 995 - - - CF$UID - 996 - - - CF$UID - 997 - - - CF$UID - 998 - - - CF$UID - 999 - - - CF$UID - 1000 - - - CF$UID - 1001 - - - CF$UID - 1002 - - - CF$UID - 1003 - - - CF$UID - 1004 - - - CF$UID - 1005 - - - CF$UID - 1006 - - - CF$UID - 1007 - - - CF$UID - 1008 - - - CF$UID - 1009 - - - CF$UID - 1010 - - - CF$UID - 1011 - - - - - $class - - CF$UID - 42 - - NS.string - Architectures||ADDITIONAL_SDKS - - - $class - - CF$UID - 42 - - NS.string - Architectures||ARCHS - - - $class - - CF$UID - 42 - - NS.string - Architectures||SDKROOT - - - $class - - CF$UID - 42 - - NS.string - Architectures||ONLY_ACTIVE_ARCH - - - $class - - CF$UID - 42 - - NS.string - Architectures||SUPPORTED_PLATFORMS - - - $class - - CF$UID - 42 - - NS.string - Architectures||VALID_ARCHS - - - $class - - CF$UID - 42 - - NS.string - Build Locations||SYMROOT - - - $class - - CF$UID - 42 - - NS.string - Build Locations||OBJROOT - - - $class - - CF$UID - 42 - - NS.string - Build Locations||SHARED_PRECOMPS_DIR - - - $class - - CF$UID - 42 - - NS.string - Build Options||BUILD_VARIANTS - - - $class - - CF$UID - 42 - - NS.string - Build Options||DEBUG_INFORMATION_FORMAT - - - $class - - CF$UID - 42 - - NS.string - Build Options||ENABLE_OPENMP_SUPPORT - - - $class - - CF$UID - 42 - - NS.string - Build Options||GENERATE_PROFILING_CODE - - - $class - - CF$UID - 42 - - NS.string - Build Options||PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR - - - $class - - CF$UID - 42 - - NS.string - Build Options||RUN_CLANG_STATIC_ANALYZER - - - $class - - CF$UID - 42 - - NS.string - Build Options||SCAN_ALL_SOURCE_FILES_FOR_INCLUDES - - - $class - - CF$UID - 42 - - NS.string - Build Options||VALIDATE_PRODUCT - - - $class - - CF$UID - 42 - - NS.string - Code Signing||CODE_SIGN_RESOURCE_RULES_PATH - - - $class - - CF$UID - 42 - - NS.string - Code Signing||OTHER_CODE_SIGN_FLAGS - - - $class - - CF$UID - 42 - - NS.string - Deployment||STRIPFLAGS - - - $class - - CF$UID - 42 - - NS.string - Deployment||ALTERNATE_GROUP - - - $class - - CF$UID - 42 - - NS.string - Deployment||ALTERNATE_OWNER - - - $class - - CF$UID - 42 - - NS.string - Deployment||ALTERNATE_MODE - - - $class - - CF$UID - 42 - - NS.string - Deployment||ALTERNATE_PERMISSIONS_FILES - - - $class - - CF$UID - 42 - - NS.string - Deployment||COMBINE_HIDPI_IMAGES - - - $class - - CF$UID - 42 - - NS.string - Deployment||DEPLOYMENT_LOCATION - - - $class - - CF$UID - 42 - - NS.string - Deployment||DEPLOYMENT_POSTPROCESSING - - - $class - - CF$UID - 42 - - NS.string - Deployment||INSTALL_GROUP - - - $class - - CF$UID - 42 - - NS.string - Deployment||INSTALL_OWNER - - - $class - - CF$UID - 42 - - NS.string - Deployment||INSTALL_MODE_FLAG - - - $class - - CF$UID - 42 - - NS.string - Deployment||DSTROOT - - - $class - - CF$UID - 42 - - NS.string - Deployment||INSTALL_PATH - - - $class - - CF$UID - 42 - - NS.string - Deployment||MACOSX_DEPLOYMENT_TARGET - - - $class - - CF$UID - 42 - - NS.string - Deployment||SKIP_INSTALL - - - $class - - CF$UID - 42 - - NS.string - Deployment||STRIP_INSTALLED_PRODUCT - - - $class - - CF$UID - 42 - - NS.string - Deployment||STRIP_STYLE - - - $class - - CF$UID - 42 - - NS.string - Deployment||TARGETED_DEVICE_FAMILY - - - $class - - CF$UID - 42 - - NS.string - Deployment||SEPARATE_STRIP - - - $class - - CF$UID - 42 - - NS.string - Deployment||IPHONEOS_DEPLOYMENT_TARGET - - - $class - - CF$UID - 42 - - NS.string - Kernel Module||MODULE_NAME - - - $class - - CF$UID - 42 - - NS.string - Kernel Module||MODULE_START - - - $class - - CF$UID - 42 - - NS.string - Kernel Module||MODULE_STOP - - - $class - - CF$UID - 42 - - NS.string - Kernel Module||MODULE_VERSION - - - $class - - CF$UID - 42 - - NS.string - Linking||BUNDLE_LOADER - - - $class - - CF$UID - 42 - - NS.string - Linking||STANDARD_C_PLUS_PLUS_LIBRARY_TYPE - - - $class - - CF$UID - 42 - - NS.string - Linking||DYLIB_COMPATIBILITY_VERSION - - - $class - - CF$UID - 42 - - NS.string - Linking||DYLIB_CURRENT_VERSION - - - $class - - CF$UID - 42 - - NS.string - Linking||DEAD_CODE_STRIPPING - - - $class - - CF$UID - 42 - - NS.string - Linking||LINKER_DISPLAYS_MANGLED_NAMES - - - $class - - CF$UID - 42 - - NS.string - Linking||LD_NO_PIE - - - $class - - CF$UID - 42 - - NS.string - Linking||PRESERVE_DEAD_CODE_INITS_AND_TERMS - - - $class - - CF$UID - 42 - - NS.string - Linking||LD_DYLIB_INSTALL_NAME - - - $class - - CF$UID - 42 - - NS.string - Linking||EXPORTED_SYMBOLS_FILE - - - $class - - CF$UID - 42 - - NS.string - Linking||INIT_ROUTINE - - - $class - - CF$UID - 42 - - NS.string - Linking||LINK_WITH_STANDARD_LIBRARIES - - - $class - - CF$UID - 42 - - NS.string - Linking||MACH_O_TYPE - - - $class - - CF$UID - 42 - - NS.string - Linking||LD_OPENMP_FLAGS - - - $class - - CF$UID - 42 - - NS.string - Linking||ORDER_FILE - - - $class - - CF$UID - 42 - - NS.string - Linking||OTHER_LDFLAGS - - - $class - - CF$UID - 42 - - NS.string - Linking||GENERATE_MASTER_OBJECT_FILE - - - $class - - CF$UID - 42 - - NS.string - Linking||PRELINK_LIBS - - - $class - - CF$UID - 42 - - NS.string - Linking||KEEP_PRIVATE_EXTERNS - - - $class - - CF$UID - 42 - - NS.string - Linking||LD_RUNPATH_SEARCH_PATHS - - - $class - - CF$UID - 42 - - NS.string - Linking||SEPARATE_SYMBOL_EDIT - - - $class - - CF$UID - 42 - - NS.string - Linking||PRELINK_FLAGS - - - $class - - CF$UID - 42 - - NS.string - Linking||SECTORDER_FLAGS - - - $class - - CF$UID - 42 - - NS.string - Linking||UNEXPORTED_SYMBOLS_FILE - - - $class - - CF$UID - 42 - - NS.string - Linking||WARNING_LDFLAGS - - - $class - - CF$UID - 42 - - NS.string - Linking||LD_GENERATE_MAP_FILE - - - $class - - CF$UID - 42 - - NS.string - Packaging||COMPRESS_PNG_FILES - - - $class - - CF$UID - 42 - - NS.string - Packaging||APPLY_RULES_IN_COPY_FILES - - - $class - - CF$UID - 42 - - NS.string - Packaging||EXECUTABLE_EXTENSION - - - $class - - CF$UID - 42 - - NS.string - Packaging||EXECUTABLE_PREFIX - - - $class - - CF$UID - 42 - - NS.string - Packaging||INFOPLIST_EXPAND_BUILD_SETTINGS - - - $class - - CF$UID - 42 - - NS.string - Packaging||GENERATE_PKGINFO_FILE - - - $class - - CF$UID - 42 - - NS.string - Packaging||FRAMEWORK_VERSION - - - $class - - CF$UID - 42 - - NS.string - Packaging||INFOPLIST_FILE - - - $class - - CF$UID - 42 - - NS.string - Packaging||INFOPLIST_OTHER_PREPROCESSOR_FLAGS - - - $class - - CF$UID - 42 - - NS.string - Packaging||INFOPLIST_OUTPUT_FORMAT - - - $class - - CF$UID - 42 - - NS.string - Packaging||INFOPLIST_PREPROCESSOR_DEFINITIONS - - - $class - - CF$UID - 42 - - NS.string - Packaging||INFOPLIST_PREFIX_HEADER - - - $class - - CF$UID - 42 - - NS.string - Packaging||INFOPLIST_PREPROCESS - - - $class - - CF$UID - 42 - - NS.string - Packaging||COPYING_PRESERVES_HFS_DATA - - - $class - - CF$UID - 42 - - NS.string - Packaging||PLIST_FILE_OUTPUT_FORMAT - - - $class - - CF$UID - 42 - - NS.string - Packaging||STRINGS_FILE_OUTPUT_ENCODING - - - $class - - CF$UID - 42 - - NS.string - Packaging||WRAPPER_EXTENSION - - - $class - - CF$UID - 42 - - NS.string - Search Paths||ALWAYS_SEARCH_USER_PATHS - - - $class - - CF$UID - 42 - - NS.string - Search Paths||FRAMEWORK_SEARCH_PATHS - - - $class - - CF$UID - 42 - - NS.string - Search Paths||HEADER_SEARCH_PATHS - - - $class - - CF$UID - 42 - - NS.string - Search Paths||LIBRARY_SEARCH_PATHS - - - $class - - CF$UID - 42 - - NS.string - Search Paths||REZ_SEARCH_PATHS - - - $class - - CF$UID - 42 - - NS.string - Search Paths||EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES - - - $class - - CF$UID - 42 - - NS.string - Search Paths||INCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES - - - $class - - CF$UID - 42 - - NS.string - Search Paths||USER_HEADER_SEARCH_PATHS - - - $class - - CF$UID - 42 - - NS.string - Unit Testing||OTHER_TEST_FLAGS - - - $class - - CF$UID - 42 - - NS.string - Unit Testing||TEST_AFTER_BUILD - - - $class - - CF$UID - 42 - - NS.string - Unit Testing||TEST_HOST - - - $class - - CF$UID - 42 - - NS.string - Unit Testing||TEST_RIG - - - $class - - CF$UID - 42 - - NS.string - Versioning||CURRENT_PROJECT_VERSION - - - $class - - CF$UID - 42 - - NS.string - Versioning||VERSION_INFO_EXPORT_DECL - - - $class - - CF$UID - 42 - - NS.string - Versioning||VERSION_INFO_PREFIX - - - $class - - CF$UID - 42 - - NS.string - Versioning||VERSION_INFO_SUFFIX - - - $class - - CF$UID - 42 - - NS.string - Versioning||VERSIONING_SYSTEM - - - $class - - CF$UID - 42 - - NS.string - Versioning||VERSION_INFO_BUILDER - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_FAST_OBJC_DISPATCH - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_OBJC_CALL_CXX_CDTORS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_ENABLE_SSE3_EXTENSIONS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_ENABLE_SSE41_EXTENSIONS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_ENABLE_SSE42_EXTENSIONS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_STRICT_ALIASING - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_FEEDBACK_DIRECTED_OPTIMIZATION - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_GENERATE_DEBUGGING_SYMBOLS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_GENERATE_TEST_COVERAGE_FILES - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_INLINES_ARE_PRIVATE_EXTERN - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_INSTRUMENT_PROGRAM_FLOW_ARCS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_ENABLE_KERNEL_DEVELOPMENT - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_DEBUGGING_SYMBOLS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_REUSE_STRINGS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_NO_COMMON_BLOCKS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_ENABLE_OBJC_GC - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_FAST_MATH - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_ENABLE_SYMBOL_SEPARATION - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_THREADSAFE_STATICS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Code Generation||GCC_SYMBOLS_PRIVATE_EXTERN - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_CHAR_IS_UNSIGNED_CHAR - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_ENABLE_ASM_KEYWORD - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_C_LANGUAGE_STANDARD - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_CHECK_RETURN_VALUE_OF_OPERATOR_NEW - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_CW_ASM_SYNTAX - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_INPUT_FILETYPE - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_ENABLE_CPP_EXCEPTIONS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_ENABLE_CPP_RTTI - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_LINK_WITH_DYNAMIC_LIBRARIES - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_ENABLE_TRIGRAPHS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_ENABLE_FLOATING_POINT_LIBRARY_CALLS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_USE_INDIRECT_FUNCTION_CALLS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_USE_REGISTER_FUNCTION_CALLS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_INCREASE_PRECOMPILED_HEADER_SHARING - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||OTHER_CFLAGS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||OTHER_CPLUSPLUSFLAGS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_PRECOMPILE_PREFIX_HEADER - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_PREFIX_HEADER - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_ENABLE_BUILTIN_FUNCTIONS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_ENABLE_PASCAL_STRINGS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_FORCE_CPU_SUBTYPE_ALL - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_SHORT_ENUMS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Language||GCC_USE_STANDARD_INCLUDE_SEARCHING - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Preprocessing||GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_CHECK_SWITCH_STATEMENTS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_FOUR_CHARACTER_CONSTANTS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_SHADOW - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_64_TO_32_BIT_CONVERSION - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_INHIBIT_ALL_WARNINGS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_ABOUT_RETURN_TYPE - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_MISSING_PARENTHESES - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_ABOUT_MISSING_PROTOTYPES - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_ABOUT_MISSING_NEWLINE - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_NON_VIRTUAL_DESTRUCTOR - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||WARNING_CFLAGS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_PEDANTIC - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_ABOUT_POINTER_SIGNEDNESS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_PROTOTYPE_CONVERSION - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_SIGN_COMPARE - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_STRICT_SELECTOR_MATCH - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_TREAT_NONCONFORMANT_CODE_ERRORS_AS_WARNINGS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_TYPECHECK_CALLS_TO_PRINTF - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_UNDECLARED_SELECTOR - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_UNINITIALIZED_AUTOS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_UNKNOWN_PRAGMAS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_UNUSED_FUNCTION - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_UNUSED_LABEL - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_UNUSED_PARAMETER - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_UNUSED_VALUE - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_UNUSED_VARIABLE - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS - - - $class - - CF$UID - 42 - - NS.string - GCC 4.2 - Warnings||GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO - - - $class - - CF$UID - 42 - - NS.string - Interface Builder XIB Compiler - Options||IBC_FLATTEN_NIBS - - - $class - - CF$UID - 42 - - NS.string - Interface Builder XIB Compiler - Options||IBC_OTHER_FLAGS - - - $class - - CF$UID - 42 - - NS.string - Interface Builder XIB Compiler - Options||IBC_OVERRIDING_PLUGINS_AND_FRAMEWORKS_DIR - - - $class - - CF$UID - 42 - - NS.string - Interface Builder XIB Compiler - Options||IBC_PLUGIN_SEARCH_PATHS - - - $class - - CF$UID - 42 - - NS.string - Interface Builder XIB Compiler - Options||IBC_PLUGINS - - - $class - - CF$UID - 42 - - NS.string - Interface Builder XIB Compiler - Options||IBC_ERRORS - - - $class - - CF$UID - 42 - - NS.string - Interface Builder XIB Compiler - Options||IBC_NOTICES - - - $class - - CF$UID - 42 - - NS.string - Interface Builder XIB Compiler - Options||IBC_WARNINGS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_FAST_OBJC_DISPATCH - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_OBJC_CALL_CXX_CDTORS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_SSE3_EXTENSIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_SSE41_EXTENSIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_SSE42_EXTENSIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_STRICT_ALIASING - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_FEEDBACK_DIRECTED_OPTIMIZATION - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_GENERATE_DEBUGGING_SYMBOLS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_GENERATE_TEST_COVERAGE_FILES - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_INLINES_ARE_PRIVATE_EXTERN - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_INSTRUMENT_PROGRAM_FLOW_ARCS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_KERNEL_DEVELOPMENT - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_DEBUGGING_SYMBOLS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||LLVM_LTO - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_REUSE_STRINGS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_NO_COMMON_BLOCKS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_OBJC_GC - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_FAST_MATH - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_SYMBOL_SEPARATION - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_THREADSAFE_STATICS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_SYMBOLS_PRIVATE_EXTERN - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_CHAR_IS_UNSIGNED_CHAR - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_ASM_KEYWORD - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_C_LANGUAGE_STANDARD - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_CHECK_RETURN_VALUE_OF_OPERATOR_NEW - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_CW_ASM_SYNTAX - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_INPUT_FILETYPE - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_CPP_EXCEPTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_CPP_RTTI - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_LINK_WITH_DYNAMIC_LIBRARIES - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_TRIGRAPHS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_FLOATING_POINT_LIBRARY_CALLS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_USE_INDIRECT_FUNCTION_CALLS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_USE_REGISTER_FUNCTION_CALLS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_INCREASE_PRECOMPILED_HEADER_SHARING - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||OTHER_CFLAGS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||OTHER_CPLUSPLUSFLAGS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_PRECOMPILE_PREFIX_HEADER - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_PREFIX_HEADER - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_BUILTIN_FUNCTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_PASCAL_STRINGS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_FORCE_CPU_SUBTYPE_ALL - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_SHORT_ENUMS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Language||GCC_USE_STANDARD_INCLUDE_SEARCHING - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Preprocessing||GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_CHECK_SWITCH_STATEMENTS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_FOUR_CHARACTER_CONSTANTS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_SHADOW - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_64_TO_32_BIT_CONVERSION - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_INHIBIT_ALL_WARNINGS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_RETURN_TYPE - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_MISSING_PARENTHESES - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_MISSING_PROTOTYPES - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_MISSING_NEWLINE - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_NON_VIRTUAL_DESTRUCTOR - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||WARNING_CFLAGS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_PEDANTIC - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_POINTER_SIGNEDNESS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_PROTOTYPE_CONVERSION - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_SIGN_COMPARE - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_STRICT_SELECTOR_MATCH - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_TREAT_NONCONFORMANT_CODE_ERRORS_AS_WARNINGS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_TYPECHECK_CALLS_TO_PRINTF - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNDECLARED_SELECTOR - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNINITIALIZED_AUTOS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNKNOWN_PRAGMAS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNUSED_FUNCTION - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNUSED_LABEL - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNUSED_PARAMETER - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNUSED_VALUE - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNUSED_VARIABLE - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_FAST_OBJC_DISPATCH - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_ENABLE_SSE3_EXTENSIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_ENABLE_SSE41_EXTENSIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_ENABLE_SSE42_EXTENSIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_STRICT_ALIASING - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_GENERATE_DEBUGGING_SYMBOLS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_INLINES_ARE_PRIVATE_EXTERN - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_ENABLE_KERNEL_DEVELOPMENT - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||LLVM_LTO - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_REUSE_STRINGS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_NO_COMMON_BLOCKS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_ENABLE_OBJC_GC - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_FAST_MATH - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_THREADSAFE_STATICS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Code Generation||GCC_SYMBOLS_PRIVATE_EXTERN - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_CHAR_IS_UNSIGNED_CHAR - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_ASM_KEYWORD - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_C_LANGUAGE_STANDARD - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_CW_ASM_SYNTAX - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_INPUT_FILETYPE - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_CPP_EXCEPTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_CPP_RTTI - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_LINK_WITH_DYNAMIC_LIBRARIES - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_TRIGRAPHS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_FLOATING_POINT_LIBRARY_CALLS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_USE_INDIRECT_FUNCTION_CALLS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_USE_REGISTER_FUNCTION_CALLS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_INCREASE_PRECOMPILED_HEADER_SHARING - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||OTHER_CFLAGS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||OTHER_CPLUSPLUSFLAGS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_PRECOMPILE_PREFIX_HEADER - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_PREFIX_HEADER - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_BUILTIN_FUNCTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_ENABLE_PASCAL_STRINGS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_FORCE_CPU_SUBTYPE_ALL - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_SHORT_ENUMS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Language||GCC_USE_STANDARD_INCLUDE_SEARCHING - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Preprocessing||GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_CHECK_SWITCH_STATEMENTS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_FOUR_CHARACTER_CONSTANTS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_SHADOW - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_64_TO_32_BIT_CONVERSION - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_INHIBIT_ALL_WARNINGS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_RETURN_TYPE - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_MISSING_PARENTHESES - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_MISSING_PROTOTYPES - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_MISSING_NEWLINE - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_NON_VIRTUAL_DESTRUCTOR - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||WARNING_CFLAGS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_PEDANTIC - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_POINTER_SIGNEDNESS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_SIGN_COMPARE - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_STRICT_SELECTOR_MATCH - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_TYPECHECK_CALLS_TO_PRINTF - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNDECLARED_SELECTOR - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNINITIALIZED_AUTOS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNKNOWN_PRAGMAS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNUSED_FUNCTION - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNUSED_LABEL - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNUSED_PARAMETER - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNUSED_VALUE - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_UNUSED_VARIABLE - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS - - - $class - - CF$UID - 42 - - NS.string - LLVM compiler 2.0 - Warnings||GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO - - - $class - - CF$UID - 42 - - NS.string - User-Defined||PREBINDING - - - $class - - CF$UID - 42 - - NS.string - User-Defined||PROFILE_PREFIX - - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 1013 - - - - - $class - - CF$UID - 42 - - NS.string - Deployment||ALTERNATE_GROUP - - - $class - - CF$UID - 91 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 1016 - - - NS.objects - - - CF$UID - 1018 - - - - - $class - - CF$UID - 468 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 1017 - - - - $class - - CF$UID - 42 - - NS.string - file://localhost/Work/ryan.gerleve/idMobileDepot/Wolfenstein3DPlatinumDepot/wolf3d/code/env/fileio.c - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 1019 - - - CF$UID - 1020 - - - CF$UID - 1021 - - - CF$UID - 1022 - - - NS.objects - - - CF$UID - 1023 - - - CF$UID - 1024 - - - CF$UID - 533 - - - CF$UID - 1025 - - - - PrimaryDocumentTimestamp - PrimaryDocumentVisibleCharacterRange - HideAllIssues - PrimaryDocumentSelectedCharacterRange - 333054686.18863302 - {2273, 1211} - {3007, 0} - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 1027 - - - CF$UID - 1029 - - - NS.objects - - - CF$UID - 1031 - - - CF$UID - 1044 - - - - - $class - - CF$UID - 468 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 1028 - - - - $class - - CF$UID - 42 - - NS.string - file://localhost/Work/ryan.gerleve/idMobileDepot/Wolfenstein3DPlatinumDepot/wolf3d/code/iphone/MainMenuView.xib - - - $class - - CF$UID - 468 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 1030 - - - - $class - - CF$UID - 42 - - NS.string - file://localhost/Work/ryan.gerleve/idMobileDepot/Wolfenstein3DPlatinumDepot/wolf3d/code/iphone/SettingsView.xib - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 1032 - - - CF$UID - 1033 - - - CF$UID - 1034 - - - CF$UID - 1035 - - - NS.objects - - - CF$UID - 1036 - - - CF$UID - 1037 - - - CF$UID - 1035 - - - CF$UID - 1039 - - - - IBDockViewController - SelectedObjectIDs - SelectionProvider - IBCanvasViewController - - $class - - CF$UID - 91 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 1038 - - - - 7 - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 1040 - - - CF$UID - 1041 - - - NS.objects - - - CF$UID - 1042 - - - CF$UID - 1043 - - - - ObjectIDToLastKnownCanvasPositionMap - EditedTopLevelObjectIDs - - $class - - CF$UID - 91 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 461 - - - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 1045 - - - CF$UID - 1046 - - - CF$UID - 1047 - - - CF$UID - 1048 - - - NS.objects - - - CF$UID - 1049 - - - CF$UID - 1050 - - - CF$UID - 1048 - - - CF$UID - 1052 - - - - IBDockViewController - SelectedObjectIDs - SelectionProvider - IBCanvasViewController - - $class - - CF$UID - 91 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 1051 - - - - 3 - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 1053 - - - CF$UID - 1054 - - - NS.objects - - - CF$UID - 1055 - - - CF$UID - 1056 - - - - ObjectIDToLastKnownCanvasPositionMap - EditedTopLevelObjectIDs - - $class - - CF$UID - 91 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 461 - - - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 1058 - - - CF$UID - 1059 - - - NS.objects - - - CF$UID - 1060 - - - CF$UID - 1061 - - - - IDEDeviceLocation - IDEDeviceArchitecture - dvtdevice-iphone:8011cc922b0e4dddd04ece07505f9785549cd9a0 - armv7 - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 1063 - - - NS.objects - - - CF$UID - 1064 - - - - IDENameString - wolf3d - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 1066 - - - CF$UID - 1067 - - - CF$UID - 1068 - - - NS.objects - - - CF$UID - 1069 - - - CF$UID - 1095 - - - CF$UID - 102 - - - - IDEActivityReportCompletionSummaryStringSegments - IDEActivityReportOptions - IDEActivityReportTitle - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 1070 - - - CF$UID - 1077 - - - CF$UID - 1081 - - - CF$UID - 1086 - - - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 1071 - - - CF$UID - 1072 - - - CF$UID - 1073 - - - NS.objects - - - CF$UID - 1074 - - - CF$UID - 1075 - - - CF$UID - 1076 - - - - IDEActivityReportStringSegmentPriority - IDEActivityReportStringSegmentBackSeparator - IDEActivityReportStringSegmentStringValue - 2 - - Build - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 1071 - - - CF$UID - 1072 - - - CF$UID - 1073 - - - NS.objects - - - CF$UID - 1078 - - - CF$UID - 1079 - - - CF$UID - 1080 - - - - 4 - : - wolf3d - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 1071 - - - CF$UID - 1072 - - - CF$UID - 1073 - - - NS.objects - - - CF$UID - 1082 - - - CF$UID - 1083 - - - CF$UID - 1084 - - - - 1 - │ - - $class - - CF$UID - 1085 - - NS.data - - YnBsaXN0MDDUAQIDBAUGOzxYJHZlcnNpb25YJG9iamVjdHNZJGFy - Y2hpdmVyVCR0b3ASAAGGoK0HCA8QGhscJCUrMTQ3VSRudWxs0wkK - CwwNDlxOU0F0dHJpYnV0ZXNWJGNsYXNzWE5TU3RyaW5ngAOADIAC - WVN1Y2NlZWRlZNMKERITFBdXTlMua2V5c1pOUy5vYmplY3RzgAui - FRaABIAFohgZgAaACVZOU0ZvbnRXTlNDb2xvctQKHR4fICEiI1ZO - U05hbWVWTlNTaXplWE5TZkZsYWdzgAiAByNAJgAAAAAAABENEF8Q - EUx1Y2lkYUdyYW5kZS1Cb2xk0iYnKClaJGNsYXNzbmFtZVgkY2xh - c3Nlc1ZOU0ZvbnSiKCpYTlNPYmplY3TTCiwtLi8wXE5TQ29sb3JT - cGFjZVdOU1doaXRlgAoQA0IwANImJzIzV05TQ29sb3KiMirSJic1 - NlxOU0RpY3Rpb25hcnmiNSrSJic4OV8QEk5TQXR0cmlidXRlZFN0 - cmluZ6I6Kl8QEk5TQXR0cmlidXRlZFN0cmluZ18QD05TS2V5ZWRB - cmNoaXZlctE9PlRyb290gAEACAARABoAIwAtADIANwBFAEsAUgBf - AGYAbwBxAHMAdQB/AIYAjgCZAJsAngCgAKIApQCnAKkAsAC4AMEA - yADPANgA2gDcAOUA6AD8AQEBDAEVARwBHwEoAS8BPAFEAUYBSAFL - AVABWAFbAWABbQFwAXUBigGNAaIBtAG3AbwAAAAAAAACAQAAAAAA - AAA/AAAAAAAAAAAAAAAAAAABvg== - - - - $classes - - NSMutableData - NSData - NSObject - - $classname - NSMutableData - - - $class - - CF$UID - 91 - - NS.keys - - - CF$UID - 1071 - - - CF$UID - 1087 - - - CF$UID - 1088 - - - CF$UID - 1073 - - - CF$UID - 1089 - - - CF$UID - 1090 - - - NS.objects - - - CF$UID - 1091 - - - CF$UID - 461 - - - CF$UID - 1092 - - - CF$UID - 1094 - - - CF$UID - 461 - - - CF$UID - 461 - - - - IDEActivityReportStringSegmentType - IDEActivityReportStringSegmentDate - IDEActivityReportStringSegmentDateStyle - IDEActivityReportStringSegmentTimeStyle - 3 - - $class - - CF$UID - 1093 - - NS.time - 334881914.23707002 - - - $classes - - NSDate - NSObject - - $classname - NSDate - - Today at 5:45 PM - 106 - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 2 - - - - - $class - - CF$UID - 90 - - NS.objects - - - CF$UID - 1098 - - - CF$UID - 1099 - - - CF$UID - 1101 - - - CF$UID - 635 - - - CF$UID - 637 - - - CF$UID - 639 - - - CF$UID - 1103 - - - - - $class - - CF$UID - 468 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 95 - - - - $class - - CF$UID - 468 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 1100 - - - file://localhost/Work/ryan.gerleve/idMobileDepot/Wolfenstein3DPlatinumDepot/wolf3d/code/iphone/MainMenuView.xib - - $class - - CF$UID - 468 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 1102 - - - file://localhost/Work/ryan.gerleve/idMobileDepot/Wolfenstein3DPlatinumDepot/wolf3d/code/iphone/SettingsView.xib - - $class - - CF$UID - 468 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 1104 - - - file://localhost/Work/ryan.gerleve/idMobileDepot/Wolfenstein3DPlatinumDepot/wolf3d/code/env/fileio.c - - $top - - State - - CF$UID - 1 - - - $version - 100000 - - diff --git a/wolf3d/code/iphone/wolf3d.xcodeproj/xcuserdata/ryan.gerleve.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/wolf3d/code/iphone/wolf3d.xcodeproj/xcuserdata/ryan.gerleve.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist deleted file mode 100644 index dd98170..0000000 --- a/wolf3d/code/iphone/wolf3d.xcodeproj/xcuserdata/ryan.gerleve.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - diff --git a/wolf3d/code/iphone/wolf3dAppDelegate.h b/wolf3d/code/iphone/wolf3dAppDelegate.h index 1ade451..b8b9f9e 100644 --- a/wolf3d/code/iphone/wolf3dAppDelegate.h +++ b/wolf3d/code/iphone/wolf3dAppDelegate.h @@ -25,15 +25,25 @@ #import #import +#if !TARGET_OS_TV +#import +#endif + #import "iphone_store.h" @class wolf3dViewController; +#if TARGET_OS_TV +@interface wolf3dAppDelegate : NSObject { +#else @interface wolf3dAppDelegate : NSObject { +#endif + UIWindow *window; UINavigationController *navigationController; wolf3dViewController *viewController; int lastAccelUpdateMsec; + BOOL glVisible; @private UIView *waitingView; @@ -46,6 +56,9 @@ @property (nonatomic, retain) UINavigationController *navigationController; @property (nonatomic, retain) UIView *waitingView; @property (nonatomic, retain) AVAudioPlayer *player; +#if !TARGET_OS_TV +@property (nonatomic, strong) CMMotionManager * motionManager; +#endif - (void)initMenuMusicPlayer; @@ -53,12 +66,16 @@ - (void)stopMenuMusic; -- (void)restartAccelerometerIfNeeded; +//- (void)restartAccelerometerIfNeeded; - (void)showOpenGL; - (void)GLtoMainMenu; - (void)GLtoPreviousMenu; - (void)didRotate:(NSNotification *)notification; +- (BOOL)isGLVisible; +#if !TARGET_OS_TV - (void)setScreenForOrientation:(UIDeviceOrientation)orientation; +#endif +- (NSString*) GetNibNameForDevice:(NSString*) nibName; - (void)dismissWaitingView; diff --git a/wolf3d/code/iphone/wolf3dAppDelegate.m b/wolf3d/code/iphone/wolf3dAppDelegate.m index fe927c2..ad0858b 100644 --- a/wolf3d/code/iphone/wolf3dAppDelegate.m +++ b/wolf3d/code/iphone/wolf3dAppDelegate.m @@ -37,7 +37,7 @@ //extern void SaveData(); //used for downloading custom made map -extern void FinalizeUserDownload(); +extern void FinalizeUserDownload(void); yesNoBoxType_t currentYesNoBox = YESNO_NONE; @@ -52,7 +52,7 @@ extern void DownloadURLConnection(char *url); -extern void iphoneSet2D(); +extern void iphoneSet2D(void); //extern bool isAlive; @@ -70,7 +70,6 @@ - (void)setSystemVolumeHUDEnabled:(BOOL)enabled; char iphoneDocDirectory[1024]; char iphoneAppDirectory[1024]; - void SysIPhoneVibrate() { AudioServicesPlaySystemSound( kSystemSoundID_Vibrate ); } @@ -138,10 +137,21 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( encoding: NSASCIIStringEncoding ]; // start the flow of accelerometer events - UIAccelerometer *accelerometer = [UIAccelerometer sharedAccelerometer]; - accelerometer.delegate = self; - accelerometer.updateInterval = 1.0 / 30.0; - +// UIAccelerometer *accelerometer = [UIAccelerometer sharedAccelerometer]; +// accelerometer.delegate = self; +// accelerometer.updateInterval = 1.0 / 30.0; + +#if !TARGET_OS_TV + [NSTimer scheduledTimerWithTimeInterval:0.01 target:self selector:@selector(updateDeviceMotion) userInfo:nil repeats:YES]; + + self.motionManager = [[CMMotionManager alloc] init]; +// self.motionManager.accelerometerActive = YES; + self.motionManager.deviceMotionUpdateInterval = 1.0 / 30.0; + [self.motionManager startDeviceMotionUpdatesUsingReferenceFrame:CMAttitudeReferenceFrameXArbitraryCorrectedZVertical]; + + [self.motionManager startAccelerometerUpdates]; +#endif + // do all the game startup work //iphoneStartup(); @@ -161,12 +171,14 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( #endif // Sign up for rotation notifications +#if !TARGET_OS_TV [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didRotate:) name:UIDeviceOrientationDidChangeNotification object:nil]; +#endif // Support rendering at native resolution on devices with Retina displays. if ( [[UIScreen mainScreen] respondsToSelector:@selector(scale)] ) { @@ -177,11 +189,35 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( // Screen is initially landscape-left. // BEWARE! For UI*Interface*Orientation, Left/Right refers to the location of the home button. // BUT, for UI*Device*Orientation, Left/Right refers to the location of the side OPPOSITE the home button!! +#if !TARGET_OS_TV [self setScreenForOrientation:UIDeviceOrientationLandscapeRight]; - +#else + viddef.width = [UIScreen mainScreen].bounds.size.width * deviceScale; + viddef.height = [UIScreen mainScreen].bounds.size.height * deviceScale; + + float widthRatio = viddef.width / REFERENCE_WIDTH; + float heightRatio = viddef.height / REFERENCE_HEIGHT; + + if ( widthRatio < heightRatio ) { + screenScale = widthRatio; + } else { + screenScale = heightRatio; + } +#endif + + CGRect screenBound = [[UIScreen mainScreen] bounds]; + CGSize screenSize = screenBound.size; + + CGFloat screenHeight = screenSize.height; + CGFloat screenWidth = screenSize.width; + + window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, screenWidth, screenHeight)]; + window.bounds = CGRectMake(0, 0, screenWidth, screenHeight); + // Create the window programmatically instead of loading from a nib file. self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; - + self.window.backgroundColor = UIColor.blackColor; + // We will create the OpenGL view here so we can get a context and preload textures, but // don't actually add the view to the window until the player enters a level. wolf3dViewController *vc = [[wolf3dViewController alloc] initWithNibName:nil bundle:nil]; @@ -189,12 +225,13 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [self.viewController setActive:NO]; [vc release]; - MainMenuViewController *rootController = [[MainMenuViewController alloc] initWithNibName:@"MainMenuView" bundle:nil]; + MainMenuViewController *rootController = [[MainMenuViewController alloc] initWithNibName:[self GetNibNameForDevice: @"MainMenuView"] bundle:nil]; navigationController = [[UINavigationController alloc] initWithRootViewController:rootController]; [navigationController setNavigationBarHidden:YES]; [rootController release]; [window addSubview:navigationController.view]; + [window setRootViewController:self.navigationController]; [window makeKeyAndVisible]; return YES; @@ -203,36 +240,49 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( - (void)showOpenGL { // Maybe clearing the OpenGL view before displaying will fix the old frame flashing. // I don't mind if this blocks until a vsync, becasue it's just a menu. - [self.viewController clearAndPresentRenderbuffer]; - - [[navigationController view] removeFromSuperview]; - - [self.viewController setActive:YES]; - [window addSubview:[self.viewController view]]; - - [self.viewController startAnimation]; +// [self.viewController clearAndPresentRenderbuffer]; +// +// [[navigationController view] removeFromSuperview]; +// +// [self.viewController setActive:YES]; +// [window addSubview:[self.viewController view]]; +// +// [self.viewController startAnimation]; + [self.viewController clearAndPresentRenderbuffer]; + [self.viewController setActive:YES]; + [self.navigationController pushViewController:self.viewController animated:NO]; + [self.viewController startAnimation]; + glVisible = YES; } - (void)didRotate:(NSNotification *)notification { +#if !TARGET_OS_TV UIDeviceOrientation orient = [[UIDevice currentDevice] orientation]; [self setScreenForOrientation:orient]; +#endif } +#if !TARGET_OS_TV - (void)setScreenForOrientation:(UIDeviceOrientation) orientation { + // Note the the UIDeviceOrientations are REVERSED from the UIInterface orientations! - switch (orientation) { + switch (orientation) { case UIDeviceOrientationLandscapeLeft: - deviceOrientation = ORIENTATION_LANDSCAPE_RIGHT; - viddef.width = [UIScreen mainScreen].bounds.size.height * deviceScale; - viddef.height = [UIScreen mainScreen].bounds.size.width * deviceScale; + deviceOrientation = ORIENTATION_LANDSCAPE_RIGHT; +// viddef.width = [UIScreen mainScreen].bounds.size.height * deviceScale; +// viddef.height = [UIScreen mainScreen].bounds.size.width * deviceScale; + viddef.width = [UIScreen mainScreen].bounds.size.width * deviceScale; + viddef.height = [UIScreen mainScreen].bounds.size.height * deviceScale; //[UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationLandscapeRight; break; case UIDeviceOrientationLandscapeRight: deviceOrientation = ORIENTATION_LANDSCAPE_LEFT; - viddef.width = [UIScreen mainScreen].bounds.size.height * deviceScale; - viddef.height = [UIScreen mainScreen].bounds.size.width * deviceScale; +// viddef.width = [UIScreen mainScreen].bounds.size.height * deviceScale; +// viddef.height = [UIScreen mainScreen].bounds.size.width * deviceScale; + viddef.width = [UIScreen mainScreen].bounds.size.width * deviceScale; + viddef.height = [UIScreen mainScreen].bounds.size.height * deviceScale; //[UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationLandscapeLeft; break; @@ -249,9 +299,11 @@ - (void)setScreenForOrientation:(UIDeviceOrientation) orientation { screenScale = heightRatio; } } +#endif //this is so that we can respond to alertView events (messageboxes) //but this should only respond to the alertPurchaseSpear +#if !TARGET_OS_TV - (void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex == 1) { @@ -283,8 +335,8 @@ - (void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)but [topView addSubview:waitingView]; // Start the request to the app store - InAppPurchaseSetCallback( inAppPurchaseCallback ); - InAppPurchaseStartPurchase( PLATINUM_UPGRADE_STRING ); +// InAppPurchaseSetCallback( inAppPurchaseCallback ); +// InAppPurchaseStartPurchase( PLATINUM_UPGRADE_STRING ); break; } @@ -311,6 +363,7 @@ - (void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)but BeginStoreKit(); }*/ } +#endif - (void)applicationWillResignActive:(UIApplication *)application { [self.viewController stopAnimation]; @@ -346,6 +399,7 @@ - (void)dismissWaitingView { #if 1 extern char urlbuffer[1024]; +#if !TARGET_OS_TV - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { // wolf3d:foo should launch wolf3d now... next, add useful URL parameter encoding @@ -408,6 +462,7 @@ - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { return YES; } #endif +#endif - (void)dealloc { @@ -418,31 +473,68 @@ - (void)dealloc { [super dealloc]; } -- (void)restartAccelerometerIfNeeded { +//- (void)restartAccelerometerIfNeeded { +// +// // I have no idea why this seems to happen sometimes... +// if ( Sys_Milliseconds() - lastAccelUpdateMsec > 1000 ) { +// static int count; +// if ( ++count < 5 ) { +// printf( "Restarting accelerometer updates.\n" ); +// } +// UIAccelerometer *accelerometer = [UIAccelerometer sharedAccelerometer]; +// accelerometer.delegate = self; +// accelerometer.updateInterval = 1.0 / 30.0; +// } +//} + +//- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration +//{ +// float acc[4]; +// acc[0] = acceleration.x; +// acc[1] = acceleration.y; +// acc[2] = acceleration.z; +// acc[3] = acceleration.timestamp; +// iphoneTiltEvent( acc ); +// lastAccelUpdateMsec = (int)Sys_Milliseconds(); +//// Com_Printf("acc: x: %f y: %f z: %f\n", acceleration.x, acceleration.y, acceleration.z); +// +//} + +#if !TARGET_OS_TV +-(void)updateDeviceMotion +{ + CMAccelerometerData *deviceMotion = self.motionManager.accelerometerData; - // I have no idea why this seems to happen sometimes... - if ( Sys_Milliseconds() - lastAccelUpdateMsec > 1000 ) { - static int count; - if ( ++count < 5 ) { - printf( "Restarting accelerometer updates.\n" ); - } - UIAccelerometer *accelerometer = [UIAccelerometer sharedAccelerometer]; - accelerometer.delegate = self; - accelerometer.updateInterval = 1.0 / 30.0; - } + if(deviceMotion == nil) + { + return; + } + +// CMAcceleration acceleration = deviceMotion.acceleration; +// Com_Printf("cmm:x: %f y: %f z: %f\n", acceleration.x, acceleration.y, acceleration.z); + + float acc[4]; + acc[0] = deviceMotion.acceleration.x; + acc[1] = deviceMotion.acceleration.y; + acc[2] = deviceMotion.acceleration.z; + acc[3] = deviceMotion.timestamp; + iphoneTiltEvent( acc ); + lastAccelUpdateMsec = (int)Sys_Milliseconds(); } +#endif -- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration -{ - float acc[4]; - acc[0] = acceleration.x; - acc[1] = acceleration.y; - acc[2] = acceleration.z; - acc[3] = acceleration.timestamp; - iphoneTiltEvent( acc ); - lastAccelUpdateMsec = Sys_Milliseconds(); +- (NSString*) GetNibNameForDevice:(NSString*) nibName +{ + NSString *extension = @""; + +#if TARGET_OS_TV + extension = @"-tvos"; +#endif + + return [NSString stringWithFormat:@"%@%@", nibName, extension]; } + //------------------------------------------------------------ // connection // called by the app when data is received during download @@ -547,14 +639,20 @@ - (void)GLtoMainMenu { [viewController setActive:NO]; [[viewController view] removeFromSuperview]; [window addSubview:navigationController.view]; + glVisible = NO; } - (void)GLtoPreviousMenu { + [self.navigationController popViewControllerAnimated:NO]; [viewController setActive:NO]; [[viewController view] removeFromSuperview]; [window addSubview:navigationController.view]; + glVisible = NO; } +- (BOOL) isGLVisible { + return glVisible; +} @end void iphoneStartMainMenu() { diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..48ecb4f --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json new file mode 100644 index 0000000..d29f024 --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..48ecb4f --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..48ecb4f --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..a961eae --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,17 @@ +{ + "images" : [ + { + "idiom" : "tv", + "filename" : "wolf3d_tv_back.png", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/wolf3d_tv_back.png b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/wolf3d_tv_back.png new file mode 100644 index 0000000..18b8040 Binary files /dev/null and b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/wolf3d_tv_back.png differ diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json new file mode 100644 index 0000000..d29f024 --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..b5eb366 --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,17 @@ +{ + "images" : [ + { + "idiom" : "tv", + "filename" : "wolf3d_tv_front.png", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/wolf3d_tv_front.png b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/wolf3d_tv_front.png new file mode 100644 index 0000000..f9d9221 Binary files /dev/null and b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/wolf3d_tv_front.png differ diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..65fec77 --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,17 @@ +{ + "images" : [ + { + "idiom" : "tv", + "filename" : "wolf3d_tv_middle.png", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/wolf3d_tv_middle.png b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/wolf3d_tv_middle.png new file mode 100644 index 0000000..26ec54a Binary files /dev/null and b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/wolf3d_tv_middle.png differ diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json new file mode 100644 index 0000000..db288f3 --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json @@ -0,0 +1,32 @@ +{ + "assets" : [ + { + "size" : "1280x768", + "idiom" : "tv", + "filename" : "App Icon - App Store.imagestack", + "role" : "primary-app-icon" + }, + { + "size" : "400x240", + "idiom" : "tv", + "filename" : "App Icon.imagestack", + "role" : "primary-app-icon" + }, + { + "size" : "2320x720", + "idiom" : "tv", + "filename" : "Top Shelf Image Wide.imageset", + "role" : "top-shelf-image-wide" + }, + { + "size" : "1920x720", + "idiom" : "tv", + "filename" : "Top Shelf Image.imageset", + "role" : "top-shelf-image" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json new file mode 100644 index 0000000..16a370d --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json new file mode 100644 index 0000000..b0f446b --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json @@ -0,0 +1,17 @@ +{ + "images" : [ + { + "idiom" : "tv", + "filename" : "wolf3d_banner.png", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/wolf3d_banner.png b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/wolf3d_banner.png new file mode 100644 index 0000000..412bd4b Binary files /dev/null and b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/wolf3d_banner.png differ diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/Contents.json b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/LaunchImage.launchimage/Contents.json b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 0000000..a4bd01e --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "orientation" : "landscape", + "idiom" : "tv", + "extent" : "full-screen", + "minimum-system-version" : "11.0", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "tv", + "filename" : "Default-Portrait~tvos.png", + "extent" : "full-screen", + "minimum-system-version" : "9.0", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/LaunchImage.launchimage/Default-Portrait~tvos.png b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/LaunchImage.launchimage/Default-Portrait~tvos.png new file mode 100644 index 0000000..8bb4712 Binary files /dev/null and b/wolf3d/code/iphone/wolf3dTV/Assets.xcassets/LaunchImage.launchimage/Default-Portrait~tvos.png differ diff --git a/wolf3d/code/iphone/wolf3dTV/Info.plist b/wolf3d/code/iphone/wolf3dTV/Info.plist new file mode 100644 index 0000000..d0e1140 --- /dev/null +++ b/wolf3d/code/iphone/wolf3dTV/Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIRequiredDeviceCapabilities + + arm64 + + UIUserInterfaceStyle + Automatic + UIAppFonts + + POSITYPE-idSettler10v2.otf + + + diff --git a/wolf3d/code/iphone/wolf3dViewController.m b/wolf3d/code/iphone/wolf3dViewController.m index 1f42394..5924388 100644 --- a/wolf3d/code/iphone/wolf3dViewController.m +++ b/wolf3d/code/iphone/wolf3dViewController.m @@ -26,11 +26,14 @@ #import "wolf3dViewController.h" #import "EAGLView.h" #import "wolfiphone.h" -//#import "wolf3dAppDelegate.h" +#import "wolf3dAppDelegate.h" + +#import @interface wolf3dViewController () @property (nonatomic, retain) EAGLContext *context; @property (nonatomic, assign) CADisplayLink *displayLink; +@property (strong, nonatomic) GCController *mainController; @end @implementation wolf3dViewController @@ -40,11 +43,31 @@ @implementation wolf3dViewController - (id)initWithNibName:(NSString*)file bundle:(NSBundle*)bundle { + [super initWithNibName:file bundle:bundle]; + // Get the application's window dimensions. - EAGLView *glView = [[EAGLView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame]; + //EAGLView *glView = [[EAGLView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame]; + +// CGRect rect; +// if (self.view.frame.size.width < self.view.frame.size.height) +// rect = CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y, self.view.frame.size.width, self.view.frame.size.height); +// else +// rect = CGRectMake(self.view.frame.origin.y, self.view.frame.origin.x, self.view.frame.size.height, self.view.frame.size.width); + + CGRect screenBound = [[UIScreen mainScreen] bounds]; + CGSize screenSize = screenBound.size; + + CGFloat screenHeight = screenSize.height; + CGFloat screenWidth = screenSize.width; + + EAGLView *glView = [[EAGLView alloc] initWithFrame:CGRectMake(0, 0, screenWidth, screenHeight)]; + glView.bounds = CGRectMake(0, 0, screenWidth, screenHeight); + + NSLog(@"initWithNibName glView.bounds: %f %f", glView.bounds.size.width, glView.bounds.size.height); + self.view = glView; [glView release]; - + EAGLContext *aContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1]; if (!aContext) @@ -61,18 +84,58 @@ - (id)initWithNibName:(NSString*)file bundle:(NSBundle*)bundle animating = FALSE; animationFrameInterval = DEFAULT_FRAME_INTERVAL; self.displayLink = nil; - + + // notifications for controller (dis)connect + [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(controllerWasConnected:) name:GCControllerDidConnectNotification object:nil]; + [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(controllerWasDisconnected:) name:GCControllerDidDisconnectNotification object:nil]; + + if (IS_IPHONE_X) { + isiPhoneX = true; + } else { + isiPhoneX = false; + } + // Now that we have a context, we can init the render system. iphoneStartup(); + +#if TARGET_OS_TV + UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapFrom:)]; + [self.view addGestureRecognizer:tapGestureRecognizer]; +#endif return self; } +-(void)handleTapFrom:(UIPanGestureRecognizer *)gesture +{ + NSLog(@"caught!"); +} - (void)awakeFromNib { - EAGLView *glView = [[EAGLView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame]; + [super awakeFromNib]; + +// EAGLView *glView = [[EAGLView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame]; + +// CGRect rect; +// if (self.view.frame.size.width < self.view.frame.size.height) +// rect = CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y, self.view.frame.size.width, self.view.frame.size.height); +// else +// rect = CGRectMake(self.view.frame.origin.y, self.view.frame.origin.x, self.view.frame.size.height, self.view.frame.size.width); +// + + CGRect screenBound = [[UIScreen mainScreen] bounds]; + CGSize screenSize = screenBound.size; + + CGFloat screenHeight = screenSize.height; + CGFloat screenWidth = screenSize.width; + + EAGLView *glView = [[EAGLView alloc] initWithFrame:CGRectMake(0, 0, screenWidth, screenHeight)]; + glView.bounds = CGRectMake(0, 0, screenWidth, screenHeight); + + NSLog(@"awakeFromNib glView.bounds: %f %f", glView.bounds.size.width, glView.bounds.size.height); + self.view = glView; [glView release]; @@ -98,12 +161,20 @@ - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; - // Release any cached data, images, etc. that aren't in use. + + [self stopAnimation]; + + // Tear down context. + if ([EAGLContext currentContext] == context) + [EAGLContext setCurrentContext:nil]; + self.context = nil; } - (void)dealloc { // Stop orientation notifications. +#if !TARGET_OS_TV [[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications]; +#endif // Tear down context. if ([EAGLContext currentContext] == context) @@ -126,18 +197,10 @@ - (void)viewWillDisappear:(BOOL)animated [self setActive:NO]; [super viewWillDisappear:animated]; -} - -- (void)viewDidUnload -{ - [super viewDidUnload]; - - [self stopAnimation]; + - // Tear down context. - if ([EAGLContext currentContext] == context) - [EAGLContext setCurrentContext:nil]; - self.context = nil; + wolf3dAppDelegate* app = (wolf3dAppDelegate*)[[UIApplication sharedApplication] delegate]; + [app GLtoMainMenu]; } - (NSInteger)animationFrameInterval @@ -171,7 +234,11 @@ - (void)startAnimation // Not worrying about supporting external displays yet, so just create a default display link. //CADisplayLink *aDisplayLink = [[UIScreen mainScreen] displayLinkWithTarget:self selector:@selector(drawFrame)]; CADisplayLink *aDisplayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(drawFrame)]; +#if TARGET_OS_TV + [aDisplayLink setPreferredFramesPerSecond:60]; +#else [aDisplayLink setFrameInterval:animationFrameInterval]; +#endif [aDisplayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; self.displayLink = aDisplayLink; @@ -228,10 +295,193 @@ - (void)drawFrame } +//#if TARGET_OS_TV +//- (void)pressesBegan:(NSSet *)presses withEvent:(UIPressesEvent *)event { +// for (UIPress* press in presses) { +// switch (press.type) { +// case UIPressTypeMenu: +// break; +// default: +// [super pressesBegan: presses withEvent: event]; +// break; +// } +// } +//} +// +//- (void)pressesEnded:(NSSet *)presses withEvent:(UIPressesEvent *)event { +// for (UIPress* press in presses) { +// wolf3dAppDelegate* app = (wolf3dAppDelegate*)[[UIApplication sharedApplication] delegate]; +// switch (press.type) { +// case UIPressTypeMenu: +// if ([app isGLVisible]) { +// [app GLtoMainMenu]; +// } else { +// [super pressesEnded: presses withEvent: event]; +// } +// break; +// default: +// [super pressesEnded: presses withEvent: event]; +// break; +// } +// } +//} +// +//#endif + // Clears the renderbuffer and immediately displays it. - (void)clearAndPresentRenderbuffer { qglClear( GL_COLOR_BUFFER_BIT ); [(EAGLView *)self.view presentFramebuffer]; } +- (void)controllerWasConnected:(NSNotification *)notification { + + // a controller was connected + GCController *controller = (GCController *)notification.object; + NSString *status = [NSString stringWithFormat:@"Controller connected\nName: %@\n", controller.vendorName]; + NSLog(@"%@", status); + + self.mainController = controller; + + iPhoneSetControllerConnected(true); + [self reactToInput]; +} + +- (void)controllerWasDisconnected:(NSNotification *)notification { + + // a controller was disconnected + GCController *controller = (GCController *)notification.object; + NSString *status = [NSString stringWithFormat:@"Controller disconnected:\n%@", controller.vendorName]; + NSLog(@"%@", status); + +// self.mainController = nil; + iPhoneSetControllerConnected(false); +} + +- (void)reactToInput { + + NSLog(@"%s", "reactToInput"); + + // register block for input change detection + GCExtendedGamepad *profile = self.mainController.extendedGamepad; + profile.valueChangedHandler = ^(GCExtendedGamepad *gamepad, GCControllerElement *element) + { + NSString *message = @""; + CGPoint position = CGPointMake(0, 0); + + // left trigger + if (gamepad.leftTrigger == element && gamepad.leftTrigger.isPressed) { + message = [message stringByAppendingString:@"Left Trigger"]; + } + + // right trigger + if (gamepad.rightTrigger == element) { + iPhoneSetRightTriggerPressed(gamepad.rightTrigger.isPressed); + } + + // left shoulder button + if (gamepad.leftShoulder == element && gamepad.leftShoulder.isPressed) { + message = [message stringByAppendingString:@"Left Shoulder Button"]; + } + + // right shoulder button + if (gamepad.rightShoulder == element && gamepad.rightShoulder.isPressed) { + message = [message stringByAppendingString:@"Right Shoulder Button"]; + } + + // A button + if (gamepad.buttonA == element) { + iPhoneSetButtonAPressed(gamepad.buttonA.isPressed); + } + + // B button + if (gamepad.buttonB == element && gamepad.buttonB.isPressed) { + message = [message stringByAppendingString:@"B Button"]; + } + + // X button + if (gamepad.buttonX == element && gamepad.buttonX.isPressed) { + message = [message stringByAppendingString:@"X Button"]; + } + + // Y button + if (gamepad.buttonY == element && gamepad.buttonY.isPressed) { + message = [message stringByAppendingString:@"Y Button"]; + } + + // d-pad + if (gamepad.dpad == element) { + if (gamepad.dpad.up.isPressed) { + message = [message stringByAppendingString:@"D-Pad Up"]; + } + if (gamepad.dpad.down.isPressed) { + message = [message stringByAppendingString:@"D-Pad Down"]; + } + if (gamepad.dpad.left.isPressed) { + message = [message stringByAppendingString:@"D-Pad Left"]; + } + if (gamepad.dpad.right.isPressed) { + message = [message stringByAppendingString:@"D-Pad Right"]; + } + } + + // left stick + if (gamepad.leftThumbstick == element) { + if (gamepad.leftThumbstick.up.isPressed || gamepad.leftThumbstick.down.isPressed) { + iPhoneSetLeftThumbstickYValue(gamepad.leftThumbstick.yAxis.value); + } else { + iPhoneSetLeftThumbstickYValue(0); + } + + if (gamepad.leftThumbstick.left.isPressed || gamepad.leftThumbstick.right.isPressed) { + iPhoneSetLeftThumbstickXValue(gamepad.leftThumbstick.xAxis.value); + } else { + iPhoneSetLeftThumbstickXValue(0); + } + + position = CGPointMake(gamepad.leftThumbstick.xAxis.value, gamepad.leftThumbstick.yAxis.value); + } + + // right stick + if (gamepad.rightThumbstick == element) { + if (gamepad.rightThumbstick.up.isPressed || gamepad.rightThumbstick.down.isPressed) { + iPhoneSetRightThumbstickYValue(gamepad.rightThumbstick.yAxis.value); + } else { + iPhoneSetRightThumbstickYValue(0); + } + + if (gamepad.rightThumbstick.left.isPressed || gamepad.rightThumbstick.right.isPressed) { + iPhoneSetRightThumbstickXValue(gamepad.rightThumbstick.xAxis.value); + } else { + iPhoneSetRightThumbstickXValue(0); + } + + position = CGPointMake(gamepad.rightThumbstick.xAxis.value, gamepad.rightThumbstick.yAxis.value); + } + + //NSLog(@"%@", message); + + }; + + // we need a weak self here for in-block access +// __weak typeof(self) weakSelf = self; +// +// self.mainController.controllerPausedHandler = ^(GCController *controller){ +// +// // check if we're currently paused or not +// // then bring up or remove the paused view controller +// if (weakSelf.currentlyPaused) { +// +// weakSelf.currentlyPaused = NO; +// [weakSelf dismissViewControllerAnimated:YES completion:nil]; +// +// } else { +// +// weakSelf.currentlyPaused = YES; +// [weakSelf presentViewController:weakSelf.pausedViewController animated:YES completion:nil]; +// } +// +// }; +} + @end diff --git a/wolf3d/code/iphone/wondering.caf b/wolf3d/code/iphone/wondering.caf new file mode 100755 index 0000000..6566ae4 Binary files /dev/null and b/wolf3d/code/iphone/wondering.caf differ diff --git a/wolf3d/code/wolf/wolf_actor_ai.c b/wolf3d/code/wolf/wolf_actor_ai.c index ef46fe2..5def2d7 100644 --- a/wolf3d/code/wolf/wolf_actor_ai.c +++ b/wolf3d/code/wolf/wolf_actor_ai.c @@ -710,14 +710,14 @@ PUBLIC void A_Dormant( entity_t *self ) int deltax, deltay; int xl, xh, yl, yh, x, y, n; - deltax = self->x - Player.position.origin[ 0 ]; + deltax = self->x - (int)Player.position.origin[ 0 ]; if( deltax < -MINACTORDIST || deltax > MINACTORDIST ) { goto moveok; } - deltay = self->y - Player.position.origin[ 1 ]; + deltay = self->y - (int)Player.position.origin[ 1 ]; if( deltay < -MINACTORDIST || deltay > MINACTORDIST ) { goto moveok; @@ -911,8 +911,8 @@ PUBLIC void T_Projectile( entity_t *self ) self->x += deltax; self->y += deltay; - deltax = ABS( self->x-Player.position.origin[ 0 ] ); - deltay = ABS( self->y-Player.position.origin[ 1 ] ); + deltax = (int)ABS( self->x-Player.position.origin[ 0 ] ); + deltay = (int)ABS( self->y-Player.position.origin[ 1 ] ); if( ! ProjectileTryMove( self, r_world ) ) { diff --git a/wolf3d/code/wolf/wolf_ai_com.c b/wolf3d/code/wolf/wolf_ai_com.c index 0f2bdc8..611bd12 100644 --- a/wolf3d/code/wolf/wolf_ai_com.c +++ b/wolf3d/code/wolf/wolf_ai_com.c @@ -213,8 +213,8 @@ PRIVATE void AI_Dodge( entity_t *self ) turnaround = opposite8[ self->dir ]; } - deltax = POS2TILE( Player.position.origin[ 0 ] ) - POS2TILE( self->x ); - deltay = POS2TILE( Player.position.origin[ 1 ] ) - POS2TILE( self->y ); + deltax = (int)POS2TILE( Player.position.origin[ 0 ] ) - POS2TILE( self->x ); + deltay = (int)POS2TILE( Player.position.origin[ 1 ] ) - POS2TILE( self->y ); // // arange 5 direction choices in order of preference @@ -307,8 +307,8 @@ PRIVATE void AI_Chase( entity_t *self ) turnaround = opposite8[ olddir ]; d[ 0 ] = d[ 1 ] = dir8_nodir; - deltax = POS2TILE( Player.position.origin[ 0 ] ) - POS2TILE( self->x ); - deltay = POS2TILE( Player.position.origin[ 1 ] ) - POS2TILE( self->y ); + deltax = (int)POS2TILE( Player.position.origin[ 0 ] ) - POS2TILE( self->x ); + deltay = (int)POS2TILE( Player.position.origin[ 1 ] ) - POS2TILE( self->y ); if( deltax > 0 ) { @@ -427,8 +427,8 @@ PRIVATE void AI_Retreat( entity_t *self ) int deltax, deltay; dir8type d[2], tdir; - deltax = POS2TILE( Player.position.origin[ 0 ] ) - POS2TILE( self->x ); - deltay = POS2TILE( Player.position.origin[ 1 ] ) - POS2TILE( self->y ); + deltax = (int)POS2TILE( Player.position.origin[ 0 ] ) - POS2TILE( self->x ); + deltay = (int)POS2TILE( Player.position.origin[ 1 ] ) - POS2TILE( self->y ); d[ 0 ] = deltax < 0 ? dir8_east : dir8_west; d[ 1 ] = deltay < 0 ? dir8_north : dir8_south; @@ -510,8 +510,8 @@ PRIVATE _boolean AI_CheckSight( entity_t *self ) } // if the player is real close, sight is automatic - deltax = Player.position.origin[ 0 ] - self->x; - deltay = Player.position.origin[ 1 ] - self->y; + deltax = (int)Player.position.origin[ 0 ] - self->x; + deltay = (int)Player.position.origin[ 1 ] - self->y; if( ABS( deltax ) < MINSIGHT && ABS( deltay ) < MINSIGHT ) { @@ -870,8 +870,8 @@ PUBLIC void T_Chase( entity_t *self ) dodge = 0; if( Level_CheckLine( self->x, self->y, Player.position.origin[0], Player.position.origin[1], r_world ) ) // got a shot at player? { - dx = ABS( POS2TILE( self->x ) - POS2TILE( Player.position.origin[ 0 ] ) ); - dy = ABS( POS2TILE( self->y ) - POS2TILE( Player.position.origin[ 1 ] ) ); + dx = ABS( (int)POS2TILE( self->x ) - (int)POS2TILE( Player.position.origin[ 0 ] ) ); + dy = ABS( (int)POS2TILE( self->y ) - (int)POS2TILE( Player.position.origin[ 1 ] ) ); dist = max_of_2(dx, dy); if( ! dist || (dist == 1 && self->distance < 16) ) { @@ -1008,8 +1008,8 @@ PUBLIC void T_BossChase( entity_t *self ) W8 dodge; dodge = 0; - dx = ABS( self->tilex - POS2TILE( Player.position.origin[ 0 ] ) ); - dy = ABS( self->tiley - POS2TILE( Player.position.origin[ 1 ] ) ); + dx = ABS( self->tilex - (int)POS2TILE( Player.position.origin[ 0 ] ) ); + dy = ABS( self->tiley - (int)POS2TILE( Player.position.origin[ 1 ] ) ); dist = max_of_2( dx, dy ); if( Level_CheckLine( self->x, self->y, Player.position.origin[0], Player.position.origin[1], r_world ) ) // got a shot at player? @@ -1107,8 +1107,8 @@ PUBLIC void T_Shoot( entity_t *self ) return; // player is behind a wall } - dx = ABS( POS2TILE( self->x ) - POS2TILE( Player.position.origin[ 0 ] ) ); - dy = ABS( POS2TILE( self->y ) - POS2TILE( Player.position.origin[ 1 ] ) ); + dx = ABS( (int)POS2TILE( self->x ) - (int)POS2TILE( Player.position.origin[ 0 ] ) ); + dy = ABS( (int)POS2TILE( self->y ) - (int)POS2TILE( Player.position.origin[ 1 ] ) ); dist = max_of_2( dx, dy ); if( self->type == en_ss || self->type == en_boss ) @@ -1209,8 +1209,8 @@ PUBLIC void T_UShoot( entity_t *self ) T_Shoot( self ); - dx = ABS( self->tilex - POS2TILE( Player.position.origin[ 0 ] ) ); - dy = ABS( self->tiley - POS2TILE( Player.position.origin[ 1 ] ) ); + dx = ABS( self->tilex - (int)POS2TILE( Player.position.origin[ 0 ] ) ); + dy = ABS( self->tiley - (int)POS2TILE( Player.position.origin[ 1 ] ) ); dist = max_of_2( dx, dy ); if( dist <= 1 ) diff --git a/wolf3d/code/wolf/wolf_bj.c b/wolf3d/code/wolf/wolf_bj.c index 0f59ae2..511fb2a 100644 --- a/wolf3d/code/wolf/wolf_bj.c +++ b/wolf3d/code/wolf/wolf_bj.c @@ -42,14 +42,14 @@ void SpawnBJVictory( void ) { entity_t *bj; - bj = SpawnActor( en_bj, POS2TILE(Player.position.origin[0]), POS2TILE(Player.position.origin[1]), dir4_north, r_world ); + bj = SpawnActor( en_bj, (int)POS2TILE(Player.position.origin[0]), (int)POS2TILE(Player.position.origin[1]), dir4_north, r_world ); if( ! bj ) { return; } - bj->x = Player.position.origin[ 0 ]; - bj->y = Player.position.origin[ 1 ]; + bj->x = (int)Player.position.origin[ 0 ]; + bj->y = (int)Player.position.origin[ 1 ]; bj->state = st_path1; bj->speed = BJRUNSPEED; bj->flags = FL_NONMARK; // FL_NEVERMARK; diff --git a/wolf3d/code/wolf/wolf_level.c b/wolf3d/code/wolf/wolf_level.c index 68bc3ee..9a07a7e 100644 --- a/wolf3d/code/wolf/wolf_level.c +++ b/wolf3d/code/wolf/wolf_level.c @@ -868,7 +868,9 @@ PRIVATE void Lvl_RLEWexpand( W16 *source, W16 *dest, #define MAPHEADER_SIZE 49 -#define MAP_SIGNATURE 0x21444921 + +#define MAP_SIGNATURE_64 0x5800000021444921 +#define MAP_SIGNATURE_32 0x21444921 /* @@ -945,14 +947,18 @@ PUBLIC LevelData_t *Level_LoadMap( const char *levelname ) // Process map header // FS_ReadFile( &signature, 1, 4, fhandle ); - if( signature != MAP_SIGNATURE ) - { - iphoneMessageBox("map signature", "signature of the map file is invalid"); - Com_Printf("File signature does not match MAP_SIGNATURE\n"); - return NULL; - } - - + + // DEBUG: DISABLED FOR NOW - this is having issues with 32/64-bit and for right now I'm not worried about the maps being invalid +// if( (signature != MAP_SIGNATURE_32) && (signature != MAP_SIGNATURE_64) ) +// { +// iphoneMessageBox("map signature", "signature of the map file is invalid"); +// Com_Printf("File signature does not match MAP_SIGNATURE\n"); +// return NULL; +// } + + Com_Printf("MAP_SIGNATURE_32: %lu\n", MAP_SIGNATURE_32); + Com_Printf("MAP_SIGNATURE_64: %lu\n", MAP_SIGNATURE_64); + Com_Printf("signature: %lu\n", signature); FS_ReadFile( &rle, 2, 1, fhandle ); @@ -964,8 +970,10 @@ PUBLIC LevelData_t *Level_LoadMap( const char *levelname ) FS_ReadFile( &length, 2, 3, fhandle ); - FS_ReadFile( &offset, 4, 3, fhandle ); - + // FS_ReadFile( &offset, 4, 3, fhandle ); + FS_ReadFile( &offset[0], 4, 1, fhandle ); + FS_ReadFile( &offset[1], 4, 1, fhandle ); + FS_ReadFile( &offset[2], 4, 1, fhandle ); FS_ReadFile( &mapNameLength, 1, 2, fhandle ); FS_ReadFile( &musicNameLength, 1, 2, fhandle ); @@ -1219,11 +1227,13 @@ PUBLIC int Level_VerifyMap( const char *levelname ) } FS_ReadFile( &signature, 1, 4, fhandle ); - if( signature != MAP_SIGNATURE ) - { - value = 0; - goto cleanup; - } + + // DEBUG: DISABLED FOR NOW - this is having issues with 32/64-bit and for right now I'm not worried about the maps being invalid +// if( (signature != MAP_SIGNATURE_32) && (signature != MAP_SIGNATURE_64) ) +// { +// value = 0; +// goto cleanup; +// } FS_ReadFile( &rle, 2, 1, fhandle ); diff --git a/wolf3d/code/wolf/wolf_opengl.c b/wolf3d/code/wolf/wolf_opengl.c index 194602a..76f59df 100644 --- a/wolf3d/code/wolf/wolf_opengl.c +++ b/wolf3d/code/wolf/wolf_opengl.c @@ -58,7 +58,7 @@ */ PUBLIC void GL_SetDefaultState( void ) { - pfglViewport( 0,0, viddef.height, viddef.width ); + pfglViewport( 0,0, viddef.width, viddef.height ); pfglClearColor( 0.0f, 0.0f, 0.0f, 1.0f ); pfglEnable( GL_TEXTURE_2D ); pfglDisable( GL_DEPTH_TEST ); @@ -351,7 +351,7 @@ PUBLIC void R_DrawSprites( void ) } // prepare values for billboarding - ang = NormalizeAngle( Player.position.angle + ANG_90 ); + ang = (int)NormalizeAngle( (int)Player.position.angle + ANG_90 ); sina = (float)(0.5 * SinTable[ ang ]); cosa = (float)(0.5 * CosTable[ ang ]); @@ -458,7 +458,7 @@ PUBLIC void R_DrawNumber( int x, int y, int number ) pfglBegin( GL_QUADS ); - for( i = length-1 ; i >= 0 ; --i ) + for( i = (int)length-1 ; i >= 0 ; --i ) { col = string[ i ] - 48; diff --git a/wolf3d/code/wolf/wolf_player.c b/wolf3d/code/wolf/wolf_player.c index 4237dda..718464a 100644 --- a/wolf3d/code/wolf/wolf_player.c +++ b/wolf3d/code/wolf/wolf_player.c @@ -184,10 +184,10 @@ PRIVATE _boolean PL_TryMove( player_t *self, LevelData_t *lvl ) int xl, yl, xh, yh, x, y; int d, n; - xl = POS2TILE( Player.position.origin[ 0 ] - PLAYERSIZE ); - yl = POS2TILE( Player.position.origin[ 1 ] - PLAYERSIZE ); - xh = POS2TILE( Player.position.origin[ 0 ] + PLAYERSIZE ); - yh = POS2TILE( Player.position.origin[ 1 ] + PLAYERSIZE ); + xl = (int)POS2TILE( Player.position.origin[ 0 ] - PLAYERSIZE ); + yl = (int)POS2TILE( Player.position.origin[ 1 ] - PLAYERSIZE ); + xh = (int)POS2TILE( Player.position.origin[ 0 ] + PLAYERSIZE ); + yh = (int)POS2TILE( Player.position.origin[ 1 ] + PLAYERSIZE ); // Cheching for solid walls: for( y = yl ; y <= yh ; ++y ) @@ -200,8 +200,8 @@ PRIVATE _boolean PL_TryMove( player_t *self, LevelData_t *lvl ) Door_Opened( &lvl->Doors, x, y) != DOOR_FULLOPEN ) { // iphone hack to allow player to move halfway into door tiles // if the player bounds doesn't cross the middle of the tile, let the move continue - if ( abs( Player.position.origin[0] - TILE2POS( x ) ) <= 0x9000 - && abs( Player.position.origin[1] - TILE2POS( y ) ) <= 0x9000 ) { + if ( abs( (int)Player.position.origin[0] - TILE2POS( x ) ) <= 0x9000 + && abs( (int)Player.position.origin[1] - TILE2POS( y ) ) <= 0x9000 ) { return 0; } } @@ -213,12 +213,12 @@ PRIVATE _boolean PL_TryMove( player_t *self, LevelData_t *lvl ) if( Guards[ n ].state >= st_die1 ) continue; - d = self->position.origin[ 0 ] - Guards[ n ].x; + d = (int)self->position.origin[ 0 ] - Guards[ n ].x; if( d < -MINACTORDIST || d > MINACTORDIST ) continue; - d = self->position.origin[ 1 ] - Guards[ n ].y; + d = (int)self->position.origin[ 1 ] - Guards[ n ].y; if( d < -MINACTORDIST || d > MINACTORDIST) continue; @@ -245,8 +245,8 @@ PRIVATE void PL_ClipMove( player_t *self, int xmove, int ymove ) { int basex, basey; - basex = self->position.origin[ 0 ]; - basey = self->position.origin[ 1 ]; + basex = (int)self->position.origin[ 0 ]; + basey = (int)self->position.origin[ 1 ]; self->position.origin[ 0 ] += xmove; self->position.origin[ 1 ] += ymove; @@ -299,7 +299,7 @@ PRIVATE void PL_ControlMovement( player_t *self, LevelData_t *lvl ) int angle, speed; // rotation - angle = self->position.angle; + angle = (int)self->position.angle; // if(cmd->forwardmove || cmd->sidemove) self->movx = self->movy = 0; // clear accumulated movement @@ -340,8 +340,8 @@ PRIVATE void PL_ControlMovement( player_t *self, LevelData_t *lvl ) // move player and clip movement to walls (check for no-clip mode here) PL_ClipMove( self, self->movx, self->movy ); - self->tilex = POS2TILE( self->position.origin[ 0 ] ); - self->tiley = POS2TILE( self->position.origin[ 1 ] ); + self->tilex = (int)POS2TILE( self->position.origin[ 0 ] ); + self->tiley = (int)POS2TILE( self->position.origin[ 1 ] ); // pick up items easier -- any tile you touch, instead of // just the midpoint tile @@ -349,9 +349,9 @@ PRIVATE void PL_ControlMovement( player_t *self, LevelData_t *lvl ) int x, y; for ( x = -1 ; x <= 1 ; x+= 2 ) { - int tilex = POS2TILE( self->position.origin[0] + x * PLAYERSIZE ); + int tilex = (int)POS2TILE( self->position.origin[0] + x * PLAYERSIZE ); for ( y = -1 ; y <= 1 ; y+= 2 ) { - int tiley = POS2TILE( self->position.origin[1] + y * PLAYERSIZE ); + int tiley = (int)POS2TILE( self->position.origin[1] + y * PLAYERSIZE ); Powerup_PickUp( tilex, tiley ); } } @@ -572,8 +572,13 @@ PUBLIC void PL_Reset(void) PUBLIC void PL_Spawn( placeonplane_t location, LevelData_t *lvl ) { Player.position = location; - Player.tilex = POS2TILE( location.origin[ 0 ] ); - Player.tiley = POS2TILE( location.origin[ 1 ] ); + Player.tilex = (int)POS2TILE( location.origin[ 0 ] ); + Player.tiley = (int)POS2TILE( location.origin[ 1 ] ); + + // DEBUG! TESTING! +// Player.tilex = 1; +// Player.tiley = 15; + Player.areanumber = lvl->areas[ Player.tilex ][ Player.tiley ]; assert( Player.areanumber >= 0 && Player.areanumber < NUMAREAS ); if( Player.areanumber < 0 ) @@ -749,8 +754,8 @@ PUBLIC void PL_Damage( player_t *self, entity_t *attacker, int points ) // note the direction of the last hit for the directional blends { - int dx = attacker->x - self->position.origin[0]; - int dy = attacker->y - self->position.origin[1]; + int dx = attacker->x - (int)self->position.origin[0]; + int dy = attacker->y - (int)self->position.origin[1]; // probably won't ever have damage from self, but check anyway if ( dx != 0 || dy != 0 ) { diff --git a/wolf3d/code/wolf/wolf_raycast.c b/wolf3d/code/wolf/wolf_raycast.c index f8f2ec4..6447478 100644 --- a/wolf3d/code/wolf/wolf_raycast.c +++ b/wolf3d/code/wolf/wolf_raycast.c @@ -58,12 +58,12 @@ PUBLIC void R_RayCast( placeonplane_t viewport, LevelData_t *lvl ) memset( tile_visible, 0, sizeof( tile_visible ) ); // clear tile visible flags // viewport tile coordinates - x = viewport.origin[ 0 ]; - y = viewport.origin[ 1 ]; - angle = viewport.angle; + x = (int)viewport.origin[ 0 ]; + y = (int)viewport.origin[ 1 ]; + angle = (int)viewport.angle; - vx = POS2TILE( viewport.origin[ 0 ] ); - vy = POS2TILE( viewport.origin[ 1 ] ); + vx = (int)POS2TILE( viewport.origin[ 0 ] ); + vy = (int)POS2TILE( viewport.origin[ 1 ] ); trace.tile_vis = tile_visible; trace.flags = TRACE_SIGHT | TRACE_MARK_MAP; diff --git a/wolf3d/code/wolf/wolf_sprites.c b/wolf3d/code/wolf/wolf_sprites.c index 7aee718..00f5d97 100644 --- a/wolf3d/code/wolf/wolf_sprites.c +++ b/wolf3d/code/wolf/wolf_sprites.c @@ -94,7 +94,7 @@ PUBLIC int Sprite_GetNewSprite( void ) if( sprt->flags & SPRT_REMOVE ) { // free spot: clear it first memset( sprt, 0, sizeof( sprite_t ) ); - return n; + return (int)n; } } @@ -260,9 +260,9 @@ PUBLIC int Sprite_CreateVisList( void ) if( tile_visible[ tx ][ ty ] || tile_visible[ tx + 1 ][ ty ] || tile_visible[ tx ][ ty + 1 ] || tile_visible[ tx + 1 ][ ty + 1 ] ) { // player spoted it - visptr->dist = LineLen2Point( sprt->x - Player.position.origin[ 0 ], - sprt->y-Player.position.origin[ 1 ], - Player.position.angle ); //FIXME viewport + visptr->dist = LineLen2Point( (int)sprt->x - (int)Player.position.origin[ 0 ], + (int)sprt->y-(int)Player.position.origin[ 1 ], + (int)Player.position.angle ); //FIXME viewport visptr->x = sprt->x; visptr->y = sprt->y; visptr->ang = sprt->ang; @@ -282,6 +282,6 @@ PUBLIC int Sprite_CreateVisList( void ) qsort( vislist, num_visible, sizeof( visobj_t ), Sprite_cmpVis ); } - return num_visible; + return (int)num_visible; } diff --git a/wolf3d/code/wolf/wolf_weapon.c b/wolf3d/code/wolf/wolf_weapon.c index 4953dfa..529d6d5 100644 --- a/wolf3d/code/wolf/wolf_weapon.c +++ b/wolf3d/code/wolf/wolf_weapon.c @@ -49,14 +49,14 @@ PUBLIC void fire_hit( player_t *self ) { if( Guards[ n ].flags & FL_SHOOTABLE ) // && Guards[n].flags&FL_VISABLE { - shot_dist = Point2LineDist( Guards[ n ].x - self->position.origin[ 0 ], Guards[ n ].y - self->position.origin[ 1 ], self->position.angle ); + shot_dist = Point2LineDist( Guards[ n ].x - (int)self->position.origin[ 0 ], Guards[ n ].y - (int)self->position.origin[ 1 ], (int)self->position.angle ); if( shot_dist > (2 * TILEGLOBAL / 3) ) { continue; // miss } - d1 = LineLen2Point( Guards[ n ].x - self->position.origin[ 0 ], Guards[ n ].y - self->position.origin[ 1 ], self->position.angle ); + d1 = LineLen2Point( Guards[ n ].x - (int)self->position.origin[ 0 ], Guards[ n ].y - (int)self->position.origin[ 1 ], (int)self->position.angle ); if( d1 < 0 || d1 > dist ) { @@ -126,13 +126,13 @@ PUBLIC void fire_lead( player_t *self ) { if( Guards[ n ].flags & FL_SHOOTABLE ) // && Guards[n].flags&FL_VISABLE { - shot_dist = Point2LineDist( Guards[ n ].x - self->position.origin[ 0 ], Guards[ n ].y - self->position.origin[ 1 ], self->position.angle ); + shot_dist = Point2LineDist( Guards[ n ].x - (int)self->position.origin[ 0 ], Guards[ n ].y - (int)self->position.origin[ 1 ], (int)self->position.angle ); if( shot_dist > (2 * TILEGLOBAL / 3) ) { continue; // miss } - d1 = LineLen2Point( Guards[ n ].x - self->position.origin[ 0 ], Guards[ n ].y - self->position.origin[ 1 ], self->position.angle ); + d1 = LineLen2Point( Guards[ n ].x - (int)self->position.origin[ 0 ], Guards[ n ].y - (int)self->position.origin[ 1 ], (int)self->position.angle ); if( d1 < 0 || d1 > dist ) { continue; @@ -153,9 +153,9 @@ PUBLIC void fire_lead( player_t *self ) { r_trace_t trace; - trace.a = NormalizeAngle( self->position.angle - DEG2FINE( 2 ) + rand() % (DEG2FINE( 4 ) ) ); - trace.x = self->position.origin[ 0 ]; - trace.y = self->position.origin[ 1 ]; + trace.a = NormalizeAngle( (int)self->position.angle - DEG2FINE( 2 ) + rand() % (DEG2FINE( 4 ) ) ); + trace.x = (int)self->position.origin[ 0 ]; + trace.y = (int)self->position.origin[ 1 ]; trace.flags = TRACE_BULLET; trace.tile_vis = NULL; R_Trace( &trace, r_world ); diff --git a/wolf3d/code/wolfiphone.h b/wolf3d/code/wolfiphone.h index 472828f..7ec117c 100644 --- a/wolf3d/code/wolfiphone.h +++ b/wolf3d/code/wolfiphone.h @@ -107,5 +107,31 @@ extern CFAbsoluteTime soundTime; extern CFAbsoluteTime menuTime; -void picTimingPrint(); -void picTimingClear(); +void picTimingPrint(void); +void picTimingClear(void); + +#define SCREEN_WIDTH ([[UIScreen mainScreen] bounds].size.width) +#define SCREEN_HEIGHT ([[UIScreen mainScreen] bounds].size.height) +#define SCREEN_MAX_LENGTH (MAX(SCREEN_WIDTH, SCREEN_HEIGHT)) +#define SCREEN_MIN_LENGTH (MIN(SCREEN_WIDTH, SCREEN_HEIGHT)) +#define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) +#define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) +#define IS_IPHONE_X (IS_IPHONE && SCREEN_MAX_LENGTH == 812.0) +extern bool isiPhoneX; + +// Game controller stuff +extern bool controllerConnected; +extern bool leftTriggerPressed; +extern bool rightTriggerPressed; +extern bool leftShoulderPressed; +extern bool rightShoulderPressed; +extern bool buttonAPressed; +extern bool buttonBPressed; +extern bool buttonXPressed; +extern bool buttonYPressed; +// TODO: d-pad +extern float leftThumbstickYAxis; +extern float leftThumbstickXAxis; +extern float rightThumbstickYAxis; +extern float rightThumbstickXAxis; + diff --git a/wolf3d/menu_art/Default-Portrait.png b/wolf3d/menu_art/Default-Portrait.png new file mode 100755 index 0000000..22f0f30 Binary files /dev/null and b/wolf3d/menu_art/Default-Portrait.png differ diff --git a/wolf3d/menu_art/Default-Portrait~ipad.png b/wolf3d/menu_art/Default-Portrait~ipad.png new file mode 100755 index 0000000..358f10c Binary files /dev/null and b/wolf3d/menu_art/Default-Portrait~ipad.png differ diff --git a/wolf3d/menu_art/Default-Portrait~tvos.png b/wolf3d/menu_art/Default-Portrait~tvos.png new file mode 100644 index 0000000..8bb4712 Binary files /dev/null and b/wolf3d/menu_art/Default-Portrait~tvos.png differ diff --git a/wolf3d/menu_art/GODMODEFACE0PIC.png b/wolf3d/menu_art/GODMODEFACE0PIC.png new file mode 100755 index 0000000..7a8478e Binary files /dev/null and b/wolf3d/menu_art/GODMODEFACE0PIC.png differ diff --git a/wolf3d/menu_art/GODMODEFACE1PIC.png b/wolf3d/menu_art/GODMODEFACE1PIC.png new file mode 100755 index 0000000..e7bf547 Binary files /dev/null and b/wolf3d/menu_art/GODMODEFACE1PIC.png differ diff --git a/wolf3d/menu_art/GODMODEFACE2PIC.png b/wolf3d/menu_art/GODMODEFACE2PIC.png new file mode 100755 index 0000000..4666dee Binary files /dev/null and b/wolf3d/menu_art/GODMODEFACE2PIC.png differ diff --git a/wolf3d/menu_art/WOLF_114.png b/wolf3d/menu_art/WOLF_114.png new file mode 100755 index 0000000..825c424 Binary files /dev/null and b/wolf3d/menu_art/WOLF_114.png differ diff --git a/wolf3d/menu_art/WOLF_57.png b/wolf3d/menu_art/WOLF_57.png new file mode 100755 index 0000000..dfb2765 Binary files /dev/null and b/wolf3d/menu_art/WOLF_57.png differ diff --git a/wolf3d/menu_art/WOLF_72.png b/wolf3d/menu_art/WOLF_72.png new file mode 100755 index 0000000..e224a4e Binary files /dev/null and b/wolf3d/menu_art/WOLF_72.png differ diff --git a/wolf3d/menu_art/adv_btn.png b/wolf3d/menu_art/adv_btn.png new file mode 100755 index 0000000..bf7cab5 Binary files /dev/null and b/wolf3d/menu_art/adv_btn.png differ diff --git a/wolf3d/menu_art/arialImageLAL.png b/wolf3d/menu_art/arialImageLAL.png new file mode 100755 index 0000000..1a1069a Binary files /dev/null and b/wolf3d/menu_art/arialImageLAL.png differ diff --git a/wolf3d/menu_art/arialImageLAL_white-alpha.png b/wolf3d/menu_art/arialImageLAL_white-alpha.png new file mode 100755 index 0000000..704e4a8 Binary files /dev/null and b/wolf3d/menu_art/arialImageLAL_white-alpha.png differ diff --git a/wolf3d/menu_art/back_arrow.png b/wolf3d/menu_art/back_arrow.png new file mode 100755 index 0000000..9b2e186 Binary files /dev/null and b/wolf3d/menu_art/back_arrow.png differ diff --git a/wolf3d/menu_art/button_highlight.png b/wolf3d/menu_art/button_highlight.png new file mode 100755 index 0000000..37b2a70 Binary files /dev/null and b/wolf3d/menu_art/button_highlight.png differ diff --git a/wolf3d/menu_art/credits_bg.png b/wolf3d/menu_art/credits_bg.png new file mode 100755 index 0000000..093181d Binary files /dev/null and b/wolf3d/menu_art/credits_bg.png differ diff --git a/wolf3d/menu_art/difficulty_head1.png b/wolf3d/menu_art/difficulty_head1.png new file mode 100755 index 0000000..c2088df Binary files /dev/null and b/wolf3d/menu_art/difficulty_head1.png differ diff --git a/wolf3d/menu_art/difficulty_head2.png b/wolf3d/menu_art/difficulty_head2.png new file mode 100755 index 0000000..5985ef8 Binary files /dev/null and b/wolf3d/menu_art/difficulty_head2.png differ diff --git a/wolf3d/menu_art/difficulty_head3.png b/wolf3d/menu_art/difficulty_head3.png new file mode 100755 index 0000000..89ac971 Binary files /dev/null and b/wolf3d/menu_art/difficulty_head3.png differ diff --git a/wolf3d/menu_art/difficulty_head4.png b/wolf3d/menu_art/difficulty_head4.png new file mode 100755 index 0000000..d7e1892 Binary files /dev/null and b/wolf3d/menu_art/difficulty_head4.png differ diff --git a/wolf3d/menu_art/down_arrow.png b/wolf3d/menu_art/down_arrow.png new file mode 100755 index 0000000..f9fe49d Binary files /dev/null and b/wolf3d/menu_art/down_arrow.png differ diff --git a/wolf3d/menu_art/episode_bg.png b/wolf3d/menu_art/episode_bg.png new file mode 100755 index 0000000..70b06a5 Binary files /dev/null and b/wolf3d/menu_art/episode_bg.png differ diff --git a/wolf3d/menu_art/episode_bracket.png b/wolf3d/menu_art/episode_bracket.png new file mode 100755 index 0000000..8293b17 Binary files /dev/null and b/wolf3d/menu_art/episode_bracket.png differ diff --git a/wolf3d/menu_art/episode_divider.png b/wolf3d/menu_art/episode_divider.png new file mode 100755 index 0000000..245d588 Binary files /dev/null and b/wolf3d/menu_art/episode_divider.png differ diff --git a/wolf3d/menu_art/header_advanced.png b/wolf3d/menu_art/header_advanced.png new file mode 100755 index 0000000..9a8e9bf Binary files /dev/null and b/wolf3d/menu_art/header_advanced.png differ diff --git a/wolf3d/menu_art/header_ep1.png b/wolf3d/menu_art/header_ep1.png new file mode 100755 index 0000000..2c985ac Binary files /dev/null and b/wolf3d/menu_art/header_ep1.png differ diff --git a/wolf3d/menu_art/header_ep10.png b/wolf3d/menu_art/header_ep10.png new file mode 100755 index 0000000..d469b92 Binary files /dev/null and b/wolf3d/menu_art/header_ep10.png differ diff --git a/wolf3d/menu_art/header_ep11.png b/wolf3d/menu_art/header_ep11.png new file mode 100755 index 0000000..2df87d1 Binary files /dev/null and b/wolf3d/menu_art/header_ep11.png differ diff --git a/wolf3d/menu_art/header_ep2.png b/wolf3d/menu_art/header_ep2.png new file mode 100755 index 0000000..bdd5902 Binary files /dev/null and b/wolf3d/menu_art/header_ep2.png differ diff --git a/wolf3d/menu_art/header_ep3.png b/wolf3d/menu_art/header_ep3.png new file mode 100755 index 0000000..704e823 Binary files /dev/null and b/wolf3d/menu_art/header_ep3.png differ diff --git a/wolf3d/menu_art/header_ep4.png b/wolf3d/menu_art/header_ep4.png new file mode 100755 index 0000000..6465cf0 Binary files /dev/null and b/wolf3d/menu_art/header_ep4.png differ diff --git a/wolf3d/menu_art/header_ep5.png b/wolf3d/menu_art/header_ep5.png new file mode 100755 index 0000000..de5d852 Binary files /dev/null and b/wolf3d/menu_art/header_ep5.png differ diff --git a/wolf3d/menu_art/header_ep6.png b/wolf3d/menu_art/header_ep6.png new file mode 100755 index 0000000..faea65d Binary files /dev/null and b/wolf3d/menu_art/header_ep6.png differ diff --git a/wolf3d/menu_art/header_ep7.png b/wolf3d/menu_art/header_ep7.png new file mode 100755 index 0000000..f19591e Binary files /dev/null and b/wolf3d/menu_art/header_ep7.png differ diff --git a/wolf3d/menu_art/header_ep8.png b/wolf3d/menu_art/header_ep8.png new file mode 100755 index 0000000..c167542 Binary files /dev/null and b/wolf3d/menu_art/header_ep8.png differ diff --git a/wolf3d/menu_art/header_ep9.png b/wolf3d/menu_art/header_ep9.png new file mode 100755 index 0000000..253c1c4 Binary files /dev/null and b/wolf3d/menu_art/header_ep9.png differ diff --git a/wolf3d/menu_art/highlight_bracket.png b/wolf3d/menu_art/highlight_bracket.png new file mode 100755 index 0000000..eab810f Binary files /dev/null and b/wolf3d/menu_art/highlight_bracket.png differ diff --git a/wolf3d/menu_art/intermission.png b/wolf3d/menu_art/intermission.png new file mode 100755 index 0000000..6099a86 Binary files /dev/null and b/wolf3d/menu_art/intermission.png differ diff --git a/wolf3d/menu_art/iphone_image.png b/wolf3d/menu_art/iphone_image.png new file mode 100755 index 0000000..cda6911 Binary files /dev/null and b/wolf3d/menu_art/iphone_image.png differ diff --git a/wolf3d/menu_art/iphone_preset_1.png b/wolf3d/menu_art/iphone_preset_1.png new file mode 100755 index 0000000..cd8004d Binary files /dev/null and b/wolf3d/menu_art/iphone_preset_1.png differ diff --git a/wolf3d/menu_art/iphone_preset_2.png b/wolf3d/menu_art/iphone_preset_2.png new file mode 100755 index 0000000..b0e5f62 Binary files /dev/null and b/wolf3d/menu_art/iphone_preset_2.png differ diff --git a/wolf3d/menu_art/iphone_preset_3.png b/wolf3d/menu_art/iphone_preset_3.png new file mode 100755 index 0000000..715f04a Binary files /dev/null and b/wolf3d/menu_art/iphone_preset_3.png differ diff --git a/wolf3d/menu_art/iphone_preset_4.png b/wolf3d/menu_art/iphone_preset_4.png new file mode 100755 index 0000000..f7011d6 Binary files /dev/null and b/wolf3d/menu_art/iphone_preset_4.png differ diff --git a/wolf3d/menu_art/kills.png b/wolf3d/menu_art/kills.png new file mode 100755 index 0000000..f4599de Binary files /dev/null and b/wolf3d/menu_art/kills.png differ diff --git a/wolf3d/menu_art/kills_shadow.png b/wolf3d/menu_art/kills_shadow.png new file mode 100755 index 0000000..9723cb8 Binary files /dev/null and b/wolf3d/menu_art/kills_shadow.png differ diff --git a/wolf3d/menu_art/left_chevron.png b/wolf3d/menu_art/left_chevron.png new file mode 100755 index 0000000..a6ae751 Binary files /dev/null and b/wolf3d/menu_art/left_chevron.png differ diff --git a/wolf3d/menu_art/main_bg.png b/wolf3d/menu_art/main_bg.png new file mode 100755 index 0000000..cb31b53 Binary files /dev/null and b/wolf3d/menu_art/main_bg.png differ diff --git a/wolf3d/menu_art/map_background.png b/wolf3d/menu_art/map_background.png new file mode 100755 index 0000000..8730335 Binary files /dev/null and b/wolf3d/menu_art/map_background.png differ diff --git a/wolf3d/menu_art/next_arrow.png b/wolf3d/menu_art/next_arrow.png new file mode 100755 index 0000000..e108548 Binary files /dev/null and b/wolf3d/menu_art/next_arrow.png differ diff --git a/wolf3d/menu_art/partime.png b/wolf3d/menu_art/partime.png new file mode 100755 index 0000000..e029313 Binary files /dev/null and b/wolf3d/menu_art/partime.png differ diff --git a/wolf3d/menu_art/partime_shadow.png b/wolf3d/menu_art/partime_shadow.png new file mode 100755 index 0000000..3c66825 Binary files /dev/null and b/wolf3d/menu_art/partime_shadow.png differ diff --git a/wolf3d/menu_art/right_chevron.png b/wolf3d/menu_art/right_chevron.png new file mode 100755 index 0000000..86602fc Binary files /dev/null and b/wolf3d/menu_art/right_chevron.png differ diff --git a/wolf3d/menu_art/secrets.png b/wolf3d/menu_art/secrets.png new file mode 100755 index 0000000..37c330e Binary files /dev/null and b/wolf3d/menu_art/secrets.png differ diff --git a/wolf3d/menu_art/secrets_shadow.png b/wolf3d/menu_art/secrets_shadow.png new file mode 100755 index 0000000..129c749 Binary files /dev/null and b/wolf3d/menu_art/secrets_shadow.png differ diff --git a/wolf3d/menu_art/settings_divider.png b/wolf3d/menu_art/settings_divider.png new file mode 100755 index 0000000..191cbf2 Binary files /dev/null and b/wolf3d/menu_art/settings_divider.png differ diff --git a/wolf3d/menu_art/settings_line_art.png b/wolf3d/menu_art/settings_line_art.png new file mode 100755 index 0000000..eb05603 Binary files /dev/null and b/wolf3d/menu_art/settings_line_art.png differ diff --git a/wolf3d/menu_art/settings_slider_blue.png b/wolf3d/menu_art/settings_slider_blue.png new file mode 100755 index 0000000..16f4750 Binary files /dev/null and b/wolf3d/menu_art/settings_slider_blue.png differ diff --git a/wolf3d/menu_art/settings_slider_blue~ipad.png b/wolf3d/menu_art/settings_slider_blue~ipad.png new file mode 100755 index 0000000..78fdb3c Binary files /dev/null and b/wolf3d/menu_art/settings_slider_blue~ipad.png differ diff --git a/wolf3d/menu_art/settings_slider_grey.png b/wolf3d/menu_art/settings_slider_grey.png new file mode 100755 index 0000000..59cd9f1 Binary files /dev/null and b/wolf3d/menu_art/settings_slider_grey.png differ diff --git a/wolf3d/menu_art/settings_slider_grey~ipad.png b/wolf3d/menu_art/settings_slider_grey~ipad.png new file mode 100755 index 0000000..d1d286d Binary files /dev/null and b/wolf3d/menu_art/settings_slider_grey~ipad.png differ diff --git a/wolf3d/menu_art/settings_slider_white.png b/wolf3d/menu_art/settings_slider_white.png new file mode 100755 index 0000000..0fc3e18 Binary files /dev/null and b/wolf3d/menu_art/settings_slider_white.png differ diff --git a/wolf3d/menu_art/settings_slider_white~ipad.png b/wolf3d/menu_art/settings_slider_white~ipad.png new file mode 100755 index 0000000..88ad277 Binary files /dev/null and b/wolf3d/menu_art/settings_slider_white~ipad.png differ diff --git a/wolf3d/menu_art/star_icon.png b/wolf3d/menu_art/star_icon.png new file mode 100755 index 0000000..6dc043f Binary files /dev/null and b/wolf3d/menu_art/star_icon.png differ diff --git a/wolf3d/menu_art/stats.png b/wolf3d/menu_art/stats.png new file mode 100755 index 0000000..a7fef13 Binary files /dev/null and b/wolf3d/menu_art/stats.png differ diff --git a/wolf3d/menu_art/stats_large.png b/wolf3d/menu_art/stats_large.png new file mode 100755 index 0000000..60431d9 Binary files /dev/null and b/wolf3d/menu_art/stats_large.png differ diff --git a/wolf3d/menu_art/submenus_background_image.png b/wolf3d/menu_art/submenus_background_image.png new file mode 100755 index 0000000..fe1ff30 Binary files /dev/null and b/wolf3d/menu_art/submenus_background_image.png differ diff --git a/wolf3d/menu_art/treasure.png b/wolf3d/menu_art/treasure.png new file mode 100755 index 0000000..0e2fb12 Binary files /dev/null and b/wolf3d/menu_art/treasure.png differ diff --git a/wolf3d/menu_art/treasure_shadow.png b/wolf3d/menu_art/treasure_shadow.png new file mode 100755 index 0000000..18798ad Binary files /dev/null and b/wolf3d/menu_art/treasure_shadow.png differ diff --git a/wolf3d/menu_art/up_arrow.png b/wolf3d/menu_art/up_arrow.png new file mode 100755 index 0000000..c8601e2 Binary files /dev/null and b/wolf3d/menu_art/up_arrow.png differ diff --git a/wolf3d/menu_art/up_down.png b/wolf3d/menu_art/up_down.png new file mode 100755 index 0000000..55ba562 Binary files /dev/null and b/wolf3d/menu_art/up_down.png differ diff --git a/wolf3d/menu_art/victory_256.png b/wolf3d/menu_art/victory_256.png new file mode 100755 index 0000000..71771b2 Binary files /dev/null and b/wolf3d/menu_art/victory_256.png differ diff --git a/wolf3d/menu_art/wolf3d_icon.png b/wolf3d/menu_art/wolf3d_icon.png new file mode 100755 index 0000000..7e35f1a Binary files /dev/null and b/wolf3d/menu_art/wolf3d_icon.png differ diff --git a/wolf3d/menu_art/wolf3dlite_icon.png b/wolf3d/menu_art/wolf3dlite_icon.png new file mode 100755 index 0000000..35e95a6 Binary files /dev/null and b/wolf3d/menu_art/wolf3dlite_icon.png differ diff --git a/wolf3d/menu_art/wolf_bg.png b/wolf3d/menu_art/wolf_bg.png new file mode 100755 index 0000000..79d8162 Binary files /dev/null and b/wolf3d/menu_art/wolf_bg.png differ diff --git a/wolf3d/newCode/Tremor/CHANGELOG b/wolf3d/newCode/Tremor/CHANGELOG deleted file mode 100644 index 53f2335..0000000 --- a/wolf3d/newCode/Tremor/CHANGELOG +++ /dev/null @@ -1,19 +0,0 @@ -*** 20020517: 1.0.2 *** - - Playback bugfix to floor1; mode mistakenly used for sizing instead - of blockflag - -*** 20020515: 1.0.1 *** - - Added complete API documentation to source tarball. No code - changes. - -*** 20020412: 1.0.1 *** - - Fixed a clipping bug that affected ARM processors; negative - overflows were being properly clipped, but then clobbered to - positive by the positive overflow chec (asm_arm.h:CLIP_TO_15) - -*** 20020403: 1.0.0 *** - - Initial version \ No newline at end of file diff --git a/wolf3d/newCode/Tremor/COPYING b/wolf3d/newCode/Tremor/COPYING deleted file mode 100644 index 6111c6c..0000000 --- a/wolf3d/newCode/Tremor/COPYING +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2002, Xiph.org Foundation - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -- Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -- Neither the name of the Xiph.org Foundation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/wolf3d/newCode/Tremor/Makefile.am b/wolf3d/newCode/Tremor/Makefile.am deleted file mode 100644 index d14081f..0000000 --- a/wolf3d/newCode/Tremor/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -AUTOMAKE_OPTIONS = foreign - -INCLUDES = -I./ - -lib_LTLIBRARIES = libvorbisidec.la - -libvorbisidec_la_SOURCES = mdct.c block.c window.c \ - synthesis.c info.c \ - floor1.c floor0.c vorbisfile.c \ - res012.c mapping0.c registry.c codebook.c \ - sharedbook.c framing.c bitwise.c \ - codebook.h misc.h mdct_lookup.h\ - os.h mdct.h block.h ivorbisfile.h lsp_lookup.h\ - registry.h window.h window_lookup.h\ - codec_internal.h backends.h ogg.h \ - asm_arm.h ivorbiscodec.h -libvorbisidec_la_LDFLAGS = -version-info @V_LIB_CURRENT@:@V_LIB_REVISION@:@V_LIB_AGE@ - -EXTRA_PROGRAMS = ivorbisfile_example -CLEANFILES = $(EXTRA_PROGRAMS) $(lib_LTLIBRARIES) - -ivorbisfile_example_SOURCES = ivorbisfile_example.c -ivorbisfile_example_LDFLAGS = -static -ivorbisfile_example_LDADD = libvorbisidec.la - -includedir = $(prefix)/include/tremor - -include_HEADERS = ivorbiscodec.h ivorbisfile.h ogg.h os_types.h config_types.h - -example: - -ln -fs . vorbis - $(MAKE) ivorbisfile_example - -debug: - $(MAKE) all CFLAGS="@DEBUG@" - -profile: - $(MAKE) all CFLAGS="@PROFILE@" diff --git a/wolf3d/newCode/Tremor/README b/wolf3d/newCode/Tremor/README deleted file mode 100644 index 1321175..0000000 --- a/wolf3d/newCode/Tremor/README +++ /dev/null @@ -1,46 +0,0 @@ -This README covers the Ogg Vorbis 'Tremor' integer playback codec -source as of date 2002 09 02, version 1.0.0. - - ****** - -The C source in this package will build on any ANSI C compiler and -function completely and properly on any platform. The included build -system assumes GNU build system and make tools (m4, automake, -autoconf, libtool and gmake). GCC is not required, although GCC is -the most tested compiler. To build using GNU tools, type in the -source directory: - -./autogen.sh -make - -Currently, the source implements playback in pure C on all platforms -except ARM, where a [currently] small amount of assembly (see -asm_arm.h) is used to implement 64 bit math operations and fast LSP -computation. If building on ARM without the benefit of GNU build -system tools, be sure that '_ARM_ASSEM_' is #defined by the build -system if this assembly is desired, else the resulting library will -use whatever 64 bit math builtins the compiler implements. - -No math library is required by this source. No floating point -operations are used at any point in either setup or decode. This -decoder library will properly decode any past, current or future -Vorbis I file or stream. - - ******** - -The build system produces a static and [when supported by the OS] -dynamic library named 'libvorbisidec'. This library exposes an API -nearly identical to the BSD reference library's 'libvorbisfile', -including all the features familiar to users of vorbisfile. This API -is similar enough that the proper header file to include is named -'ivorbisfile.h' [included in the source build directory]. Lower level -libvorbis-style headers and structures are in 'ivorbiscodec.h' -[included in the source build directory]. A simple example program, -ivorbisfile_example.c, can be built with 'make example'. - - ******** - -Detailed Tremor API Documentation begins at doc/index.html - -Monty -xiph.org diff --git a/wolf3d/newCode/Tremor/Version_script.in b/wolf3d/newCode/Tremor/Version_script.in deleted file mode 100644 index c0dfde9..0000000 --- a/wolf3d/newCode/Tremor/Version_script.in +++ /dev/null @@ -1,49 +0,0 @@ -# -# Export file for libvorbisidec -# -# Only the symbols listed in the global section will be callable from -# applications linking to libvorbisidec. -# - -@PACKAGE@.so.1 -{ - global: - ov_clear; - ov_open; - ov_open_callbacks; - ov_test; - ov_test_callbacks; - ov_test_open; - ov_bitrate; - ov_bitrate_instant; - ov_streams; - ov_seekable; - ov_serialnumber; - ov_raw_total; - ov_pcm_total; - ov_time_total; - ov_raw_seek; - ov_pcm_seek; - ov_pcm_seek_page; - ov_time_seek; - ov_time_seek_page; - ov_raw_tell; - ov_pcm_tell; - ov_time_tell; - ov_info; - ov_comment; - ov_read; - - vorbis_info_init; - vorbis_info_clear; - vorbis_info_blocksize; - vorbis_comment_init; - vorbis_comment_add; - vorbis_comment_add_tag; - vorbis_comment_query; - vorbis_comment_query_count; - vorbis_comment_clear; - - local: - *; -}; diff --git a/wolf3d/newCode/Tremor/asm_arm.h b/wolf3d/newCode/Tremor/asm_arm.h deleted file mode 100644 index 3a3716d..0000000 --- a/wolf3d/newCode/Tremor/asm_arm.h +++ /dev/null @@ -1,243 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: arm7 and later wide math functions - - ********************************************************************/ - -#ifdef _ARM_ASSEM_ - -#if !defined(_V_WIDE_MATH) && !defined(_LOW_ACCURACY_) -#define _V_WIDE_MATH - -static inline ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) { - int lo,hi; - asm volatile("smull\t%0, %1, %2, %3" - : "=&r"(lo),"=&r"(hi) - : "%r"(x),"r"(y) - : "cc"); - return(hi); -} - -static inline ogg_int32_t MULT31(ogg_int32_t x, ogg_int32_t y) { - return MULT32(x,y)<<1; -} - -static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) { - int lo,hi; - asm volatile("smull %0, %1, %2, %3\n\t" - "movs %0, %0, lsr #15\n\t" - "adc %1, %0, %1, lsl #17\n\t" - : "=&r"(lo),"=&r"(hi) - : "%r"(x),"r"(y) - : "cc"); - return(hi); -} - -#define MB() asm volatile ("" : : : "memory") - -static inline void XPROD32(ogg_int32_t a, ogg_int32_t b, - ogg_int32_t t, ogg_int32_t v, - ogg_int32_t *x, ogg_int32_t *y) -{ - int x1, y1, l; - asm( "smull %0, %1, %4, %6\n\t" - "smlal %0, %1, %5, %7\n\t" - "rsb %3, %4, #0\n\t" - "smull %0, %2, %5, %6\n\t" - "smlal %0, %2, %3, %7" - : "=&r" (l), "=&r" (x1), "=&r" (y1), "=r" (a) - : "3" (a), "r" (b), "r" (t), "r" (v) - : "cc" ); - *x = x1; - MB(); - *y = y1; -} - -static inline void XPROD31(ogg_int32_t a, ogg_int32_t b, - ogg_int32_t t, ogg_int32_t v, - ogg_int32_t *x, ogg_int32_t *y) -{ - int x1, y1, l; - asm( "smull %0, %1, %4, %6\n\t" - "smlal %0, %1, %5, %7\n\t" - "rsb %3, %4, #0\n\t" - "smull %0, %2, %5, %6\n\t" - "smlal %0, %2, %3, %7" - : "=&r" (l), "=&r" (x1), "=&r" (y1), "=r" (a) - : "3" (a), "r" (b), "r" (t), "r" (v) - : "cc" ); - *x = x1 << 1; - MB(); - *y = y1 << 1; -} - -static inline void XNPROD31(ogg_int32_t a, ogg_int32_t b, - ogg_int32_t t, ogg_int32_t v, - ogg_int32_t *x, ogg_int32_t *y) -{ - int x1, y1, l; - asm( "rsb %2, %4, #0\n\t" - "smull %0, %1, %3, %5\n\t" - "smlal %0, %1, %2, %6\n\t" - "smull %0, %2, %4, %5\n\t" - "smlal %0, %2, %3, %6" - : "=&r" (l), "=&r" (x1), "=&r" (y1) - : "r" (a), "r" (b), "r" (t), "r" (v) - : "cc" ); - *x = x1 << 1; - MB(); - *y = y1 << 1; -} - -#endif - -#ifndef _V_CLIP_MATH -#define _V_CLIP_MATH - -static inline ogg_int32_t CLIP_TO_15(ogg_int32_t x) { - int tmp; - asm volatile("subs %1, %0, #32768\n\t" - "movpl %0, #0x7f00\n\t" - "orrpl %0, %0, #0xff\n" - "adds %1, %0, #32768\n\t" - "movmi %0, #0x8000" - : "+r"(x),"=r"(tmp) - : - : "cc"); - return(x); -} - -#endif - -#ifndef _V_LSP_MATH_ASM -#define _V_LSP_MATH_ASM - -static inline void lsp_loop_asm(ogg_uint32_t *qip,ogg_uint32_t *pip, - ogg_int32_t *qexpp, - ogg_int32_t *ilsp,ogg_int32_t wi, - ogg_int32_t m){ - - ogg_uint32_t qi=*qip,pi=*pip; - ogg_int32_t qexp=*qexpp; - - asm("mov r0,%3;" - "mov r1,%5,asr#1;" - "add r0,r0,r1,lsl#3;" - "1:" - - "ldmdb r0!,{r1,r3};" - "subs r1,r1,%4;" //ilsp[j]-wi - "rsbmi r1,r1,#0;" //labs(ilsp[j]-wi) - "umull %0,r2,r1,%0;" //qi*=labs(ilsp[j]-wi) - - "subs r1,r3,%4;" //ilsp[j+1]-wi - "rsbmi r1,r1,#0;" //labs(ilsp[j+1]-wi) - "umull %1,r3,r1,%1;" //pi*=labs(ilsp[j+1]-wi) - - "cmn r2,r3;" // shift down 16? - "beq 0f;" - "add %2,%2,#16;" - "mov %0,%0,lsr #16;" - "orr %0,%0,r2,lsl #16;" - "mov %1,%1,lsr #16;" - "orr %1,%1,r3,lsl #16;" - "0:" - "cmp r0,%3;\n" - "bhi 1b;\n" - - // odd filter assymetry - "ands r0,%5,#1;\n" - "beq 2f;\n" - "add r0,%3,%5,lsl#2;\n" - - "ldr r1,[r0,#-4];\n" - "mov r0,#0x4000;\n" - - "subs r1,r1,%4;\n" //ilsp[j]-wi - "rsbmi r1,r1,#0;\n" //labs(ilsp[j]-wi) - "umull %0,r2,r1,%0;\n" //qi*=labs(ilsp[j]-wi) - "umull %1,r3,r0,%1;\n" //pi*=labs(ilsp[j+1]-wi) - - "cmn r2,r3;\n" // shift down 16? - "beq 2f;\n" - "add %2,%2,#16;\n" - "mov %0,%0,lsr #16;\n" - "orr %0,%0,r2,lsl #16;\n" - "mov %1,%1,lsr #16;\n" - "orr %1,%1,r3,lsl #16;\n" - - //qi=(pi>>shift)*labs(ilsp[j]-wi); - //pi=(qi>>shift)*labs(ilsp[j+1]-wi); - //qexp+=shift; - - //} - - /* normalize to max 16 sig figs */ - "2:" - "mov r2,#0;" - "orr r1,%0,%1;" - "tst r1,#0xff000000;" - "addne r2,r2,#8;" - "movne r1,r1,lsr #8;" - "tst r1,#0x00f00000;" - "addne r2,r2,#4;" - "movne r1,r1,lsr #4;" - "tst r1,#0x000c0000;" - "addne r2,r2,#2;" - "movne r1,r1,lsr #2;" - "tst r1,#0x00020000;" - "addne r2,r2,#1;" - "movne r1,r1,lsr #1;" - "tst r1,#0x00010000;" - "addne r2,r2,#1;" - "mov %0,%0,lsr r2;" - "mov %1,%1,lsr r2;" - "add %2,%2,r2;" - - : "+r"(qi),"+r"(pi),"+r"(qexp) - : "r"(ilsp),"r"(wi),"r"(m) - : "r0","r1","r2","r3","cc"); - - *qip=qi; - *pip=pi; - *qexpp=qexp; -} - -static inline void lsp_norm_asm(ogg_uint32_t *qip,ogg_int32_t *qexpp){ - - ogg_uint32_t qi=*qip; - ogg_int32_t qexp=*qexpp; - - asm("tst %0,#0x0000ff00;" - "moveq %0,%0,lsl #8;" - "subeq %1,%1,#8;" - "tst %0,#0x0000f000;" - "moveq %0,%0,lsl #4;" - "subeq %1,%1,#4;" - "tst %0,#0x0000c000;" - "moveq %0,%0,lsl #2;" - "subeq %1,%1,#2;" - "tst %0,#0x00008000;" - "moveq %0,%0,lsl #1;" - "subeq %1,%1,#1;" - : "+r"(qi),"+r"(qexp) - : - : "cc"); - *qip=qi; - *qexpp=qexp; -} - -#endif -#endif - diff --git a/wolf3d/newCode/Tremor/autogen.sh b/wolf3d/newCode/Tremor/autogen.sh deleted file mode 100644 index 73c8fca..0000000 --- a/wolf3d/newCode/Tremor/autogen.sh +++ /dev/null @@ -1,120 +0,0 @@ -#!/bin/sh -# Run this to set up the build system: configure, makefiles, etc. -# (based on the version in enlightenment's cvs) - -package="vorbisdec" - -olddir=`pwd` -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. - -cd "$srcdir" -DIE=0 - -echo "checking for autoconf... " -(autoconf --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have autoconf installed to compile $package." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - DIE=1 -} - -VERSIONGREP="sed -e s/.*[^0-9\.]\([0-9]\.[0-9]\).*/\1/" -VERSIONMKINT="sed -e s/[^0-9]//" - -# do we need automake? -if test -r Makefile.am; then - AM_OPTIONS=`fgrep AUTOMAKE_OPTIONS Makefile.am` - AM_NEEDED=`echo $AM_OPTIONS | $VERSIONGREP` - if test x"$AM_NEEDED" = "x$AM_OPTIONS"; then - AM_NEEDED="" - fi - if test -z $AM_NEEDED; then - echo -n "checking for automake... " - AUTOMAKE=automake - ACLOCAL=aclocal - if ($AUTOMAKE --version < /dev/null > /dev/null 2>&1); then - echo "yes" - else - echo "no" - AUTOMAKE= - fi - else - echo -n "checking for automake $AM_NEEDED or later... " - for am in automake-$AM_NEEDED automake$AM_NEEDED automake; do - ($am --version < /dev/null > /dev/null 2>&1) || continue - ver=`$am --version < /dev/null | head -n 1 | $VERSIONGREP | $VERSIONMKINT` - verneeded=`echo $AM_NEEDED | $VERSIONMKINT` - if test $ver -ge $verneeded; then - AUTOMAKE=$am - echo $AUTOMAKE - break - fi - done - test -z $AUTOMAKE && echo "no" - echo -n "checking for aclocal $AM_NEEDED or later... " - for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED aclocal; do - ($ac --version < /dev/null > /dev/null 2>&1) || continue - ver=`$ac --version < /dev/null | head -n 1 | $VERSIONGREP | $VERSIONMKINT` - verneeded=`echo $AM_NEEDED | $VERSIONMKINT` - if test $ver -ge $verneeded; then - ACLOCAL=$ac - echo $ACLOCAL - break - fi - done - test -z $ACLOCAL && echo "no" - fi - test -z $AUTOMAKE || test -z $ACLOCAL && { - echo - echo "You must have automake installed to compile $package." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - exit 1 - } -fi - -echo -n "checking for libtool... " -for LIBTOOLIZE in libtoolize glibtoolize nope; do - ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 && break -done -if test x$LIBTOOLIZE = xnope; then - echo "nope." - LIBTOOLIZE=libtoolize -else - echo $LIBTOOLIZE -fi -($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have libtool installed to compile $package." - echo "Download the appropriate package for your system," - echo "or get the source from one of the GNU ftp sites" - echo "listed in http://www.gnu.org/order/ftp.html" - DIE=1 -} - -if test "$DIE" -eq 1; then - exit 1 -fi - -if test -z "$*"; then - echo "I am going to run ./configure with no arguments - if you wish " - echo "to pass any to it, please specify them on the $0 command line." -fi - -echo "Generating configuration files for $package, please wait...." - -echo " $ACLOCAL $ACLOCAL_FLAGS" -$ACLOCAL $ACLOCAL_FLAGS || exit 1 -echo " $LIBTOOLIZE --automake" -$LIBTOOLIZE --automake || exit 1 -echo " autoheader" -autoheader || exit 1 -echo " $AUTOMAKE --add-missing $AUTOMAKE_FLAGS" -$AUTOMAKE --add-missing $AUTOMAKE_FLAGS || exit 1 -echo " autoconf" -autoconf || exit 1 - -cd $olddir -$srcdir/configure --enable-maintainer-mode "$@" && echo diff --git a/wolf3d/newCode/Tremor/backends.h b/wolf3d/newCode/Tremor/backends.h deleted file mode 100644 index 50c1c45..0000000 --- a/wolf3d/newCode/Tremor/backends.h +++ /dev/null @@ -1,130 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: backend and mapping structures - - ********************************************************************/ - -/* this is exposed up here because we need it for static modes. - Lookups for each backend aren't exposed because there's no reason - to do so */ - -#ifndef _vorbis_backend_h_ -#define _vorbis_backend_h_ - -#include "codec_internal.h" - -/* this would all be simpler/shorter with templates, but.... */ -/* Transform backend generic *************************************/ - -/* only mdct right now. Flesh it out more if we ever transcend mdct - in the transform domain */ - -/* Floor backend generic *****************************************/ -typedef struct{ - vorbis_info_floor *(*unpack)(vorbis_info *,oggpack_buffer *); - vorbis_look_floor *(*look) (vorbis_dsp_state *,vorbis_info_mode *, - vorbis_info_floor *); - void (*free_info) (vorbis_info_floor *); - void (*free_look) (vorbis_look_floor *); - void *(*inverse1) (struct vorbis_block *,vorbis_look_floor *); - int (*inverse2) (struct vorbis_block *,vorbis_look_floor *, - void *buffer,ogg_int32_t *); -} vorbis_func_floor; - -typedef struct{ - int order; - long rate; - long barkmap; - - int ampbits; - int ampdB; - - int numbooks; /* <= 16 */ - int books[16]; - -} vorbis_info_floor0; - -#define VIF_POSIT 63 -#define VIF_CLASS 16 -#define VIF_PARTS 31 -typedef struct{ - int partitions; /* 0 to 31 */ - int partitionclass[VIF_PARTS]; /* 0 to 15 */ - - int class_dim[VIF_CLASS]; /* 1 to 8 */ - int class_subs[VIF_CLASS]; /* 0,1,2,3 (bits: 1< -#include -#include "ogg.h" - -static unsigned long mask[]= -{0x00000000,0x00000001,0x00000003,0x00000007,0x0000000f, - 0x0000001f,0x0000003f,0x0000007f,0x000000ff,0x000001ff, - 0x000003ff,0x000007ff,0x00000fff,0x00001fff,0x00003fff, - 0x00007fff,0x0000ffff,0x0001ffff,0x0003ffff,0x0007ffff, - 0x000fffff,0x001fffff,0x003fffff,0x007fffff,0x00ffffff, - 0x01ffffff,0x03ffffff,0x07ffffff,0x0fffffff,0x1fffffff, - 0x3fffffff,0x7fffffff,0xffffffff }; - -/* mark read process as having run off the end */ -static void _adv_halt(oggpack_buffer *b){ - b->headptr=b->head->buffer->data+b->head->begin+b->head->length; - b->headend=-1; - b->headbit=0; -} - -/* spans forward, skipping as many bytes as headend is negative; if - headend is zero, simply finds next byte. If we're up to the end - of the buffer, leaves headend at zero. If we've read past the end, - halt the decode process. */ -static void _span(oggpack_buffer *b){ - while(b->headend<1){ - if(b->head->next){ - b->count+=b->head->length; - b->head=b->head->next; - b->headptr=b->head->buffer->data+b->head->begin-b->headend; - b->headend+=b->head->length; - }else{ - /* we've either met the end of decode, or gone past it. halt - only if we're past */ - if(b->headend<0 || b->headbit) - /* read has fallen off the end */ - _adv_halt(b); - - break; - } - } -} - -void oggpack_readinit(oggpack_buffer *b,ogg_reference *r){ - memset(b,0,sizeof(*b)); - - b->tail=b->head=r; - b->count=0; - b->headptr=b->head->buffer->data+b->head->begin; - b->headend=b->head->length; - _span(b); -} - -#define _lookspan() while(!end){\ - head=head->next;\ - if(!head) return -1;\ - ptr=head->buffer->data + head->begin;\ - end=head->length;\ - } - -/* Read in bits without advancing the bitptr; bits <= 32 */ -long oggpack_look(oggpack_buffer *b,int bits){ - unsigned long m=mask[bits]; - unsigned long ret=-1; - - bits+=b->headbit; - - if(bits >= b->headend<<3){ - int end=b->headend; - unsigned char *ptr=b->headptr; - ogg_reference *head=b->head; - - if(end<0)return -1; - - if(bits){ - _lookspan(); - ret=*ptr++>>b->headbit; - if(bits>8){ - --end; - _lookspan(); - ret|=*ptr++<<(8-b->headbit); - if(bits>16){ - --end; - _lookspan(); - ret|=*ptr++<<(16-b->headbit); - if(bits>24){ - --end; - _lookspan(); - ret|=*ptr++<<(24-b->headbit); - if(bits>32 && b->headbit){ - --end; - _lookspan(); - ret|=*ptr<<(32-b->headbit); - } - } - } - } - } - - }else{ - - /* make this a switch jump-table */ - ret=b->headptr[0]>>b->headbit; - if(bits>8){ - ret|=b->headptr[1]<<(8-b->headbit); - if(bits>16){ - ret|=b->headptr[2]<<(16-b->headbit); - if(bits>24){ - ret|=b->headptr[3]<<(24-b->headbit); - if(bits>32 && b->headbit) - ret|=b->headptr[4]<<(32-b->headbit); - } - } - } - } - - ret&=m; - return ret; -} - -/* limited to 32 at a time */ -void oggpack_adv(oggpack_buffer *b,int bits){ - bits+=b->headbit; - b->headbit=bits&7; - b->headptr+=bits/8; - if((b->headend-=bits/8)<1)_span(b); -} - -/* spans forward and finds next byte. Never halts */ -static void _span_one(oggpack_buffer *b){ - while(b->headend<1){ - if(b->head->next){ - b->count+=b->head->length; - b->head=b->head->next; - b->headptr=b->head->buffer->data+b->head->begin; - b->headend=b->head->length; - }else - break; - } -} - -static int _halt_one(oggpack_buffer *b){ - if(b->headend<1){ - _adv_halt(b); - return -1; - } - return 0; -} - -int oggpack_eop(oggpack_buffer *b){ - if(b->headend<0)return -1; - return 0; -} - -/* bits <= 32 */ -long oggpack_read(oggpack_buffer *b,int bits){ - unsigned long m=mask[bits]; - ogg_uint32_t ret=-1; - - bits+=b->headbit; - - if(bits >= b->headend<<3){ - - if(b->headend<0)return -1; - - if(bits){ - if (_halt_one(b)) return -1; - ret=*b->headptr>>b->headbit; - - if(bits>=8){ - ++b->headptr; - --b->headend; - _span_one(b); - if(bits>8){ - if (_halt_one(b)) return -1; - ret|=*b->headptr<<(8-b->headbit); - - if(bits>=16){ - ++b->headptr; - --b->headend; - _span_one(b); - if(bits>16){ - if (_halt_one(b)) return -1; - ret|=*b->headptr<<(16-b->headbit); - - if(bits>=24){ - ++b->headptr; - --b->headend; - _span_one(b); - if(bits>24){ - if (_halt_one(b)) return -1; - ret|=*b->headptr<<(24-b->headbit); - - if(bits>=32){ - ++b->headptr; - --b->headend; - _span_one(b); - if(bits>32){ - if (_halt_one(b)) return -1; - if(b->headbit)ret|=*b->headptr<<(32-b->headbit); - - } - } - } - } - } - } - } - } - } - }else{ - - ret=b->headptr[0]>>b->headbit; - if(bits>8){ - ret|=b->headptr[1]<<(8-b->headbit); - if(bits>16){ - ret|=b->headptr[2]<<(16-b->headbit); - if(bits>24){ - ret|=b->headptr[3]<<(24-b->headbit); - if(bits>32 && b->headbit){ - ret|=b->headptr[4]<<(32-b->headbit); - } - } - } - } - - b->headptr+=bits/8; - b->headend-=bits/8; - } - - ret&=m; - b->headbit=bits&7; - return ret; -} - -long oggpack_bytes(oggpack_buffer *b){ - return(b->count+b->headptr-b->head->buffer->data-b->head->begin+ - (b->headbit+7)/8); -} - -long oggpack_bits(oggpack_buffer *b){ - return((b->count+b->headptr-b->head->buffer->data-b->head->begin)*8+ - b->headbit); -} - diff --git a/wolf3d/newCode/Tremor/block.c b/wolf3d/newCode/Tremor/block.c deleted file mode 100644 index 8949253..0000000 --- a/wolf3d/newCode/Tremor/block.c +++ /dev/null @@ -1,453 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: PCM data vector blocking, windowing and dis/reassembly - - ********************************************************************/ - -#include -#include -#include -#include "ogg.h" -#include "ivorbiscodec.h" -#include "codec_internal.h" - -#include "window.h" -#include "registry.h" -#include "misc.h" - -static int ilog(unsigned int v){ - int ret=0; - if(v)--v; - while(v){ - ret++; - v>>=1; - } - return(ret); -} - -/* pcm accumulator examples (not exhaustive): - - <-------------- lW ----------------> - <--------------- W ----------------> -: .....|..... _______________ | -: .''' | '''_--- | |\ | -:.....''' |_____--- '''......| | \_______| -:.................|__________________|_______|__|______| - |<------ Sl ------>| > Sr < |endW - |beginSl |endSl | |endSr - |beginW |endlW |beginSr - - - |< lW >| - <--------------- W ----------------> - | | .. ______________ | - | | ' `/ | ---_ | - |___.'___/`. | ---_____| - |_______|__|_______|_________________| - | >|Sl|< |<------ Sr ----->|endW - | | |endSl |beginSr |endSr - |beginW | |endlW - mult[0] |beginSl mult[n] - - <-------------- lW -----------------> - |<--W-->| -: .............. ___ | | -: .''' |`/ \ | | -:.....''' |/`....\|...| -:.........................|___|___|___| - |Sl |Sr |endW - | | |endSr - | |beginSr - | |endSl - |beginSl - |beginW -*/ - -/* block abstraction setup *********************************************/ - -#ifndef WORD_ALIGN -#define WORD_ALIGN 8 -#endif - -int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb){ - memset(vb,0,sizeof(*vb)); - vb->vd=v; - vb->localalloc=0; - vb->localstore=NULL; - - return(0); -} - -void *_vorbis_block_alloc(vorbis_block *vb,long bytes){ - bytes=(bytes+(WORD_ALIGN-1)) & ~(WORD_ALIGN-1); - if(bytes+vb->localtop>vb->localalloc){ - /* can't just _ogg_realloc... there are outstanding pointers */ - if(vb->localstore){ - struct alloc_chain *link=(struct alloc_chain *)_ogg_malloc(sizeof(*link)); - vb->totaluse+=vb->localtop; - link->next=vb->reap; - link->ptr=vb->localstore; - vb->reap=link; - } - /* highly conservative */ - vb->localalloc=bytes; - vb->localstore=_ogg_malloc(vb->localalloc); - vb->localtop=0; - } - { - void *ret=(void *)(((char *)vb->localstore)+vb->localtop); - vb->localtop+=bytes; - return ret; - } -} - -/* reap the chain, pull the ripcord */ -void _vorbis_block_ripcord(vorbis_block *vb){ - /* reap the chain */ - struct alloc_chain *reap=vb->reap; - while(reap){ - struct alloc_chain *next=reap->next; - _ogg_free(reap->ptr); - memset(reap,0,sizeof(*reap)); - _ogg_free(reap); - reap=next; - } - /* consolidate storage */ - if(vb->totaluse){ - vb->localstore=_ogg_realloc(vb->localstore,vb->totaluse+vb->localalloc); - vb->localalloc+=vb->totaluse; - vb->totaluse=0; - } - - /* pull the ripcord */ - vb->localtop=0; - vb->reap=NULL; -} - -int vorbis_block_clear(vorbis_block *vb){ - _vorbis_block_ripcord(vb); - if(vb->localstore)_ogg_free(vb->localstore); - - memset(vb,0,sizeof(*vb)); - return(0); -} - -static int _vds_init(vorbis_dsp_state *v,vorbis_info *vi){ - int i; - codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; - private_state *b=NULL; - - memset(v,0,sizeof(*v)); - b=(private_state *)(v->backend_state=_ogg_calloc(1,sizeof(*b))); - - v->vi=vi; - b->modebits=ilog(ci->modes); - - /* Vorbis I uses only window type 0 */ - b->window[0]=_vorbis_window(0,ci->blocksizes[0]/2); - b->window[1]=_vorbis_window(0,ci->blocksizes[1]/2); - - /* finish the codebooks */ - if(!ci->fullbooks){ - ci->fullbooks=(codebook *)_ogg_calloc(ci->books,sizeof(*ci->fullbooks)); - for(i=0;ibooks;i++){ - vorbis_book_init_decode(ci->fullbooks+i,ci->book_param[i]); - /* decode codebooks are now standalone after init */ - vorbis_staticbook_destroy(ci->book_param[i]); - ci->book_param[i]=NULL; - } - } - - v->pcm_storage=ci->blocksizes[1]; - v->pcm=(ogg_int32_t **)_ogg_malloc(vi->channels*sizeof(*v->pcm)); - v->pcmret=(ogg_int32_t **)_ogg_malloc(vi->channels*sizeof(*v->pcmret)); - for(i=0;ichannels;i++) - v->pcm[i]=(ogg_int32_t *)_ogg_calloc(v->pcm_storage,sizeof(*v->pcm[i])); - - /* all 1 (large block) or 0 (small block) */ - /* explicitly set for the sake of clarity */ - v->lW=0; /* previous window size */ - v->W=0; /* current window size */ - - /* initialize all the mapping/backend lookups */ - b->mode=(vorbis_look_mapping **)_ogg_calloc(ci->modes,sizeof(*b->mode)); - for(i=0;imodes;i++){ - int mapnum=ci->mode_param[i]->mapping; - int maptype=ci->map_type[mapnum]; - b->mode[i]=_mapping_P[maptype]->look(v,ci->mode_param[i], - ci->map_param[mapnum]); - } - return(0); -} - -int vorbis_synthesis_restart(vorbis_dsp_state *v){ - vorbis_info *vi=v->vi; - codec_setup_info *ci; - - if(!v->backend_state)return -1; - if(!vi)return -1; - ci=vi->codec_setup; - if(!ci)return -1; - - v->centerW=ci->blocksizes[1]/2; - v->pcm_current=v->centerW; - - v->pcm_returned=-1; - v->granulepos=-1; - v->sequence=-1; - ((private_state *)(v->backend_state))->sample_count=-1; - - return(0); -} - -int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi){ - _vds_init(v,vi); - vorbis_synthesis_restart(v); - - return(0); -} - -void vorbis_dsp_clear(vorbis_dsp_state *v){ - int i; - if(v){ - vorbis_info *vi=v->vi; - codec_setup_info *ci=(codec_setup_info *)(vi?vi->codec_setup:NULL); - private_state *b=(private_state *)v->backend_state; - - if(v->pcm){ - for(i=0;ichannels;i++) - if(v->pcm[i])_ogg_free(v->pcm[i]); - _ogg_free(v->pcm); - if(v->pcmret)_ogg_free(v->pcmret); - } - - /* free mode lookups; these are actually vorbis_look_mapping structs */ - if(ci){ - for(i=0;imodes;i++){ - int mapnum=ci->mode_param[i]->mapping; - int maptype=ci->map_type[mapnum]; - if(b && b->mode)_mapping_P[maptype]->free_look(b->mode[i]); - } - } - - if(b){ - if(b->mode)_ogg_free(b->mode); - _ogg_free(b); - } - - memset(v,0,sizeof(*v)); - } -} - -/* Unlike in analysis, the window is only partially applied for each - block. The time domain envelope is not yet handled at the point of - calling (as it relies on the previous block). */ - -int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){ - vorbis_info *vi=v->vi; - codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; - private_state *b=v->backend_state; - int i,j; - - if(v->pcm_current>v->pcm_returned && v->pcm_returned!=-1)return(OV_EINVAL); - - v->lW=v->W; - v->W=vb->W; - v->nW=-1; - - if((v->sequence==-1)|| - (v->sequence+1 != vb->sequence)){ - v->granulepos=-1; /* out of sequence; lose count */ - b->sample_count=-1; - } - - v->sequence=vb->sequence; - - if(vb->pcm){ /* no pcm to process if vorbis_synthesis_trackonly - was called on block */ - int n=ci->blocksizes[v->W]/2; - int n0=ci->blocksizes[0]/2; - int n1=ci->blocksizes[1]/2; - - int thisCenter; - int prevCenter; - - if(v->centerW){ - thisCenter=n1; - prevCenter=0; - }else{ - thisCenter=0; - prevCenter=n1; - } - - /* v->pcm is now used like a two-stage double buffer. We don't want - to have to constantly shift *or* adjust memory usage. Don't - accept a new block until the old is shifted out */ - - /* overlap/add PCM */ - - for(j=0;jchannels;j++){ - /* the overlap/add section */ - if(v->lW){ - if(v->W){ - /* large/large */ - ogg_int32_t *pcm=v->pcm[j]+prevCenter; - ogg_int32_t *p=vb->pcm[j]; - for(i=0;ipcm[j]+prevCenter+n1/2-n0/2; - ogg_int32_t *p=vb->pcm[j]; - for(i=0;iW){ - /* small/large */ - ogg_int32_t *pcm=v->pcm[j]+prevCenter; - ogg_int32_t *p=vb->pcm[j]+n1/2-n0/2; - for(i=0;ipcm[j]+prevCenter; - ogg_int32_t *p=vb->pcm[j]; - for(i=0;ipcm[j]+thisCenter; - ogg_int32_t *p=vb->pcm[j]+n; - for(i=0;icenterW) - v->centerW=0; - else - v->centerW=n1; - - /* deal with initial packet state; we do this using the explicit - pcm_returned==-1 flag otherwise we're sensitive to first block - being short or long */ - - if(v->pcm_returned==-1){ - v->pcm_returned=thisCenter; - v->pcm_current=thisCenter; - }else{ - v->pcm_returned=prevCenter; - v->pcm_current=prevCenter+ - ci->blocksizes[v->lW]/4+ - ci->blocksizes[v->W]/4; - } - - } - - /* track the frame number... This is for convenience, but also - making sure our last packet doesn't end with added padding. If - the last packet is partial, the number of samples we'll have to - return will be past the vb->granulepos. - - This is not foolproof! It will be confused if we begin - decoding at the last page after a seek or hole. In that case, - we don't have a starting point to judge where the last frame - is. For this reason, vorbisfile will always try to make sure - it reads the last two marked pages in proper sequence */ - - if(b->sample_count==-1){ - b->sample_count=0; - }else{ - b->sample_count+=ci->blocksizes[v->lW]/4+ci->blocksizes[v->W]/4; - } - - if(v->granulepos==-1){ - if(vb->granulepos!=-1){ /* only set if we have a position to set to */ - - v->granulepos=vb->granulepos; - - /* is this a short page? */ - if(b->sample_count>v->granulepos){ - /* corner case; if this is both the first and last audio page, - then spec says the end is cut, not beginning */ - if(vb->eofflag){ - /* trim the end */ - /* no preceeding granulepos; assume we started at zero (we'd - have to in a short single-page stream) */ - /* granulepos could be -1 due to a seek, but that would result - in a long coun`t, not short count */ - - v->pcm_current-=(b->sample_count-v->granulepos); - }else{ - /* trim the beginning */ - v->pcm_returned+=(b->sample_count-v->granulepos); - if(v->pcm_returned>v->pcm_current) - v->pcm_returned=v->pcm_current; - } - - } - - } - }else{ - v->granulepos+=ci->blocksizes[v->lW]/4+ci->blocksizes[v->W]/4; - if(vb->granulepos!=-1 && v->granulepos!=vb->granulepos){ - - if(v->granulepos>vb->granulepos){ - long extra=v->granulepos-vb->granulepos; - - if(extra) - if(vb->eofflag){ - /* partial last frame. Strip the extra samples off */ - v->pcm_current-=extra; - } /* else {Shouldn't happen *unless* the bitstream is out of - spec. Either way, believe the bitstream } */ - } /* else {Shouldn't happen *unless* the bitstream is out of - spec. Either way, believe the bitstream } */ - v->granulepos=vb->granulepos; - } - } - - /* Update, cleanup */ - - if(vb->eofflag)v->eofflag=1; - return(0); -} - -/* pcm==NULL indicates we just want the pending samples, no more */ -int vorbis_synthesis_pcmout(vorbis_dsp_state *v,ogg_int32_t ***pcm){ - vorbis_info *vi=v->vi; - if(v->pcm_returned>-1 && v->pcm_returnedpcm_current){ - if(pcm){ - int i; - for(i=0;ichannels;i++) - v->pcmret[i]=v->pcm[i]+v->pcm_returned; - *pcm=v->pcmret; - } - return(v->pcm_current-v->pcm_returned); - } - return(0); -} - -int vorbis_synthesis_read(vorbis_dsp_state *v,int bytes){ - if(bytes && v->pcm_returned+bytes>v->pcm_current)return(OV_EINVAL); - v->pcm_returned+=bytes; - return(0); -} - diff --git a/wolf3d/newCode/Tremor/block.h b/wolf3d/newCode/Tremor/block.h deleted file mode 100644 index 5e19354..0000000 --- a/wolf3d/newCode/Tremor/block.h +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2008 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: shared block functions - - ********************************************************************/ - -#ifndef _V_BLOCK_ -#define _V_BLOCK_ - -extern void _vorbis_block_ripcord(vorbis_block *vb); -extern void *_vorbis_block_alloc(vorbis_block *vb,long bytes); - -#endif diff --git a/wolf3d/newCode/Tremor/codebook.c b/wolf3d/newCode/Tremor/codebook.c deleted file mode 100644 index d055870..0000000 --- a/wolf3d/newCode/Tremor/codebook.c +++ /dev/null @@ -1,371 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: basic codebook pack/unpack/code/decode operations - - ********************************************************************/ - -#include -#include -#include -#include "ogg.h" -#include "ivorbiscodec.h" -#include "codebook.h" -#include "misc.h" - -/* unpacks a codebook from the packet buffer into the codebook struct, - readies the codebook auxiliary structures for decode *************/ -int vorbis_staticbook_unpack(oggpack_buffer *opb,static_codebook *s){ - long i,j; - memset(s,0,sizeof(*s)); - - /* make sure alignment is correct */ - if(oggpack_read(opb,24)!=0x564342)goto _eofout; - - /* first the basic parameters */ - s->dim=oggpack_read(opb,16); - s->entries=oggpack_read(opb,24); - if(s->entries==-1)goto _eofout; - - /* codeword ordering.... length ordered or unordered? */ - switch((int)oggpack_read(opb,1)){ - case 0: - /* unordered */ - s->lengthlist=(long *)_ogg_malloc(sizeof(*s->lengthlist)*s->entries); - - /* allocated but unused entries? */ - if(oggpack_read(opb,1)){ - /* yes, unused entries */ - - for(i=0;ientries;i++){ - if(oggpack_read(opb,1)){ - long num=oggpack_read(opb,5); - if(num==-1)goto _eofout; - s->lengthlist[i]=num+1; - }else - s->lengthlist[i]=0; - } - }else{ - /* all entries used; no tagging */ - for(i=0;ientries;i++){ - long num=oggpack_read(opb,5); - if(num==-1)goto _eofout; - s->lengthlist[i]=num+1; - } - } - - break; - case 1: - /* ordered */ - { - long length=oggpack_read(opb,5)+1; - s->lengthlist=(long *)_ogg_malloc(sizeof(*s->lengthlist)*s->entries); - - for(i=0;ientries;){ - long num=oggpack_read(opb,_ilog(s->entries-i)); - if(num==-1)goto _eofout; - for(j=0;jentries;j++,i++) - s->lengthlist[i]=length; - length++; - } - } - break; - default: - /* EOF */ - return(-1); - } - - /* Do we have a mapping to unpack? */ - switch((s->maptype=oggpack_read(opb,4))){ - case 0: - /* no mapping */ - break; - case 1: case 2: - /* implicitly populated value mapping */ - /* explicitly populated value mapping */ - - s->q_min=oggpack_read(opb,32); - s->q_delta=oggpack_read(opb,32); - s->q_quant=oggpack_read(opb,4)+1; - s->q_sequencep=oggpack_read(opb,1); - - { - int quantvals=0; - switch(s->maptype){ - case 1: - quantvals=_book_maptype1_quantvals(s); - break; - case 2: - quantvals=s->entries*s->dim; - break; - } - - /* quantized values */ - s->quantlist=(long *)_ogg_malloc(sizeof(*s->quantlist)*quantvals); - for(i=0;iquantlist[i]=oggpack_read(opb,s->q_quant); - - if(quantvals&&s->quantlist[quantvals-1]==-1)goto _eofout; - } - break; - default: - goto _errout; - } - - /* all set */ - return(0); - - _errout: - _eofout: - vorbis_staticbook_clear(s); - return(-1); -} - -/* the 'eliminate the decode tree' optimization actually requires the - codewords to be MSb first, not LSb. This is an annoying inelegancy - (and one of the first places where carefully thought out design - turned out to be wrong; Vorbis II and future Ogg codecs should go - to an MSb bitpacker), but not actually the huge hit it appears to - be. The first-stage decode table catches most words so that - bitreverse is not in the main execution path. */ - -static ogg_uint32_t bitreverse(ogg_uint32_t x){ - x= ((x>>16)&0x0000ffff) | ((x<<16)&0xffff0000); - x= ((x>> 8)&0x00ff00ff) | ((x<< 8)&0xff00ff00); - x= ((x>> 4)&0x0f0f0f0f) | ((x<< 4)&0xf0f0f0f0); - x= ((x>> 2)&0x33333333) | ((x<< 2)&0xcccccccc); - return((x>> 1)&0x55555555) | ((x<< 1)&0xaaaaaaaa); -} - -STIN long decode_packed_entry_number(codebook *book, - oggpack_buffer *b){ - int read=book->dec_maxlength; - long lo,hi; - long lok = oggpack_look(b,book->dec_firsttablen); - - if (lok >= 0) { - long entry = book->dec_firsttable[lok]; - if(entry&0x80000000UL){ - lo=(entry>>15)&0x7fff; - hi=book->used_entries-(entry&0x7fff); - }else{ - oggpack_adv(b, book->dec_codelengths[entry-1]); - return(entry-1); - } - }else{ - lo=0; - hi=book->used_entries; - } - - lok = oggpack_look(b, read); - - while(lok<0 && read>1) - lok = oggpack_look(b, --read); - - if(lok<0){ - oggpack_adv(b,1); /* force eop */ - return -1; - } - - /* bisect search for the codeword in the ordered list */ - { - ogg_uint32_t testword=bitreverse((ogg_uint32_t)lok); - - while(hi-lo>1){ - long p=(hi-lo)>>1; - long test=book->codelist[lo+p]>testword; - lo+=p&(test-1); - hi-=p&(-test); - } - - if(book->dec_codelengths[lo]<=read){ - oggpack_adv(b, book->dec_codelengths[lo]); - return(lo); - } - } - - oggpack_adv(b, read+1); - return(-1); -} - -/* Decode side is specced and easier, because we don't need to find - matches using different criteria; we simply read and map. There are - two things we need to do 'depending': - - We may need to support interleave. We don't really, but it's - convenient to do it here rather than rebuild the vector later. - - Cascades may be additive or multiplicitive; this is not inherent in - the codebook, but set in the code using the codebook. Like - interleaving, it's easiest to do it here. - addmul==0 -> declarative (set the value) - addmul==1 -> additive - addmul==2 -> multiplicitive */ - -/* returns the [original, not compacted] entry number or -1 on eof *********/ -long vorbis_book_decode(codebook *book, oggpack_buffer *b){ - if(book->used_entries>0){ - long packed_entry=decode_packed_entry_number(book,b); - if(packed_entry>=0) - return(book->dec_index[packed_entry]); - } - - /* if there's no dec_index, the codebook unpacking isn't collapsed */ - return(-1); -} - -/* returns 0 on OK or -1 on eof *************************************/ -long vorbis_book_decodevs_add(codebook *book,ogg_int32_t *a, - oggpack_buffer *b,int n,int point){ - if(book->used_entries>0){ - int step=n/book->dim; - long *entry = (long *)alloca(sizeof(*entry)*step); - ogg_int32_t **t = (ogg_int32_t **)alloca(sizeof(*t)*step); - int i,j,o; - int shift=point-book->binarypoint; - - if(shift>=0){ - for (i = 0; i < step; i++) { - entry[i]=decode_packed_entry_number(book,b); - if(entry[i]==-1)return(-1); - t[i] = book->valuelist+entry[i]*book->dim; - } - for(i=0,o=0;idim;i++,o+=step) - for (j=0;j>shift; - }else{ - for (i = 0; i < step; i++) { - entry[i]=decode_packed_entry_number(book,b); - if(entry[i]==-1)return(-1); - t[i] = book->valuelist+entry[i]*book->dim; - } - for(i=0,o=0;idim;i++,o+=step) - for (j=0;jused_entries>0){ - int i,j,entry; - ogg_int32_t *t; - int shift=point-book->binarypoint; - - if(shift>=0){ - for(i=0;ivaluelist+entry*book->dim; - for (j=0;jdim;) - a[i++]+=t[j++]>>shift; - } - }else{ - for(i=0;ivaluelist+entry*book->dim; - for (j=0;jdim;) - a[i++]+=t[j++]<<-shift; - } - } - } - return(0); -} - -long vorbis_book_decodev_set(codebook *book,ogg_int32_t *a, - oggpack_buffer *b,int n,int point){ - if(book->used_entries>0){ - int i,j,entry; - ogg_int32_t *t; - int shift=point-book->binarypoint; - - if(shift>=0){ - - for(i=0;ivaluelist+entry*book->dim; - for (j=0;jdim;){ - a[i++]=t[j++]>>shift; - } - } - }else{ - - for(i=0;ivaluelist+entry*book->dim; - for (j=0;jdim;){ - a[i++]=t[j++]<<-shift; - } - } - } - }else{ - - int i,j; - for(i=0;idim;){ - a[i++]=0; - } - } - } - return(0); -} - -long vorbis_book_decodevv_add(codebook *book,ogg_int32_t **a,\ - long offset,int ch, - oggpack_buffer *b,int n,int point){ - if(book->used_entries>0){ - long i,j,entry; - int chptr=0; - int shift=point-book->binarypoint; - - if(shift>=0){ - - for(i=offset;ivaluelist+entry*book->dim; - for (j=0;jdim;j++){ - a[chptr++][i]+=t[j]>>shift; - if(chptr==ch){ - chptr=0; - i++; - } - } - } - } - }else{ - - for(i=offset;ivaluelist+entry*book->dim; - for (j=0;jdim;j++){ - a[chptr++][i]+=t[j]<<-shift; - if(chptr==ch){ - chptr=0; - i++; - } - } - } - } - } - } - return(0); -} diff --git a/wolf3d/newCode/Tremor/codebook.h b/wolf3d/newCode/Tremor/codebook.h deleted file mode 100644 index 14f6538..0000000 --- a/wolf3d/newCode/Tremor/codebook.h +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: basic shared codebook operations - - ********************************************************************/ - -#ifndef _V_CODEBOOK_H_ -#define _V_CODEBOOK_H_ - -#include "ogg.h" - -/* This structure encapsulates huffman and VQ style encoding books; it - doesn't do anything specific to either. - - valuelist/quantlist are nonNULL (and q_* significant) only if - there's entry->value mapping to be done. - - If encode-side mapping must be done (and thus the entry needs to be - hunted), the auxiliary encode pointer will point to a decision - tree. This is true of both VQ and huffman, but is mostly useful - with VQ. - -*/ - -typedef struct static_codebook{ - long dim; /* codebook dimensions (elements per vector) */ - long entries; /* codebook entries */ - long *lengthlist; /* codeword lengths in bits */ - - /* mapping ***************************************************************/ - int maptype; /* 0=none - 1=implicitly populated values from map column - 2=listed arbitrary values */ - - /* The below does a linear, single monotonic sequence mapping. */ - long q_min; /* packed 32 bit float; quant value 0 maps to minval */ - long q_delta; /* packed 32 bit float; val 1 - val 0 == delta */ - int q_quant; /* bits: 0 < quant <= 16 */ - int q_sequencep; /* bitflag */ - - long *quantlist; /* map == 1: (int)(entries^(1/dim)) element column map - map == 2: list of dim*entries quantized entry vals - */ -} static_codebook; - -typedef struct codebook{ - long dim; /* codebook dimensions (elements per vector) */ - long entries; /* codebook entries */ - long used_entries; /* populated codebook entries */ - - /* the below are ordered by bitreversed codeword and only used - entries are populated */ - int binarypoint; - ogg_int32_t *valuelist; /* list of dim*entries actual entry values */ - ogg_uint32_t *codelist; /* list of bitstream codewords for each entry */ - - int *dec_index; - char *dec_codelengths; - ogg_uint32_t *dec_firsttable; - int dec_firsttablen; - int dec_maxlength; - - long q_min; /* packed 32 bit float; quant value 0 maps to minval */ - long q_delta; /* packed 32 bit float; val 1 - val 0 == delta */ - -} codebook; - -extern void vorbis_staticbook_clear(static_codebook *b); -extern void vorbis_staticbook_destroy(static_codebook *b); -extern int vorbis_book_init_decode(codebook *dest,const static_codebook *source); - -extern void vorbis_book_clear(codebook *b); -extern long _book_maptype1_quantvals(const static_codebook *b); - -extern int vorbis_staticbook_unpack(oggpack_buffer *b,static_codebook *c); - -extern long vorbis_book_decode(codebook *book, oggpack_buffer *b); -extern long vorbis_book_decodevs_add(codebook *book, ogg_int32_t *a, - oggpack_buffer *b,int n,int point); -extern long vorbis_book_decodev_set(codebook *book, ogg_int32_t *a, - oggpack_buffer *b,int n,int point); -extern long vorbis_book_decodev_add(codebook *book, ogg_int32_t *a, - oggpack_buffer *b,int n,int point); -extern long vorbis_book_decodevv_add(codebook *book, ogg_int32_t **a, - long off,int ch, - oggpack_buffer *b,int n,int point); - -extern int _ilog(unsigned int v); - - -#endif diff --git a/wolf3d/newCode/Tremor/codec_internal.h b/wolf3d/newCode/Tremor/codec_internal.h deleted file mode 100644 index 3ca7f54..0000000 --- a/wolf3d/newCode/Tremor/codec_internal.h +++ /dev/null @@ -1,92 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: libvorbis codec headers - - ********************************************************************/ - -#ifndef _V_CODECI_H_ -#define _V_CODECI_H_ - -#include "codebook.h" - -typedef void vorbis_look_mapping; -typedef void vorbis_look_floor; -typedef void vorbis_look_residue; -typedef void vorbis_look_transform; - -/* mode ************************************************************/ -typedef struct { - int blockflag; - int windowtype; - int transformtype; - int mapping; -} vorbis_info_mode; - -typedef void vorbis_info_floor; -typedef void vorbis_info_residue; -typedef void vorbis_info_mapping; - -typedef struct private_state { - /* local lookup storage */ - const void *window[2]; - - /* backend lookups are tied to the mode, not the backend or naked mapping */ - int modebits; - vorbis_look_mapping **mode; - - ogg_int64_t sample_count; - -} private_state; - -/* codec_setup_info contains all the setup information specific to the - specific compression/decompression mode in progress (eg, - psychoacoustic settings, channel setup, options, codebook - etc). -*********************************************************************/ - -typedef struct codec_setup_info { - - /* Vorbis supports only short and long blocks, but allows the - encoder to choose the sizes */ - - long blocksizes[2]; - - /* modes are the primary means of supporting on-the-fly different - blocksizes, different channel mappings (LR or M/A), - different residue backends, etc. Each mode consists of a - blocksize flag and a mapping (along with the mapping setup */ - - int modes; - int maps; - int times; - int floors; - int residues; - int books; - - vorbis_info_mode *mode_param[64]; - int map_type[64]; - vorbis_info_mapping *map_param[64]; - int time_type[64]; - int floor_type[64]; - vorbis_info_floor *floor_param[64]; - int residue_type[64]; - vorbis_info_residue *residue_param[64]; - static_codebook *book_param[256]; - codebook *fullbooks; - - int passlimit[32]; /* iteration limit per couple/quant pass */ - int coupling_passes; -} codec_setup_info; - -#endif diff --git a/wolf3d/newCode/Tremor/config_types.h b/wolf3d/newCode/Tremor/config_types.h deleted file mode 100644 index 1fdcb27..0000000 --- a/wolf3d/newCode/Tremor/config_types.h +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: #ifdef jail to whip a few platforms into the UNIX ideal. - - ********************************************************************/ -#ifndef _OS_CVTYPES_H -#define _OS_CVTYPES_H - -typedef long long ogg_int64_t; -typedef int ogg_int32_t; -typedef unsigned int ogg_uint32_t; -typedef short ogg_int16_t; - -#endif diff --git a/wolf3d/newCode/Tremor/configure.in b/wolf3d/newCode/Tremor/configure.in deleted file mode 100644 index 2b44ee4..0000000 --- a/wolf3d/newCode/Tremor/configure.in +++ /dev/null @@ -1,131 +0,0 @@ -dnl Process this file with autoconf to produce a configure script - -dnl ------------------------------------------------ -dnl Initialization and Versioning -dnl ------------------------------------------------ - -AC_INIT(mdct.c) - -AC_CANONICAL_HOST -AC_CANONICAL_TARGET - -AM_CONFIG_HEADER([config.h]) - -AM_INIT_AUTOMAKE(libvorbisidec,1.2.0) - -dnl Library versioning - -V_LIB_CURRENT=1 -V_LIB_REVISION=2 -V_LIB_AGE=0 -AC_SUBST(V_LIB_CURRENT) -AC_SUBST(V_LIB_REVISION) -AC_SUBST(V_LIB_AGE) - -dnl -------------------------------------------------- -dnl Check for programs -dnl -------------------------------------------------- - -dnl save $CFLAGS since AC_PROG_CC likes to insert "-g -O2" -dnl if $CFLAGS is blank -cflags_save="$CFLAGS" -AC_PROG_CC -AC_PROG_CPP -CFLAGS="$cflags_save" - -AM_PROG_LIBTOOL - -dnl -------------------------------------------------- -dnl Set build flags based on environment -dnl -------------------------------------------------- - -dnl Set some target options - -cflags_save="$CFLAGS" -ldflags_save="$LDFLAGS" -if test -z "$GCC"; then - case $host in - arm-*-*) - DEBUG="-g -D_ARM_ASSEM_" - CFLAGS="-O -D_ARM_ASSEM_" - PROFILE="-p -g -O -D_ARM_ASSEM_" ;; - *) - DEBUG="-g" - CFLAGS="-O" - PROFILE="-g -p" ;; - esac -else - - case $host in - arm-*-*) - DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -D_ARM_ASSEM_" - CFLAGS="-O2 -D_ARM_ASSEM_ -fsigned-char" - PROFILE="-W -pg -g -O2 -D_ARM_ASSEM_ -fsigned-char -fno-inline-functions";; - - *) - DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char" - CFLAGS="-O2 -Wall -fsigned-char" - PROFILE="-Wall -pg -g -O2 -fsigned-char -fno-inline-functions";; - esac -fi -CFLAGS="$CFLAGS $cflags_save -D_REENTRANT" -LDFLAGS="$LDFLAGS $ldflags_save" - - -# Test whenever ld supports -version-script -AC_PROG_LD -AC_PROG_LD_GNU -if test "x$lt_cv_prog_gnu_ld" = "xyes"; then - SHLIB_VERSION_ARG="Wl,--version-script=Version_script" - - dnl Set extra linker options - case "$target_os" in - linux* | solaris* ) - SHLIB_VERSION_ARG="-Wl,--version-script=Version_script" - ;; - *) - ;; - esac - LDFLAGS="$LDFLAGS $SHLIB_VERSION_ARG" -fi - -dnl -------------------------------------------------- -dnl Options -dnl -------------------------------------------------- - -AC_ARG_ENABLE( - low-accuracy, - [ --enable-low-accuracy enable 32 bit only multiply operations], - CFLAGS="$CFLAGS -D_LOW_ACCURACY_" -) - -dnl -------------------------------------------------- -dnl Check for headers -dnl -------------------------------------------------- - -AC_CHECK_HEADER(memory.h,CFLAGS="$CFLAGS -DUSE_MEMORY_H",:) - -dnl -------------------------------------------------- -dnl Check for typedefs, structures, etc -dnl -------------------------------------------------- - -dnl none - -dnl -------------------------------------------------- -dnl Check for library functions -dnl -------------------------------------------------- - -AC_FUNC_ALLOCA -AC_FUNC_MEMCMP - -dnl -------------------------------------------------- -dnl Do substitutions -dnl -------------------------------------------------- - -LIBS="$LIBS" - -AC_SUBST(LIBS) -AC_SUBST(DEBUG) -AC_SUBST(PROFILE) - -AC_OUTPUT(Makefile Version_script) diff --git a/wolf3d/newCode/Tremor/debian/Makefile.am b/wolf3d/newCode/Tremor/debian/Makefile.am deleted file mode 100644 index 45a0f01..0000000 --- a/wolf3d/newCode/Tremor/debian/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -## Process this file with automake to produce Makefile.in - -AUTOMAKE_OPTIONS = foreign - -EXTRA_DIST = changelog control copyright libvorbisidec1.install\ - libvorbisidec-dev.install rules diff --git a/wolf3d/newCode/Tremor/debian/changelog b/wolf3d/newCode/Tremor/debian/changelog deleted file mode 100644 index 0cb4935..0000000 --- a/wolf3d/newCode/Tremor/debian/changelog +++ /dev/null @@ -1,9 +0,0 @@ -libvorbisidec (1.2.0-1) unstable; urgency=low - - * Initial Release. - - -- Christopher L Cheney Wed, 09 Oct 2002 22:00:00 -0500 - -Local variables: -mode: debian-changelog -End: diff --git a/wolf3d/newCode/Tremor/debian/control b/wolf3d/newCode/Tremor/debian/control deleted file mode 100644 index f286e91..0000000 --- a/wolf3d/newCode/Tremor/debian/control +++ /dev/null @@ -1,22 +0,0 @@ -Source: libvorbisidec -Section: libs -Priority: optional -Maintainer: Christopher L Cheney -Build-Depends: autotools-dev, debhelper (>> 4.0.18), devscripts, gawk -Standards-Version: 3.5.7.0 - -Package: libvorbisidec1 -Architecture: any -Section: libs -Depends: ${shlibs:Depends} -Description: Ogg Bitstream Library - Libogg is a library for manipulating ogg bitstreams. It handles - both making ogg bitstreams and getting packets from ogg bitstreams. - -Package: libvorbisidec-dev -Architecture: any -Section: devel -Depends: libvorbisidec1 (= ${Source-Version}), libc6-dev -Description: Ogg Bitstream Library Development - The libogg-dev package contains the header files and documentation - needed to develop applications with libogg. diff --git a/wolf3d/newCode/Tremor/debian/copyright b/wolf3d/newCode/Tremor/debian/copyright deleted file mode 100644 index ef98ddd..0000000 --- a/wolf3d/newCode/Tremor/debian/copyright +++ /dev/null @@ -1,37 +0,0 @@ -This package was debianized by Christopher L Cheney on -Wed, 09 Oct 2002 22:00:00 -0500. - -It was downloaded from cvs. - -Upstream Author(s): Monty - -Copyright: -Copyright (c) 2002, Xiph.org Foundation - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -- Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -- Neither the name of the Xiph.Org Foundation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/wolf3d/newCode/Tremor/debian/libvorbisidec-dev.install b/wolf3d/newCode/Tremor/debian/libvorbisidec-dev.install deleted file mode 100644 index 5c3ccf9..0000000 --- a/wolf3d/newCode/Tremor/debian/libvorbisidec-dev.install +++ /dev/null @@ -1,8 +0,0 @@ -debian/tmp/usr/include/tremor/config_types.h -debian/tmp/usr/include/tremor/ivorbiscodec.h -debian/tmp/usr/include/tremor/ivorbisfile.h -debian/tmp/usr/include/tremor/ogg.h -debian/tmp/usr/include/tremor/os_types.h -debian/tmp/usr/lib/libvorbisidec.a -debian/tmp/usr/lib/libvorbisidec.la -debian/tmp/usr/lib/libvorbisidec.so diff --git a/wolf3d/newCode/Tremor/debian/libvorbisidec1.install b/wolf3d/newCode/Tremor/debian/libvorbisidec1.install deleted file mode 100644 index b824d1e..0000000 --- a/wolf3d/newCode/Tremor/debian/libvorbisidec1.install +++ /dev/null @@ -1 +0,0 @@ -debian/tmp/usr/lib/libvorbisidec.so.* diff --git a/wolf3d/newCode/Tremor/debian/rules b/wolf3d/newCode/Tremor/debian/rules deleted file mode 100644 index c684884..0000000 --- a/wolf3d/newCode/Tremor/debian/rules +++ /dev/null @@ -1,151 +0,0 @@ -#!/usr/bin/make -f -# Sample debian/rules that uses debhelper. -# GNU copyright 1997 to 1999 by Joey Hess. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -# This is the debhelper compatibility version to use. -export DH_COMPAT=4 - -# This has to be exported to make some magic below work. -export DH_OPTIONS - -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - -objdir = $(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE) - -ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) - CFLAGS += -g -endif -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s -endif - -configure: configure-stamp -configure-stamp: - dh_testdir - - # make build directory - mkdir $(objdir) - - # run configure with build tree $(objdir) - # change ../configure to ../autogen.sh for CVS build - cd $(objdir) && \ - ../configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \ - --prefix=/usr - - touch configure-stamp - -build: build-stamp -build-stamp: configure-stamp - dh_testdir - - cd $(objdir) && \ - $(MAKE) - - touch build-stamp - -autotools: - OLDDATESUB=`./config.sub -t | tr -d -` ;\ - OLDDATEGUESS=`./config.guess -t | tr -d -` ;\ - NEWDATESUB=`/usr/share/misc/config.sub -t | tr -d -` ;\ - NEWDATEGUESS=`/usr/share/misc/config.guess -t | tr -d -` ;\ - if [ $$OLDDATESUB -lt $$NEWDATESUB -o \ - $$OLDDATEGUESS -lt $$NEWDATEGUESS ]; then \ - dch -a -p "GNU config automated update: config.sub\ - ($$OLDDATESUB to $$NEWDATESUB), config.guess\ - ($$OLDDATEGUESS to $$NEWDATEGUESS)" ;\ - cp -f /usr/share/misc/config.sub config.sub ;\ - cp -f /usr/share/misc/config.guess config.guess ;\ - echo WARNING: GNU config scripts updated from master copies 1>&2 ;\ - fi - -debian-clean: - dh_testdir - dh_testroot - - dh_clean - -clean: autotools - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - - # Remove build tree - rm -rf $(objdir) - - # if Makefile exists run distclean - if test -f Makefile; then \ - $(MAKE) distclean; \ - fi - - #if test -d CVS; then \ - $(MAKE) cvs-clean ;\ - fi - - dh_clean - -install: DH_OPTIONS= -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - cd $(objdir) && \ - $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp - - dh_install --list-missing - -# This single target is used to build all the packages, all at once, or -# one at a time. So keep in mind: any options passed to commands here will -# affect _all_ packages. Anything you want to only affect one package -# should be put in another target, such as the install target. -binary-common: - dh_testdir - dh_testroot -# dh_installxfonts - dh_installchangelogs - dh_installdocs - dh_installexamples -# dh_installmenu -# dh_installdebconf -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_installinit -# dh_installcron -# dh_installinfo -# dh_undocumented - dh_installman - dh_strip - dh_link - dh_compress - dh_fixperms - dh_makeshlibs -V - dh_installdeb -# dh_perl - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -# Build architecture independant packages using the common target. -binary-indep: build install -# $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common - -# Build architecture dependant packages using the common target. -binary-arch: build install - $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common - -# Any other binary targets build just one binary package at a time. -binary-%: build install - $(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$* - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/wolf3d/newCode/Tremor/doc/OggVorbis_File.html b/wolf3d/newCode/Tremor/doc/OggVorbis_File.html deleted file mode 100644 index 9201d18..0000000 --- a/wolf3d/newCode/Tremor/doc/OggVorbis_File.html +++ /dev/null @@ -1,132 +0,0 @@ - - - -Tremor - datatype - OggVorbis_File - - - - - - - - - -

Tremor documentation

Tremor version 1.0 - 20020403

- -

OggVorbis_File

- -

declared in "ivorbisfile.h"

- -

-The OggVorbis_File structure defines an Ogg Vorbis file. -

- -This structure is used in all libvorbisidec routines. Before it can be used, -it must be initialized by ov_open() or ov_open_callbacks(). - -

-After use, the OggVorbis_File structure must be deallocated with a -call to ov_clear(). - -

-Once a file or data source is opened successfully by libvorbisidec -(using ov_open() or ov_open_callbacks()), it is owned by -libvorbisidec. The file should not be used by any other applications or -functions outside of the libvorbisidec API. The file must not be closed -directly by the application at any time after a successful open; -libvorbisidec expects to close the file within ov_clear(). -

-If the call to ov_open() or ov_open_callbacks() fails, -libvorbisidec does not assume ownership of the file and the -application is expected to close it if necessary. - -

- - - - -
-
typedef struct {
-  void             *datasource; /* Pointer to a FILE *, etc. */
-  int              seekable;
-  ogg_int64_t      offset;
-  ogg_int64_t      end;
-  ogg_sync_state   oy; 
-
-  /* If the FILE handle isn't seekable (eg, a pipe), only the current
-     stream appears */
-  int              links;
-  ogg_int64_t      *offsets;
-  ogg_int64_t      *dataoffsets;
-  long             *serialnos;
-  ogg_int64_t      *pcmlengths;
-  vorbis_info      *vi;
-  vorbis_comment   *vc;
-
-  /* Decoding working state local storage */
-  ogg_int64_t      pcm_offset;
-  int              ready_state;
-  long             current_serialno;
-  int              current_link;
-
-  ogg_int64_t      bittrack;
-  ogg_int64_t      samptrack;
-
-  ogg_stream_state os; /* take physical pages, weld into a logical
-                          stream of packets */
-  vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
-  vorbis_block     vb; /* local working space for packet->PCM decode */
-
-  ov_callbacks callbacks;
-
-} OggVorbis_File;
-
- -

Relevant Struct Members

-
-
datasource
- -
Pointer to file or other ogg source. When using stdio based -file/stream access, this field contains a FILE pointer. When using -custom IO via callbacks, libvorbisidec treats this void pointer as a -black box only to be passed to the callback routines provided by the -application.
- -
seekable
-
Read-only int indicating whether file is seekable. E.g., a physical file is seekable, a pipe isn't.
-
links
-
Read-only int indicating the number of logical bitstreams within the physical bitstream.
-
ov_callbacks
-
Collection of file manipulation routines to be used on this data source. When using stdio/FILE access via ov_open(), the callbacks will be filled in with stdio calls or wrappers to stdio calls.
-
- -

Notes

- -

Tremor requires a native 64 bit integer type to compile and -function; The GNU build system will locate and typedef -ogg_int64_t to the appropriate native type. If not using the -GNU build tools, you will need to define ogg_int64_t as a -64-bit type inside your system's project file/Makefile, etc. On win32, -for example, this should be defined as __int64. -

- - -

-


- - - - - - - - -

copyright © 2002 Xiph.org

Ogg Vorbis

Tremor documentation

Tremor version 1.0 - 20020403

- - - - diff --git a/wolf3d/newCode/Tremor/doc/build.html b/wolf3d/newCode/Tremor/doc/build.html deleted file mode 100644 index 6f0f4ee..0000000 --- a/wolf3d/newCode/Tremor/doc/build.html +++ /dev/null @@ -1,111 +0,0 @@ - - - -Tremor - Build - - - - - - - - - -

Tremor documentation

Tremor version 1.0 - 20020403

- -

Tremor: Building libvorbisidec

- -

- -The C source in the Tremor package will build on any ANSI C compiler -and function completely and properly on any platform. The included -build system assumes GNU build system and make tools (m4, automake, -autoconf, libtool and gmake). GCC is not required, although GCC is -the most tested compiler. To build using GNU tools, type in the -source directory: - -

-


-./autogen.sh
-gmake
-
-

-or if GNU make is the standard make on the build system: -


-./autogen.sh
-make
-
- -

-Currently, the source implements playback in pure C on all platforms -except ARM, where a [currently] small amount of assembly (see the file -asm_arm.h) is used to implement 64 bit math operations and -fast LSP computation. If building on ARM without the benefit of GNU -build system tools, be sure that _ARM_ASSEM_ is #defined by -the build system if this assembly is desired, else the resulting -library will use whatever 64 bit math builtins the compiler -implements. - -

-No math library is required by this source. No floating point -operations are used at any point in either setup or decode. This -decoder library will properly decode any past, current or future -Vorbis I file or stream. - -

-The GNU build system produces static and, when supported by the OS, -dynamic libraries named 'libvorbisidec'. This library exposes an API -nearly identical to the BSD reference library's 'libvorbisfile', -including all the features familiar to users of vorbisfile. This API -is similar enough that the proper header file to include is named -'ivorbisfile.h', included in the source build directory. -Lower level libvorbis-style headers and structures are -in 'ivorbiscodec.h', also included in the source build directory. A -simple example program, ivorbisfile_example.c, can be built with 'make -ivorbisfile_example'. -

-(We've summarized differences between the free, -reference vorbisfile library and Tremor's libvorbisidec in a separate -document.) - -

Notes

- -

Tremor requires a native 64 bit integer type to compile and -function; The GNU build system will locate and typedef -ogg_int64_t to the appropriate native type. If not using the -GNU build tools, you will need to define ogg_int64_t as a -64-bit type inside your system's project file/Makefile, etc. On win32, -for example, this should be defined as __int64. -

- -

-


- - - - - - - - -

copyright © 2002 Xiph.org

Ogg Vorbis

Tremor documentation

Tremor version 1.0 - 20020403

- - - - - - - - - - - - - - - - - - - - diff --git a/wolf3d/newCode/Tremor/doc/callbacks.html b/wolf3d/newCode/Tremor/doc/callbacks.html deleted file mode 100644 index 9a6d392..0000000 --- a/wolf3d/newCode/Tremor/doc/callbacks.html +++ /dev/null @@ -1,113 +0,0 @@ - - - -Tremor - Callbacks and non-stdio I/O - - - - - - - - - -

Tremor documentation

Tremor version 1.0 - 20020403

- -

Callbacks and non-stdio I/O

- -Although stdio is convenient and nearly universally implemented as per -ANSI C, it is not suited to all or even most potential uses of Vorbis. -For additional flexibility, embedded applications may provide their -own I/O functions for use with Tremor when stdio is unavailable or not -suitable. One common example is decoding a Vorbis stream from a -memory buffer.

- -Use custom I/O functions by populating an ov_callbacks structure and calling ov_open_callbacks() or ov_test_callbacks() rather than the -typical ov_open() or ov_test(). Past the open call, use of -libvorbisidec is identical to using it with stdio. - -

Read function

- -The read-like function provided in the read_func field is -used to fetch the requested amount of data. It expects the fetch -operation to function similar to file-access, that is, a multiple read -operations will retrieve contiguous sequential pieces of data, -advancing a position cursor after each read.

- -The following behaviors are also expected:

-

    -
  • a return of '0' indicates end-of-data (if the by-thread errno is unset) -
  • short reads mean nothing special (short reads are not treated as error conditions) -
  • a return of zero with the by-thread errno set to nonzero indicates a read error -
-

- -

Seek function

- -The seek-like function provided in the seek_func field is -used to request non-sequential data access by libvorbisidec, moving -the access cursor to the requested position.

- -libvorbisidec expects the following behavior: -

    -
  • The seek function must always return -1 (failure) if the given -data abstraction is not seekable. It may choose to always return -1 -if the application desires libvorbisidec to treat the Vorbis data -strictly as a stream (which makes for a less expensive open -operation).

    - -

  • If the seek function initially indicates seekability, it must -always succeed upon being given a valid seek request.

    - -

  • The seek function must implement all of SEEK_SET, SEEK_CUR and -SEEK_END. The implementation of SEEK_END should set the access cursor -one past the last byte of accessible data, as would stdio -fseek()

    -

- -

Close function

- -The close function should deallocate any access state used by the -passed in instance of the data access abstraction and invalidate the -instance handle. The close function is assumed to succeed.

- -One common use of callbacks and the close function is to change the -behavior of libvorbisidec with respect to file closure for applications -that must fclose data files themselves. By passing -the normal stdio calls as callback functions, but passing a -close_func that does nothing, an application may call ov_clear() and then fclose() the -file originally passed to libvorbisidec. - -

Tell function

- -The tell function is intended to mimic the -behavior of ftell() and must return the byte position of the -next data byte that would be read. If the data access cursor is at -the end of the 'file' (pointing to one past the last byte of data, as -it would be after calling fseek(file,SEEK_END,0)), the tell -function must return the data position (and thus the total file size), -not an error.

- -The tell function need not be provided if the data IO abstraction is -not seekable.
-


- - - - - - - - -

copyright © 2002 Xiph.org

Ogg Vorbis

Tremor documentation

Tremor version 1.0 - 20020403

- - - - diff --git a/wolf3d/newCode/Tremor/doc/datastructures.html b/wolf3d/newCode/Tremor/doc/datastructures.html deleted file mode 100644 index 2b3da07..0000000 --- a/wolf3d/newCode/Tremor/doc/datastructures.html +++ /dev/null @@ -1,61 +0,0 @@ - - - -Tremor - Base Data Structures - - - - - - - - - -

Tremor documentation

Tremor version 1.0 - 20020403

- -

Base Data Structures

-

There are several data structures used to hold file and bitstream information during libvorbisidec decoding. These structures are declared in "ivorbisfile.h" and "ivorbiscodec.h". -

-

When using libvorbisidec, it's not necessary to know about most of the contents of these data structures, but it may be helpful to understand what they contain. -

- - - - - - - - - - - - - - - - - - - - - - -
datatypepurpose
OggVorbis_FileThis structure represents the basic file information. It contains - a pointer to the physical file or bitstream and various information about that bitstream.
vorbis_commentThis structure contains the file comments. It contains - a pointer to unlimited user comments, information about the number of comments, and a vendor description.
vorbis_infoThis structure contains encoder-related information about the bitstream. It includes encoder info, channel info, and bitrate limits.
ov_callbacksThis structure contains pointers to the application-specified file manipulation routines set for use by ov_open_callbacks(). See also the provided document on using application-provided callbacks instead of stdio.
- -

-


- - - - - - - - -

copyright © 2002 Xiph.org

Ogg Vorbis

Tremor documentation

Tremor version 1.0 - 20020403

- - - - diff --git a/wolf3d/newCode/Tremor/doc/decoding.html b/wolf3d/newCode/Tremor/doc/decoding.html deleted file mode 100644 index 1f61b47..0000000 --- a/wolf3d/newCode/Tremor/doc/decoding.html +++ /dev/null @@ -1,82 +0,0 @@ - - - -Tremor - Decoding - - - - - - - - - -

Tremor documentation

Tremor version 1.0 - 20020403

- -

Decoding

- -

-All libivorbisdec decoding routines are declared in "ivorbisfile.h". -

- -After initialization, decoding audio -is as simple as calling ov_read(). This -function works similarly to reading from a normal file using -read().

- -However, a few differences are worth noting: - -

multiple stream links

- -A Vorbis stream may consist of multiple sections (called links) that -encode differing numbers of channels or sample rates. It is vitally -important to pay attention to the link numbers returned by ov_read and handle audio changes that may -occur at link boundaries. Such multi-section files do exist in the -wild and are not merely a specification curiosity. - -

returned data amount

- -ov_read does not attempt to completely fill -a large, passed in data buffer; it merely guarantees that the passed -back data does not overflow the passed in buffer size. Large buffers -may be filled by iteratively looping over calls to ov_read (incrementing the buffer pointer) -until the original buffer is filled. - -

file cursor position

- -Vorbis files do not necessarily start at a sample number or time offset -of zero. Do not be surprised if a file begins at a positive offset of -several minutes or hours, such as would happen if a large stream (such -as a concert recording) is chopped into multiple seperate files. - -

- - - - - - - - - -
functionpurpose
ov_readThis function makes up the main chunk of a decode loop. It takes an -OggVorbis_File structure, which must have been initialized by a previous -call to ov_open().
- -

-


- - - - - - - - -

copyright © 2002 Xiph.org

Ogg Vorbis

Tremor documentation

Tremor version 1.0 - 20020403

- - - - diff --git a/wolf3d/newCode/Tremor/doc/diff.html b/wolf3d/newCode/Tremor/doc/diff.html deleted file mode 100644 index ae0b908..0000000 --- a/wolf3d/newCode/Tremor/doc/diff.html +++ /dev/null @@ -1,67 +0,0 @@ - - - -Tremor - Vorbisfile Differences - - - - - - - - - -

Tremor documentation

Tremor version 1.0 - 20020403

- -

Tremor / Vorbisfile API Differences

- -

- -The Tremor libvorbisidec library exposes an API intended to be as -similar as possible to the familiar 'vorbisfile' library included with -the open source Vorbis reference libraries distributed for free by -Xiph.org. Differences are summarized below.

- -

OggVorbis_File structure

- -The bittrack and samptrack fields in the OggVorbis_File structure are changed to -64 bit integers in Tremor, from doubles in vorbisfile. - -

Time-related seek and tell function calls

- -The ov_time_total() and ov_time_tell() functions return milliseconds as -64 bit integers in Tremor. In vorbisfile, these functions returned -seconds as doubles.

- -In Tremor, the ov_time_seek() and ov_time_seek_page() calls take -seeking positions in milliseconds as 64 bit integers, rather than in -seconds as doubles as in Vorbisfile.

- -

Reading decoded data

- -Tremor ov_read() always returns data as -signed 16 bit interleaved PCM in host byte order. As such, it does not -take arguments to request specific signedness, byte order or bit depth -as in Vorbisfile.

- -Tremor does not implement ov_read_float().

- - -

-


- - - - - - - - -

copyright © 2002 Xiph.org

Ogg Vorbis

Tremor documentation

Tremor version 1.0 - 20020403

- - - - diff --git a/wolf3d/newCode/Tremor/doc/example.html b/wolf3d/newCode/Tremor/doc/example.html deleted file mode 100644 index 2b9a1dd..0000000 --- a/wolf3d/newCode/Tremor/doc/example.html +++ /dev/null @@ -1,205 +0,0 @@ - - - -Tremor - Example Code - - - - - - - - - -

Tremor documentation

Tremor version 1.0 - 20020403

- -

Example Code

- -

-The following is a run-through of the decoding example program supplied -with libvorbisidec, ivorbisfile_example.c. -This program takes a vorbis bitstream from stdin and writes raw pcm to stdout. - -

-First, relevant headers, including vorbis-specific "ivorbiscodec.h" and "ivorbisfile.h" have to be included. - -

- - - - -
-

-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include "ivorbiscodec.h"
-#include "ivorbisfile.h"
-
-
-

-We also have to make a concession to Windows users here. If we are using windows for decoding, we must declare these libraries so that we can set stdin/stdout to binary. -

- - - - -
-

-#ifdef _WIN32
-#include <io.h>
-#include <fcntl.h>
-#endif
-
-
-

-Next, a buffer for the pcm audio output is declared. - -

- - - - -
-

-char pcmout[4096];
-
-
- -

Inside main(), we declare our primary OggVorbis_File structure. We also declare a few other helpful variables to track out progress within the file. -Also, we make our final concession to Windows users by setting the stdin and stdout to binary mode. -

- - - - -
-

-int main(int argc, char **argv){
-  OggVorbis_File vf;
-  int eof=0;
-  int current_section;
-
-#ifdef _WIN32
-  _setmode( _fileno( stdin ), _O_BINARY );
-  _setmode( _fileno( stdout ), _O_BINARY );
-#endif
-
-
- -

ov_open() must be -called to initialize the OggVorbis_File structure with default values. -ov_open() also checks to ensure that we're reading Vorbis format and not something else. - -

- - - - -
-

-  if(ov_open(stdin, &vf, NULL, 0) < 0) {
-      fprintf(stderr,"Input does not appear to be an Ogg bitstream.\n");
-      exit(1);
-  }
-
-
-
- -

-We're going to pull the channel and bitrate info from the file using ov_info() and show them to the user. -We also want to pull out and show the user a comment attached to the file using ov_comment(). - -

- - - - -
-

-  {
-    char **ptr=ov_comment(&vf,-1)->user_comments;
-    vorbis_info *vi=ov_info(&vf,-1);
-    while(*ptr){
-      fprintf(stderr,"%s\n",*ptr);
-      ++ptr;
-    }
-    fprintf(stderr,"\nBitstream is %d channel, %ldHz\n",vi->channels,vi->rate);
-    fprintf(stderr,"\nDecoded length: %ld samples\n",
-            (long)ov_pcm_total(&vf,-1));
-    fprintf(stderr,"Encoded by: %s\n\n",ov_comment(&vf,-1)->vendor);
-  }
-  
-
-
- -

-Here's the read loop: - -

- - - - -
-

-
-  while(!eof){
-    long ret=ov_read(&vf,pcmout,sizeof(pcmout),¤t_section);
-    if (ret == 0) {
-      /* EOF */
-      eof=1;
-    } else if (ret < 0) {
-      /* error in the stream.  Not a problem, just reporting it in
-	 case we (the app) cares.  In this case, we don't. */
-    } else {
-      /* we don't bother dealing with sample rate changes, etc, but
-	 you'll have to*/
-      fwrite(pcmout,1,ret,stdout);
-    }
-  }
-
-  
-
-
- -

-The code is reading blocks of data using ov_read(). -Based on the value returned, we know if we're at the end of the file or have invalid data. If we have valid data, we write it to the pcm output. - -

-Now that we've finished playing, we can pack up and go home. It's important to call ov_clear() when we're finished. - -

- - - - -
-

-
-  ov_clear(&vf);
-    
-  fprintf(stderr,"Done.\n");
-  return(0);
-}
-
-
- -

- -

-


- - - - - - - - -

copyright © 2002 Xiph.org

Ogg Vorbis

Tremor documentation

Tremor version 1.0 - 20020403

- - - - diff --git a/wolf3d/newCode/Tremor/doc/fileinfo.html b/wolf3d/newCode/Tremor/doc/fileinfo.html deleted file mode 100644 index 53dfd38..0000000 --- a/wolf3d/newCode/Tremor/doc/fileinfo.html +++ /dev/null @@ -1,95 +0,0 @@ - - - -Tremor - File Information - - - - - - - - - -

Tremor documentation

Tremor version 1.0 - 20020403

- -

File Information

-

Libvorbisidec contains many functions to get information about bitstream attributes and decoding status. -

-All libvorbisidec file information routines are declared in "ivorbisfile.h". -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
functionpurpose
ov_bitrateReturns the average bitrate of the current logical bitstream.
ov_bitrate_instantReturns the exact bitrate since the last call of this function, or -1 if at the beginning of the bitream or no new information is available.
ov_streamsGives the number of logical bitstreams within the current physical bitstream.
ov_seekableIndicates whether the bitstream is seekable.
ov_serialnumberReturns the unique serial number of the specified logical bitstream.
ov_raw_totalReturns the total (compressed) bytes in a physical or logical seekable bitstream.
ov_pcm_totalReturns the total number of samples in a physical or logical seekable bitstream.
ov_time_totalReturns the total time length in seconds of a physical or logical seekable bitstream.
ov_raw_tellReturns the byte location of the next sample to be read, giving the approximate location in the stream that the decoding engine has reached.
ov_pcm_tellReturns the sample location of the next sample to be read, giving the approximate location in the stream that the decoding engine has reached.
ov_time_tellReturns the time location of the next sample to be read, giving the approximate location in the stream that the decoding engine has reached.
ov_infoReturns the vorbis_info struct for a specific bitstream section.
ov_commentReturns attached comments for the current bitstream.
- -

-


- - - - - - - - -

copyright © 2002 Xiph.org

Ogg Vorbis

Tremor documentation

Tremor version 1.0 - 20020403

- - - - diff --git a/wolf3d/newCode/Tremor/doc/index.html b/wolf3d/newCode/Tremor/doc/index.html deleted file mode 100644 index 671f13f..0000000 --- a/wolf3d/newCode/Tremor/doc/index.html +++ /dev/null @@ -1,53 +0,0 @@ - - - -Tremor - Documentation - - - - - - - - - -

Tremor documentation

Tremor version 1.0 - 20020403

- -

Tremor Documentation

- -

- -The Tremor Vorbis I stream and file decoder provides an embeddable, -integer-only library [libvorbisidec] intended for decoding all current -and future Vorbis I compliant streams. The Tremor libvorbisidec -library exposes an API intended to be as similar as possible to the -familiar 'vorbisfile' library included with the open source Vorbis -reference libraries distributed for free by Xiph.org.

- -Tremor can be used along with any ANSI compliant stdio implementation -for file/stream access, or use custom stream i/o routines provided by -the embedded environment. Both uses are described in detail in this -documentation. - -

-Building libvorbisidec
-API overview
-API reference
-Example code
-Tremor / vorbisfile API differences
- -

-


- - - - - - - - -

copyright © 2002 Xiph.org

Ogg Vorbis

Tremor documentation

Tremor version 1.0 - 20020403

- - - - diff --git a/wolf3d/newCode/Tremor/doc/initialization.html b/wolf3d/newCode/Tremor/doc/initialization.html deleted file mode 100644 index f9f6807..0000000 --- a/wolf3d/newCode/Tremor/doc/initialization.html +++ /dev/null @@ -1,101 +0,0 @@ - - - -Tremor - Setup/Teardown - - - - - - - - - -

Tremor documentation

Tremor version 1.0 - 20020403

- -

Setup/Teardown

In order to decode audio using -libvorbisidec, a bitstream containing Vorbis audio must be properly -initialized before decoding and cleared when decoding is finished. -The simplest possible case is to use fopen() to open a Vorbis -file and then pass the FILE * to an ov_open() call. A successful return code from ov_open() indicates the file is ready for use. -Once the file is no longer needed, ov_clear() is used to close the file and -deallocate decoding resources. Do not call fclose() on the -file; libvorbisidec does this in the ov_clear() call. - -

-All libvorbisidec initialization and deallocation routines are declared in "ivorbisfile.h". -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
functionpurpose
ov_openInitializes the Ogg Vorbis bitstream with a pointer to a bitstream and default values. This must be called before other functions in the library may be - used.
ov_open_callbacksInitializes the Ogg Vorbis bitstream with a pointer to a bitstream, default values, and custom file/bitstream manipulation routines. Used instead of ov_open() when working with other than stdio based I/O.
ov_testPartially opens a file just far enough to determine if the file -is an Ogg Vorbis file or not. A successful return indicates that the -file appears to be an Ogg Vorbis file, but the OggVorbis_File struct is not yet fully -initialized for actual decoding. After a successful return, the file -may be closed using ov_clear() or fully -opened for decoding using ov_test_open().

This call is intended to -be used as a less expensive file open test than a full ov_open().

-Note that libvorbisidec owns the passed in file resource is it returns success; do not fclose() files owned by libvorbisidec.

ov_test_callbacksAs above but allowing application-define I/O callbacks.

-Note that libvorbisidec owns the passed in file resource is it returns success; do not fclose() files owned by libvorbisidec.

ov_test_open -Finish opening a file after a successful call to ov_test() or ov_test_callbacks().
ov_clear Closes the - bitstream and cleans up loose ends. Must be called when - finished with the bitstream. After return, the OggVorbis_File struct is - invalid and may not be used before being initialized again - before begin reinitialized. - -
- -

-


- - - - - - - - -

copyright © 2002 Xiph.org

Ogg Vorbis

Tremor documentation

Tremor version 1.0 - 20020403

- - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_bitrate.html b/wolf3d/newCode/Tremor/doc/ov_bitrate.html deleted file mode 100644 index 65ebfc3..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_bitrate.html +++ /dev/null @@ -1,72 +0,0 @@ - - - -Tremor - function - ov_bitrate - - - - - - - - - -

Tremor documentation

Tremor version 1.0 - 20020403

- -

ov_bitrate

- -

declared in "ivorbisfile.h";

- -

This function returns the average bitrate for the specified logical bitstream. This may be different from the ov_info->nominal_bitrate value, as it is based on the actual average for this bitstream if the file is seekable. -

Nonseekable files will return the nominal bitrate setting or the average of the upper and lower bounds, if any of these values are set. -

- -

- - - - -
-

-long ov_bitrate(OggVorbis_File *vf,int i);
-
-
- -

Parameters

-
-
vf
-
A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions.
-
i
-
Link to the desired logical bitstream. For nonseekable files, this argument is ignored. To retrieve the bitrate for the entire bitstream, this parameter should be set to -1.
-
- - -

Return Values

-
-
  • OV_EINVAL indicates that an invalid argument value was submitted or that the stream represented by vf is not open.
  • -
  • OV_FALSE means the call returned a 'false' status, which in this case most likely indicates that the file is nonseekable and the upper, lower, and nominal bitrates were unset. -
  • n indicates the bitrate for the given logical bitstream or the entire - physical bitstream. If the file is open for random (seekable) access, it will - find the *actual* average bitrate. If the file is streaming (nonseekable), it - returns the nominal bitrate (if set) or else the average of the - upper/lower bounds (if set).
  • -
    -

    - - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_bitrate_instant.html b/wolf3d/newCode/Tremor/doc/ov_bitrate_instant.html deleted file mode 100644 index 874671f..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_bitrate_instant.html +++ /dev/null @@ -1,65 +0,0 @@ - - - -Tremor - function - ov_bitrate - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_bitrate_instant

    - -

    declared in "ivorbisfile.h";

    - -

    Used to find the most recent bitrate played back within the file. Will return 0 if the bitrate has not changed or it is the beginning of the file. - -

    - - - - -
    -
    
    -long ov_bitrate_instant(OggVorbis_File *vf);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions. -
    - - -

    Return Values

    -
    -
  • 0 indicates the beginning of the file or unchanged bitrate info.
  • -
  • n indicates the actual bitrate since the last call.
  • -
  • OV_FALSE indicates that playback is not in progress, and thus there is no instantaneous bitrate information to report.
  • -
  • OV_EINVAL indicates that the stream represented by vf is not open.
  • -
    -

    - - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_callbacks.html b/wolf3d/newCode/Tremor/doc/ov_callbacks.html deleted file mode 100644 index 776352d..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_callbacks.html +++ /dev/null @@ -1,78 +0,0 @@ - - - -Tremor - datatype - ov_callbacks - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_callbacks

    - -

    declared in "ivorbiscodec.h"

    - -

    -The ov_callbacks structure contains file manipulation function prototypes necessary for opening, closing, seeking, and location. - -

    -The ov_callbacks structure does not need to be user-defined if you are -working with stdio-based file manipulation; the ov_open() call provides default callbacks for -stdio. ov_callbacks are defined and passed to ov_open_callbacks() when -implementing non-stdio based stream manipulation (such as playback -from a memory buffer). -

    - - - - - -
    -
    typedef struct {
    -  size_t (*read_func)  (void *ptr, size_t size, size_t nmemb, void *datasource);
    -  int    (*seek_func)  (void *datasource, ogg_int64_t offset, int whence);
    -  int    (*close_func) (void *datasource);
    -  long   (*tell_func)  (void *datasource);
    -} ov_callbacks;
    -
    - -

    Relevant Struct Members

    -
    -
    read_func
    -
    Pointer to custom data reading function.
    -
    seek_func
    -
    Pointer to custom data seeking function. If the data source is not seekable (or the application wants the data source to be treated as unseekable at all times), the provided seek callback should always return -1 (failure).
    -
    close_func
    -
    Pointer to custom data source closure function.
    -
    tell_func
    -
    Pointer to custom data location function.
    -
    - -

    - -See the callbacks and non-stdio I/O document for more -detailed information on required behavior of the various callback -functions.

    - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_clear.html b/wolf3d/newCode/Tremor/doc/ov_clear.html deleted file mode 100644 index 7c51bb7..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_clear.html +++ /dev/null @@ -1,64 +0,0 @@ - - - -Tremor - function - ov_clear - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_clear

    - -

    declared in "ivorbisfile.h";

    - -

    After a bitstream has been opened using ov_open()/ov_open_callbacks() and decoding is complete, the application must call ov_clear() to clear -the decoder's buffers and close the file.

    - -ov_clear() must also be called after a successful call to ov_test() or ov_test_callbacks().

    - -

    - - - - -
    -
    
    -int ov_clear(OggVorbis_File *vf);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions. After ov_clear has been called, the structure is deallocated and can no longer be used.
    -
    - - -

    Return Values

    -
    -
  • 0 for success
  • -
    - - -

    -
    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_comment.html b/wolf3d/newCode/Tremor/doc/ov_comment.html deleted file mode 100644 index 5d9cc0b..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_comment.html +++ /dev/null @@ -1,66 +0,0 @@ - - - -Tremor - function - ov_bitrate - - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_comment

    - -

    declared in "ivorbisfile.h";

    - -

    Returns a pointer to the vorbis_comment struct for the specified bitstream. For nonseekable streams, returns the struct for the current bitstream. -

    - -

    - - - - -
    -
    
    -vorbis_comment *ov_comment(OggVorbis_File *vf,int link);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions.
    -
    i
    -
    Link to the desired logical bitstream. For nonseekable files, this argument is ignored. To retrieve the vorbis_comment struct for the current bitstream, this parameter should be set to -1.
    -
    - - -

    Return Values

    -
    -
  • Returns the vorbis_comment struct for the specified bitstream.
  • -
  • NULL if the specified bitstream does not exist or the file has been initialized improperly.
  • -
    -

    - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_info.html b/wolf3d/newCode/Tremor/doc/ov_info.html deleted file mode 100644 index d783bf3..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_info.html +++ /dev/null @@ -1,64 +0,0 @@ - - - -Tremor - function - ov_info - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_info

    - -

    declared in "ivorbisfile.h";

    - -

    Returns the vorbis_info struct for the specified bitstream. For nonseekable files, always returns the current vorbis_info struct. - -

    - - - - -
    -
    
    -vorbis_info *ov_info(OggVorbis_File *vf,int link);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions.
    -
    i
    -
    Link to the desired logical bitstream. For nonseekable files, this argument is ignored. To retrieve the vorbis_info struct for the current bitstream, this parameter should be set to -1.
    -
    - - -

    Return Values

    -
    -
  • Returns the vorbis_info struct for the specified bitstream. Returns vorbis_info for current bitstream if the file is nonseekable or i=-1.
  • -
  • NULL if the specified bitstream does not exist or the file has been initialized improperly.
  • -
    -

    - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_open.html b/wolf3d/newCode/Tremor/doc/ov_open.html deleted file mode 100644 index 654cae8..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_open.html +++ /dev/null @@ -1,115 +0,0 @@ - - - -Tremor - function - ov_open - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_open

    - -

    declared in "ivorbisfile.h";

    - -

    This is the main function used to open and initialize an OggVorbis_File -structure. It sets up all the related decoding structure. -

    The first argument must be a file pointer to an already opened file -or pipe (it need not be seekable--though this obviously restricts what -can be done with the bitstream). vf should be a pointer to the -OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions. Once this has been called, the same OggVorbis_File -struct should be passed to all the libvorbisidec functions. -

    Also, you should be aware that ov_open(), once successful, takes complete possession of the file resource. After you have opened a file using ov_open(), you MUST close it using ov_clear(), not fclose() or any other function. -

    -It is often useful to call ov_open() -simply to determine whether a given file is a vorbis bitstream. If the -ov_open() -call fails, then the file is not recognizable as such. -When you use ov_open() -for -this, you should fclose() the file pointer if, and only if, the -ov_open() -call fails. If it succeeds, you must call ov_clear() to clear -the decoder's buffers and close the file for you.

    - -(Note that ov_test() provides a less expensive way to test a file for Vorbisness.)

    - -

    - - - - -
    -
    
    -int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
    -
    -
    - -

    Parameters

    -
    -
    f
    -
    File pointer to an already opened file -or pipe (it need not be seekable--though this obviously restricts what -can be done with the bitstream).
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions. Once this has been called, the same OggVorbis_File -struct should be passed to all the libvorbisidec functions.
    -
    initial
    -
    Typically set to NULL. This parameter is useful if some data has already been -read from the file and the stream is not seekable. It is used in conjunction with ibytes. In this case, initial -should be a pointer to a buffer containing the data read.
    -
    ibytes
    -
    Typically set to 0. This parameter is useful if some data has already been -read from the file and the stream is not seekable. In this case, ibytes -should contain the length (in bytes) of the buffer. Used together with initial
    -
    - - -

    Return Values

    -
    -
  • 0 indicates success
  • - -
  • less than zero for failure:
  • -
      -
    • OV_EREAD - A read from media returned an error.
    • -
    • OV_ENOTVORBIS - Bitstream is not Vorbis data.
    • -
    • OV_EVERSION - Vorbis version mismatch.
    • -
    • OV_EBADHEADER - Invalid Vorbis bitstream header.
    • -
    • OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
    • -
    -
    -

    - -

    Notes

    -

    If your decoder is threaded, it is recommended that you NOT call -ov_open() -in the main control thread--instead, call ov_open() IN your decode/playback -thread. This is important because ov_open() may be a fairly time-consuming -call, given that the full structure of the file is determined at this point, -which may require reading large parts of the file under certain circumstances -(determining all the logical bitstreams in one physical bitstream, for -example). See Thread Safety for other information on using libvorbisidec with threads. - - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_open_callbacks.html b/wolf3d/newCode/Tremor/doc/ov_open_callbacks.html deleted file mode 100644 index 64a2a92..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_open_callbacks.html +++ /dev/null @@ -1,110 +0,0 @@ - - - -Tremor - function - ov_open_callbacks - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_open_callbacks

    - -

    declared in "ivorbisfile.h";

    - -

    This is an alternative function used to open and initialize an OggVorbis_File -structure when using a data source other than a file. It allows you to specify custom file manipulation routines and sets up all the related decoding structure. -

    Once this has been called, the same OggVorbis_File -struct should be passed to all the libvorbisidec functions. -

    -It is often useful to call ov_open_callbacks() -simply to determine whether a given file is a vorbis bitstream. If the -ov_open_callbacks() -call fails, then the file is not recognizable as such. When you use ov_open_callbacks() -for -this, you should fclose() the file pointer if, and only if, the -ov_open_callbacks() -call fails. If it succeeds, you must call ov_clear() to clear -the decoder's buffers and close the file for you.

    - -See also Callbacks and Non-stdio I/O for information on designing and specifying the required callback functions.

    - -

    - - - - -
    -
    
    -int ov_open_callbacks(void *datasource, OggVorbis_File *vf, char *initial, long ibytes, ov_callbacks callbacks);
    -
    -
    - -

    Parameters

    -
    -
    f
    -
    File pointer to an already opened file -or pipe (it need not be seekable--though this obviously restricts what -can be done with the bitstream).
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions. Once this has been called, the same OggVorbis_File -struct should be passed to all the libvorbisidec functions.
    -
    initial
    -
    Typically set to NULL. This parameter is useful if some data has already been -read from the file and the stream is not seekable. It is used in conjunction with ibytes. In this case, initial -should be a pointer to a buffer containing the data read.
    -
    ibytes
    -
    Typically set to 0. This parameter is useful if some data has already been -read from the file and the stream is not seekable. In this case, ibytes -should contain the length (in bytes) of the buffer. Used together with initial.
    -
    callbacks
    -
    Pointer to a completed ov_callbacks struct which indicates desired custom file manipulation routines.
    -
    - - -

    Return Values

    -
    -
  • 0 for success
  • -
  • less than zero for failure:
  • -
      -
    • OV_EREAD - A read from media returned an error.
    • -
    • OV_ENOTVORBIS - Bitstream is not Vorbis data.
    • -
    • OV_EVERSION - Vorbis version mismatch.
    • -
    • OV_EBADHEADER - Invalid Vorbis bitstream header.
    • -
    • OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
    • -
    -
    -

    - -

    Notes

    -

    If your decoder is threaded, it is recommended that you NOT call -ov_open_callbacks() -in the main control thread--instead, call ov_open_callbacks() IN your decode/playback -thread. This is important because ov_open_callbacks() may be a fairly time-consuming -call, given that the full structure of the file is determined at this point, -which may require reading large parts of the file under certain circumstances -(determining all the logical bitstreams in one physical bitstream, for -example). -See Thread Safety for other information on using libvorbisidec with threads. - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_pcm_seek.html b/wolf3d/newCode/Tremor/doc/ov_pcm_seek.html deleted file mode 100644 index cf0351e..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_pcm_seek.html +++ /dev/null @@ -1,81 +0,0 @@ - - - -Tremor - function - ov_pcm_seek - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_pcm_seek

    - -

    declared in "ivorbisfile.h";

    - -

    Seeks to the offset specified (in pcm samples) within the physical bitstream. This function only works for seekable streams. -

    This also updates everything needed within the -decoder, so you can immediately call ov_read() and get data from -the newly seeked to position. -

    - -

    - - - - -
    -
    
    -int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions.
    -
    pos
    -
    Position in pcm samples to seek to in the bitstream.
    -
    - - -

    Return Values

    -
    -
  • 0 for success
  • - -
  • -nonzero indicates failure, described by several error codes:
  • -
      -
    • OV_ENOSEEK - Bitstream is not seekable. -
    • -
    • OV_EINVAL - Invalid argument value. -
    • -
    • OV_EREAD - A read from media returned an error. -
    • -
    • OV_EFAULT - Internal logic fault; indicates a bug or heap/stack - corruption. -
    • -
    • OV_EBADLINK - Invalid stream section supplied to libvorbisidec, or the requested link is corrupt. -
    • -
    - -

    -
    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_pcm_seek_page.html b/wolf3d/newCode/Tremor/doc/ov_pcm_seek_page.html deleted file mode 100644 index 44468a8..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_pcm_seek_page.html +++ /dev/null @@ -1,83 +0,0 @@ - - - -Tremor - function - ov_pcm_seek_page - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_pcm_seek_page

    - -

    declared in "ivorbisfile.h";

    - -

    Seeks to the closest page preceding the specified location (in pcm samples) within the physical bitstream. This function only works for seekable streams. -

    This function is faster than ov_pcm_seek because the function can begin decoding at a page boundary rather than seeking through any remaining samples before the specified location. However, it is less accurate. -

    This also updates everything needed within the -decoder, so you can immediately call ov_read() and get data from -the newly seeked to position. -

    - -

    - - - - -
    -
    
    -int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions.
    -
    pos
    -
    Position in pcm samples to seek to in the bitstream.
    -
    - - -

    Return Values

    -
    -
  • -0 for success
  • - -
  • -nonzero indicates failure, described by several error codes:
  • -
      -
    • OV_ENOSEEK - Bitstream is not seekable. -
    • -
    • OV_EINVAL - Invalid argument value. -
    • -
    • OV_EREAD - A read from media returned an error. -
    • -
    • OV_EFAULT - Internal logic fault; indicates a bug or heap/stack - corruption. -
    • -
    • OV_EBADLINK - Invalid stream section supplied to libvorbisidec, or the requested link is corrupt. -
    • -
    - -

    -
    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_pcm_tell.html b/wolf3d/newCode/Tremor/doc/ov_pcm_tell.html deleted file mode 100644 index 0bb98d7..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_pcm_tell.html +++ /dev/null @@ -1,63 +0,0 @@ - - - -Tremor - function - ov_pcm_tell - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_pcm_tell

    - -

    declared in "ivorbisfile.h";

    - -

    Returns the current offset in samples. - -

    - - - - -
    -
    
    -ogg_int64_t ov_pcm_tell(OggVorbis_File *vf);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions.
    -
    - - -

    Return Values

    -
    -
  • n indicates the current offset in samples.
  • -
  • OV_EINVAL means that the argument was invalid. In this case, the requested bitstream did not exist.
  • -
    -

    - - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_pcm_total.html b/wolf3d/newCode/Tremor/doc/ov_pcm_total.html deleted file mode 100644 index a19744a..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_pcm_total.html +++ /dev/null @@ -1,67 +0,0 @@ - - - -Tremor - function - ov_pcm_total - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_pcm_total

    - -

    declared in "ivorbisfile.h";

    - -

    Returns the total pcm samples of the physical bitstream or a specified logical bitstream. - -

    - - - - -
    -
    
    -ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions.
    -
    i
    -
    Link to the desired logical bitstream. To retrieve the total pcm samples for the entire physical bitstream, this parameter should be set to -1.
    -
    - - -

    Return Values

    -
    -
  • OV_EINVAL means that the argument was invalid. In this case, the requested bitstream did not exist or the bitstream is unseekable.
  • -
  • -total length in pcm samples of content if i=-1.
  • -
  • length in pcm samples of logical bitstream if i=1 to n.
  • -
    -

    - - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_raw_seek.html b/wolf3d/newCode/Tremor/doc/ov_raw_seek.html deleted file mode 100644 index e7f0bd3..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_raw_seek.html +++ /dev/null @@ -1,75 +0,0 @@ - - - -Tremor - function - ov_raw_seek - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_raw_seek

    - -

    declared in "ivorbisfile.h";

    - -

    Seeks to the offset specified (in compressed raw bytes) within the physical bitstream. This function only works for seekable streams. -

    This also updates everything needed within the -decoder, so you can immediately call ov_read() and get data from -the newly seeked to position. -

    When seek speed is a priority, this is the best seek funtion to use. -

    - - - - -
    -
    
    -int ov_raw_seek(OggVorbis_File *vf,long pos);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions.
    -
    pos
    -
    Position in compressed bytes to seek to in the bitstream.
    -
    - - -

    Return Values

    -
    -
  • 0 indicates success
  • -
  • nonzero indicates failure, described by several error codes:
  • -
      -
    • OV_ENOSEEK - Bitstream is not seekable. -
    • -
    • OV_EINVAL - Invalid argument value. -
    • -
    • OV_EBADLINK - Invalid stream section supplied to libvorbisidec, or the requested link is corrupt. -
    • -
    -
    -

    - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_raw_tell.html b/wolf3d/newCode/Tremor/doc/ov_raw_tell.html deleted file mode 100644 index f0d1f6a..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_raw_tell.html +++ /dev/null @@ -1,63 +0,0 @@ - - - -Tremor - function - ov_raw_tell - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_raw_tell

    - -

    declared in "ivorbisfile.h";

    - -

    Returns the current offset in raw compressed bytes. - -

    - - - - -
    -
    
    -ogg_int64_t ov_raw_tell(OggVorbis_File *vf);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions.
    -
    - - -

    Return Values

    -
    -
  • n indicates the current offset in bytes.
  • -
  • OV_EINVAL means that the argument was invalid. In this case, the requested bitstream did not exist.
  • -
    -

    - - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_raw_total.html b/wolf3d/newCode/Tremor/doc/ov_raw_total.html deleted file mode 100644 index d0af35f..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_raw_total.html +++ /dev/null @@ -1,68 +0,0 @@ - - - -Tremor - function - ov_raw_total - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_raw_total

    - -

    declared in "ivorbisfile.h";

    - -

    Returns the total (compressed) bytes of the physical bitstream or a specified logical bitstream. - -

    - - - - -
    -
    
    -ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions.
    -
    i
    -
    Link to the desired logical bitstream. To retrieve the total bytes for the entire physical bitstream, this parameter should be set to -1.
    -
    - - -

    Return Values

    -
    -
  • OV_EINVAL means that the argument was invalid. In this case, the requested bitstream did not exist or the bitstream is nonseekable
  • -
  • n -total length in compressed bytes of content if i=-1.
  • -
  • n length in compressed bytes of logical bitstream if i=1 to n.
  • -
    -

    - - - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_read.html b/wolf3d/newCode/Tremor/doc/ov_read.html deleted file mode 100644 index 208ef18..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_read.html +++ /dev/null @@ -1,115 +0,0 @@ - - - -Tremor - function - ov_read - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_read()

    - -

    declared in "ivorbisfile.h";

    - -

    - This is the main function used to decode a Vorbis file within a - loop. It returns up to the specified number of bytes of decoded audio - in host-endian, signed 16 bit PCM format. If the audio is - multichannel, the channels are interleaved in the output buffer. - If the passed in buffer is large, ov_read() will not fill - it; the passed in buffer size is treated as a limit and - not a request. -

    - -Note that up to this point, the Tremor API could more or less hide the - multiple logical bitstream nature of chaining from the toplevel - application if the toplevel application didn't particularly care. - However, when reading audio back, the application must be aware - that multiple bitstream sections do not necessarily use the same - number of channels or sampling rate.

    ov_read() passes - back the index of the sequential logical bitstream currently being - decoded (in *bitstream) along with the PCM data in order - that the toplevel application can handle channel and/or sample - rate changes. This number will be incremented at chaining - boundaries even for non-seekable streams. For seekable streams, it - represents the actual chaining index within the physical bitstream. -

    - -

    - - - - -
    -
    
    -long ov_read(OggVorbis_File *vf, char *buffer, int length, int *bitstream);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions.
    -
    buffer
    -
    A pointer to an output buffer. The decoded output is inserted into this buffer.
    -
    length
    -
    Number of bytes to be read into the buffer. Should be the same size as the buffer. A typical value is 4096.
    -
    bitstream
    -
    A pointer to the number of the current logical bitstream.
    -
    - - -

    Return Values

    -
    -
    -
    OV_HOLE
    -
    indicates there was an interruption in the data. -
    (one of: garbage between pages, loss of sync followed by - recapture, or a corrupt page)
    -
    OV_EBADLINK
    -
    indicates that an invalid stream section was supplied to - libvorbisidec, or the requested link is corrupt.
    -
    0
    -
    indicates EOF
    -
    n
    -
    indicates actual number of bytes read. ov_read() will - decode at most one vorbis packet per invocation, so the value - returned will generally be less than length. -
    -
    - -

    Notes

    -

    Typical usage: -

    -bytes_read = ov_read(&vf, -buffer, 4096,&current_section) -
    - -This reads up to 4096 bytes into a buffer, with signed 16-bit -little-endian samples. -

    - - - -

    -
    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_seekable.html b/wolf3d/newCode/Tremor/doc/ov_seekable.html deleted file mode 100644 index 9bd7fc3..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_seekable.html +++ /dev/null @@ -1,63 +0,0 @@ - - - -Tremor - function - ov_seekable - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_seekable

    - -

    declared in "ivorbisfile.h";

    - -

    This indicates whether or not the bitstream is seekable. - - -

    - - - - -
    -
    
    -long ov_seekable(OggVorbis_File *vf);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions.
    -
    - - -

    Return Values

    -
    -
  • 0 indicates that the file is not seekable.
  • -
  • nonzero indicates that the file is seekable.
  • -
    -

    - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_serialnumber.html b/wolf3d/newCode/Tremor/doc/ov_serialnumber.html deleted file mode 100644 index d7d7c62..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_serialnumber.html +++ /dev/null @@ -1,67 +0,0 @@ - - - -Tremor - function - ov_serialnumber - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_serialnumber

    - -

    declared in "ivorbisfile.h";

    - -

    Returns the serialnumber of the specified logical bitstream link number within the overall physical bitstream. - -

    - - - - -
    -
    
    -long ov_serialnumber(OggVorbis_File *vf,int i);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions.
    -
    i
    -
    Link to the desired logical bitstream. For nonseekable files, this argument is ignored. To retrieve the serial number of the current bitstream, this parameter should be set to -1.
    -
    - - -

    Return Values

    -
    -
  • --1 if the specified logical bitstream i does not exist.
  • - -
  • Returns the serial number of the logical bitstream i or the serial number of the current bitstream if the file is nonseekable.
  • -
    -

    - - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_streams.html b/wolf3d/newCode/Tremor/doc/ov_streams.html deleted file mode 100644 index 7ffee42..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_streams.html +++ /dev/null @@ -1,64 +0,0 @@ - - - -Tremor - function - ov_streams - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_streams

    - -

    declared in "ivorbisfile.h";

    - -

    Returns the number of logical bitstreams within our physical bitstream. - -

    - - - - -
    -
    
    -long ov_streams(OggVorbis_File *vf);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions.
    -
    - - -

    Return Values

    -
    -
  • -1 indicates a single logical bitstream or an unseekable file.
  • -
  • n indicates the number of logical bitstreams.
  • -
    -

    - - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_test.html b/wolf3d/newCode/Tremor/doc/ov_test.html deleted file mode 100644 index 96a9af0..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_test.html +++ /dev/null @@ -1,89 +0,0 @@ - - - -Tremor - function - ov_test - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_test

    - -

    declared in "ivorbisfile.h";

    - -

    -This partially opens a vorbis file to test for Vorbis-ness. It loads -the headers for the first chain, and tests for seekability (but does not seek). -Use ov_test_open() to finish opening the file -or ov_clear to close/free it. -

    - - - - - -
    -
    
    -int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
    -
    -
    - -

    Parameters

    -
    -
    f
    -
    File pointer to an already opened file -or pipe (it need not be seekable--though this obviously restricts what -can be done with the bitstream).
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions. Once this has been called, the same OggVorbis_File -struct should be passed to all the libvorbisidec functions.
    -
    initial
    -
    Typically set to NULL. This parameter is useful if some data has already been -read from the file and the stream is not seekable. It is used in conjunction with ibytes. In this case, initial -should be a pointer to a buffer containing the data read.
    -
    ibytes
    -
    Typically set to 0. This parameter is useful if some data has already been -read from the file and the stream is not seekable. In this case, ibytes -should contain the length (in bytes) of the buffer. Used together with initial
    -
    - - -

    Return Values

    -
    -
  • 0 for success
  • - -
  • less than zero for failure:
  • -
      -
    • OV_EREAD - A read from media returned an error.
    • -
    • OV_ENOTVORBIS - Bitstream is not Vorbis data.
    • -
    • OV_EVERSION - Vorbis version mismatch.
    • -
    • OV_EBADHEADER - Invalid Vorbis bitstream header.
    • -
    • OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
    • -
    -
    -

    - - - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_test_callbacks.html b/wolf3d/newCode/Tremor/doc/ov_test_callbacks.html deleted file mode 100644 index 4049548..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_test_callbacks.html +++ /dev/null @@ -1,90 +0,0 @@ - - - -Tremor - function - ov_test_callbacks - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_test_callbacks

    - -

    declared in "ivorbisfile.h";

    - -

    This is an alternative function used to open and test an OggVorbis_File -structure when using a data source other than a file. It allows you to specify custom file manipulation routines and sets up all the related decoding structures. -

    Once this has been called, the same OggVorbis_File -struct should be passed to all the libvorbisidec functions. -

    -

    - - - - -
    -
    
    -int ov_test_callbacks(void *datasource, OggVorbis_File *vf, char *initial, long ibytes, ov_callbacks callbacks);
    -
    -
    - -

    Parameters

    -
    -
    f
    -
    File pointer to an already opened file -or pipe (it need not be seekable--though this obviously restricts what -can be done with the bitstream).
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions. Once this has been called, the same OggVorbis_File -struct should be passed to all the libvorbisidec functions.
    -
    initial
    -
    Typically set to NULL. This parameter is useful if some data has already been -read from the file and the stream is not seekable. It is used in conjunction with ibytes. In this case, initial -should be a pointer to a buffer containing the data read.
    -
    ibytes
    -
    Typically set to 0. This parameter is useful if some data has already been -read from the file and the stream is not seekable. In this case, ibytes -should contain the length (in bytes) of the buffer. Used together with initial.
    -
    callbacks
    -
    Pointer to a completed ov_callbacks struct which indicates desired custom file manipulation routines.
    -
    - - -

    Return Values

    -
    -
  • 0 for success
  • -
  • less than zero for failure:
  • -
      -
    • OV_EREAD - A read from media returned an error.
    • -
    • OV_ENOTVORBIS - Bitstream is not Vorbis data.
    • -
    • OV_EVERSION - Vorbis version mismatch.
    • -
    • OV_EBADHEADER - Invalid Vorbis bitstream header.
    • -
    • OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
    • -
    -
    -

    - - - - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_test_open.html b/wolf3d/newCode/Tremor/doc/ov_test_open.html deleted file mode 100644 index 74f4410..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_test_open.html +++ /dev/null @@ -1,82 +0,0 @@ - - - -Tremor - function - ov_test_open - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_test_open

    - -

    declared in "ivorbisfile.h";

    - -

    -Finish opening a file partially opened with ov_test() -or ov_test_callbacks(). -

    - - - - - -
    -
    
    -int ov_test_open(OggVorbis_File *vf);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions. Once this has been called, the same OggVorbis_File -struct should be passed to all the libvorbisidec functions.
    -
    - - -

    Return Values

    -
    -
  • -0 for success
  • - -
  • less than zero for failure:
  • -
      -
    • OV_EREAD - A read from media returned an error.
    • -
    • OV_ENOTVORBIS - Bitstream is not Vorbis data.
    • -
    • OV_EVERSION - Vorbis version mismatch.
    • -
    • OV_EBADHEADER - Invalid Vorbis bitstream header.
    • -
    • OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
    • -
    -
    -

    - - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - - - - - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_time_seek.html b/wolf3d/newCode/Tremor/doc/ov_time_seek.html deleted file mode 100644 index 6dfa130..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_time_seek.html +++ /dev/null @@ -1,70 +0,0 @@ - - - -Tremor - function - ov_time_seek - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_time_seek

    - -

    declared in "ivorbisfile.h";

    - -

    For seekable -streams, this seeks to the given time. For implementing seeking in a player, -this is the only function generally needed. This also updates everything needed within the -decoder, so you can immediately call ov_read() and get data from -the newly seeked to position. This function does not work for unseekable streams. - -

    - - - - -
    -
    
    -int ov_time_seek(OggVorbis_File *vf, ogg_int64_t ms);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    Pointer to our already opened and initialized OggVorbis_File structure.
    -
    ms
    -
    Location to seek to within the file, specified in milliseconds.
    -
    - - -

    Return Values

    -
    -
  • -0 for success
  • - -
  • -Nonzero for failure
  • -
    - - -

    -
    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_time_seek_page.html b/wolf3d/newCode/Tremor/doc/ov_time_seek_page.html deleted file mode 100644 index 83cfefb..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_time_seek_page.html +++ /dev/null @@ -1,83 +0,0 @@ - - - -Tremor - function - ov_time_seek_page - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_time_seek_page

    - -

    declared in "ivorbisfile.h";

    - -

    For seekable -streams, this seeks to closest full page preceding the given time. This function is faster than ov_time_seek because it doesn't seek through the last few samples to reach an exact time, but it is also less accurate. This should be used when speed is important. -

    This function also updates everything needed within the -decoder, so you can immediately call ov_read() and get data from -the newly seeked to position. -

    This function does not work for unseekable streams. - -

    - - - - -
    -
    
    -int ov_time_seek_page(OggVorbis_File *vf, ogg_int64_t ms);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    Pointer to our already opened and initialized OggVorbis_File structure.
    -
    ms
    -
    Location to seek to within the file, specified in milliseconds.
    -
    - - -

    Return Values

    -
    -
  • -0 for success
  • - -
  • -nonzero indicates failure, described by several error codes:
  • -
      -
    • OV_ENOSEEK - Bitstream is not seekable. -
    • -
    • OV_EINVAL - Invalid argument value. -
    • -
    • OV_EREAD - A read from media returned an error. -
    • -
    • OV_EFAULT - Internal logic fault; indicates a bug or heap/stack - corruption. -
    • -
    • OV_EBADLINK - Invalid stream section supplied to libvorbisidec, or the requested link is corrupt. -
    • -
    - - -

    -
    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_time_tell.html b/wolf3d/newCode/Tremor/doc/ov_time_tell.html deleted file mode 100644 index 25d159b..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_time_tell.html +++ /dev/null @@ -1,63 +0,0 @@ - - - -Tremor - function - ov_bitrate - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_time_tell

    - -

    declared in "ivorbisfile.h";

    - -

    Returns the current decoding offset in milliseconds. - -

    - - - - -
    -
    
    -ogg_int64_t ov_time_tell(OggVorbis_File *vf);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions.
    -
    - - -

    Return Values

    -
    -
  • n indicates the current decoding time offset in milliseconds.
  • -
  • OV_EINVAL means that the argument was invalid. In this case, the requested bitstream did not exist.
  • -
    -

    - - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/ov_time_total.html b/wolf3d/newCode/Tremor/doc/ov_time_total.html deleted file mode 100644 index 7c26b92..0000000 --- a/wolf3d/newCode/Tremor/doc/ov_time_total.html +++ /dev/null @@ -1,67 +0,0 @@ - - - -Tremor - function - ov_time_total - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    ov_time_total

    - -

    declared in "ivorbisfile.h";

    - - -

    Returns the total time in seconds of the physical bitstream or a specified logical bitstream. - - -

    - - - - -
    -
    
    -ogg_int64_t ov_time_total(OggVorbis_File *vf,int i);
    -
    -
    - -

    Parameters

    -
    -
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec -functions.
    -
    i
    -
    Link to the desired logical bitstream. To retrieve the time total for the entire physical bitstream, this parameter should be set to -1.
    -
    - - -

    Return Values

    -
    -
  • OV_EINVAL means that the argument was invalid. In this case, the requested bitstream did not exist or the bitstream is nonseekable.
  • -
  • n total length in milliseconds of content if i=-1.
  • -
  • n length in milliseconds of logical bitstream if i=1 to n.
  • -
    -

    - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/overview.html b/wolf3d/newCode/Tremor/doc/overview.html deleted file mode 100644 index 0c82cb2..0000000 --- a/wolf3d/newCode/Tremor/doc/overview.html +++ /dev/null @@ -1,61 +0,0 @@ - - - -Tremor - API Overview - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    Tremor API Overview

    - -

    The makeup of the Tremor libvorbisidec library API is relatively -simple. It revolves around a single file resource. This file resource is -passed to libvorbisidec, where it is opened, manipulated, and closed, -in the form of an OggVorbis_File -struct. -

    -The Tremor API consists of the following functional categories: -

    -

    -

    -In addition, the following subjects deserve attention additional to -the above general overview: -

    -

    -

    - - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - - diff --git a/wolf3d/newCode/Tremor/doc/reference.html b/wolf3d/newCode/Tremor/doc/reference.html deleted file mode 100644 index 20e0a5f..0000000 --- a/wolf3d/newCode/Tremor/doc/reference.html +++ /dev/null @@ -1,75 +0,0 @@ - - - -Tremor API Reference - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    Tremor API Reference

    - -

    -Data Structures
    -OggVorbis_File
    -vorbis_comment
    -vorbis_info
    -ov_callbacks
    -
    -Setup/Teardown
    -ov_open()
    -ov_open_callbacks()
    -ov_clear()
    -ov_test()
    -ov_test_callbacks()
    -ov_test_open()
    -
    -Decoding
    -ov_read()
    -
    -Seeking
    -ov_raw_seek()
    -ov_pcm_seek()
    -ov_time_seek()
    -ov_pcm_seek_page()
    -ov_time_seek_page()
    -
    -File Information
    -ov_bitrate()
    -ov_bitrate_instant()
    -ov_streams()
    -ov_seekable()
    -ov_serialnumber()
    -ov_raw_total()
    -ov_pcm_total()
    -ov_time_total()
    -ov_raw_tell()
    -ov_pcm_tell()
    -ov_time_tell()
    -ov_info()
    -ov_comment()
    -
    -Return Codes
    - - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/return.html b/wolf3d/newCode/Tremor/doc/return.html deleted file mode 100644 index 0a3f96c..0000000 --- a/wolf3d/newCode/Tremor/doc/return.html +++ /dev/null @@ -1,77 +0,0 @@ - - - -Tremor - Return Codes - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    Return Codes

    - -

    - -The following return codes are #defined in "ivorbiscodec.h" -may be returned by libvorbisidec. Descriptions of a code relevant to -a specific function are found in the reference description of that -function. - -

    - -
    OV_FALSE
    -
    Not true, or no data available
    - -
    OV_HOLE
    -
    Tremor encoutered missing or corrupt data in the bitstream. Recovery -is normally automatic and this return code is for informational purposes only.
    - -
    OV_EREAD
    -
    Read error while fetching compressed data for decode
    - -
    OV_EFAULT
    -
    Internal inconsistency in decode state. Continuing is likely not possible.
    - -
    OV_EIMPL
    -
    Feature not implemented
    - -
    OV_EINVAL
    -
    Either an invalid argument, or incompletely initialized argument passed to libvorbisidec call
    - -
    OV_ENOTVORBIS
    -
    The given file/data was not recognized as Ogg Vorbis data.
    - -
    OV_EBADHEADER
    -
    The file/data is apparently an Ogg Vorbis stream, but contains a corrupted or undecipherable header.
    - -
    OV_EVERSION
    -
    The bitstream format revision of the given stream is not supported.
    - -
    OV_EBADLINK
    -
    The given link exists in the Vorbis data stream, but is not decipherable due to garbacge or corruption.
    - -
    OV_ENOSEEK
    -
    The given stream is not seekable
    - -
    - -

    -
    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/seeking.html b/wolf3d/newCode/Tremor/doc/seeking.html deleted file mode 100644 index 652368a..0000000 --- a/wolf3d/newCode/Tremor/doc/seeking.html +++ /dev/null @@ -1,74 +0,0 @@ - - - -Tremor - Seeking - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    Seeking

    -

    Seeking functions allow you to specify a specific point in the stream to begin or continue decoding. -

    -All libvorbisidec seeking routines are declared in "ivorbisfile.h". - -

    Certain seeking functions are best suited to different situations. -When speed is important and exact positioning isn't required, -page-level seeking should be used. Note also that Vorbis files do not -necessarily start at a sample number or time offset of zero. Do not -be surprised if a file begins at a positive offset of several minutes -or hours, such as would happen if a large stream (such as a concert -recording) is chopped into multiple separate files. Requesting to -seek to a position before the beginning of such a file will seek to -the position where audio begins.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    functionpurpose
    ov_raw_seekThis function seeks to a position specified in the compressed bitstream, specified in bytes.
    ov_pcm_seekThis function seeks to a specific audio sample number, specified in pcm samples.
    ov_pcm_seek_pageThis function seeks to the closest page preceding the specified audio sample number, specified in pcm samples.
    ov_time_seekThis function seeks to the specific time location in the bitstream, specified in integer milliseconds. Note that this differs from the reference vorbisfile implementation, which takes seconds as a float.
    ov_time_seek_pageThis function seeks to the closest page preceding the specified time position in the bitstream, specified in integer milliseconds.
    - -

    -


    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/style.css b/wolf3d/newCode/Tremor/doc/style.css deleted file mode 100644 index 81cf417..0000000 --- a/wolf3d/newCode/Tremor/doc/style.css +++ /dev/null @@ -1,7 +0,0 @@ -BODY { font-family: Helvetica, sans-serif } -TD { font-family: Helvetica, sans-serif } -P { font-family: Helvetica, sans-serif } -H1 { font-family: Helvetica, sans-serif } -H2 { font-family: Helvetica, sans-serif } -H4 { font-family: Helvetica, sans-serif } -P.tiny { font-size: 8pt } diff --git a/wolf3d/newCode/Tremor/doc/threads.html b/wolf3d/newCode/Tremor/doc/threads.html deleted file mode 100644 index 53ed76a..0000000 --- a/wolf3d/newCode/Tremor/doc/threads.html +++ /dev/null @@ -1,50 +0,0 @@ - - - -Tremor - Thread Safety - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    Thread Safety

    - -Tremor's libvorbisidec may be used safely in a threading environment -so long as thread access to individual OggVorbis_File instances is serialized. -
      - -
    • Only one thread at a time may enter a function that takes a given OggVorbis_File instance, even if the -functions involved appear to be read-only.

      - -

    • Multiple threads may enter -libvorbisidec at a given time, so long as each thread's function calls -are using different OggVorbis_File -instances.

      - -

    • Any one OggVorbis_File instance may be used safely from multiple threads so long as only one thread at a time is making calls using that instance.

      -

    - -

    -
    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/vorbis_comment.html b/wolf3d/newCode/Tremor/doc/vorbis_comment.html deleted file mode 100644 index 3232d96..0000000 --- a/wolf3d/newCode/Tremor/doc/vorbis_comment.html +++ /dev/null @@ -1,70 +0,0 @@ - - - -Tremor - datatype - vorbis_comment - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    vorbis_comment

    - -

    declared in "ivorbiscodec.h"

    - -

    -The vorbis_comment structure defines an Ogg Vorbis comment. -

    -Only the fields the program needs must be defined. If a field isn't -defined by the application, it will either be blank (if it's a string value) -or set to some reasonable default (usually 0). -

    - - - - - -
    -
    typedef struct vorbis_comment{
    -  /* unlimited user comment fields. */
    -  char **user_comments;
    -  int  *comment_lengths;
    -  int  comments;
    -  char *vendor;
    -
    -} vorbis_comment;
    -
    - -

    Parameters

    -
    -
    user_comments
    -
    Unlimited user comment array. The individual strings in the array are 8 bit clean, by the Vorbis specification, and as such the comment_lengths array should be consulted to determine string length. For convenience, each string is also NULL-terminated by the decode library (although Vorbis comments are not NULL terminated within the bitstream itself).
    -
    comment_lengths
    -
    An int array that stores the length of each comment string
    -
    comments
    -
    Int signifying number of user comments in user_comments field.
    -
    vendor
    -
    Information about the creator of the file. Stored in a standard C 0-terminated string.
    -
    - - -

    -
    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/doc/vorbis_info.html b/wolf3d/newCode/Tremor/doc/vorbis_info.html deleted file mode 100644 index bd938cd..0000000 --- a/wolf3d/newCode/Tremor/doc/vorbis_info.html +++ /dev/null @@ -1,80 +0,0 @@ - - - -Tremor - datatype - vorbis_info - - - - - - - - - -

    Tremor documentation

    Tremor version 1.0 - 20020403

    - -

    vorbis_info

    - -

    declared in "ivorbiscodec.h"

    - -

    -The vorbis_info structure contains basic information about the audio in a vorbis bitstream. -

    - - - - - -
    -
    typedef struct vorbis_info{
    -  int version;
    -  int channels;
    -  long rate;
    -  
    -  long bitrate_upper;
    -  long bitrate_nominal;
    -  long bitrate_lower;
    -  long bitrate_window;
    -
    -  void *codec_setup;
    -
    -} vorbis_info;
    -
    - -

    Relevant Struct Members

    -
    -
    version
    -
    Vorbis encoder version used to create this bitstream.
    -
    channels
    -
    Int signifying number of channels in bitstream.
    -
    rate
    -
    Sampling rate of the bitstream.
    -
    bitrate_upper
    -
    Specifies the upper limit in a VBR bitstream. If the value matches the bitrate_nominal and bitrate_lower parameters, the stream is fixed bitrate. May be unset if no limit exists.
    -
    bitrate_nominal
    -
    Specifies the average bitrate for a VBR bitstream. May be unset. If the bitrate_upper and bitrate_lower parameters match, the stream is fixed bitrate.
    -
    bitrate_lower
    -
    Specifies the lower limit in a VBR bitstream. If the value matches the bitrate_nominal and bitrate_upper parameters, the stream is fixed bitrate. May be unset if no limit exists.
    -
    bitrate_window
    -
    Currently unset.
    - -
    codec_setup
    -
    Internal structure that contains the detailed/unpacked configuration for decoding the current Vorbis bitstream.
    -
    - - -

    -
    - - - - - - - - -

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    - - - - diff --git a/wolf3d/newCode/Tremor/floor0.c b/wolf3d/newCode/Tremor/floor0.c deleted file mode 100644 index bdb83b8..0000000 --- a/wolf3d/newCode/Tremor/floor0.c +++ /dev/null @@ -1,435 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: floor backend 0 implementation - - ********************************************************************/ - -#include -#include -#include -#include "ogg.h" -#include "ivorbiscodec.h" -#include "codec_internal.h" -#include "registry.h" -#include "codebook.h" -#include "misc.h" -#include "block.h" - -#define LSP_FRACBITS 14 - -typedef struct { - long n; - int ln; - int m; - int *linearmap; - - vorbis_info_floor0 *vi; - ogg_int32_t *lsp_look; - -} vorbis_look_floor0; - -/*************** LSP decode ********************/ - -#include "lsp_lookup.h" - -/* interpolated 1./sqrt(p) where .5 <= a < 1. (.100000... to .111111...) in - 16.16 format - returns in m.8 format */ - -static long ADJUST_SQRT2[2]={8192,5792}; -STIN ogg_int32_t vorbis_invsqlook_i(long a,long e){ - long i=(a&0x7fff)>>(INVSQ_LOOKUP_I_SHIFT-1); - long d=a&INVSQ_LOOKUP_I_MASK; /* 0.10 */ - long val=INVSQ_LOOKUP_I[i]- /* 1.16 */ - ((INVSQ_LOOKUP_IDel[i]*d)>>INVSQ_LOOKUP_I_SHIFT); /* result 1.16 */ - val*=ADJUST_SQRT2[e&1]; - e=(e>>1)+21; - return(val>>e); -} - -/* interpolated lookup based fromdB function, domain -140dB to 0dB only */ -/* a is in n.12 format */ -STIN ogg_int32_t vorbis_fromdBlook_i(long a){ - int i=(-a)>>(12-FROMdB2_SHIFT); - if(i<0) return 0x7fffffff; - if(i>=(FROMdB_LOOKUP_SZ<>FROMdB_SHIFT] * FROMdB2_LOOKUP[i&FROMdB2_MASK]; -} - -/* interpolated lookup based cos function, domain 0 to PI only */ -/* a is in 0.16 format, where 0==0, 2^^16-1==PI, return 0.14 */ -STIN ogg_int32_t vorbis_coslook_i(long a){ - int i=a>>COS_LOOKUP_I_SHIFT; - int d=a&COS_LOOKUP_I_MASK; - return COS_LOOKUP_I[i]- ((d*(COS_LOOKUP_I[i]-COS_LOOKUP_I[i+1]))>> - COS_LOOKUP_I_SHIFT); -} - -/* interpolated lookup based cos function */ -/* a is in 0.16 format, where 0==0, 2^^16==PI, return .LSP_FRACBITS */ -STIN ogg_int32_t vorbis_coslook2_i(long a){ - a=a&0x1ffff; - - if(a>0x10000)a=0x20000-a; - { - int i=a>>COS_LOOKUP_I_SHIFT; - int d=a&COS_LOOKUP_I_MASK; - a=((COS_LOOKUP_I[i]<> - (COS_LOOKUP_I_SHIFT-LSP_FRACBITS+14); - } - - return(a); -} - -static const int barklook[28]={ - 0,100,200,301, 405,516,635,766, - 912,1077,1263,1476, 1720,2003,2333,2721, - 3184,3742,4428,5285, 6376,7791,9662,12181, - 15624,20397,27087,36554 -}; - -/* used in init only; interpolate the long way */ -STIN ogg_int32_t toBARK(int n){ - int i; - for(i=0;i<27;i++) - if(n>=barklook[i] && n>10)*0x517d)>>14; -#endif - - /* safeguard against a malicious stream */ - if(val<0 || (val>>COS_LOOKUP_I_SHIFT)>=COS_LOOKUP_I_SZ){ - memset(curve,0,sizeof(*curve)*n); - return; - } - - ilsp[i]=vorbis_coslook_i(val); - } - - i=0; - while(i>16); - qi=((qi*qi)>>16); - - if(m&1){ - qexp= qexp*2-28*((m+1)>>1)+m; - pi*=(1<<14)-((wi*wi)>>14); - qi+=pi>>14; - }else{ - qexp= qexp*2-13*m; - - pi*=(1<<14)-wi; - qi*=(1<<14)+wi; - - qi=(qi+pi)>>14; - } - - if(qi&0xffff0000){ /* checks for 1.xxxxxxxxxxxxxxxx */ - qi>>=1; qexp++; - }else - lsp_norm_asm(&qi,&qexp); - -#else - - qi*=labs(ilsp[0]-wi); - pi*=labs(ilsp[1]-wi); - - for(j=3;j>25])) - if(!(shift=MLOOP_2[(pi|qi)>>19])) - shift=MLOOP_3[(pi|qi)>>16]; - qi=(qi>>shift)*labs(ilsp[j-1]-wi); - pi=(pi>>shift)*labs(ilsp[j]-wi); - qexp+=shift; - } - if(!(shift=MLOOP_1[(pi|qi)>>25])) - if(!(shift=MLOOP_2[(pi|qi)>>19])) - shift=MLOOP_3[(pi|qi)>>16]; - - /* pi,qi normalized collectively, both tracked using qexp */ - - if(m&1){ - /* odd order filter; slightly assymetric */ - /* the last coefficient */ - qi=(qi>>shift)*labs(ilsp[j-1]-wi); - pi=(pi>>shift)<<14; - qexp+=shift; - - if(!(shift=MLOOP_1[(pi|qi)>>25])) - if(!(shift=MLOOP_2[(pi|qi)>>19])) - shift=MLOOP_3[(pi|qi)>>16]; - - pi>>=shift; - qi>>=shift; - qexp+=shift-14*((m+1)>>1); - - pi=((pi*pi)>>16); - qi=((qi*qi)>>16); - qexp=qexp*2+m; - - pi*=(1<<14)-((wi*wi)>>14); - qi+=pi>>14; - - }else{ - /* even order filter; still symmetric */ - - /* p*=p(1-w), q*=q(1+w), let normalization drift because it isn't - worth tracking step by step */ - - pi>>=shift; - qi>>=shift; - qexp+=shift-7*m; - - pi=((pi*pi)>>16); - qi=((qi*qi)>>16); - qexp=qexp*2+m; - - pi*=(1<<14)-wi; - qi*=(1<<14)+wi; - qi=(qi+pi)>>14; - - } - - - /* we've let the normalization drift because it wasn't important; - however, for the lookup, things must be normalized again. We - need at most one right shift or a number of left shifts */ - - if(qi&0xffff0000){ /* checks for 1.xxxxxxxxxxxxxxxx */ - qi>>=1; qexp++; - }else - while(qi && !(qi&0x8000)){ /* checks for 0.0xxxxxxxxxxxxxxx or less*/ - qi<<=1; qexp--; - } - -#endif - - amp=vorbis_fromdBlook_i(ampi* /* n.4 */ - vorbis_invsqlook_i(qi,qexp)- - /* m.8, m+n<=8 */ - ampoffseti); /* 8.12[0] */ - -#ifdef _LOW_ACCURACY_ - amp>>=9; -#endif - curve[i]= MULT31_SHIFT15(curve[i],amp); - while(map[++i]==k) curve[i]= MULT31_SHIFT15(curve[i],amp); - } -} - -/*************** vorbis decode glue ************/ - -static void floor0_free_info(vorbis_info_floor *i){ - vorbis_info_floor0 *info=(vorbis_info_floor0 *)i; - if(info){ - memset(info,0,sizeof(*info)); - _ogg_free(info); - } -} - -static void floor0_free_look(vorbis_look_floor *i){ - vorbis_look_floor0 *look=(vorbis_look_floor0 *)i; - if(look){ - - if(look->linearmap)_ogg_free(look->linearmap); - if(look->lsp_look)_ogg_free(look->lsp_look); - memset(look,0,sizeof(*look)); - _ogg_free(look); - } -} - -static vorbis_info_floor *floor0_unpack (vorbis_info *vi,oggpack_buffer *opb){ - codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; - int j; - - vorbis_info_floor0 *info=(vorbis_info_floor0 *)_ogg_malloc(sizeof(*info)); - info->order=oggpack_read(opb,8); - info->rate=oggpack_read(opb,16); - info->barkmap=oggpack_read(opb,16); - info->ampbits=oggpack_read(opb,6); - info->ampdB=oggpack_read(opb,8); - info->numbooks=oggpack_read(opb,4)+1; - - if(info->order<1)goto err_out; - if(info->rate<1)goto err_out; - if(info->barkmap<1)goto err_out; - if(info->numbooks<1)goto err_out; - - for(j=0;jnumbooks;j++){ - info->books[j]=oggpack_read(opb,8); - if(info->books[j]<0 || info->books[j]>=ci->books)goto err_out; - } - return(info); - - err_out: - floor0_free_info(info); - return(NULL); -} - -/* initialize Bark scale and normalization lookups. We could do this - with static tables, but Vorbis allows a number of possible - combinations, so it's best to do it computationally. - - The below is authoritative in terms of defining scale mapping. - Note that the scale depends on the sampling rate as well as the - linear block and mapping sizes */ - -static vorbis_look_floor *floor0_look (vorbis_dsp_state *vd,vorbis_info_mode *mi, - vorbis_info_floor *i){ - int j; - vorbis_info *vi=vd->vi; - codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; - vorbis_info_floor0 *info=(vorbis_info_floor0 *)i; - vorbis_look_floor0 *look=(vorbis_look_floor0 *)_ogg_calloc(1,sizeof(*look)); - look->m=info->order; - look->n=ci->blocksizes[mi->blockflag]/2; - look->ln=info->barkmap; - look->vi=info; - - /* the mapping from a linear scale to a smaller bark scale is - straightforward. We do *not* make sure that the linear mapping - does not skip bark-scale bins; the decoder simply skips them and - the encoder may do what it wishes in filling them. They're - necessary in some mapping combinations to keep the scale spacing - accurate */ - look->linearmap=(int *)_ogg_malloc((look->n+1)*sizeof(*look->linearmap)); - for(j=0;jn;j++){ - - int val=(look->ln* - ((toBARK(info->rate/2*j/look->n)<<11)/toBARK(info->rate/2)))>>11; - - if(val>=look->ln)val=look->ln-1; /* guard against the approximation */ - look->linearmap[j]=val; - } - look->linearmap[j]=-1; - - look->lsp_look=(ogg_int32_t *)_ogg_malloc(look->ln*sizeof(*look->lsp_look)); - for(j=0;jln;j++) - look->lsp_look[j]=vorbis_coslook2_i(0x10000*j/look->ln); - - return look; -} - -static void *floor0_inverse1(vorbis_block *vb,vorbis_look_floor *i){ - vorbis_look_floor0 *look=(vorbis_look_floor0 *)i; - vorbis_info_floor0 *info=look->vi; - int j,k; - - int ampraw=oggpack_read(&vb->opb,info->ampbits); - if(ampraw>0){ /* also handles the -1 out of data case */ - long maxval=(1<ampbits)-1; - int amp=((ampraw*info->ampdB)<<4)/maxval; - int booknum=oggpack_read(&vb->opb,_ilog(info->numbooks)); - - if(booknum!=-1 && booknumnumbooks){ /* be paranoid */ - codec_setup_info *ci=(codec_setup_info *)vb->vd->vi->codec_setup; - codebook *b=ci->fullbooks+info->books[booknum]; - ogg_int32_t last=0; - ogg_int32_t *lsp=(ogg_int32_t *)_vorbis_block_alloc(vb,sizeof(*lsp)*(look->m+1)); - - for(j=0;jm;j+=b->dim) - if(vorbis_book_decodev_set(b,lsp+j,&vb->opb,b->dim,-24)==-1)goto eop; - for(j=0;jm;){ - for(k=0;kdim;k++,j++)lsp[j]+=last; - last=lsp[j-1]; - } - - lsp[look->m]=amp; - return(lsp); - } - } - eop: - return(NULL); -} - -static int floor0_inverse2(vorbis_block *vb,vorbis_look_floor *i, - void *memo,ogg_int32_t *out){ - vorbis_look_floor0 *look=(vorbis_look_floor0 *)i; - vorbis_info_floor0 *info=look->vi; - - if(memo){ - ogg_int32_t *lsp=(ogg_int32_t *)memo; - ogg_int32_t amp=lsp[look->m]; - - /* take the coefficients back to a spectral envelope curve */ - vorbis_lsp_to_curve(out,look->linearmap,look->n,look->ln, - lsp,look->m,amp,info->ampdB,look->lsp_look); - return(1); - } - memset(out,0,sizeof(*out)*look->n); - return(0); -} - -/* export hooks */ -vorbis_func_floor floor0_exportbundle={ - &floor0_unpack,&floor0_look,&floor0_free_info, - &floor0_free_look,&floor0_inverse1,&floor0_inverse2 -}; - - diff --git a/wolf3d/newCode/Tremor/floor1.c b/wolf3d/newCode/Tremor/floor1.c deleted file mode 100644 index 276ed8d..0000000 --- a/wolf3d/newCode/Tremor/floor1.c +++ /dev/null @@ -1,441 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: floor backend 1 implementation - - ********************************************************************/ - -#include -#include -#include -#include "ogg.h" -#include "ivorbiscodec.h" -#include "codec_internal.h" -#include "registry.h" -#include "codebook.h" -#include "misc.h" -#include "block.h" - -#define floor1_rangedB 140 /* floor 1 fixed at -140dB to 0dB range */ - -typedef struct { - int forward_index[VIF_POSIT+2]; - - int hineighbor[VIF_POSIT]; - int loneighbor[VIF_POSIT]; - int posts; - - int n; - int quant_q; - vorbis_info_floor1 *vi; - -} vorbis_look_floor1; - -/***********************************************/ - -static void floor1_free_info(vorbis_info_floor *i){ - vorbis_info_floor1 *info=(vorbis_info_floor1 *)i; - if(info){ - memset(info,0,sizeof(*info)); - _ogg_free(info); - } -} - -static void floor1_free_look(vorbis_look_floor *i){ - vorbis_look_floor1 *look=(vorbis_look_floor1 *)i; - if(look){ - memset(look,0,sizeof(*look)); - _ogg_free(look); - } -} - -static int ilog(unsigned int v){ - int ret=0; - while(v){ - ret++; - v>>=1; - } - return(ret); -} - -static vorbis_info_floor *floor1_unpack (vorbis_info *vi,oggpack_buffer *opb){ - codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; - int j,k,count=0,maxclass=-1,rangebits; - - vorbis_info_floor1 *info=(vorbis_info_floor1 *)_ogg_calloc(1,sizeof(*info)); - /* read partitions */ - info->partitions=oggpack_read(opb,5); /* only 0 to 31 legal */ - for(j=0;jpartitions;j++){ - info->partitionclass[j]=oggpack_read(opb,4); /* only 0 to 15 legal */ - if(maxclasspartitionclass[j])maxclass=info->partitionclass[j]; - } - - /* read partition classes */ - for(j=0;jclass_dim[j]=oggpack_read(opb,3)+1; /* 1 to 8 */ - info->class_subs[j]=oggpack_read(opb,2); /* 0,1,2,3 bits */ - if(info->class_subs[j]<0) - goto err_out; - if(info->class_subs[j])info->class_book[j]=oggpack_read(opb,8); - if(info->class_book[j]<0 || info->class_book[j]>=ci->books) - goto err_out; - for(k=0;k<(1<class_subs[j]);k++){ - info->class_subbook[j][k]=oggpack_read(opb,8)-1; - if(info->class_subbook[j][k]<-1 || info->class_subbook[j][k]>=ci->books) - goto err_out; - } - } - - /* read the post list */ - info->mult=oggpack_read(opb,2)+1; /* only 1,2,3,4 legal now */ - rangebits=oggpack_read(opb,4); - - for(j=0,k=0;jpartitions;j++){ - count+=info->class_dim[info->partitionclass[j]]; - for(;kpostlist[k+2]=oggpack_read(opb,rangebits); - if(t<0 || t>=(1<postlist[0]=0; - info->postlist[1]=1<vi=info; - look->n=info->postlist[1]; - - /* we drop each position value in-between already decoded values, - and use linear interpolation to predict each new value past the - edges. The positions are read in the order of the position - list... we precompute the bounding positions in the lookup. Of - course, the neighbors can change (if a position is declined), but - this is an initial mapping */ - - for(i=0;ipartitions;i++)n+=info->class_dim[info->partitionclass[i]]; - n+=2; - look->posts=n; - - /* also store a sorted position index */ - for(i=0;ipostlist+i; - qsort(sortpointer,n,sizeof(*sortpointer),icomp); - - /* points from sort order back to range number */ - for(i=0;iforward_index[i]=sortpointer[i]-info->postlist; - - /* quantize values to multiplier spec */ - switch(info->mult){ - case 1: /* 1024 -> 256 */ - look->quant_q=256; - break; - case 2: /* 1024 -> 128 */ - look->quant_q=128; - break; - case 3: /* 1024 -> 86 */ - look->quant_q=86; - break; - case 4: /* 1024 -> 64 */ - look->quant_q=64; - break; - } - - /* discover our neighbors for decode where we don't use fit flags - (that would push the neighbors outward) */ - for(i=0;in; - int currentx=info->postlist[i+2]; - for(j=0;jpostlist[j]; - if(x>lx && xcurrentx){ - hi=j; - hx=x; - } - } - look->loneighbor[i]=lo; - look->hineighbor[i]=hi; - } - - return(look); -} - -static int render_point(int x0,int x1,int y0,int y1,int x){ - y0&=0x7fff; /* mask off flag */ - y1&=0x7fff; - - { - int dy=y1-y0; - int adx=x1-x0; - int ady=abs(dy); - int err=ady*(x-x0); - - int off=err/adx; - if(dy<0)return(y0-off); - return(y0+off); - } -} - -#ifdef _LOW_ACCURACY_ -# define XdB(n) ((((n)>>8)+1)>>1) -#else -# define XdB(n) (n) -#endif - -static const ogg_int32_t FLOOR_fromdB_LOOKUP[256]={ - XdB(0x000000e5), XdB(0x000000f4), XdB(0x00000103), XdB(0x00000114), - XdB(0x00000126), XdB(0x00000139), XdB(0x0000014e), XdB(0x00000163), - XdB(0x0000017a), XdB(0x00000193), XdB(0x000001ad), XdB(0x000001c9), - XdB(0x000001e7), XdB(0x00000206), XdB(0x00000228), XdB(0x0000024c), - XdB(0x00000272), XdB(0x0000029b), XdB(0x000002c6), XdB(0x000002f4), - XdB(0x00000326), XdB(0x0000035a), XdB(0x00000392), XdB(0x000003cd), - XdB(0x0000040c), XdB(0x00000450), XdB(0x00000497), XdB(0x000004e4), - XdB(0x00000535), XdB(0x0000058c), XdB(0x000005e8), XdB(0x0000064a), - XdB(0x000006b3), XdB(0x00000722), XdB(0x00000799), XdB(0x00000818), - XdB(0x0000089e), XdB(0x0000092e), XdB(0x000009c6), XdB(0x00000a69), - XdB(0x00000b16), XdB(0x00000bcf), XdB(0x00000c93), XdB(0x00000d64), - XdB(0x00000e43), XdB(0x00000f30), XdB(0x0000102d), XdB(0x0000113a), - XdB(0x00001258), XdB(0x0000138a), XdB(0x000014cf), XdB(0x00001629), - XdB(0x0000179a), XdB(0x00001922), XdB(0x00001ac4), XdB(0x00001c82), - XdB(0x00001e5c), XdB(0x00002055), XdB(0x0000226f), XdB(0x000024ac), - XdB(0x0000270e), XdB(0x00002997), XdB(0x00002c4b), XdB(0x00002f2c), - XdB(0x0000323d), XdB(0x00003581), XdB(0x000038fb), XdB(0x00003caf), - XdB(0x000040a0), XdB(0x000044d3), XdB(0x0000494c), XdB(0x00004e10), - XdB(0x00005323), XdB(0x0000588a), XdB(0x00005e4b), XdB(0x0000646b), - XdB(0x00006af2), XdB(0x000071e5), XdB(0x0000794c), XdB(0x0000812e), - XdB(0x00008993), XdB(0x00009283), XdB(0x00009c09), XdB(0x0000a62d), - XdB(0x0000b0f9), XdB(0x0000bc79), XdB(0x0000c8b9), XdB(0x0000d5c4), - XdB(0x0000e3a9), XdB(0x0000f274), XdB(0x00010235), XdB(0x000112fd), - XdB(0x000124dc), XdB(0x000137e4), XdB(0x00014c29), XdB(0x000161bf), - XdB(0x000178bc), XdB(0x00019137), XdB(0x0001ab4a), XdB(0x0001c70e), - XdB(0x0001e4a1), XdB(0x0002041f), XdB(0x000225aa), XdB(0x00024962), - XdB(0x00026f6d), XdB(0x000297f0), XdB(0x0002c316), XdB(0x0002f109), - XdB(0x000321f9), XdB(0x00035616), XdB(0x00038d97), XdB(0x0003c8b4), - XdB(0x000407a7), XdB(0x00044ab2), XdB(0x00049218), XdB(0x0004de23), - XdB(0x00052f1e), XdB(0x0005855c), XdB(0x0005e135), XdB(0x00064306), - XdB(0x0006ab33), XdB(0x00071a24), XdB(0x0007904b), XdB(0x00080e20), - XdB(0x00089422), XdB(0x000922da), XdB(0x0009bad8), XdB(0x000a5cb6), - XdB(0x000b091a), XdB(0x000bc0b1), XdB(0x000c8436), XdB(0x000d5471), - XdB(0x000e3233), XdB(0x000f1e5f), XdB(0x001019e4), XdB(0x001125c1), - XdB(0x00124306), XdB(0x001372d5), XdB(0x0014b663), XdB(0x00160ef7), - XdB(0x00177df0), XdB(0x001904c1), XdB(0x001aa4f9), XdB(0x001c603d), - XdB(0x001e384f), XdB(0x00202f0f), XdB(0x0022467a), XdB(0x002480b1), - XdB(0x0026dff7), XdB(0x002966b3), XdB(0x002c1776), XdB(0x002ef4fc), - XdB(0x0032022d), XdB(0x00354222), XdB(0x0038b828), XdB(0x003c67c2), - XdB(0x004054ae), XdB(0x004482e8), XdB(0x0048f6af), XdB(0x004db488), - XdB(0x0052c142), XdB(0x005821ff), XdB(0x005ddc33), XdB(0x0063f5b0), - XdB(0x006a74a7), XdB(0x00715faf), XdB(0x0078bdce), XdB(0x0080967f), - XdB(0x0088f1ba), XdB(0x0091d7f9), XdB(0x009b5247), XdB(0x00a56a41), - XdB(0x00b02a27), XdB(0x00bb9ce2), XdB(0x00c7ce12), XdB(0x00d4ca17), - XdB(0x00e29e20), XdB(0x00f15835), XdB(0x0101074b), XdB(0x0111bb4e), - XdB(0x01238531), XdB(0x01367704), XdB(0x014aa402), XdB(0x016020a7), - XdB(0x017702c3), XdB(0x018f6190), XdB(0x01a955cb), XdB(0x01c4f9cf), - XdB(0x01e269a8), XdB(0x0201c33b), XdB(0x0223265a), XdB(0x0246b4ea), - XdB(0x026c9302), XdB(0x0294e716), XdB(0x02bfda13), XdB(0x02ed9793), - XdB(0x031e4e09), XdB(0x03522ee4), XdB(0x03896ed0), XdB(0x03c445e2), - XdB(0x0402efd6), XdB(0x0445ac4b), XdB(0x048cbefc), XdB(0x04d87013), - XdB(0x05290c67), XdB(0x057ee5ca), XdB(0x05da5364), XdB(0x063bb204), - XdB(0x06a36485), XdB(0x0711d42b), XdB(0x0787710e), XdB(0x0804b299), - XdB(0x088a17ef), XdB(0x0918287e), XdB(0x09af747c), XdB(0x0a50957e), - XdB(0x0afc2f19), XdB(0x0bb2ef7f), XdB(0x0c759034), XdB(0x0d44d6ca), - XdB(0x0e2195bc), XdB(0x0f0cad0d), XdB(0x10070b62), XdB(0x1111aeea), - XdB(0x122da66c), XdB(0x135c120f), XdB(0x149e24d9), XdB(0x15f525b1), - XdB(0x176270e3), XdB(0x18e7794b), XdB(0x1a85c9ae), XdB(0x1c3f06d1), - XdB(0x1e14f07d), XdB(0x200963d7), XdB(0x221e5ccd), XdB(0x2455f870), - XdB(0x26b2770b), XdB(0x29363e2b), XdB(0x2be3db5c), XdB(0x2ebe06b6), - XdB(0x31c7a55b), XdB(0x3503ccd4), XdB(0x3875c5aa), XdB(0x3c210f44), - XdB(0x4009632b), XdB(0x4432b8cf), XdB(0x48a149bc), XdB(0x4d59959e), - XdB(0x52606733), XdB(0x57bad899), XdB(0x5d6e593a), XdB(0x6380b298), - XdB(0x69f80e9a), XdB(0x70dafda8), XdB(0x78307d76), XdB(0x7fffffff), -}; - -static void render_line(int n, int x0,int x1,int y0,int y1,ogg_int32_t *d){ - int dy=y1-y0; - int adx=x1-x0; - int ady=abs(dy); - int base=dy/adx; - int sy=(dy<0?base-1:base+1); - int x=x0; - int y=y0; - int err=0; - - if(n>x1)n=x1; - ady-=abs(base*adx); - - if(x=adx){ - err-=adx; - y+=sy; - }else{ - y+=base; - } - d[x]= MULT31_SHIFT15(d[x],FLOOR_fromdB_LOOKUP[y]); - } -} - -static void *floor1_inverse1(vorbis_block *vb,vorbis_look_floor *in){ - vorbis_look_floor1 *look=(vorbis_look_floor1 *)in; - vorbis_info_floor1 *info=look->vi; - codec_setup_info *ci=(codec_setup_info *)vb->vd->vi->codec_setup; - - int i,j,k; - codebook *books=ci->fullbooks; - - /* unpack wrapped/predicted values from stream */ - if(oggpack_read(&vb->opb,1)==1){ - int *fit_value=(int *)_vorbis_block_alloc(vb,(look->posts)*sizeof(*fit_value)); - - fit_value[0]=oggpack_read(&vb->opb,ilog(look->quant_q-1)); - fit_value[1]=oggpack_read(&vb->opb,ilog(look->quant_q-1)); - - /* partition by partition */ - /* partition by partition */ - for(i=0,j=2;ipartitions;i++){ - int classv=info->partitionclass[i]; - int cdim=info->class_dim[classv]; - int csubbits=info->class_subs[classv]; - int csub=1<class_book[classv],&vb->opb); - - if(cval==-1)goto eop; - } - - for(k=0;kclass_subbook[classv][cval&(csub-1)]; - cval>>=csubbits; - if(book>=0){ - if((fit_value[j+k]=vorbis_book_decode(books+book,&vb->opb))==-1) - goto eop; - }else{ - fit_value[j+k]=0; - } - } - j+=cdim; - } - - /* unwrap positive values and reconsitute via linear interpolation */ - for(i=2;iposts;i++){ - int predicted=render_point(info->postlist[look->loneighbor[i-2]], - info->postlist[look->hineighbor[i-2]], - fit_value[look->loneighbor[i-2]], - fit_value[look->hineighbor[i-2]], - info->postlist[i]); - int hiroom=look->quant_q-predicted; - int loroom=predicted; - int room=(hiroom=room){ - if(hiroom>loroom){ - val = val-loroom; - }else{ - val = -1-(val-hiroom); - } - }else{ - if(val&1){ - val= -((val+1)>>1); - }else{ - val>>=1; - } - } - - fit_value[i]=val+predicted; - fit_value[look->loneighbor[i-2]]&=0x7fff; - fit_value[look->hineighbor[i-2]]&=0x7fff; - - }else{ - fit_value[i]=predicted|0x8000; - } - - } - - return(fit_value); - } - eop: - return(NULL); -} - -static int floor1_inverse2(vorbis_block *vb,vorbis_look_floor *in,void *memo, - ogg_int32_t *out){ - vorbis_look_floor1 *look=(vorbis_look_floor1 *)in; - vorbis_info_floor1 *info=look->vi; - - codec_setup_info *ci=(codec_setup_info *)vb->vd->vi->codec_setup; - int n=ci->blocksizes[vb->W]/2; - int j; - - if(memo){ - /* render the lines */ - int *fit_value=(int *)memo; - int hx=0; - int lx=0; - int ly=fit_value[0]*info->mult; - for(j=1;jposts;j++){ - int current=look->forward_index[j]; - int hy=fit_value[current]&0x7fff; - if(hy==fit_value[current]){ - - hy*=info->mult; - hx=info->postlist[current]; - - render_line(n,lx,hx,ly,hy,out); - - lx=hx; - ly=hy; - } - } - for(j=hx;j -#include -#include "ogg.h" -#include "misc.h" - - -/* A complete description of Ogg framing exists in docs/framing.html */ - -/* basic, centralized Ogg memory management based on linked lists of - references to refcounted memory buffers. References and buffers - are both recycled. Buffers are passed around and consumed in - reference form. */ - -static ogg_buffer_state *ogg_buffer_create(void){ - ogg_buffer_state *bs=_ogg_calloc(1,sizeof(*bs)); - return bs; -} - -/* destruction is 'lazy'; there may be memory references outstanding, - and yanking the buffer state out from underneath would be - antisocial. Dealloc what is currently unused and have - _release_one watch for the stragglers to come in. When they do, - finish destruction. */ - -/* call the helper while holding lock */ -static void _ogg_buffer_destroy(ogg_buffer_state *bs){ - ogg_buffer *bt; - ogg_reference *rt; - - if(bs->shutdown){ - - bt=bs->unused_buffers; - rt=bs->unused_references; - - while(bt){ - ogg_buffer *b=bt; - bt=b->ptr.next; - if(b->data)_ogg_free(b->data); - _ogg_free(b); - } - bs->unused_buffers=0; - while(rt){ - ogg_reference *r=rt; - rt=r->next; - _ogg_free(r); - } - bs->unused_references=0; - - if(!bs->outstanding) - _ogg_free(bs); - - } -} - -static void ogg_buffer_destroy(ogg_buffer_state *bs){ - bs->shutdown=1; - _ogg_buffer_destroy(bs); -} - -static ogg_buffer *_fetch_buffer(ogg_buffer_state *bs,long bytes){ - ogg_buffer *ob; - bs->outstanding++; - - /* do we have an unused buffer sitting in the pool? */ - if(bs->unused_buffers){ - ob=bs->unused_buffers; - bs->unused_buffers=ob->ptr.next; - - /* if the unused buffer is too small, grow it */ - if(ob->sizedata=_ogg_realloc(ob->data,bytes); - ob->size=bytes; - } - }else{ - /* allocate a new buffer */ - ob=_ogg_malloc(sizeof(*ob)); - ob->data=_ogg_malloc(bytes<16?16:bytes); - ob->size=bytes; - } - - ob->refcount=1; - ob->ptr.owner=bs; - return ob; -} - -static ogg_reference *_fetch_ref(ogg_buffer_state *bs){ - ogg_reference *or; - bs->outstanding++; - - /* do we have an unused reference sitting in the pool? */ - if(bs->unused_references){ - or=bs->unused_references; - bs->unused_references=or->next; - }else{ - /* allocate a new reference */ - or=_ogg_malloc(sizeof(*or)); - } - - or->begin=0; - or->length=0; - or->next=0; - return or; -} - -/* fetch a reference pointing to a fresh, initially continguous buffer - of at least [bytes] length */ -static ogg_reference *ogg_buffer_alloc(ogg_buffer_state *bs,long bytes){ - ogg_buffer *ob=_fetch_buffer(bs,bytes); - ogg_reference *or=_fetch_ref(bs); - or->buffer=ob; - return or; -} - -/* enlarge the data buffer in the current link */ -static void ogg_buffer_realloc(ogg_reference *or,long bytes){ - ogg_buffer *ob=or->buffer; - - /* if the unused buffer is too small, grow it */ - if(ob->sizedata=_ogg_realloc(ob->data,bytes); - ob->size=bytes; - } -} - -static void _ogg_buffer_mark_one(ogg_reference *or){ - or->buffer->refcount++; -} - -/* increase the refcount of the buffers to which the reference points */ -static void ogg_buffer_mark(ogg_reference *or){ - while(or){ - _ogg_buffer_mark_one(or); - or=or->next; - } -} - -/* duplicate a reference (pointing to the same actual buffer memory) - and increment buffer refcount. If the desired segment begins out - of range, NULL is returned; if the desired segment is simply zero - length, a zero length ref is returned. Partial range overlap - returns the overlap of the ranges */ -static ogg_reference *ogg_buffer_sub(ogg_reference *or,long begin,long length){ - ogg_reference *ret=0,*head=0; - - /* walk past any preceeding fragments we don't want */ - while(or && begin>=or->length){ - begin-=or->length; - or=or->next; - } - - /* duplicate the reference chain; increment refcounts */ - while(or && length){ - ogg_reference *temp=_fetch_ref(or->buffer->ptr.owner); - if(head) - head->next=temp; - else - ret=temp; - head=temp; - head->buffer=or->buffer; - head->begin=or->begin+begin; - head->length=length; - if(head->length>or->length-begin) - head->length=or->length-begin; - - begin=0; - length-=head->length; - or=or->next; - } - - ogg_buffer_mark(ret); - return ret; -} - -ogg_reference *ogg_buffer_dup(ogg_reference *or){ - ogg_reference *ret=0,*head=0; - /* duplicate the reference chain; increment refcounts */ - while(or){ - ogg_reference *temp=_fetch_ref(or->buffer->ptr.owner); - if(head) - head->next=temp; - else - ret=temp; - head=temp; - head->buffer=or->buffer; - head->begin=or->begin; - head->length=or->length; - or=or->next; - } - - ogg_buffer_mark(ret); - return ret; -} - -/* split a reference into two references; 'return' is a reference to - the buffer preceeding pos and 'head'/'tail' are the buffer past the - split. If pos is at or past the end of the passed in segment, - 'head/tail' are NULL */ -static ogg_reference *ogg_buffer_split(ogg_reference **tail, - ogg_reference **head,long pos){ - - /* walk past any preceeding fragments to one of: - a) the exact boundary that seps two fragments - b) the fragment that needs split somewhere in the middle */ - ogg_reference *ret=*tail; - ogg_reference *or=*tail; - - while(or && pos>or->length){ - pos-=or->length; - or=or->next; - } - - if(!or || pos==0){ - - return 0; - - }else{ - - if(pos>=or->length){ - /* exact split, or off the end? */ - if(or->next){ - - /* a split */ - *tail=or->next; - or->next=0; - - }else{ - - /* off or at the end */ - *tail=*head=0; - - } - }else{ - - /* split within a fragment */ - long lengthA=pos; - long beginB=or->begin+pos; - long lengthB=or->length-pos; - - /* make a new reference to tail the second piece */ - *tail=_fetch_ref(or->buffer->ptr.owner); - - (*tail)->buffer=or->buffer; - (*tail)->begin=beginB; - (*tail)->length=lengthB; - (*tail)->next=or->next; - _ogg_buffer_mark_one(*tail); - if(head && or==*head)*head=*tail; - - /* update the first piece */ - or->next=0; - or->length=lengthA; - - } - } - return ret; -} - -static void ogg_buffer_release_one(ogg_reference *or){ - ogg_buffer *ob=or->buffer; - ogg_buffer_state *bs=ob->ptr.owner; - - ob->refcount--; - if(ob->refcount==0){ - bs->outstanding--; /* for the returned buffer */ - ob->ptr.next=bs->unused_buffers; - bs->unused_buffers=ob; - } - - bs->outstanding--; /* for the returned reference */ - or->next=bs->unused_references; - bs->unused_references=or; - - _ogg_buffer_destroy(bs); /* lazy cleanup (if needed) */ - -} - -/* release the references, decrease the refcounts of buffers to which - they point, release any buffers with a refcount that drops to zero */ -static void ogg_buffer_release(ogg_reference *or){ - while(or){ - ogg_reference *next=or->next; - ogg_buffer_release_one(or); - or=next; - } -} - -static ogg_reference *ogg_buffer_pretruncate(ogg_reference *or,long pos){ - /* release preceeding fragments we don't want */ - while(or && pos>=or->length){ - ogg_reference *next=or->next; - pos-=or->length; - ogg_buffer_release_one(or); - or=next; - } - if (or) { - or->begin+=pos; - or->length-=pos; - } - return or; -} - -static ogg_reference *ogg_buffer_walk(ogg_reference *or){ - if(!or)return NULL; - while(or->next){ - or=or->next; - } - return(or); -} - -/* *head is appended to the front end (head) of *tail; both continue to - be valid pointers, with *tail at the tail and *head at the head */ -static ogg_reference *ogg_buffer_cat(ogg_reference *tail, ogg_reference *head){ - if(!tail)return head; - - while(tail->next){ - tail=tail->next; - } - tail->next=head; - return ogg_buffer_walk(head); -} - -static void _positionB(oggbyte_buffer *b,int pos){ - if(pospos){ - /* start at beginning, scan forward */ - b->ref=b->baseref; - b->pos=0; - b->end=b->pos+b->ref->length; - b->ptr=b->ref->buffer->data+b->ref->begin; - } -} - -static void _positionF(oggbyte_buffer *b,int pos){ - /* scan forward for position */ - while(pos>=b->end){ - /* just seek forward */ - b->pos+=b->ref->length; - b->ref=b->ref->next; - b->end=b->ref->length+b->pos; - b->ptr=b->ref->buffer->data+b->ref->begin; - } -} - -static int oggbyte_init(oggbyte_buffer *b,ogg_reference *or){ - memset(b,0,sizeof(*b)); - if(or){ - b->ref=b->baseref=or; - b->pos=0; - b->end=b->ref->length; - b->ptr=b->ref->buffer->data+b->ref->begin; - return 0; - }else - return -1; -} - -static void oggbyte_set4(oggbyte_buffer *b,ogg_uint32_t val,int pos){ - int i; - _positionB(b,pos); - for(i=0;i<4;i++){ - _positionF(b,pos); - b->ptr[pos-b->pos]=val; - val>>=8; - ++pos; - } -} - -static unsigned char oggbyte_read1(oggbyte_buffer *b,int pos){ - _positionB(b,pos); - _positionF(b,pos); - return b->ptr[pos-b->pos]; -} - -static ogg_uint32_t oggbyte_read4(oggbyte_buffer *b,int pos){ - ogg_uint32_t ret; - _positionB(b,pos); - _positionF(b,pos); - ret=b->ptr[pos-b->pos]; - _positionF(b,++pos); - ret|=b->ptr[pos-b->pos]<<8; - _positionF(b,++pos); - ret|=b->ptr[pos-b->pos]<<16; - _positionF(b,++pos); - ret|=b->ptr[pos-b->pos]<<24; - return ret; -} - -static ogg_int64_t oggbyte_read8(oggbyte_buffer *b,int pos){ - ogg_int64_t ret; - unsigned char t[7]; - int i; - _positionB(b,pos); - for(i=0;i<7;i++){ - _positionF(b,pos); - t[i]=b->ptr[pos++ -b->pos]; - } - - _positionF(b,pos); - ret=b->ptr[pos-b->pos]; - - for(i=6;i>=0;--i) - ret= ret<<8 | t[i]; - - return ret; -} - -/* Now we get to the actual framing code */ - -int ogg_page_version(ogg_page *og){ - oggbyte_buffer ob; - oggbyte_init(&ob,og->header); - return oggbyte_read1(&ob,4); -} - -int ogg_page_continued(ogg_page *og){ - oggbyte_buffer ob; - oggbyte_init(&ob,og->header); - return oggbyte_read1(&ob,5)&0x01; -} - -int ogg_page_bos(ogg_page *og){ - oggbyte_buffer ob; - oggbyte_init(&ob,og->header); - return oggbyte_read1(&ob,5)&0x02; -} - -int ogg_page_eos(ogg_page *og){ - oggbyte_buffer ob; - oggbyte_init(&ob,og->header); - return oggbyte_read1(&ob,5)&0x04; -} - -ogg_int64_t ogg_page_granulepos(ogg_page *og){ - oggbyte_buffer ob; - oggbyte_init(&ob,og->header); - return oggbyte_read8(&ob,6); -} - -ogg_uint32_t ogg_page_serialno(ogg_page *og){ - oggbyte_buffer ob; - oggbyte_init(&ob,og->header); - return oggbyte_read4(&ob,14); -} - -ogg_uint32_t ogg_page_pageno(ogg_page *og){ - oggbyte_buffer ob; - oggbyte_init(&ob,og->header); - return oggbyte_read4(&ob,18); -} - -/* returns the number of packets that are completed on this page (if - the leading packet is begun on a previous page, but ends on this - page, it's counted */ - -/* NOTE: -If a page consists of a packet begun on a previous page, and a new -packet begun (but not completed) on this page, the return will be: - ogg_page_packets(page) ==1, - ogg_page_continued(page) !=0 - -If a page happens to be a single packet that was begun on a -previous page, and spans to the next page (in the case of a three or -more page packet), the return will be: - ogg_page_packets(page) ==0, - ogg_page_continued(page) !=0 -*/ - -int ogg_page_packets(ogg_page *og){ - int i; - int n; - int count=0; - oggbyte_buffer ob; - oggbyte_init(&ob,og->header); - - n=oggbyte_read1(&ob,26); - for(i=0;ibufferpool=ogg_buffer_create(); - return oy; -} - -int ogg_sync_destroy(ogg_sync_state *oy){ - if(oy){ - ogg_sync_reset(oy); - ogg_buffer_destroy(oy->bufferpool); - memset(oy,0,sizeof(*oy)); - _ogg_free(oy); - } - return OGG_SUCCESS; -} - -unsigned char *ogg_sync_bufferin(ogg_sync_state *oy, long bytes){ - - /* [allocate and] expose a buffer for data submission. - - If there is no head fragment - allocate one and expose it - else - if the current head fragment has sufficient unused space - expose it - else - if the current head fragment is unused - resize and expose it - else - allocate new fragment and expose it - */ - - /* base case; fifo uninitialized */ - if(!oy->fifo_head){ - oy->fifo_head=oy->fifo_tail=ogg_buffer_alloc(oy->bufferpool,bytes); - return oy->fifo_head->buffer->data; - } - - /* space left in current fragment case */ - if(oy->fifo_head->buffer->size- - oy->fifo_head->length- - oy->fifo_head->begin >= bytes) - return oy->fifo_head->buffer->data+ - oy->fifo_head->length+oy->fifo_head->begin; - - /* current fragment is unused, but too small */ - if(!oy->fifo_head->length){ - ogg_buffer_realloc(oy->fifo_head,bytes); - return oy->fifo_head->buffer->data+oy->fifo_head->begin; - } - - /* current fragment used/full; get new fragment */ - { - ogg_reference *new=ogg_buffer_alloc(oy->bufferpool,bytes); - oy->fifo_head->next=new; - oy->fifo_head=new; - } - return oy->fifo_head->buffer->data; -} - -int ogg_sync_wrote(ogg_sync_state *oy, long bytes){ - if(!oy->fifo_head)return OGG_EINVAL; - if(oy->fifo_head->buffer->size-oy->fifo_head->length-oy->fifo_head->begin < - bytes)return OGG_EINVAL; - oy->fifo_head->length+=bytes; - oy->fifo_fill+=bytes; - return OGG_SUCCESS; -} - -static ogg_uint32_t _checksum(ogg_reference *or, int bytes){ - ogg_uint32_t crc_reg=0; - int j,post; - - while(or){ - unsigned char *data=or->buffer->data+or->begin; - post=(byteslength?bytes:or->length); - for(j=0;j> 24)&0xff)^data[j]]; - bytes-=j; - or=or->next; - } - - return crc_reg; -} - - -/* sync the stream. This is meant to be useful for finding page - boundaries. - - return values for this: - -n) skipped n bytes - 0) page not ready; more data (no bytes skipped) - n) page synced at current location; page length n bytes - -*/ - -long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og){ - oggbyte_buffer page; - long bytes,ret=0; - - ogg_page_release(og); - - bytes=oy->fifo_fill; - oggbyte_init(&page,oy->fifo_tail); - - if(oy->headerbytes==0){ - if(bytes<27)goto sync_out; /* not enough for even a minimal header */ - - /* verify capture pattern */ - if(oggbyte_read1(&page,0)!=(int)'O' || - oggbyte_read1(&page,1)!=(int)'g' || - oggbyte_read1(&page,2)!=(int)'g' || - oggbyte_read1(&page,3)!=(int)'S' ) goto sync_fail; - - oy->headerbytes=oggbyte_read1(&page,26)+27; - } - if(bytesheaderbytes)goto sync_out; /* not enough for header + - seg table */ - if(oy->bodybytes==0){ - int i; - /* count up body length in the segment table */ - for(i=0;iheaderbytes-27;i++) - oy->bodybytes+=oggbyte_read1(&page,27+i); - } - - if(oy->bodybytes+oy->headerbytes>bytes)goto sync_out; - - /* we have what appears to be a complete page; last test: verify - checksum */ - { - ogg_uint32_t chksum=oggbyte_read4(&page,22); - oggbyte_set4(&page,0,22); - - /* Compare checksums; memory continues to be common access */ - if(chksum!=_checksum(oy->fifo_tail,oy->bodybytes+oy->headerbytes)){ - - /* D'oh. Mismatch! Corrupt page (or miscapture and not a page - at all). replace the computed checksum with the one actually - read in; remember all the memory is common access */ - - oggbyte_set4(&page,chksum,22); - goto sync_fail; - } - oggbyte_set4(&page,chksum,22); - } - - /* We have a page. Set up page return. */ - if(og){ - /* set up page output */ - og->header=ogg_buffer_split(&oy->fifo_tail,&oy->fifo_head,oy->headerbytes); - og->header_len=oy->headerbytes; - og->body=ogg_buffer_split(&oy->fifo_tail,&oy->fifo_head,oy->bodybytes); - og->body_len=oy->bodybytes; - }else{ - /* simply advance */ - oy->fifo_tail= - ogg_buffer_pretruncate(oy->fifo_tail,oy->headerbytes+oy->bodybytes); - if(!oy->fifo_tail)oy->fifo_head=0; - } - - ret=oy->headerbytes+oy->bodybytes; - oy->unsynced=0; - oy->headerbytes=0; - oy->bodybytes=0; - oy->fifo_fill-=ret; - - return ret; - - sync_fail: - - oy->headerbytes=0; - oy->bodybytes=0; - oy->fifo_tail=ogg_buffer_pretruncate(oy->fifo_tail,1); - ret--; - - /* search forward through fragments for possible capture */ - while(oy->fifo_tail){ - /* invariant: fifo_cursor points to a position in fifo_tail */ - unsigned char *now=oy->fifo_tail->buffer->data+oy->fifo_tail->begin; - unsigned char *next=memchr(now, 'O', oy->fifo_tail->length); - - if(next){ - /* possible capture in this segment */ - long bytes=next-now; - oy->fifo_tail=ogg_buffer_pretruncate(oy->fifo_tail,bytes); - ret-=bytes; - break; - }else{ - /* no capture. advance to next segment */ - long bytes=oy->fifo_tail->length; - ret-=bytes; - oy->fifo_tail=ogg_buffer_pretruncate(oy->fifo_tail,bytes); - } - } - if(!oy->fifo_tail)oy->fifo_head=0; - oy->fifo_fill+=ret; - - sync_out: - return ret; -} - -/* sync the stream and get a page. Keep trying until we find a page. - Supress 'sync errors' after reporting the first. - - return values: - OGG_HOLE) recapture (hole in data) - 0) need more data - 1) page returned - - Returns pointers into buffered data; invalidated by next call to - _stream, _clear, _init, or _buffer */ - -int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og){ - - /* all we need to do is verify a page at the head of the stream - buffer. If it doesn't verify, we look for the next potential - frame */ - - while(1){ - long ret=ogg_sync_pageseek(oy,og); - if(ret>0){ - /* have a page */ - return 1; - } - if(ret==0){ - /* need more data */ - return 0; - } - - /* head did not start a synced page... skipped some bytes */ - if(!oy->unsynced){ - oy->unsynced=1; - return OGG_HOLE; - } - - /* loop. keep looking */ - - } -} - -/* clear things to an initial state. Good to call, eg, before seeking */ -int ogg_sync_reset(ogg_sync_state *oy){ - - ogg_buffer_release(oy->fifo_tail); - oy->fifo_tail=0; - oy->fifo_head=0; - oy->fifo_fill=0; - - oy->unsynced=0; - oy->headerbytes=0; - oy->bodybytes=0; - return OGG_SUCCESS; -} - -ogg_stream_state *ogg_stream_create(int serialno){ - ogg_stream_state *os=_ogg_calloc(1,sizeof(*os)); - os->serialno=serialno; - os->pageno=-1; - return os; -} - -int ogg_stream_destroy(ogg_stream_state *os){ - if(os){ - ogg_buffer_release(os->header_tail); - ogg_buffer_release(os->body_tail); - memset(os,0,sizeof(*os)); - _ogg_free(os); - } - return OGG_SUCCESS; -} - - -#define FINFLAG 0x80000000UL -#define FINMASK 0x7fffffffUL - -static void _next_lace(oggbyte_buffer *ob,ogg_stream_state *os){ - /* search ahead one lace */ - os->body_fill_next=0; - while(os->laceptrlacing_fill){ - int val=oggbyte_read1(ob,27+os->laceptr++); - os->body_fill_next+=val; - if(val<255){ - os->body_fill_next|=FINFLAG; - os->clearflag=1; - break; - } - } -} - -static void _span_queued_page(ogg_stream_state *os){ - while( !(os->body_fill&FINFLAG) ){ - - if(!os->header_tail)break; - - /* first flush out preceeding page header (if any). Body is - flushed as it's consumed, so that's not done here. */ - - if(os->lacing_fill>=0) - os->header_tail=ogg_buffer_pretruncate(os->header_tail, - os->lacing_fill+27); - os->lacing_fill=0; - os->laceptr=0; - os->clearflag=0; - - if(!os->header_tail){ - os->header_head=0; - break; - }else{ - - /* process/prepare next page, if any */ - - long pageno; - oggbyte_buffer ob; - ogg_page og; /* only for parsing header values */ - og.header=os->header_tail; /* only for parsing header values */ - pageno=ogg_page_pageno(&og); - - oggbyte_init(&ob,os->header_tail); - os->lacing_fill=oggbyte_read1(&ob,26); - - /* are we in sequence? */ - if(pageno!=os->pageno){ - if(os->pageno==-1) /* indicates seek or reset */ - os->holeflag=1; /* set for internal use */ - else - os->holeflag=2; /* set for external reporting */ - - os->body_tail=ogg_buffer_pretruncate(os->body_tail, - os->body_fill); - if(os->body_tail==0)os->body_head=0; - os->body_fill=0; - - } - - if(ogg_page_continued(&og)){ - if(os->body_fill==0){ - /* continued packet, but no preceeding data to continue */ - /* dump the first partial packet on the page */ - _next_lace(&ob,os); - os->body_tail= - ogg_buffer_pretruncate(os->body_tail,os->body_fill_next&FINMASK); - if(os->body_tail==0)os->body_head=0; - /* set span flag */ - if(!os->spanflag && !os->holeflag)os->spanflag=2; - } - }else{ - if(os->body_fill>0){ - /* preceeding data to continue, but not a continued page */ - /* dump body_fill */ - os->body_tail=ogg_buffer_pretruncate(os->body_tail, - os->body_fill); - if(os->body_tail==0)os->body_head=0; - os->body_fill=0; - - /* set espan flag */ - if(!os->spanflag && !os->holeflag)os->spanflag=2; - } - } - - if(os->laceptrlacing_fill){ - os->granulepos=ogg_page_granulepos(&og); - - /* get current packet size & flag */ - _next_lace(&ob,os); - os->body_fill+=os->body_fill_next; /* addition handles the flag fine; - unsigned on purpose */ - /* ...and next packet size & flag */ - _next_lace(&ob,os); - - } - - os->pageno=pageno+1; - os->e_o_s=ogg_page_eos(&og); - os->b_o_s=ogg_page_bos(&og); - - } - } -} - -/* add the incoming page to the stream state; we decompose the page - into packet segments here as well. */ - -int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og){ - - int serialno=ogg_page_serialno(og); - int version=ogg_page_version(og); - - /* check the serial number */ - if(serialno!=os->serialno){ - ogg_page_release(og); - return OGG_ESERIAL; - } - if(version>0){ - ogg_page_release(og); - return OGG_EVERSION; - } - - /* add to fifos */ - if(!os->body_tail){ - os->body_tail=og->body; - os->body_head=ogg_buffer_walk(og->body); - }else{ - os->body_head=ogg_buffer_cat(os->body_head,og->body); - } - if(!os->header_tail){ - os->header_tail=og->header; - os->header_head=ogg_buffer_walk(og->header); - os->lacing_fill=-27; - }else{ - os->header_head=ogg_buffer_cat(os->header_head,og->header); - } - - memset(og,0,sizeof(*og)); - return OGG_SUCCESS; -} - -int ogg_stream_reset(ogg_stream_state *os){ - - ogg_buffer_release(os->header_tail); - ogg_buffer_release(os->body_tail); - os->header_tail=os->header_head=0; - os->body_tail=os->body_head=0; - - os->e_o_s=0; - os->b_o_s=0; - os->pageno=-1; - os->packetno=0; - os->granulepos=0; - - os->body_fill=0; - os->lacing_fill=0; - - os->holeflag=0; - os->spanflag=0; - os->clearflag=0; - os->laceptr=0; - os->body_fill_next=0; - - return OGG_SUCCESS; -} - -int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno){ - ogg_stream_reset(os); - os->serialno=serialno; - return OGG_SUCCESS; -} - -static int _packetout(ogg_stream_state *os,ogg_packet *op,int adv){ - - ogg_packet_release(op); - _span_queued_page(os); - - if(os->holeflag){ - int temp=os->holeflag; - if(os->clearflag) - os->holeflag=0; - else - os->holeflag=1; - if(temp==2){ - os->packetno++; - return OGG_HOLE; - } - } - if(os->spanflag){ - int temp=os->spanflag; - if(os->clearflag) - os->spanflag=0; - else - os->spanflag=1; - if(temp==2){ - os->packetno++; - return OGG_SPAN; - } - } - - if(!(os->body_fill&FINFLAG)) return 0; - if(!op && !adv)return 1; /* just using peek as an inexpensive way - to ask if there's a whole packet - waiting */ - if(op){ - op->b_o_s=os->b_o_s; - if(os->e_o_s && os->body_fill_next==0) - op->e_o_s=os->e_o_s; - else - op->e_o_s=0; - if( (os->body_fill&FINFLAG) && !(os->body_fill_next&FINFLAG) ) - op->granulepos=os->granulepos; - else - op->granulepos=-1; - op->packetno=os->packetno; - } - - if(adv){ - oggbyte_buffer ob; - oggbyte_init(&ob,os->header_tail); - - /* split the body contents off */ - if(op){ - op->packet=ogg_buffer_split(&os->body_tail,&os->body_head, - os->body_fill&FINMASK); - op->bytes=os->body_fill&FINMASK; - }else{ - os->body_tail=ogg_buffer_pretruncate(os->body_tail, - os->body_fill&FINMASK); - if(os->body_tail==0)os->body_head=0; - } - - /* update lacing pointers */ - os->body_fill=os->body_fill_next; - _next_lace(&ob,os); - }else{ - if(op){ - op->packet=ogg_buffer_sub(os->body_tail,0,os->body_fill&FINMASK); - op->bytes=os->body_fill&FINMASK; - } - } - - if(adv){ - os->packetno++; - os->b_o_s=0; - } - - return 1; -} - -int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op){ - return _packetout(os,op,1); -} - -int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op){ - return _packetout(os,op,0); -} - -int ogg_packet_release(ogg_packet *op) { - if(op){ - ogg_buffer_release(op->packet); - memset(op, 0, sizeof(*op)); - } - return OGG_SUCCESS; -} - -int ogg_page_release(ogg_page *og) { - if(og){ - ogg_buffer_release(og->header); - ogg_buffer_release(og->body); - memset(og, 0, sizeof(*og)); - } - return OGG_SUCCESS; -} - -void ogg_page_dup(ogg_page *dup,ogg_page *orig){ - dup->header_len=orig->header_len; - dup->body_len=orig->body_len; - dup->header=ogg_buffer_dup(orig->header); - dup->body=ogg_buffer_dup(orig->body); -} - diff --git a/wolf3d/newCode/Tremor/info.c b/wolf3d/newCode/Tremor/info.c deleted file mode 100644 index 33acf16..0000000 --- a/wolf3d/newCode/Tremor/info.c +++ /dev/null @@ -1,356 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: maintain the info structure, info <-> header packets - - ********************************************************************/ - -/* general handling of the header and the vorbis_info structure (and - substructures) */ - -#include -#include -#include -#include "ogg.h" -#include "ivorbiscodec.h" -#include "codec_internal.h" -#include "codebook.h" -#include "registry.h" -#include "window.h" -#include "misc.h" - -/* helpers */ -static void _v_readstring(oggpack_buffer *o,char *buf,int bytes){ - while(bytes--){ - *buf++=oggpack_read(o,8); - } -} - -void vorbis_comment_init(vorbis_comment *vc){ - memset(vc,0,sizeof(*vc)); -} - -/* This is more or less the same as strncasecmp - but that doesn't exist - * everywhere, and this is a fairly trivial function, so we include it */ -static int tagcompare(const char *s1, const char *s2, int n){ - int c=0; - while(c < n){ - if(toupper(s1[c]) != toupper(s2[c])) - return !0; - c++; - } - return 0; -} - -char *vorbis_comment_query(vorbis_comment *vc, char *tag, int count){ - long i; - int found = 0; - int taglen = strlen(tag)+1; /* +1 for the = we append */ - char *fulltag = (char *)alloca(taglen+ 1); - - strcpy(fulltag, tag); - strcat(fulltag, "="); - - for(i=0;icomments;i++){ - if(!tagcompare(vc->user_comments[i], fulltag, taglen)){ - if(count == found) - /* We return a pointer to the data, not a copy */ - return vc->user_comments[i] + taglen; - else - found++; - } - } - return NULL; /* didn't find anything */ -} - -int vorbis_comment_query_count(vorbis_comment *vc, char *tag){ - int i,count=0; - int taglen = strlen(tag)+1; /* +1 for the = we append */ - char *fulltag = (char *)alloca(taglen+1); - strcpy(fulltag,tag); - strcat(fulltag, "="); - - for(i=0;icomments;i++){ - if(!tagcompare(vc->user_comments[i], fulltag, taglen)) - count++; - } - - return count; -} - -void vorbis_comment_clear(vorbis_comment *vc){ - if(vc){ - long i; - for(i=0;icomments;i++) - if(vc->user_comments[i])_ogg_free(vc->user_comments[i]); - if(vc->user_comments)_ogg_free(vc->user_comments); - if(vc->comment_lengths)_ogg_free(vc->comment_lengths); - if(vc->vendor)_ogg_free(vc->vendor); - memset(vc,0,sizeof(*vc)); - } -} - -/* blocksize 0 is guaranteed to be short, 1 is guarantted to be long. - They may be equal, but short will never ge greater than long */ -int vorbis_info_blocksize(vorbis_info *vi,int zo){ - codec_setup_info *ci = (codec_setup_info *)vi->codec_setup; - return ci ? ci->blocksizes[zo] : -1; -} - -/* used by synthesis, which has a full, alloced vi */ -void vorbis_info_init(vorbis_info *vi){ - memset(vi,0,sizeof(*vi)); - vi->codec_setup=(codec_setup_info *)_ogg_calloc(1,sizeof(codec_setup_info)); -} - -void vorbis_info_clear(vorbis_info *vi){ - codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; - int i; - - if(ci){ - - for(i=0;imodes;i++) - if(ci->mode_param[i])_ogg_free(ci->mode_param[i]); - - for(i=0;imaps;i++) /* unpack does the range checking */ - if(ci->map_param[i]) - _mapping_P[ci->map_type[i]]->free_info(ci->map_param[i]); - - for(i=0;ifloors;i++) /* unpack does the range checking */ - if(ci->floor_param[i]) - _floor_P[ci->floor_type[i]]->free_info(ci->floor_param[i]); - - for(i=0;iresidues;i++) /* unpack does the range checking */ - if(ci->residue_param[i]) - _residue_P[ci->residue_type[i]]->free_info(ci->residue_param[i]); - - for(i=0;ibooks;i++){ - if(ci->book_param[i]){ - /* knows if the book was not alloced */ - vorbis_staticbook_destroy(ci->book_param[i]); - } - if(ci->fullbooks) - vorbis_book_clear(ci->fullbooks+i); - } - if(ci->fullbooks) - _ogg_free(ci->fullbooks); - - _ogg_free(ci); - } - - memset(vi,0,sizeof(*vi)); -} - -/* Header packing/unpacking ********************************************/ - -static int _vorbis_unpack_info(vorbis_info *vi,oggpack_buffer *opb){ - codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; - if(!ci)return(OV_EFAULT); - - vi->version=oggpack_read(opb,32); - if(vi->version!=0)return(OV_EVERSION); - - vi->channels=oggpack_read(opb,8); - vi->rate=oggpack_read(opb,32); - - vi->bitrate_upper=oggpack_read(opb,32); - vi->bitrate_nominal=oggpack_read(opb,32); - vi->bitrate_lower=oggpack_read(opb,32); - - ci->blocksizes[0]=1<blocksizes[1]=1<rate<1)goto err_out; - if(vi->channels<1)goto err_out; - if(ci->blocksizes[0]<64)goto err_out; - if(ci->blocksizes[1]blocksizes[0])goto err_out; - if(ci->blocksizes[1]>8192)goto err_out; - - if(oggpack_read(opb,1)!=1)goto err_out; /* EOP check */ - - return(0); - err_out: - vorbis_info_clear(vi); - return(OV_EBADHEADER); -} - -static int _vorbis_unpack_comment(vorbis_comment *vc,oggpack_buffer *opb){ - int i; - int vendorlen=oggpack_read(opb,32); - if(vendorlen<0)goto err_out; - vc->vendor=(char *)_ogg_calloc(vendorlen+1,1); - _v_readstring(opb,vc->vendor,vendorlen); - vc->comments=oggpack_read(opb,32); - if(vc->comments<0)goto err_out; - vc->user_comments=(char **)_ogg_calloc(vc->comments+1,sizeof(*vc->user_comments)); - vc->comment_lengths=(int *)_ogg_calloc(vc->comments+1, sizeof(*vc->comment_lengths)); - - for(i=0;icomments;i++){ - int len=oggpack_read(opb,32); - if(len<0)goto err_out; - vc->comment_lengths[i]=len; - vc->user_comments[i]=(char *)_ogg_calloc(len+1,1); - _v_readstring(opb,vc->user_comments[i],len); - } - if(oggpack_read(opb,1)!=1)goto err_out; /* EOP check */ - - return(0); - err_out: - vorbis_comment_clear(vc); - return(OV_EBADHEADER); -} - -/* all of the real encoding details are here. The modes, books, - everything */ -static int _vorbis_unpack_books(vorbis_info *vi,oggpack_buffer *opb){ - codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; - int i; - if(!ci)return(OV_EFAULT); - - /* codebooks */ - ci->books=oggpack_read(opb,8)+1; - /*ci->book_param=_ogg_calloc(ci->books,sizeof(*ci->book_param));*/ - for(i=0;ibooks;i++){ - ci->book_param[i]=(static_codebook *)_ogg_calloc(1,sizeof(*ci->book_param[i])); - if(vorbis_staticbook_unpack(opb,ci->book_param[i]))goto err_out; - } - - /* time backend settings */ - ci->times=oggpack_read(opb,6)+1; - /*ci->time_type=_ogg_malloc(ci->times*sizeof(*ci->time_type));*/ - /*ci->time_param=_ogg_calloc(ci->times,sizeof(void *));*/ - for(i=0;itimes;i++){ - ci->time_type[i]=oggpack_read(opb,16); - if(ci->time_type[i]<0 || ci->time_type[i]>=VI_TIMEB)goto err_out; - /* ci->time_param[i]=_time_P[ci->time_type[i]]->unpack(vi,opb); - Vorbis I has no time backend */ - /*if(!ci->time_param[i])goto err_out;*/ - } - - /* floor backend settings */ - ci->floors=oggpack_read(opb,6)+1; - /*ci->floor_type=_ogg_malloc(ci->floors*sizeof(*ci->floor_type));*/ - /*ci->floor_param=_ogg_calloc(ci->floors,sizeof(void *));*/ - for(i=0;ifloors;i++){ - ci->floor_type[i]=oggpack_read(opb,16); - if(ci->floor_type[i]<0 || ci->floor_type[i]>=VI_FLOORB)goto err_out; - ci->floor_param[i]=_floor_P[ci->floor_type[i]]->unpack(vi,opb); - if(!ci->floor_param[i])goto err_out; - } - - /* residue backend settings */ - ci->residues=oggpack_read(opb,6)+1; - /*ci->residue_type=_ogg_malloc(ci->residues*sizeof(*ci->residue_type));*/ - /*ci->residue_param=_ogg_calloc(ci->residues,sizeof(void *));*/ - for(i=0;iresidues;i++){ - ci->residue_type[i]=oggpack_read(opb,16); - if(ci->residue_type[i]<0 || ci->residue_type[i]>=VI_RESB)goto err_out; - ci->residue_param[i]=_residue_P[ci->residue_type[i]]->unpack(vi,opb); - if(!ci->residue_param[i])goto err_out; - } - - /* map backend settings */ - ci->maps=oggpack_read(opb,6)+1; - /*ci->map_type=_ogg_malloc(ci->maps*sizeof(*ci->map_type));*/ - /*ci->map_param=_ogg_calloc(ci->maps,sizeof(void *));*/ - for(i=0;imaps;i++){ - ci->map_type[i]=oggpack_read(opb,16); - if(ci->map_type[i]<0 || ci->map_type[i]>=VI_MAPB)goto err_out; - ci->map_param[i]=_mapping_P[ci->map_type[i]]->unpack(vi,opb); - if(!ci->map_param[i])goto err_out; - } - - /* mode settings */ - ci->modes=oggpack_read(opb,6)+1; - /*vi->mode_param=_ogg_calloc(vi->modes,sizeof(void *));*/ - for(i=0;imodes;i++){ - ci->mode_param[i]=(vorbis_info_mode *)_ogg_calloc(1,sizeof(*ci->mode_param[i])); - ci->mode_param[i]->blockflag=oggpack_read(opb,1); - ci->mode_param[i]->windowtype=oggpack_read(opb,16); - ci->mode_param[i]->transformtype=oggpack_read(opb,16); - ci->mode_param[i]->mapping=oggpack_read(opb,8); - - if(ci->mode_param[i]->windowtype>=VI_WINDOWB)goto err_out; - if(ci->mode_param[i]->transformtype>=VI_WINDOWB)goto err_out; - if(ci->mode_param[i]->mapping>=ci->maps)goto err_out; - } - - if(oggpack_read(opb,1)!=1)goto err_out; /* top level EOP check */ - - return(0); - err_out: - vorbis_info_clear(vi); - return(OV_EBADHEADER); -} - -/* The Vorbis header is in three packets; the initial small packet in - the first page that identifies basic parameters, a second packet - with bitstream comments and a third packet that holds the - codebook. */ - -int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,ogg_packet *op){ - oggpack_buffer opb; - - if(op){ - oggpack_readinit(&opb,op->packet); - - /* Which of the three types of header is this? */ - /* Also verify header-ness, vorbis */ - { - char buffer[6]; - int packtype=oggpack_read(&opb,8); - memset(buffer,0,6); - _v_readstring(&opb,buffer,6); - if(memcmp(buffer,"vorbis",6)){ - /* not a vorbis header */ - return(OV_ENOTVORBIS); - } - switch(packtype){ - case 0x01: /* least significant *bit* is read first */ - if(!op->b_o_s){ - /* Not the initial packet */ - return(OV_EBADHEADER); - } - if(vi->rate!=0){ - /* previously initialized info header */ - return(OV_EBADHEADER); - } - - return(_vorbis_unpack_info(vi,&opb)); - - case 0x03: /* least significant *bit* is read first */ - if(vi->rate==0){ - /* um... we didn't get the initial header */ - return(OV_EBADHEADER); - } - - return(_vorbis_unpack_comment(vc,&opb)); - - case 0x05: /* least significant *bit* is read first */ - if(vi->rate==0 || vc->vendor==NULL){ - /* um... we didn;t get the initial header or comments yet */ - return(OV_EBADHEADER); - } - - return(_vorbis_unpack_books(vi,&opb)); - - default: - /* Not a valid vorbis header type */ - return(OV_EBADHEADER); - break; - } - } - } - return(OV_EBADHEADER); -} - diff --git a/wolf3d/newCode/Tremor/ivorbiscodec.h b/wolf3d/newCode/Tremor/ivorbiscodec.h deleted file mode 100644 index d4de1fd..0000000 --- a/wolf3d/newCode/Tremor/ivorbiscodec.h +++ /dev/null @@ -1,202 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: libvorbis codec headers - - ********************************************************************/ - -#ifndef _vorbis_codec_h_ -#define _vorbis_codec_h_ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -#include "ogg.h" - -typedef struct vorbis_info{ - int version; - int channels; - long rate; - - /* The below bitrate declarations are *hints*. - Combinations of the three values carry the following implications: - - all three set to the same value: - implies a fixed rate bitstream - only nominal set: - implies a VBR stream that averages the nominal bitrate. No hard - upper/lower limit - upper and or lower set: - implies a VBR bitstream that obeys the bitrate limits. nominal - may also be set to give a nominal rate. - none set: - the coder does not care to speculate. - */ - - long bitrate_upper; - long bitrate_nominal; - long bitrate_lower; - long bitrate_window; - - void *codec_setup; -} vorbis_info; - -/* vorbis_dsp_state buffers the current vorbis audio - analysis/synthesis state. The DSP state belongs to a specific - logical bitstream ****************************************************/ -typedef struct vorbis_dsp_state{ - int analysisp; - vorbis_info *vi; - - ogg_int32_t **pcm; - ogg_int32_t **pcmret; - int pcm_storage; - int pcm_current; - int pcm_returned; - - int preextrapolate; - int eofflag; - - long lW; - long W; - long nW; - long centerW; - - ogg_int64_t granulepos; - ogg_int64_t sequence; - - void *backend_state; -} vorbis_dsp_state; - -typedef struct vorbis_block{ - /* necessary stream state for linking to the framing abstraction */ - ogg_int32_t **pcm; /* this is a pointer into local storage */ - oggpack_buffer opb; - - long lW; - long W; - long nW; - int pcmend; - int mode; - - int eofflag; - ogg_int64_t granulepos; - ogg_int64_t sequence; - vorbis_dsp_state *vd; /* For read-only access of configuration */ - - /* local storage to avoid remallocing; it's up to the mapping to - structure it */ - void *localstore; - long localtop; - long localalloc; - long totaluse; - struct alloc_chain *reap; - -} vorbis_block; - -/* vorbis_block is a single block of data to be processed as part of -the analysis/synthesis stream; it belongs to a specific logical -bitstream, but is independant from other vorbis_blocks belonging to -that logical bitstream. *************************************************/ - -struct alloc_chain{ - void *ptr; - struct alloc_chain *next; -}; - -/* vorbis_info contains all the setup information specific to the - specific compression/decompression mode in progress (eg, - psychoacoustic settings, channel setup, options, codebook - etc). vorbis_info and substructures are in backends.h. -*********************************************************************/ - -/* the comments are not part of vorbis_info so that vorbis_info can be - static storage */ -typedef struct vorbis_comment{ - /* unlimited user comment fields. libvorbis writes 'libvorbis' - whatever vendor is set to in encode */ - char **user_comments; - int *comment_lengths; - int comments; - char *vendor; - -} vorbis_comment; - - -/* libvorbis encodes in two abstraction layers; first we perform DSP - and produce a packet (see docs/analysis.txt). The packet is then - coded into a framed OggSquish bitstream by the second layer (see - docs/framing.txt). Decode is the reverse process; we sync/frame - the bitstream and extract individual packets, then decode the - packet back into PCM audio. - - The extra framing/packetizing is used in streaming formats, such as - files. Over the net (such as with UDP), the framing and - packetization aren't necessary as they're provided by the transport - and the streaming layer is not used */ - -/* Vorbis PRIMITIVES: general ***************************************/ - -extern void vorbis_info_init(vorbis_info *vi); -extern void vorbis_info_clear(vorbis_info *vi); -extern int vorbis_info_blocksize(vorbis_info *vi,int zo); -extern void vorbis_comment_init(vorbis_comment *vc); -extern void vorbis_comment_add(vorbis_comment *vc, char *comment); -extern void vorbis_comment_add_tag(vorbis_comment *vc, - char *tag, char *contents); -extern char *vorbis_comment_query(vorbis_comment *vc, char *tag, int count); -extern int vorbis_comment_query_count(vorbis_comment *vc, char *tag); -extern void vorbis_comment_clear(vorbis_comment *vc); - -extern int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb); -extern int vorbis_block_clear(vorbis_block *vb); -extern void vorbis_dsp_clear(vorbis_dsp_state *v); - -/* Vorbis PRIMITIVES: synthesis layer *******************************/ -extern int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc, - ogg_packet *op); - -extern int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi); -extern int vorbis_synthesis_restart(vorbis_dsp_state *v); -extern int vorbis_synthesis(vorbis_block *vb,ogg_packet *op,int decodep); -extern int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb); -extern int vorbis_synthesis_pcmout(vorbis_dsp_state *v,ogg_int32_t ***pcm); -extern int vorbis_synthesis_read(vorbis_dsp_state *v,int samples); -extern long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op); - -/* Vorbis ERRORS and return codes ***********************************/ - -#define OV_FALSE -1 -#define OV_EOF -2 -#define OV_HOLE -3 - -#define OV_EREAD -128 -#define OV_EFAULT -129 -#define OV_EIMPL -130 -#define OV_EINVAL -131 -#define OV_ENOTVORBIS -132 -#define OV_EBADHEADER -133 -#define OV_EVERSION -134 -#define OV_ENOTAUDIO -135 -#define OV_EBADPACKET -136 -#define OV_EBADLINK -137 -#define OV_ENOSEEK -138 - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif - diff --git a/wolf3d/newCode/Tremor/ivorbisfile.h b/wolf3d/newCode/Tremor/ivorbisfile.h deleted file mode 100644 index dd77378..0000000 --- a/wolf3d/newCode/Tremor/ivorbisfile.h +++ /dev/null @@ -1,130 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: stdio-based convenience library for opening/seeking/decoding - - ********************************************************************/ - -#ifndef _OV_FILE_H_ -#define _OV_FILE_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -#include -#include "ivorbiscodec.h" - -#define CHUNKSIZE 1024 -/* The function prototypes for the callbacks are basically the same as for - * the stdio functions fread, fseek, fclose, ftell. - * The one difference is that the FILE * arguments have been replaced with - * a void * - this is to be used as a pointer to whatever internal data these - * functions might need. In the stdio case, it's just a FILE * cast to a void * - * - * If you use other functions, check the docs for these functions and return - * the right values. For seek_func(), you *MUST* return -1 if the stream is - * unseekable - */ -typedef struct { - size_t (*read_func) (void *ptr, size_t size, size_t nmemb, void *datasource); - int (*seek_func) (void *datasource, ogg_int64_t offset, int whence); - int (*close_func) (void *datasource); - long (*tell_func) (void *datasource); -} ov_callbacks; - -#define NOTOPEN 0 -#define PARTOPEN 1 -#define OPENED 2 -#define STREAMSET 3 -#define INITSET 4 - -typedef struct OggVorbis_File { - void *datasource; /* Pointer to a FILE *, etc. */ - int seekable; - ogg_int64_t offset; - ogg_int64_t end; - ogg_sync_state *oy; - - /* If the FILE handle isn't seekable (eg, a pipe), only the current - stream appears */ - int links; - ogg_int64_t *offsets; - ogg_int64_t *dataoffsets; - ogg_uint32_t *serialnos; - ogg_int64_t *pcmlengths; - vorbis_info *vi; - vorbis_comment *vc; - - /* Decoding working state local storage */ - ogg_int64_t pcm_offset; - int ready_state; - ogg_uint32_t current_serialno; - int current_link; - - ogg_int64_t bittrack; - ogg_int64_t samptrack; - - ogg_stream_state *os; /* take physical pages, weld into a logical - stream of packets */ - vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */ - vorbis_block vb; /* local working space for packet->PCM decode */ - - ov_callbacks callbacks; - -} OggVorbis_File; - -extern int ov_clear(OggVorbis_File *vf); -extern int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes); -extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf, - char *initial, long ibytes, ov_callbacks callbacks); - -extern int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes); -extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf, - char *initial, long ibytes, ov_callbacks callbacks); -extern int ov_test_open(OggVorbis_File *vf); - -extern long ov_bitrate(OggVorbis_File *vf,int i); -extern long ov_bitrate_instant(OggVorbis_File *vf); -extern long ov_streams(OggVorbis_File *vf); -extern long ov_seekable(OggVorbis_File *vf); -extern long ov_serialnumber(OggVorbis_File *vf,int i); - -extern ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i); -extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i); -extern ogg_int64_t ov_time_total(OggVorbis_File *vf,int i); - -extern int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos); -extern int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos); -extern int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos); -extern int ov_time_seek(OggVorbis_File *vf,ogg_int64_t pos); -extern int ov_time_seek_page(OggVorbis_File *vf,ogg_int64_t pos); - -extern ogg_int64_t ov_raw_tell(OggVorbis_File *vf); -extern ogg_int64_t ov_pcm_tell(OggVorbis_File *vf); -extern ogg_int64_t ov_time_tell(OggVorbis_File *vf); - -extern vorbis_info *ov_info(OggVorbis_File *vf,int link); -extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link); - -extern long ov_read(OggVorbis_File *vf,char *buffer,int length, - int *bitstream); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif - - diff --git a/wolf3d/newCode/Tremor/ivorbisfile_example.c b/wolf3d/newCode/Tremor/ivorbisfile_example.c deleted file mode 100644 index c99cfd2..0000000 --- a/wolf3d/newCode/Tremor/ivorbisfile_example.c +++ /dev/null @@ -1,86 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: simple example decoder using vorbisidec - - ********************************************************************/ - -/* Takes a vorbis bitstream from stdin and writes raw stereo PCM to - stdout using vorbisfile. Using vorbisfile is much simpler than - dealing with libvorbis. */ - -#include -#include -#include "ivorbiscodec.h" -#include "ivorbisfile.h" - -#ifdef _WIN32 /* We need the following two to set stdin/stdout to binary */ -#include -#include -#endif - -char pcmout[4096]; /* take 4k out of the data segment, not the stack */ - -int main(){ - OggVorbis_File vf; - int eof=0; - int current_section; - -#ifdef _WIN32 /* We need to set stdin/stdout to binary mode. Damn windows. */ - /* Beware the evil ifdef. We avoid these where we can, but this one we - cannot. Don't add any more, you'll probably go to hell if you do. */ - _setmode( _fileno( stdin ), _O_BINARY ); - _setmode( _fileno( stdout ), _O_BINARY ); -#endif - - if(ov_open(stdin, &vf, NULL, 0) < 0) { - fprintf(stderr,"Input does not appear to be an Ogg bitstream.\n"); - exit(1); - } - - /* Throw the comments plus a few lines about the bitstream we're - decoding */ - { - char **ptr=ov_comment(&vf,-1)->user_comments; - vorbis_info *vi=ov_info(&vf,-1); - while(*ptr){ - fprintf(stderr,"%s\n",*ptr); - ++ptr; - } - fprintf(stderr,"\nBitstream is %d channel, %ldHz\n",vi->channels,vi->rate); - fprintf(stderr,"\nDecoded length: %ld samples\n", - (long)ov_pcm_total(&vf,-1)); - fprintf(stderr,"Encoded by: %s\n\n",ov_comment(&vf,-1)->vendor); - } - - while(!eof){ - long ret=ov_read(&vf,pcmout,sizeof(pcmout),¤t_section); - if (ret == 0) { - /* EOF */ - eof=1; - } else if (ret < 0) { - /* error in the stream. Not a problem, just reporting it in - case we (the app) cares. In this case, we don't. */ - } else { - /* we don't bother dealing with sample rate changes, etc, but - you'll have to*/ - fwrite(pcmout,1,ret,stdout); - } - } - - /* cleanup */ - ov_clear(&vf); - - fprintf(stderr,"Done.\n"); - return(0); -} diff --git a/wolf3d/newCode/Tremor/lsp_lookup.h b/wolf3d/newCode/Tremor/lsp_lookup.h deleted file mode 100644 index fa84851..0000000 --- a/wolf3d/newCode/Tremor/lsp_lookup.h +++ /dev/null @@ -1,136 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: lookup data - - ********************************************************************/ - -#ifndef _V_LOOKUP_DATA_H_ -#define _V_LOOKUP_DATA_H_ - -#include "os_types.h" - -#define FROMdB_LOOKUP_SZ 35 -#define FROMdB2_LOOKUP_SZ 32 -#define FROMdB_SHIFT 5 -#define FROMdB2_SHIFT 3 -#define FROMdB2_MASK 31 - -static const ogg_int32_t FROMdB_LOOKUP[FROMdB_LOOKUP_SZ]={ - 0x003fffff, 0x0028619b, 0x00197a96, 0x0010137a, - 0x000a24b0, 0x00066666, 0x000409c3, 0x00028c42, - 0x00019b8c, 0x000103ab, 0x0000a3d7, 0x00006760, - 0x0000413a, 0x00002928, 0x000019f8, 0x00001062, - 0x00000a56, 0x00000686, 0x0000041e, 0x00000299, - 0x000001a3, 0x00000109, 0x000000a7, 0x00000069, - 0x00000042, 0x0000002a, 0x0000001a, 0x00000011, - 0x0000000b, 0x00000007, 0x00000004, 0x00000003, - 0x00000002, 0x00000001, 0x00000001}; - -static const ogg_int32_t FROMdB2_LOOKUP[FROMdB2_LOOKUP_SZ]={ - 0x000001fc, 0x000001f5, 0x000001ee, 0x000001e7, - 0x000001e0, 0x000001d9, 0x000001d2, 0x000001cc, - 0x000001c5, 0x000001bf, 0x000001b8, 0x000001b2, - 0x000001ac, 0x000001a6, 0x000001a0, 0x0000019a, - 0x00000194, 0x0000018e, 0x00000188, 0x00000183, - 0x0000017d, 0x00000178, 0x00000172, 0x0000016d, - 0x00000168, 0x00000163, 0x0000015e, 0x00000159, - 0x00000154, 0x0000014f, 0x0000014a, 0x00000145, -}; - -#define INVSQ_LOOKUP_I_SHIFT 10 -#define INVSQ_LOOKUP_I_MASK 1023 -static const long INVSQ_LOOKUP_I[64+1]={ - 92682, 91966, 91267, 90583, - 89915, 89261, 88621, 87995, - 87381, 86781, 86192, 85616, - 85051, 84497, 83953, 83420, - 82897, 82384, 81880, 81385, - 80899, 80422, 79953, 79492, - 79039, 78594, 78156, 77726, - 77302, 76885, 76475, 76072, - 75674, 75283, 74898, 74519, - 74146, 73778, 73415, 73058, - 72706, 72359, 72016, 71679, - 71347, 71019, 70695, 70376, - 70061, 69750, 69444, 69141, - 68842, 68548, 68256, 67969, - 67685, 67405, 67128, 66855, - 66585, 66318, 66054, 65794, - 65536, -}; - -static const long INVSQ_LOOKUP_IDel[64]={ - 716, 699, 684, 668, - 654, 640, 626, 614, - 600, 589, 576, 565, - 554, 544, 533, 523, - 513, 504, 495, 486, - 477, 469, 461, 453, - 445, 438, 430, 424, - 417, 410, 403, 398, - 391, 385, 379, 373, - 368, 363, 357, 352, - 347, 343, 337, 332, - 328, 324, 319, 315, - 311, 306, 303, 299, - 294, 292, 287, 284, - 280, 277, 273, 270, - 267, 264, 260, 258, -}; - -#define COS_LOOKUP_I_SHIFT 9 -#define COS_LOOKUP_I_MASK 511 -#define COS_LOOKUP_I_SZ 128 -static const ogg_int32_t COS_LOOKUP_I[COS_LOOKUP_I_SZ+1]={ - 16384, 16379, 16364, 16340, - 16305, 16261, 16207, 16143, - 16069, 15986, 15893, 15791, - 15679, 15557, 15426, 15286, - 15137, 14978, 14811, 14635, - 14449, 14256, 14053, 13842, - 13623, 13395, 13160, 12916, - 12665, 12406, 12140, 11866, - 11585, 11297, 11003, 10702, - 10394, 10080, 9760, 9434, - 9102, 8765, 8423, 8076, - 7723, 7366, 7005, 6639, - 6270, 5897, 5520, 5139, - 4756, 4370, 3981, 3590, - 3196, 2801, 2404, 2006, - 1606, 1205, 804, 402, - 0, -401, -803, -1204, - -1605, -2005, -2403, -2800, - -3195, -3589, -3980, -4369, - -4755, -5138, -5519, -5896, - -6269, -6638, -7004, -7365, - -7722, -8075, -8422, -8764, - -9101, -9433, -9759, -10079, - -10393, -10701, -11002, -11296, - -11584, -11865, -12139, -12405, - -12664, -12915, -13159, -13394, - -13622, -13841, -14052, -14255, - -14448, -14634, -14810, -14977, - -15136, -15285, -15425, -15556, - -15678, -15790, -15892, -15985, - -16068, -16142, -16206, -16260, - -16304, -16339, -16363, -16378, - -16383, -}; - -#endif - - - - - diff --git a/wolf3d/newCode/Tremor/mapping0.c b/wolf3d/newCode/Tremor/mapping0.c deleted file mode 100644 index c54c896..0000000 --- a/wolf3d/newCode/Tremor/mapping0.c +++ /dev/null @@ -1,322 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: channel mapping 0 implementation - - ********************************************************************/ - -#include -#include -#include -#include -#include "ogg.h" -#include "ivorbiscodec.h" -#include "mdct.h" -#include "codec_internal.h" -#include "codebook.h" -#include "window.h" -#include "registry.h" -#include "misc.h" - -/* simplistic, wasteful way of doing this (unique lookup for each - mode/submapping); there should be a central repository for - identical lookups. That will require minor work, so I'm putting it - off as low priority. - - Why a lookup for each backend in a given mode? Because the - blocksize is set by the mode, and low backend lookups may require - parameters from other areas of the mode/mapping */ - -typedef struct { - vorbis_info_mode *mode; - vorbis_info_mapping0 *map; - - vorbis_look_floor **floor_look; - - vorbis_look_residue **residue_look; - - vorbis_func_floor **floor_func; - vorbis_func_residue **residue_func; - - int ch; - long lastframe; /* if a different mode is called, we need to - invalidate decay */ -} vorbis_look_mapping0; - -static void mapping0_free_info(vorbis_info_mapping *i){ - vorbis_info_mapping0 *info=(vorbis_info_mapping0 *)i; - if(info){ - memset(info,0,sizeof(*info)); - _ogg_free(info); - } -} - -static void mapping0_free_look(vorbis_look_mapping *look){ - int i; - vorbis_look_mapping0 *l=(vorbis_look_mapping0 *)look; - if(l){ - - for(i=0;imap->submaps;i++){ - l->floor_func[i]->free_look(l->floor_look[i]); - l->residue_func[i]->free_look(l->residue_look[i]); - } - - _ogg_free(l->floor_func); - _ogg_free(l->residue_func); - _ogg_free(l->floor_look); - _ogg_free(l->residue_look); - memset(l,0,sizeof(*l)); - _ogg_free(l); - } -} - -static vorbis_look_mapping *mapping0_look(vorbis_dsp_state *vd,vorbis_info_mode *vm, - vorbis_info_mapping *m){ - int i; - vorbis_info *vi=vd->vi; - codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; - vorbis_look_mapping0 *look=(vorbis_look_mapping0 *)_ogg_calloc(1,sizeof(*look)); - vorbis_info_mapping0 *info=look->map=(vorbis_info_mapping0 *)m; - look->mode=vm; - - look->floor_look=(vorbis_look_floor **)_ogg_calloc(info->submaps,sizeof(*look->floor_look)); - - look->residue_look=(vorbis_look_residue **)_ogg_calloc(info->submaps,sizeof(*look->residue_look)); - - look->floor_func=(vorbis_func_floor **)_ogg_calloc(info->submaps,sizeof(*look->floor_func)); - look->residue_func=(vorbis_func_residue **)_ogg_calloc(info->submaps,sizeof(*look->residue_func)); - - for(i=0;isubmaps;i++){ - int floornum=info->floorsubmap[i]; - int resnum=info->residuesubmap[i]; - - look->floor_func[i]=_floor_P[ci->floor_type[floornum]]; - look->floor_look[i]=look->floor_func[i]-> - look(vd,vm,ci->floor_param[floornum]); - look->residue_func[i]=_residue_P[ci->residue_type[resnum]]; - look->residue_look[i]=look->residue_func[i]-> - look(vd,vm,ci->residue_param[resnum]); - - } - - look->ch=vi->channels; - - return(look); -} - -static int ilog(unsigned int v){ - int ret=0; - if(v)--v; - while(v){ - ret++; - v>>=1; - } - return(ret); -} - -/* also responsible for range checking */ -static vorbis_info_mapping *mapping0_unpack(vorbis_info *vi,oggpack_buffer *opb){ - int i; - vorbis_info_mapping0 *info=(vorbis_info_mapping0 *)_ogg_calloc(1,sizeof(*info)); - codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; - memset(info,0,sizeof(*info)); - - if(oggpack_read(opb,1)) - info->submaps=oggpack_read(opb,4)+1; - else - info->submaps=1; - - if(oggpack_read(opb,1)){ - info->coupling_steps=oggpack_read(opb,8)+1; - - for(i=0;icoupling_steps;i++){ - int testM=info->coupling_mag[i]=oggpack_read(opb,ilog(vi->channels)); - int testA=info->coupling_ang[i]=oggpack_read(opb,ilog(vi->channels)); - - if(testM<0 || - testA<0 || - testM==testA || - testM>=vi->channels || - testA>=vi->channels) goto err_out; - } - - } - - if(oggpack_read(opb,2)>0)goto err_out; /* 2,3:reserved */ - - if(info->submaps>1){ - for(i=0;ichannels;i++){ - info->chmuxlist[i]=oggpack_read(opb,4); - if(info->chmuxlist[i]>=info->submaps)goto err_out; - } - } - for(i=0;isubmaps;i++){ - int temp=oggpack_read(opb,8); - if(temp>=ci->times)goto err_out; - info->floorsubmap[i]=oggpack_read(opb,8); - if(info->floorsubmap[i]>=ci->floors)goto err_out; - info->residuesubmap[i]=oggpack_read(opb,8); - if(info->residuesubmap[i]>=ci->residues)goto err_out; - } - - return info; - - err_out: - mapping0_free_info(info); - return(NULL); -} - -static int seq=0; -static int mapping0_inverse(vorbis_block *vb,vorbis_look_mapping *l){ - vorbis_dsp_state *vd=vb->vd; - vorbis_info *vi=vd->vi; - codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; - private_state *b=(private_state *)vd->backend_state; - vorbis_look_mapping0 *look=(vorbis_look_mapping0 *)l; - vorbis_info_mapping0 *info=look->map; - - int i,j; - long n=vb->pcmend=ci->blocksizes[vb->W]; - - ogg_int32_t **pcmbundle=(ogg_int32_t **)alloca(sizeof(*pcmbundle)*vi->channels); - int *zerobundle=(int *)alloca(sizeof(*zerobundle)*vi->channels); - - int *nonzero =(int *)alloca(sizeof(*nonzero)*vi->channels); - void **floormemo=(void **)alloca(sizeof(*floormemo)*vi->channels); - - /* time domain information decode (note that applying the - information would have to happen later; we'll probably add a - function entry to the harness for that later */ - /* NOT IMPLEMENTED */ - - /* recover the spectral envelope; store it in the PCM vector for now */ - for(i=0;ichannels;i++){ - int submap=info->chmuxlist[i]; - floormemo[i]=look->floor_func[submap]-> - inverse1(vb,look->floor_look[submap]); - if(floormemo[i]) - nonzero[i]=1; - else - nonzero[i]=0; - memset(vb->pcm[i],0,sizeof(*vb->pcm[i])*n/2); - } - - /* channel coupling can 'dirty' the nonzero listing */ - for(i=0;icoupling_steps;i++){ - if(nonzero[info->coupling_mag[i]] || - nonzero[info->coupling_ang[i]]){ - nonzero[info->coupling_mag[i]]=1; - nonzero[info->coupling_ang[i]]=1; - } - } - - /* recover the residue into our working vectors */ - for(i=0;isubmaps;i++){ - int ch_in_bundle=0; - for(j=0;jchannels;j++){ - if(info->chmuxlist[j]==i){ - if(nonzero[j]) - zerobundle[ch_in_bundle]=1; - else - zerobundle[ch_in_bundle]=0; - pcmbundle[ch_in_bundle++]=vb->pcm[j]; - } - } - - look->residue_func[i]->inverse(vb,look->residue_look[i], - pcmbundle,zerobundle,ch_in_bundle); - } - - //for(j=0;jchannels;j++) - //_analysis_output("coupled",seq+j,vb->pcm[j],-8,n/2,0,0); - - - /* channel coupling */ - for(i=info->coupling_steps-1;i>=0;i--){ - ogg_int32_t *pcmM=vb->pcm[info->coupling_mag[i]]; - ogg_int32_t *pcmA=vb->pcm[info->coupling_ang[i]]; - - for(j=0;j0) - if(ang>0){ - pcmM[j]=mag; - pcmA[j]=mag-ang; - }else{ - pcmA[j]=mag; - pcmM[j]=mag+ang; - } - else - if(ang>0){ - pcmM[j]=mag; - pcmA[j]=mag+ang; - }else{ - pcmA[j]=mag; - pcmM[j]=mag-ang; - } - } - } - - //for(j=0;jchannels;j++) - //_analysis_output("residue",seq+j,vb->pcm[j],-8,n/2,0,0); - - /* compute and apply spectral envelope */ - for(i=0;ichannels;i++){ - ogg_int32_t *pcm=vb->pcm[i]; - int submap=info->chmuxlist[i]; - look->floor_func[submap]-> - inverse2(vb,look->floor_look[submap],floormemo[i],pcm); - } - - //for(j=0;jchannels;j++) - //_analysis_output("mdct",seq+j,vb->pcm[j],-24,n/2,0,1); - - /* transform the PCM data; takes PCM vector, vb; modifies PCM vector */ - /* only MDCT right now.... */ - for(i=0;ichannels;i++){ - ogg_int32_t *pcm=vb->pcm[i]; - mdct_backward(n,pcm,pcm); - } - - //for(j=0;jchannels;j++) - //_analysis_output("imdct",seq+j,vb->pcm[j],-24,n,0,0); - - /* window the data */ - for(i=0;ichannels;i++){ - ogg_int32_t *pcm=vb->pcm[i]; - if(nonzero[i]) - _vorbis_apply_window(pcm,b->window,ci->blocksizes,vb->lW,vb->W,vb->nW); - else - for(j=0;jchannels;j++) - //_analysis_output("window",seq+j,vb->pcm[j],-24,n,0,0); - - seq+=vi->channels; - /* all done! */ - return(0); -} - -/* export hooks */ -vorbis_func_mapping mapping0_exportbundle={ - &mapping0_unpack, - &mapping0_look, - &mapping0_free_info, - &mapping0_free_look, - &mapping0_inverse -}; diff --git a/wolf3d/newCode/Tremor/mdct.c b/wolf3d/newCode/Tremor/mdct.c deleted file mode 100644 index 4f39e7d..0000000 --- a/wolf3d/newCode/Tremor/mdct.c +++ /dev/null @@ -1,510 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: normalized modified discrete cosine transform - power of two length transform only [64 <= n ] - last mod: $Id: mdct.c,v 1.9 2002/10/16 09:17:39 xiphmont Exp $ - - Original algorithm adapted long ago from _The use of multirate filter - banks for coding of high quality digital audio_, by T. Sporer, - K. Brandenburg and B. Edler, collection of the European Signal - Processing Conference (EUSIPCO), Amsterdam, June 1992, Vol.1, pp - 211-214 - - The below code implements an algorithm that no longer looks much like - that presented in the paper, but the basic structure remains if you - dig deep enough to see it. - - This module DOES NOT INCLUDE code to generate/apply the window - function. Everybody has their own weird favorite including me... I - happen to like the properties of y=sin(.5PI*sin^2(x)), but others may - vehemently disagree. - - ********************************************************************/ - -#include "ivorbiscodec.h" -#include "codebook.h" -#include "misc.h" -#include "mdct.h" -#include "mdct_lookup.h" - - -/* 8 point butterfly (in place) */ -STIN void mdct_butterfly_8(DATA_TYPE *x){ - - REG_TYPE r0 = x[4] + x[0]; - REG_TYPE r1 = x[4] - x[0]; - REG_TYPE r2 = x[5] + x[1]; - REG_TYPE r3 = x[5] - x[1]; - REG_TYPE r4 = x[6] + x[2]; - REG_TYPE r5 = x[6] - x[2]; - REG_TYPE r6 = x[7] + x[3]; - REG_TYPE r7 = x[7] - x[3]; - - x[0] = r5 + r3; - x[1] = r7 - r1; - x[2] = r5 - r3; - x[3] = r7 + r1; - x[4] = r4 - r0; - x[5] = r6 - r2; - x[6] = r4 + r0; - x[7] = r6 + r2; - MB(); -} - -/* 16 point butterfly (in place, 4 register) */ -STIN void mdct_butterfly_16(DATA_TYPE *x){ - - REG_TYPE r0, r1; - - r0 = x[ 0] - x[ 8]; x[ 8] += x[ 0]; - r1 = x[ 1] - x[ 9]; x[ 9] += x[ 1]; - x[ 0] = MULT31((r0 + r1) , cPI2_8); - x[ 1] = MULT31((r1 - r0) , cPI2_8); - MB(); - - r0 = x[10] - x[ 2]; x[10] += x[ 2]; - r1 = x[ 3] - x[11]; x[11] += x[ 3]; - x[ 2] = r1; x[ 3] = r0; - MB(); - - r0 = x[12] - x[ 4]; x[12] += x[ 4]; - r1 = x[13] - x[ 5]; x[13] += x[ 5]; - x[ 4] = MULT31((r0 - r1) , cPI2_8); - x[ 5] = MULT31((r0 + r1) , cPI2_8); - MB(); - - r0 = x[14] - x[ 6]; x[14] += x[ 6]; - r1 = x[15] - x[ 7]; x[15] += x[ 7]; - x[ 6] = r0; x[ 7] = r1; - MB(); - - mdct_butterfly_8(x); - mdct_butterfly_8(x+8); -} - -/* 32 point butterfly (in place, 4 register) */ -STIN void mdct_butterfly_32(DATA_TYPE *x){ - - REG_TYPE r0, r1; - - r0 = x[30] - x[14]; x[30] += x[14]; - r1 = x[31] - x[15]; x[31] += x[15]; - x[14] = r0; x[15] = r1; - MB(); - - r0 = x[28] - x[12]; x[28] += x[12]; - r1 = x[29] - x[13]; x[29] += x[13]; - XNPROD31( r0, r1, cPI1_8, cPI3_8, &x[12], &x[13] ); - MB(); - - r0 = x[26] - x[10]; x[26] += x[10]; - r1 = x[27] - x[11]; x[27] += x[11]; - x[10] = MULT31((r0 - r1) , cPI2_8); - x[11] = MULT31((r0 + r1) , cPI2_8); - MB(); - - r0 = x[24] - x[ 8]; x[24] += x[ 8]; - r1 = x[25] - x[ 9]; x[25] += x[ 9]; - XNPROD31( r0, r1, cPI3_8, cPI1_8, &x[ 8], &x[ 9] ); - MB(); - - r0 = x[22] - x[ 6]; x[22] += x[ 6]; - r1 = x[ 7] - x[23]; x[23] += x[ 7]; - x[ 6] = r1; x[ 7] = r0; - MB(); - - r0 = x[ 4] - x[20]; x[20] += x[ 4]; - r1 = x[ 5] - x[21]; x[21] += x[ 5]; - XPROD31 ( r0, r1, cPI3_8, cPI1_8, &x[ 4], &x[ 5] ); - MB(); - - r0 = x[ 2] - x[18]; x[18] += x[ 2]; - r1 = x[ 3] - x[19]; x[19] += x[ 3]; - x[ 2] = MULT31((r1 + r0) , cPI2_8); - x[ 3] = MULT31((r1 - r0) , cPI2_8); - MB(); - - r0 = x[ 0] - x[16]; x[16] += x[ 0]; - r1 = x[ 1] - x[17]; x[17] += x[ 1]; - XPROD31 ( r0, r1, cPI1_8, cPI3_8, &x[ 0], &x[ 1] ); - MB(); - - mdct_butterfly_16(x); - mdct_butterfly_16(x+16); -} - -/* N/stage point generic N stage butterfly (in place, 2 register) */ -STIN void mdct_butterfly_generic(DATA_TYPE *x,int points,int step){ - - LOOKUP_T *T = sincos_lookup0; - DATA_TYPE *x1 = x + points - 8; - DATA_TYPE *x2 = x + (points>>1) - 8; - REG_TYPE r0; - REG_TYPE r1; - - do{ - r0 = x1[6] - x2[6]; x1[6] += x2[6]; - r1 = x2[7] - x1[7]; x1[7] += x2[7]; - XPROD31( r1, r0, T[0], T[1], &x2[6], &x2[7] ); T+=step; - - r0 = x1[4] - x2[4]; x1[4] += x2[4]; - r1 = x2[5] - x1[5]; x1[5] += x2[5]; - XPROD31( r1, r0, T[0], T[1], &x2[4], &x2[5] ); T+=step; - - r0 = x1[2] - x2[2]; x1[2] += x2[2]; - r1 = x2[3] - x1[3]; x1[3] += x2[3]; - XPROD31( r1, r0, T[0], T[1], &x2[2], &x2[3] ); T+=step; - - r0 = x1[0] - x2[0]; x1[0] += x2[0]; - r1 = x2[1] - x1[1]; x1[1] += x2[1]; - XPROD31( r1, r0, T[0], T[1], &x2[0], &x2[1] ); T+=step; - - x1-=8; x2-=8; - }while(Tsincos_lookup0); - do{ - r0 = x2[6] - x1[6]; x1[6] += x2[6]; - r1 = x2[7] - x1[7]; x1[7] += x2[7]; - XPROD31( r0, r1, T[0], T[1], &x2[6], &x2[7] ); T+=step; - - r0 = x2[4] - x1[4]; x1[4] += x2[4]; - r1 = x2[5] - x1[5]; x1[5] += x2[5]; - XPROD31( r0, r1, T[0], T[1], &x2[4], &x2[5] ); T+=step; - - r0 = x2[2] - x1[2]; x1[2] += x2[2]; - r1 = x2[3] - x1[3]; x1[3] += x2[3]; - XPROD31( r0, r1, T[0], T[1], &x2[2], &x2[3] ); T+=step; - - r0 = x2[0] - x1[0]; x1[0] += x2[0]; - r1 = x2[1] - x1[1]; x1[1] += x2[1]; - XPROD31( r0, r1, T[0], T[1], &x2[0], &x2[1] ); T+=step; - - x1-=8; x2-=8; - }while(Tsincos_lookup0); -} - -STIN void mdct_butterflies(DATA_TYPE *x,int points,int shift){ - - int stages=8-shift; - int i,j; - - for(i=0;--stages>0;i++){ - for(j=0;j<(1<>i)*j,points>>i,4<<(i+shift)); - } - - for(j=0;j>8]|(bitrev[(x&0x0f0)>>4]<<4)|(((int)bitrev[x&0x00f])<<8); -} - -STIN void mdct_bitreverse(DATA_TYPE *x,int n,int step,int shift){ - - int bit = 0; - DATA_TYPE *w0 = x; - DATA_TYPE *w1 = x = w0+(n>>1); - LOOKUP_T *T = (step>=4)?(sincos_lookup0+(step>>1)):sincos_lookup1; - LOOKUP_T *Ttop = T+1024; - DATA_TYPE r2; - - do{ - DATA_TYPE r3 = bitrev12(bit++); - DATA_TYPE *x0 = x + ((r3 ^ 0xfff)>>shift) -1; - DATA_TYPE *x1 = x + (r3>>shift); - - REG_TYPE r0 = x0[0] + x1[0]; - REG_TYPE r1 = x1[1] - x0[1]; - - XPROD32( r0, r1, T[1], T[0], &r2, &r3 ); T+=step; - - w1 -= 4; - - r0 = (x0[1] + x1[1])>>1; - r1 = (x0[0] - x1[0])>>1; - w0[0] = r0 + r2; - w0[1] = r1 + r3; - w1[2] = r0 - r2; - w1[3] = r3 - r1; - - r3 = bitrev12(bit++); - x0 = x + ((r3 ^ 0xfff)>>shift) -1; - x1 = x + (r3>>shift); - - r0 = x0[0] + x1[0]; - r1 = x1[1] - x0[1]; - - XPROD32( r0, r1, T[1], T[0], &r2, &r3 ); T+=step; - - r0 = (x0[1] + x1[1])>>1; - r1 = (x0[0] - x1[0])>>1; - w0[2] = r0 + r2; - w0[3] = r1 + r3; - w1[0] = r0 - r2; - w1[1] = r3 - r1; - - w0 += 4; - }while(T>shift) -1; - DATA_TYPE *x1 = x + (r3>>shift); - - REG_TYPE r0 = x0[0] + x1[0]; - REG_TYPE r1 = x1[1] - x0[1]; - - T-=step; XPROD32( r0, r1, T[0], T[1], &r2, &r3 ); - - w1 -= 4; - - r0 = (x0[1] + x1[1])>>1; - r1 = (x0[0] - x1[0])>>1; - w0[0] = r0 + r2; - w0[1] = r1 + r3; - w1[2] = r0 - r2; - w1[3] = r3 - r1; - - r3 = bitrev12(bit++); - x0 = x + ((r3 ^ 0xfff)>>shift) -1; - x1 = x + (r3>>shift); - - r0 = x0[0] + x1[0]; - r1 = x1[1] - x0[1]; - - T-=step; XPROD32( r0, r1, T[0], T[1], &r2, &r3 ); - - r0 = (x0[1] + x1[1])>>1; - r1 = (x0[0] - x1[0])>>1; - w0[2] = r0 + r2; - w0[3] = r1 + r3; - w1[0] = r0 - r2; - w1[1] = r3 - r1; - - w0 += 4; - }while(w0>1; - int n4=n>>2; - DATA_TYPE *iX; - DATA_TYPE *oX; - LOOKUP_T *T; - LOOKUP_T *V; - int shift; - int step; - - for (shift=6;!(n&(1<=in+n4); - do{ - oX-=4; - XPROD31( iX[4], iX[6], T[1], T[0], &oX[2], &oX[3] ); T-=step; - XPROD31( iX[0], iX[2], T[1], T[0], &oX[0], &oX[1] ); T-=step; - iX-=8; - }while(iX>=in); - - iX = in+n2-8; - oX = out+n2+n4; - T = sincos_lookup0; - - do{ - T+=step; XNPROD31( iX[6], iX[4], T[0], T[1], &oX[0], &oX[1] ); - T+=step; XNPROD31( iX[2], iX[0], T[0], T[1], &oX[2], &oX[3] ); - iX-=8; - oX+=4; - }while(iX>=in+n4); - do{ - T-=step; XNPROD31( iX[6], iX[4], T[1], T[0], &oX[0], &oX[1] ); - T-=step; XNPROD31( iX[2], iX[0], T[1], T[0], &oX[2], &oX[3] ); - iX-=8; - oX+=4; - }while(iX>=in); - - mdct_butterflies(out+n2,n2,shift); - mdct_bitreverse(out,n,step,shift); - - /* rotate + window */ - - step>>=2; - { - DATA_TYPE *oX1=out+n2+n4; - DATA_TYPE *oX2=out+n2+n4; - DATA_TYPE *iX =out; - - switch(step) { - default: { - T=(step>=4)?(sincos_lookup0+(step>>1)):sincos_lookup1; - do{ - oX1-=4; - XPROD31( iX[0], -iX[1], T[0], T[1], &oX1[3], &oX2[0] ); T+=step; - XPROD31( iX[2], -iX[3], T[0], T[1], &oX1[2], &oX2[1] ); T+=step; - XPROD31( iX[4], -iX[5], T[0], T[1], &oX1[1], &oX2[2] ); T+=step; - XPROD31( iX[6], -iX[7], T[0], T[1], &oX1[0], &oX2[3] ); T+=step; - oX2+=4; - iX+=8; - }while(iX>1; - t1 = (*T++)>>1; - do{ - oX1-=4; - - t0 += (v0 = (*V++)>>1); - t1 += (v1 = (*V++)>>1); - XPROD31( iX[0], -iX[1], t0, t1, &oX1[3], &oX2[0] ); - v0 += (t0 = (*T++)>>1); - v1 += (t1 = (*T++)>>1); - XPROD31( iX[2], -iX[3], v0, v1, &oX1[2], &oX2[1] ); - t0 += (v0 = (*V++)>>1); - t1 += (v1 = (*V++)>>1); - XPROD31( iX[4], -iX[5], t0, t1, &oX1[1], &oX2[2] ); - v0 += (t0 = (*T++)>>1); - v1 += (t1 = (*T++)>>1); - XPROD31( iX[6], -iX[7], v0, v1, &oX1[0], &oX2[3] ); - - oX2+=4; - iX+=8; - }while(iX>2); - t1 += (q1 = (v1-t1)>>2); - XPROD31( iX[0], -iX[1], t0, t1, &oX1[3], &oX2[0] ); - t0 = v0-q0; - t1 = v1-q1; - XPROD31( iX[2], -iX[3], t0, t1, &oX1[2], &oX2[1] ); - - t0 = *T++; - t1 = *T++; - v0 += (q0 = (t0-v0)>>2); - v1 += (q1 = (t1-v1)>>2); - XPROD31( iX[4], -iX[5], v0, v1, &oX1[1], &oX2[2] ); - v0 = t0-q0; - v1 = t1-q1; - XPROD31( iX[6], -iX[7], v0, v1, &oX1[0], &oX2[3] ); - - oX2+=4; - iX+=8; - }while(iXoX2); - } -} - diff --git a/wolf3d/newCode/Tremor/mdct.h b/wolf3d/newCode/Tremor/mdct.h deleted file mode 100644 index 6d88907..0000000 --- a/wolf3d/newCode/Tremor/mdct.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: modified discrete cosine transform prototypes - - ********************************************************************/ - -#ifndef _OGG_mdct_H_ -#define _OGG_mdct_H_ - -#include "ivorbiscodec.h" -#include "misc.h" - -#define DATA_TYPE ogg_int32_t -#define REG_TYPE register ogg_int32_t - -#ifdef _LOW_ACCURACY_ -#define cPI3_8 (0x0062) -#define cPI2_8 (0x00b5) -#define cPI1_8 (0x00ed) -#else -#define cPI3_8 (0x30fbc54d) -#define cPI2_8 (0x5a82799a) -#define cPI1_8 (0x7641af3d) -#endif - -extern void mdct_forward(int n, DATA_TYPE *in, DATA_TYPE *out); -extern void mdct_backward(int n, DATA_TYPE *in, DATA_TYPE *out); - -#endif - - - - - - - - - - - - diff --git a/wolf3d/newCode/Tremor/mdct_lookup.h b/wolf3d/newCode/Tremor/mdct_lookup.h deleted file mode 100644 index 970e199..0000000 --- a/wolf3d/newCode/Tremor/mdct_lookup.h +++ /dev/null @@ -1,540 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: sin,cos lookup tables - - ********************************************************************/ - -#include "os_types.h" - -/* {sin(2*i*PI/4096), cos(2*i*PI/4096)}, with i = 0 to 512 */ -static LOOKUP_T sincos_lookup0[1026] = { - X(0x00000000), X(0x7fffffff), X(0x003243f5), X(0x7ffff621), - X(0x006487e3), X(0x7fffd886), X(0x0096cbc1), X(0x7fffa72c), - X(0x00c90f88), X(0x7fff6216), X(0x00fb5330), X(0x7fff0943), - X(0x012d96b1), X(0x7ffe9cb2), X(0x015fda03), X(0x7ffe1c65), - X(0x01921d20), X(0x7ffd885a), X(0x01c45ffe), X(0x7ffce093), - X(0x01f6a297), X(0x7ffc250f), X(0x0228e4e2), X(0x7ffb55ce), - X(0x025b26d7), X(0x7ffa72d1), X(0x028d6870), X(0x7ff97c18), - X(0x02bfa9a4), X(0x7ff871a2), X(0x02f1ea6c), X(0x7ff75370), - X(0x03242abf), X(0x7ff62182), X(0x03566a96), X(0x7ff4dbd9), - X(0x0388a9ea), X(0x7ff38274), X(0x03bae8b2), X(0x7ff21553), - X(0x03ed26e6), X(0x7ff09478), X(0x041f6480), X(0x7feeffe1), - X(0x0451a177), X(0x7fed5791), X(0x0483ddc3), X(0x7feb9b85), - X(0x04b6195d), X(0x7fe9cbc0), X(0x04e8543e), X(0x7fe7e841), - X(0x051a8e5c), X(0x7fe5f108), X(0x054cc7b1), X(0x7fe3e616), - X(0x057f0035), X(0x7fe1c76b), X(0x05b137df), X(0x7fdf9508), - X(0x05e36ea9), X(0x7fdd4eec), X(0x0615a48b), X(0x7fdaf519), - X(0x0647d97c), X(0x7fd8878e), X(0x067a0d76), X(0x7fd6064c), - X(0x06ac406f), X(0x7fd37153), X(0x06de7262), X(0x7fd0c8a3), - X(0x0710a345), X(0x7fce0c3e), X(0x0742d311), X(0x7fcb3c23), - X(0x077501be), X(0x7fc85854), X(0x07a72f45), X(0x7fc560cf), - X(0x07d95b9e), X(0x7fc25596), X(0x080b86c2), X(0x7fbf36aa), - X(0x083db0a7), X(0x7fbc040a), X(0x086fd947), X(0x7fb8bdb8), - X(0x08a2009a), X(0x7fb563b3), X(0x08d42699), X(0x7fb1f5fc), - X(0x09064b3a), X(0x7fae7495), X(0x09386e78), X(0x7faadf7c), - X(0x096a9049), X(0x7fa736b4), X(0x099cb0a7), X(0x7fa37a3c), - X(0x09cecf89), X(0x7f9faa15), X(0x0a00ece8), X(0x7f9bc640), - X(0x0a3308bd), X(0x7f97cebd), X(0x0a6522fe), X(0x7f93c38c), - X(0x0a973ba5), X(0x7f8fa4b0), X(0x0ac952aa), X(0x7f8b7227), - X(0x0afb6805), X(0x7f872bf3), X(0x0b2d7baf), X(0x7f82d214), - X(0x0b5f8d9f), X(0x7f7e648c), X(0x0b919dcf), X(0x7f79e35a), - X(0x0bc3ac35), X(0x7f754e80), X(0x0bf5b8cb), X(0x7f70a5fe), - X(0x0c27c389), X(0x7f6be9d4), X(0x0c59cc68), X(0x7f671a05), - X(0x0c8bd35e), X(0x7f62368f), X(0x0cbdd865), X(0x7f5d3f75), - X(0x0cefdb76), X(0x7f5834b7), X(0x0d21dc87), X(0x7f531655), - X(0x0d53db92), X(0x7f4de451), X(0x0d85d88f), X(0x7f489eaa), - X(0x0db7d376), X(0x7f434563), X(0x0de9cc40), X(0x7f3dd87c), - X(0x0e1bc2e4), X(0x7f3857f6), X(0x0e4db75b), X(0x7f32c3d1), - X(0x0e7fa99e), X(0x7f2d1c0e), X(0x0eb199a4), X(0x7f2760af), - X(0x0ee38766), X(0x7f2191b4), X(0x0f1572dc), X(0x7f1baf1e), - X(0x0f475bff), X(0x7f15b8ee), X(0x0f7942c7), X(0x7f0faf25), - X(0x0fab272b), X(0x7f0991c4), X(0x0fdd0926), X(0x7f0360cb), - X(0x100ee8ad), X(0x7efd1c3c), X(0x1040c5bb), X(0x7ef6c418), - X(0x1072a048), X(0x7ef05860), X(0x10a4784b), X(0x7ee9d914), - X(0x10d64dbd), X(0x7ee34636), X(0x11082096), X(0x7edc9fc6), - X(0x1139f0cf), X(0x7ed5e5c6), X(0x116bbe60), X(0x7ecf1837), - X(0x119d8941), X(0x7ec8371a), X(0x11cf516a), X(0x7ec14270), - X(0x120116d5), X(0x7eba3a39), X(0x1232d979), X(0x7eb31e78), - X(0x1264994e), X(0x7eabef2c), X(0x1296564d), X(0x7ea4ac58), - X(0x12c8106f), X(0x7e9d55fc), X(0x12f9c7aa), X(0x7e95ec1a), - X(0x132b7bf9), X(0x7e8e6eb2), X(0x135d2d53), X(0x7e86ddc6), - X(0x138edbb1), X(0x7e7f3957), X(0x13c0870a), X(0x7e778166), - X(0x13f22f58), X(0x7e6fb5f4), X(0x1423d492), X(0x7e67d703), - X(0x145576b1), X(0x7e5fe493), X(0x148715ae), X(0x7e57dea7), - X(0x14b8b17f), X(0x7e4fc53e), X(0x14ea4a1f), X(0x7e47985b), - X(0x151bdf86), X(0x7e3f57ff), X(0x154d71aa), X(0x7e37042a), - X(0x157f0086), X(0x7e2e9cdf), X(0x15b08c12), X(0x7e26221f), - X(0x15e21445), X(0x7e1d93ea), X(0x16139918), X(0x7e14f242), - X(0x16451a83), X(0x7e0c3d29), X(0x1676987f), X(0x7e0374a0), - X(0x16a81305), X(0x7dfa98a8), X(0x16d98a0c), X(0x7df1a942), - X(0x170afd8d), X(0x7de8a670), X(0x173c6d80), X(0x7ddf9034), - X(0x176dd9de), X(0x7dd6668f), X(0x179f429f), X(0x7dcd2981), - X(0x17d0a7bc), X(0x7dc3d90d), X(0x1802092c), X(0x7dba7534), - X(0x183366e9), X(0x7db0fdf8), X(0x1864c0ea), X(0x7da77359), - X(0x18961728), X(0x7d9dd55a), X(0x18c7699b), X(0x7d9423fc), - X(0x18f8b83c), X(0x7d8a5f40), X(0x192a0304), X(0x7d808728), - X(0x195b49ea), X(0x7d769bb5), X(0x198c8ce7), X(0x7d6c9ce9), - X(0x19bdcbf3), X(0x7d628ac6), X(0x19ef0707), X(0x7d58654d), - X(0x1a203e1b), X(0x7d4e2c7f), X(0x1a517128), X(0x7d43e05e), - X(0x1a82a026), X(0x7d3980ec), X(0x1ab3cb0d), X(0x7d2f0e2b), - X(0x1ae4f1d6), X(0x7d24881b), X(0x1b161479), X(0x7d19eebf), - X(0x1b4732ef), X(0x7d0f4218), X(0x1b784d30), X(0x7d048228), - X(0x1ba96335), X(0x7cf9aef0), X(0x1bda74f6), X(0x7ceec873), - X(0x1c0b826a), X(0x7ce3ceb2), X(0x1c3c8b8c), X(0x7cd8c1ae), - X(0x1c6d9053), X(0x7ccda169), X(0x1c9e90b8), X(0x7cc26de5), - X(0x1ccf8cb3), X(0x7cb72724), X(0x1d00843d), X(0x7cabcd28), - X(0x1d31774d), X(0x7ca05ff1), X(0x1d6265dd), X(0x7c94df83), - X(0x1d934fe5), X(0x7c894bde), X(0x1dc4355e), X(0x7c7da505), - X(0x1df5163f), X(0x7c71eaf9), X(0x1e25f282), X(0x7c661dbc), - X(0x1e56ca1e), X(0x7c5a3d50), X(0x1e879d0d), X(0x7c4e49b7), - X(0x1eb86b46), X(0x7c4242f2), X(0x1ee934c3), X(0x7c362904), - X(0x1f19f97b), X(0x7c29fbee), X(0x1f4ab968), X(0x7c1dbbb3), - X(0x1f7b7481), X(0x7c116853), X(0x1fac2abf), X(0x7c0501d2), - X(0x1fdcdc1b), X(0x7bf88830), X(0x200d888d), X(0x7bebfb70), - X(0x203e300d), X(0x7bdf5b94), X(0x206ed295), X(0x7bd2a89e), - X(0x209f701c), X(0x7bc5e290), X(0x20d0089c), X(0x7bb9096b), - X(0x21009c0c), X(0x7bac1d31), X(0x21312a65), X(0x7b9f1de6), - X(0x2161b3a0), X(0x7b920b89), X(0x219237b5), X(0x7b84e61f), - X(0x21c2b69c), X(0x7b77ada8), X(0x21f3304f), X(0x7b6a6227), - X(0x2223a4c5), X(0x7b5d039e), X(0x225413f8), X(0x7b4f920e), - X(0x22847de0), X(0x7b420d7a), X(0x22b4e274), X(0x7b3475e5), - X(0x22e541af), X(0x7b26cb4f), X(0x23159b88), X(0x7b190dbc), - X(0x2345eff8), X(0x7b0b3d2c), X(0x23763ef7), X(0x7afd59a4), - X(0x23a6887f), X(0x7aef6323), X(0x23d6cc87), X(0x7ae159ae), - X(0x24070b08), X(0x7ad33d45), X(0x243743fa), X(0x7ac50dec), - X(0x24677758), X(0x7ab6cba4), X(0x2497a517), X(0x7aa8766f), - X(0x24c7cd33), X(0x7a9a0e50), X(0x24f7efa2), X(0x7a8b9348), - X(0x25280c5e), X(0x7a7d055b), X(0x2558235f), X(0x7a6e648a), - X(0x2588349d), X(0x7a5fb0d8), X(0x25b84012), X(0x7a50ea47), - X(0x25e845b6), X(0x7a4210d8), X(0x26184581), X(0x7a332490), - X(0x26483f6c), X(0x7a24256f), X(0x26783370), X(0x7a151378), - X(0x26a82186), X(0x7a05eead), X(0x26d809a5), X(0x79f6b711), - X(0x2707ebc7), X(0x79e76ca7), X(0x2737c7e3), X(0x79d80f6f), - X(0x27679df4), X(0x79c89f6e), X(0x27976df1), X(0x79b91ca4), - X(0x27c737d3), X(0x79a98715), X(0x27f6fb92), X(0x7999dec4), - X(0x2826b928), X(0x798a23b1), X(0x2856708d), X(0x797a55e0), - X(0x288621b9), X(0x796a7554), X(0x28b5cca5), X(0x795a820e), - X(0x28e5714b), X(0x794a7c12), X(0x29150fa1), X(0x793a6361), - X(0x2944a7a2), X(0x792a37fe), X(0x29743946), X(0x7919f9ec), - X(0x29a3c485), X(0x7909a92d), X(0x29d34958), X(0x78f945c3), - X(0x2a02c7b8), X(0x78e8cfb2), X(0x2a323f9e), X(0x78d846fb), - X(0x2a61b101), X(0x78c7aba2), X(0x2a911bdc), X(0x78b6fda8), - X(0x2ac08026), X(0x78a63d11), X(0x2aefddd8), X(0x789569df), - X(0x2b1f34eb), X(0x78848414), X(0x2b4e8558), X(0x78738bb3), - X(0x2b7dcf17), X(0x786280bf), X(0x2bad1221), X(0x7851633b), - X(0x2bdc4e6f), X(0x78403329), X(0x2c0b83fa), X(0x782ef08b), - X(0x2c3ab2b9), X(0x781d9b65), X(0x2c69daa6), X(0x780c33b8), - X(0x2c98fbba), X(0x77fab989), X(0x2cc815ee), X(0x77e92cd9), - X(0x2cf72939), X(0x77d78daa), X(0x2d263596), X(0x77c5dc01), - X(0x2d553afc), X(0x77b417df), X(0x2d843964), X(0x77a24148), - X(0x2db330c7), X(0x7790583e), X(0x2de2211e), X(0x777e5cc3), - X(0x2e110a62), X(0x776c4edb), X(0x2e3fec8b), X(0x775a2e89), - X(0x2e6ec792), X(0x7747fbce), X(0x2e9d9b70), X(0x7735b6af), - X(0x2ecc681e), X(0x77235f2d), X(0x2efb2d95), X(0x7710f54c), - X(0x2f29ebcc), X(0x76fe790e), X(0x2f58a2be), X(0x76ebea77), - X(0x2f875262), X(0x76d94989), X(0x2fb5fab2), X(0x76c69647), - X(0x2fe49ba7), X(0x76b3d0b4), X(0x30133539), X(0x76a0f8d2), - X(0x3041c761), X(0x768e0ea6), X(0x30705217), X(0x767b1231), - X(0x309ed556), X(0x76680376), X(0x30cd5115), X(0x7654e279), - X(0x30fbc54d), X(0x7641af3d), X(0x312a31f8), X(0x762e69c4), - X(0x3158970e), X(0x761b1211), X(0x3186f487), X(0x7607a828), - X(0x31b54a5e), X(0x75f42c0b), X(0x31e39889), X(0x75e09dbd), - X(0x3211df04), X(0x75ccfd42), X(0x32401dc6), X(0x75b94a9c), - X(0x326e54c7), X(0x75a585cf), X(0x329c8402), X(0x7591aedd), - X(0x32caab6f), X(0x757dc5ca), X(0x32f8cb07), X(0x7569ca99), - X(0x3326e2c3), X(0x7555bd4c), X(0x3354f29b), X(0x75419de7), - X(0x3382fa88), X(0x752d6c6c), X(0x33b0fa84), X(0x751928e0), - X(0x33def287), X(0x7504d345), X(0x340ce28b), X(0x74f06b9e), - X(0x343aca87), X(0x74dbf1ef), X(0x3468aa76), X(0x74c7663a), - X(0x34968250), X(0x74b2c884), X(0x34c4520d), X(0x749e18cd), - X(0x34f219a8), X(0x7489571c), X(0x351fd918), X(0x74748371), - X(0x354d9057), X(0x745f9dd1), X(0x357b3f5d), X(0x744aa63f), - X(0x35a8e625), X(0x74359cbd), X(0x35d684a6), X(0x74208150), - X(0x36041ad9), X(0x740b53fb), X(0x3631a8b8), X(0x73f614c0), - X(0x365f2e3b), X(0x73e0c3a3), X(0x368cab5c), X(0x73cb60a8), - X(0x36ba2014), X(0x73b5ebd1), X(0x36e78c5b), X(0x73a06522), - X(0x3714f02a), X(0x738acc9e), X(0x37424b7b), X(0x73752249), - X(0x376f9e46), X(0x735f6626), X(0x379ce885), X(0x73499838), - X(0x37ca2a30), X(0x7333b883), X(0x37f76341), X(0x731dc70a), - X(0x382493b0), X(0x7307c3d0), X(0x3851bb77), X(0x72f1aed9), - X(0x387eda8e), X(0x72db8828), X(0x38abf0ef), X(0x72c54fc1), - X(0x38d8fe93), X(0x72af05a7), X(0x39060373), X(0x7298a9dd), - X(0x3932ff87), X(0x72823c67), X(0x395ff2c9), X(0x726bbd48), - X(0x398cdd32), X(0x72552c85), X(0x39b9bebc), X(0x723e8a20), - X(0x39e6975e), X(0x7227d61c), X(0x3a136712), X(0x7211107e), - X(0x3a402dd2), X(0x71fa3949), X(0x3a6ceb96), X(0x71e35080), - X(0x3a99a057), X(0x71cc5626), X(0x3ac64c0f), X(0x71b54a41), - X(0x3af2eeb7), X(0x719e2cd2), X(0x3b1f8848), X(0x7186fdde), - X(0x3b4c18ba), X(0x716fbd68), X(0x3b78a007), X(0x71586b74), - X(0x3ba51e29), X(0x71410805), X(0x3bd19318), X(0x7129931f), - X(0x3bfdfecd), X(0x71120cc5), X(0x3c2a6142), X(0x70fa74fc), - X(0x3c56ba70), X(0x70e2cbc6), X(0x3c830a50), X(0x70cb1128), - X(0x3caf50da), X(0x70b34525), X(0x3cdb8e09), X(0x709b67c0), - X(0x3d07c1d6), X(0x708378ff), X(0x3d33ec39), X(0x706b78e3), - X(0x3d600d2c), X(0x70536771), X(0x3d8c24a8), X(0x703b44ad), - X(0x3db832a6), X(0x7023109a), X(0x3de4371f), X(0x700acb3c), - X(0x3e10320d), X(0x6ff27497), X(0x3e3c2369), X(0x6fda0cae), - X(0x3e680b2c), X(0x6fc19385), X(0x3e93e950), X(0x6fa90921), - X(0x3ebfbdcd), X(0x6f906d84), X(0x3eeb889c), X(0x6f77c0b3), - X(0x3f1749b8), X(0x6f5f02b2), X(0x3f430119), X(0x6f463383), - X(0x3f6eaeb8), X(0x6f2d532c), X(0x3f9a5290), X(0x6f1461b0), - X(0x3fc5ec98), X(0x6efb5f12), X(0x3ff17cca), X(0x6ee24b57), - X(0x401d0321), X(0x6ec92683), X(0x40487f94), X(0x6eaff099), - X(0x4073f21d), X(0x6e96a99d), X(0x409f5ab6), X(0x6e7d5193), - X(0x40cab958), X(0x6e63e87f), X(0x40f60dfb), X(0x6e4a6e66), - X(0x4121589b), X(0x6e30e34a), X(0x414c992f), X(0x6e174730), - X(0x4177cfb1), X(0x6dfd9a1c), X(0x41a2fc1a), X(0x6de3dc11), - X(0x41ce1e65), X(0x6dca0d14), X(0x41f93689), X(0x6db02d29), - X(0x42244481), X(0x6d963c54), X(0x424f4845), X(0x6d7c3a98), - X(0x427a41d0), X(0x6d6227fa), X(0x42a5311b), X(0x6d48047e), - X(0x42d0161e), X(0x6d2dd027), X(0x42faf0d4), X(0x6d138afb), - X(0x4325c135), X(0x6cf934fc), X(0x4350873c), X(0x6cdece2f), - X(0x437b42e1), X(0x6cc45698), X(0x43a5f41e), X(0x6ca9ce3b), - X(0x43d09aed), X(0x6c8f351c), X(0x43fb3746), X(0x6c748b3f), - X(0x4425c923), X(0x6c59d0a9), X(0x4450507e), X(0x6c3f055d), - X(0x447acd50), X(0x6c242960), X(0x44a53f93), X(0x6c093cb6), - X(0x44cfa740), X(0x6bee3f62), X(0x44fa0450), X(0x6bd3316a), - X(0x452456bd), X(0x6bb812d1), X(0x454e9e80), X(0x6b9ce39b), - X(0x4578db93), X(0x6b81a3cd), X(0x45a30df0), X(0x6b66536b), - X(0x45cd358f), X(0x6b4af279), X(0x45f7526b), X(0x6b2f80fb), - X(0x4621647d), X(0x6b13fef5), X(0x464b6bbe), X(0x6af86c6c), - X(0x46756828), X(0x6adcc964), X(0x469f59b4), X(0x6ac115e2), - X(0x46c9405c), X(0x6aa551e9), X(0x46f31c1a), X(0x6a897d7d), - X(0x471cece7), X(0x6a6d98a4), X(0x4746b2bc), X(0x6a51a361), - X(0x47706d93), X(0x6a359db9), X(0x479a1d67), X(0x6a1987b0), - X(0x47c3c22f), X(0x69fd614a), X(0x47ed5be6), X(0x69e12a8c), - X(0x4816ea86), X(0x69c4e37a), X(0x48406e08), X(0x69a88c19), - X(0x4869e665), X(0x698c246c), X(0x48935397), X(0x696fac78), - X(0x48bcb599), X(0x69532442), X(0x48e60c62), X(0x69368bce), - X(0x490f57ee), X(0x6919e320), X(0x49389836), X(0x68fd2a3d), - X(0x4961cd33), X(0x68e06129), X(0x498af6df), X(0x68c387e9), - X(0x49b41533), X(0x68a69e81), X(0x49dd282a), X(0x6889a4f6), - X(0x4a062fbd), X(0x686c9b4b), X(0x4a2f2be6), X(0x684f8186), - X(0x4a581c9e), X(0x683257ab), X(0x4a8101de), X(0x68151dbe), - X(0x4aa9dba2), X(0x67f7d3c5), X(0x4ad2a9e2), X(0x67da79c3), - X(0x4afb6c98), X(0x67bd0fbd), X(0x4b2423be), X(0x679f95b7), - X(0x4b4ccf4d), X(0x67820bb7), X(0x4b756f40), X(0x676471c0), - X(0x4b9e0390), X(0x6746c7d8), X(0x4bc68c36), X(0x67290e02), - X(0x4bef092d), X(0x670b4444), X(0x4c177a6e), X(0x66ed6aa1), - X(0x4c3fdff4), X(0x66cf8120), X(0x4c6839b7), X(0x66b187c3), - X(0x4c9087b1), X(0x66937e91), X(0x4cb8c9dd), X(0x6675658c), - X(0x4ce10034), X(0x66573cbb), X(0x4d092ab0), X(0x66390422), - X(0x4d31494b), X(0x661abbc5), X(0x4d595bfe), X(0x65fc63a9), - X(0x4d8162c4), X(0x65ddfbd3), X(0x4da95d96), X(0x65bf8447), - X(0x4dd14c6e), X(0x65a0fd0b), X(0x4df92f46), X(0x65826622), - X(0x4e210617), X(0x6563bf92), X(0x4e48d0dd), X(0x6545095f), - X(0x4e708f8f), X(0x6526438f), X(0x4e984229), X(0x65076e25), - X(0x4ebfe8a5), X(0x64e88926), X(0x4ee782fb), X(0x64c99498), - X(0x4f0f1126), X(0x64aa907f), X(0x4f369320), X(0x648b7ce0), - X(0x4f5e08e3), X(0x646c59bf), X(0x4f857269), X(0x644d2722), - X(0x4faccfab), X(0x642de50d), X(0x4fd420a4), X(0x640e9386), - X(0x4ffb654d), X(0x63ef3290), X(0x50229da1), X(0x63cfc231), - X(0x5049c999), X(0x63b0426d), X(0x5070e92f), X(0x6390b34a), - X(0x5097fc5e), X(0x637114cc), X(0x50bf031f), X(0x635166f9), - X(0x50e5fd6d), X(0x6331a9d4), X(0x510ceb40), X(0x6311dd64), - X(0x5133cc94), X(0x62f201ac), X(0x515aa162), X(0x62d216b3), - X(0x518169a5), X(0x62b21c7b), X(0x51a82555), X(0x6292130c), - X(0x51ced46e), X(0x6271fa69), X(0x51f576ea), X(0x6251d298), - X(0x521c0cc2), X(0x62319b9d), X(0x524295f0), X(0x6211557e), - X(0x5269126e), X(0x61f1003f), X(0x528f8238), X(0x61d09be5), - X(0x52b5e546), X(0x61b02876), X(0x52dc3b92), X(0x618fa5f7), - X(0x53028518), X(0x616f146c), X(0x5328c1d0), X(0x614e73da), - X(0x534ef1b5), X(0x612dc447), X(0x537514c2), X(0x610d05b7), - X(0x539b2af0), X(0x60ec3830), X(0x53c13439), X(0x60cb5bb7), - X(0x53e73097), X(0x60aa7050), X(0x540d2005), X(0x60897601), - X(0x5433027d), X(0x60686ccf), X(0x5458d7f9), X(0x604754bf), - X(0x547ea073), X(0x60262dd6), X(0x54a45be6), X(0x6004f819), - X(0x54ca0a4b), X(0x5fe3b38d), X(0x54efab9c), X(0x5fc26038), - X(0x55153fd4), X(0x5fa0fe1f), X(0x553ac6ee), X(0x5f7f8d46), - X(0x556040e2), X(0x5f5e0db3), X(0x5585adad), X(0x5f3c7f6b), - X(0x55ab0d46), X(0x5f1ae274), X(0x55d05faa), X(0x5ef936d1), - X(0x55f5a4d2), X(0x5ed77c8a), X(0x561adcb9), X(0x5eb5b3a2), - X(0x56400758), X(0x5e93dc1f), X(0x566524aa), X(0x5e71f606), - X(0x568a34a9), X(0x5e50015d), X(0x56af3750), X(0x5e2dfe29), - X(0x56d42c99), X(0x5e0bec6e), X(0x56f9147e), X(0x5de9cc33), - X(0x571deefa), X(0x5dc79d7c), X(0x5742bc06), X(0x5da5604f), - X(0x57677b9d), X(0x5d8314b1), X(0x578c2dba), X(0x5d60baa7), - X(0x57b0d256), X(0x5d3e5237), X(0x57d5696d), X(0x5d1bdb65), - X(0x57f9f2f8), X(0x5cf95638), X(0x581e6ef1), X(0x5cd6c2b5), - X(0x5842dd54), X(0x5cb420e0), X(0x58673e1b), X(0x5c9170bf), - X(0x588b9140), X(0x5c6eb258), X(0x58afd6bd), X(0x5c4be5b0), - X(0x58d40e8c), X(0x5c290acc), X(0x58f838a9), X(0x5c0621b2), - X(0x591c550e), X(0x5be32a67), X(0x594063b5), X(0x5bc024f0), - X(0x59646498), X(0x5b9d1154), X(0x598857b2), X(0x5b79ef96), - X(0x59ac3cfd), X(0x5b56bfbd), X(0x59d01475), X(0x5b3381ce), - X(0x59f3de12), X(0x5b1035cf), X(0x5a1799d1), X(0x5aecdbc5), - X(0x5a3b47ab), X(0x5ac973b5), X(0x5a5ee79a), X(0x5aa5fda5), - X(0x5a82799a), X(0x5a82799a) - }; - - /* {sin((2*i+1)*PI/4096), cos((2*i+1)*PI/4096)}, with i = 0 to 511 */ -static LOOKUP_T sincos_lookup1[1024] = { - X(0x001921fb), X(0x7ffffd88), X(0x004b65ee), X(0x7fffe9cb), - X(0x007da9d4), X(0x7fffc251), X(0x00afeda8), X(0x7fff8719), - X(0x00e23160), X(0x7fff3824), X(0x011474f6), X(0x7ffed572), - X(0x0146b860), X(0x7ffe5f03), X(0x0178fb99), X(0x7ffdd4d7), - X(0x01ab3e97), X(0x7ffd36ee), X(0x01dd8154), X(0x7ffc8549), - X(0x020fc3c6), X(0x7ffbbfe6), X(0x024205e8), X(0x7ffae6c7), - X(0x027447b0), X(0x7ff9f9ec), X(0x02a68917), X(0x7ff8f954), - X(0x02d8ca16), X(0x7ff7e500), X(0x030b0aa4), X(0x7ff6bcf0), - X(0x033d4abb), X(0x7ff58125), X(0x036f8a51), X(0x7ff4319d), - X(0x03a1c960), X(0x7ff2ce5b), X(0x03d407df), X(0x7ff1575d), - X(0x040645c7), X(0x7fefcca4), X(0x04388310), X(0x7fee2e30), - X(0x046abfb3), X(0x7fec7c02), X(0x049cfba7), X(0x7feab61a), - X(0x04cf36e5), X(0x7fe8dc78), X(0x05017165), X(0x7fe6ef1c), - X(0x0533ab20), X(0x7fe4ee06), X(0x0565e40d), X(0x7fe2d938), - X(0x05981c26), X(0x7fe0b0b1), X(0x05ca5361), X(0x7fde7471), - X(0x05fc89b8), X(0x7fdc247a), X(0x062ebf22), X(0x7fd9c0ca), - X(0x0660f398), X(0x7fd74964), X(0x06932713), X(0x7fd4be46), - X(0x06c5598a), X(0x7fd21f72), X(0x06f78af6), X(0x7fcf6ce8), - X(0x0729bb4e), X(0x7fcca6a7), X(0x075bea8c), X(0x7fc9ccb2), - X(0x078e18a7), X(0x7fc6df08), X(0x07c04598), X(0x7fc3dda9), - X(0x07f27157), X(0x7fc0c896), X(0x08249bdd), X(0x7fbd9fd0), - X(0x0856c520), X(0x7fba6357), X(0x0888ed1b), X(0x7fb7132b), - X(0x08bb13c5), X(0x7fb3af4e), X(0x08ed3916), X(0x7fb037bf), - X(0x091f5d06), X(0x7facac7f), X(0x09517f8f), X(0x7fa90d8e), - X(0x0983a0a7), X(0x7fa55aee), X(0x09b5c048), X(0x7fa1949e), - X(0x09e7de6a), X(0x7f9dbaa0), X(0x0a19fb04), X(0x7f99ccf4), - X(0x0a4c1610), X(0x7f95cb9a), X(0x0a7e2f85), X(0x7f91b694), - X(0x0ab0475c), X(0x7f8d8de1), X(0x0ae25d8d), X(0x7f895182), - X(0x0b147211), X(0x7f850179), X(0x0b4684df), X(0x7f809dc5), - X(0x0b7895f0), X(0x7f7c2668), X(0x0baaa53b), X(0x7f779b62), - X(0x0bdcb2bb), X(0x7f72fcb4), X(0x0c0ebe66), X(0x7f6e4a5e), - X(0x0c40c835), X(0x7f698461), X(0x0c72d020), X(0x7f64aabf), - X(0x0ca4d620), X(0x7f5fbd77), X(0x0cd6da2d), X(0x7f5abc8a), - X(0x0d08dc3f), X(0x7f55a7fa), X(0x0d3adc4e), X(0x7f507fc7), - X(0x0d6cda53), X(0x7f4b43f2), X(0x0d9ed646), X(0x7f45f47b), - X(0x0dd0d01f), X(0x7f409164), X(0x0e02c7d7), X(0x7f3b1aad), - X(0x0e34bd66), X(0x7f359057), X(0x0e66b0c3), X(0x7f2ff263), - X(0x0e98a1e9), X(0x7f2a40d2), X(0x0eca90ce), X(0x7f247ba5), - X(0x0efc7d6b), X(0x7f1ea2dc), X(0x0f2e67b8), X(0x7f18b679), - X(0x0f604faf), X(0x7f12b67c), X(0x0f923546), X(0x7f0ca2e7), - X(0x0fc41876), X(0x7f067bba), X(0x0ff5f938), X(0x7f0040f6), - X(0x1027d784), X(0x7ef9f29d), X(0x1059b352), X(0x7ef390ae), - X(0x108b8c9b), X(0x7eed1b2c), X(0x10bd6356), X(0x7ee69217), - X(0x10ef377d), X(0x7edff570), X(0x11210907), X(0x7ed94538), - X(0x1152d7ed), X(0x7ed28171), X(0x1184a427), X(0x7ecbaa1a), - X(0x11b66dad), X(0x7ec4bf36), X(0x11e83478), X(0x7ebdc0c6), - X(0x1219f880), X(0x7eb6aeca), X(0x124bb9be), X(0x7eaf8943), - X(0x127d7829), X(0x7ea85033), X(0x12af33ba), X(0x7ea1039b), - X(0x12e0ec6a), X(0x7e99a37c), X(0x1312a230), X(0x7e922fd6), - X(0x13445505), X(0x7e8aa8ac), X(0x137604e2), X(0x7e830dff), - X(0x13a7b1bf), X(0x7e7b5fce), X(0x13d95b93), X(0x7e739e1d), - X(0x140b0258), X(0x7e6bc8eb), X(0x143ca605), X(0x7e63e03b), - X(0x146e4694), X(0x7e5be40c), X(0x149fe3fc), X(0x7e53d462), - X(0x14d17e36), X(0x7e4bb13c), X(0x1503153a), X(0x7e437a9c), - X(0x1534a901), X(0x7e3b3083), X(0x15663982), X(0x7e32d2f4), - X(0x1597c6b7), X(0x7e2a61ed), X(0x15c95097), X(0x7e21dd73), - X(0x15fad71b), X(0x7e194584), X(0x162c5a3b), X(0x7e109a24), - X(0x165dd9f0), X(0x7e07db52), X(0x168f5632), X(0x7dff0911), - X(0x16c0cef9), X(0x7df62362), X(0x16f2443e), X(0x7ded2a47), - X(0x1723b5f9), X(0x7de41dc0), X(0x17552422), X(0x7ddafdce), - X(0x17868eb3), X(0x7dd1ca75), X(0x17b7f5a3), X(0x7dc883b4), - X(0x17e958ea), X(0x7dbf298d), X(0x181ab881), X(0x7db5bc02), - X(0x184c1461), X(0x7dac3b15), X(0x187d6c82), X(0x7da2a6c6), - X(0x18aec0db), X(0x7d98ff17), X(0x18e01167), X(0x7d8f4409), - X(0x19115e1c), X(0x7d85759f), X(0x1942a6f3), X(0x7d7b93da), - X(0x1973ebe6), X(0x7d719eba), X(0x19a52ceb), X(0x7d679642), - X(0x19d669fc), X(0x7d5d7a74), X(0x1a07a311), X(0x7d534b50), - X(0x1a38d823), X(0x7d4908d9), X(0x1a6a0929), X(0x7d3eb30f), - X(0x1a9b361d), X(0x7d3449f5), X(0x1acc5ef6), X(0x7d29cd8c), - X(0x1afd83ad), X(0x7d1f3dd6), X(0x1b2ea43a), X(0x7d149ad5), - X(0x1b5fc097), X(0x7d09e489), X(0x1b90d8bb), X(0x7cff1af5), - X(0x1bc1ec9e), X(0x7cf43e1a), X(0x1bf2fc3a), X(0x7ce94dfb), - X(0x1c240786), X(0x7cde4a98), X(0x1c550e7c), X(0x7cd333f3), - X(0x1c861113), X(0x7cc80a0f), X(0x1cb70f43), X(0x7cbcccec), - X(0x1ce80906), X(0x7cb17c8d), X(0x1d18fe54), X(0x7ca618f3), - X(0x1d49ef26), X(0x7c9aa221), X(0x1d7adb73), X(0x7c8f1817), - X(0x1dabc334), X(0x7c837ad8), X(0x1ddca662), X(0x7c77ca65), - X(0x1e0d84f5), X(0x7c6c06c0), X(0x1e3e5ee5), X(0x7c602fec), - X(0x1e6f342c), X(0x7c5445e9), X(0x1ea004c1), X(0x7c4848ba), - X(0x1ed0d09d), X(0x7c3c3860), X(0x1f0197b8), X(0x7c3014de), - X(0x1f325a0b), X(0x7c23de35), X(0x1f63178f), X(0x7c179467), - X(0x1f93d03c), X(0x7c0b3777), X(0x1fc4840a), X(0x7bfec765), - X(0x1ff532f2), X(0x7bf24434), X(0x2025dcec), X(0x7be5ade6), - X(0x205681f1), X(0x7bd9047c), X(0x208721f9), X(0x7bcc47fa), - X(0x20b7bcfe), X(0x7bbf7860), X(0x20e852f6), X(0x7bb295b0), - X(0x2118e3dc), X(0x7ba59fee), X(0x21496fa7), X(0x7b989719), - X(0x2179f64f), X(0x7b8b7b36), X(0x21aa77cf), X(0x7b7e4c45), - X(0x21daf41d), X(0x7b710a49), X(0x220b6b32), X(0x7b63b543), - X(0x223bdd08), X(0x7b564d36), X(0x226c4996), X(0x7b48d225), - X(0x229cb0d5), X(0x7b3b4410), X(0x22cd12bd), X(0x7b2da2fa), - X(0x22fd6f48), X(0x7b1feee5), X(0x232dc66d), X(0x7b1227d3), - X(0x235e1826), X(0x7b044dc7), X(0x238e646a), X(0x7af660c2), - X(0x23beab33), X(0x7ae860c7), X(0x23eeec78), X(0x7ada4dd8), - X(0x241f2833), X(0x7acc27f7), X(0x244f5e5c), X(0x7abdef25), - X(0x247f8eec), X(0x7aafa367), X(0x24afb9da), X(0x7aa144bc), - X(0x24dfdf20), X(0x7a92d329), X(0x250ffeb7), X(0x7a844eae), - X(0x25401896), X(0x7a75b74f), X(0x25702cb7), X(0x7a670d0d), - X(0x25a03b11), X(0x7a584feb), X(0x25d0439f), X(0x7a497feb), - X(0x26004657), X(0x7a3a9d0f), X(0x26304333), X(0x7a2ba75a), - X(0x26603a2c), X(0x7a1c9ece), X(0x26902b39), X(0x7a0d836d), - X(0x26c01655), X(0x79fe5539), X(0x26effb76), X(0x79ef1436), - X(0x271fda96), X(0x79dfc064), X(0x274fb3ae), X(0x79d059c8), - X(0x277f86b5), X(0x79c0e062), X(0x27af53a6), X(0x79b15435), - X(0x27df1a77), X(0x79a1b545), X(0x280edb23), X(0x79920392), - X(0x283e95a1), X(0x79823f20), X(0x286e49ea), X(0x797267f2), - X(0x289df7f8), X(0x79627e08), X(0x28cd9fc1), X(0x79528167), - X(0x28fd4140), X(0x79427210), X(0x292cdc6d), X(0x79325006), - X(0x295c7140), X(0x79221b4b), X(0x298bffb2), X(0x7911d3e2), - X(0x29bb87bc), X(0x790179cd), X(0x29eb0957), X(0x78f10d0f), - X(0x2a1a847b), X(0x78e08dab), X(0x2a49f920), X(0x78cffba3), - X(0x2a796740), X(0x78bf56f9), X(0x2aa8ced3), X(0x78ae9fb0), - X(0x2ad82fd2), X(0x789dd5cb), X(0x2b078a36), X(0x788cf94c), - X(0x2b36ddf7), X(0x787c0a36), X(0x2b662b0e), X(0x786b088c), - X(0x2b957173), X(0x7859f44f), X(0x2bc4b120), X(0x7848cd83), - X(0x2bf3ea0d), X(0x7837942b), X(0x2c231c33), X(0x78264849), - X(0x2c52478a), X(0x7814e9df), X(0x2c816c0c), X(0x780378f1), - X(0x2cb089b1), X(0x77f1f581), X(0x2cdfa071), X(0x77e05f91), - X(0x2d0eb046), X(0x77ceb725), X(0x2d3db928), X(0x77bcfc3f), - X(0x2d6cbb10), X(0x77ab2ee2), X(0x2d9bb5f6), X(0x77994f11), - X(0x2dcaa9d5), X(0x77875cce), X(0x2df996a3), X(0x7775581d), - X(0x2e287c5a), X(0x776340ff), X(0x2e575af3), X(0x77511778), - X(0x2e863267), X(0x773edb8b), X(0x2eb502ae), X(0x772c8d3a), - X(0x2ee3cbc1), X(0x771a2c88), X(0x2f128d99), X(0x7707b979), - X(0x2f41482e), X(0x76f5340e), X(0x2f6ffb7a), X(0x76e29c4b), - X(0x2f9ea775), X(0x76cff232), X(0x2fcd4c19), X(0x76bd35c7), - X(0x2ffbe95d), X(0x76aa670d), X(0x302a7f3a), X(0x76978605), - X(0x30590dab), X(0x768492b4), X(0x308794a6), X(0x76718d1c), - X(0x30b61426), X(0x765e7540), X(0x30e48c22), X(0x764b4b23), - X(0x3112fc95), X(0x76380ec8), X(0x31416576), X(0x7624c031), - X(0x316fc6be), X(0x76115f63), X(0x319e2067), X(0x75fdec60), - X(0x31cc7269), X(0x75ea672a), X(0x31fabcbd), X(0x75d6cfc5), - X(0x3228ff5c), X(0x75c32634), X(0x32573a3f), X(0x75af6a7b), - X(0x32856d5e), X(0x759b9c9b), X(0x32b398b3), X(0x7587bc98), - X(0x32e1bc36), X(0x7573ca75), X(0x330fd7e1), X(0x755fc635), - X(0x333debab), X(0x754bafdc), X(0x336bf78f), X(0x7537876c), - X(0x3399fb85), X(0x75234ce8), X(0x33c7f785), X(0x750f0054), - X(0x33f5eb89), X(0x74faa1b3), X(0x3423d78a), X(0x74e63108), - X(0x3451bb81), X(0x74d1ae55), X(0x347f9766), X(0x74bd199f), - X(0x34ad6b32), X(0x74a872e8), X(0x34db36df), X(0x7493ba34), - X(0x3508fa66), X(0x747eef85), X(0x3536b5be), X(0x746a12df), - X(0x356468e2), X(0x74552446), X(0x359213c9), X(0x744023bc), - X(0x35bfb66e), X(0x742b1144), X(0x35ed50c9), X(0x7415ece2), - X(0x361ae2d3), X(0x7400b69a), X(0x36486c86), X(0x73eb6e6e), - X(0x3675edd9), X(0x73d61461), X(0x36a366c6), X(0x73c0a878), - X(0x36d0d746), X(0x73ab2ab4), X(0x36fe3f52), X(0x73959b1b), - X(0x372b9ee3), X(0x737ff9ae), X(0x3758f5f2), X(0x736a4671), - X(0x37864477), X(0x73548168), X(0x37b38a6d), X(0x733eaa96), - X(0x37e0c7cc), X(0x7328c1ff), X(0x380dfc8d), X(0x7312c7a5), - X(0x383b28a9), X(0x72fcbb8c), X(0x38684c19), X(0x72e69db7), - X(0x389566d6), X(0x72d06e2b), X(0x38c278d9), X(0x72ba2cea), - X(0x38ef821c), X(0x72a3d9f7), X(0x391c8297), X(0x728d7557), - X(0x39497a43), X(0x7276ff0d), X(0x39766919), X(0x7260771b), - X(0x39a34f13), X(0x7249dd86), X(0x39d02c2a), X(0x72333251), - X(0x39fd0056), X(0x721c7580), X(0x3a29cb91), X(0x7205a716), - X(0x3a568dd4), X(0x71eec716), X(0x3a834717), X(0x71d7d585), - X(0x3aaff755), X(0x71c0d265), X(0x3adc9e86), X(0x71a9bdba), - X(0x3b093ca3), X(0x71929789), X(0x3b35d1a5), X(0x717b5fd3), - X(0x3b625d86), X(0x7164169d), X(0x3b8ee03e), X(0x714cbbeb), - X(0x3bbb59c7), X(0x71354fc0), X(0x3be7ca1a), X(0x711dd220), - X(0x3c143130), X(0x7106430e), X(0x3c408f03), X(0x70eea28e), - X(0x3c6ce38a), X(0x70d6f0a4), X(0x3c992ec0), X(0x70bf2d53), - X(0x3cc5709e), X(0x70a7589f), X(0x3cf1a91c), X(0x708f728b), - X(0x3d1dd835), X(0x70777b1c), X(0x3d49fde1), X(0x705f7255), - X(0x3d761a19), X(0x70475839), X(0x3da22cd7), X(0x702f2ccd), - X(0x3dce3614), X(0x7016f014), X(0x3dfa35c8), X(0x6ffea212), - X(0x3e262bee), X(0x6fe642ca), X(0x3e52187f), X(0x6fcdd241), - X(0x3e7dfb73), X(0x6fb5507a), X(0x3ea9d4c3), X(0x6f9cbd79), - X(0x3ed5a46b), X(0x6f841942), X(0x3f016a61), X(0x6f6b63d8), - X(0x3f2d26a0), X(0x6f529d40), X(0x3f58d921), X(0x6f39c57d), - X(0x3f8481dd), X(0x6f20dc92), X(0x3fb020ce), X(0x6f07e285), - X(0x3fdbb5ec), X(0x6eeed758), X(0x40074132), X(0x6ed5bb10), - X(0x4032c297), X(0x6ebc8db0), X(0x405e3a16), X(0x6ea34f3d), - X(0x4089a7a8), X(0x6e89ffb9), X(0x40b50b46), X(0x6e709f2a), - X(0x40e064ea), X(0x6e572d93), X(0x410bb48c), X(0x6e3daaf8), - X(0x4136fa27), X(0x6e24175c), X(0x416235b2), X(0x6e0a72c5), - X(0x418d6729), X(0x6df0bd35), X(0x41b88e84), X(0x6dd6f6b1), - X(0x41e3abbc), X(0x6dbd1f3c), X(0x420ebecb), X(0x6da336dc), - X(0x4239c7aa), X(0x6d893d93), X(0x4264c653), X(0x6d6f3365), - X(0x428fbabe), X(0x6d551858), X(0x42baa4e6), X(0x6d3aec6e), - X(0x42e584c3), X(0x6d20afac), X(0x43105a50), X(0x6d066215), - X(0x433b2585), X(0x6cec03af), X(0x4365e65b), X(0x6cd1947c), - X(0x43909ccd), X(0x6cb71482), X(0x43bb48d4), X(0x6c9c83c3), - X(0x43e5ea68), X(0x6c81e245), X(0x44108184), X(0x6c67300b), - X(0x443b0e21), X(0x6c4c6d1a), X(0x44659039), X(0x6c319975), - X(0x449007c4), X(0x6c16b521), X(0x44ba74bd), X(0x6bfbc021), - X(0x44e4d71c), X(0x6be0ba7b), X(0x450f2edb), X(0x6bc5a431), - X(0x45397bf4), X(0x6baa7d49), X(0x4563be60), X(0x6b8f45c7), - X(0x458df619), X(0x6b73fdae), X(0x45b82318), X(0x6b58a503), - X(0x45e24556), X(0x6b3d3bcb), X(0x460c5cce), X(0x6b21c208), - X(0x46366978), X(0x6b0637c1), X(0x46606b4e), X(0x6aea9cf8), - X(0x468a624a), X(0x6acef1b2), X(0x46b44e65), X(0x6ab335f4), - X(0x46de2f99), X(0x6a9769c1), X(0x470805df), X(0x6a7b8d1e), - X(0x4731d131), X(0x6a5fa010), X(0x475b9188), X(0x6a43a29a), - X(0x478546de), X(0x6a2794c1), X(0x47aef12c), X(0x6a0b7689), - X(0x47d8906d), X(0x69ef47f6), X(0x48022499), X(0x69d3090e), - X(0x482badab), X(0x69b6b9d3), X(0x48552b9b), X(0x699a5a4c), - X(0x487e9e64), X(0x697dea7b), X(0x48a805ff), X(0x69616a65), - X(0x48d16265), X(0x6944da10), X(0x48fab391), X(0x6928397e), - X(0x4923f97b), X(0x690b88b5), X(0x494d341e), X(0x68eec7b9), - X(0x49766373), X(0x68d1f68f), X(0x499f8774), X(0x68b5153a), - X(0x49c8a01b), X(0x689823bf), X(0x49f1ad61), X(0x687b2224), - X(0x4a1aaf3f), X(0x685e106c), X(0x4a43a5b0), X(0x6840ee9b), - X(0x4a6c90ad), X(0x6823bcb7), X(0x4a957030), X(0x68067ac3), - X(0x4abe4433), X(0x67e928c5), X(0x4ae70caf), X(0x67cbc6c0), - X(0x4b0fc99d), X(0x67ae54ba), X(0x4b387af9), X(0x6790d2b6), - X(0x4b6120bb), X(0x677340ba), X(0x4b89badd), X(0x67559eca), - X(0x4bb24958), X(0x6737ecea), X(0x4bdacc28), X(0x671a2b20), - X(0x4c034345), X(0x66fc596f), X(0x4c2baea9), X(0x66de77dc), - X(0x4c540e4e), X(0x66c0866d), X(0x4c7c622d), X(0x66a28524), - X(0x4ca4aa41), X(0x66847408), X(0x4ccce684), X(0x6666531d), - X(0x4cf516ee), X(0x66482267), X(0x4d1d3b7a), X(0x6629e1ec), - X(0x4d455422), X(0x660b91af), X(0x4d6d60df), X(0x65ed31b5), - X(0x4d9561ac), X(0x65cec204), X(0x4dbd5682), X(0x65b0429f), - X(0x4de53f5a), X(0x6591b38c), X(0x4e0d1c30), X(0x657314cf), - X(0x4e34ecfc), X(0x6554666d), X(0x4e5cb1b9), X(0x6535a86b), - X(0x4e846a60), X(0x6516dacd), X(0x4eac16eb), X(0x64f7fd98), - X(0x4ed3b755), X(0x64d910d1), X(0x4efb4b96), X(0x64ba147d), - X(0x4f22d3aa), X(0x649b08a0), X(0x4f4a4f89), X(0x647bed3f), - X(0x4f71bf2e), X(0x645cc260), X(0x4f992293), X(0x643d8806), - X(0x4fc079b1), X(0x641e3e38), X(0x4fe7c483), X(0x63fee4f8), - X(0x500f0302), X(0x63df7c4d), X(0x50363529), X(0x63c0043b), - X(0x505d5af1), X(0x63a07cc7), X(0x50847454), X(0x6380e5f6), - X(0x50ab814d), X(0x63613fcd), X(0x50d281d5), X(0x63418a50), - X(0x50f975e6), X(0x6321c585), X(0x51205d7b), X(0x6301f171), - X(0x5147388c), X(0x62e20e17), X(0x516e0715), X(0x62c21b7e), - X(0x5194c910), X(0x62a219aa), X(0x51bb7e75), X(0x628208a1), - X(0x51e22740), X(0x6261e866), X(0x5208c36a), X(0x6241b8ff), - X(0x522f52ee), X(0x62217a72), X(0x5255d5c5), X(0x62012cc2), - X(0x527c4bea), X(0x61e0cff5), X(0x52a2b556), X(0x61c06410), - X(0x52c91204), X(0x619fe918), X(0x52ef61ee), X(0x617f5f12), - X(0x5315a50e), X(0x615ec603), X(0x533bdb5d), X(0x613e1df0), - X(0x536204d7), X(0x611d66de), X(0x53882175), X(0x60fca0d2), - X(0x53ae3131), X(0x60dbcbd1), X(0x53d43406), X(0x60bae7e1), - X(0x53fa29ed), X(0x6099f505), X(0x542012e1), X(0x6078f344), - X(0x5445eedb), X(0x6057e2a2), X(0x546bbdd7), X(0x6036c325), - X(0x54917fce), X(0x601594d1), X(0x54b734ba), X(0x5ff457ad), - X(0x54dcdc96), X(0x5fd30bbc), X(0x5502775c), X(0x5fb1b104), - X(0x55280505), X(0x5f90478a), X(0x554d858d), X(0x5f6ecf53), - X(0x5572f8ed), X(0x5f4d4865), X(0x55985f20), X(0x5f2bb2c5), - X(0x55bdb81f), X(0x5f0a0e77), X(0x55e303e6), X(0x5ee85b82), - X(0x5608426e), X(0x5ec699e9), X(0x562d73b2), X(0x5ea4c9b3), - X(0x565297ab), X(0x5e82eae5), X(0x5677ae54), X(0x5e60fd84), - X(0x569cb7a8), X(0x5e3f0194), X(0x56c1b3a1), X(0x5e1cf71c), - X(0x56e6a239), X(0x5dfade20), X(0x570b8369), X(0x5dd8b6a7), - X(0x5730572e), X(0x5db680b4), X(0x57551d80), X(0x5d943c4e), - X(0x5779d65b), X(0x5d71e979), X(0x579e81b8), X(0x5d4f883b), - X(0x57c31f92), X(0x5d2d189a), X(0x57e7afe4), X(0x5d0a9a9a), - X(0x580c32a7), X(0x5ce80e41), X(0x5830a7d6), X(0x5cc57394), - X(0x58550f6c), X(0x5ca2ca99), X(0x58796962), X(0x5c801354), - X(0x589db5b3), X(0x5c5d4dcc), X(0x58c1f45b), X(0x5c3a7a05), - X(0x58e62552), X(0x5c179806), X(0x590a4893), X(0x5bf4a7d2), - X(0x592e5e19), X(0x5bd1a971), X(0x595265df), X(0x5bae9ce7), - X(0x59765fde), X(0x5b8b8239), X(0x599a4c12), X(0x5b68596d), - X(0x59be2a74), X(0x5b452288), X(0x59e1faff), X(0x5b21dd90), - X(0x5a05bdae), X(0x5afe8a8b), X(0x5a29727b), X(0x5adb297d), - X(0x5a4d1960), X(0x5ab7ba6c), X(0x5a70b258), X(0x5a943d5e), -}; - diff --git a/wolf3d/newCode/Tremor/misc.h b/wolf3d/newCode/Tremor/misc.h deleted file mode 100644 index a4bc82f..0000000 --- a/wolf3d/newCode/Tremor/misc.h +++ /dev/null @@ -1,244 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: miscellaneous math and prototypes - - ********************************************************************/ - -#ifndef _V_RANDOM_H_ -#define _V_RANDOM_H_ -#include "ivorbiscodec.h" -#include "os.h" - -#include "asm_arm.h" -#include /* for abs() */ - -#ifndef _V_WIDE_MATH -#define _V_WIDE_MATH - -#ifndef _LOW_ACCURACY_ -/* 64 bit multiply */ - -#if !(defined WIN32 && defined WINCE) -#include -#endif - -#if BYTE_ORDER==LITTLE_ENDIAN -union magic { - struct { - ogg_int32_t lo; - ogg_int32_t hi; - } halves; - ogg_int64_t whole; -}; -#endif - -#if BYTE_ORDER==BIG_ENDIAN -union magic { - struct { - ogg_int32_t hi; - ogg_int32_t lo; - } halves; - ogg_int64_t whole; -}; -#endif - -STIN ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) { - union magic magic; - magic.whole = (ogg_int64_t)x * y; - return magic.halves.hi; -} - -STIN ogg_int32_t MULT31(ogg_int32_t x, ogg_int32_t y) { - return MULT32(x,y)<<1; -} - -STIN ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) { - union magic magic; - magic.whole = (ogg_int64_t)x * y; - return ((ogg_uint32_t)(magic.halves.lo)>>15) | ((magic.halves.hi)<<17); -} - -#else -/* 32 bit multiply, more portable but less accurate */ - -/* - * Note: Precision is biased towards the first argument therefore ordering - * is important. Shift values were chosen for the best sound quality after - * many listening tests. - */ - -/* - * For MULT32 and MULT31: The second argument is always a lookup table - * value already preshifted from 31 to 8 bits. We therefore take the - * opportunity to save on text space and use unsigned char for those - * tables in this case. - */ - -STIN ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) { - return (x >> 9) * y; /* y preshifted >>23 */ -} - -STIN ogg_int32_t MULT31(ogg_int32_t x, ogg_int32_t y) { - return (x >> 8) * y; /* y preshifted >>23 */ -} - -STIN ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) { - return (x >> 6) * y; /* y preshifted >>9 */ -} - -#endif - -/* - * This should be used as a memory barrier, forcing all cached values in - * registers to wr writen back to memory. Might or might not be beneficial - * depending on the architecture and compiler. - */ -#define MB() - -/* - * The XPROD functions are meant to optimize the cross products found all - * over the place in mdct.c by forcing memory operation ordering to avoid - * unnecessary register reloads as soon as memory is being written to. - * However this is only beneficial on CPUs with a sane number of general - * purpose registers which exclude the Intel x86. On Intel, better let the - * compiler actually reload registers directly from original memory by using - * macros. - */ - -#ifdef __i386__ - -#define XPROD32(_a, _b, _t, _v, _x, _y) \ - { *(_x)=MULT32(_a,_t)+MULT32(_b,_v); \ - *(_y)=MULT32(_b,_t)-MULT32(_a,_v); } -#define XPROD31(_a, _b, _t, _v, _x, _y) \ - { *(_x)=MULT31(_a,_t)+MULT31(_b,_v); \ - *(_y)=MULT31(_b,_t)-MULT31(_a,_v); } -#define XNPROD31(_a, _b, _t, _v, _x, _y) \ - { *(_x)=MULT31(_a,_t)-MULT31(_b,_v); \ - *(_y)=MULT31(_b,_t)+MULT31(_a,_v); } - -#else - -STIN void XPROD32(ogg_int32_t a, ogg_int32_t b, - ogg_int32_t t, ogg_int32_t v, - ogg_int32_t *x, ogg_int32_t *y) -{ - *x = MULT32(a, t) + MULT32(b, v); - *y = MULT32(b, t) - MULT32(a, v); -} - -STIN void XPROD31(ogg_int32_t a, ogg_int32_t b, - ogg_int32_t t, ogg_int32_t v, - ogg_int32_t *x, ogg_int32_t *y) -{ - *x = MULT31(a, t) + MULT31(b, v); - *y = MULT31(b, t) - MULT31(a, v); -} - -STIN void XNPROD31(ogg_int32_t a, ogg_int32_t b, - ogg_int32_t t, ogg_int32_t v, - ogg_int32_t *x, ogg_int32_t *y) -{ - *x = MULT31(a, t) - MULT31(b, v); - *y = MULT31(b, t) + MULT31(a, v); -} - -#endif - -#endif - -#ifndef _V_CLIP_MATH -#define _V_CLIP_MATH - -STIN ogg_int32_t CLIP_TO_15(ogg_int32_t x) { - int ret=x; - ret-= ((x<=32767)-1)&(x-32767); - ret-= ((x>=-32768)-1)&(x+32768); - return(ret); -} - -#endif - -STIN ogg_int32_t VFLOAT_MULT(ogg_int32_t a,ogg_int32_t ap, - ogg_int32_t b,ogg_int32_t bp, - ogg_int32_t *p){ - if(a && b){ -#ifndef _LOW_ACCURACY_ - *p=ap+bp+32; - return MULT32(a,b); -#else - *p=ap+bp+31; - return (a>>15)*(b>>16); -#endif - }else - return 0; -} - -int _ilog(unsigned int); - -STIN ogg_int32_t VFLOAT_MULTI(ogg_int32_t a,ogg_int32_t ap, - ogg_int32_t i, - ogg_int32_t *p){ - - int ip=_ilog(abs(i))-31; - return VFLOAT_MULT(a,ap,i<<-ip,ip,p); -} - -STIN ogg_int32_t VFLOAT_ADD(ogg_int32_t a,ogg_int32_t ap, - ogg_int32_t b,ogg_int32_t bp, - ogg_int32_t *p){ - - if(!a){ - *p=bp; - return b; - }else if(!b){ - *p=ap; - return a; - } - - /* yes, this can leak a bit. */ - if(ap>bp){ - int shift=ap-bp+1; - *p=ap+1; - a>>=1; - if(shift<32){ - b=(b+(1<<(shift-1)))>>shift; - }else{ - b=0; - } - }else{ - int shift=bp-ap+1; - *p=bp+1; - b>>=1; - if(shift<32){ - a=(a+(1<<(shift-1)))>>shift; - }else{ - a=0; - } - } - - a+=b; - if((a&0xc0000000)==0xc0000000 || - (a&0xc0000000)==0){ - a<<=1; - (*p)--; - } - return(a); -} - -#endif - - - - diff --git a/wolf3d/newCode/Tremor/ogg.h b/wolf3d/newCode/Tremor/ogg.h deleted file mode 100644 index 85cb41b..0000000 --- a/wolf3d/newCode/Tremor/ogg.h +++ /dev/null @@ -1,206 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: subsumed libogg includes - - ********************************************************************/ -#ifndef _OGG_H -#define _OGG_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "os_types.h" - -typedef struct ogg_buffer_state{ - struct ogg_buffer *unused_buffers; - struct ogg_reference *unused_references; - int outstanding; - int shutdown; -} ogg_buffer_state; - -typedef struct ogg_buffer { - unsigned char *data; - long size; - int refcount; - - union { - ogg_buffer_state *owner; - struct ogg_buffer *next; - } ptr; -} ogg_buffer; - -typedef struct ogg_reference { - ogg_buffer *buffer; - long begin; - long length; - - struct ogg_reference *next; -} ogg_reference; - -typedef struct oggpack_buffer { - int headbit; - unsigned char *headptr; - long headend; - - /* memory management */ - ogg_reference *head; - ogg_reference *tail; - - /* render the byte/bit counter API constant time */ - long count; /* doesn't count the tail */ -} oggpack_buffer; - -typedef struct oggbyte_buffer { - ogg_reference *baseref; - - ogg_reference *ref; - unsigned char *ptr; - long pos; - long end; -} oggbyte_buffer; - -typedef struct ogg_sync_state { - /* decode memory management pool */ - ogg_buffer_state *bufferpool; - - /* stream buffers */ - ogg_reference *fifo_head; - ogg_reference *fifo_tail; - long fifo_fill; - - /* stream sync management */ - int unsynced; - int headerbytes; - int bodybytes; - -} ogg_sync_state; - -typedef struct ogg_stream_state { - ogg_reference *header_head; - ogg_reference *header_tail; - ogg_reference *body_head; - ogg_reference *body_tail; - - int e_o_s; /* set when we have buffered the last - packet in the logical bitstream */ - int b_o_s; /* set after we've written the initial page - of a logical bitstream */ - long serialno; - long pageno; - ogg_int64_t packetno; /* sequence number for decode; the framing - knows where there's a hole in the data, - but we need coupling so that the codec - (which is in a seperate abstraction - layer) also knows about the gap */ - ogg_int64_t granulepos; - - int lacing_fill; - ogg_uint32_t body_fill; - - /* decode-side state data */ - int holeflag; - int spanflag; - int clearflag; - int laceptr; - ogg_uint32_t body_fill_next; - -} ogg_stream_state; - -typedef struct { - ogg_reference *packet; - long bytes; - long b_o_s; - long e_o_s; - ogg_int64_t granulepos; - ogg_int64_t packetno; /* sequence number for decode; the framing - knows where there's a hole in the data, - but we need coupling so that the codec - (which is in a seperate abstraction - layer) also knows about the gap */ -} ogg_packet; - -typedef struct { - ogg_reference *header; - int header_len; - ogg_reference *body; - long body_len; -} ogg_page; - -/* Ogg BITSTREAM PRIMITIVES: bitstream ************************/ - -extern void oggpack_readinit(oggpack_buffer *b,ogg_reference *r); -extern long oggpack_look(oggpack_buffer *b,int bits); -extern void oggpack_adv(oggpack_buffer *b,int bits); -extern long oggpack_read(oggpack_buffer *b,int bits); -extern long oggpack_bytes(oggpack_buffer *b); -extern long oggpack_bits(oggpack_buffer *b); -extern int oggpack_eop(oggpack_buffer *b); - -/* Ogg BITSTREAM PRIMITIVES: decoding **************************/ - -extern ogg_sync_state *ogg_sync_create(void); -extern int ogg_sync_destroy(ogg_sync_state *oy); -extern int ogg_sync_reset(ogg_sync_state *oy); - -extern unsigned char *ogg_sync_bufferin(ogg_sync_state *oy, long size); -extern int ogg_sync_wrote(ogg_sync_state *oy, long bytes); -extern long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og); -extern int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og); -extern int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og); -extern int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op); -extern int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op); - -/* Ogg BITSTREAM PRIMITIVES: general ***************************/ - -extern ogg_stream_state *ogg_stream_create(int serialno); -extern int ogg_stream_destroy(ogg_stream_state *os); -extern int ogg_stream_reset(ogg_stream_state *os); -extern int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno); -extern int ogg_stream_eos(ogg_stream_state *os); - -extern int ogg_page_checksum_set(ogg_page *og); - -extern int ogg_page_version(ogg_page *og); -extern int ogg_page_continued(ogg_page *og); -extern int ogg_page_bos(ogg_page *og); -extern int ogg_page_eos(ogg_page *og); -extern ogg_int64_t ogg_page_granulepos(ogg_page *og); -extern ogg_uint32_t ogg_page_serialno(ogg_page *og); -extern ogg_uint32_t ogg_page_pageno(ogg_page *og); -extern int ogg_page_packets(ogg_page *og); -extern int ogg_page_getbuffer(ogg_page *og, unsigned char **buffer); - -extern int ogg_packet_release(ogg_packet *op); -extern int ogg_page_release(ogg_page *og); - -extern void ogg_page_dup(ogg_page *d, ogg_page *s); - -/* Ogg BITSTREAM PRIMITIVES: return codes ***************************/ - -#define OGG_SUCCESS 0 - -#define OGG_HOLE -10 -#define OGG_SPAN -11 -#define OGG_EVERSION -12 -#define OGG_ESERIAL -13 -#define OGG_EINVAL -14 -#define OGG_EEOS -15 - - -#ifdef __cplusplus -} -#endif - -#endif /* _OGG_H */ diff --git a/wolf3d/newCode/Tremor/os.h b/wolf3d/newCode/Tremor/os.h deleted file mode 100644 index 95e6e27..0000000 --- a/wolf3d/newCode/Tremor/os.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef _OS_H -#define _OS_H -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: #ifdef jail to whip a few platforms into the UNIX ideal. - - ********************************************************************/ - -#include -#include "os_types.h" - -#ifndef _V_IFDEFJAIL_H_ -# define _V_IFDEFJAIL_H_ - -# ifdef __GNUC__ -# define STIN static __inline__ -# elif _WIN32 -# define STIN static __inline -# endif -#else -# define STIN static -#endif - -#ifndef M_PI -# define M_PI (3.1415926536f) -#endif - -#ifdef _WIN32 -# include -# define rint(x) (floor((x)+0.5f)) -# define NO_FLOAT_MATH_LIB -# define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b)) -# define LITTLE_ENDIAN 1 -# define BYTE_ORDER LITTLE_ENDIAN -#endif - -#ifdef HAVE_ALLOCA_H -# include -#endif - -#ifdef USE_MEMORY_H -# include -#endif - -#ifndef min -# define min(x,y) ((x)>(y)?(y):(x)) -#endif - -#ifndef max -# define max(x,y) ((x)<(y)?(y):(x)) -#endif - -#endif /* _OS_H */ diff --git a/wolf3d/newCode/Tremor/os_types.h b/wolf3d/newCode/Tremor/os_types.h deleted file mode 100644 index b8ddb8e..0000000 --- a/wolf3d/newCode/Tremor/os_types.h +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: #ifdef jail to whip a few platforms into the UNIX ideal. - - ********************************************************************/ -#ifndef _OS_TYPES_H -#define _OS_TYPES_H - -#ifdef _LOW_ACCURACY_ -# define X(n) (((((n)>>22)+1)>>1) - ((((n)>>22)+1)>>9)) -# define LOOKUP_T const unsigned char -#else -# define X(n) (n) -# define LOOKUP_T const ogg_int32_t -#endif - -/* make it easy on the folks that want to compile the libs with a - different malloc than stdlib */ -#define _ogg_malloc malloc -#define _ogg_calloc calloc -#define _ogg_realloc realloc -#define _ogg_free free - -#ifdef _WIN32 - -# ifndef __GNUC__ - /* MSVC/Borland */ - typedef __int64 ogg_int64_t; - typedef __int32 ogg_int32_t; - typedef unsigned __int32 ogg_uint32_t; - typedef __int16 ogg_int16_t; -# else - /* Cygwin */ - #include <_G_config.h> - typedef _G_int64_t ogg_int64_t; - typedef _G_int32_t ogg_int32_t; - typedef _G_uint32_t ogg_uint32_t; - typedef _G_int16_t ogg_int16_t; -# endif - -#elif defined(__MACOS__) - -# include - typedef SInt16 ogg_int16_t; - typedef SInt32 ogg_int32_t; - typedef UInt32 ogg_uint32_t; - typedef SInt64 ogg_int64_t; - -#elif (defined(__APPLE__) && defined(__MACH__)) /* MacOS X Framework build */ - -# include - typedef int16_t ogg_int16_t; - typedef int32_t ogg_int32_t; - typedef u_int32_t ogg_uint32_t; - typedef int64_t ogg_int64_t; - -#elif defined(__BEOS__) - - /* Be */ -# include - -#elif defined (__EMX__) - - /* OS/2 GCC */ - typedef short ogg_int16_t; - typedef int ogg_int32_t; - typedef unsigned int ogg_uint32_t; - typedef long long ogg_int64_t; - -#else - -# include -# include "config_types.h" - -#endif - -#endif /* _OS_TYPES_H */ diff --git a/wolf3d/newCode/Tremor/registry.c b/wolf3d/newCode/Tremor/registry.c deleted file mode 100644 index c0b5fec..0000000 --- a/wolf3d/newCode/Tremor/registry.c +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: registry for floor, res backends and channel mappings - - ********************************************************************/ - -#include "ivorbiscodec.h" -#include "codec_internal.h" -#include "registry.h" -#include "misc.h" - - -/* seems like major overkill now; the backend numbers will grow into - the infrastructure soon enough */ - -extern vorbis_func_floor floor0_exportbundle; -extern vorbis_func_floor floor1_exportbundle; -extern vorbis_func_residue residue0_exportbundle; -extern vorbis_func_residue residue1_exportbundle; -extern vorbis_func_residue residue2_exportbundle; -extern vorbis_func_mapping mapping0_exportbundle; - -vorbis_func_floor *_floor_P[]={ - &floor0_exportbundle, - &floor1_exportbundle, -}; - -vorbis_func_residue *_residue_P[]={ - &residue0_exportbundle, - &residue1_exportbundle, - &residue2_exportbundle, -}; - -vorbis_func_mapping *_mapping_P[]={ - &mapping0_exportbundle, -}; - - - diff --git a/wolf3d/newCode/Tremor/registry.h b/wolf3d/newCode/Tremor/registry.h deleted file mode 100644 index 2bc8068..0000000 --- a/wolf3d/newCode/Tremor/registry.h +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: registry for time, floor, res backends and channel mappings - - ********************************************************************/ - -#ifndef _V_REG_H_ -#define _V_REG_H_ - -#define VI_TRANSFORMB 1 -#define VI_WINDOWB 1 -#define VI_TIMEB 1 -#define VI_FLOORB 2 -#define VI_RESB 3 -#define VI_MAPB 1 - -#include "backends.h" - -#if defined(_WIN32) && defined(VORBISDLL_IMPORT) -# define EXTERN __declspec(dllimport) extern -#else -# define EXTERN extern -#endif - -EXTERN vorbis_func_floor *_floor_P[]; -EXTERN vorbis_func_residue *_residue_P[]; -EXTERN vorbis_func_mapping *_mapping_P[]; - -#endif diff --git a/wolf3d/newCode/Tremor/res012.c b/wolf3d/newCode/Tremor/res012.c deleted file mode 100644 index 224b54e..0000000 --- a/wolf3d/newCode/Tremor/res012.c +++ /dev/null @@ -1,342 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: residue backend 0, 1 and 2 implementation - - ********************************************************************/ - -#include -#include -#include -#include "ogg.h" -#include "ivorbiscodec.h" -#include "codec_internal.h" -#include "registry.h" -#include "codebook.h" -#include "misc.h" -#include "os.h" -#include "block.h" - -typedef struct { - vorbis_info_residue0 *info; - int map; - - int parts; - int stages; - codebook *fullbooks; - codebook *phrasebook; - codebook ***partbooks; - - int partvals; - int **decodemap; - -} vorbis_look_residue0; - -void res0_free_info(vorbis_info_residue *i){ - vorbis_info_residue0 *info=(vorbis_info_residue0 *)i; - if(info){ - memset(info,0,sizeof(*info)); - _ogg_free(info); - } -} - -void res0_free_look(vorbis_look_residue *i){ - int j; - if(i){ - - vorbis_look_residue0 *look=(vorbis_look_residue0 *)i; - - for(j=0;jparts;j++) - if(look->partbooks[j])_ogg_free(look->partbooks[j]); - _ogg_free(look->partbooks); - for(j=0;jpartvals;j++) - _ogg_free(look->decodemap[j]); - _ogg_free(look->decodemap); - - memset(look,0,sizeof(*look)); - _ogg_free(look); - } -} - -static int ilog(unsigned int v){ - int ret=0; - while(v){ - ret++; - v>>=1; - } - return(ret); -} - -static int icount(unsigned int v){ - int ret=0; - while(v){ - ret+=v&1; - v>>=1; - } - return(ret); -} - -/* vorbis_info is for range checking */ -vorbis_info_residue *res0_unpack(vorbis_info *vi,oggpack_buffer *opb){ - int j,acc=0; - vorbis_info_residue0 *info=(vorbis_info_residue0 *)_ogg_calloc(1,sizeof(*info)); - codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; - - info->begin=oggpack_read(opb,24); - info->end=oggpack_read(opb,24); - info->grouping=oggpack_read(opb,24)+1; - info->partitions=oggpack_read(opb,6)+1; - info->groupbook=oggpack_read(opb,8); - - for(j=0;jpartitions;j++){ - int cascade=oggpack_read(opb,3); - if(oggpack_read(opb,1)) - cascade|=(oggpack_read(opb,5)<<3); - info->secondstages[j]=cascade; - - acc+=icount(cascade); - } - for(j=0;jbooklist[j]=oggpack_read(opb,8); - - if(info->groupbook>=ci->books)goto errout; - for(j=0;jbooklist[j]>=ci->books)goto errout; - - return(info); - errout: - res0_free_info(info); - return(NULL); -} - -vorbis_look_residue *res0_look(vorbis_dsp_state *vd,vorbis_info_mode *vm, - vorbis_info_residue *vr){ - vorbis_info_residue0 *info=(vorbis_info_residue0 *)vr; - vorbis_look_residue0 *look=(vorbis_look_residue0 *)_ogg_calloc(1,sizeof(*look)); - codec_setup_info *ci=(codec_setup_info *)vd->vi->codec_setup; - - int j,k,acc=0; - int dim; - int maxstage=0; - look->info=info; - look->map=vm->mapping; - - look->parts=info->partitions; - look->fullbooks=ci->fullbooks; - look->phrasebook=ci->fullbooks+info->groupbook; - dim=look->phrasebook->dim; - - look->partbooks=(codebook ***)_ogg_calloc(look->parts,sizeof(*look->partbooks)); - - for(j=0;jparts;j++){ - int stages=ilog(info->secondstages[j]); - if(stages){ - if(stages>maxstage)maxstage=stages; - look->partbooks[j]=(codebook **)_ogg_calloc(stages,sizeof(*look->partbooks[j])); - for(k=0;ksecondstages[j]&(1<partbooks[j][k]=ci->fullbooks+info->booklist[acc++]; -#ifdef TRAIN_RES - look->training_data[k][j]=calloc(look->partbooks[j][k]->entries, - sizeof(***look->training_data)); -#endif - } - } - } - - look->partvals=look->parts; - for(j=1;jpartvals*=look->parts; - look->stages=maxstage; - look->decodemap=(int **)_ogg_malloc(look->partvals*sizeof(*look->decodemap)); - for(j=0;jpartvals;j++){ - long val=j; - long mult=look->partvals/look->parts; - look->decodemap[j]=(int *)_ogg_malloc(dim*sizeof(*look->decodemap[j])); - for(k=0;kparts; - look->decodemap[j][k]=deco; - } - } - - return(look); -} - - -/* a truncated packet here just means 'stop working'; it's not an error */ -static int _01inverse(vorbis_block *vb,vorbis_look_residue *vl, - ogg_int32_t **in,int ch, - long (*decodepart)(codebook *, ogg_int32_t *, - oggpack_buffer *,int,int)){ - - long i,j,k,l,s; - vorbis_look_residue0 *look=(vorbis_look_residue0 *)vl; - vorbis_info_residue0 *info=look->info; - - /* move all this setup out later */ - int samples_per_partition=info->grouping; - int partitions_per_word=look->phrasebook->dim; - int max=vb->pcmend>>1; - int end=(info->endend:max); - int n=end-info->begin; - - if(n>0){ - int partvals=n/samples_per_partition; - int partwords=(partvals+partitions_per_word-1)/partitions_per_word; - int ***partword=(int ***)alloca(ch*sizeof(*partword)); - - for(j=0;jstages;s++){ - - /* each loop decodes on partition codeword containing - partitions_pre_word partitions */ - for(i=0,l=0;iphrasebook,&vb->opb); - if(temp==-1)goto eopbreak; - partword[j][l]=look->decodemap[temp]; - if(partword[j][l]==NULL)goto errout; - } - } - - /* now we decode residual values for the partitions */ - for(k=0;kbegin+i*samples_per_partition; - if(info->secondstages[partword[j][l][k]]&(1<partbooks[partword[j][l][k]][s]; - if(stagebook){ - if(decodepart(stagebook,in[j]+offset,&vb->opb, - samples_per_partition,-8)==-1)goto eopbreak; - } - } - } - } - } - } - errout: - eopbreak: - return(0); -} - -int res0_inverse(vorbis_block *vb,vorbis_look_residue *vl, - ogg_int32_t **in,int *nonzero,int ch){ - int i,used=0; - for(i=0;iinfo; - - /* move all this setup out later */ - int samples_per_partition=info->grouping; - int partitions_per_word=look->phrasebook->dim; - int max=(vb->pcmend*ch)>>1; - int end=(info->endend:max); - int n=end-info->begin; - - if(n>0){ - - int partvals=n/samples_per_partition; - int partwords=(partvals+partitions_per_word-1)/partitions_per_word; - int **partword=(int **)_vorbis_block_alloc(vb,partwords*sizeof(*partword)); - int beginoff=info->begin/ch; - - for(i=0;istages;s++){ - for(i=0,l=0;iphrasebook,&vb->opb); - if(temp==-1)goto eopbreak; - partword[l]=look->decodemap[temp]; - if(partword[l]==NULL)goto errout; - } - - /* now we decode residual values for the partitions */ - for(k=0;ksecondstages[partword[l][k]]&(1<partbooks[partword[l][k]][s]; - - if(stagebook){ - if(vorbis_book_decodevv_add(stagebook,in, - i*samples_per_partition+beginoff,ch, - &vb->opb, - samples_per_partition,-8)==-1) - goto eopbreak; - } - } - } - } - } - errout: - eopbreak: - return(0); -} - - -vorbis_func_residue residue0_exportbundle={ - &res0_unpack, - &res0_look, - &res0_free_info, - &res0_free_look, - &res0_inverse -}; - -vorbis_func_residue residue1_exportbundle={ - &res0_unpack, - &res0_look, - &res0_free_info, - &res0_free_look, - &res1_inverse -}; - -vorbis_func_residue residue2_exportbundle={ - &res0_unpack, - &res0_look, - &res0_free_info, - &res0_free_look, - &res2_inverse -}; diff --git a/wolf3d/newCode/Tremor/sharedbook.c b/wolf3d/newCode/Tremor/sharedbook.c deleted file mode 100644 index 8e07492..0000000 --- a/wolf3d/newCode/Tremor/sharedbook.c +++ /dev/null @@ -1,439 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: basic shared codebook operations - - ********************************************************************/ - -#include -#include -#include -#include "ogg.h" -#include "misc.h" -#include "ivorbiscodec.h" -#include "codebook.h" - -/**** pack/unpack helpers ******************************************/ -int _ilog(unsigned int v){ - int ret=0; - while(v){ - ret++; - v>>=1; - } - return(ret); -} - -/* 32 bit float (not IEEE; nonnormalized mantissa + - biased exponent) : neeeeeee eeemmmmm mmmmmmmm mmmmmmmm - Why not IEEE? It's just not that important here. */ - -#define VQ_FEXP 10 -#define VQ_FMAN 21 -#define VQ_FEXP_BIAS 768 /* bias toward values smaller than 1. */ - -static ogg_int32_t _float32_unpack(long val,int *point){ - long mant=val&0x1fffff; - int sign=val&0x80000000; - long exp =(val&0x7fe00000L)>>VQ_FMAN; - - exp-=(VQ_FMAN-1)+VQ_FEXP_BIAS; - - if(mant){ - while(!(mant&0x40000000)){ - mant<<=1; - exp-=1; - } - - if(sign)mant= -mant; - }else{ - sign=0; - exp=-9999; - } - - *point=exp; - return mant; -} - -/* given a list of word lengths, generate a list of codewords. Works - for length ordered or unordered, always assigns the lowest valued - codewords first. Extended to handle unused entries (length 0) */ -ogg_uint32_t *_make_words(long *l,long n,long sparsecount){ - long i,j,count=0; - ogg_uint32_t marker[33]; - ogg_uint32_t *r=(ogg_uint32_t *)_ogg_malloc((sparsecount?sparsecount:n)*sizeof(*r)); - memset(marker,0,sizeof(marker)); - - for(i=0;i0){ - ogg_uint32_t entry=marker[length]; - - /* when we claim a node for an entry, we also claim the nodes - below it (pruning off the imagined tree that may have dangled - from it) as well as blocking the use of any nodes directly - above for leaves */ - - /* update ourself */ - if(length<32 && (entry>>length)){ - /* error condition; the lengths must specify an overpopulated tree */ - _ogg_free(r); - return(NULL); - } - r[count++]=entry; - - /* Look to see if the next shorter marker points to the node - above. if so, update it and repeat. */ - { - for(j=length;j>0;j--){ - - if(marker[j]&1){ - /* have to jump branches */ - if(j==1) - marker[1]++; - else - marker[j]=marker[j-1]<<1; - break; /* invariant says next upper marker would already - have been moved if it was on the same path */ - } - marker[j]++; - } - } - - /* prune the tree; the implicit invariant says all the longer - markers were dangling from our just-taken node. Dangle them - from our *new* node. */ - for(j=length+1;j<33;j++) - if((marker[j]>>1) == entry){ - entry=marker[j]; - marker[j]=marker[j-1]<<1; - }else - break; - }else - if(sparsecount==0)count++; - } - - /* bitreverse the words because our bitwise packer/unpacker is LSb - endian */ - for(i=0,count=0;i>j)&1; - } - - if(sparsecount){ - if(l[i]) - r[count++]=temp; - }else - r[count++]=temp; - } - - return(r); -} - -/* there might be a straightforward one-line way to do the below - that's portable and totally safe against roundoff, but I haven't - thought of it. Therefore, we opt on the side of caution */ -long _book_maptype1_quantvals(const static_codebook *b){ - /* get us a starting hint, we'll polish it below */ - int bits=_ilog(b->entries); - int vals=b->entries>>((bits-1)*(b->dim-1)/b->dim); - - while(1){ - long acc=1; - long acc1=1; - int i; - for(i=0;idim;i++){ - acc*=vals; - acc1*=vals+1; - } - if(acc<=b->entries && acc1>b->entries){ - return(vals); - }else{ - if(acc>b->entries){ - vals--; - }else{ - vals++; - } - } - } -} - -/* different than what _book_unquantize does for mainline: - we repack the book in a fixed point format that shares the same - binary point. Upon first use, we can shift point if needed */ - -/* we need to deal with two map types: in map type 1, the values are - generated algorithmically (each column of the vector counts through - the values in the quant vector). in map type 2, all the values came - in in an explicit list. Both value lists must be unpacked */ - -ogg_int32_t *_book_unquantize(const static_codebook *b,int n,int *sparsemap, - int *maxpoint){ - long j,k,count=0; - if(b->maptype==1 || b->maptype==2){ - int quantvals; - int minpoint,delpoint; - ogg_int32_t mindel=_float32_unpack(b->q_min,&minpoint); - ogg_int32_t delta=_float32_unpack(b->q_delta,&delpoint); - ogg_int32_t *r=(ogg_int32_t *)_ogg_calloc(n*b->dim,sizeof(*r)); - int *rp=(int *)_ogg_calloc(n*b->dim,sizeof(*rp)); - - *maxpoint=minpoint; - - /* maptype 1 and 2 both use a quantized value vector, but - different sizes */ - switch(b->maptype){ - case 1: - /* most of the time, entries%dimensions == 0, but we need to be - well defined. We define that the possible vales at each - scalar is values == entries/dim. If entries%dim != 0, we'll - have 'too few' values (values*dimentries;j++){ - if((sparsemap && b->lengthlist[j]) || !sparsemap){ - ogg_int32_t last=0; - int lastpoint=0; - int indexdiv=1; - for(k=0;kdim;k++){ - int index= (j/indexdiv)%quantvals; - int point=0; - int val=VFLOAT_MULTI(delta,delpoint, - abs(b->quantlist[index]),&point); - - val=VFLOAT_ADD(mindel,minpoint,val,point,&point); - val=VFLOAT_ADD(last,lastpoint,val,point,&point); - - if(b->q_sequencep){ - last=val; - lastpoint=point; - } - - if(sparsemap){ - r[sparsemap[count]*b->dim+k]=val; - rp[sparsemap[count]*b->dim+k]=point; - }else{ - r[count*b->dim+k]=val; - rp[count*b->dim+k]=point; - } - if(*maxpointentries;j++){ - if((sparsemap && b->lengthlist[j]) || !sparsemap){ - ogg_int32_t last=0; - int lastpoint=0; - - for(k=0;kdim;k++){ - int point=0; - int val=VFLOAT_MULTI(delta,delpoint, - abs(b->quantlist[j*b->dim+k]),&point); - - val=VFLOAT_ADD(mindel,minpoint,val,point,&point); - val=VFLOAT_ADD(last,lastpoint,val,point,&point); - - if(b->q_sequencep){ - last=val; - lastpoint=point; - } - - if(sparsemap){ - r[sparsemap[count]*b->dim+k]=val; - rp[sparsemap[count]*b->dim+k]=point; - }else{ - r[count*b->dim+k]=val; - rp[count*b->dim+k]=point; - } - if(*maxpointdim;j++) - if(rp[j]<*maxpoint) - r[j]>>=*maxpoint-rp[j]; - - _ogg_free(rp); - return(r); - } - return(NULL); -} - -void vorbis_staticbook_clear(static_codebook *b){ - if(b->quantlist)_ogg_free(b->quantlist); - if(b->lengthlist)_ogg_free(b->lengthlist); - memset(b,0,sizeof(*b)); - -} - -void vorbis_staticbook_destroy(static_codebook *b){ - vorbis_staticbook_clear(b); - _ogg_free(b); -} - -void vorbis_book_clear(codebook *b){ - /* static book is not cleared; we're likely called on the lookup and - the static codebook belongs to the info struct */ - if(b->valuelist)_ogg_free(b->valuelist); - if(b->codelist)_ogg_free(b->codelist); - - if(b->dec_index)_ogg_free(b->dec_index); - if(b->dec_codelengths)_ogg_free(b->dec_codelengths); - if(b->dec_firsttable)_ogg_free(b->dec_firsttable); - - memset(b,0,sizeof(*b)); -} - -static ogg_uint32_t bitreverse(ogg_uint32_t x){ - x= ((x>>16)&0x0000ffffUL) | ((x<<16)&0xffff0000UL); - x= ((x>> 8)&0x00ff00ffUL) | ((x<< 8)&0xff00ff00UL); - x= ((x>> 4)&0x0f0f0f0fUL) | ((x<< 4)&0xf0f0f0f0UL); - x= ((x>> 2)&0x33333333UL) | ((x<< 2)&0xccccccccUL); - return((x>> 1)&0x55555555UL) | ((x<< 1)&0xaaaaaaaaUL); -} - -static int sort32a(const void *a,const void *b){ - return (**(ogg_uint32_t **)a>**(ogg_uint32_t **)b)- - (**(ogg_uint32_t **)a<**(ogg_uint32_t **)b); -} - -/* decode codebook arrangement is more heavily optimized than encode */ -int vorbis_book_init_decode(codebook *c,const static_codebook *s){ - int i,j,n=0,tabn; - int *sortindex; - memset(c,0,sizeof(*c)); - - /* count actually used entries */ - for(i=0;ientries;i++) - if(s->lengthlist[i]>0) - n++; - - c->entries=s->entries; - c->used_entries=n; - c->dim=s->dim; - - if(n>0){ - /* two different remappings go on here. - - First, we collapse the likely sparse codebook down only to - actually represented values/words. This collapsing needs to be - indexed as map-valueless books are used to encode original entry - positions as integers. - - Second, we reorder all vectors, including the entry index above, - by sorted bitreversed codeword to allow treeless decode. */ - - /* perform sort */ - ogg_uint32_t *codes=_make_words(s->lengthlist,s->entries,c->used_entries); - ogg_uint32_t **codep=(ogg_uint32_t **)alloca(sizeof(*codep)*n); - - if(codes==NULL)goto err_out; - - for(i=0;icodelist=(ogg_uint32_t *)_ogg_malloc(n*sizeof(*c->codelist)); - /* the index is a reverse index */ - for(i=0;icodelist[sortindex[i]]=codes[i]; - _ogg_free(codes); - - - - c->valuelist=_book_unquantize(s,n,sortindex,&c->binarypoint); - c->dec_index=(int *)_ogg_malloc(n*sizeof(*c->dec_index)); - - for(n=0,i=0;ientries;i++) - if(s->lengthlist[i]>0) - c->dec_index[sortindex[n++]]=i; - - c->dec_codelengths=(char *)_ogg_malloc(n*sizeof(*c->dec_codelengths)); - for(n=0,i=0;ientries;i++) - if(s->lengthlist[i]>0) - c->dec_codelengths[sortindex[n++]]=s->lengthlist[i]; - - c->dec_firsttablen=_ilog(c->used_entries)-4; /* this is magic */ - if(c->dec_firsttablen<5)c->dec_firsttablen=5; - if(c->dec_firsttablen>8)c->dec_firsttablen=8; - - tabn=1<dec_firsttablen; - c->dec_firsttable=(ogg_uint32_t *)_ogg_calloc(tabn,sizeof(*c->dec_firsttable)); - c->dec_maxlength=0; - - for(i=0;idec_maxlengthdec_codelengths[i]) - c->dec_maxlength=c->dec_codelengths[i]; - if(c->dec_codelengths[i]<=c->dec_firsttablen){ - ogg_uint32_t orig=bitreverse(c->codelist[i]); - for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++) - c->dec_firsttable[orig|(j<dec_codelengths[i])]=i+1; - } - } - - /* now fill in 'unused' entries in the firsttable with hi/lo search - hints for the non-direct-hits */ - { - ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen); - long lo=0,hi=0; - - for(i=0;idec_firsttablen); - if(c->dec_firsttable[bitreverse(word)]==0){ - while((lo+1)codelist[lo+1]<=word)lo++; - while( hi=(c->codelist[hi]&mask))hi++; - - /* we only actually have 15 bits per hint to play with here. - In order to overflow gracefully (nothing breaks, efficiency - just drops), encode as the difference from the extremes. */ - { - unsigned long loval=lo; - unsigned long hival=n-hi; - - if(loval>0x7fff)loval=0x7fff; - if(hival>0x7fff)hival=0x7fff; - c->dec_firsttable[bitreverse(word)]= - 0x80000000UL | (loval<<15) | hival; - } - } - } - } - } - - return(0); - err_out: - vorbis_book_clear(c); - return(-1); -} - diff --git a/wolf3d/newCode/Tremor/synthesis.c b/wolf3d/newCode/Tremor/synthesis.c deleted file mode 100644 index 962c730..0000000 --- a/wolf3d/newCode/Tremor/synthesis.c +++ /dev/null @@ -1,113 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: single-block PCM synthesis - last mod: $Id: synthesis.c,v 1.4 2003/03/29 03:07:21 xiphmont Exp $ - - ********************************************************************/ - -#include -#include "ogg.h" -#include "ivorbiscodec.h" -#include "codec_internal.h" -#include "registry.h" -#include "misc.h" -#include "block.h" - -int vorbis_synthesis(vorbis_block *vb,ogg_packet *op,int decodep){ - vorbis_dsp_state *vd=vb->vd; - private_state *b=(private_state *)vd->backend_state; - vorbis_info *vi=vd->vi; - codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; - oggpack_buffer *opb=&vb->opb; - int type,mode,i; - - /* first things first. Make sure decode is ready */ - _vorbis_block_ripcord(vb); - oggpack_readinit(opb,op->packet); - - /* Check the packet type */ - if(oggpack_read(opb,1)!=0){ - /* Oops. This is not an audio data packet */ - return(OV_ENOTAUDIO); - } - - /* read our mode and pre/post windowsize */ - mode=oggpack_read(opb,b->modebits); - if(mode==-1)return(OV_EBADPACKET); - - vb->mode=mode; - vb->W=ci->mode_param[mode]->blockflag; - if(vb->W){ - vb->lW=oggpack_read(opb,1); - vb->nW=oggpack_read(opb,1); - if(vb->nW==-1) return(OV_EBADPACKET); - }else{ - vb->lW=0; - vb->nW=0; - } - - /* more setup */ - vb->granulepos=op->granulepos; - vb->sequence=op->packetno-3; /* first block is third packet */ - vb->eofflag=op->e_o_s; - - if(decodep){ - /* alloc pcm passback storage */ - vb->pcmend=ci->blocksizes[vb->W]; - vb->pcm=(ogg_int32_t **)_vorbis_block_alloc(vb,sizeof(*vb->pcm)*vi->channels); - for(i=0;ichannels;i++) - vb->pcm[i]=(ogg_int32_t *)_vorbis_block_alloc(vb,vb->pcmend*sizeof(*vb->pcm[i])); - - /* unpack_header enforces range checking */ - type=ci->map_type[ci->mode_param[mode]->mapping]; - - return(_mapping_P[type]->inverse(vb,b->mode[mode])); - }else{ - /* no pcm */ - vb->pcmend=0; - vb->pcm=NULL; - - return(0); - } -} - -long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op){ - codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; - oggpack_buffer opb; - int mode; - - oggpack_readinit(&opb,op->packet); - - /* Check the packet type */ - if(oggpack_read(&opb,1)!=0){ - /* Oops. This is not an audio data packet */ - return(OV_ENOTAUDIO); - } - - { - int modebits=0; - int v=ci->modes; - while(v>1){ - modebits++; - v>>=1; - } - - /* read our mode and pre/post windowsize */ - mode=oggpack_read(&opb,modebits); - } - if(mode==-1)return(OV_EBADPACKET); - return(ci->blocksizes[ci->mode_param[mode]->blockflag]); -} - - diff --git a/wolf3d/newCode/Tremor/vorbisfile.c b/wolf3d/newCode/Tremor/vorbisfile.c deleted file mode 100644 index 0c48f1f..0000000 --- a/wolf3d/newCode/Tremor/vorbisfile.c +++ /dev/null @@ -1,1586 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: stdio-based convenience library for opening/seeking/decoding - last mod: $Id: vorbisfile.c,v 1.6 2003/03/30 23:40:56 xiphmont Exp $ - - ********************************************************************/ - -#include -#include -#include -#include -#include - -#include "ivorbiscodec.h" -#include "ivorbisfile.h" - -#include "misc.h" - -/* A 'chained bitstream' is a Vorbis bitstream that contains more than - one logical bitstream arranged end to end (the only form of Ogg - multiplexing allowed in a Vorbis bitstream; grouping [parallel - multiplexing] is not allowed in Vorbis) */ - -/* A Vorbis file can be played beginning to end (streamed) without - worrying ahead of time about chaining (see decoder_example.c). If - we have the whole file, however, and want random access - (seeking/scrubbing) or desire to know the total length/time of a - file, we need to account for the possibility of chaining. */ - -/* We can handle things a number of ways; we can determine the entire - bitstream structure right off the bat, or find pieces on demand. - This example determines and caches structure for the entire - bitstream, but builds a virtual decoder on the fly when moving - between links in the chain. */ - -/* There are also different ways to implement seeking. Enough - information exists in an Ogg bitstream to seek to - sample-granularity positions in the output. Or, one can seek by - picking some portion of the stream roughly in the desired area if - we only want coarse navigation through the stream. */ - -/************************************************************************* - * Many, many internal helpers. The intention is not to be confusing; - * rampant duplication and monolithic function implementation would be - * harder to understand anyway. The high level functions are last. Begin - * grokking near the end of the file */ - - -/* read a little more data from the file/pipe into the ogg_sync framer */ -static long _get_data(OggVorbis_File *vf){ - errno=0; - if(vf->datasource){ - unsigned char *buffer=ogg_sync_bufferin(vf->oy,CHUNKSIZE); - long bytes=(vf->callbacks.read_func)(buffer,1,CHUNKSIZE,vf->datasource); - if(bytes>0)ogg_sync_wrote(vf->oy,bytes); - if(bytes==0 && errno)return(-1); - return(bytes); - }else - return(0); -} - -/* save a tiny smidge of verbosity to make the code more readable */ -static void _seek_helper(OggVorbis_File *vf,ogg_int64_t offset){ - if(vf->datasource){ - (vf->callbacks.seek_func)(vf->datasource, offset, SEEK_SET); - vf->offset=offset; - ogg_sync_reset(vf->oy); - }else{ - /* shouldn't happen unless someone writes a broken callback */ - return; - } -} - -/* The read/seek functions track absolute position within the stream */ - -/* from the head of the stream, get the next page. boundary specifies - if the function is allowed to fetch more data from the stream (and - how much) or only use internally buffered data. - - boundary: -1) unbounded search - 0) read no additional data; use cached only - n) search for a new page beginning for n bytes - - return: <0) did not find a page (OV_FALSE, OV_EOF, OV_EREAD) - n) found a page at absolute offset n - - produces a refcounted page */ - -static ogg_int64_t _get_next_page(OggVorbis_File *vf,ogg_page *og, - ogg_int64_t boundary){ - if(boundary>0)boundary+=vf->offset; - while(1){ - long more; - - if(boundary>0 && vf->offset>=boundary)return(OV_FALSE); - more=ogg_sync_pageseek(vf->oy,og); - - if(more<0){ - /* skipped n bytes */ - vf->offset-=more; - }else{ - if(more==0){ - /* send more paramedics */ - if(!boundary)return(OV_FALSE); - { - long ret=_get_data(vf); - if(ret==0)return(OV_EOF); - if(ret<0)return(OV_EREAD); - } - }else{ - /* got a page. Return the offset at the page beginning, - advance the internal offset past the page end */ - ogg_int64_t ret=vf->offset; - vf->offset+=more; - return(ret); - - } - } - } -} - -/* find the latest page beginning before the current stream cursor - position. Much dirtier than the above as Ogg doesn't have any - backward search linkage. no 'readp' as it will certainly have to - read. */ -/* returns offset or OV_EREAD, OV_FAULT and produces a refcounted page */ - -static ogg_int64_t _get_prev_page(OggVorbis_File *vf,ogg_page *og){ - ogg_int64_t begin=vf->offset; - ogg_int64_t end=begin; - ogg_int64_t ret; - ogg_int64_t offset=-1; - - while(offset==-1){ - begin-=CHUNKSIZE; - if(begin<0) - begin=0; - _seek_helper(vf,begin); - while(vf->offsetoffset); - if(ret==OV_EREAD)return(OV_EREAD); - if(ret<0){ - break; - }else{ - offset=ret; - } - } - } - - /* we have the offset. Actually snork and hold the page now */ - _seek_helper(vf,offset); - ret=_get_next_page(vf,og,CHUNKSIZE); - if(ret<0) - /* this shouldn't be possible */ - return(OV_EFAULT); - - return(offset); -} - -/* finds each bitstream link one at a time using a bisection search - (has to begin by knowing the offset of the lb's initial page). - Recurses for each link so it can alloc the link storage after - finding them all, then unroll and fill the cache at the same time */ -static int _bisect_forward_serialno(OggVorbis_File *vf, - ogg_int64_t begin, - ogg_int64_t searched, - ogg_int64_t end, - ogg_uint32_t currentno, - long m){ - ogg_int64_t endsearched=end; - ogg_int64_t next=end; - ogg_page og={0,0,0,0}; - ogg_int64_t ret; - - /* the below guards against garbage seperating the last and - first pages of two links. */ - while(searched=0)next=ret; - }else{ - searched=ret+og.header_len+og.body_len; - } - ogg_page_release(&og); - } - - _seek_helper(vf,next); - ret=_get_next_page(vf,&og,-1); - if(ret==OV_EREAD)return(OV_EREAD); - - if(searched>=end || ret<0){ - ogg_page_release(&og); - vf->links=m+1; - vf->offsets=_ogg_malloc((vf->links+1)*sizeof(*vf->offsets)); - vf->serialnos=_ogg_malloc(vf->links*sizeof(*vf->serialnos)); - vf->offsets[m+1]=searched; - }else{ - ret=_bisect_forward_serialno(vf,next,vf->offset, - end,ogg_page_serialno(&og),m+1); - ogg_page_release(&og); - if(ret==OV_EREAD)return(OV_EREAD); - } - - vf->offsets[m]=begin; - vf->serialnos[m]=currentno; - return(0); -} - -/* uses the local ogg_stream storage in vf; this is important for - non-streaming input sources */ -/* consumes the page that's passed in (if any) */ - -static int _fetch_headers(OggVorbis_File *vf, - vorbis_info *vi, - vorbis_comment *vc, - ogg_uint32_t *serialno, - ogg_page *og_ptr){ - ogg_page og={0,0,0,0}; - ogg_packet op={0,0,0,0,0,0}; - int i,ret; - - if(!og_ptr){ - ogg_int64_t llret=_get_next_page(vf,&og,CHUNKSIZE); - if(llret==OV_EREAD)return(OV_EREAD); - if(llret<0)return OV_ENOTVORBIS; - og_ptr=&og; - } - - ogg_stream_reset_serialno(vf->os,ogg_page_serialno(og_ptr)); - if(serialno)*serialno=vf->os->serialno; - vf->ready_state=STREAMSET; - - /* extract the initial header from the first page and verify that the - Ogg bitstream is in fact Vorbis data */ - - vorbis_info_init(vi); - vorbis_comment_init(vc); - - i=0; - while(i<3){ - ogg_stream_pagein(vf->os,og_ptr); - while(i<3){ - int result=ogg_stream_packetout(vf->os,&op); - if(result==0)break; - if(result==-1){ - ret=OV_EBADHEADER; - goto bail_header; - } - if((ret=vorbis_synthesis_headerin(vi,vc,&op))){ - goto bail_header; - } - i++; - } - if(i<3) - if(_get_next_page(vf,og_ptr,CHUNKSIZE)<0){ - ret=OV_EBADHEADER; - goto bail_header; - } - } - - ogg_packet_release(&op); - ogg_page_release(&og); - return 0; - - bail_header: - ogg_packet_release(&op); - ogg_page_release(&og); - vorbis_info_clear(vi); - vorbis_comment_clear(vc); - vf->ready_state=OPENED; - - return ret; -} - -/* last step of the OggVorbis_File initialization; get all the - vorbis_info structs and PCM positions. Only called by the seekable - initialization (local stream storage is hacked slightly; pay - attention to how that's done) */ - -/* this is void and does not propogate errors up because we want to be - able to open and use damaged bitstreams as well as we can. Just - watch out for missing information for links in the OggVorbis_File - struct */ -static void _prefetch_all_headers(OggVorbis_File *vf, ogg_int64_t dataoffset){ - ogg_page og={0,0,0,0}; - int i; - ogg_int64_t ret; - - vf->vi=_ogg_realloc(vf->vi,vf->links*sizeof(*vf->vi)); - vf->vc=_ogg_realloc(vf->vc,vf->links*sizeof(*vf->vc)); - vf->dataoffsets=_ogg_malloc(vf->links*sizeof(*vf->dataoffsets)); - vf->pcmlengths=_ogg_malloc(vf->links*2*sizeof(*vf->pcmlengths)); - - for(i=0;ilinks;i++){ - if(i==0){ - /* we already grabbed the initial header earlier. Just set the offset */ - vf->dataoffsets[i]=dataoffset; - _seek_helper(vf,dataoffset); - - }else{ - - /* seek to the location of the initial header */ - - _seek_helper(vf,vf->offsets[i]); - if(_fetch_headers(vf,vf->vi+i,vf->vc+i,NULL,NULL)<0){ - vf->dataoffsets[i]=-1; - }else{ - vf->dataoffsets[i]=vf->offset; - } - } - - /* fetch beginning PCM offset */ - - if(vf->dataoffsets[i]!=-1){ - ogg_int64_t accumulated=0,pos; - long lastblock=-1; - int result; - - ogg_stream_reset_serialno(vf->os,vf->serialnos[i]); - - while(1){ - ogg_packet op={0,0,0,0,0,0}; - - ret=_get_next_page(vf,&og,-1); - if(ret<0) - /* this should not be possible unless the file is - truncated/mangled */ - break; - - if(ogg_page_serialno(&og)!=vf->serialnos[i]) - break; - - pos=ogg_page_granulepos(&og); - - /* count blocksizes of all frames in the page */ - ogg_stream_pagein(vf->os,&og); - while((result=ogg_stream_packetout(vf->os,&op))){ - if(result>0){ /* ignore holes */ - long thisblock=vorbis_packet_blocksize(vf->vi+i,&op); - if(lastblock!=-1) - accumulated+=(lastblock+thisblock)>>2; - lastblock=thisblock; - } - } - ogg_packet_release(&op); - - if(pos!=-1){ - /* pcm offset of last packet on the first audio page */ - accumulated= pos-accumulated; - break; - } - } - - /* less than zero? This is a stream with samples trimmed off - the beginning, a normal occurrence; set the offset to zero */ - if(accumulated<0)accumulated=0; - - vf->pcmlengths[i*2]=accumulated; - } - - /* get the PCM length of this link. To do this, - get the last page of the stream */ - { - ogg_int64_t end=vf->offsets[i+1]; - _seek_helper(vf,end); - - while(1){ - ret=_get_prev_page(vf,&og); - if(ret<0){ - /* this should not be possible */ - vorbis_info_clear(vf->vi+i); - vorbis_comment_clear(vf->vc+i); - break; - } - if(ogg_page_granulepos(&og)!=-1){ - vf->pcmlengths[i*2+1]=ogg_page_granulepos(&og)-vf->pcmlengths[i*2]; - break; - } - vf->offset=ret; - } - } - } - ogg_page_release(&og); -} - -static void _make_decode_ready(OggVorbis_File *vf){ - if(vf->ready_state!=STREAMSET)return; - if(vf->seekable){ - vorbis_synthesis_init(&vf->vd,vf->vi+vf->current_link); - }else{ - vorbis_synthesis_init(&vf->vd,vf->vi); - } - vorbis_block_init(&vf->vd,&vf->vb); - vf->ready_state=INITSET; - vf->bittrack=0; - vf->samptrack=0; - return; -} - -static int _open_seekable2(OggVorbis_File *vf){ - ogg_uint32_t serialno=vf->current_serialno; - ogg_uint32_t tempserialno; - ogg_int64_t dataoffset=vf->offset, end; - ogg_page og={0,0,0,0}; - - /* we're partially open and have a first link header state in - storage in vf */ - /* we can seek, so set out learning all about this file */ - (vf->callbacks.seek_func)(vf->datasource,0,SEEK_END); - vf->offset=vf->end=(vf->callbacks.tell_func)(vf->datasource); - - /* We get the offset for the last page of the physical bitstream. - Most OggVorbis files will contain a single logical bitstream */ - end=_get_prev_page(vf,&og); - if(end<0)return(end); - - /* more than one logical bitstream? */ - tempserialno=ogg_page_serialno(&og); - ogg_page_release(&og); - - if(tempserialno!=serialno){ - - /* Chained bitstream. Bisect-search each logical bitstream - section. Do so based on serial number only */ - if(_bisect_forward_serialno(vf,0,0,end+1,serialno,0)<0)return(OV_EREAD); - - }else{ - - /* Only one logical bitstream */ - if(_bisect_forward_serialno(vf,0,end,end+1,serialno,0))return(OV_EREAD); - - } - - /* the initial header memory is referenced by vf after; don't free it */ - _prefetch_all_headers(vf,dataoffset); - return(ov_raw_seek(vf,0)); -} - -/* clear out the current logical bitstream decoder */ -static void _decode_clear(OggVorbis_File *vf){ - vorbis_dsp_clear(&vf->vd); - vorbis_block_clear(&vf->vb); - vf->ready_state=OPENED; -} - -/* fetch and process a packet. Handles the case where we're at a - bitstream boundary and dumps the decoding machine. If the decoding - machine is unloaded, it loads it. It also keeps pcm_offset up to - date (seek and read both use this. seek uses a special hack with - readp). - - return: <0) error, OV_HOLE (lost packet) or OV_EOF - 0) need more data (only if readp==0) - 1) got a packet -*/ - -static int _fetch_and_process_packet(OggVorbis_File *vf, - int readp, - int spanp){ - ogg_page og={0,0,0,0}; - ogg_packet op={0,0,0,0,0,0}; - int ret=0; - - /* handle one packet. Try to fetch it from current stream state */ - /* extract packets from page */ - while(1){ - - /* process a packet if we can. If the machine isn't loaded, - neither is a page */ - if(vf->ready_state==INITSET){ - while(1) { - int result=ogg_stream_packetout(vf->os,&op); - ogg_int64_t granulepos; - - if(result<0){ - ret=OV_HOLE; /* hole in the data. */ - goto cleanup; - } - if(result>0){ - /* got a packet. process it */ - granulepos=op.granulepos; - if(!vorbis_synthesis(&vf->vb,&op,1)){ /* lazy check for lazy - header handling. The - header packets aren't - audio, so if/when we - submit them, - vorbis_synthesis will - reject them */ - - /* suck in the synthesis data and track bitrate */ - { - int oldsamples=vorbis_synthesis_pcmout(&vf->vd,NULL); - /* for proper use of libvorbis within libvorbisfile, - oldsamples will always be zero. */ - if(oldsamples){ - ret=OV_EFAULT; - goto cleanup; - } - - vorbis_synthesis_blockin(&vf->vd,&vf->vb); - vf->samptrack+=vorbis_synthesis_pcmout(&vf->vd,NULL)-oldsamples; - vf->bittrack+=op.bytes*8; - } - - /* update the pcm offset. */ - if(granulepos!=-1 && !op.e_o_s){ - int link=(vf->seekable?vf->current_link:0); - int i,samples; - - /* this packet has a pcm_offset on it (the last packet - completed on a page carries the offset) After processing - (above), we know the pcm position of the *last* sample - ready to be returned. Find the offset of the *first* - - As an aside, this trick is inaccurate if we begin - reading anew right at the last page; the end-of-stream - granulepos declares the last frame in the stream, and the - last packet of the last page may be a partial frame. - So, we need a previous granulepos from an in-sequence page - to have a reference point. Thus the !op.e_o_s clause - above */ - - if(vf->seekable && link>0) - granulepos-=vf->pcmlengths[link*2]; - if(granulepos<0)granulepos=0; /* actually, this - shouldn't be possible - here unless the stream - is very broken */ - - samples=vorbis_synthesis_pcmout(&vf->vd,NULL); - - granulepos-=samples; - for(i=0;ipcmlengths[i*2+1]; - vf->pcm_offset=granulepos; - } - ret=1; - goto cleanup; - } - } - else - break; - } - } - - if(vf->ready_state>=OPENED){ - int ret; - if(!readp){ - ret=0; - goto cleanup; - } - if((ret=_get_next_page(vf,&og,-1))<0){ - ret=OV_EOF; /* eof. leave unitialized */ - goto cleanup; - } - - /* bitrate tracking; add the header's bytes here, the body bytes - are done by packet above */ - vf->bittrack+=og.header_len*8; - - /* has our decoding just traversed a bitstream boundary? */ - if(vf->ready_state==INITSET){ - if(vf->current_serialno!=ogg_page_serialno(&og)){ - if(!spanp){ - ret=OV_EOF; - goto cleanup; - } - - _decode_clear(vf); - - if(!vf->seekable){ - vorbis_info_clear(vf->vi); - vorbis_comment_clear(vf->vc); - } - } - } - } - - /* Do we need to load a new machine before submitting the page? */ - /* This is different in the seekable and non-seekable cases. - - In the seekable case, we already have all the header - information loaded and cached; we just initialize the machine - with it and continue on our merry way. - - In the non-seekable (streaming) case, we'll only be at a - boundary if we just left the previous logical bitstream and - we're now nominally at the header of the next bitstream - */ - - if(vf->ready_state!=INITSET){ - int link; - - if(vf->ready_stateseekable){ - vf->current_serialno=ogg_page_serialno(&og); - - /* match the serialno to bitstream section. We use this rather than - offset positions to avoid problems near logical bitstream - boundaries */ - for(link=0;linklinks;link++) - if(vf->serialnos[link]==vf->current_serialno)break; - if(link==vf->links){ - ret=OV_EBADLINK; /* sign of a bogus stream. error out, - leave machine uninitialized */ - goto cleanup; - } - - vf->current_link=link; - - ogg_stream_reset_serialno(vf->os,vf->current_serialno); - vf->ready_state=STREAMSET; - - }else{ - /* we're streaming */ - /* fetch the three header packets, build the info struct */ - - int ret=_fetch_headers(vf,vf->vi,vf->vc,&vf->current_serialno,&og); - if(ret) goto cleanup; - vf->current_link++; - link=0; - } - } - - _make_decode_ready(vf); - } - ogg_stream_pagein(vf->os,&og); - } - cleanup: - ogg_packet_release(&op); - ogg_page_release(&og); - return ret; -} - -/* if, eg, 64 bit stdio is configured by default, this will build with - fseek64 */ -static int _fseek64_wrap(FILE *f,ogg_int64_t off,int whence){ - if(f==NULL)return(-1); - return fseek(f,off,whence); -} - -static int _ov_open1(void *f,OggVorbis_File *vf,char *initial, - long ibytes, ov_callbacks callbacks){ - int offsettest=(f?callbacks.seek_func(f,0,SEEK_CUR):-1); - int ret; - - memset(vf,0,sizeof(*vf)); - vf->datasource=f; - vf->callbacks = callbacks; - - /* init the framing state */ - vf->oy=ogg_sync_create(); - - /* perhaps some data was previously read into a buffer for testing - against other stream types. Allow initialization from this - previously read data (as we may be reading from a non-seekable - stream) */ - if(initial){ - unsigned char *buffer=ogg_sync_bufferin(vf->oy,ibytes); - memcpy(buffer,initial,ibytes); - ogg_sync_wrote(vf->oy,ibytes); - } - - /* can we seek? Stevens suggests the seek test was portable */ - if(offsettest!=-1)vf->seekable=1; - - /* No seeking yet; Set up a 'single' (current) logical bitstream - entry for partial open */ - vf->links=1; - vf->vi=_ogg_calloc(vf->links,sizeof(*vf->vi)); - vf->vc=_ogg_calloc(vf->links,sizeof(*vf->vc)); - vf->os=ogg_stream_create(-1); /* fill in the serialno later */ - - /* Try to fetch the headers, maintaining all the storage */ - if((ret=_fetch_headers(vf,vf->vi,vf->vc,&vf->current_serialno,NULL))<0){ - vf->datasource=NULL; - ov_clear(vf); - }else if(vf->ready_state < PARTOPEN) - vf->ready_state=PARTOPEN; - return(ret); -} - -static int _ov_open2(OggVorbis_File *vf){ - if(vf->ready_state < OPENED) - vf->ready_state=OPENED; - if(vf->seekable){ - int ret=_open_seekable2(vf); - if(ret){ - vf->datasource=NULL; - ov_clear(vf); - } - return(ret); - } - return 0; -} - - -/* clear out the OggVorbis_File struct */ -int ov_clear(OggVorbis_File *vf){ - if(vf){ - vorbis_block_clear(&vf->vb); - vorbis_dsp_clear(&vf->vd); - ogg_stream_destroy(vf->os); - - if(vf->vi && vf->links){ - int i; - for(i=0;ilinks;i++){ - vorbis_info_clear(vf->vi+i); - vorbis_comment_clear(vf->vc+i); - } - _ogg_free(vf->vi); - _ogg_free(vf->vc); - } - if(vf->dataoffsets)_ogg_free(vf->dataoffsets); - if(vf->pcmlengths)_ogg_free(vf->pcmlengths); - if(vf->serialnos)_ogg_free(vf->serialnos); - if(vf->offsets)_ogg_free(vf->offsets); - ogg_sync_destroy(vf->oy); - - if(vf->datasource)(vf->callbacks.close_func)(vf->datasource); - memset(vf,0,sizeof(*vf)); - } -#ifdef DEBUG_LEAKS - _VDBG_dump(); -#endif - return(0); -} - -/* inspects the OggVorbis file and finds/documents all the logical - bitstreams contained in it. Tries to be tolerant of logical - bitstream sections that are truncated/woogie. - - return: -1) error - 0) OK -*/ - -int ov_open_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes, - ov_callbacks callbacks){ - int ret=_ov_open1(f,vf,initial,ibytes,callbacks); - if(ret)return ret; - return _ov_open2(vf); -} - -int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){ - ov_callbacks callbacks = { - (size_t (*)(void *, size_t, size_t, void *)) fread, - (int (*)(void *, ogg_int64_t, int)) _fseek64_wrap, - (int (*)(void *)) fclose, - (long (*)(void *)) ftell - }; - - return ov_open_callbacks((void *)f, vf, initial, ibytes, callbacks); -} - -/* Only partially open the vorbis file; test for Vorbisness, and load - the headers for the first chain. Do not seek (although test for - seekability). Use ov_test_open to finish opening the file, else - ov_clear to close/free it. Same return codes as open. */ - -int ov_test_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes, - ov_callbacks callbacks) -{ - return _ov_open1(f,vf,initial,ibytes,callbacks); -} - -int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){ - ov_callbacks callbacks = { - (size_t (*)(void *, size_t, size_t, void *)) fread, - (int (*)(void *, ogg_int64_t, int)) _fseek64_wrap, - (int (*)(void *)) fclose, - (long (*)(void *)) ftell - }; - - return ov_test_callbacks((void *)f, vf, initial, ibytes, callbacks); -} - -int ov_test_open(OggVorbis_File *vf){ - if(vf->ready_state!=PARTOPEN)return(OV_EINVAL); - return _ov_open2(vf); -} - -/* How many logical bitstreams in this physical bitstream? */ -long ov_streams(OggVorbis_File *vf){ - return vf->links; -} - -/* Is the FILE * associated with vf seekable? */ -long ov_seekable(OggVorbis_File *vf){ - return vf->seekable; -} - -/* returns the bitrate for a given logical bitstream or the entire - physical bitstream. If the file is open for random access, it will - find the *actual* average bitrate. If the file is streaming, it - returns the nominal bitrate (if set) else the average of the - upper/lower bounds (if set) else -1 (unset). - - If you want the actual bitrate field settings, get them from the - vorbis_info structs */ - -long ov_bitrate(OggVorbis_File *vf,int i){ - if(vf->ready_state=vf->links)return(OV_EINVAL); - if(!vf->seekable && i!=0)return(ov_bitrate(vf,0)); - if(i<0){ - ogg_int64_t bits=0; - int i; - for(i=0;ilinks;i++) - bits+=(vf->offsets[i+1]-vf->dataoffsets[i])*8; - /* This once read: return(rint(bits/ov_time_total(vf,-1))); - * gcc 3.x on x86 miscompiled this at optimisation level 2 and above, - * so this is slightly transformed to make it work. - */ - return(bits*1000/ov_time_total(vf,-1)); - }else{ - if(vf->seekable){ - /* return the actual bitrate */ - return((vf->offsets[i+1]-vf->dataoffsets[i])*8000/ov_time_total(vf,i)); - }else{ - /* return nominal if set */ - if(vf->vi[i].bitrate_nominal>0){ - return vf->vi[i].bitrate_nominal; - }else{ - if(vf->vi[i].bitrate_upper>0){ - if(vf->vi[i].bitrate_lower>0){ - return (vf->vi[i].bitrate_upper+vf->vi[i].bitrate_lower)/2; - }else{ - return vf->vi[i].bitrate_upper; - } - } - return(OV_FALSE); - } - } - } -} - -/* returns the actual bitrate since last call. returns -1 if no - additional data to offer since last call (or at beginning of stream), - EINVAL if stream is only partially open -*/ -long ov_bitrate_instant(OggVorbis_File *vf){ - int link=(vf->seekable?vf->current_link:0); - long ret; - if(vf->ready_statesamptrack==0)return(OV_FALSE); - ret=vf->bittrack/vf->samptrack*vf->vi[link].rate; - vf->bittrack=0; - vf->samptrack=0; - return(ret); -} - -/* Guess */ -long ov_serialnumber(OggVorbis_File *vf,int i){ - if(i>=vf->links)return(ov_serialnumber(vf,vf->links-1)); - if(!vf->seekable && i>=0)return(ov_serialnumber(vf,-1)); - if(i<0){ - return(vf->current_serialno); - }else{ - return(vf->serialnos[i]); - } -} - -/* returns: total raw (compressed) length of content if i==-1 - raw (compressed) length of that logical bitstream for i==0 to n - OV_EINVAL if the stream is not seekable (we can't know the length) - or if stream is only partially open -*/ -ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i){ - if(vf->ready_stateseekable || i>=vf->links)return(OV_EINVAL); - if(i<0){ - ogg_int64_t acc=0; - int i; - for(i=0;ilinks;i++) - acc+=ov_raw_total(vf,i); - return(acc); - }else{ - return(vf->offsets[i+1]-vf->offsets[i]); - } -} - -/* returns: total PCM length (samples) of content if i==-1 PCM length - (samples) of that logical bitstream for i==0 to n - OV_EINVAL if the stream is not seekable (we can't know the - length) or only partially open -*/ -ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i){ - if(vf->ready_stateseekable || i>=vf->links)return(OV_EINVAL); - if(i<0){ - ogg_int64_t acc=0; - int i; - for(i=0;ilinks;i++) - acc+=ov_pcm_total(vf,i); - return(acc); - }else{ - return(vf->pcmlengths[i*2+1]); - } -} - -/* returns: total milliseconds of content if i==-1 - milliseconds in that logical bitstream for i==0 to n - OV_EINVAL if the stream is not seekable (we can't know the - length) or only partially open -*/ -ogg_int64_t ov_time_total(OggVorbis_File *vf,int i){ - if(vf->ready_stateseekable || i>=vf->links)return(OV_EINVAL); - if(i<0){ - ogg_int64_t acc=0; - int i; - for(i=0;ilinks;i++) - acc+=ov_time_total(vf,i); - return(acc); - }else{ - return(((ogg_int64_t)vf->pcmlengths[i*2+1])*1000/vf->vi[i].rate); - } -} - -/* seek to an offset relative to the *compressed* data. This also - scans packets to update the PCM cursor. It will cross a logical - bitstream boundary, but only if it can't get any packets out of the - tail of the bitstream we seek to (so no surprises). - - returns zero on success, nonzero on failure */ - -int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos){ - ogg_stream_state *work_os=NULL; - ogg_page og={0,0,0,0}; - ogg_packet op={0,0,0,0,0,0}; - - if(vf->ready_stateseekable) - return(OV_ENOSEEK); /* don't dump machine if we can't seek */ - - if(pos<0 || pos>vf->end)return(OV_EINVAL); - - /* don't yet clear out decoding machine (if it's initialized), in - the case we're in the same link. Restart the decode lapping, and - let _fetch_and_process_packet deal with a potential bitstream - boundary */ - vf->pcm_offset=-1; - ogg_stream_reset_serialno(vf->os, - vf->current_serialno); /* must set serialno */ - vorbis_synthesis_restart(&vf->vd); - - _seek_helper(vf,pos); - - /* we need to make sure the pcm_offset is set, but we don't want to - advance the raw cursor past good packets just to get to the first - with a granulepos. That's not equivalent behavior to beginning - decoding as immediately after the seek position as possible. - - So, a hack. We use two stream states; a local scratch state and - the shared vf->os stream state. We use the local state to - scan, and the shared state as a buffer for later decode. - - Unfortuantely, on the last page we still advance to last packet - because the granulepos on the last page is not necessarily on a - packet boundary, and we need to make sure the granpos is - correct. - */ - - { - int lastblock=0; - int accblock=0; - int thisblock; - int eosflag=0; - - work_os=ogg_stream_create(vf->current_serialno); /* get the memory ready */ - while(1){ - if(vf->ready_state>=STREAMSET){ - /* snarf/scan a packet if we can */ - int result=ogg_stream_packetout(work_os,&op); - - if(result>0){ - - if(vf->vi[vf->current_link].codec_setup){ - thisblock=vorbis_packet_blocksize(vf->vi+vf->current_link,&op); - if(thisblock<0){ - ogg_stream_packetout(vf->os,NULL); - thisblock=0; - }else{ - - if(eosflag) - ogg_stream_packetout(vf->os,NULL); - else - if(lastblock)accblock+=(lastblock+thisblock)>>2; - } - - if(op.granulepos!=-1){ - int i,link=vf->current_link; - ogg_int64_t granulepos=op.granulepos-vf->pcmlengths[link*2]; - if(granulepos<0)granulepos=0; - - for(i=0;ipcmlengths[i*2+1]; - vf->pcm_offset=granulepos-accblock; - break; - } - lastblock=thisblock; - continue; - }else - ogg_stream_packetout(vf->os,NULL); - } - } - - if(!lastblock){ - if(_get_next_page(vf,&og,-1)<0){ - vf->pcm_offset=ov_pcm_total(vf,-1); - break; - } - }else{ - /* huh? Bogus stream with packets but no granulepos */ - vf->pcm_offset=-1; - break; - } - - /* has our decoding just traversed a bitstream boundary? */ - if(vf->ready_state>=STREAMSET) - if(vf->current_serialno!=ogg_page_serialno(&og)){ - _decode_clear(vf); /* clear out stream state */ - ogg_stream_destroy(work_os); - } - - if(vf->ready_statecurrent_serialno=ogg_page_serialno(&og); - for(link=0;linklinks;link++) - if(vf->serialnos[link]==vf->current_serialno)break; - if(link==vf->links) - goto seek_error; /* sign of a bogus stream. error out, - leave machine uninitialized */ - - vf->current_link=link; - - ogg_stream_reset_serialno(vf->os,vf->current_serialno); - ogg_stream_reset_serialno(work_os,vf->current_serialno); - vf->ready_state=STREAMSET; - - } - - { - ogg_page dup; - ogg_page_dup(&dup,&og); - eosflag=ogg_page_eos(&og); - ogg_stream_pagein(vf->os,&og); - ogg_stream_pagein(work_os,&dup); - } - } - } - - ogg_packet_release(&op); - ogg_page_release(&og); - ogg_stream_destroy(work_os); - vf->bittrack=0; - vf->samptrack=0; - return(0); - - seek_error: - ogg_packet_release(&op); - ogg_page_release(&og); - - /* dump the machine so we're in a known state */ - vf->pcm_offset=-1; - ogg_stream_destroy(work_os); - _decode_clear(vf); - return OV_EBADLINK; -} - -/* Page granularity seek (faster than sample granularity because we - don't do the last bit of decode to find a specific sample). - - Seek to the last [granule marked] page preceeding the specified pos - location, such that decoding past the returned point will quickly - arrive at the requested position. */ -int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos){ - int link=-1; - ogg_int64_t result=0; - ogg_int64_t total=ov_pcm_total(vf,-1); - ogg_page og={0,0,0,0}; - ogg_packet op={0,0,0,0,0,0}; - - if(vf->ready_stateseekable)return(OV_ENOSEEK); - if(pos<0 || pos>total)return(OV_EINVAL); - - /* which bitstream section does this pcm offset occur in? */ - for(link=vf->links-1;link>=0;link--){ - total-=vf->pcmlengths[link*2+1]; - if(pos>=total)break; - } - - /* search within the logical bitstream for the page with the highest - pcm_pos preceeding (or equal to) pos. There is a danger here; - missing pages or incorrect frame number information in the - bitstream could make our task impossible. Account for that (it - would be an error condition) */ - - /* new search algorithm by HB (Nicholas Vinen) */ - { - ogg_int64_t end=vf->offsets[link+1]; - ogg_int64_t begin=vf->offsets[link]; - ogg_int64_t begintime = vf->pcmlengths[link*2]; - ogg_int64_t endtime = vf->pcmlengths[link*2+1]+begintime; - ogg_int64_t target=pos-total+begintime; - ogg_int64_t best=begin; - - while(beginoffset); - if(result==OV_EREAD) goto seek_error; - if(result<0){ - if(bisect<=begin+1) - end=begin; /* found it */ - else{ - if(bisect==0) goto seek_error; - bisect-=CHUNKSIZE; - if(bisect<=begin)bisect=begin+1; - _seek_helper(vf,bisect); - } - }else{ - ogg_int64_t granulepos=ogg_page_granulepos(&og); - if(granulepos==-1)continue; - if(granuleposoffset; /* raw offset of next page */ - begintime=granulepos; - - if(target-begintime>44100)break; - bisect=begin; /* *not* begin + 1 */ - }else{ - if(bisect<=begin+1) - end=begin; /* found it */ - else{ - if(end==vf->offset){ /* we're pretty close - we'd be stuck in */ - end=result; - bisect-=CHUNKSIZE; /* an endless loop otherwise. */ - if(bisect<=begin)bisect=begin+1; - _seek_helper(vf,bisect); - }else{ - end=result; - endtime=granulepos; - break; - } - } - } - } - } - } - - /* found our page. seek to it, update pcm offset. Easier case than - raw_seek, don't keep packets preceeding granulepos. */ - { - - /* seek */ - _seek_helper(vf,best); - vf->pcm_offset=-1; - - if(_get_next_page(vf,&og,-1)<0){ - ogg_page_release(&og); - return(OV_EOF); /* shouldn't happen */ - } - - if(link!=vf->current_link){ - /* Different link; dump entire decode machine */ - _decode_clear(vf); - - vf->current_link=link; - vf->current_serialno=ogg_page_serialno(&og); - vf->ready_state=STREAMSET; - - }else{ - vorbis_synthesis_restart(&vf->vd); - } - - ogg_stream_reset_serialno(vf->os,vf->current_serialno); - ogg_stream_pagein(vf->os,&og); - - /* pull out all but last packet; the one with granulepos */ - while(1){ - result=ogg_stream_packetpeek(vf->os,&op); - if(result==0){ - /* !!! the packet finishing this page originated on a - preceeding page. Keep fetching previous pages until we - get one with a granulepos or without the 'continued' flag - set. Then just use raw_seek for simplicity. */ - - _seek_helper(vf,best); - - while(1){ - result=_get_prev_page(vf,&og); - if(result<0) goto seek_error; - if(ogg_page_granulepos(&og)>-1 || - !ogg_page_continued(&og)){ - return ov_raw_seek(vf,result); - } - vf->offset=result; - } - } - if(result<0){ - result = OV_EBADPACKET; - goto seek_error; - } - if(op.granulepos!=-1){ - vf->pcm_offset=op.granulepos-vf->pcmlengths[vf->current_link*2]; - if(vf->pcm_offset<0)vf->pcm_offset=0; - vf->pcm_offset+=total; - break; - }else - result=ogg_stream_packetout(vf->os,NULL); - } - } - } - - /* verify result */ - if(vf->pcm_offset>pos || pos>ov_pcm_total(vf,-1)){ - result=OV_EFAULT; - goto seek_error; - } - vf->bittrack=0; - vf->samptrack=0; - - ogg_page_release(&og); - ogg_packet_release(&op); - return(0); - - seek_error: - - ogg_page_release(&og); - ogg_packet_release(&op); - - /* dump machine so we're in a known state */ - vf->pcm_offset=-1; - _decode_clear(vf); - return (int)result; -} - -/* seek to a sample offset relative to the decompressed pcm stream - returns zero on success, nonzero on failure */ - -int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos){ - ogg_packet op={0,0,0,0,0,0}; - ogg_page og={0,0,0,0}; - int thisblock,lastblock=0; - int ret=ov_pcm_seek_page(vf,pos); - if(ret<0)return(ret); - _make_decode_ready(vf); - - /* discard leading packets we don't need for the lapping of the - position we want; don't decode them */ - - while(1){ - - int ret=ogg_stream_packetpeek(vf->os,&op); - if(ret>0){ - thisblock=vorbis_packet_blocksize(vf->vi+vf->current_link,&op); - if(thisblock<0){ - ogg_stream_packetout(vf->os,NULL); - continue; /* non audio packet */ - } - if(lastblock)vf->pcm_offset+=(lastblock+thisblock)>>2; - - if(vf->pcm_offset+((thisblock+ - vorbis_info_blocksize(vf->vi,1))>>2)>=pos)break; - - /* remove the packet from packet queue and track its granulepos */ - ogg_stream_packetout(vf->os,NULL); - vorbis_synthesis(&vf->vb,&op,0); /* set up a vb with - only tracking, no - pcm_decode */ - vorbis_synthesis_blockin(&vf->vd,&vf->vb); - - /* end of logical stream case is hard, especially with exact - length positioning. */ - - if(op.granulepos>-1){ - int i; - /* always believe the stream markers */ - vf->pcm_offset=op.granulepos-vf->pcmlengths[vf->current_link*2]; - if(vf->pcm_offset<0)vf->pcm_offset=0; - for(i=0;icurrent_link;i++) - vf->pcm_offset+=vf->pcmlengths[i*2+1]; - } - - lastblock=thisblock; - - }else{ - if(ret<0 && ret!=OV_HOLE)break; - - /* suck in a new page */ - if(_get_next_page(vf,&og,-1)<0)break; - if(vf->current_serialno!=ogg_page_serialno(&og))_decode_clear(vf); - - if(vf->ready_statecurrent_serialno=ogg_page_serialno(&og); - for(link=0;linklinks;link++) - if(vf->serialnos[link]==vf->current_serialno)break; - if(link==vf->links){ - ogg_page_release(&og); - ogg_packet_release(&op); - return(OV_EBADLINK); - } - vf->current_link=link; - - ogg_stream_reset_serialno(vf->os,vf->current_serialno); - vf->ready_state=STREAMSET; - _make_decode_ready(vf); - lastblock=0; - } - - ogg_stream_pagein(vf->os,&og); - } - } - - vf->bittrack=0; - vf->samptrack=0; - /* discard samples until we reach the desired position. Crossing a - logical bitstream boundary with abandon is OK. */ - while(vf->pcm_offsetpcm_offset; - long samples=vorbis_synthesis_pcmout(&vf->vd,NULL); - - if(samples>target)samples=target; - vorbis_synthesis_read(&vf->vd,samples); - vf->pcm_offset+=samples; - - if(samplespcm_offset=ov_pcm_total(vf,-1); /* eof */ - } - - ogg_page_release(&og); - ogg_packet_release(&op); - return 0; -} - -/* seek to a playback time relative to the decompressed pcm stream - returns zero on success, nonzero on failure */ -int ov_time_seek(OggVorbis_File *vf,ogg_int64_t milliseconds){ - /* translate time to PCM position and call ov_pcm_seek */ - - int link=-1; - ogg_int64_t pcm_total=ov_pcm_total(vf,-1); - ogg_int64_t time_total=ov_time_total(vf,-1); - - if(vf->ready_stateseekable)return(OV_ENOSEEK); - if(milliseconds<0 || milliseconds>time_total)return(OV_EINVAL); - - /* which bitstream section does this time offset occur in? */ - for(link=vf->links-1;link>=0;link--){ - pcm_total-=vf->pcmlengths[link*2+1]; - time_total-=ov_time_total(vf,link); - if(milliseconds>=time_total)break; - } - - /* enough information to convert time offset to pcm offset */ - { - ogg_int64_t target=pcm_total+(milliseconds-time_total)*vf->vi[link].rate/1000; - return(ov_pcm_seek(vf,target)); - } -} - -/* page-granularity version of ov_time_seek - returns zero on success, nonzero on failure */ -int ov_time_seek_page(OggVorbis_File *vf,ogg_int64_t milliseconds){ - /* translate time to PCM position and call ov_pcm_seek */ - - int link=-1; - ogg_int64_t pcm_total=ov_pcm_total(vf,-1); - ogg_int64_t time_total=ov_time_total(vf,-1); - - if(vf->ready_stateseekable)return(OV_ENOSEEK); - if(milliseconds<0 || milliseconds>time_total)return(OV_EINVAL); - - /* which bitstream section does this time offset occur in? */ - for(link=vf->links-1;link>=0;link--){ - pcm_total-=vf->pcmlengths[link*2+1]; - time_total-=ov_time_total(vf,link); - if(milliseconds>=time_total)break; - } - - /* enough information to convert time offset to pcm offset */ - { - ogg_int64_t target=pcm_total+(milliseconds-time_total)*vf->vi[link].rate/1000; - return(ov_pcm_seek_page(vf,target)); - } -} - -/* tell the current stream offset cursor. Note that seek followed by - tell will likely not give the set offset due to caching */ -ogg_int64_t ov_raw_tell(OggVorbis_File *vf){ - if(vf->ready_stateoffset); -} - -/* return PCM offset (sample) of next PCM sample to be read */ -ogg_int64_t ov_pcm_tell(OggVorbis_File *vf){ - if(vf->ready_statepcm_offset); -} - -/* return time offset (milliseconds) of next PCM sample to be read */ -ogg_int64_t ov_time_tell(OggVorbis_File *vf){ - int link=0; - ogg_int64_t pcm_total=0; - ogg_int64_t time_total=0; - - if(vf->ready_stateseekable){ - pcm_total=ov_pcm_total(vf,-1); - time_total=ov_time_total(vf,-1); - - /* which bitstream section does this time offset occur in? */ - for(link=vf->links-1;link>=0;link--){ - pcm_total-=vf->pcmlengths[link*2+1]; - time_total-=ov_time_total(vf,link); - if(vf->pcm_offset>=pcm_total)break; - } - } - - return(time_total+(1000*vf->pcm_offset-pcm_total)/vf->vi[link].rate); -} - -/* link: -1) return the vorbis_info struct for the bitstream section - currently being decoded - 0-n) to request information for a specific bitstream section - - In the case of a non-seekable bitstream, any call returns the - current bitstream. NULL in the case that the machine is not - initialized */ - -vorbis_info *ov_info(OggVorbis_File *vf,int link){ - if(vf->seekable){ - if(link<0) - if(vf->ready_state>=STREAMSET) - return vf->vi+vf->current_link; - else - return vf->vi; - else - if(link>=vf->links) - return NULL; - else - return vf->vi+link; - }else{ - return vf->vi; - } -} - -/* grr, strong typing, grr, no templates/inheritence, grr */ -vorbis_comment *ov_comment(OggVorbis_File *vf,int link){ - if(vf->seekable){ - if(link<0) - if(vf->ready_state>=STREAMSET) - return vf->vc+vf->current_link; - else - return vf->vc; - else - if(link>=vf->links) - return NULL; - else - return vf->vc+link; - }else{ - return vf->vc; - } -} - -/* up to this point, everything could more or less hide the multiple - logical bitstream nature of chaining from the toplevel application - if the toplevel application didn't particularly care. However, at - the point that we actually read audio back, the multiple-section - nature must surface: Multiple bitstream sections do not necessarily - have to have the same number of channels or sampling rate. - - ov_read returns the sequential logical bitstream number currently - being decoded along with the PCM data in order that the toplevel - application can take action on channel/sample rate changes. This - number will be incremented even for streamed (non-seekable) streams - (for seekable streams, it represents the actual logical bitstream - index within the physical bitstream. Note that the accessor - functions above are aware of this dichotomy). - - input values: buffer) a buffer to hold packed PCM data for return - length) the byte length requested to be placed into buffer - - return values: <0) error/hole in data (OV_HOLE), partial open (OV_EINVAL) - 0) EOF - n) number of bytes of PCM actually returned. The - below works on a packet-by-packet basis, so the - return length is not related to the 'length' passed - in, just guaranteed to fit. - - *section) set to the logical bitstream number */ - -long ov_read(OggVorbis_File *vf,char *buffer,int bytes_req,int *bitstream){ - int i,j; - - ogg_int32_t **pcm; - long samples; - - if(vf->ready_stateready_state==INITSET){ - samples=vorbis_synthesis_pcmout(&vf->vd,&pcm); - if(samples)break; - } - - /* suck in another packet */ - { - int ret=_fetch_and_process_packet(vf,1,1); - if(ret==OV_EOF) - return(0); - if(ret<=0) - return(ret); - } - - } - - if(samples>0){ - - /* yay! proceed to pack data into the byte buffer */ - - long channels=ov_info(vf,-1)->channels; - - if(samples>(bytes_req/(2*channels))) - samples=bytes_req/(2*channels); - - for(i=0;i>9); - dest+=channels; - } - } - - vorbis_synthesis_read(&vf->vd,samples); - vf->pcm_offset+=samples; - if(bitstream)*bitstream=vf->current_link; - return(samples*2*channels); - }else{ - return(samples); - } -} diff --git a/wolf3d/newCode/Tremor/window.c b/wolf3d/newCode/Tremor/window.c deleted file mode 100644 index 006a1ee..0000000 --- a/wolf3d/newCode/Tremor/window.c +++ /dev/null @@ -1,83 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * - * * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * - * * - ******************************************************************** - - function: window functions - - ********************************************************************/ - -#include -#include -#include "misc.h" -#include "window.h" -#include "window_lookup.h" - -const void *_vorbis_window(int type, int left){ - - switch(type){ - case 0: - - switch(left){ - case 32: - return vwin64; - case 64: - return vwin128; - case 128: - return vwin256; - case 256: - return vwin512; - case 512: - return vwin1024; - case 1024: - return vwin2048; - case 2048: - return vwin4096; - case 4096: - return vwin8192; - default: - return(0); - } - break; - default: - return(0); - } -} - -void _vorbis_apply_window(ogg_int32_t *d,const void *window_p[2], - long *blocksizes, - int lW,int W,int nW){ - - LOOKUP_T *window[2]={window_p[0],window_p[1]}; - long n=blocksizes[W]; - long ln=blocksizes[lW]; - long rn=blocksizes[nW]; - - long leftbegin=n/4-ln/4; - long leftend=leftbegin+ln/2; - - long rightbegin=n/2+n/4-rn/4; - long rightend=rightbegin+rn/2; - - int i,p; - - for(i=0;i - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * angle.h: Angle math routines. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * Portion of this code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#include "../wolfiphone.h" - -/* ------------------------------------------------------------------------------ - Function: angle_diff -Finds the difference between two angles. - - Parameters: angle1, angle2 -[in] Angles in Radians. - - Returns: - Returns the absolute difference between two angles, this will always - be between 0 and 180 degrees. - - Notes: ------------------------------------------------------------------------------ -*/ -INLINECALL float angle_diff( float angle1, float angle2 ) -{ - float d; - - if( angle1 > angle2 ) - { - d = angle1 - angle2; - } - else - { - d = angle2 - angle1; - } - - if( d > M_PI ) - { - return 2 * M_PI - d; - } - else - { - return d; - } -} - -/* ------------------------------------------------------------------------------ - Function: angle_wise -Clockwise distance between two angles. - - Parameters: angle1, angle2 -[in] Angles in Radians. - - Returns: - Returns the clockwise distance from angle2 to angle1, this may be - greater than 180 degrees. - - Notes: ------------------------------------------------------------------------------ -*/ -INLINECALL float angle_wise( float angle1, float angle2 ) -{ - if( angle1 > angle2 ) - { - return angle1 - angle2; - } - else - { - return angle1 + 2 * M_PI - angle2; - } -} - -/* ------------------------------------------------------------------------------ - Function: interpolate_angle -Linear interpolate between angle A and B by - fraction 'f'. - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -INLINECALL float interpolate_angle( float from, float to, float fraction ) -{ - float diff = angle_diff( from, to ) * fraction; - - if( angle_wise( to, from ) >= M_PI ) - { - return from - diff; - } - else - { - return from + diff; - } -} - -/* ------------------------------------------------------------------------------ - Function: normalize_angle - - - Parameters: - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -INLINECALL float normalize_angle( float angle ) -{ - while( angle < 0 ) - { - angle += (2 * M_PI); - } - - while( angle >= (2 * M_PI) ) - { - angle -= (2 * M_PI); - } - - return angle; -} - -/* ------------------------------------------------------------------------------ - Function: LerpAngle -Linear interpolate allowing for the Modulo 360 problem. - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -INLINECALL float LerpAngle( float from, float to, float frac ) -{ - if( to - from > 180 ) - { - to -= 360; - } - - if( to - from < -180 ) - { - to += 360; - } - - return from + frac * (to - from); -} diff --git a/wolf3d/newCode/env/angle.h b/wolf3d/newCode/env/angle.h deleted file mode 100644 index 500ac28..0000000 --- a/wolf3d/newCode/env/angle.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - - Copyright (C) 2005 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * angle.h: Angle math routines. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * Portion of this code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#ifndef __ANGLE_H__ -#define __ANGLE_H__ - - -#define DEG2RAD( a ) ( (a) * 0.01745329251994329576f ) // a * M_PI / 180.0f -#define RAD2DEG( a ) ( (int)((a) / 0.01745329251994329576f) ) // a * 180.0f / M_PI - -#define ANGLE2SHORT( x ) ( (int)((x) * 65536 / 360) & 65535 ) -#define SHORT2ANGLE( x ) ( (x) * (360.0 / 65536) ) - - - -extern float angle_diff( float angle1, float angle2 ); -extern float angle_wise( float angle1, float angle2 ); -extern float interpolate_angle( float from, float to, float fraction ); -extern float normalize_angle( float angle ); -extern float LerpAngle( float from, float to, float frac ); - - - -#endif /* __ANGLE_H__ */ diff --git a/wolf3d/newCode/env/app_def.h b/wolf3d/newCode/env/app_def.h deleted file mode 100644 index d74edb8..0000000 --- a/wolf3d/newCode/env/app_def.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * app_def.h: Engine interface to game layer. - * - */ - -#ifndef __APP_DEF__ -#define __APP_DEF__ - - - -#define WOLFENSTEIN3D 1 - - -#if WOLFENSTEIN3D - - #define APP_VERSION "0.01i" - - #define RELEASENAME "Nebka" - - #define BASEDIRNAME "base" - - - #define GAME_NAME "Wolfenstein 3-D Redux" - -#endif /* WOLFENSTEIN3D */ - - - -#endif /* __APP_DEF__ */ - diff --git a/wolf3d/newCode/env/arch.c b/wolf3d/newCode/env/arch.c deleted file mode 100644 index 9fb7aa0..0000000 --- a/wolf3d/newCode/env/arch.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * arch.c: Portable byte swapping. - * - * Author: Id Software, Inc. - * Date: 1997-2001 - * - */ - -#include "../wolfiphone.h" - - -/* ------------------------------------------------------------------------------ - Function: FloatSwap -Endian byte swapping on Float value. - - Parameters: f -[in] Float value to byte swap. - - Returns: Byte swapped float value. - - Notes: - ------------------------------------------------------------------------------ -*/ -INLINECALL float FloatSwap( float f ) -{ - union - { - float f; - W8 b[ 4 ]; - - } dat1, dat2; - - dat1.f = f; - dat2.b[ 0 ] = dat1.b[ 3 ]; - dat2.b[ 1 ] = dat1.b[ 2 ]; - dat2.b[ 2 ] = dat1.b[ 1 ]; - dat2.b[ 3 ] = dat1.b[ 0 ]; - - return dat2.f; -} diff --git a/wolf3d/newCode/env/arch.h b/wolf3d/newCode/env/arch.h deleted file mode 100644 index 73badb0..0000000 --- a/wolf3d/newCode/env/arch.h +++ /dev/null @@ -1,273 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * arch.h: System dependant #defines and macros. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * Portion of this code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#ifndef __ARCH_H__ -#define __ARCH_H__ - - - -// Define BUILDSTRING and CPUSTRING based on platform -#ifdef _WIN32 - - #ifdef _DEBUG - - #define BUILDSTRING "Win32 DEBUG" - - #else - - #define BUILDSTRING "Win32 RELEASE" - - #endif - - - #ifdef _M_IX86 - - #define CPUSTRING "x86" - - #elif defined _M_ALPHA - - #define CPUSTRING "AXP" - - #else - - #define CPUSTRING "Unknown CPU" - - #endif - - -#elif defined __linux__ - - #define BUILDSTRING "Linux" - - #ifdef __i386__ - - #define CPUSTRING "i386" - - #elif defined __alpha__ - - #define CPUSTRING "AXP" - - #else - - #define CPUSTRING "Unknown CPU" - - #endif - - -#elif defined __FreeBSD__ - - #define BUILDSTRING "FreeBSD" - - #ifdef __i386__ - - #define CPUSTRING "i386" - - #else - - #define CPUSTRING "Unknown CPU" - - #endif - - -#elif defined __sun__ - - #define BUILDSTRING "Solaris" - - #ifdef __i386__ - - #define CPUSTRING "i386" - - #else - - #define CPUSTRING "sparc" - - #endif - - -#elif defined MACOS - - #define BUILDSTRING "MAC" - - #ifdef __powerpc__ - - #define CPUSTRING "PowerPC" - - #else - - #define CPUSTRING "Unknown CPU" - - #endif - - -#else - - #define BUILDSTRING "Unknown OS" - #define CPUSTRING "Unknown CPU" - -#endif /* if WIN32 else __linux__ else __FreeBSD__ else __sun__ else MACOS */ - - - - - -/* - correct numeric types: W8, SW8, W16, SW16, W32, SW32, W64, SW64 - correct misc types: void, float, _boolean - - s -signed - XX -Number of bits - -*/ -#if( __GNUC__ || __WATCOMC__ || _MSC_VER ) - - - typedef unsigned char W8, *PW8; - typedef signed char SW8, *PSW8; - typedef unsigned short W16, *PW16; - typedef signed short SW16, *PSW16; - typedef unsigned long W32, *PW32; - typedef signed long SW32, *PSW32; - - - - #if( __GNUC__ ) - - typedef unsigned long long W64, *PW64; - typedef long long SW64, *PSW64; - - #elif( _MSC_VER || __WATCOMC__ ) - - typedef unsigned __int64 W64, *PW64; - typedef __int64 SW64, *PSW64; - - #else - - #error "please define W64" - - #endif - -#else - - #error "Unknown compiler, please define basic types" - -#endif - - -/* Define NULL pointer value */ -#ifndef NULL - - #ifdef __cplusplus - #define NULL 0 - #else - #define NULL ((void *)0) - #endif - -#endif /* NULL */ - - - -/* Define INLINECALL keyword */ -#ifndef INLINECALL - - #if defined(__cplusplus) || defined(__GNUC__) - - #define INLINECALL inline - - #elif defined(_WIN32) && !defined(__WATCOMC__) - - #define INLINECALL __inline - - #else - - #define INLINECALL /* Not supported */ - - #endif - -#endif /* INLINECALL */ - - - - -typedef W8 colour3_t[ 3 ]; // RGB -typedef W8 colour4_t[ 4 ]; // RGBA -typedef W32 COLOURVAL, *PCOLOURVAL; // Represents a 32-bit colour value. - -#ifdef _WIN32 - - #define vsnprintf _vsnprintf - -#endif - - -typedef W8 _boolean; - -#define false 0 -#define true 1 - -//enum { false = 0, -// true = 1 }; - - - - -#define ShortSwap( x ) ( ( (((W16) (x)) & 0x00FF) << 8 ) | ( (((W16) (x))& 0xFF00) >> 8) ) -#define LongSwap( x ) ( ( ((W32) (x)) & 0xFF000000) >> 24 ) | ( ((( (W32) (x) ) & 0xFF0000) >> 8) ) | ( ((( (W32) (x) ) & 0xFF00) << 8 ) ) | ( (( (W32) (x) ) & 0xFF) << 24 ) - - - -#if defined( IPHONE) || defined(__i386__) || defined(_M_IX86) // Little endian - - #define BigShort( x ) ShortSwap( x ) - #define LittleShort( x ) ( x ) - - #define BigLong( x ) LongSwap( x ) - #define LittleLong( x ) ( x ) - - #define BigFloat( x ) FloatSwap( x ) - #define LittleFloat( x ) ( x ) - - -#else // Big endian - - #define BigShort( x ) ( x ) - #define LittleShort( x ) ShortSwap( x ) - - #define BigLong( x ) ( x ) - #define LittleLong( x ) LongSwap( x ) - - #define BigFloat( x ) ( x ) - #define LittleFloat( x ) FloatSwap( x ) - -#endif - - -#endif /* __ARCH_H__ */ diff --git a/wolf3d/newCode/env/cmd.c b/wolf3d/newCode/env/cmd.c deleted file mode 100644 index b8644bd..0000000 --- a/wolf3d/newCode/env/cmd.c +++ /dev/null @@ -1,1195 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * cmd.c: Script command processing module. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#include "../wolfiphone.h" - - - -//void Cmd_ForwardToServer( void ); - -#define MAX_ALIAS_NAME 32 - -typedef struct cmdalias_s -{ - struct cmdalias_s *next; - char name[ MAX_ALIAS_NAME ]; - W32 id; - char *value; - -} cmdalias_t; - -cmdalias_t *cmd_alias; - -_boolean cmd_wait; - -#define ALIAS_LOOP_COUNT 16 -int alias_count; // for detecting runaway loops - - -//============================================================================= - -/* ------------------------------------------------------------------------------ - Function: Cmd_Wait_f -Wait command. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - Causes execution of the remainder of the command buffer to be delayed until - next frame. This allows commands like: - bind g "impulse 5 ; +attack ; wait ; -attack ; impulse 2" - ------------------------------------------------------------------------------ -*/ -PRIVATE void Cmd_Wait_f( void ) -{ - cmd_wait = true; -} - - -/* -============================================================================= - - COMMAND BUFFER - -============================================================================= -*/ - -PRIVATE sizebuf_t cmd_text; - -PRIVATE W8 cmd_text_buf[ 8192 ]; -PRIVATE W8 defer_text_buf[ 8192 ]; - - -/* ------------------------------------------------------------------------------ - Function: Cmd_Init -Allocates an initial text buffer that will grow as needed. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: This must be called before using command buffer. - ------------------------------------------------------------------------------ -*/ -PRIVATE void Cbuf_Init( void ) -{ - SZ_Init( &cmd_text, cmd_text_buf, sizeof( cmd_text_buf ) ); -} - - -/* ------------------------------------------------------------------------------ - Function: Cbuf_AddText -Adds command text at the end of the buffer. - - Parameters: text -[in] Ponter to NUL-terminated string. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void Cbuf_AddText( const char *text ) -{ - W32 length; - - length = strlen( text ); - - if( cmd_text.cursize + length >= cmd_text.maxsize ) - { - Com_Printf( "Cbuf_AddText: overflow\n" ); - return; - } - - SZ_Write( &cmd_text, (void *)text, length ); -} - -/* ------------------------------------------------------------------------------ - Function: Cbuf_InsertText -Adds command text immediately after the current - command. - - Parameters: text -[in] Command text to add to buffer. - - Returns: Nothing. - - Notes: - Adds a \n to the text - FIXME: actually change the command buffer to do less copying ------------------------------------------------------------------------------ -*/ -PUBLIC void Cbuf_InsertText( char *text ) -{ - char *temp; - size_t templen; - -// copy off any commands still remaining in the exec buffer - templen = cmd_text.cursize; - if( templen ) - { - temp = Z_Malloc( templen ); - memcpy( temp, cmd_text.data, templen ); - SZ_Clear( &cmd_text ); - } - else - { - temp = NULL; // shut up compiler - } - -// add the entire text of the file - Cbuf_AddText( text ); - -// add the copied off data - if( templen ) - { - SZ_Write( &cmd_text, temp, templen ); - Z_Free( temp ); - } -} - - -/* ------------------------------------------------------------------------------ - Function: Cbuf_CopyToDefer -Copy command buffer to defer buffer. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Cbuf_CopyToDefer( void ) -{ - memcpy( defer_text_buf, cmd_text_buf, cmd_text.cursize ); - defer_text_buf[ cmd_text.cursize ] = 0; - cmd_text.cursize = 0; -} - -/* ------------------------------------------------------------------------------ - Function: Cbuf_InsertFromDefer -Insert commands from defer buffer to command - buffer. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Cbuf_InsertFromDefer( void ) -{ - Cbuf_InsertText( (char *)defer_text_buf ); - defer_text_buf[ 0 ] = 0; -} - - -/* ------------------------------------------------------------------------------ - Function: Cbuf_ExecuteText -Execute string. - - Parameters: exec_when -[in] see execwhen_t definition. - text -[in] string with command to execute. - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Cbuf_ExecuteText( execwhen_t exec_when, char *text ) -{ - switch( exec_when ) - { - case EXEC_NOW: - Cmd_ExecuteString( text ); - break; - - case EXEC_INSERT: - Cbuf_InsertText( text ); - break; - - case EXEC_APPEND: - Cbuf_AddText( text ); - break; - - default: - Com_DPrintf( "Cbuf_ExecuteText: bad exec_when" ); - } -} - -/* ------------------------------------------------------------------------------ - Function: Cbuf_Execute -execute string from command buffer. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Cbuf_Execute( void ) -{ - int i; - char *text; - char line[ 1024 ]; - int quotes; - - alias_count = 0; // don't allow infinite alias loops - - while( cmd_text.cursize ) - { -// find a \n or ; line break - text = (char *)cmd_text.data; - - quotes = 0; - for( i = 0; i < cmd_text.cursize; ++i ) - { - if( text[ i ] == '"' ) - { - quotes++; - } - - if( !(quotes & 1) && text[ i ] == ';' ) - { - break; // don't break if inside a quoted string - } - - if( text[ i ] == '\n' || text[ i ] == '#' ) - { - break; // break on a newline or a hash mark - } - } - - - memcpy( line, text, i ); - line[ i ] = '\0'; // NUL-terminate string - -// delete the text from the command buffer and move remaining commands down -// this is necessary because commands (exec, alias) can insert data at the -// beginning of the text buffer - - if( i == cmd_text.cursize ) - { - cmd_text.cursize = 0; - } - else - { - i++; - cmd_text.cursize -= i; - memmove( text, text+i, cmd_text.cursize ); - } - -// execute the command line - Cmd_ExecuteString( line ); - - - if( cmd_wait ) - { - // skip out while text still remains in buffer, leaving it - // for next frame - cmd_wait = false; - break; - } - } -} - - - -/* ------------------------------------------------------------------------------ - Function: Cbuf_AddEarlyCommands -Adds command line parameters as script - statements. - - Parameters: clear -[in] Remove item from global array com_argv. - - Returns: Nothing. - - Notes: - Adds command line parameters as script statements - Commands lead with a +, and continue until another + - - Set commands are added early, so they are guaranteed to be set - before the client and server initialize for the first time. - - Other commands are added late, after all initialization is complete. ------------------------------------------------------------------------------ -*/ -PUBLIC void Cbuf_AddEarlyCommands( _boolean clear ) -{ - int i; - char *s; - - for( i = 0; i < COM_Argc(); ++i ) - { - s = COM_Argv( i ); - - if( strcmp( s, "+set" ) ) - continue; - - Cbuf_AddText( va("set %s %s\n", COM_Argv(i+1), COM_Argv(i+2))); - if( clear ) - { - COM_ClearArgv( i ); - COM_ClearArgv( i+1 ); - COM_ClearArgv( i+2 ); - } - i += 2; - } -} - -/* ------------------------------------------------------------------------------ - Function: Cbuf_AddLateCommands -Adds command line parameters as script - statements. - - Parameters: Nothing. - - Returns: true if any late commands were added, otherwise false. - - Notes: - Commands lead with a + and continue until another + or - - application.exe +map amlev1 - - Returns true if any late commands were added, which - will keep the demoloop from immediately starting ------------------------------------------------------------------------------ -*/ -PUBLIC _boolean Cbuf_AddLateCommands( void ) -{ - int i, j; - int s; - char *text, *build, c; - int argc; - _boolean ret; - -// build the combined string to parse from - s = 0; - argc = COM_Argc(); - for( i = 1; i < argc; ++i ) - { - s += strlen( COM_Argv( i ) ) + 1; - } - - if( ! s ) - { - return false; - } - - text = Z_Malloc( s + 1 ); - text[ 0 ] = '\0'; // Start with a NUL-terminated string. - - for( i = 1; i < argc; ++i ) - { - my_strlcat( text, COM_Argv( i ), s ); - if( i != argc-1 ) - { - my_strlcat( text, " ", s ); - } - } - -// pull out the commands - build = Z_Malloc( s + 1 ); - build[ 0 ] = '\0'; // Start with a NUL-terminated string. - - for( i = 0; i < s-1; ++i ) - { - if( text[ i ] == '+' ) - { - i++; - - for( j = i ; (text[ j ] != '+') && (text[ j ] != '-') && (text[ j ] != 0) ; j++ ) - ; - - c = text[ j ]; - text[ j ] = 0; - - my_strlcat( build, text+i, s+1 ); - my_strlcat( build, "\n", s+1 ); - text[ j ] = c; - i = j - 1; - } - } - - ret = (build[ 0 ] != 0); - if( ret ) - { - Cbuf_AddText (build); - } - - Z_Free( text ); - Z_Free( build ); - - return ret; -} - - -/* -============================================================================== - - SCRIPT COMMANDS - -============================================================================== -*/ - - - -/* ------------------------------------------------------------------------------ - Function: Cmd_Exec_f -Execute script file. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: Console function, exec - ------------------------------------------------------------------------------ -*/ -PRIVATE void Cmd_Exec_f( void ) -{ - filehandle_t *hfile; - char *f2; - int len; - - if( Cmd_Argc () != 2 ) - { - Com_Printf( "exec : execute a script file\n" ); - return; - } - - hfile = FS_OpenFile( Cmd_Argv( 1 ), FA_FILE_IPHONE_DOC_DIR ); - if( ! hfile ) - { - Com_Printf( "couldn't exec %s\n", Cmd_Argv( 1 ) ); - return; - } - - len = FS_GetFileSize( hfile ); - - Com_Printf( "execing %s\n", Cmd_Argv( 1 ) ); - - // the file doesn't have a trailing 0, so we need to copy it off - f2 = Z_Malloc( len + 1 ); - memcpy( f2, hfile->filedata, len ); - f2[ len ] = 0; - - printf( "%s", f2 ); // !@# - Cbuf_InsertText( f2 ); - - Z_Free( f2 ); - - FS_CloseFile( hfile ); -} - - -/* ------------------------------------------------------------------------------ - Function: Cmd_Echo_f -Prints the rest of the line to the console. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void Cmd_Echo_f( void ) -{ - int i; - - for( i = 1 ; i < Cmd_Argc() ; ++i ) - { - Com_Printf( "%s ",Cmd_Argv( i ) ); - } - - Com_Printf( "\n" ); -} - - -/* ------------------------------------------------------------------------------ - Function: Cmd_Alias_f -Creates a new command that executes a command - string (possibly ; seperated). - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void Cmd_Alias_f( void ) -{ - cmdalias_t *a; - char cmd[ 1024 ]; - int i, c; - char *s; - W32 hashid; - - if( Cmd_Argc() == 1 ) - { - Com_Printf( "Current alias commands:\n" ); - for( a = cmd_alias ; a ; a = a->next ) - { - Com_Printf( "%s : %s\n", a->name, a->value ); - } - return; - } - - s = Cmd_Argv( 1 ); - if( strlen( s ) >= MAX_ALIAS_NAME ) - { - Com_Printf( "Alias name is too long\n" ); - return; - } - - hashid = my_strhash( s ); - - // if the alias already exists, reuse it - for( a = cmd_alias ; a ; a = a->next ) - { - if( hashid == a->id ) - { - Z_Free( a->value ); - break; - } - } - - if( ! a ) - { - a = Z_Malloc( sizeof( cmdalias_t ) ); - a->next = cmd_alias; - cmd_alias = a; - } - my_strlcpy( a->name, s, sizeof( a->name ) ); - a->id = hashid; - -// copy the rest of the command line - cmd[ 0 ] = '\0'; // start out with a NUL-terminated string - c = Cmd_Argc(); - for( i = 2; i < c; ++i ) - { - my_strlcat( cmd, Cmd_Argv( i ), sizeof( cmd ) ); - if( i != (c - 1) ) - { - my_strlcat( cmd, " ", sizeof( cmd ) ); - } - } - my_strlcat( cmd, "\n", sizeof( cmd ) ); - - a->value = my_CopyString( cmd ); -} - -/* -============================================================================= - - COMMAND EXECUTION - -============================================================================= -*/ - -typedef struct cmd_function_s -{ - struct cmd_function_s *next; - char *name; - W32 id; - xcommand_t function; - -} cmd_function_t; - - -PRIVATE int cmd_argc; -PRIVATE char *cmd_argv[ MAX_STRING_TOKENS ]; -PRIVATE char *cmd_null_string = ""; -PRIVATE char cmd_args[ MAX_STRING_CHARS ]; - -PRIVATE cmd_function_t *cmd_functions; // possible commands to execute - -/* ------------------------------------------------------------------------------ - Function: Cmd_Argc -How many arguments are passed in. - - Parameters: Nothing. - - Returns: How many arguments are passed in. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC int Cmd_Argc( void ) -{ - return cmd_argc; -} - -/* ------------------------------------------------------------------------------ - Function: Cmd_Argv -Retrieve one argument. - - Parameters: arg -[in] Which argument to retrieve. - - Returns: NULL if outside argument index, otherwise returns the argument - string. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC char *Cmd_Argv( int arg ) -{ - if( arg >= cmd_argc ) - { - return cmd_null_string; - } - - return cmd_argv[ arg ]; -} - -/* ------------------------------------------------------------------------------ - Function: Cmd_Args -Retrieve all arguments. - - Parameters: Nothing. - - Returns: A single string containing argv(1) to argv(argc()-1) - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC char *Cmd_Args( void ) -{ - return cmd_args; -} - -/* ------------------------------------------------------------------------------ - Function: Cmd_MacroExpandString - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE char *Cmd_MacroExpandString( char *text ) -{ - int i, j, count, len; - _boolean inquote; - char *scan; - static char expanded[ MAX_STRING_CHARS ]; - char temporary[MAX_STRING_CHARS]; - char *token, *start; - - inquote = false; - scan = text; - - len = strlen( scan ); - if( len >= MAX_STRING_CHARS ) - { - Com_Printf( "Line exceeded %i chars, discarded.\n", MAX_STRING_CHARS ); - return NULL; - } - - count = 0; - - for( i = 0 ; i < len ; ++i ) - { - if (scan[i] == '"') - inquote ^= 1; - - if (inquote) - continue; // don't expand inside quotes - - if (scan[i] != '$') - continue; - - // scan out the complete macro - start = scan+i+1; - token = COM_Parse( &start ); - if (!start) - continue; - - token = Cvar_VariableString (token); - - j = strlen(token); - len += j; - if (len >= MAX_STRING_CHARS) - { - Com_Printf ("Expanded line exceeded %i chars, discarded.\n", MAX_STRING_CHARS); - return NULL; - } - - strncpy( temporary, scan, i ); - my_strlcpy( temporary+i, token, sizeof( temporary ) - i ); - my_strlcpy( temporary+i+j, start, sizeof( temporary ) - i - j ); - - my_strlcpy( expanded, temporary, sizeof( expanded ) ); - scan = expanded; - i--; - - if( ++count == 100 ) - { - Com_Printf( "Macro expansion loop, discarded.\n" ); - return NULL; - } - } - - if( inquote ) - { - Com_Printf( "Line has unmatched quote, discarded.\n" ); - return NULL; - } - - return scan; -} - - -/* ------------------------------------------------------------------------------ - Function: Cmd_TokenizeString -Parses the given string into command line tokens. - - Parameters: text -[in] string to tokenize. - macroExpand -[in] Expand macro, true for yes, otherwise false. - - Returns: Nothing - - Notes: - $Cvars will be expanded unless they are in a quoted token ------------------------------------------------------------------------------ -*/ -PUBLIC void Cmd_TokenizeString( char *text, _boolean macroExpand ) -{ - int i; - char *com_token; - -// clear the args from the last string - for( i = 0 ; i < cmd_argc ; ++i ) - { - Z_Free( cmd_argv[ i ] ); - } - - cmd_argc = 0; - cmd_args[ 0 ] = 0; - - // macro expand the text - if( macroExpand ) - { - text = Cmd_MacroExpandString( text ); - } - - if( ! text ) - { - return; - } - - while( 1 ) - { -// skip whitespace up to a /n - while( *text && *text <= ' ' && *text != '\n' ) - { - text++; - } - - if( *text == '\n' ) - { // a newline seperates commands in the buffer - text++; - break; - } - - if( ! *text ) - { - return; - } - - // set cmd_args to everything after the first arg - if( cmd_argc == 1 ) - { - int l; - - my_strlcpy( cmd_args, text, sizeof( cmd_args ) - 1 ); - - // strip off any trailing whitespace - l = strlen( cmd_args ) - 1; - for( ; l >= 0 ; --l ) - { - if (cmd_args[l] <= ' ') - { - cmd_args[l] = 0; - } - else - { - break; - } - } - } - - com_token = COM_Parse( &text ); - if( ! text ) - { - return; - } - - if( cmd_argc < MAX_STRING_TOKENS ) - { - cmd_argv[ cmd_argc ] = Z_Malloc( strlen( com_token ) + 1 ); - my_strlcpy( cmd_argv[ cmd_argc ], com_token, strlen( com_token ) + 1 ); - cmd_argc++; - } - } - -} - - -/* ------------------------------------------------------------------------------ - Function: Cmd_AddCommand -Add a command name and function to the cmd repository. - - Parameters: - cmd_name -[in] Pointer to a NUL-terminated string that constains a - command name. - function -[in] Function to associate with cmd_name. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void Cmd_AddCommand( char *cmd_name, xcommand_t function ) -{ - cmd_function_t *cmd; - W32 hashid; - -// fail if the command is a variable name - if( Cvar_VariableString( cmd_name )[ 0 ] ) - { - Com_Printf( "Cmd_AddCommand: \"%s\" already defined as a var\n", cmd_name ); - return; - } - - hashid = my_strhash( cmd_name ); - -// fail if the command already exists - for( cmd = cmd_functions ; cmd ; cmd = cmd->next ) - { - if( hashid == cmd->id ) - { - Com_Printf( "Cmd_AddCommand: \"%s\" already defined\n", cmd_name ); - return; - } - } - - cmd = Z_Malloc( sizeof( cmd_function_t ) ); - cmd->name = cmd_name; - cmd->id = hashid; - cmd->function = function; - cmd->next = cmd_functions; - cmd_functions = cmd; - -} - -/* ------------------------------------------------------------------------------ - Function: Cmd_RemoveCommand -Remove command. - - Parameters: cmd_name -[in] name of command to remove. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Cmd_RemoveCommand( char *cmd_name ) -{ - cmd_function_t *cmd, **back; - W32 hashid; - - hashid = my_strhash( cmd_name ); - - back = &cmd_functions; - while( 1 ) - { - cmd = *back; - if( ! cmd ) - { - Com_DPrintf( "Cmd_RemoveCommand: %s was not added\n", cmd_name ); - return; - } - - if( hashid == cmd->id ) - { - *back = cmd->next; - Z_Free( cmd ); - return; - } - - back = &cmd->next; - } -} - -/* ------------------------------------------------------------------------------ - Function: Cmd_Exists -Check to see if command already exists. - - Parameters: cmd_name -[in] name of command to check. - - Returns: true if the command already exists, otherwise false. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC _boolean Cmd_Exists( char *cmd_name ) -{ - cmd_function_t *cmd; - W32 hashid = my_strhash( cmd_name ); - - for( cmd = cmd_functions ; cmd ; cmd = cmd->next ) - { - if( hashid == cmd->id ) - { - return true; - } - } - - return false; -} - - -/* ------------------------------------------------------------------------------ - Function: Cmd_CompleteCommand -Complete partial command on console - command-line. - - Parameters: partial -[in] Partial name of command. - - Returns: NULL if no command exists, otherwise returns the complete name of - command. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC char *Cmd_CompleteCommand( char *partial ) -{ - cmd_function_t *cmd; - int len; - cmdalias_t *a; - W32 hashid; - - len = strlen( partial ); - - if( ! len ) - { - return NULL; - } - - - -// -// Check for exact match. -// - hashid = my_strhash( partial ); - - for( cmd = cmd_functions ; cmd ; cmd = cmd->next ) - { - if( hashid == cmd->id ) - { - return cmd->name; - } - } - - for( a = cmd_alias ; a ; a = a->next ) - { - if( hashid == a->id ) - { - return a->name; - } - } - -// -// Check for partial match. -// - for( cmd = cmd_functions ; cmd ; cmd = cmd->next ) - { - if( ! strncmp( partial, cmd->name, len ) ) - { - return cmd->name; - } - } - - for( a = cmd_alias ; a ; a = a->next ) - { - if( ! strncmp( partial, a->name, len ) ) - { - return a->name; - } - } - - return NULL; -} - - -/* ------------------------------------------------------------------------------ - Function: Cmd_ExecuteString -Execute command string. - - Parameters: text -[in] text string to execute. - - Returns: Nothing. - - Notes: - A complete command line has been parsed, so try to execute it - FIXME: lookupnoadd the token to speed search? ------------------------------------------------------------------------------ -*/ -PUBLIC void Cmd_ExecuteString( char *text ) -{ - cmd_function_t *cmd; - cmdalias_t *a; - W32 hashid; - - Cmd_TokenizeString( text, true ); - - // execute the command line - if( ! Cmd_Argc() ) - { - return; // no tokens - } - - hashid = my_strhash( cmd_argv[ 0 ] ); - - // check functions - for( cmd = cmd_functions ; cmd ; cmd = cmd->next ) - { - if( hashid == cmd->id ) - { - if( ! cmd->function ) - { // forward to server command - Cmd_ExecuteString( va( "cmd %s", text ) ); - } - else - { - cmd->function(); - } - - return; - } - } - - // check alias - for( a = cmd_alias ; a ; a = a->next ) - { - if( ! my_stricmp( cmd_argv[ 0 ], a->name ) ) - { - if( ++alias_count == ALIAS_LOOP_COUNT ) - { - Com_Printf( "ALIAS_LOOP_COUNT\n" ); - return; - } - Cbuf_InsertText( a->value ); - return; - } - } - - // check cvars - if( Cvar_Command() ) - { - return; - } - - // send it as a server command if we are connected -// Cmd_ForwardToServer(); -} - -/* ------------------------------------------------------------------------------ - Function: Cmd_List_f -Callback function that list commands. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: List commands and total number of commands. ------------------------------------------------------------------------------ -*/ -PRIVATE void Cmd_List_f( void ) -{ - cmd_function_t *cmd; - int i = 0; - - for( cmd = cmd_functions; cmd; cmd = cmd->next, ++i ) - { - Com_Printf( "%s\n", cmd->name ); - } - - Com_Printf( "%i commands\n", i ); -} - -/* ------------------------------------------------------------------------------ - Function: Cmd_Init -Initialize the command buffer. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void Cmd_Init( void ) -{ - Cbuf_Init(); - -// -// register our commands -// - Cmd_AddCommand( "listCmds", Cmd_List_f ); - Cmd_AddCommand( "exec", Cmd_Exec_f ); - Cmd_AddCommand( "echo", Cmd_Echo_f ); - Cmd_AddCommand( "alias", Cmd_Alias_f); - Cmd_AddCommand( "wait", Cmd_Wait_f ); -} - diff --git a/wolf3d/newCode/env/cmd.h b/wolf3d/newCode/env/cmd.h deleted file mode 100644 index 0bf5192..0000000 --- a/wolf3d/newCode/env/cmd.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * cmd.h: Command text buffering and command execution. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -/* - - Notes: - - Any number of commands can be added in a frame, from several different sources. - Most commands come from either keybindings or console line input, but remote - servers can also send across commands and entire text files can be execed. - - The + command line options are also added to the command buffer. - - The game starts with a Cbuf_AddText( "exec DEFAULT.CFG\n" ); Cbuf_Execute(); - -*/ - -#ifndef __CMD_H__ -#define __CMD_H__ - -#include "arch.h" - - -typedef enum { - - EXEC_NOW, // don't return until completed - EXEC_INSERT, // insert at current position, but don't run yet - EXEC_APPEND // add to end of the command buffer - -} execwhen_t; - - -extern void Cbuf_AddText( const char *text ); -// as new commands are generated from the console or keybindings, -// the text is added to the end of the command buffer. - -extern void Cbuf_InsertText( char *text ); -// when a command wants to issue other commands immediately, the text is -// inserted at the beginning of the buffer, before any remaining unexecuted -// commands. - -extern void Cbuf_ExecuteText( execwhen_t exec_when, char *text ); -// this can be used in place of either Cbuf_AddText or Cbuf_InsertText - -extern void Cbuf_AddEarlyCommands( _boolean clear ); -// adds all the +set commands from the command line - -extern _boolean Cbuf_AddLateCommands( void ); -// adds all the remaining + commands from the command line -// Returns true if any late commands were added, which -// will keep the demoloop from immediately starting - -extern void Cbuf_Execute( void ); -// Pulls off \n terminated lines of text from the command buffer and sends -// them through Cmd_ExecuteString. Stops when the buffer is empty. -// Normally called once per frame, but may be explicitly invoked. -// Do not call inside a command function! - -extern void Cbuf_CopyToDefer( void ); -extern void Cbuf_InsertFromDefer( void ); -// These two functions are used to defer any pending commands while a map -// is being loaded - -//=========================================================================== - -#define MAX_STRING_CHARS 1024 // max length of a string passed to Cmd_TokenizeString -#define MAX_STRING_TOKENS 80 // max tokens resulting from Cmd_TokenizeString -#define MAX_TOKEN_CHARS 128 // max length of an individual token - -/* - -Command execution takes a NUL-terminated string, breaks it into tokens, -then searches for a command or variable that matches the first token. - -*/ - -typedef void (*xcommand_t) (void); - -extern void Cmd_Init( void ); - -extern void Cmd_AddCommand( char *cmd_name, xcommand_t function ); -// called by the init functions of other parts of the program to -// register commands and functions to call for them. -// The cmd_name is referenced later, so it should not be in temp memory -// if function is NULL, the command will be forwarded to the server -// as a clc_stringcmd instead of executed locally -extern void Cmd_RemoveCommand( char *cmd_name ); - -extern _boolean Cmd_Exists( char *cmd_name ); -// used by the cvar code to check for cvar / command name overlap - -extern char *Cmd_CompleteCommand( char *partial ); -// attempts to match a partial command for automatic command line completion -// returns NULL if nothing fits - -extern int Cmd_Argc( void ); -extern char *Cmd_Argv( int arg ); -extern char *Cmd_Args( void ); -// The functions that execute commands get their parameters with these -// functions. Cmd_Argv () will return an empty string, not a NULL -// if arg > argc, so string operations are always safe. - -extern void Cmd_TokenizeString( char *text, _boolean macroExpand ); -// Takes a NUL-terminated string. Does not need to be /n terminated. -// breaks the string up into arg tokens. - -extern void Cmd_ExecuteString( char *text ); -// Parses a single line of text into arguments and tries to execute it -// as if it was typed at the console - -//extern void Cmd_ForwardToServer( void ); -// adds the current command line as a clc_stringcmd to the client message. -// things like godmode, noclip, etc, are commands directed to the server, -// so when they are typed in at the console, they will need to be forwarded. - - - - - - -#endif /* __CMD_H__ */ diff --git a/wolf3d/newCode/env/com_string.c b/wolf3d/newCode/env/com_string.c deleted file mode 100644 index 400007e..0000000 --- a/wolf3d/newCode/env/com_string.c +++ /dev/null @@ -1,518 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - Copyright (C) 1998 Todd C. Miller - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * com_string.c: Common string functions done in a portable manner. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * Portion of this code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - * Portion of this code was derived from code that was originally - * written by Todd C. Miller. - * - */ - -#include "../wolfiphone.h" - - - - - -/* ------------------------------------------------------------------------------ - Function: my_strlcpy -Copies a specified number of characters from a - source string into a buffer. - - Parameters: dest -[in/out] Pointer to a buffer into which the function - copies characters - source -[in] Pointer to a NUL-terminated string from which - the function copies characters. - nMaxLength -[in] Specifies the number of bytes to be copied - from the string pointed to by source into the - buffer pointed to by dest. - - Returns: Returns strlen( source ); if retval >= nMaxLength, truncation - occurred. - - Notes: - At most nMaxLength-1 characters will be copied. Always NUL- - terminates (unless nMaxLength == 0). ------------------------------------------------------------------------------ -*/ -PUBLIC size_t my_strlcpy( char *dest, const char *source, size_t nMaxLength ) -{ - char *d = dest; - const char *s = source; - size_t n = nMaxLength; - - /* Copy as many bytes as will fit */ - if( n != 0 && --n != 0 ) - { - do - { - if( (*d++ = *s++) == 0 ) - { - break; - } - - } while( --n != 0 ); - } - - /* Not enough room in dest, add NUL and traverse rest of source */ - if( n == 0 ) - { - if( nMaxLength != 0 ) - { - *d = '\0'; /* NUL-terminate dest */ - } - - while( *s++ ) - { - ; - } - } - - return( s - source - 1 ); /* count does not include NUL */ -} - -/* ------------------------------------------------------------------------------ - Function: my_strlcat -Appends one string to another. - - Parameters: dest -[in/out] Pointer to a NUL-terminated string. The buffer - must be large enough to contain both strings or else - truncation will occur. - source -[in] Pointer to a NUL-terminated string from which - the function copies characters. - nMaxLength -[in] full size of dest, not space left. - - Returns: Returns strlen( source ) + MIN( nMaxLength, strlen( initial dest ) ). - If retval >= nMaxLength, truncation occurred. - - Notes: - At most nMaxLength-1 characters will be copied. Always NUL- - terminates (unless nMaxLength <= strlen( dest ) ). ------------------------------------------------------------------------------ -*/ -PUBLIC size_t my_strlcat( char *dest, const char *source, size_t nMaxLength ) -{ - char *d = dest; - const char *s = source; - size_t n = nMaxLength; - size_t dlen; - - /* Find the end of dest and adjust bytes left but don't go past end */ - while( n-- != 0 && *d != '\0' ) - { - d++; - } - - dlen = d - dest; - n = nMaxLength - dlen; - - /* No room left to append string */ - if( n == 0 ) - { - return( dlen + strlen( s ) ); - } - - while( *s != '\0' ) - { - if( n != 1 ) - { - *d++ = *s; - n--; - } - s++; - } - *d = '\0'; /* NUL-terminate string */ - - return( dlen + (s - source) ); /* count does not include NUL */ - -} - - -/* ------------------------------------------------------------------------------ - Function: my_strnicmp -Compare characters of two strings without regard to case. - - Parameters: string1, string2 -[in] NUL-terminated strings to compare. - count -[in] Number of characters to compare. - - Returns: 0 string1 identical to string2, -1 otherwise. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC int my_strnicmp( const char *string1, const char *string2, size_t count ) -{ - char c1, c2; - - if( ! string1 || ! *string1 || - ! string2 || ! *string2 ) - { - return -1; - } - - do - { - c1 = *string1++; - c2 = *string2++; - - if( ! count-- ) - { - return 0; /* strings are equal until end point */ - } - - if( c1 != c2 ) - { - if( TOUPPER( c1 ) != TOUPPER( c2 ) ) /* Uppercase compare */ - { - return -1; /* strings are not equal */ - } - } - - } while( c1 ); - - return 0; /* strings are equal */ -} - -/* ------------------------------------------------------------------------------ - Function: my_stricmp -Perform an uppercase comparison of strings. - - Parameters: string1, string2 -[in] NUL-terminated strings to compare. - - Returns: 0 string1 identical to string2, -1 otherwise. - - Notes: - Calls my_strnicmp, where count is 99999 ------------------------------------------------------------------------------ -*/ -PUBLIC int my_stricmp( const char *string1, const char *string2 ) -{ - return my_strnicmp( string1, string2, 99999 ); -} - -/* ------------------------------------------------------------------------------ - Function: my_snprintf -Write formatted data to a string. - - Parameters: dest -[out] Storage location for output. - size -[in] Maximum number of characters to store. - format -[in] Format-control string. - ... -[in] Optional arguments. - - Returns: Nothing. - - Notes: If the format string is longer than 32768 truncation will occur. - Also, if format is longer than dest truncation will occur. ------------------------------------------------------------------------------ -*/ -PUBLIC void my_snprintf( char *dest, size_t size, const char *format, ... ) -{ - va_list argptr; - char bigbuffer[ 0x8000 ]; - - va_start( argptr, format ); - (void)vsnprintf( bigbuffer, sizeof( bigbuffer ), format, argptr ); - va_end( argptr ); - - bigbuffer[ sizeof( bigbuffer ) - 1 ] = '\0'; - - my_strlcpy( dest, bigbuffer, size ); -} - - -/* ------------------------------------------------------------------------------ - Function: my_CopyString -Allocate a duplicate copy of a string, and return - duplicate. - - Parameters: in -[in] String to duplicate. - - - Returns: - Pointer to duplicate string. Caller is responsible for freeing - memory with Z_Free. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC char *my_CopyString( const char *in ) -{ - char *out; - - out = Z_Malloc( strlen( in ) + 1 ); - my_strlcpy( out, in, strlen( in ) + 1 ); - - return out; -} - -/* ------------------------------------------------------------------------------ - Function: my_strhash -Create a hash id from string. - - Parameters: string -[in] NUL-terminated string. - - - Returns: Hash id. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC W32 my_strhash( const char *string ) -{ - W32 hash = *string; - - if( hash ) - { - for( string += 1; *string != '\0'; ++string ) - { - hash = (hash << 5) - hash + *string; - } - } - - return hash; -} - - -/* ------------------------------------------------------------------------------ - Function: my_strupr -Convert a string to uppercase. - - Parameters: string -[in/out] NUL-terminated string to capitalize. - - Returns: - This functions returns a pointer to the converted string. Because - the modification is done in place, the pointer returned is the same - as the pointer passed as the input argument. No return value is - reserved to indicate an error. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC char *my_strupr( char *string ) -{ - char *ptr; - - if( ! string || ! *string ) - { - return string; - } - - ptr = string; - - do - { - *ptr = TOUPPER( *ptr ); - - } while( *ptr++ ); - - - return string; -} - -/* ------------------------------------------------------------------------------ - Function: my_strlwr -Convert a string to lowercase. - - Parameters: string -[in/out] NUL-terminated string to convert to lowercase. - - Returns: - This functions returns a pointer to the converted string. Because - the modification is done in place, the pointer returned is the same - as the pointer passed as the input argument. No return value is - reserved to indicate an error. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC char *my_strlwr( char *string ) -{ - char *ptr; - - if( ! string || ! *string ) - { - return string; - } - - ptr = string; - - do - { - *ptr = TOLOWER( *ptr ); - - } while( *ptr++ ); - - - return string; -} - -/* ------------------------------------------------------------------------------ - Function: StringToInteger -Convert string to integer. - - Parameters: string -[in] NUL-terminated string to be converted. - error -[out] Error code. See header. - - Returns: An integer value. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC SW32 StringToInteger( const char *string, W32 *error ) -{ - const char *ptr = string; - SW32 temp; - SW32 number = 0; - W32 errortag = 0; - _boolean bNegative = false; - - if( ! string || ! *string ) - { - *error = SCE_NULL_VALUE; - - return 0; - } - - if( *ptr == '-' ) - { - bNegative = true; - - ptr++; - } - - while( *ptr && ISNUMERIC( *ptr ) ) - { - temp = number; - number = (number * 10) + *ptr - '0'; - - if( number < temp ) - { - errortag &= SCE_BUFFER_OVERFLOW; - } - - ptr++; - } - - if( *ptr ) - { - errortag &= SCE_NON_NUMERIC; - } - - - if( bNegative ) - { - number = -number; - } - - - *error = errortag; - - return number; -} - -/* ------------------------------------------------------------------------------ - Function: StringToFloat -Convert string to float. - - Parameters: string -[in] NUL-terminated string to be converted. - error -[out] Error code. See header. - - Returns: A float value. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC double StringToFloat( const char *string, W32 *error ) -{ - const char *ptr = string; - double number = 0; - SW32 exponent = 0; - W32 expError; - _boolean bNegative = false; - - *error = 0; - - if( ! string || ! *string ) - { - *error &= SCE_NULL_VALUE; - - return 0; - } - - if( *ptr == '-' ) - { - bNegative = true; - - ptr++; - } - else if( *ptr == '+' ) - { - ptr++; - } - - while( *ptr && ISNUMERIC( *ptr ) ) - { - number = (number * 10) + (double)(*ptr - '0'); - - ptr++; - } - - if( *ptr == '.' ) - { - ptr++; - - while( *ptr && ISNUMERIC( *ptr ) ) - { - number = (number * 10) + (double)(*ptr - '0'); - exponent--; - - ptr++; - } - } - - if( TOLOWER( *ptr ) == 'e' ) - { - ptr++; - - exponent += StringToInteger( ptr, &expError ); - } - - if( bNegative ) - { - number = -number; - } - - if( expError ) - { - *error |= expError; - } - - return (number * pow( 10, exponent )); -} diff --git a/wolf3d/newCode/env/com_string.h b/wolf3d/newCode/env/com_string.h deleted file mode 100644 index ae510f8..0000000 --- a/wolf3d/newCode/env/com_string.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (c) 1998 Todd C. Miller - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * com_string.h: Common string functions done in a portable manner. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * Portion of this code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - * Portion of this code was derived from code that was originally - * written by Todd C. Miller. - * - */ - -/* - Notes: - This module is implemented by com_string.c. - -*/ - -#ifndef __COM_STRING_H__ -#define __COM_STRING_H__ - -#define ISSPACE( c ) ( ( c ) == ' ' || ( c ) == '\f' || ( c ) == '\n' || ( c ) == '\r' || ( c ) == '\t' || ( c ) == '\v' ) -#define ISUPPER( c ) ( ( c ) >= 'A' && ( c ) <= 'Z' ) -#define ISLOWER( c ) ( ( c ) >= 'a' && ( c ) <= 'z' ) -#define ISALPHA( c ) ( ISUPPER( c ) || ISLOWER( c ) ) -#define TOUPPER( c ) ( ISLOWER( c ) ? (c) - 'a' + 'A' : ( c ) ) -#define TOLOWER( c ) ( ISUPPER( c ) ? (c) - 'A' + 'a' : ( c ) ) - -#define ISNUMERIC( c ) ( ( c ) >= '0' && ( c ) <= '9' ) -#define ISALPHANUMERIC( c ) ( ISALPHA( c ) || ISNUMERIC( c ) ) - - - - -extern size_t my_strlcpy( char *dest, const char *source, size_t nMaxLength ); -extern size_t my_strlcat( char *dest, const char *source, size_t nMaxLength ); - - -extern int my_stricmp( const char *string1, const char *string2 ); -extern int my_strnicmp( const char *string1, const char *string2, size_t count ); - - -extern void my_snprintf( char *dest, size_t size, const char *format, ... ); - -extern char *my_CopyString( const char *in ); - -extern W32 my_strhash( const char *string ); - -extern char *my_strupr( char *string ); -extern char *my_strlwr( char *string ); - - -/* String conversion error */ -#define SCE_NON_NUMERIC (1 << 0) /* Non-numeric value was encountered */ -#define SCE_BUFFER_OVERFLOW (1 << 1) /* Numberic overflowed */ -#define SCE_NULL_VALUE (1 << 2) /* NULL string was passed into function */ - - -extern SW32 StringToInteger( const char *string, W32 *error ); -extern double StringToFloat( const char *string, W32 *error ); - - -#endif /* __COM_STRING_H__ */ diff --git a/wolf3d/newCode/env/common.c b/wolf3d/newCode/env/common.c deleted file mode 100644 index 1572967..0000000 --- a/wolf3d/newCode/env/common.c +++ /dev/null @@ -1,593 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * common.c: Misc functions used in client and server. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#include "../wolfiphone.h" - - -#define MAXPRINTMSG 4096 - -#define MAX_NUM_ARGVS 50 - - -colour3_t colourBlack = { 0, 0, 0 }; -colour3_t colourRed = { 255, 0, 0 }; -colour3_t colourGreen = { 0, 255, 0 }; -colour3_t colourBlue = { 0, 0, 255 }; -colour3_t colourWhite = { 255, 255, 255 }; - - -int com_argc; -char *com_argv[ MAX_NUM_ARGVS + 1 ]; - - -jmp_buf abortframe; // an ERR_DROP occured, exit the entire frame - - -FILE *log_stats_file; - -cvar_t *log_stats; -cvar_t *developer; -cvar_t *logfile_active; // 1 = buffer log, 2 = flush after each print - -FILE *logfile; - - -/* -============================================================================ - -CLIENT / SERVER interactions - -============================================================================ -*/ -static int rd_target; -static char *rd_buffer; -static int rd_buffersize; -static void (*rd_flush)( int target, char *buffer ); - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Com_BeginRedirect( int target, char *buffer, int buffersize, void (*flush) ) -{ - if( ! target || ! buffer || ! buffersize || ! flush ) - { - return; - } - - rd_target = target; - rd_buffer = buffer; - rd_buffersize = buffersize; - rd_flush = flush; - - *rd_buffer = 0; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Com_EndRedirect( void ) -{ - rd_flush( rd_target, rd_buffer ); - - rd_target = 0; - rd_buffer = NULL; - rd_buffersize = 0; - rd_flush = NULL; -} - -/* ------------------------------------------------------------------------------ - Function: Com_Printf -print out message. - - Parameters: - - Returns: Nothing. - - Notes: - Both client and server can use this, and it will output - to the apropriate place. ------------------------------------------------------------------------------ -*/ -PUBLIC void Com_Printf( const char *fmt, ... ) -{ - va_list argptr; - static char msg[ MAXPRINTMSG ]; - - va_start( argptr, fmt ); - (void)vsnprintf( msg, sizeof( msg ), fmt, argptr ); - va_end( argptr ); - - msg[ sizeof( msg ) - 1 ] = '\0'; - - if( rd_target ) - { - if( (strlen( msg ) + strlen( rd_buffer ) ) > (rd_buffersize - 1) ) - { - rd_flush( rd_target, rd_buffer ); - *rd_buffer = '\0'; - } - my_strlcat( rd_buffer, msg, rd_buffersize ); - return; - } - - Con_Print( msg ); -#ifdef _WIN32 - OutputDebugString( msg ); -#endif - - // also echo to debugging console -// Sys_ConsoleOutput( msg ); - - // logfile - if( logfile_active && logfile_active->value ) - { - char name[ MAX_GAMEPATH ]; - - if( ! logfile ) - { - my_snprintf( name, sizeof( name ), "%s/console.log", FS_Gamedir() ); - if( logfile_active->value > 2 ) - { - logfile = fopen( name, "a" ); - } - else - { - logfile = fopen( name, "w" ); - } - } - if( logfile ) - { - fprintf( logfile, "%s", msg ); - } - - if( logfile_active->value > 1 ) - { - fflush( logfile ); // force it to save every time - } - } -} - -/* ------------------------------------------------------------------------------ - Function: Com_DPrintf -A Com_Printf that only shows up if the "developer" - cvar is set - - Parameters: - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Com_DPrintf( const char *fmt, ... ) -{ - va_list argptr; - static char msg[ MAXPRINTMSG ]; - - if( ! developer || ! developer->value ) - { - return; // don't confuse non-developers with techie stuff... - } - - va_start( argptr, fmt ); - (void)vsnprintf( msg, sizeof( msg ), fmt, argptr ); - va_end( argptr ); - - msg[ sizeof( msg ) - 1 ] = '\0'; - - Com_Printf( "%s", msg ); -} - - -/* ------------------------------------------------------------------------------ - Function: Com_Error - - Parameters: - - Returns: - - Notes: - Both client and server can use this, and it will - do the apropriate things. ------------------------------------------------------------------------------ -*/ -PUBLIC void Com_Error( int code, const char *fmt, ... ) -{ - va_list argptr; - static char msg[ MAXPRINTMSG ]; - static _boolean recursive; - - if( recursive ) - { - Sys_Error( "recursive error after: %s", msg ); - } - - recursive = true; - - va_start (argptr,fmt); - (void)vsnprintf( msg, sizeof( msg ), fmt, argptr ); - va_end (argptr); - - msg[ sizeof( msg ) - 1 ] = '\0'; - - if( code == ERR_DISCONNECT ) - { - recursive = false; - longjmp (abortframe, -1); - } - else if( code == ERR_DROP ) - { - Com_Printf( "********************\nERROR: %s\n********************\n", msg ); - recursive = false; - longjmp( abortframe, -1 ); - } - else - { - } - - if( logfile ) - { - fclose( logfile ); - logfile = NULL; - } - - Sys_Error( "%s", msg ); -} - - - -//=========================================================================== - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void SZ_Init( sizebuf_t *buf, PW8 data, int length ) -{ - memset( buf, 0, sizeof( *buf ) ); - buf->data = data; - buf->maxsize = length; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void SZ_Clear( sizebuf_t *buf ) -{ - buf->cursize = 0; - buf->overflowed = false; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void *SZ_GetSpace( sizebuf_t *buf, int length ) -{ - void *data; - - if( buf->cursize + length > buf->maxsize ) - { - if( ! buf->allowoverflow ) - { - Com_Error( ERR_FATAL, "SZ_GetSpace: overflow without allowoverflow set" ); - } - - if( length > buf->maxsize ) - { - Com_Error( ERR_FATAL, "SZ_GetSpace: %i is > full buffer size", length ); - } - - Com_Printf( "SZ_GetSpace: overflow\n" ); - SZ_Clear( buf ); - buf->overflowed = true; - } - - data = buf->data + buf->cursize; - buf->cursize += length; - - return data; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void SZ_Write( sizebuf_t *buf, void *data, int length ) -{ - memcpy( SZ_GetSpace( buf, length ), data, length ); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void SZ_Print( sizebuf_t *buf, W8 *data ) -{ - int len; - - len = strlen( (char *)data ) + 1; - - if (buf->cursize) - { - if( buf->data[ buf->cursize - 1 ] ) - { - memcpy( (PW8)SZ_GetSpace( buf, len ), data, len ); // no trailing 0 - } - else - { - memcpy( (PW8)SZ_GetSpace( buf, len - 1 ) - 1, data, len ); // write over trailing 0 - } - } - else - { - memcpy( (PW8)SZ_GetSpace( buf, len ),data,len ); - } -} - - -//============================================================================ - - -/* ------------------------------------------------------------------------------ - Function: COM_CheckParm - - Parameters: - - Returns: - The position (1 to argc-1) in the program's argument list - where the given parameter apears, or 0 if not present - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC int COM_CheckParm( char *parm ) -{ - int i; - - for( i = 1 ; i < com_argc ; ++i ) - { - if( ! strcmp( parm, com_argv[ i ] ) ) - { - return i; - } - } - - return 0; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC int COM_Argc (void) -{ - return com_argc; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC char *COM_Argv (int arg) -{ - if (arg < 0 || arg >= com_argc || !com_argv[arg]) - return ""; - return com_argv[arg]; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void COM_ClearArgv( int arg ) -{ - if (arg < 0 || arg >= com_argc || !com_argv[arg]) - { - return; - } - - com_argv[ arg ] = ""; -} - - -/* ------------------------------------------------------------------------------ - Function: COM_InitArgv -Set global argv values with commadline argv values. - - Parameters: - argc -[in] An integer specifying how many arguments are in argv[]. - argv -[in] An array of null-terminated strings. The last pointer - (argv[argc]) is NULL. - - Returns: Nothing. - - Notes: Sets global variables com_argc and com_argv. ------------------------------------------------------------------------------ -*/ -PUBLIC void COM_InitArgv( int argc, char *argv[] ) -{ - int i; - - if( argc > MAX_NUM_ARGVS ) - { - argc = MAX_NUM_ARGVS; - Com_DPrintf( "argc > MAX_NUM_ARGVS\n" ); - } - - com_argc = argc; - for( i = 0; i < argc; ++i ) - { - if( ! argv[ i ] || strlen( argv[ i ] ) >= MAX_TOKEN_CHARS ) - { - com_argv[ i ] = ""; - } - else - { - com_argv[ i ] = argv[ i ]; - } - } -} - - -/* ------------------------------------------------------------------------------ - Function: COM_AddParm -Adds the given string at the end of the current - argument list - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void COM_AddParm( char *parm ) -{ - if( com_argc == MAX_NUM_ARGVS ) - { - Com_Error( ERR_FATAL, "COM_AddParm: MAX_NUM_ARGS" ); - } - - com_argv[ com_argc++ ] = parm; -} - -/* ------------------------------------------------------------------------------ - Function: Com_Error_f -Just throw a fatal error to test error shutdown - procedures. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void Com_Error_f (void) -{ - Com_Error( ERR_FATAL, "%s", Cmd_Argv( 1 ) ); -} - - diff --git a/wolf3d/newCode/env/common.h b/wolf3d/newCode/env/common.h deleted file mode 100644 index a487392..0000000 --- a/wolf3d/newCode/env/common.h +++ /dev/null @@ -1,206 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * common.h: Common definitions between client and server. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -/* - Notes: - This module is implemented by common.c. - -*/ - - -#ifndef __COMMON_H__ -#define __COMMON_H__ - - -//============================================================================ - -typedef struct sizebuf_s -{ - _boolean allowoverflow; // if false, do a Com_Error - _boolean overflowed; // set to true if the buffer size failed - W8 *data; - int maxsize; - int cursize; - int readcount; - -} sizebuf_t; - -extern void SZ_Init( sizebuf_t *buf, PW8 data, int length ); -extern void SZ_Clear( sizebuf_t *buf ); -extern void *SZ_GetSpace( sizebuf_t *buf, int length ); -extern void SZ_Write( sizebuf_t *buf, void *data, int length ); -extern void SZ_Print( sizebuf_t *buf, W8 *data ); // memcpy onto the sizebuf - -//============================================================================ - - -extern int COM_Argc( void ); -extern char *COM_Argv( int arg ); // range and null checked -extern void COM_ClearArgv( int arg ); -extern int COM_CheckParm( char *parm ); -extern void COM_AddParm( char *parm ); - -extern void COM_Init( void ); -extern void COM_InitArgv( int argc, char *argv[] ); - - -extern char *COM_Parse( char **data_p ); -// data is an in/out parm, returns a parsed out token - - - -//============================================================================ - - - - -///////////////////////////////////////////////////////////////////// -// -// Colour -// -///////////////////////////////////////////////////////////////////// - -extern colour3_t colourBlack; -extern colour3_t colourRed; -extern colour3_t colourBlue; -extern colour3_t colourGreen; -extern colour3_t colourWhite; - - -///////////////////////////////////////////////////////////////////// -// End Colour -///////////////////////////////////////////////////////////////////// - - - - -/* -============================================================== - - MISC - -============================================================== -*/ - - -#define ERR_FATAL 0 // exit the entire game with a popup window -#define ERR_DROP 1 // print to console and disconnect from game -#define ERR_QUIT 2 // not an error, just a normal exit -#define ERR_DISCONNECT 4 // don't kill server - -#define EXEC_NOW 0 // don't return until completed -#define EXEC_INSERT 1 // insert at current position, but don't run yet -#define EXEC_APPEND 2 // add to end of the command buffer - -#define PRINT_ALL 0 -#define PRINT_DEVELOPER 1 // only print when "developer 1" - -extern void Com_BeginRedirect( int target, char *buffer, int buffersize, void (*flush) ); -extern void Com_EndRedirect( void ); -extern void Com_Printf( const char *fmt, ... ); -extern void Com_DPrintf( const char *fmt, ... ); -extern void Com_Error( int code, const char *fmt, ... ); - - -extern char *va( char *format, ... ); - - - -extern cvar_t *developer; -extern cvar_t *log_stats; -extern cvar_t *logfile_active; -extern FILE *log_stats_file; - - -extern void common_Init( int argc, char *argv[] ); -extern void common_Frame( int msec ); - - - - -/* -============================================================== - - NON-PORTABLE SYSTEM SERVICES - -============================================================== -*/ -extern char *Sys_ConsoleInput( void ); -extern void Sys_ConsoleOutput( const char *string ); -extern void Sys_SendKeyEvents( void ); -extern void Sys_Error( const char *format, ... ); -extern void Sys_Quit( void ); -extern char *Sys_GetClipboardData( void ); -extern void Sys_CopyProtect( void ); - - -/* -============================================================== - - CLIENT / SERVER SYSTEMS - -============================================================== -*/ -extern void Client_Init( void ); - - - - -// -// button bits -// -#define BUTTON_ATTACK 1 -#define BUTTON_USE 2 -#define BUTTON_ANY 128 // any key whatsoever - - - - -// usercmd_t is sent to the server each client frame -typedef struct usercmd_s -{ - W8 msec; - W8 buttons; - short angles[ 3 ]; - short forwardmove, sidemove, upmove; - W8 impulse; // remove? - W8 lightlevel; // light level the player is standing on - -} usercmd_t; - - - - - - -#endif /* __COMMON_H__ */ - diff --git a/wolf3d/newCode/env/common_utils.h b/wolf3d/newCode/env/common_utils.h deleted file mode 100644 index e53f68e..0000000 --- a/wolf3d/newCode/env/common_utils.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * common_utils.h: General Purpose Macros. - * - * Author: Michael Liebscher - * - */ - -#ifndef __COMMON_UTILS_H__ -#define __COMMON_UTILS_H__ - - - -/* - Make sure the following macros are defined. -*/ - -#ifndef __FILE__ - - #define __FILE__ "" - -#endif - -#ifndef __LINE__ - - #define __LINE__ 0L - -#endif - - - -/* - These function prefixes are used for figuring out which - functions are exported and which are not. -*/ - -#define PUBLIC /* Accessible outside this module */ -#define PRIVATE static /* Accessible only within this module */ - - - -#endif /* __COMMON_UTILS_H__ */ - diff --git a/wolf3d/newCode/env/console.c b/wolf3d/newCode/env/console.c deleted file mode 100644 index 52b7fd4..0000000 --- a/wolf3d/newCode/env/console.c +++ /dev/null @@ -1,822 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * console.c: Console drawing and management. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#include "../wolfiphone.h" - -extern viddef_t viddef; -extern int consoleActive; - - -console_t con; - -float scr_conlines; -float scr_con_current; - -cvar_t *con_notifytime; -cvar_t *scr_conspeed; - - -#define MAXCMDLINE 256 - -char key_lines[ 32 ][ MAXCMDLINE ]; -int edit_line; -int key_linepos; - - -colour3_t colourconLGray = { 220, 220, 220 }; -colour3_t colourconLLGray = { 192, 192, 192 }; - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void DrawString( int x, int y, char *s ) -{ - Font_put_line( FONT0, x, y, s ); -} - -/* ------------------------------------------------------------------------------ - Function: Key_ClearTyping -Clear any keys that where typed. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -void Key_ClearTyping( void ) -{ - key_lines[ edit_line ][ 1 ] = 0; // clear any typing - key_linepos = 1; -} - -/* ------------------------------------------------------------------------------ - Function: Con_ToggleConsole_f -Get ready to enter console. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Con_ToggleConsole_f( void ) -{ - Key_ClearTyping(); - Con_ClearNotify(); -} - -/* ------------------------------------------------------------------------------ - Function: Con_Clear_f -Clear console text buffer. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - Zero sets con.text memory block. ------------------------------------------------------------------------------ -*/ -PRIVATE void Con_Clear_f( void ) -{ - memset( con.text, ' ', CON_TEXTSIZE ); -} - - -/* ------------------------------------------------------------------------------ - Function: Con_Dump_f -Save the console contents out to a file. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void Con_Dump_f( void ) -{ - int length, x; - char *line; - FILE *f; - char buffer[1024]; - char name[MAX_OSPATH]; - - if( Cmd_Argc() != 2 ) - { - Com_Printf( "usage: conDump \n" ); - return; - } - - my_snprintf( name, sizeof( name ), "%s/%s.txt", FS_Gamedir(), Cmd_Argv( 1 ) ); - - Com_Printf( "Dumped console text to %s.\n", name ); - FS_CreatePath( name ); - f = fopen( name, "w" ); - if( ! f ) - { - Com_Printf( "ERROR: couldn't open.\n" ); - return; - } - - // skip empty lines - for( length = con.current - con.totallines + 1; length <= con.current; ++length ) - { - line = con.text + (length % con.totallines) * con.linewidth; - for( x = 0; x < con.linewidth; ++x ) - { - if( line[ x ] != ' ' ) - { - break; - } - } - - if( x != con.linewidth ) - { - break; - } - } - - // write the remaining lines - buffer[ con.linewidth ] = '\0'; - for( ; length <= con.current ; ++length ) - { - line = con.text + (length % con.totallines) * con.linewidth; - my_strlcpy( buffer, line, con.linewidth ); - for( x = con.linewidth - 1; x >= 0; --x ) - { - if( buffer[ x ] == ' ' ) - { - buffer[ x ] = '\0'; // NUL-terminate string - } - else - { - break; - } - } - for( x = 0; buffer[ x ]; ++x ) - { - buffer[ x ] &= 0x7f; - } - - fprintf( f, "%s\n", buffer ); - } - - fclose( f ); -} - -/* ------------------------------------------------------------------------------ - Function: Con_ClearNotify -Clear console con.times. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Con_ClearNotify( void ) -{ - int i; - - for( i = 0; i < NUM_CON_TIMES; ++i ) - { - con.times[ i ] = 0; - } -} - - -/* ------------------------------------------------------------------------------ - Function: Con_CheckResize -If the line width has changed, reformat the buffer. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Con_CheckResize( void ) -{ - int i, j, width, oldwidth, oldtotallines, numlines, numchars; - char tbuf[ CON_TEXTSIZE ]; - - width = (viddef.width >> 3) - 2; - - if( width == con.linewidth ) - { - return; - } - - if( width < 1 ) // video hasn't been initialized yet - { - width = 38; - con.linewidth = width; - con.totallines = CON_TEXTSIZE / con.linewidth; - memset( con.text, ' ', CON_TEXTSIZE ); - } - else - { - oldwidth = con.linewidth; - con.linewidth = width; - oldtotallines = con.totallines; - con.totallines = CON_TEXTSIZE / con.linewidth; - numlines = oldtotallines; - - if( con.totallines < numlines ) - { - numlines = con.totallines; - } - - numchars = oldwidth; - - if( con.linewidth < numchars ) - { - numchars = con.linewidth; - } - - memcpy( tbuf, con.text, CON_TEXTSIZE ); - memset( con.text, ' ', CON_TEXTSIZE ); - - for( i = 0; i < numlines; ++i ) - { - for( j = 0; j < numchars; ++j ) - { - con.text[(con.totallines - 1 - i) * con.linewidth + j] = - tbuf[((con.current - i + oldtotallines) % - oldtotallines) * oldwidth + j]; - } - } - - Con_ClearNotify(); - } - - con.current = con.totallines - 1; - con.display = con.current; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Con_Init( void ) -{ - con.linewidth = -1; - - Con_CheckResize(); - - Com_Printf( "Console Initialized\n" ); - -// -// register our commands -// - con_notifytime = Cvar_Get( "con_notifytime", "90", CVAR_INIT ); - scr_conspeed = Cvar_Get( "scr_conspeed", "90", CVAR_INIT ); - - Cmd_AddCommand( "toggleconsole", Con_ToggleConsole_f ); - Cmd_AddCommand( "clear", Con_Clear_f ); - Cmd_AddCommand( "conDump", Con_Dump_f ); - - con.initialized = true; -} - -/* ------------------------------------------------------------------------------ - Function: Con_Linefeed -Fill rest of line with spaces. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void Con_Linefeed( void ) -{ - con.x = 0; - if( con.display == con.current ) - { - con.display++; - } - con.current++; - memset( &con.text[ (con.current % con.totallines) * con.linewidth ] - , ' ', con.linewidth ); -} - -/* ------------------------------------------------------------------------------ - Function: Con_Print -Print formatted message to the console. - - Parameters: txt -[in] Text message to print - - Returns: Nothing. - - Notes: - Handles cursor positioning, line wrapping, etc - All console printing must go through this in order to be logged to disk - If no console is visible, the text will appear at the top of the game window ------------------------------------------------------------------------------ -*/ -PUBLIC void Con_Print( char *txt ) -{ - int y; - int c, wordlength; - static int cr; - int mask; - -#ifdef IPHONE - printf( "%s", txt ); -#endif - - if( ! con.initialized ) - { - return; - } - - if( txt[ 0 ] == 1 || txt[ 0 ] == 2 ) - { - mask = 128; // go to colored text - txt++; - } - else - { - mask = 0; - } - - - while( (c = *txt) ) - { - // count word length - for( wordlength = 0 ; wordlength < con.linewidth ; ++wordlength ) - { - if( txt[ wordlength ] <= ' ') - { - break; - } - } - - // word wrap - if( wordlength != con.linewidth && (con.x + wordlength > con.linewidth) ) - { - con.x = 0; - } - - txt++; - - if( cr ) - { - con.current--; - cr = false; - } - - - if( ! con.x ) - { - Con_Linefeed(); - // mark time for transparent overlay - if( con.current >= 0 ) - { - con.times[ con.current % NUM_CON_TIMES ] = iphoneFrameNum; - } - } - - switch( c ) - { - case '\n': - con.x = 0; - break; - - case '\r': - con.x = 0; - cr = 1; - break; - - default: // display character and advance - y = con.current % con.totallines; - con.text[ y * con.linewidth + con.x] = c | mask | con.ormask; - con.x++; - if( con.x >= con.linewidth ) - { - con.x = 0; - } - break; - } - - } -} - - -/* ------------------------------------------------------------------------------ - Function: Con_CenteredPrint -Print message that is centered on screen. - - Parameters: text -[in] Message string. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void Con_CenteredPrint( const char *text ) -{ - int length; - char buffer[ 1024 ]; - - length = strlen( text ); - length = ( con.linewidth - length ) >> 1; - if( length < 0 ) - { - length = 0; - } - - memset( buffer, ' ', length ); - my_strlcpy( buffer + length, text, sizeof( buffer ) - length ); - my_strlcat( buffer, "\n", sizeof( buffer ) ); - Con_Print( buffer ); -} - - -/* -============================================================================== - - DRAWING - -============================================================================== -*/ - - -/* ------------------------------------------------------------------------------ - Function: Con_DrawInput -The input line scrolls horizontally if typing - goes beyond the right edge. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PRIVATE void Con_DrawInput( void ) -{ - int y; - int i; - char *text; - char buf[256]; - W16 heightfont, charwidth; - static char ccursor[ 2 ] = { ' ', '_' }; - - - heightfont = Font_GetSize( FONT0 ) + 4; - -#ifdef IPHONE - { - const char * GetCurrentCommandLine(); - extern int consoleActive; - - if ( consoleActive == 0 ) { - return; - } - strcpy( buf, GetCurrentCommandLine() ); - key_linepos = strlen( buf ); - buf[key_linepos+1] = 0; - text = buf; - } -#else - if( ClientStatic.key_dest != key_console ) - { - return; // don't draw anything (always draw if not active) - } - - text = key_lines[ edit_line ]; -#endif - -// add the cursor frame - text[ key_linepos ] = ccursor[ 0 + ((int)( iphoneFrameNum >> 3 ) & 1 ) ]; - -// fill out remainder with spaces - for( i = key_linepos + 1 ; i < con.linewidth ; ++i ) - { - text[ i ] = ' '; - } - -// prestep if horizontally scrolling - if( key_linepos >= con.linewidth ) - { - text += 1 + key_linepos - con.linewidth; - } - -// draw it - y = con.vislines - heightfont; - - charwidth = 8; - for( i = 0 ; i < con.linewidth ; ++i ) - { - charwidth += Font_put_character( FONT0, charwidth, con.vislines - 22, text[ i ] ); - } - -// remove cursor - key_lines[ edit_line ][ key_linepos ] = 0; -} - -/* ------------------------------------------------------------------------------ - Function: Con_DrawNotify -Draws the last few lines of output transparently - over the game top. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void Con_DrawNotify( void ) -{ - int x, v; - int charwidth; - char *text; - int i; - int time; -// char *s; -// int skip; - W16 size; - - - Font_SetSize( FONT1, 1 ); - size = Font_GetSize( FONT1 ); - - Font_SetColour( FONT1, colourWhite ); - - v = 0; - for( i = con.current - NUM_CON_TIMES+1 ; i <= con.current ; ++i ) - { - if( i < 0 ) - { - continue; - } - - time = FloatToInt( con.times[ i % NUM_CON_TIMES ] ); - if( time == 0 ) - { - continue; - } - - time = iphoneFrameNum- time; - if( time > con_notifytime->value ) - { - continue; - } - - text = con.text + (i % con.totallines) * con.linewidth; - - charwidth = 0; - for( x = 0 ; x < con.linewidth ; ++x ) - { - charwidth += Font_put_character( FONT1, charwidth, v, text[ x ] ); - } - - v += size; - } - - Font_SetSize( FONT1, 2 ); - -} - - -/* ------------------------------------------------------------------------------ - Function: Con_DrawConsole -Draws the console. - - Parameters: frac -[in] Fraction of the screen the console will take up. - Range is 0.0 to 1.0 - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void Con_DrawConsole( float frac ) -{ - int i, x, y; - int rows; - char *text; - int row; - W32 lines; - char version[ 64 ]; -// int w, h; - int heightfont, charwidth; - - lines = FloatToInt( viddef.height * frac ); - if( lines < 1 ) - { - return; - } - - - Font_SetSize( FONT0, 1 ); - Font_SetColour( FONT0, colourconLLGray ); - heightfont = Font_GetSize( FONT0 ); - - - - if( lines > viddef.height ) - { - lines = viddef.height; - } - -// -// Draw the background -// - R_Draw_Fill( 0, -viddef.height + lines, viddef.width, viddef.height, colourBlack ); - R_Draw_Fill( 0, lines-2, viddef.width, 2, colourconLGray ); - - -// SCR_AddDirtyPoint( 0, 0 ); -// SCR_AddDirtyPoint( viddef.width-1, lines-1 ); - - my_snprintf( version, sizeof( version ), "v%s", APP_VERSION ); - Font_SetColour( FONT0, colourGreen ); - Font_put_lineR2L( FONT0, viddef.width-20, lines - 2 - heightfont, version ); - Font_SetColour( FONT0, colourconLLGray ); - -// -// Draw the text -// - con.vislines = lines; - -#if 0 - - rows = (lines - 8) >> 3; // rows of text to draw - - y = lines - 24; - -#else - - rows = (lines - 22) >> 3; // rows of text to draw - - y = lines - 30; - -#endif - -// draw from the bottom up - if( con.display != con.current ) - { - // draw arrows to show the buffer is backscrolled - for( x = 0; x < con.linewidth; x += 4 ) - { - Font_put_character( FONT0, (x+1) << 3, y, '^' ); - } - - y -= heightfont; - rows--; - } - - row = con.display; - for( i = 0 ; i < rows ; ++i, y -= heightfont, --row ) - { - if( row < 0 ) - { - break; - } - - if( con.current - row >= con.totallines ) - { - break; // past scrollback wrap point - } - - text = con.text + (row % con.totallines) * con.linewidth; - - charwidth = 0; - for( x = 0; x < con.linewidth; ++x ) - { - charwidth += Font_put_character( FONT0, charwidth, y, text[ x ] ); - } - } - -// draw the input prompt, user text, and cursor if desired - Con_DrawInput(); - - Font_SetSize( FONT0, 2 ); -} - -/* - ----------------------------------------------------------------------------- - Function: Client_Screen_RunConsole -Figure out how the console should be - drawn. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - - ----------------------------------------------------------------------------- - */ -PUBLIC void Client_Screen_RunConsole( void ) -{ - if( scr_conlines < scr_con_current ) - { - scr_con_current -= scr_conspeed->value * iphoneFrameNum; - if( scr_conlines > scr_con_current ) - { - scr_con_current = scr_conlines; - } - - } - else if( scr_conlines > scr_con_current ) - { - scr_con_current += scr_conspeed->value * iphoneFrameNum; - if( scr_conlines < scr_con_current ) - { - scr_con_current = scr_conlines; - } - } - -} - -/* - ----------------------------------------------------------------------------- - Function: Client_Screen_DrawConsole -Draw the console on the screen. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - - ----------------------------------------------------------------------------- - */ -PUBLIC void Client_Screen_DrawConsole( void ) -{ - Con_CheckResize(); - - if( scr_con_current ) - { - Con_DrawConsole( scr_con_current ); - } - else - { - Con_DrawNotify(); - } -} - - - diff --git a/wolf3d/newCode/env/console.h b/wolf3d/newCode/env/console.h deleted file mode 100644 index 6134aaa..0000000 --- a/wolf3d/newCode/env/console.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * console.h: Console drawing and management.. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -/* - Notes: - This module is implemented by console.c. - -*/ - -#ifndef __CONSOLE_H__ -#define __CONSOLE_H__ - - -#define NUM_CON_TIMES 4 - -#define CON_TEXTSIZE 32768 - -typedef struct -{ - _boolean initialized; - - char text[CON_TEXTSIZE]; - int current; // line where next message will be printed - int x; // offset in current line for next print - int display; // bottom of console displays this line - - int ormask; // high bit mask for colored characters - - int linewidth; // characters across screen - int totallines; // total lines in console scrollback - - float cursorspeed; - - int vislines; - - float times[NUM_CON_TIMES]; // cls.realtime time the line was generated - // for transparent notify lines -} console_t; - -extern console_t con; - -extern void Con_DrawCharacter( int cx, int line, int num ); - -extern void Con_CheckResize( void ); -extern void Con_Init( void ); -extern void Con_DrawConsole( float frac ); -extern void Con_Print( char *txt ); -extern void Con_CenteredPrint( const char *text ); -extern void Con_DrawNotify( void ); -extern void Con_ClearNotify( void ); -extern void Con_ToggleConsole_f( void ); - -extern void Client_Screen_RunConsole( void ); -extern void Client_Screen_DrawConsole( void ); - -#endif /* __CONSOLE_H__ */ - diff --git a/wolf3d/newCode/env/cvar.c b/wolf3d/newCode/env/cvar.c deleted file mode 100644 index da3125c..0000000 --- a/wolf3d/newCode/env/cvar.c +++ /dev/null @@ -1,765 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * cvar.c: Dynamic variable tracking. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#include "../wolfiphone.h" - - -cvar_t *cvar_vars; - - -/* ------------------------------------------------------------------------------ - Function: Cvar_InfoValidate -String can not have / " ; - - Parameters: string -[in] String to validate. - - Returns: 1 if string is valid, otherwise 0; - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE _boolean Cvar_InfoValidate( const char *string ) -{ - if( strstr( string, "\\" ) ) - { - return false; - } - - if( strstr( string, "\"" ) ) - { - return false; - } - - if( strstr( string, ";" ) ) - { - return false; - } - - return true; -} - -/* ------------------------------------------------------------------------------ - Function: Cvar_FindVar -Return cvar; - - Parameters: var_name -[in] Name of cvar to lookup. - - Returns: NULL if cvar not found, otherwise returns the cvar. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE cvar_t *Cvar_FindVar( const char *var_name ) -{ - cvar_t *var; - W32 hashid; - - hashid = my_strhash( var_name ); - - for( var = cvar_vars ; var ; var = var->next ) - { - if( hashid == var->id ) - { - return var; - } - } - - return NULL; -} - -/* ------------------------------------------------------------------------------ - Function: Cvar_VariableValue -Get value of cvar. - - Parameters: var_name -[in] Name of cvar to get value. - - Returns: 0 if not found, other the value of the cvar. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC float Cvar_VariableValue( const char *var_name ) -{ - cvar_t *var; - - var = Cvar_FindVar( var_name ); - if( ! var ) - { - return 0; - } - - return (float)atof( var->string ); -} - - -/* ------------------------------------------------------------------------------ - Function: Cvar_VariableString -Get cvar variable as string. - - Parameters: var_name -[in] Name of cvar to get value. - - Returns: Blank string on error, otherwise value string. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC char *Cvar_VariableString( const char *var_name ) -{ - cvar_t *var; - - var = Cvar_FindVar( var_name ); - if( ! var ) - { - return ""; - } - - return var->string; -} - -/* ------------------------------------------------------------------------------ - Function: Cvar_CompleteVariable -Complete cvar string name. - - Parameters: partial -[in] Partial name of string to look up. - - Returns: NULL if partial string not found, otherwise the complete - string name. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC char *Cvar_CompleteVariable( const char *partial ) -{ - cvar_t *cvar; - size_t len; - W32 hashid; - - len = strlen( partial ); - - if( ! len ) - { - return NULL; - } - -// -// Check exact match. -// - hashid = my_strhash( partial ); - - for( cvar = cvar_vars ; cvar ; cvar = cvar->next ) - { - if( hashid == cvar->id ) - { - return cvar->name; - } - } - -// -// Check partial match. -// - for( cvar = cvar_vars ; cvar ; cvar = cvar->next ) - { - if( ! strncmp( partial, cvar->name, len ) ) - { - return cvar->name; - } - } - - return NULL; -} - -/* ------------------------------------------------------------------------------ - Function: Cvar_Get -Get cvar structure. - - Parameters: - var_name -[in] the name of the cvar variable. - var_value -[in] string value of the cvar variable. - flags -[in] see CVARFlags for more information. - - Returns: NULL on error, otherwise valid pointer to cvar_t structure. - - Notes: - If the variable already exists, the value will not be set and - the flags will be or'ed. ------------------------------------------------------------------------------ -*/ -PUBLIC cvar_t *Cvar_Get( const char *var_name, const char *var_value, CVARFlags flags ) -{ - cvar_t *var; - - if( flags & (CVAR_USERINFO | CVAR_SERVERINFO) ) - { - if( ! Cvar_InfoValidate( var_name ) ) - { - Com_Printf( "invalid info cvar name\n" ); - return NULL; - } - } - - var = Cvar_FindVar( var_name ); - if( var ) - { - var->flags |= flags; - return var; - } - - if( ! var_value ) - { - return NULL; - } - - if( flags & (CVAR_USERINFO | CVAR_SERVERINFO) ) - { - if( ! Cvar_InfoValidate( var_value ) ) - { - Com_Printf( "invalid info cvar value\n" ); - return NULL; - } - } - - var = Z_Malloc( sizeof( *var ) ); - var->name = my_CopyString( var_name ); - var->string = my_CopyString( var_value ); - var->id = my_strhash( var_name ); - var->modified = true; - var->value = (float)atof( var->string ); - - // link the variable in - var->next = cvar_vars; - cvar_vars = var; - - var->flags = flags; - - return var; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE cvar_t *Cvar_Set2( const char *var_name, const char *value, _boolean force ) -{ - cvar_t *var; - - var = Cvar_FindVar( var_name ); - if( ! var ) - { // create it - return Cvar_Get( var_name, value, CVAR_INIT ); - } - - if( var->flags & (CVAR_USERINFO | CVAR_SERVERINFO) ) - { - if( ! Cvar_InfoValidate( value ) ) - { - Com_Printf( "invalid info cvar value\n" ); - return var; - } - } - - if( ! force ) - { - if( var->flags & CVAR_NOSET ) - { - Com_Printf( "%s is write protected.\n", var_name ); - return var; - } - - if( var->flags & CVAR_LATCH ) - { - if( var->latched_string ) - { - if( strcmp( value, var->latched_string ) == 0 ) - { - return var; - } - - Z_Free( var->latched_string ); - } - else - { - if( strcmp( value, var->string ) == 0 ) - { - return var; - } - } - return var; - } - } - else - { - if( var->latched_string ) - { - Z_Free( var->latched_string ); - var->latched_string = NULL; - } - } - - if( ! strcmp( value, var->string ) ) - { - return var; // not changed - } - - var->modified = true; - - if( var->flags & CVAR_USERINFO ) - { - userinfo_modified = true; // transmit at next oportunity - } - - Z_Free( var->string ); // free the old value string - - var->string = my_CopyString( value ); - var->value = (float)atof( var->string ); - - return var; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC cvar_t *Cvar_ForceSet( const char *var_name, const char *value ) -{ - return Cvar_Set2( var_name, value, true ); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC cvar_t *Cvar_Set( const char *var_name, const char *value ) -{ - return Cvar_Set2( var_name, value, false ); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC cvar_t *Cvar_FullSet( const char *var_name, const char *value, CVARFlags flags ) -{ - cvar_t *var; - - var = Cvar_FindVar( var_name ); - if( ! var ) - { // create it - return Cvar_Get( var_name, value, flags ); - } - - var->modified = true; - - if( var->flags & CVAR_USERINFO ) - { - userinfo_modified = true; // transmit at next oportunity - } - - Z_Free( var->string ); // free the old value string - - var->string = my_CopyString( value ); - var->value = (float)atof( var->string ); - var->flags = flags; - - return var; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Cvar_SetValue( const char *var_name, float value ) -{ - char val[ 32 ]; - - if( value == (int)value ) - { - my_snprintf( val, sizeof( val ), "%i", (int)value ); - } - else - { - my_snprintf( val, sizeof( val ), "%f", value ); - } - - Cvar_Set( var_name, val ); -} - -/* ------------------------------------------------------------------------------ - Function: Cvar_GetLatchedVars -Any variables with latched values will now - be updated - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Cvar_GetLatchedVars( void ) -{ - cvar_t *var; - - for( var = cvar_vars ; var ; var = var->next ) - { - if( ! var->latched_string ) - { - continue; - } - - Z_Free( var->string ); - var->string = var->latched_string; - var->latched_string = NULL; - var->value = (float)atof(var->string); - } -} - - -/* ------------------------------------------------------------------------------ - Function: Cvar_Command -Handles variable inspection and changing from - the console. - - Parameters: Nothing. - - Returns: false if variable not found, otherwise true. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC _boolean Cvar_Command( void ) -{ - cvar_t *v; - -// check variables - v = Cvar_FindVar( Cmd_Argv( 0 ) ); - if( ! v ) - { - return false; - } - -// perform a variable print or set - if( Cmd_Argc() == 1 ) - { - Com_Printf( "\"%s\" is \"%s\"\n", v->name, v->string ); - return true; - } - - Cvar_Set( v->name, Cmd_Argv( 1 ) ); - return true; -} - -/* ------------------------------------------------------------------------------ - Function: Cvar_Set_f -Allows setting and defining of arbitrary cvars from console. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void Cvar_Set_f( void ) -{ - int c; - int flags; - - c = Cmd_Argc(); - if( c != 3 && c != 4 ) - { - Com_Printf( "usage: set [u / s]\n" ); - return; - } - - if( c == 4 ) - { - if( ! strcmp( Cmd_Argv( 3 ), "u" ) ) - { - flags = CVAR_USERINFO; - } - else if( ! strcmp( Cmd_Argv( 3 ), "s" ) ) - { - flags = CVAR_SERVERINFO; - } - else - { - Com_Printf( "flags can only be 'u' or 's'\n" ); - return; - } - Cvar_FullSet( Cmd_Argv( 1 ), Cmd_Argv( 2 ), flags ); - } - else - { - Cvar_Set( Cmd_Argv( 1 ), Cmd_Argv( 2 ) ); - } -} - - -/* ------------------------------------------------------------------------------ - Function: Cvar_WriteVariables -Appends lines containing "set variable value" - for all variables with the archive flag set - to true. - - Parameters: - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Cvar_WriteVariables( const char *path ) -{ - cvar_t *var; - char buffer[1024]; - FILE *f; - - f = fopen( path, "a" ); - for( var = cvar_vars ; var ; var = var->next ) - { - if( var->flags & CVAR_ARCHIVE ) - { - my_snprintf( buffer, sizeof( buffer ), "set %s \"%s\"\n", var->name, var->string ); - fprintf( f, "%s", buffer ); - } - } - fclose( f ); -} - -/* ------------------------------------------------------------------------------ - Function: Cvar_List_f -Print all cvars to the console. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void Cvar_List_f( void ) -{ - cvar_t *var; - int i; - - i = 0; - for( var = cvar_vars ; var ; var = var->next, ++i ) - { - if( var->flags & CVAR_ARCHIVE ) - { - Com_Printf ("*"); - } - else - { - Com_Printf (" "); - } - - - if( var->flags & CVAR_USERINFO ) - { - Com_Printf ("U"); - } - else - { - Com_Printf (" "); - } - - - if (var->flags & CVAR_SERVERINFO) - { - Com_Printf ("S"); - } - else - { - Com_Printf (" "); - } - - - if( var->flags & CVAR_NOSET ) - { - Com_Printf ("-"); - } - else if (var->flags & CVAR_LATCH) - { - Com_Printf ("L"); - } - else - { - Com_Printf (" "); - } - - Com_Printf (" %s \"%s\"\n", var->name, var->string); - } - - Com_Printf ("%i cvars\n", i); -} - - -PUBLIC _boolean userinfo_modified; - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE char *Cvar_BitInfo( int bit ) -{ - return NULL; -/* static char info[ MAX_INFO_STRING ]; - cvar_t *var; - - info[0] = 0; - - for (var = cvar_vars ; var ; var = var->next) - { - if (var->flags & bit) - Info_SetValueForKey (info, var->name, var->string); - } - return info; -*/ -} - - -/* ------------------------------------------------------------------------------ - Function: Cvar_Userinfo -Get CVAR_USERINFO cvars in a string. - - Parameters: Nothing. - - Returns: An info string containing all the CVAR_USERINFO cvars. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC char *Cvar_Userinfo( void ) -{ - return Cvar_BitInfo( CVAR_USERINFO ); -} - - -/* ------------------------------------------------------------------------------ - Function: Cvar_Serverinfo -Get CVAR_SERVERINFO cvars in a string. - - Parameters: Nothing. - - Returns: An info string containing all the CVAR_SERVERINFO cvars. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC char *Cvar_Serverinfo( void ) -{ - return Cvar_BitInfo( CVAR_SERVERINFO ); -} - - -/* ------------------------------------------------------------------------------ - Function: Cvar_Init -Initialize cvar console functions. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - - This is done so that we can read in archived cvars from cfg files. - Also to list all the cvar variables. ------------------------------------------------------------------------------ -*/ -PUBLIC void Cvar_Init( void ) -{ - Cmd_AddCommand( "set", Cvar_Set_f ); - Cmd_AddCommand( "listCvars", Cvar_List_f ); -} - diff --git a/wolf3d/newCode/env/cvar.h b/wolf3d/newCode/env/cvar.h deleted file mode 100644 index aa41f2f..0000000 --- a/wolf3d/newCode/env/cvar.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * cvar.h: Dynamic variable tracking. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -/* - -Notes: - - Dynamic variable tracking. - - cvar_t variables are used to hold scalar or string variables - that can be changed or displayed at the console or prog code - as well as accessed directly in C code. - - The user can access cvars from the console in three ways: - r_draworder -prints the current value - r_draworder 0 -sets the current value to 0 - set r_draworder 0 -as above, but creates the cvar if not present - - Cvars are restricted from having the same names as commands to keep this - module from being ambiguous. - - This module is implemented by cvar.c - -*/ - -#ifndef __CVAR_H__ -#define __CVAR_H__ - - -#include "arch.h" - -#if 0 -typedef enum _CVARType -{ - CVAR_DEFAULT = BIT( 0 ), // Just create it with no flag value. - CVAR_BOOL = BIT( 0 ), // Set to cause it to be saved to vars.rc - CVAR_INT = BIT( 0 ), // Added to userinfo when changed. - CVAR_FLOAT = BIT( 0 ), // Added to serverinfo when changed. - CVAR_STRING = BIT( 0 ), // Don't allow change from console at all, - // but can be set from the command line. - - CVAR_LATCH = BIT( 0 ), // Save changes until server restart. - -} CVARType; -#endif - -typedef enum _CVARFlags -{ - CVAR_INIT = 0x0, // Just create it with no flag value. - CVAR_ARCHIVE = 0x1, // Set to cause it to be saved to vars.rc - CVAR_USERINFO = 0x2, // Added to userinfo when changed. - CVAR_SERVERINFO = 0x4, // Added to serverinfo when changed. - CVAR_NOSET = 0x8, // Don't allow change from console at all, - // but can be set from the command line. - - CVAR_LATCH = 0x10, // Save changes until server restart. - -} CVARFlags; - - -// nothing outside the Cvar_*() functions should modify these fields! -typedef struct cvar_s -{ - char *name; - char *string; - W32 id; - char *latched_string; // for CVAR_LATCH vars - int flags; - _boolean modified; // set each time the cvar is changed - float value; - - struct cvar_s *next; - -} cvar_t; - -extern cvar_t *cvar_vars; - - - -extern cvar_t *Cvar_Get( const char *var_name, const char *value, CVARFlags flags ); -// creates the variable if it doesn't exist, or returns the existing one -// if it exists, the value will not be changed, but flags will be ORed in -// that allows variables to be unarchived without needing bitflags - -extern cvar_t *Cvar_Set( const char *var_name, const char *value ); -// will create the variable if it doesn't exist - -extern cvar_t *Cvar_ForceSet( const char *var_name, const char *value ); -// will set the variable even if NOSET or LATCH - -extern cvar_t *Cvar_FullSet( const char *var_name, const char *value, CVARFlags flags ); - -extern void Cvar_SetValue( const char *var_name, float value ); -// expands value to a string and calls Cvar_Set - -extern float Cvar_VariableValue( const char *var_name ); -// returns 0 if not defined or non numeric - -extern char *Cvar_VariableString( const char *var_name ); -// returns an empty string if not defined - -extern char *Cvar_CompleteVariable( const char *partial ); -// attempts to match a partial variable name for command line completion -// returns NULL if nothing fits - -extern void Cvar_GetLatchedVars( void ); -// any CVAR_LATCHED variables that have been set will now take effect - -extern _boolean Cvar_Command( void ); -// called by Cmd_ExecuteString when Cmd_Argv(0) doesn't match a known -// command. Returns true if the command was a variable reference that -// was handled. (print or change) - -extern void Cvar_WriteVariables( const char *path ); -// appends lines containing "set variable value" for all variables -// with the archive flag set to true. - -extern void Cvar_Init( void ); - -extern char *Cvar_Userinfo( void ); -// returns an info string containing all the CVAR_USERINFO cvars - -extern char *Cvar_Serverinfo( void ); -// returns an info string containing all the CVAR_SERVERINFO cvars - -extern _boolean userinfo_modified; -// this is set each time a CVAR_USERINFO variable is changed -// so that the client knows to send it to the server - - -#endif /* __CVAR_H__ */ - diff --git a/wolf3d/newCode/env/fileio.c b/wolf3d/newCode/env/fileio.c deleted file mode 100644 index 1848e55..0000000 --- a/wolf3d/newCode/env/fileio.c +++ /dev/null @@ -1,302 +0,0 @@ -/* - - Copyright (C) 2005 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -#include "../wolfiphone.h" - -// if true, use mmap instead of alloc and read -//#define USE_MMAP - -/* ------------------------------------------------------------------------------ - Function: FS_GetLoadedFilePointer() -Get file pointer. - - Parameters: - filestream -[in] Target file handle. - origin -[in] Pointer position - SEEK_SET -Beginning of file. - SEEK_CUR -Current position of file pointer. - SEEK_END -End of file. - - Returns: File pointer on success, otherwise NULL. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void *FS_GetLoadedFilePointer( filehandle_t *fhandle, W32 origin ) -{ - switch( origin ) - { - case SEEK_SET: - return( (void *)fhandle->ptrStart ); - - case SEEK_END: - return( (void *)fhandle->ptrEnd ); - - case SEEK_CUR: - return( (void *)fhandle->ptrCurrent ); - } - - return NULL; -} - -/* ------------------------------------------------------------------------------ - Function: FS_GetFileSize() -Get the length of a file. - - Parameters: filestream -[in] Target file handle. - - Returns: The file length in bytes. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC SW32 FS_GetFileSize( filehandle_t *fhandle ) -{ - return fhandle->filesize; -} - -/* ------------------------------------------------------------------------------ - Function: FS_FileSeek() -Moves the file pointer to a specified location. - - Parameters: - fhandle -[in] Pointer to filehandle_t structure. - offset -[in] Number of bytes from origin - origin -[in] Initial position - SEEK_SET -Beginning of file. - SEEK_CUR -Current position of file pointer. - SEEK_END -End of file. - - Returns: If successful zero, otherwise a nonzero value. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC W32 FS_FileSeek( filehandle_t *fhandle, SW32 offset, W32 origin ) -{ - switch( origin ) - { - case SEEK_SET: - if( offset < 0 || - offset > fhandle->filesize ) - { - return 1; - } - - fhandle->ptrCurrent = fhandle->ptrStart + offset; - break; - - case SEEK_END: - if( offset > 0 ) - { - return 1; - } - - // offset is negative - if( (fhandle->filesize + offset) < 0 ) - { - return 1; - } - - // offset is negative - fhandle->ptrCurrent = fhandle->ptrEnd + offset; - break; - - case SEEK_CUR: - if( offset < 0 ) - { - // offset is negative - if( ((fhandle->ptrCurrent - fhandle->ptrStart) + offset) < 0 ) - { - return 1; - } - } - - if( offset > 0 ) - { - if( offset > (fhandle->ptrEnd - fhandle->ptrCurrent) ) - { - return 1; - } - } - - fhandle->ptrCurrent += offset; - break; - - default: - return 1; - } - - return 0; -} - -/* ------------------------------------------------------------------------------ - Function: FS_FileTell() -Gets the current position of a file pointer. - - Parameters: fhandle -[in] Pointer to filehandle_t structure. - - Returns: If successful current file position, otherwise -1. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC SW32 FS_FileTell( filehandle_t *fhandle ) -{ - return( fhandle->ptrCurrent - fhandle->ptrStart ); -} - -/* ------------------------------------------------------------------------------ - Function: FS_CloseFile -Close file handle. - - Parameters: filestream -[in] Pointer to valid FILE structure. - - Returns: Nothing. - - Notes: Closes a file stream that was returned by FS_FOpenFile. - ------------------------------------------------------------------------------ -*/ -PUBLIC void FS_CloseFile( filehandle_t *fhandle ) -{ - if( fhandle->filedata ) - { -#ifdef USE_MMAP - if ( munmap( fhandle->filedata, fhandle->filesize ) != 0 ) { - assert( 0 ); - } -#else - free( fhandle->filedata ); -#endif - fhandle->filedata = NULL; - } - - Z_Free( fhandle ); -} - - -/* ------------------------------------------------------------------------------ - Function: FS_OpenFile -Open file from the file system. - ------------------------------------------------------------------------------ -*/ -PUBLIC filehandle_t *FS_OpenFile( const char *filename, W32 FlagsAndAttributes ) -{ - char netpath[ MAX_OSPATH ]; - filehandle_t *hFile; - const char *pathBase; - struct stat s; - int fd; - - -// -// Check for the file in the directory tree -// - if ( FlagsAndAttributes & FA_FILE_IPHONE_DOC_DIR ) { - extern char iphoneDocDirectory[1024]; - pathBase = iphoneDocDirectory; - my_snprintf( netpath, sizeof( netpath ), "%s/%s", pathBase, filename ); - } else { -// extern char iphoneAppDirectory[1024]; -// pathBase = iphoneAppDirectory; - pathBase = FS_Gamedir(); - my_snprintf( netpath, sizeof( netpath ), "%s/%s", pathBase, filename ); - } - - // high performance file mapping path, avoiding stdio - fd = open( netpath, O_RDONLY ); - if ( fd == -1 ) { - return NULL; - } - fstat( fd, &s ); - - hFile = Z_Malloc( sizeof( filehandle_t ) ); - memset( hFile, 0, sizeof( filehandle_t ) ); - - hFile->filesize = s.st_size; -#ifdef USE_MMAP - hFile->filedata = mmap( NULL, hFile->filesize, PROT_READ, MAP_FILE|MAP_PRIVATE, fd, 0 ); - if ( (int)hFile->filedata == -1 ) { - Com_Printf( "mmap failed: %s\n", strerror( errno ) ); - assert( 0 ); - } -#else - hFile->filedata = malloc( hFile->filesize ); - read( fd, hFile->filedata, hFile->filesize ); -#endif - hFile->ptrStart = hFile->ptrCurrent = (PW8)hFile->filedata; - hFile->ptrEnd = (PW8)hFile->filedata + hFile->filesize; - hFile->bLoaded = true; - // mmap doesn't require the file to stay open - close( fd ); - return hFile; -} - - -/* ------------------------------------------------------------------------------ - Function: FS_ReadFile -Reads data from a stream. - - Parameters: buffer -[in/out] Storage location for data. - size -[in] Item size in bytes. - count -[in] Maximum number of items to be read. - fhandle -[in] Pointer to valid filehandle_t structure. - - Returns: On success number of full items actually read, otherwise -1. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC SW32 FS_ReadFile( void *buffer, W32 size, W32 count, filehandle_t *fhandle ) -{ - W8 *buf = (PW8)buffer; - W32 i; - - if( (size * count) > (fhandle->ptrEnd - fhandle->ptrCurrent) ) - { - SW32 read; - - read = (fhandle->ptrEnd - fhandle->ptrCurrent); - - for( i = 0 ; i < (fhandle->ptrEnd - fhandle->ptrCurrent) ; ++i ) - { - buf[ i ] = fhandle->ptrCurrent[ i ]; - } - - fhandle->ptrCurrent = fhandle->ptrEnd; - - return( read ); - } - else - { - for( i = 0 ; i < (size * count) ; ++i, fhandle->ptrCurrent++ ) - { - buf[ i ] = *fhandle->ptrCurrent; - } - - return( (size * count) / size ); - } - - /* should never get here */ - return -1; -} diff --git a/wolf3d/newCode/env/files.c b/wolf3d/newCode/env/files.c deleted file mode 100644 index acd92e2..0000000 --- a/wolf3d/newCode/env/files.c +++ /dev/null @@ -1,162 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * files.c: Interface to file i/o layer. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -/* - - Notes: - - This module accesses data through a hierarchal file system, but the - contents of the file system can be transparently merged from several - sources. - - The "base directory" is the path to the directory holding the - executable and all game directories. The sys_* files pass this to - host_init in quakeparms_t->basedir. This can be overridden with the - "-basedir" command line parm to allow code debugging in a different - directory. The base directory is only used during file system - initialization. - - The "game directory" is the first tree on the search path and directory - that all generated files (save games, screen shots, demos, config - files) will be saved to. This can be overridden with the "-game" - command line parameter. The game directory can never be changed while - the application is executing. This is a precaution against having a - malicious server instruct clients to write files over areas they - shouldn't. - -*/ - -#include "../wolfiphone.h" - - - -PRIVATE char fs_gamedir[ MAX_OSPATH ]; - - - -/* ------------------------------------------------------------------------------ - Function: FS_Gamedir -Get root directory. - - Parameters: Nothing. - - Returns: String with the name of the root directory. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC char *FS_Gamedir( void ) -{ - return fs_gamedir; -} - - -/* ------------------------------------------------------------------------------ - Function: FS_ListFiles -List files. - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE char **FS_ListFiles( char *findname, int *numfiles, unsigned musthave, unsigned canthave ) -{ - char *s; - int nfiles = 0; - char **list = 0; - - s = FS_FindFirst( findname, musthave, canthave ); - while ( s ) - { - if ( s[strlen(s)-1] != '.' ) - nfiles++; - s = FS_FindNext( musthave, canthave ); - } - FS_FindClose (); - - if ( !nfiles ) - return NULL; - - nfiles++; // add space for a guard - *numfiles = nfiles; - - list = MM_MALLOC( sizeof( char * ) * nfiles ); - if( list == NULL ) - { - MM_OUTOFMEM( "list" ); - } - - memset( list, 0, sizeof( char * ) * nfiles ); - - s = FS_FindFirst( findname, musthave, canthave ); - nfiles = 0; - while( s ) - { - if( s[ strlen( s ) - 1 ] != '.' ) - { - list[ nfiles ] = strdup( s ); - - (void)my_strlwr( list[ nfiles ] ); - - nfiles++; - } - s = FS_FindNext( musthave, canthave ); - } - FS_FindClose(); - - return list; -} - - -/* ------------------------------------------------------------------------------ - Function: FS_InitFilesystem -Initialize file system. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void FS_InitFilesystem( void ) -{ - char *p; - p = getenv("CWD"); - sprintf( fs_gamedir, "%s/base", p ); -} diff --git a/wolf3d/newCode/env/filestring.c b/wolf3d/newCode/env/filestring.c deleted file mode 100644 index d36603d..0000000 --- a/wolf3d/newCode/env/filestring.c +++ /dev/null @@ -1,161 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * filestring.c: Portable file path/name manipulation methods. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#include "../wolfiphone.h" - - -/* ------------------------------------------------------------------------------ - Function: FS_CreatePath -Creates given path. - - Parameters: path -[in] Pointer to NULL terminated string that contains directory - path. - - Returns: Nothing. - - Notes: Creates any directories needed to store the given filename. - ------------------------------------------------------------------------------ -*/ -PUBLIC void FS_CreatePath( char *path ) -{ - char *ofs; - - for( ofs = path + 1; *ofs; ofs++ ) - { - if( *ofs == '/' ) - { // create the directory - *ofs = '\0'; - FS_CreateDirectory( path ); - *ofs = '/'; - } - } - -} - -PUBLIC void FS_FilePath( char *in, char *out ) -{ - char *s; - - s = in + strlen( in ) - 1; - - while( s != in && *s != '/' ) - { - s--; - } - - strncpy( out, in, s-in ); - out[ s - in ] = '\0'; // NUL-terminate string. -} - -PUBLIC char *FS_SkipPath( char *pathname ) -{ - char *last; - - last = pathname; - while( *pathname ) - { - if( *pathname == '/' ) - { - last = pathname + 1; - } - pathname++; - } - - return last; -} - -PUBLIC void FS_StripExtension( char *in, char *out ) -{ - while( *in && *in != '.' ) - { - *out++ = *in++; - } - - *out = '\0'; // NUL-terminate string. -} - -PUBLIC char *FS_FileExtension( char *in ) -{ - static char exten[ 8 ]; - int i; - - while( *in && *in != '.' ) - { - in++; - } - - if( ! *in ) - { - return ""; - } - - in++; - for( i = 0 ; i < 7 && *in ; i++, in++ ) - { - exten[ i ] = *in; - } - - exten[ i ] = '\0'; // NUL-terminate string. - - return exten; -} - -PUBLIC void FS_FileBase( char *in, char *out ) -{ - char *s, *s2; - - s = in + strlen( in ) - 1; - - while( s != in && *s != '.' ) - { - s--; - } - - for( s2 = s ; s2 != in && *s2 != '/' ; s2-- ) - { - ; - } - - if( s - s2 < 2 ) - { - out[ 0 ] = '\0'; // NUL-terminate string. - } - else - { - s--; - strncpy( out, s2 + 1, s - s2 ); - out[ s - s2 ] = '\0'; // NUL-terminate string. - } -} - - diff --git a/wolf3d/newCode/env/filestring.h b/wolf3d/newCode/env/filestring.h deleted file mode 100644 index 696fa1a..0000000 --- a/wolf3d/newCode/env/filestring.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * filesystem.h: Interface to filesystem layer. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -/* - Notes: - This module is implemented by filestring.c. - -*/ - -#ifndef __FILESTRING_H__ -#define __FILESTRING_H__ - - -extern void FS_CreatePath( char *path ); - -extern void FS_FilePath( char *in, char *out ); - -extern char *FS_SkipPath( char *pathname ); - -extern void FS_StripExtension( char *in, char *out ); - -extern char *FS_FileExtension( char *in ); - -extern void FS_FileBase( char *in, char *out ); - -#endif /* __FILESTRING_H__ */ diff --git a/wolf3d/newCode/env/filesystem.h b/wolf3d/newCode/env/filesystem.h deleted file mode 100644 index 59bde77..0000000 --- a/wolf3d/newCode/env/filesystem.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * filesystem.h: Interface to filesystem layer. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -/* - Notes: - This module is implemented by files.c. - -*/ - -#ifndef __FILESYSTEM_H__ -#define __FILESYSTEM_H__ - -#define MAX_GAMEPATH 256 // max length of a game pathname -#define MAX_OSPATH 256 // max length of a filesystem pathname - - -extern void FS_InitFilesystem(void); -extern char *FS_Gamedir(void); - - - -///////////////////////////////////////////////////////////////////// -// -// PORTABLE FILE SYSTEM SERVICES -// -///////////////////////////////////////////////////////////////////// - -typedef struct -{ - FILE *hFile; - - /* Following is used when the file is loaded into memory */ - _boolean bLoaded; /* Was file loaded into memory? */ - W32 filesize; /* Size of file data in bytes */ - - W8 *ptrStart; /* pointer to start of file data block */ - W8 *ptrCurrent; /* pointer to current position in file data block */ - W8 *ptrEnd; /* pointer to end of file data block */ - - void *filedata; /* file data loaded into memory */ - -} filehandle_t; - - -/* Desired Access Flags */ -#define DA_GENERIC_READ 0x01 -#define DA_GENERIC_WRITE 0x02 - -/* Flags and Attributes */ -#define FA_FILE_FLAG_LOAD 0x01 -#define FA_FILE_FLAG_CACHE 0x02 -#define FA_FILE_IPHONE_DOC_DIR 0x04 - -extern filehandle_t *FS_OpenFile( const char *filename, W32 FlagsAndAttributes ); -extern void FS_CloseFile( filehandle_t *fhandle ); -// note: this can't be called from another DLL, due to MS libc issues - -extern SW32 FS_ReadFile( void *buffer, W32 size, W32 count, filehandle_t *fhandle ); - -extern SW32 FS_FileTell( filehandle_t *fhandle ); - -extern W32 FS_FileSeek( filehandle_t *fhandle, SW32 offset, W32 origin ); - -extern SW32 FS_GetFileSize( filehandle_t *fhandle ); - -extern void *FS_GetLoadedFilePointer( filehandle_t *fhandle, W32 origin ); - - - -extern void FS_CreatePath( char *path ); - -extern void FS_FilePath( char *in, char *out ); - -extern char *FS_SkipPath( char *pathname ); - -///////////////////////////////////////////////////////////////////// -// -// NON-PORTABLE FILE SYSTEM SERVICES -// -///////////////////////////////////////////////////////////////////// - -extern W8 FS_CreateDirectory( const char *dirname ); -extern W8 FS_ChangeCurrentDirectory( const char *path ); - -extern _boolean FS_DeleteFile( const char *filename ); -extern _boolean FS_RemoveDirectory( const char *pathname ); - -// directory/file attributes -#define FA_ARCH 0x01 -#define FA_HIDDEN 0x02 -#define FA_RDONLY 0x04 -#define FA_DIR 0x08 -#define FA_SYSTEM 0x10 - -// pass in an attribute mask of things you wish to REJECT -extern char *FS_FindFirst( const char *path, W32 musthave, W32 canthave ); -extern char *FS_FindNext( W32 musthave, W32 canthave ); -extern void FS_FindClose( void ); - - - - - -#endif /* __FILESYSTEM_H__ */ - diff --git a/wolf3d/newCode/env/font_manager.c b/wolf3d/newCode/env/font_manager.c deleted file mode 100644 index b4bf57e..0000000 --- a/wolf3d/newCode/env/font_manager.c +++ /dev/null @@ -1,492 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * font_manager.c: Font management. - * - */ - - -#include "../wolfiphone.h" - -/* - - ! " # $ % & ' ( ) * + , - . / -0 1 2 3 4 5 6 7 8 9 : ; ( = ) ? -@ A B C D E F G H I J K L M N O -P Q R S T U V W X Y Z [ / ] ^ - -` a b c d e f g h i j k l m n o -p q r s t u v w x y z { | } ~ - -*/ - - -#define MAX_FONTS 4 -font_t *myfonts[ MAX_FONTS ]; -PRIVATE W32 num_fonts = 0; - - -typedef struct -{ - char *start, *end; - -} string_seg_t; - - -font_t *createFont( const char *filename ) -{ - font_t *temp_font; - char *datname; - filehandle_t *fp; - W32 size; - W32 i; - - if( num_fonts == (MAX_FONTS - 1) ) - { - Com_Printf( "[createFont]: No more font slots open\n" ); - - return NULL; - } - - - temp_font = Z_Malloc( sizeof( font_t ) ); - - temp_font->texfont = TM_FindTexture( filename, TT_Pic ); - if( NULL == temp_font->texfont ) - { - Com_Printf( "[createFont]: unable to open file (%s)\n", filename ); - - Z_Free( temp_font ); - - return NULL; - } - - memset( temp_font->nCharWidth, 0, sizeof( temp_font->nCharWidth ) ); - - datname = MM_MALLOC( strlen( filename ) + 1 ); - - FS_StripExtension( (char *)filename, datname ); - - my_strlcat( datname, ".dat", strlen( filename ) + 1 ); - - fp = FS_OpenFile( datname, 0 ); - if( NULL == fp ) - { - Com_Printf( "[createFont]: unable to open file (%s)\n", datname ); - - MM_FREE( datname ); - Z_Free( temp_font ); - - return NULL; - } - - size = FS_GetFileSize( fp ); - - // check header size - if( size < 10 ) - { - Com_Printf( "[createFont]: File (%s) has incorrect file length\n", datname ); - - MM_FREE( datname ); - Z_Free( temp_font ); - - FS_CloseFile( fp ); - - return NULL; - } - - - // Check sig of font dat file - - FS_ReadFile( &size, 1, 4, fp ); - - - FS_ReadFile( &temp_font->nMaxWidth, 1, 1, fp ); - FS_ReadFile( &temp_font->nMaxHeight, 1, 1, fp ); - - - FS_ReadFile( &size, 1, 4, fp ); - size = LittleLong( size ); - - if( size > 127 ) - { - Com_Printf( "[createFont]: File (%s) has incorrect Character Width array\n", datname ); - - MM_FREE( datname ); - Z_Free( temp_font ); - - FS_CloseFile( fp ); - - return NULL; - } - - FS_ReadFile( &temp_font->nCharWidth, 1, size, fp ); - - FS_CloseFile( fp ); - - - - - temp_font->nSize = 2; - temp_font->colour[ 3 ] = 255; - - temp_font->hFrac = (float)(temp_font->nMaxHeight / (float)temp_font->texfont->height); - temp_font->wFrac = (float)(temp_font->nMaxWidth / (float)temp_font->texfont->width); - - - - for( i = 0 ; i < MAX_FONTS ; ++i ) - { - if( ! myfonts[ i ] ) - { - break; - } - } - - if( i == (MAX_FONTS - 1) ) - { - Com_Printf( "[createFont]: No more font slots open\n" ); - - MM_FREE( datname ); - Z_Free( temp_font ); - - return NULL; - } - - myfonts[ i ] = temp_font; - - MM_FREE( datname ); - - - return temp_font; -} - -void Font_Init( void ) -{ - W32 i; - - for( i = 0 ; i < MAX_FONTS ; ++i ) - { - myfonts[ i ] = NULL; - } - - (void)createFont( "iphone/font1.tga" ); -// (void)createFont( "iphone/font2.tga" ); -} - -void Font_Shutdown( void ) -{ - -} - -void Font_GetMsgDimensions( FONTSELECT fs, const char *string, int *w, int *h ) -{ - int width = 0; - int mx = 0; - W16 scale; - int height; - - if( ! myfonts[ fs ] ) - { - *w = *h = 0; - - return; - } - - scale = myfonts[ fs ]->nMaxHeight * myfonts[ fs ]->nSize; - height = scale; - - while( *string ) - { - if( *string == '\n' ) - { - if( mx > width ) - { - width = mx; - } - - mx = 0; - height += scale; - ++string; - - continue; - } - - mx += myfonts[ fs ]->nCharWidth[ (*string)-32 ] * myfonts[ fs ]->nSize; - - ++string; - } - - if( mx > width ) - { - width = mx; - } - - *w = width; - *h = height; -} - -void Font_SetSize( FONTSELECT fs, W16 size ) -{ - if( myfonts[ fs ] ) - { - myfonts[ fs ]->nSize = size; - } -} - -W16 Font_GetSize( FONTSELECT fs ) -{ - if( myfonts[ fs ] ) - { - return( myfonts[ fs ]->nMaxHeight * myfonts[ fs ]->nSize ); - } - - return 0; -} - -void Font_SetColour( FONTSELECT fs, colour3_t c ) -{ - if( myfonts[ fs ] ) - { - myfonts[ fs ]->colour[ 0 ] = c[ 0 ]; - myfonts[ fs ]->colour[ 1 ] = c[ 1 ]; - myfonts[ fs ]->colour[ 2 ] = c[ 2 ]; - } -} - -extern void R_Draw_Character( int x, int y, int num, font_t *myfont ); - -void Font_put_line( FONTSELECT fs, int x, int y, const char *string ) -{ - int mx = x; - W16 scale; - - if( ! myfonts[ fs ] ) - { - return; - } - - scale = myfonts[ fs ]->nSize; - - while( *string ) - { - if( *string == '\n' ) - { - mx = x; - y += myfonts[ fs ]->nMaxHeight * scale; - ++string; - continue; - } - - R_Draw_Character( mx, y, *string, myfonts[ fs ] ); - mx += myfonts[ fs ]->nCharWidth[ (*string)-32 ] * scale; - ++string; - } -} - - -void Font_put_lineR2L( FONTSELECT fs, int x, int y, const char *string ) -{ - int mx = x; - unsigned int charindex; - unsigned int i; - - if( ! myfonts[ fs ] ) - { - return; - } - - for ( i = 0; i < strlen( string ); ++i ) - { - charindex = strlen( string ) - i - 1; - mx -= myfonts[ fs ]->nCharWidth[ string[ charindex ]-32 ] * myfonts[ fs ]->nSize; - - R_Draw_Character( mx, y, string[ charindex ], myfonts[ fs ] ); - } -} - -W16 Font_put_character( FONTSELECT fs, int x, int y, W16 num ) -{ - if( ! myfonts[ fs ] || num > 126 ) - { - return 0; - } - - R_Draw_Character( x, y, num, myfonts[ fs ] ); - - return( myfonts[ fs ]->nCharWidth[ num - 32 ] * myfonts[ fs ]->nSize ); -} - - -void Font_put_line_size( FONTSELECT fs, int x, int y, const char *start, const char *end ) -{ - int mx = x; - W16 scale; - - if( ! myfonts[ fs ] ) - { - return; - } - - scale = myfonts[ fs ]->nSize; - - while( start != end ) - { - R_Draw_Character( mx, y, *start, myfonts[ fs ] ); - mx += myfonts[ fs ]->nCharWidth[ (*start)-32 ] * scale; - ++start; - } - -} - - - -W8 Font_get_line( FONTSELECT fs, int line_width, string_seg_t *sst ) -{ - int x = 0, last_word_width = 0, last_word_spaces = 0; - int in_a_word = 0; - int t_words = 0; - int t_spaces = 0; - int chars_width = 0; - W16 scale; - const char *word_start = sst->start; - - - if( ! myfonts[ fs ] ) - { - return false; - } - - - scale = myfonts[ fs ]->nSize; - - - if( line_width < 0 ) - { - line_width = 1000000; - } - - - while( *sst->end != '\0' && *sst->end != '\n' ) - { - char c = *sst->end; - - int c_width = myfonts[ fs ]->nCharWidth[ c - 32 ] * scale; // FIX ME - - // we exceeded the space available for this line - if( x + c_width > line_width ) - { - if( in_a_word ) - { - chars_width = last_word_width; - sst->end = (char *)word_start; - t_spaces = last_word_spaces; - } - - return t_words ? true : false; - } - - - x += c_width; - - if( c != ' ' ) - { - if( ! in_a_word ) - { - last_word_width = chars_width; - word_start = sst->end; - } - - in_a_word = 1; - chars_width += c_width; - } - else - { - if( in_a_word ) - { - in_a_word = 0; - t_words++; - last_word_spaces = t_spaces; - } - - t_spaces++; - } - - ++sst->end; - } - - if( in_a_word ) - { - t_words++; - } - - if( *sst->end != '\0' && *sst->end == '\n' ) - { - ++sst->end; - } - - return t_words ? true : false; - -} - - -void Font_put_paragraph( FONTSELECT fs, short x, short y, - const char *string, - int space_between_lines, - int line_width_in_pixel ) -{ - string_seg_t sst; - sst.start = sst.end = (char *)string; - - if( ! myfonts[ fs ] ) - { - return; - } - - while( Font_get_line( fs, line_width_in_pixel, &sst ) ) - { - Font_put_line_size( fs, x, y, sst.start, sst.end ); - - if( *sst.end != '\0' && *sst.end == ' ' ) - { - sst.start = sst.end; - ++sst.start; - sst.end = sst.start; - } - else if( *sst.end != '\0' && *sst.end == '\n' ) - { - while( *sst.end == '\n' ) - { - ++sst.end; - y += Font_GetSize( fs ) + space_between_lines; - } - - sst.start = sst.end; - } - else - { - sst.start = sst.end; - } - - y += Font_GetSize( fs ) + space_between_lines; - } - -} - diff --git a/wolf3d/newCode/env/font_manager.h b/wolf3d/newCode/env/font_manager.h deleted file mode 100644 index ac54886..0000000 --- a/wolf3d/newCode/env/font_manager.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * font_manager.h: Font management. - * - * Author: Michael Liebscher - * Date: 2004 - * - */ - -/* - Notes: - This module is implemented by font_manager.c. - -*/ - -#ifndef __FONT_MANAGER_H__ -#define __FONT_MANAGER_H__ - - -typedef enum { FONT0 = 0, FONT1, FONT2, FONT3 } FONTSELECT; - - - -typedef struct -{ - W8 nCharWidth[ 128 ]; /* width of each character */ - W8 nMaxWidth; /* box width */ - W8 nMaxHeight; /* box height */ - SW32 spacing; /* space between characters */ - W32 nSize; - float wFrac; - float hFrac; - colour4_t colour; /* Font colour */ - texture_t *texfont; - -} font_t; - - -extern void Font_Init( void ); -extern void Font_Shutdown( void ); - - -extern void Font_SetSize( FONTSELECT fs, W16 size ); -extern W16 Font_GetSize( FONTSELECT fs ); - -extern void Font_SetColour( FONTSELECT fs, colour3_t c ); - -extern void Font_put_line( FONTSELECT fs, int x, int y, const char *string ); -extern void Font_put_lineR2L( FONTSELECT fs, int x, int y, const char *string ); -extern W16 Font_put_character( FONTSELECT fs, int x, int y, W16 num ); - -extern void Font_put_paragraph( FONTSELECT fs, short x, short y, - const char *string, - int space_between_lines, - int line_width_in_pixel ); - -extern void Font_GetMsgDimensions( FONTSELECT fs, const char *string, int *w, int *h ); - -#endif /* __FONT_MANAGER_H__ */ diff --git a/wolf3d/newCode/env/glob.c b/wolf3d/newCode/env/glob.c deleted file mode 100644 index 02a68e1..0000000 --- a/wolf3d/newCode/env/glob.c +++ /dev/null @@ -1,207 +0,0 @@ -/* - - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -#include "../wolfiphone.h" - -/* Like glob_match, but match PATTERN against any final segment of TEXT. */ -static int glob_match_after_star( char *pattern, char *text ) -{ - register char *p = pattern, *t = text; - register char c, c1; - - while( (c = *p++) == '?' || c == '*' ) - { - if( c == '?' && *t++ == '\0' ) - { - return 0; - } - } - - if( c == '\0' ) - { - return 1; - } - - if( c == '\\' ) - { - c1 = *p; - } - else - { - c1 = c; - } - - while( 1 ) - { - if( (c == '[' || *t == c1) && glob_match( p - 1, t ) ) - { - return 1; - } - - if( *t++ == '\0' ) - { - return 0; - } - } -} - -/* Return nonzero if PATTERN has any special globbing chars in it. */ -static int glob_pattern_p( char *pattern ) -{ - register char *p = pattern; - register char c; - int open = 0; - - while( (c = *p++) != '\0' ) - { - switch( c ) - { - case '?': - case '*': - return 1; - - case '[': /* Only accept an open brace if there is a close */ - open++; /* brace to match it. Bracket expressions must be */ - continue; /* complete, according to Posix.2 */ - case ']': - if( open ) - { - return 1; - } - continue; - - case '\\': - if( *p++ == '\0' ) - { - return 0; - } - } - - } - - return 0; -} - -/* Match the pattern PATTERN against the string TEXT; - return 1 if it matches, 0 otherwise. - - A match means the entire string TEXT is used up in matching. - - In the pattern string, `*' matches any sequence of characters, - `?' matches any character, [SET] matches any character in the specified set, - [!SET] matches any character not in the specified set. - - A set is composed of characters or ranges; a range looks like - character hyphen character (as in 0-9 or A-Z). - [0-9a-zA-Z_] is the set of characters allowed in C identifiers. - Any other character in the pattern must be matched exactly. - - To suppress the special syntactic significance of any of `[]*?!-\', - and match the character exactly, precede it with a `\'. -*/ - -int glob_match(char *pattern, char *text) -{ - register char *p = pattern, *t = text; - register char c; - - while ((c = *p++) != '\0') - switch (c) { - case '?': - if (*t == '\0') - return 0; - else - ++t; - break; - - case '\\': - if (*p++ != *t++) - return 0; - break; - - case '*': - return glob_match_after_star(p, t); - - case '[': - { - register char c1 = *t++; - int invert; - - if (!c1) - return (0); - - invert = ((*p == '!') || (*p == '^')); - if (invert) - p++; - - c = *p++; - while (1) { - register char cstart = c, cend = c; - - if (c == '\\') { - cstart = *p++; - cend = cstart; - } - if (c == '\0') - return 0; - - c = *p++; - if (c == '-' && *p != ']') { - cend = *p++; - if (cend == '\\') - cend = *p++; - if (cend == '\0') - return 0; - c = *p++; - } - if (c1 >= cstart && c1 <= cend) - goto match; - if (c == ']') - break; - } - if (!invert) - return 0; - break; - - match: - /* Skip the rest of the [...] construct that already matched. */ - while (c != ']') { - if (c == '\0') - return 0; - c = *p++; - if (c == '\0') - return 0; - else if (c == '\\') - ++p; - } - if (invert) - return 0; - break; - } - - default: - if (c != *t++) - return 0; - } - - return *t == '\0'; -} - diff --git a/wolf3d/newCode/env/glob.h b/wolf3d/newCode/env/glob.h deleted file mode 100644 index 81f2c44..0000000 --- a/wolf3d/newCode/env/glob.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -extern int glob_match( char *pattern, char *text ); diff --git a/wolf3d/newCode/env/math.c b/wolf3d/newCode/env/math.c deleted file mode 100644 index af0a7fb..0000000 --- a/wolf3d/newCode/env/math.c +++ /dev/null @@ -1,224 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * math.c: Math routines. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#include "../wolfiphone.h" - - - - - - -//////////////////////////// -// -// Square Root -// -//////////////////////////// - -/* ------------------------------------------------------------------------------ - Function: _sqrtf -Calculates the square root. - - Parameters: x -[in] Nonnegative floating-point value - - Returns: The square-root of x. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC float _sqrtf( float x ) -{ - return (float)sqrt( x ); -} - - -/* ------------------------------------------------------------------------------ - Function: _3DNow_Sqrt -Calculates the square root. - - Parameters: x -[in] Nonnegative floating-point value - - Returns: The square-root of x. - - Notes: 15-Bit Precision ------------------------------------------------------------------------------ -*/ -#if __i386__ - -PUBLIC float _3DNow_Sqrt( float x ) -{ - float root = 0.f; - -#if( _MSC_VER || __WATCOMC__ ) - - __asm - { - femms - movd mm0, x - pfrsqrt mm1, mm0 - punpckldq mm0, mm0 - pfmul mm0, mm1 - movd root, mm0 - femms - } - -#endif - - return root; -} - -/* ------------------------------------------------------------------------------ - Function: _SSE_Sqrt -Calculates the square root. - - Parameters: x -[in] Nonnegative floating-point value - - Returns: The square-root of x. - - Notes: ------------------------------------------------------------------------------ -*/ -float _SSE_Sqrt( float x ) -{ - float root = 0.f; - -#if( _MSC_VER || __WATCOMC__ ) - - __asm - { - sqrtss xmm0, x - movss root, xmm0 - } - - -#endif - - return root; -} - -#endif /* __i386__ */ - -//////////////////////////// -// -// End Square Root -// -//////////////////////////// - - -float (*pfSqrt)( float x ) = _sqrtf; - - - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC int my_log2( int val ) -{ - int answer = 0; - while( ( val >>= 1 ) != 0 ) - { - answer++; - } - return answer; -} - -/* ------------------------------------------------------------------------------ - Function: CalcFov -Calculate the field of view. - - Parameters:fov_x -[in] Must be within 1 and 179 degrees. - width -[in] Width of viewing area. - height -[in] Height of viewing area. - - Returns: The field of view in degrees. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC float CalcFov( float fov_x, float width, float height ) -{ - if( fov_x < 1 || fov_x > 179 ) - { - Com_Error( ERR_DROP, "Bad fov: %f", fov_x ); - } - - return (float)RAD2DEG( atan( height / ( width / tan( fov_x / 360 * M_PI ) ) ) ) * 2; -} - -/* ------------------------------------------------------------------------------ - Function: MathLib_Init -Initialize optimized math routines. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void MathLib_Init( void ) -{ - Com_Printf( "Initializing Math Module\n" ); - -#if 0//__i386__ - - if( main_cpu_s.b3DNow ) - { -// pfSqrt = _3DNow_Sqrt; - - Com_Printf( "...using 3DNow!\n" ); - } - - if( main_cpu_s.bSSE ) - { -// pfSqrt = _SSE_Sqrt; - - Com_Printf( "...using SSE\n" ); - } - -#endif -} - - - - diff --git a/wolf3d/newCode/env/matrix.c b/wolf3d/newCode/env/matrix.c deleted file mode 100644 index 8f8e47c..0000000 --- a/wolf3d/newCode/env/matrix.c +++ /dev/null @@ -1,158 +0,0 @@ -/* - - Copyright (C) 2005 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * matrix.c: Matrix math routines. - * - * Author: Michael Liebscher - * - */ - - -#include "../wolfiphone.h" - -/* ------------------------------------------------------------------------------ - Function: Matrix3x3Multiply -Computes the product of two 3x3 matrices. - - Parameters: in1, in2 -[in] 3x3 matrices. - out -[out] result. - - Returns: Nothing - - Notes: - Product of two 3x3 matrices - ( a b c ) ( r u x ) ( ar + bs + ct au + bv + cw ax + by + cz ) - ( d e f ) ( s v y ) = ( dr + es + ft du + ev + fw dx + ey + fz ) - ( h i j ) ( t w z ) ( hr + hs + ht iu + iv + iw jx + jy + jz ) ------------------------------------------------------------------------------ -*/ -PUBLIC void Matrix3x3Multiply( mat3_t in1, mat3_t in2, mat3_t out ) -{ - out[0] = in1[0] * in2[0] + in1[1] * in2[3] + in1[2] * in2[6]; - out[1] = in1[0] * in2[1] + in1[1] * in2[4] + in1[2] * in2[7]; - out[2] = in1[0] * in2[2] + in1[1] * in2[5] + in1[2] * in2[8]; - - out[3] = in1[3] * in2[0] + in1[4] * in2[3] + in1[5] * in2[6]; - out[4] = in1[3] * in2[1] + in1[4] * in2[4] + in1[5] * in2[7]; - out[5] = in1[3] * in2[2] + in1[4] * in2[5] + in1[5] * in2[8]; - - out[6] = in1[6] * in2[0] + in1[7] * in2[3] + in1[8] * in2[6]; - out[7] = in1[6] * in2[1] + in1[7] * in2[4] + in1[8] * in2[7]; - out[8] = in1[6] * in2[2] + in1[7] * in2[5] + in1[8] * in2[8]; -} - -/* ------------------------------------------------------------------------------ - Function: MatrixIdentity -Set matrix to the identity matrix (unit matrix). - - Parameters: matrix -[in/out] 4x4 matrix. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void MatrixIdentity( mat4_t matrix ) -{ - matrix[ 0] = 1.0; matrix[ 1] = 0.0; matrix[ 2] = 0.0; matrix[ 3] = 0.0; - matrix[ 4] = 0.0; matrix[ 5] = 1.0; matrix[ 6] = 0.0; matrix[ 7] = 0.0; - matrix[ 8] = 0.0; matrix[ 9] = 0.0; matrix[10] = 1.0; matrix[11] = 0.0; - matrix[12] = 0.0; matrix[13] = 0.0; matrix[14] = 0.0; matrix[15] = 1.0; -} - -/* ------------------------------------------------------------------------------ - Function: MatrixInvert -Invert a matrix. - - Parameters: - in -[in] Input matrix - out -[out] Output matrix. - - - Returns: Nothing. - - Notes: Matrix MUST be orthonormal - ------------------------------------------------------------------------------ -*/ -PUBLIC void MatrixInvert( mat4_t in, mat4_t out ) -{ - // Transpose rotation - out[ 0] = in[ 0]; out[ 1] = in[ 4]; out[ 2] = in[ 8]; - out[ 4] = in[ 1]; out[ 5] = in[ 5]; out[ 6] = in[ 9]; - out[ 8] = in[ 2]; out[ 9] = in[ 6]; out[10] = in[10]; - - // Clear shearing terms - out[3] = 0.0f; out[7] = 0.0f; out[11] = 0.0f; out[15] = 1.0f; - - // Translation is minus the dot of translation and rotations - out[12] = -(in[12] * in[ 0]) - (in[13] * in[ 1]) - (in[14] * in[ 2]); - out[13] = -(in[12] * in[ 4]) - (in[13] * in[ 5]) - (in[14] * in[ 6]); - out[14] = -(in[12] * in[ 8]) - (in[13] * in[ 9]) - (in[14] * in[10]); -} - -/* ------------------------------------------------------------------------------ - Function: VectorMatrixMultiply -Multiply a vector by a matrix. - - Parameters: - vecIn -[in] Input vector. - m -[in] Input matrix. - vecOut -[out] Output vector. - - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void VectorMatrixMultiply( vec3_t vecIn, mat4_t m, vec3_t vecOut ) -{ - vecOut[0] = (vecIn[0] * m[ 0]) + (vecIn[1] * m[ 4]) + (vecIn[2] * m[ 8]) + m[12]; - vecOut[1] = (vecIn[0] * m[ 1]) + (vecIn[1] * m[ 5]) + (vecIn[2] * m[ 9]) + m[13]; - vecOut[2] = (vecIn[0] * m[ 2]) + (vecIn[1] * m[ 6]) + (vecIn[2] * m[10]) + m[14]; -} - -/* ------------------------------------------------------------------------------ - Function: VectorMatrix3x3Multiply -Multiply a vector by just the 3x3 portion - of a matrix. - - Parameters: - in -[in] Input vector. - m -[in] Input matrix. - out -[out] Output vector. - - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void VectorMatrix3x3Multiply( vec3_t in, mat4_t m, vec3_t out ) -{ - out[0] = (in[0] * m[ 0]) + (in[1] * m[ 4]) + (in[2] * m[ 8]); - out[1] = (in[0] * m[ 1]) + (in[1] * m[ 5]) + (in[2] * m[ 9]); - out[2] = (in[0] * m[ 2]) + (in[1] * m[ 6]) + (in[2] * m[10]); -} - diff --git a/wolf3d/newCode/env/matrix.h b/wolf3d/newCode/env/matrix.h deleted file mode 100644 index 8245b25..0000000 --- a/wolf3d/newCode/env/matrix.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - - Copyright (C) 2005 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * matrix.h: Matrix math routines. - * - * Author: Michael Liebscher - * - */ - -#ifndef __MATRIX_H__ -#define __MATRIX_H__ - -#include "vector.h" - -typedef float mat3_t[ 9 ]; // 3x3 matrix -typedef float mat4_t[ 16 ]; // 4x4 matrix - -extern void Matrix3x3Multiply( mat3_t in1, mat3_t in2, mat3_t out ) ; -extern void MatrixIdentity( mat4_t matrix ); -extern void MatrixInvert( mat4_t in, mat4_t out ); -extern void VectorMatrixMultiply( vec3_t vecIn, mat4_t m, vec3_t vecOut ); -extern void VectorMatrix3x3Multiply( vec3_t vecIn, mat4_t m, vec3_t vecOut ); - - -#endif /* __MATRIX_H__ */ diff --git a/wolf3d/newCode/env/memory.c b/wolf3d/newCode/env/memory.c deleted file mode 100644 index b8af11a..0000000 --- a/wolf3d/newCode/env/memory.c +++ /dev/null @@ -1,193 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * memory.c: Memory allocation module. - * - * Author: Michael Liebscher - * - */ - -#include "../wolfiphone.h" - - - -#ifndef DEBUG_MEMORY - - #define DEBUG_MEMORY 0 - -#endif - - -/* ------------------------------------------------------------------------------ - Function: Memory_malloc -Allocates memory blocks. - - Parameters: size -[in] Bytes to allocate. - - Returns: - Void pointer to the allocated space on success, or NULL if - there is insufficient memory available. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void *Memory_malloc( size_t size ) -{ - void *ptr; - ptr = malloc( size ); - - if( ptr != NULL ) - { - -#if DEBUG_MEMORY - - Com_DPrintf( "[Memory_malloc]: %p size:%ld\n", ptr, size ); - -#endif - - return ptr; - } - - - Com_DPrintf( "[Memory_malloc]: Could not allocate %d bytes\n", size ); - - return NULL; -} - - -/* ------------------------------------------------------------------------------ - Function: Memory_calloc -Allocates an array in memory with elements - initialized to 0. - - Parameters: - num -[in] Number of elements. - size -[in] Bytes to allocate. - - Returns: - Void pointer to the allocated space on success, or NULL if - there is insufficient memory available. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void *Memory_calloc( size_t num, size_t size ) -{ - void *ptr; - ptr = calloc( num, size ); - - if( ptr != NULL ) - { - -#if DEBUG_MEMORY - - Com_DPrintf( "[Memory_calloc]: %p size:%ld num:%ld\n", ptr, size, num ); - -#endif - - return ptr; - } - - Com_DPrintf( "[Memory_calloc]: Could not allocate %d objects of size %d\n", num, size ); - - return NULL; -} - -/* ------------------------------------------------------------------------------ - Function: Memory_realloc -Reallocate memory blocks. - - Parameters: - memblock -[in] Pointer to previously allocated memory block. - size -[in] Bytes to allocate. - - Returns: - A void pointer to the reallocated (and possibly moved) memory - block. The return value is NULL if the size is zero and the - buffer argument is not NULL, or if there is not enough - available memory to expand the block to the given size. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void *Memory_realloc( void *memblock, size_t size ) -{ - void *ptr; - - ptr = realloc( memblock, size ); - - if( ptr != NULL ) - { - -#if DEBUG_MEMORY - - Com_DPrintf( "[Memory_realloc]: %p size:%ld\n", ptr, size ); - -#endif - - return ptr; - } - - Com_DPrintf( "[Memory_realloc]: Could not reallocate %d bytes\n", size ); - - return NULL; -} - - -/* ------------------------------------------------------------------------------ - Function: Memory_free -Deallocates or frees a memory block. - - Parameters: - memblock -[in] Previously allocated memory block to be freed. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Memory_free( void *memblock ) -{ - if( memblock ) - { - -#if DEBUG_MEMORY - - Com_DPrintf( "[Memory_free]: %p\n", memblock ); - -#endif - - free( memblock ); - } -} - - -PUBLIC void Memory_outofmem( const char *name, const char *file, W32 line ) -{ - - Com_Error( ERR_FATAL, "%s:%ld failed allocation for \"%s\"\n", - file, line, name ); - -} diff --git a/wolf3d/newCode/env/memory.h b/wolf3d/newCode/env/memory.h deleted file mode 100644 index 861c8e1..0000000 --- a/wolf3d/newCode/env/memory.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * memory.h: Memory allocation manager. - * - * Author: Michael Liebscher - * - */ - -/* - Notes: - This module is implemented by memory.c. - -*/ - -#ifndef __MEMORY_H__ -#define __MEMORY_H__ - - -// Use the macros -extern void *Memory_malloc( size_t size ); -extern void *Memory_calloc( size_t num, size_t size ); -extern void *Memory_realloc( void *memblock, size_t size ); -extern void Memory_free( void *memblock ); - -extern void Memory_outofmem( const char *name, const char *file, W32 line ); - -#define MM_MALLOC( size ) Memory_malloc( (size) ) -#define MM_CALLOC( num, size ) Memory_calloc( (num), (size) ) -#define MM_REALLOC( memblock, size ) Memory_realloc( (memblock), (size) ) - -#define MM_FREE( memblock ) { Memory_free( (memblock) ); ((memblock)) = NULL; } - -#define MM_OUTOFMEM( name ) Memory_outofmem( (name), __FILE__, __LINE__ ) - - - - -#endif /* __MEMORY_H__ */ diff --git a/wolf3d/newCode/env/mymath.h b/wolf3d/newCode/env/mymath.h deleted file mode 100644 index 42507b4..0000000 --- a/wolf3d/newCode/env/mymath.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * mymath.h: Math routines. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * Portion of this code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#ifndef __MYMATH_H__ -#define __MYMATH_H__ - - - -typedef int fixed4_t; -typedef int fixed8_t; -typedef int fixed16_t; - - -#define PITCH 0 /* up / down */ -#define YAW 1 /* left / right */ -#define ROLL 2 /* fall over */ - - -#ifndef M_PI - - #define M_PI 3.14159265358979323846f // matches value in gcc v2 math.h - -#endif - - - -#ifndef ABS - - #define ABS( x ) ( (x) < 0 ? -(x) : (x) ) - -#endif - - - -#define nanmask ( 255 << 23 ) - -#define IS_NAN( x ) ( ( (*(int *) &x ) & nanmask ) == nanmask ) - - - -/* Use RINT() instead of rint() */ -#ifdef __GNUC__ - - #define RINT( x ) rint( x ) - -#else - - #define RINT( x ) floor( (x) + 0.5 ) - -#endif - - - - -extern void MathLib_Init( void ); - -extern int my_log2( int val ); - -extern float (*pfSqrt)( float x ); - -extern float CalcFov( float fov_x, float width, float height ); - - - -#endif /* __MYMATH_H__ */ - diff --git a/wolf3d/newCode/env/myopengl.h b/wolf3d/newCode/env/myopengl.h deleted file mode 100644 index 83a9304..0000000 --- a/wolf3d/newCode/env/myopengl.h +++ /dev/null @@ -1,872 +0,0 @@ -/* - - Copyright (C) 2005 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * MyOpenGL.h: OpenGL Interface - * - * Author: Michael Liebscher - * - */ - -/* - Notes: - - This module is implemented by opengl_win.c. - -*/ - -#ifndef __MYOPENGL_H__ -#define __MYOPENGL_H__ - -#ifdef _WIN32 - - #define WIN32_LEAN_AND_MEAN 1 - #include - -#endif - -#ifdef IPHONE -#include -#include -#else -#include -#endif - - -#ifdef __unix__ - - #include - -#endif - - -extern int OpenGL_Init( const char *dllname ); -extern void OpenGL_Shutdown( void ); - - - -#ifndef APIENTRY - - #define APIENTRY - -#endif - -#ifndef APIENTRYP - - #define APIENTRYP APIENTRY * - -#endif - - -typedef GLvoid ( APIENTRYP GLACCUM )(GLenum op, GLfloat value); -typedef GLvoid ( APIENTRYP GLALPHAFUNC )(GLenum func, GLclampf ref); -typedef GLboolean ( APIENTRYP GLARETEXTURESRESIDENT )(GLsizei n, const GLuint *textures, GLboolean *residences); -typedef GLvoid ( APIENTRYP GLARRAYELEMENT )(GLint i); -typedef GLvoid ( APIENTRYP GLBEGIN )(GLenum mode); -typedef GLvoid ( APIENTRYP GLBINDTEXTURE )(GLenum target, GLuint texture); -typedef GLvoid ( APIENTRYP GLBITMAP )(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap); -typedef GLvoid ( APIENTRYP GLBLENDFUNC )(GLenum sfactor, GLenum dfactor); -typedef GLvoid ( APIENTRYP GLCALLLIST )(GLuint list); -typedef GLvoid ( APIENTRYP GLCALLLISTS )(GLsizei n, GLenum type, const GLvoid *lists); -typedef GLvoid ( APIENTRYP GLCLEAR )(GLbitfield mask); -typedef GLvoid ( APIENTRYP GLCLEARACCUM )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -typedef GLvoid ( APIENTRYP GLCLEARCOLOR )(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -typedef GLvoid ( APIENTRYP GLCLEARDEPTH )(GLclampd depth); -typedef GLvoid ( APIENTRYP GLCLEARINDEX )(GLfloat c); -typedef GLvoid ( APIENTRYP GLCLEARSTENCIL )(GLint s); -typedef GLvoid ( APIENTRYP GLCLIPPLANE )(GLenum plane, const GLdouble *equation); -typedef GLvoid ( APIENTRYP GLCOLOR3B )(GLbyte red, GLbyte green, GLbyte blue); -typedef GLvoid ( APIENTRYP GLCOLOR3BV )(const GLbyte *v); -typedef GLvoid ( APIENTRYP GLCOLOR3D )(GLdouble red, GLdouble green, GLdouble blue); -typedef GLvoid ( APIENTRYP GLCOLOR3DV )(const GLdouble *v); -typedef GLvoid ( APIENTRYP GLCOLOR3F )(GLfloat red, GLfloat green, GLfloat blue); -typedef GLvoid ( APIENTRYP GLCOLOR3FV )(const GLfloat *v); -typedef GLvoid ( APIENTRYP GLCOLOR3I )(GLint red, GLint green, GLint blue); -typedef GLvoid ( APIENTRYP GLCOLOR3IV )(const GLint *v); -typedef GLvoid ( APIENTRYP GLCOLOR3S )(GLshort red, GLshort green, GLshort blue); -typedef GLvoid ( APIENTRYP GLCOLOR3SV )(const GLshort *v); -typedef GLvoid ( APIENTRYP GLCOLOR3UB )(GLubyte red, GLubyte green, GLubyte blue); -typedef GLvoid ( APIENTRYP GLCOLOR3UBV )(const GLubyte *v); -typedef GLvoid ( APIENTRYP GLCOLOR3UI )(GLuint red, GLuint green, GLuint blue); -typedef GLvoid ( APIENTRYP GLCOLOR3UIV )(const GLuint *v); -typedef GLvoid ( APIENTRYP GLCOLOR3US )(GLushort red, GLushort green, GLushort blue); -typedef GLvoid ( APIENTRYP GLCOLOR3USV )(const GLushort *v); -typedef GLvoid ( APIENTRYP GLCOLOR4B )(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); -typedef GLvoid ( APIENTRYP GLCOLOR4BV )(const GLbyte *v); -typedef GLvoid ( APIENTRYP GLCOLOR4D )(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); -typedef GLvoid ( APIENTRYP GLCOLOR4DV )(const GLdouble *v); -typedef GLvoid ( APIENTRYP GLCOLOR4F )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -typedef GLvoid ( APIENTRYP GLCOLOR4FV )(const GLfloat *v); -typedef GLvoid ( APIENTRYP GLCOLOR4I )(GLint red, GLint green, GLint blue, GLint alpha); -typedef GLvoid ( APIENTRYP GLCOLOR4IV )(const GLint *v); -typedef GLvoid ( APIENTRYP GLCOLOR4S )(GLshort red, GLshort green, GLshort blue, GLshort alpha); -typedef GLvoid ( APIENTRYP GLCOLOR4SV )(const GLshort *v); -typedef GLvoid ( APIENTRYP GLCOLOR4UB )(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); -typedef GLvoid ( APIENTRYP GLCOLOR4UBV )(const GLubyte *v); -typedef GLvoid ( APIENTRYP GLCOLOR4UI )(GLuint red, GLuint green, GLuint blue, GLuint alpha); -typedef GLvoid ( APIENTRYP GLCOLOR4UIV )(const GLuint *v); -typedef GLvoid ( APIENTRYP GLCOLOR4US )(GLushort red, GLushort green, GLushort blue, GLushort alpha); -typedef GLvoid ( APIENTRYP GLCOLOR4USV )(const GLushort *v); -typedef GLvoid ( APIENTRYP GLCOLORMASK )(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -typedef GLvoid ( APIENTRYP GLCOLORMATERIAL )(GLenum face, GLenum mode); -typedef GLvoid ( APIENTRYP GLCOLORPOINTER )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef GLvoid ( APIENTRYP GLCOPYPIXELS )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); -typedef GLvoid ( APIENTRYP GLCOPYTEXIMAGE1D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border); -typedef GLvoid ( APIENTRYP GLCOPYTEXIMAGE2D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef GLvoid ( APIENTRYP GLCOPYTEXSUBIMAGE1D )(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef GLvoid ( APIENTRYP GLCOPYTEXSUBIMAGE2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef GLvoid ( APIENTRYP GLCULLFACE )(GLenum mode); -typedef GLvoid ( APIENTRYP GLDELETELISTS )(GLuint list, GLsizei range); -typedef GLvoid ( APIENTRYP GLDELETETEXTURES )(GLsizei n, const GLuint *textures); -typedef GLvoid ( APIENTRYP GLDEPTHFUNC )(GLenum func); -typedef GLvoid ( APIENTRYP GLDEPTHMASK )(GLboolean flag); -typedef GLvoid ( APIENTRYP GLDEPTHRANGE )(GLclampd zNear, GLclampd zFar); -typedef GLvoid ( APIENTRYP GLDISABLE )(GLenum cap); -typedef GLvoid ( APIENTRYP GLDISABLECLIENTSTATE )(GLenum array); -typedef GLvoid ( APIENTRYP GLDRAWARRAYS )(GLenum mode, GLint first, GLsizei count); -typedef GLvoid ( APIENTRYP GLDRAWBUFFER )(GLenum mode); -typedef GLvoid ( APIENTRYP GLDRAWELEMENTS )(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); -typedef GLvoid ( APIENTRYP GLDRAWPIXELS )(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -typedef GLvoid ( APIENTRYP GLEDGEFLAG )(GLboolean flag); -typedef GLvoid ( APIENTRYP GLEDGEFLAGPOINTER )(GLsizei stride, const GLvoid *pointer); -typedef GLvoid ( APIENTRYP GLEDGEFLAGV )(const GLboolean *flag); -typedef GLvoid ( APIENTRYP GLENABLE )(GLenum cap); -typedef GLvoid ( APIENTRYP GLENABLECLIENTSTATE )(GLenum array); -typedef GLvoid ( APIENTRYP GLEND )(void); -typedef GLvoid ( APIENTRYP GLENDLIST )(void); -typedef GLvoid ( APIENTRYP GLEVALCOORD1D )(GLdouble u); -typedef GLvoid ( APIENTRYP GLEVALCOORD1DV )(const GLdouble *u); -typedef GLvoid ( APIENTRYP GLEVALCOORD1F )(GLfloat u); -typedef GLvoid ( APIENTRYP GLEVALCOORD1FV )(const GLfloat *u); -typedef GLvoid ( APIENTRYP GLEVALCOORD2D )(GLdouble u, GLdouble v); -typedef GLvoid ( APIENTRYP GLEVALCOORD2DV )(const GLdouble *u); -typedef GLvoid ( APIENTRYP GLEVALCOORD2F )(GLfloat u, GLfloat v); -typedef GLvoid ( APIENTRYP GLEVALCOORD2FV )(const GLfloat *u); -typedef GLvoid ( APIENTRYP GLEVALMESH1 )(GLenum mode, GLint i1, GLint i2); -typedef GLvoid ( APIENTRYP GLEVALMESH2 )(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); -typedef GLvoid ( APIENTRYP GLEVALPOINT1 )(GLint i); -typedef GLvoid ( APIENTRYP GLEVALPOINT2 )(GLint i, GLint j); -typedef GLvoid ( APIENTRYP GLFEEDBACKBUFFER )(GLsizei size, GLenum type, GLfloat *buffer); -typedef GLvoid ( APIENTRYP GLFINISH )(void); -typedef GLvoid ( APIENTRYP GLFLUSH )(void); -typedef GLvoid ( APIENTRYP GLFOGF )(GLenum pname, GLfloat param); -typedef GLvoid ( APIENTRYP GLFOGFV )(GLenum pname, const GLfloat *params); -typedef GLvoid ( APIENTRYP GLFOGI )(GLenum pname, GLint param); -typedef GLvoid ( APIENTRYP GLFOGIV )(GLenum pname, const GLint *params); -typedef GLvoid ( APIENTRYP GLFRONTFACE )(GLenum mode); -typedef GLvoid ( APIENTRYP GLFRUSTUM )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -typedef GLuint ( APIENTRYP GLGENLISTS )(GLsizei range); -typedef GLvoid ( APIENTRYP GLGENTEXTURES )(GLsizei n, GLuint *textures); -typedef GLvoid ( APIENTRYP GLGETBOOLEANV )(GLenum pname, GLboolean *params); -typedef GLvoid ( APIENTRYP GLGETCLIPPLANE )(GLenum plane, GLdouble *equation); -typedef GLvoid ( APIENTRYP GLGETDOUBLEV )(GLenum pname, GLdouble *params); -typedef GLenum ( APIENTRYP GLGETERROR )(void); -typedef GLvoid ( APIENTRYP GLGETFLOATV )(GLenum pname, GLfloat *params); -typedef GLvoid ( APIENTRYP GLGETINTEGERV )(GLenum pname, GLint *params); -typedef GLvoid ( APIENTRYP GLGETLIGHTFV )(GLenum light, GLenum pname, GLfloat *params); -typedef GLvoid ( APIENTRYP GLGETLIGHTIV )(GLenum light, GLenum pname, GLint *params); -typedef GLvoid ( APIENTRYP GLGETMAPDV )(GLenum target, GLenum query, GLdouble *v); -typedef GLvoid ( APIENTRYP GLGETMAPFV )(GLenum target, GLenum query, GLfloat *v); -typedef GLvoid ( APIENTRYP GLGETMAPIV )(GLenum target, GLenum query, GLint *v); -typedef GLvoid ( APIENTRYP GLGETMATERIALFV )(GLenum face, GLenum pname, GLfloat *params); -typedef GLvoid ( APIENTRYP GLGETMATERIALIV )(GLenum face, GLenum pname, GLint *params); -typedef GLvoid ( APIENTRYP GLGETPIXELMAPFV )(GLenum map, GLfloat *values); -typedef GLvoid ( APIENTRYP GLGETPIXELMAPUIV )(GLenum map, GLuint *values); -typedef GLvoid ( APIENTRYP GLGETPIXELMAPUSV )(GLenum map, GLushort *values); -typedef GLvoid ( APIENTRYP GLGETPOINTERV )(GLenum pname, GLvoid* *params); -typedef GLvoid ( APIENTRYP GLGETPOLYGONSTIPPLE )(GLubyte *mask); -typedef const GLubyte * ( APIENTRYP GLGETSTRING )(GLenum name); -typedef GLvoid ( APIENTRYP GLGETTEXENVFV )(GLenum target, GLenum pname, GLfloat *params); -typedef GLvoid ( APIENTRYP GLGETTEXENVIV )(GLenum target, GLenum pname, GLint *params); -typedef GLvoid ( APIENTRYP GLGETTEXGENDV )(GLenum coord, GLenum pname, GLdouble *params); -typedef GLvoid ( APIENTRYP GLGETTEXGENFV )(GLenum coord, GLenum pname, GLfloat *params); -typedef GLvoid ( APIENTRYP GLGETTEXGENIV )(GLenum coord, GLenum pname, GLint *params); -typedef GLvoid ( APIENTRYP GLGETTEXIMAGE )(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -typedef GLvoid ( APIENTRYP GLGETTEXPARAMETERFV )(GLenum target, GLenum pname, GLfloat *params); -typedef GLvoid ( APIENTRYP GLGETTEXPARAMETERIV )(GLenum target, GLenum pname, GLint *params); -typedef GLvoid ( APIENTRYP GLHINT )(GLenum target, GLenum mode); -typedef GLvoid ( APIENTRYP GLINDEXMASK )(GLuint mask); -typedef GLvoid ( APIENTRYP GLINDEXPOINTER )(GLenum type, GLsizei stride, const GLvoid *pointer); -typedef GLvoid ( APIENTRYP GLINDEXD )(GLdouble c); -typedef GLvoid ( APIENTRYP GLINDEXDV )(const GLdouble *c); -typedef GLvoid ( APIENTRYP GLINDEXF )(GLfloat c); -typedef GLvoid ( APIENTRYP GLINDEXFV )(const GLfloat *c); -typedef GLvoid ( APIENTRYP GLINDEXI )(GLint c); -typedef GLvoid ( APIENTRYP GLINDEXIV )(const GLint *c); -typedef GLvoid ( APIENTRYP GLINDEXS )(GLshort c); -typedef GLvoid ( APIENTRYP GLINDEXSV )(const GLshort *c); -typedef GLvoid ( APIENTRYP GLINDEXUB )(GLubyte c); -typedef GLvoid ( APIENTRYP GLINDEXUBV )(const GLubyte *c); -typedef GLvoid ( APIENTRYP GLINITNAMES )(void); -typedef GLvoid ( APIENTRYP GLINTERLEAVEDARRAYS )(GLenum format, GLsizei stride, const GLvoid *pointer); -typedef GLboolean ( APIENTRYP GLISENABLED )(GLenum cap); -typedef GLboolean ( APIENTRYP GLISLIST )(GLuint list); -typedef GLboolean ( APIENTRYP GLISTEXTURE )(GLuint texture); -typedef GLvoid ( APIENTRYP GLLIGHTMODELF )(GLenum pname, GLfloat param); -typedef GLvoid ( APIENTRYP GLLIGHTMODELFV )(GLenum pname, const GLfloat *params); -typedef GLvoid ( APIENTRYP GLLIGHTMODELI )(GLenum pname, GLint param); -typedef GLvoid ( APIENTRYP GLLIGHTMODELIV )(GLenum pname, const GLint *params); -typedef GLvoid ( APIENTRYP GLLIGHTF )(GLenum light, GLenum pname, GLfloat param); -typedef GLvoid ( APIENTRYP GLLIGHTFV )(GLenum light, GLenum pname, const GLfloat *params); -typedef GLvoid ( APIENTRYP GLLIGHTI )(GLenum light, GLenum pname, GLint param); -typedef GLvoid ( APIENTRYP GLLIGHTIV )(GLenum light, GLenum pname, const GLint *params); -typedef GLvoid ( APIENTRYP GLLINESTIPPLE )(GLint factor, GLushort pattern); -typedef GLvoid ( APIENTRYP GLLINEWIDTH )(GLfloat width); -typedef GLvoid ( APIENTRYP GLLISTBASE )(GLuint base); -typedef GLvoid ( APIENTRYP GLLOADIDENTITY )(void); -typedef GLvoid ( APIENTRYP GLLOADMATRIXD )(const GLdouble *m); -typedef GLvoid ( APIENTRYP GLLOADMATRIXF )(const GLfloat *m); -typedef GLvoid ( APIENTRYP GLLOADNAME )(GLuint name); -typedef GLvoid ( APIENTRYP GLLOGICOP )(GLenum opcode); -typedef GLvoid ( APIENTRYP GLMAP1D )(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); -typedef GLvoid ( APIENTRYP GLMAP1F )(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); -typedef GLvoid ( APIENTRYP GLMAP2D )(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); -typedef GLvoid ( APIENTRYP GLMAP2F )(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); -typedef GLvoid ( APIENTRYP GLMAPGRID1D )(GLint un, GLdouble u1, GLdouble u2); -typedef GLvoid ( APIENTRYP GLMAPGRID1F )(GLint un, GLfloat u1, GLfloat u2); -typedef GLvoid ( APIENTRYP GLMAPGRID2D )(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); -typedef GLvoid ( APIENTRYP GLMAPGRID2F )(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); -typedef GLvoid ( APIENTRYP GLMATERIALF )(GLenum face, GLenum pname, GLfloat param); -typedef GLvoid ( APIENTRYP GLMATERIALFV )(GLenum face, GLenum pname, const GLfloat *params); -typedef GLvoid ( APIENTRYP GLMATERIALI )(GLenum face, GLenum pname, GLint param); -typedef GLvoid ( APIENTRYP GLMATERIALIV )(GLenum face, GLenum pname, const GLint *params); -typedef GLvoid ( APIENTRYP GLMATRIXMODE )(GLenum mode); -typedef GLvoid ( APIENTRYP GLMULTMATRIXD )(const GLdouble *m); -typedef GLvoid ( APIENTRYP GLMULTMATRIXF )(const GLfloat *m); -typedef GLvoid ( APIENTRYP GLNEWLIST )(GLuint list, GLenum mode); -typedef GLvoid ( APIENTRYP GLNORMAL3B )(GLbyte nx, GLbyte ny, GLbyte nz); -typedef GLvoid ( APIENTRYP GLNORMAL3BV )(const GLbyte *v); -typedef GLvoid ( APIENTRYP GLNORMAL3D )(GLdouble nx, GLdouble ny, GLdouble nz); -typedef GLvoid ( APIENTRYP GLNORMAL3DV )(const GLdouble *v); -typedef GLvoid ( APIENTRYP GLNORMAL3F )(GLfloat nx, GLfloat ny, GLfloat nz); -typedef GLvoid ( APIENTRYP GLNORMAL3FV )(const GLfloat *v); -typedef GLvoid ( APIENTRYP GLNORMAL3I )(GLint nx, GLint ny, GLint nz); -typedef GLvoid ( APIENTRYP GLNORMAL3IV )(const GLint *v); -typedef GLvoid ( APIENTRYP GLNORMAL3S )(GLshort nx, GLshort ny, GLshort nz); -typedef GLvoid ( APIENTRYP GLNORMAL3SV )(const GLshort *v); -typedef GLvoid ( APIENTRYP GLNORMALPOINTER )(GLenum type, GLsizei stride, const GLvoid *pointer); -typedef GLvoid ( APIENTRYP GLORTHO )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -typedef GLvoid ( APIENTRYP GLPASSTHROUGH )(GLfloat token); -typedef GLvoid ( APIENTRYP GLPIXELMAPFV )(GLenum map, GLsizei mapsize, const GLfloat *values); -typedef GLvoid ( APIENTRYP GLPIXELMAPUIV )(GLenum map, GLsizei mapsize, const GLuint *values); -typedef GLvoid ( APIENTRYP GLPIXELMAPUSV )(GLenum map, GLsizei mapsize, const GLushort *values); -typedef GLvoid ( APIENTRYP GLPIXELSTOREF )(GLenum pname, GLfloat param); -typedef GLvoid ( APIENTRYP GLPIXELSTOREI )(GLenum pname, GLint param); -typedef GLvoid ( APIENTRYP GLPIXELTRANSFERF )(GLenum pname, GLfloat param); -typedef GLvoid ( APIENTRYP GLPIXELTRANSFERI )(GLenum pname, GLint param); -typedef GLvoid ( APIENTRYP GLPIXELZOOM )(GLfloat xfactor, GLfloat yfactor); -typedef GLvoid ( APIENTRYP GLPOINTSIZE )(GLfloat size); -typedef GLvoid ( APIENTRYP GLPOLYGONMODE )(GLenum face, GLenum mode); -typedef GLvoid ( APIENTRYP GLPOLYGONOFFSET )(GLfloat factor, GLfloat units); -typedef GLvoid ( APIENTRYP GLPOLYGONSTIPPLE )(const GLubyte *mask); -typedef GLvoid ( APIENTRYP GLPOPATTRIB )(void); -typedef GLvoid ( APIENTRYP GLPOPCLIENTATTRIB )(void); -typedef GLvoid ( APIENTRYP GLPOPMATRIX )(void); -typedef GLvoid ( APIENTRYP GLPOPNAME )(void); -typedef GLvoid ( APIENTRYP GLPRIORITIZETEXTURES )(GLsizei n, const GLuint *textures, const GLclampf *priorities); -typedef GLvoid ( APIENTRYP GLPUSHATTRIB )(GLbitfield mask); -typedef GLvoid ( APIENTRYP GLPUSHCLIENTATTRIB )(GLbitfield mask); -typedef GLvoid ( APIENTRYP GLPUSHMATRIX )(void); -typedef GLvoid ( APIENTRYP GLPUSHNAME )(GLuint name); -typedef GLvoid ( APIENTRYP GLRASTERPOS2D )(GLdouble x, GLdouble y); -typedef GLvoid ( APIENTRYP GLRASTERPOS2DV )(const GLdouble *v); -typedef GLvoid ( APIENTRYP GLRASTERPOS2F )(GLfloat x, GLfloat y); -typedef GLvoid ( APIENTRYP GLRASTERPOS2FV )(const GLfloat *v); -typedef GLvoid ( APIENTRYP GLRASTERPOS2I )(GLint x, GLint y); -typedef GLvoid ( APIENTRYP GLRASTERPOS2IV )(const GLint *v); -typedef GLvoid ( APIENTRYP GLRASTERPOS2S )(GLshort x, GLshort y); -typedef GLvoid ( APIENTRYP GLRASTERPOS2SV )(const GLshort *v); -typedef GLvoid ( APIENTRYP GLRASTERPOS3D )(GLdouble x, GLdouble y, GLdouble z); -typedef GLvoid ( APIENTRYP GLRASTERPOS3DV )(const GLdouble *v); -typedef GLvoid ( APIENTRYP GLRASTERPOS3F )(GLfloat x, GLfloat y, GLfloat z); -typedef GLvoid ( APIENTRYP GLRASTERPOS3FV )(const GLfloat *v); -typedef GLvoid ( APIENTRYP GLRASTERPOS3I )(GLint x, GLint y, GLint z); -typedef GLvoid ( APIENTRYP GLRASTERPOS3IV )(const GLint *v); -typedef GLvoid ( APIENTRYP GLRASTERPOS3S )(GLshort x, GLshort y, GLshort z); -typedef GLvoid ( APIENTRYP GLRASTERPOS3SV )(const GLshort *v); -typedef GLvoid ( APIENTRYP GLRASTERPOS4D )(GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef GLvoid ( APIENTRYP GLRASTERPOS4DV )(const GLdouble *v); -typedef GLvoid ( APIENTRYP GLRASTERPOS4F )(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef GLvoid ( APIENTRYP GLRASTERPOS4FV )(const GLfloat *v); -typedef GLvoid ( APIENTRYP GLRASTERPOS4I )(GLint x, GLint y, GLint z, GLint w); -typedef GLvoid ( APIENTRYP GLRASTERPOS4IV )(const GLint *v); -typedef GLvoid ( APIENTRYP GLRASTERPOS4S )(GLshort x, GLshort y, GLshort z, GLshort w); -typedef GLvoid ( APIENTRYP GLRASTERPOS4SV )(const GLshort *v); -typedef GLvoid ( APIENTRYP GLREADBUFFER )(GLenum mode); -typedef GLvoid ( APIENTRYP GLREADPIXELS )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); -typedef GLvoid ( APIENTRYP GLRECTD )(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); -typedef GLvoid ( APIENTRYP GLRECTDV )(const GLdouble *v1, const GLdouble *v2); -typedef GLvoid ( APIENTRYP GLRECTF )(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); -typedef GLvoid ( APIENTRYP GLRECTFV )(const GLfloat *v1, const GLfloat *v2); -typedef GLvoid ( APIENTRYP GLRECTI )(GLint x1, GLint y1, GLint x2, GLint y2); -typedef GLvoid ( APIENTRYP GLRECTIV )(const GLint *v1, const GLint *v2); -typedef GLvoid ( APIENTRYP GLRECTS )(GLshort x1, GLshort y1, GLshort x2, GLshort y2); -typedef GLvoid ( APIENTRYP GLRECTSV )(const GLshort *v1, const GLshort *v2); -typedef GLint ( APIENTRYP GLRENDERMODE )(GLenum mode); -typedef GLvoid ( APIENTRYP GLROTATED )(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -typedef GLvoid ( APIENTRYP GLROTATEF )(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -typedef GLvoid ( APIENTRYP GLSCALED )(GLdouble x, GLdouble y, GLdouble z); -typedef GLvoid ( APIENTRYP GLSCALEF )(GLfloat x, GLfloat y, GLfloat z); -typedef GLvoid ( APIENTRYP GLSCISSOR )(GLint x, GLint y, GLsizei width, GLsizei height); -typedef GLvoid ( APIENTRYP GLSELECTBUFFER )(GLsizei size, GLuint *buffer); -typedef GLvoid ( APIENTRYP GLSHADEMODEL )(GLenum mode); -typedef GLvoid ( APIENTRYP GLSTENCILFUNC )(GLenum func, GLint ref, GLuint mask); -typedef GLvoid ( APIENTRYP GLSTENCILMASK )(GLuint mask); -typedef GLvoid ( APIENTRYP GLSTENCILOP )(GLenum fail, GLenum zfail, GLenum zpass); -typedef GLvoid ( APIENTRYP GLTEXCOORD1D )(GLdouble s); -typedef GLvoid ( APIENTRYP GLTEXCOORD1DV )(const GLdouble *v); -typedef GLvoid ( APIENTRYP GLTEXCOORD1F )(GLfloat s); -typedef GLvoid ( APIENTRYP GLTEXCOORD1FV )(const GLfloat *v); -typedef GLvoid ( APIENTRYP GLTEXCOORD1I )(GLint s); -typedef GLvoid ( APIENTRYP GLTEXCOORD1IV )(const GLint *v); -typedef GLvoid ( APIENTRYP GLTEXCOORD1S )(GLshort s); -typedef GLvoid ( APIENTRYP GLTEXCOORD1SV )(const GLshort *v); -typedef GLvoid ( APIENTRYP GLTEXCOORD2D )(GLdouble s, GLdouble t); -typedef GLvoid ( APIENTRYP GLTEXCOORD2DV )(const GLdouble *v); -typedef GLvoid ( APIENTRYP GLTEXCOORD2F )(GLfloat s, GLfloat t); -typedef GLvoid ( APIENTRYP GLTEXCOORD2FV )(const GLfloat *v); -typedef GLvoid ( APIENTRYP GLTEXCOORD2I )(GLint s, GLint t); -typedef GLvoid ( APIENTRYP GLTEXCOORD2IV )(const GLint *v); -typedef GLvoid ( APIENTRYP GLTEXCOORD2S )(GLshort s, GLshort t); -typedef GLvoid ( APIENTRYP GLTEXCOORD2SV )(const GLshort *v); -typedef GLvoid ( APIENTRYP GLTEXCOORD3D )(GLdouble s, GLdouble t, GLdouble r); -typedef GLvoid ( APIENTRYP GLTEXCOORD3DV )(const GLdouble *v); -typedef GLvoid ( APIENTRYP GLTEXCOORD3F )(GLfloat s, GLfloat t, GLfloat r); -typedef GLvoid ( APIENTRYP GLTEXCOORD3FV )(const GLfloat *v); -typedef GLvoid ( APIENTRYP GLTEXCOORD3I )(GLint s, GLint t, GLint r); -typedef GLvoid ( APIENTRYP GLTEXCOORD3IV )(const GLint *v); -typedef GLvoid ( APIENTRYP GLTEXCOORD3S )(GLshort s, GLshort t, GLshort r); -typedef GLvoid ( APIENTRYP GLTEXCOORD3SV )(const GLshort *v); -typedef GLvoid ( APIENTRYP GLTEXCOORD4D )(GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef GLvoid ( APIENTRYP GLTEXCOORD4DV )(const GLdouble *v); -typedef GLvoid ( APIENTRYP GLTEXCOORD4F )(GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef GLvoid ( APIENTRYP GLTEXCOORD4FV )(const GLfloat *v); -typedef GLvoid ( APIENTRYP GLTEXCOORD4I )(GLint s, GLint t, GLint r, GLint q); -typedef GLvoid ( APIENTRYP GLTEXCOORD4IV )(const GLint *v); -typedef GLvoid ( APIENTRYP GLTEXCOORD4S )(GLshort s, GLshort t, GLshort r, GLshort q); -typedef GLvoid ( APIENTRYP GLTEXCOORD4SV )(const GLshort *v); -typedef GLvoid ( APIENTRYP GLTEXCOORDPOINTER )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef GLvoid ( APIENTRYP GLTEXENVF )(GLenum target, GLenum pname, GLfloat param); -typedef GLvoid ( APIENTRYP GLTEXENVFV )(GLenum target, GLenum pname, const GLfloat *params); -typedef GLvoid ( APIENTRYP GLTEXENVI )(GLenum target, GLenum pname, GLint param); -typedef GLvoid ( APIENTRYP GLTEXENVIV )(GLenum target, GLenum pname, const GLint *params); -typedef GLvoid ( APIENTRYP GLTEXGEND )(GLenum coord, GLenum pname, GLdouble param); -typedef GLvoid ( APIENTRYP GLTEXGENDV )(GLenum coord, GLenum pname, const GLdouble *params); -typedef GLvoid ( APIENTRYP GLTEXGENF )(GLenum coord, GLenum pname, GLfloat param); -typedef GLvoid ( APIENTRYP GLTEXGENFV )(GLenum coord, GLenum pname, const GLfloat *params); -typedef GLvoid ( APIENTRYP GLTEXGENI )(GLenum coord, GLenum pname, GLint param); -typedef GLvoid ( APIENTRYP GLTEXGENIV )(GLenum coord, GLenum pname, const GLint *params); -typedef GLvoid ( APIENTRYP GLTEXIMAGE1D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef GLvoid ( APIENTRYP GLTEXIMAGE2D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef GLvoid ( APIENTRYP GLTEXPARAMETERF )(GLenum target, GLenum pname, GLfloat param); -typedef GLvoid ( APIENTRYP GLTEXPARAMETERFV )(GLenum target, GLenum pname, const GLfloat *params); -typedef GLvoid ( APIENTRYP GLTEXPARAMETERI )(GLenum target, GLenum pname, GLint param); -typedef GLvoid ( APIENTRYP GLTEXPARAMETERIV )(GLenum target, GLenum pname, const GLint *params); -typedef GLvoid ( APIENTRYP GLTEXSUBIMAGE1D )(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -typedef GLvoid ( APIENTRYP GLTEXSUBIMAGE2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -typedef GLvoid ( APIENTRYP GLTRANSLATED )(GLdouble x, GLdouble y, GLdouble z); -typedef GLvoid ( APIENTRYP GLTRANSLATEF )(GLfloat x, GLfloat y, GLfloat z); -typedef GLvoid ( APIENTRYP GLVERTEX2D )(GLdouble x, GLdouble y); -typedef GLvoid ( APIENTRYP GLVERTEX2DV )(const GLdouble *v); -typedef GLvoid ( APIENTRYP GLVERTEX2F )(GLfloat x, GLfloat y); -typedef GLvoid ( APIENTRYP GLVERTEX2FV )(const GLfloat *v); -typedef GLvoid ( APIENTRYP GLVERTEX2I )(GLint x, GLint y); -typedef GLvoid ( APIENTRYP GLVERTEX2IV )(const GLint *v); -typedef GLvoid ( APIENTRYP GLVERTEX2S )(GLshort x, GLshort y); -typedef GLvoid ( APIENTRYP GLVERTEX2SV )(const GLshort *v); -typedef GLvoid ( APIENTRYP GLVERTEX3D )(GLdouble x, GLdouble y, GLdouble z); -typedef GLvoid ( APIENTRYP GLVERTEX3DV )(const GLdouble *v); -typedef GLvoid ( APIENTRYP GLVERTEX3F )(GLfloat x, GLfloat y, GLfloat z); -typedef GLvoid ( APIENTRYP GLVERTEX3FV )(const GLfloat *v); -typedef GLvoid ( APIENTRYP GLVERTEX3I )(GLint x, GLint y, GLint z); -typedef GLvoid ( APIENTRYP GLVERTEX3IV )(const GLint *v); -typedef GLvoid ( APIENTRYP GLVERTEX3S )(GLshort x, GLshort y, GLshort z); -typedef GLvoid ( APIENTRYP GLVERTEX3SV )(const GLshort *v); -typedef GLvoid ( APIENTRYP GLVERTEX4D )(GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef GLvoid ( APIENTRYP GLVERTEX4DV )(const GLdouble *v); -typedef GLvoid ( APIENTRYP GLVERTEX4F )(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef GLvoid ( APIENTRYP GLVERTEX4FV )(const GLfloat *v); -typedef GLvoid ( APIENTRYP GLVERTEX4I )(GLint x, GLint y, GLint z, GLint w); -typedef GLvoid ( APIENTRYP GLVERTEX4IV )(const GLint *v); -typedef GLvoid ( APIENTRYP GLVERTEX4S )(GLshort x, GLshort y, GLshort z, GLshort w); -typedef GLvoid ( APIENTRYP GLVERTEX4SV )(const GLshort *v); -typedef GLvoid ( APIENTRYP GLVERTEXPOINTER )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef GLvoid ( APIENTRYP GLVIEWPORT )(GLint x, GLint y, GLsizei width, GLsizei height); - - -//GLACCUM pfglAccum; -GLALPHAFUNC pfglAlphaFunc; -GLARETEXTURESRESIDENT pfglAreTexturesResident; -//GLARRAYELEMENT pfglArrayElement; -GLBEGIN pfglBegin; -GLBINDTEXTURE pfglBindTexture; -//GLBITMAP pfglBitmap; -GLBLENDFUNC pfglBlendFunc; -GLCALLLIST pfglCallList; -GLCALLLISTS pfglCallLists; -GLCLEAR pfglClear; -//GLCLEARACCUM pfglClearAccum; -GLCLEARCOLOR pfglClearColor; -GLCLEARDEPTH pfglClearDepth; -//GLCLEARINDEX pfglClearIndex; -//GLCLEARSTENCIL pfglClearStencil; -//GLCLIPPLANE pfglClipPlane; -GLCOLOR3B pfglColor3b; -GLCOLOR3BV pfglColor3bv; -GLCOLOR3D pfglColor3d; -GLCOLOR3DV pfglColor3dv; -GLCOLOR3F pfglColor3f; -GLCOLOR3FV pfglColor3fv; -GLCOLOR3I pfglColor3i; -GLCOLOR3IV pfglColor3iv; -GLCOLOR3S pfglColor3s; -GLCOLOR3SV pfglColor3sv; -GLCOLOR3UB pfglColor3ub; -GLCOLOR3UBV pfglColor3ubv; -GLCOLOR3UI pfglColor3ui; -GLCOLOR3UIV pfglColor3uiv; -GLCOLOR3US pfglColor3us; -GLCOLOR3USV pfglColor3usv; -GLCOLOR4B pfglColor4b; -GLCOLOR4BV pfglColor4bv; -GLCOLOR4D pfglColor4d; -GLCOLOR4DV pfglColor4dv; -GLCOLOR4F pfglColor4f; -GLCOLOR4FV pfglColor4fv; -GLCOLOR4I pfglColor4i; -GLCOLOR4IV pfglColor4iv; -GLCOLOR4S pfglColor4s; -GLCOLOR4SV pfglColor4sv; -GLCOLOR4UB pfglColor4ub; -GLCOLOR4UBV pfglColor4ubv; -GLCOLOR4UI pfglColor4ui; -GLCOLOR4UIV pfglColor4uiv; -GLCOLOR4US pfglColor4us; -GLCOLOR4USV pfglColor4usv; -GLCOLORMASK pfglColorMask; -GLCOLORMATERIAL pfglColorMaterial; -GLCOLORPOINTER pfglColorPointer; -GLCOPYPIXELS pfglCopyPixels; -GLCOPYTEXIMAGE1D pfglCopyTexImage1D; -GLCOPYTEXIMAGE2D pfglCopyTexImage2D; -GLCOPYTEXSUBIMAGE1D pfglCopyTexSubImage1D; -GLCOPYTEXSUBIMAGE2D pfglCopyTexSubImage2D; -GLCULLFACE pfglCullFace; -GLDELETELISTS pfglDeleteLists; -GLDELETETEXTURES pfglDeleteTextures; -GLDEPTHFUNC pfglDepthFunc; -GLDEPTHMASK pfglDepthMask; -GLDEPTHRANGE pfglDepthRange; -GLDISABLE pfglDisable; -GLDISABLECLIENTSTATE pfglDisableClientState; -GLDRAWARRAYS pfglDrawArrays; -GLDRAWBUFFER pfglDrawBuffer; -GLDRAWELEMENTS pfglDrawElements; -GLDRAWPIXELS pfglDrawPixels; -GLEDGEFLAG pfglEdgeFlag; -GLEDGEFLAGPOINTER pfglEdgeFlagPointer; -GLEDGEFLAGV pfglEdgeFlagv; -GLENABLE pfglEnable; -GLENABLECLIENTSTATE pfglEnableClientState; -GLEND pfglEnd; -GLENDLIST pfglEndList; -GLEVALCOORD1D pfglEvalCoord1d; -GLEVALCOORD1DV pfglEvalCoord1dv; -GLEVALCOORD1F pfglEvalCoord1f; -GLEVALCOORD1FV pfglEvalCoord1fv; -GLEVALCOORD2D pfglEvalCoord2d; -GLEVALCOORD2DV pfglEvalCoord2dv; -GLEVALCOORD2F pfglEvalCoord2f; -GLEVALCOORD2FV pfglEvalCoord2fv; -GLEVALMESH1 pfglEvalMesh1; -GLEVALMESH2 pfglEvalMesh2; -GLEVALPOINT1 pfglEvalPoint1; -GLEVALPOINT2 pfglEvalPoint2; -GLFEEDBACKBUFFER pfglFeedbackBuffer; -GLFINISH pfglFinish; -GLFLUSH pfglFlush; -GLFOGF pfglFogf; -GLFOGFV pfglFogfv; -GLFOGI pfglFogi; -GLFOGIV pfglFogiv; -GLFRONTFACE pfglFrontFace; -GLFRUSTUM pfglFrustum; -GLGENLISTS pfglGenLists; -GLGENTEXTURES pfglGenTextures; -GLGETBOOLEANV pfglGetBooleanv; -GLGETCLIPPLANE pfglGetClipPlane; -GLGETDOUBLEV pfglGetDoublev; -GLGETERROR pfglGetError; -GLGETFLOATV pfglGetFloatv; -GLGETINTEGERV pfglGetIntegerv; -GLGETLIGHTFV pfglGetLightfv; -GLGETLIGHTIV pfglGetLightiv; -GLGETMAPDV pfglGetMapdv; -GLGETMAPFV pfglGetMapfv; -GLGETMAPIV pfglGetMapiv; -GLGETMATERIALFV pfglGetMaterialfv; -GLGETMATERIALIV pfglGetMaterialiv; -GLGETPIXELMAPFV pfglGetPixelMapfv; -GLGETPIXELMAPUIV pfglGetPixelMapuiv; -GLGETPIXELMAPUSV pfglGetPixelMapusv; -GLGETPOINTERV pfglGetPointerv; -GLGETPOLYGONSTIPPLE pfglGetPolygonStipple; -GLGETSTRING pfglGetString; -GLGETTEXENVFV pfglGetTexEnvfv; -GLGETTEXENVIV pfglGetTexEnviv; -GLGETTEXGENDV pfglGetTexGendv; -GLGETTEXGENFV pfglGetTexGenfv; -GLGETTEXGENIV pfglGetTexGeniv; -GLGETTEXIMAGE pfglGetTexImage; -GLGETTEXPARAMETERFV pfglGetTexParameterfv; -GLGETTEXPARAMETERIV pfglGetTexParameteriv; -GLHINT pfglHint; -GLINDEXMASK pfglIndexMask; -GLINDEXPOINTER pfglIndexPointer; -GLINDEXD pfglIndexd; -GLINDEXDV pfglIndexdv; -GLINDEXF pfglIndexf; -GLINDEXFV pfglIndexfv; -GLINDEXI pfglIndexi; -GLINDEXIV pfglIndexiv; -GLINDEXS pfglIndexs; -GLINDEXSV pfglIndexsv; -GLINDEXUB pfglIndexub; -GLINDEXUBV pfglIndexubv; -GLINITNAMES pfglInitNames; -GLINTERLEAVEDARRAYS pfglInterleavedArrays; -GLISENABLED pfglIsEnabled; -GLISLIST pfglIsList; -GLISTEXTURE pfglIsTexture; -GLLIGHTMODELF pfglLightModelf; -GLLIGHTMODELFV pfglLightModelfv; -GLLIGHTMODELI pfglLightModeli; -GLLIGHTMODELIV pfglLightModeliv; -GLLIGHTF pfglLightf; -GLLIGHTFV pfglLightfv; -GLLIGHTI pfglLighti; -GLLIGHTIV pfglLightiv; -GLLINESTIPPLE pfglLineStipple; -GLLINEWIDTH pfglLineWidth; -GLLISTBASE pfglListBase; -GLLOADIDENTITY pfglLoadIdentity; -GLLOADMATRIXD pfglLoadMatrixd; -GLLOADMATRIXF pfglLoadMatrixf; -GLLOADNAME pfglLoadName; -GLLOGICOP pfglLogicOp; -GLMAP1D pfglMap1d; -GLMAP1F pfglMap1f; -GLMAP2D pfglMap2d; -GLMAP2F pfglMap2f; -GLMAPGRID1D pfglMapGrid1d; -GLMAPGRID1F pfglMapGrid1f; -GLMAPGRID2D pfglMapGrid2d; -GLMAPGRID2F pfglMapGrid2f; -GLMATERIALF pfglMaterialf; -GLMATERIALFV pfglMaterialfv; -GLMATERIALI pfglMateriali; -GLMATERIALIV pfglMaterialiv; -GLMATRIXMODE pfglMatrixMode; -GLMULTMATRIXD pfglMultMatrixd; -GLMULTMATRIXF pfglMultMatrixf; -GLNEWLIST pfglNewList; -GLNORMAL3B pfglNormal3b; -GLNORMAL3BV pfglNormal3bv; -GLNORMAL3D pfglNormal3d; -GLNORMAL3DV pfglNormal3dv; -GLNORMAL3F pfglNormal3f; -GLNORMAL3FV pfglNormal3fv; -GLNORMAL3I pfglNormal3i; -GLNORMAL3IV pfglNormal3iv; -GLNORMAL3S pfglNormal3s; -GLNORMAL3SV pfglNormal3sv; -GLNORMALPOINTER pfglNormalPointer; -GLORTHO pfglOrtho; -GLPASSTHROUGH pfglPassThrough; -GLPIXELMAPFV pfglPixelMapfv; -GLPIXELMAPUIV pfglPixelMapuiv; -GLPIXELMAPUSV pfglPixelMapusv; -GLPIXELSTOREF pfglPixelStoref; -GLPIXELSTOREI pfglPixelStorei; -GLPIXELTRANSFERF pfglPixelTransferf; -GLPIXELTRANSFERI pfglPixelTransferi; -GLPIXELZOOM pfglPixelZoom; -GLPOINTSIZE pfglPointSize; -GLPOLYGONMODE pfglPolygonMode; -GLPOLYGONOFFSET pfglPolygonOffset; -GLPOLYGONSTIPPLE pfglPolygonStipple; -GLPOPATTRIB pfglPopAttrib; -GLPOPCLIENTATTRIB pfglPopClientAttrib; -GLPOPMATRIX pfglPopMatrix; -GLPOPNAME pfglPopName; -GLPRIORITIZETEXTURES pfglPrioritizeTextures; -GLPUSHATTRIB pfglPushAttrib; -GLPUSHCLIENTATTRIB pfglPushClientAttrib; -GLPUSHMATRIX pfglPushMatrix; -GLPUSHNAME pfglPushName; -GLRASTERPOS2D pfglRasterPos2d; -GLRASTERPOS2DV pfglRasterPos2dv; -GLRASTERPOS2F pfglRasterPos2f; -GLRASTERPOS2FV pfglRasterPos2fv; -GLRASTERPOS2I pfglRasterPos2i; -GLRASTERPOS2IV pfglRasterPos2iv; -GLRASTERPOS2S pfglRasterPos2s; -GLRASTERPOS2SV pfglRasterPos2sv; -GLRASTERPOS3D pfglRasterPos3d; -GLRASTERPOS3DV pfglRasterPos3dv; -GLRASTERPOS3F pfglRasterPos3f; -GLRASTERPOS3FV pfglRasterPos3fv; -GLRASTERPOS3I pfglRasterPos3i; -GLRASTERPOS3IV pfglRasterPos3iv; -GLRASTERPOS3S pfglRasterPos3s; -GLRASTERPOS3SV pfglRasterPos3sv; -GLRASTERPOS4D pfglRasterPos4d; -GLRASTERPOS4DV pfglRasterPos4dv; -GLRASTERPOS4F pfglRasterPos4f; -GLRASTERPOS4FV pfglRasterPos4fv; -GLRASTERPOS4I pfglRasterPos4i; -GLRASTERPOS4IV pfglRasterPos4iv; -GLRASTERPOS4S pfglRasterPos4s; -GLRASTERPOS4SV pfglRasterPos4sv; -GLREADBUFFER pfglReadBuffer; -GLREADPIXELS pfglReadPixels; -GLRECTD pfglRectd; -GLRECTDV pfglRectdv; -GLRECTF pfglRectf; -GLRECTFV pfglRectfv; -GLRECTI pfglRecti; -GLRECTIV pfglRectiv; -GLRECTS pfglRects; -GLRECTSV pfglRectsv; -GLRENDERMODE pfglRenderMode; -GLROTATED pfglRotated; -GLROTATEF pfglRotatef; -GLSCALED pfglScaled; -GLSCALEF pfglScalef; -GLSCISSOR pfglScissor; -GLSELECTBUFFER pfglSelectBuffer; -GLSHADEMODEL pfglShadeModel; -GLSTENCILFUNC pfglStencilFunc; -GLSTENCILMASK pfglStencilMask; -GLSTENCILOP pfglStencilOp; -GLTEXCOORD1D pfglTexCoord1d; -GLTEXCOORD1DV pfglTexCoord1dv; -GLTEXCOORD1F pfglTexCoord1f; -GLTEXCOORD1FV pfglTexCoord1fv; -GLTEXCOORD1I pfglTexCoord1i; -GLTEXCOORD1IV pfglTexCoord1iv; -GLTEXCOORD1S pfglTexCoord1s; -GLTEXCOORD1SV pfglTexCoord1sv; -GLTEXCOORD2D pfglTexCoord2d; -GLTEXCOORD2DV pfglTexCoord2dv; -GLTEXCOORD2F pfglTexCoord2f; -GLTEXCOORD2FV pfglTexCoord2fv; -GLTEXCOORD2I pfglTexCoord2i; -GLTEXCOORD2IV pfglTexCoord2iv; -GLTEXCOORD2S pfglTexCoord2s; -GLTEXCOORD2SV pfglTexCoord2sv; -GLTEXCOORD3D pfglTexCoord3d; -GLTEXCOORD3DV pfglTexCoord3dv; -GLTEXCOORD3F pfglTexCoord3f; -GLTEXCOORD3FV pfglTexCoord3fv; -GLTEXCOORD3I pfglTexCoord3i; -GLTEXCOORD3IV pfglTexCoord3iv; -GLTEXCOORD3S pfglTexCoord3s; -GLTEXCOORD3SV pfglTexCoord3sv; -GLTEXCOORD4D pfglTexCoord4d; -GLTEXCOORD4DV pfglTexCoord4dv; -GLTEXCOORD4F pfglTexCoord4f; -GLTEXCOORD4FV pfglTexCoord4fv; -GLTEXCOORD4I pfglTexCoord4i; -GLTEXCOORD4IV pfglTexCoord4iv; -GLTEXCOORD4S pfglTexCoord4s; -GLTEXCOORD4SV pfglTexCoord4sv; -GLTEXCOORDPOINTER pfglTexCoordPointer; -GLTEXENVF pfglTexEnvf; -GLTEXENVFV pfglTexEnvfv; -GLTEXENVI pfglTexEnvi; -GLTEXENVIV pfglTexEnviv; -GLTEXGEND pfglTexGend; -GLTEXGENDV pfglTexGendv; -GLTEXGENF pfglTexGenf; -GLTEXGENFV pfglTexGenfv; -GLTEXGENI pfglTexGeni; -GLTEXGENIV pfglTexGeniv; -GLTEXIMAGE1D pfglTexImage1D; -GLTEXIMAGE2D pfglTexImage2D; -GLTEXPARAMETERF pfglTexParameterf; -GLTEXPARAMETERFV pfglTexParameterfv; -GLTEXPARAMETERI pfglTexParameteri; -GLTEXPARAMETERIV pfglTexParameteriv; -GLTEXSUBIMAGE1D pfglTexSubImage1D; -GLTEXSUBIMAGE2D pfglTexSubImage2D; -GLTRANSLATED pfglTranslated; -GLTRANSLATEF pfglTranslatef; -GLVERTEX2D pfglVertex2d; -GLVERTEX2DV pfglVertex2dv; -GLVERTEX2F pfglVertex2f; -GLVERTEX2FV pfglVertex2fv; -GLVERTEX2I pfglVertex2i; -GLVERTEX2IV pfglVertex2iv; -GLVERTEX2S pfglVertex2s; -GLVERTEX2SV pfglVertex2sv; -GLVERTEX3D pfglVertex3d; -GLVERTEX3DV pfglVertex3dv; -GLVERTEX3F pfglVertex3f; -GLVERTEX3FV pfglVertex3fv; -GLVERTEX3I pfglVertex3i; -GLVERTEX3IV pfglVertex3iv; -GLVERTEX3S pfglVertex3s; -GLVERTEX3SV pfglVertex3sv; -GLVERTEX4D pfglVertex4d; -GLVERTEX4DV pfglVertex4dv; -GLVERTEX4F pfglVertex4f; -GLVERTEX4FV pfglVertex4fv; -GLVERTEX4I pfglVertex4i; -GLVERTEX4IV pfglVertex4iv; -GLVERTEX4S pfglVertex4s; -GLVERTEX4SV pfglVertex4sv; -GLVERTEXPOINTER pfglVertexPointer; -GLVIEWPORT pfglViewport; - - - -#ifdef _WIN32 - - -typedef BOOL (WINAPI *WGLCOPYCONTEXT)(HGLRC, HGLRC, UINT); -typedef HGLRC (WINAPI *WGLCREATECONTEXT)(HDC); -typedef HGLRC (WINAPI *WGLCREATELAYERCONTEXT)(HDC, int); -typedef BOOL (WINAPI *WGLDELETECONTEXT)(HGLRC); -typedef BOOL (WINAPI *WGLDESCRIBELAYERPLANE)(HDC, int, int, UINT, LPLAYERPLANEDESCRIPTOR); -typedef HGLRC (WINAPI *WGLGETCURRENTCONTEXT)(VOID); -typedef HDC (WINAPI *WGLGETCURRENTDC)(VOID); -typedef int (WINAPI *WGLGETLAYERPALETTEENTRIES)(HDC, int, int, int, COLORREF *); -typedef PROC (WINAPI *WGLGETPROCADDRESS)(LPCSTR); -typedef BOOL (WINAPI *WGLMAKECURRENT)(HDC, HGLRC); -typedef BOOL (WINAPI *WGLREALIZELAYERPALETTE)(HDC, int, BOOL); -typedef int (WINAPI *WGLSETLAYERPALETTEENTRIES)(HDC, int, int, int, CONST COLORREF *); -typedef BOOL (WINAPI *WGLSHARELISTS)(HGLRC, HGLRC); -typedef BOOL (WINAPI *WGLSWAPLAYERBUFFERS)(HDC, UINT); -typedef BOOL (WINAPI *WGLUSEFONTBITMAPS)(HDC, DWORD, DWORD, DWORD); -typedef BOOL (WINAPI *WGLUSEFONTOUTLINES)(HDC, DWORD, DWORD, DWORD, FLOAT, FLOAT, int, LPGLYPHMETRICSFLOAT); - - -WGLCOPYCONTEXT pfwglCopyContext; -WGLCREATECONTEXT pfwglCreateContext; -WGLCREATELAYERCONTEXT pfwglCreateLayerContext; -WGLDELETECONTEXT pfwglDeleteContext; -WGLDESCRIBELAYERPLANE pfwglDescribeLayerPlane; -WGLGETCURRENTCONTEXT pfwglGetCurrentContext; -WGLGETCURRENTDC pfwglGetCurrentDC; -WGLGETLAYERPALETTEENTRIES pfwglGetLayerPaletteEntries; -WGLGETPROCADDRESS pfwglGetProcAddress; -WGLMAKECURRENT pfwglMakeCurrent; -WGLREALIZELAYERPALETTE pfwglRealizeLayerPalette; -WGLSETLAYERPALETTEENTRIES pfwglSetLayerPaletteEntries; -WGLSHARELISTS pfwglShareLists; -WGLSWAPLAYERBUFFERS pfwglSwapLayerBuffers; -WGLUSEFONTBITMAPS pfwglUseFontBitmaps; -WGLUSEFONTOUTLINES pfwglUseFontOutlines; - - -typedef int ( WINAPI *WGLCHOOSEPIXELFORMAT )(HDC, CONST PIXELFORMATDESCRIPTOR *); -typedef int ( WINAPI *WGLDESCRIBEPIXELFORMAT) (HDC, int, UINT, LPPIXELFORMATDESCRIPTOR); -typedef int ( WINAPI *WGLGETPIXELFORMAT)(HDC); -typedef BOOL ( WINAPI *WGLSETPIXELFORMAT)(HDC, int, CONST PIXELFORMATDESCRIPTOR *); -typedef BOOL ( WINAPI *WGLSWAPBUFFERS)(HDC); - - -WGLCHOOSEPIXELFORMAT pfwglChoosePixelFormat; -WGLDESCRIBEPIXELFORMAT pfwglDescribePixelFormat; -WGLGETPIXELFORMAT pfwglGetPixelFormat; -WGLSETPIXELFORMAT pfwglSetPixelFormat; -WGLSWAPBUFFERS pfwglSwapBuffers; - - - -typedef BOOL (WINAPI *WGLSWAPINTERVALEXT)( int ); -typedef int (WINAPI *WGLGETSWAPINTERVALEXT)( void ); - -WGLSWAPINTERVALEXT pfwglSwapIntervalEXT; -WGLGETSWAPINTERVALEXT pfwglGetSwapIntervalEXT; - - -void *(WINAPI *pfwglAllocateMemoryNV)( GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority ); -void *(WINAPI *pfwglFreeMemoryNV)( void *pointer ); - - - -#ifndef HPBUFFERARB - - DECLARE_HANDLE( HPBUFFERARB ); - -#endif - -HPBUFFERARB (WINAPI *pfwglCreatePbufferARB)( HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList ); -HDC (WINAPI *pfwglGetPbufferDCARB)( HPBUFFERARB hPbuffer ); -int (WINAPI *pfwglReleasePbufferDCARB)( HPBUFFERARB hPbuffer, HDC hDC ); -BOOL (WINAPI *pfwglDestroyPbufferARB)(HPBUFFERARB hPbuffer); -BOOL (WINAPI *pfwglQueryPbufferARB)( HPBUFFERARB hPbuffer, int iAttribute, int *piValue ); - - -BOOL (WINAPI *pfwglGetPixelFormatAttribivARB)( HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); -BOOL (WINAPI *pfwglGetPixelFormatAttribfvARB)( HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); -BOOL (WINAPI *pfwglChoosePixelFormatARB)( HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); - - -#endif /* _WIN32 */ - -#ifdef __unix__ - -// Local function in dll -extern void *pfwglGetProcAddress( const char *symbol ); - - -void *(*pfwglAllocateMemoryNV)( GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority ); -void *(*pfwglFreeMemoryNV)( void *pointer ); - - -// GLX Functions -XVisualInfo * (*pfglXChooseVisual)( Display *dpy, int screen, int *attribList ); -void (*pfglXCopyContext)( Display *dpy, GLXContext src, GLXContext dst, GLuint mask ); -GLXContext (*pfglXCreateContext)( Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct ); -GLXPixmap (*pfglXCreateGLXPixmap)( Display *dpy, XVisualInfo *vis, Pixmap pixmap ); -void (*pfglXDestroyContext)( Display *dpy, GLXContext ctx ); -void (*pfglXDestroyGLXPixmap)( Display *dpy, GLXPixmap pix ); -int (*pfglXGetConfig)( Display *dpy, XVisualInfo *vis, int attrib, int *value ); -GLXContext (*pfglXGetCurrentContext)( void ); -GLXDrawable (*pfglXGetCurrentDrawable)( void ); -Bool (*pfglXIsDirect)( Display *dpy, GLXContext ctx ); -Bool (*pfglXMakeCurrent)( Display *dpy, GLXDrawable drawable, GLXContext ctx); -Bool (*pfglXQueryExtension)( Display *dpy, int *errorBase, int *eventBase ); -Bool (*pfglXQueryVersion)( Display *dpy, int *major, int *minor ); -void (*pfglXSwapBuffers)( Display *dpy, GLXDrawable drawable ); -void (*pfglXUseXFont)( Font font, int first, int count, int listBase ); -void (*pfglXWaitGL)( void ); -void (*pfglXWaitX)( void ); - -#endif /* __unix__ */ - - - - - -#endif /* __MYOPENGL_H__ */ diff --git a/wolf3d/newCode/env/myopengl_extension.h b/wolf3d/newCode/env/myopengl_extension.h deleted file mode 100644 index 79c26f3..0000000 --- a/wolf3d/newCode/env/myopengl_extension.h +++ /dev/null @@ -1,716 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * myopengl_extension.h: Interface to OpenGL extensions. - * - * Author: Michael Liebscher - * Date: 2004 - * - */ - -/* - - Notes: - - This module is implemented by opengl_extenstion.c - -*/ - - -#ifndef __MYOPENGL_EXTENSION_H__ -#define __MYOPENGL_EXTENSION_H__ - - -#ifdef IPHONE -#include -#include -#else -#include -#include "GL/glext.h" -#endif - - -#ifndef APIENTRY - - #define APIENTRY - -#endif - -#ifndef APIENTRYP - - #define APIENTRYP APIENTRY * - -#endif - - - -/////////////////////////////////////////////////////////////////////////////// -// -// OpenGL Extensions -// -/////////////////////////////////////////////////////////////////////////////// - - -#define GL_POINT_SIZE_MIN_EXT 0x8126 -#define GL_POINT_SIZE_MAX_EXT 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 -#define GL_DISTANCE_ATTENUATION_EXT 0x8129 - -#ifdef __sgi -#define GL_SHARED_TEXTURE_PALETTE_EXT GL_TEXTURE_COLOR_TABLE_SGI -#else -#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB -#endif - - -#define GL_TEXTURE0_ARB 0x84C0 -#define GL_TEXTURE1_ARB 0x84C1 -#define GL_TEXTURE2_ARB 0x84C2 -#define GL_TEXTURE3_ARB 0x84C3 - -#ifndef WGL_ARB_pixel_format - #define WGL_ARB_pixel_format 1 - #define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 - #define WGL_DRAW_TO_WINDOW_ARB 0x2001 - #define WGL_DRAW_TO_BITMAP_ARB 0x2002 - #define WGL_ACCELERATION_ARB 0x2003 - #define WGL_NEED_PALETTE_ARB 0x2004 - #define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 - #define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 - #define WGL_SWAP_METHOD_ARB 0x2007 - #define WGL_NUMBER_OVERLAYS_ARB 0x2008 - #define WGL_NUMBER_UNDERLAYS_ARB 0x2009 - #define WGL_TRANSPARENT_ARB 0x200A - #define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 - #define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 - #define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 - #define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A - #define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B - #define WGL_SHARE_DEPTH_ARB 0x200C - #define WGL_SHARE_STENCIL_ARB 0x200D - #define WGL_SHARE_ACCUM_ARB 0x200E - #define WGL_SUPPORT_GDI_ARB 0x200F - #define WGL_SUPPORT_OPENGL_ARB 0x2010 - #define WGL_DOUBLE_BUFFER_ARB 0x2011 - #define WGL_STEREO_ARB 0x2012 - #define WGL_PIXEL_TYPE_ARB 0x2013 - #define WGL_COLOR_BITS_ARB 0x2014 - #define WGL_RED_BITS_ARB 0x2015 - #define WGL_RED_SHIFT_ARB 0x2016 - #define WGL_GREEN_BITS_ARB 0x2017 - #define WGL_GREEN_SHIFT_ARB 0x2018 - #define WGL_BLUE_BITS_ARB 0x2019 - #define WGL_BLUE_SHIFT_ARB 0x201A - #define WGL_ALPHA_BITS_ARB 0x201B - #define WGL_ALPHA_SHIFT_ARB 0x201C - #define WGL_ACCUM_BITS_ARB 0x201D - #define WGL_ACCUM_RED_BITS_ARB 0x201E - #define WGL_ACCUM_GREEN_BITS_ARB 0x201F - #define WGL_ACCUM_BLUE_BITS_ARB 0x2020 - #define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 - #define WGL_DEPTH_BITS_ARB 0x2022 - #define WGL_STENCIL_BITS_ARB 0x2023 - #define WGL_AUX_BUFFERS_ARB 0x2024 - - #define WGL_NO_ACCELERATION_ARB 0x2025 - #define WGL_GENERIC_ACCELERATION_ARB 0x2026 - #define WGL_FULL_ACCELERATION_ARB 0x2027 - - #define WGL_SWAP_EXCHANGE_ARB 0x2028 - #define WGL_SWAP_COPY_ARB 0x2029 - #define WGL_SWAP_UNDEFINED_ARB 0x202A - - #define WGL_TYPE_RGBA_ARB 0x202B - #define WGL_TYPE_COLORINDEX_ARB 0x202C -#endif /* WGL_ARB_pixel_format */ - -#ifndef WGL_ARB_pbuffer - #define WGL_ARB_pbuffer 1 - #define WGL_DRAW_TO_PBUFFER_ARB 0x202D - #define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E - #define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F - #define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 - #define WGL_PBUFFER_LARGEST_ARB 0x2033 - #define WGL_PBUFFER_WIDTH_ARB 0x2034 - #define WGL_PBUFFER_HEIGHT_ARB 0x2035 - #define WGL_PBUFFER_LOST_ARB 0x2036 -#endif - - - - - - - - - - -/* - ----------------------- - ARB_MultiTexture - ----------------------- -*/ -void (APIENTRYP pfglActiveTextureARB) (GLenum); -void (APIENTRYP pfglClientActiveTextureARB) (GLenum); -void (APIENTRYP pfglMultiTexCoord1dARB) (GLenum, GLdouble); -void (APIENTRYP pfglMultiTexCoord1dvARB) (GLenum, const GLdouble *); -void (APIENTRYP pfglMultiTexCoord1fARB) (GLenum, GLfloat); -void (APIENTRYP pfglMultiTexCoord1fvARB) (GLenum, const GLfloat *); -void (APIENTRYP pfglMultiTexCoord1iARB) (GLenum, GLint); -void (APIENTRYP pfglMultiTexCoord1ivARB) (GLenum, const GLint *); -void (APIENTRYP pfglMultiTexCoord1sARB) (GLenum, GLshort); -void (APIENTRYP pfglMultiTexCoord1svARB) (GLenum, const GLshort *); -void (APIENTRYP pfglMultiTexCoord2dARB) (GLenum, GLdouble, GLdouble); -void (APIENTRYP pfglMultiTexCoord2dvARB) (GLenum, const GLdouble *); -void (APIENTRYP pfglMultiTexCoord2fARB) (GLenum, GLfloat, GLfloat); -void (APIENTRYP pfglMultiTexCoord2fvARB) (GLenum, const GLfloat *); -void (APIENTRYP pfglMultiTexCoord2iARB) (GLenum, GLint, GLint); -void (APIENTRYP pfglMultiTexCoord2ivARB) (GLenum, const GLint *); -void (APIENTRYP pfglMultiTexCoord2sARB) (GLenum, GLshort, GLshort); -void (APIENTRYP pfglMultiTexCoord2svARB) (GLenum, const GLshort *); -void (APIENTRYP pfglMultiTexCoord3dARB) (GLenum, GLdouble, GLdouble, GLdouble); -void (APIENTRYP pfglMultiTexCoord3dvARB) (GLenum, const GLdouble *); -void (APIENTRYP pfglMultiTexCoord3fARB) (GLenum, GLfloat, GLfloat, GLfloat); -void (APIENTRYP pfglMultiTexCoord3fvARB) (GLenum, const GLfloat *); -void (APIENTRYP pfglMultiTexCoord3iARB) (GLenum, GLint, GLint, GLint); -void (APIENTRYP pfglMultiTexCoord3ivARB) (GLenum, const GLint *); -void (APIENTRYP pfglMultiTexCoord3sARB) (GLenum, GLshort, GLshort, GLshort); -void (APIENTRYP pfglMultiTexCoord3svARB) (GLenum, const GLshort *); -void (APIENTRYP pfglMultiTexCoord4dARB) (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); -void (APIENTRYP pfglMultiTexCoord4dvARB) (GLenum, const GLdouble *); -void (APIENTRYP pfglMultiTexCoord4fARB) (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); -void (APIENTRYP pfglMultiTexCoord4fvARB) (GLenum, const GLfloat *); -void (APIENTRYP pfglMultiTexCoord4iARB) (GLenum, GLint, GLint, GLint, GLint); -void (APIENTRYP pfglMultiTexCoord4ivARB) (GLenum, const GLint *); -void (APIENTRYP pfglMultiTexCoord4sARB) (GLenum, GLshort, GLshort, GLshort, GLshort); -void (APIENTRYP pfglMultiTexCoord4svARB) (GLenum, const GLshort *); - - -/* - ----------------------- - ARB_TransposeMatrix - ----------------------- -*/ -void (APIENTRYP pfglLoadTransposeMatrixfARB) (const GLfloat *); -void (APIENTRYP pfglLoadTransposeMatrixdARB) (const GLdouble *); -void (APIENTRYP pfglMultTransposeMatrixfARB) (const GLfloat *); -void (APIENTRYP pfglMultTransposeMatrixdARB) (const GLdouble *); - - -/* - ----------------------- - ARB_MultiSample - ----------------------- -*/ -void (APIENTRYP pfglSampleCoverageARB) (GLclampf, GLboolean); - - -/* - ----------------------- - ARB_TextureCompression - ----------------------- -*/ -void (APIENTRYP pfglCompressedTexImage3DARB) (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); -void (APIENTRYP pfglCompressedTexImage2DARB) (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); -void (APIENTRYP pfglCompressedTexImage1DARB) (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *); -void (APIENTRYP pfglCompressedTexSubImage3DARB) (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); -void (APIENTRYP pfglCompressedTexSubImage2DARB) (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); -void (APIENTRYP pfglCompressedTexSubImage1DARB) (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *); -void (APIENTRYP pfglGetCompressedTexImageARB) (GLenum, GLint, GLvoid *); - - -/* - ----------------------- - ARB_PointParameters - ----------------------- -*/ -void (APIENTRYP pfglPointParameterfARB) (GLenum, GLfloat); -void (APIENTRYP pfglPointParameterfvARB) (GLenum, const GLfloat *); - - -/* - ----------------------- - ARB_VertexBlend - ----------------------- -*/ -void (APIENTRYP pfglWeightbvARB) (GLint, const GLbyte *); -void (APIENTRYP pfglWeightsvARB) (GLint, const GLshort *); -void (APIENTRYP pfglWeightivARB) (GLint, const GLint *); -void (APIENTRYP pfglWeightfvARB) (GLint, const GLfloat *); -void (APIENTRYP pfglWeightdvARB) (GLint, const GLdouble *); -void (APIENTRYP pfglWeightubvARB) (GLint, const GLubyte *); -void (APIENTRYP pfglWeightusvARB) (GLint, const GLushort *); -void (APIENTRYP pfglWeightuivARB) (GLint, const GLuint *); -void (APIENTRYP pfglWeightPointerARB) (GLint, GLenum, GLsizei, const GLvoid *); -void (APIENTRYP pfglVertexBlendARB) (GLint); - - -/* - ----------------------- - ARB_MatrixPalette - ----------------------- -*/ -void (APIENTRYP pfglCurrentPaletteMatrixARB) (GLint); -void (APIENTRYP pfglMatrixIndexubvARB) (GLint, const GLubyte *); -void (APIENTRYP pfglMatrixIndexusvARB) (GLint, const GLushort *); -void (APIENTRYP pfglMatrixIndexuivARB) (GLint, const GLuint *); -void (APIENTRYP pfglMatrixIndexPointerARB) (GLint, GLenum, GLsizei, const GLvoid *); - - -/* - ------------------------------ - ARB_VertexProgram - ------------------------------ -*/ -void (APIENTRYP pfglVertexAttrib1dARB) (GLuint, GLdouble); -void (APIENTRYP pfglVertexAttrib1dvARB) (GLuint, const GLdouble *); -void (APIENTRYP pfglVertexAttrib1fARB) (GLuint, GLfloat); -void (APIENTRYP pfglVertexAttrib1fvARB) (GLuint, const GLfloat *); -void (APIENTRYP pfglVertexAttrib1sARB) (GLuint, GLshort); -void (APIENTRYP pfglVertexAttrib1svARB) (GLuint, const GLshort *); -void (APIENTRYP pfglVertexAttrib2dARB) (GLuint, GLdouble, GLdouble); -void (APIENTRYP pfglVertexAttrib2dvARB) (GLuint, const GLdouble *); -void (APIENTRYP pfglVertexAttrib2fARB) (GLuint, GLfloat, GLfloat); -void (APIENTRYP pfglVertexAttrib2fvARB) (GLuint, const GLfloat *); -void (APIENTRYP pfglVertexAttrib2sARB) (GLuint, GLshort, GLshort); -void (APIENTRYP pfglVertexAttrib2svARB) (GLuint, const GLshort *); -void (APIENTRYP pfglVertexAttrib3dARB) (GLuint, GLdouble, GLdouble, GLdouble); -void (APIENTRYP pfglVertexAttrib3dvARB) (GLuint, const GLdouble *); -void (APIENTRYP pfglVertexAttrib3fARB) (GLuint, GLfloat, GLfloat, GLfloat); -void (APIENTRYP pfglVertexAttrib3fvARB) (GLuint, const GLfloat *); -void (APIENTRYP pfglVertexAttrib3sARB) (GLuint, GLshort, GLshort, GLshort); -void (APIENTRYP pfglVertexAttrib3svARB) (GLuint, const GLshort *); -void (APIENTRYP pfglVertexAttrib4NbvARB) (GLuint, const GLbyte *); -void (APIENTRYP pfglVertexAttrib4NivARB) (GLuint, const GLint *); -void (APIENTRYP pfglVertexAttrib4NsvARB) (GLuint, const GLshort *); -void (APIENTRYP pfglVertexAttrib4NubARB) (GLuint, GLubyte, GLubyte, GLubyte, GLubyte); -void (APIENTRYP pfglVertexAttrib4NubvARB) (GLuint, const GLubyte *); -void (APIENTRYP pfglVertexAttrib4NuivARB) (GLuint, const GLuint *); -void (APIENTRYP pfglVertexAttrib4NusvARB) (GLuint, const GLushort *); -void (APIENTRYP pfglVertexAttrib4bvARB) (GLuint, const GLbyte *); -void (APIENTRYP pfglVertexAttrib4dARB) (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -void (APIENTRYP pfglVertexAttrib4dvARB) (GLuint, const GLdouble *); -void (APIENTRYP pfglVertexAttrib4fARB) (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -void (APIENTRYP pfglVertexAttrib4fvARB) (GLuint, const GLfloat *); -void (APIENTRYP pfglVertexAttrib4ivARB) (GLuint, const GLint *); -void (APIENTRYP pfglVertexAttrib4sARB) (GLuint, GLshort, GLshort, GLshort, GLshort); -void (APIENTRYP pfglVertexAttrib4svARB) (GLuint, const GLshort *); -void (APIENTRYP pfglVertexAttrib4ubvARB) (GLuint, const GLubyte *); -void (APIENTRYP pfglVertexAttrib4uivARB) (GLuint, const GLuint *); -void (APIENTRYP pfglVertexAttrib4usvARB) (GLuint, const GLushort *); -void (APIENTRYP pfglVertexAttribPointerARB) (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *); -void (APIENTRYP pfglEnableVertexAttribArrayARB) (GLuint); -void (APIENTRYP pfglDisableVertexAttribArrayARB) (GLuint); -void (APIENTRYP pfglProgramStringARB) (GLenum, GLenum, GLsizei, const GLvoid *); -void (APIENTRYP pfglBindProgramARB) (GLenum, GLuint); -void (APIENTRYP pfglDeleteProgramsARB) (GLsizei, const GLuint *); -void (APIENTRYP pfglGenProgramsARB) (GLsizei, GLuint *); -void (APIENTRYP pfglProgramEnvParameter4dARB) (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -void (APIENTRYP pfglProgramEnvParameter4dvARB) (GLenum, GLuint, const GLdouble *); -void (APIENTRYP pfglProgramEnvParameter4fARB) (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -void (APIENTRYP pfglProgramEnvParameter4fvARB) (GLenum, GLuint, const GLfloat *); -void (APIENTRYP pfglProgramLocalParameter4dARB) (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -void (APIENTRYP pfglProgramLocalParameter4dvARB) (GLenum, GLuint, const GLdouble *); -void (APIENTRYP pfglProgramLocalParameter4fARB) (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -void (APIENTRYP pfglProgramLocalParameter4fvARB) (GLenum, GLuint, const GLfloat *); -void (APIENTRYP pfglGetProgramEnvParameterdvARB) (GLenum, GLuint, GLdouble *); -void (APIENTRYP pfglGetProgramEnvParameterfvARB) (GLenum, GLuint, GLfloat *); -void (APIENTRYP pfglGetProgramLocalParameterdvARB) (GLenum, GLuint, GLdouble *); -void (APIENTRYP pfglGetProgramLocalParameterfvARB) (GLenum, GLuint, GLfloat *); -void (APIENTRYP pfglGetProgramivARB) (GLenum, GLenum, GLint *); -void (APIENTRYP pfglGetProgramStringARB) (GLenum, GLenum, GLvoid *); -void (APIENTRYP pfglGetVertexAttribdvARB) (GLuint, GLenum, GLdouble *); -void (APIENTRYP pfglGetVertexAttribfvARB) (GLuint, GLenum, GLfloat *); -void (APIENTRYP pfglGetVertexAttribivARB) (GLuint, GLenum, GLint *); -void (APIENTRYP pfglGetVertexAttribPointervARB) (GLuint, GLenum, GLvoid* *); -GLboolean (APIENTRYP pfglIsProgramARB) (GLuint); - - -/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */ - - -/* - ------------------------------ - ARB_VertexBufferObject - ------------------------------ -*/ -void (APIENTRYP pfglBindBufferARB) (GLenum, GLuint); -void (APIENTRYP pfglDeleteBuffersARB) (GLsizei, const GLuint *); -void (APIENTRYP pfglGenBuffersARB) (GLsizei, GLuint *); -GLboolean (APIENTRYP pfglIsBufferARB) (GLuint); -void (APIENTRYP pfglBufferDataARB) (GLenum, GLsizeiptrARB, const GLvoid *, GLenum); -void (APIENTRYP pfglBufferSubDataARB) (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *); -void (APIENTRYP pfglGetBufferSubDataARB) (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *); -GLvoid* (APIENTRYP pfglMapBufferARB) (GLenum, GLenum); -GLboolean (APIENTRYP pfglUnmapBufferARB) (GLenum); -void (APIENTRYP pfglGetBufferParameterivARB) (GLenum, GLenum, GLint *); -void (APIENTRYP pfglGetBufferPointervARB) (GLenum, GLenum, GLvoid* *); - - -/* - ------------------------------ - ARB_OcclusionQuery - ------------------------------ -*/ -void (APIENTRYP pfglGenQueriesARB) (GLsizei, GLuint *); -void (APIENTRYP pfglDeleteQueriesARB) (GLsizei, const GLuint *); -GLboolean (APIENTRYP pfglIsQueryARB) (GLuint); -void (APIENTRYP pfglBeginQueryARB) (GLenum, GLuint); -void (APIENTRYP pfglEndQueryARB) (GLenum); -void (APIENTRYP pfglGetQueryivARB) (GLenum, GLenum, GLint *); -void (APIENTRYP pfglGetQueryObjectivARB) (GLuint, GLenum, GLint *); -void (APIENTRYP pfglGetQueryObjectuivARB) (GLuint, GLenum, GLuint *); - - -/* - ------------------------------ - ARB_ShaderObjects - ------------------------------ -*/ -void (APIENTRYP pfglDeleteObjectARB) (GLhandleARB); -GLhandleARB (APIENTRYP pfglGetHandleARB) (GLenum); -void (APIENTRYP pfglDetachObjectARB) (GLhandleARB, GLhandleARB); -GLhandleARB (APIENTRYP pfglCreateShaderObjectARB) (GLenum); -void (APIENTRYP pfglShaderSourceARB) (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *); -void (APIENTRYP pfglCompileShaderARB) (GLhandleARB); -GLhandleARB (APIENTRYP pfglCreateProgramObjectARB) (void); -void (APIENTRYP pfglAttachObjectARB) (GLhandleARB, GLhandleARB); -void (APIENTRYP pfglLinkProgramARB) (GLhandleARB); -void (APIENTRYP pfglUseProgramObjectARB) (GLhandleARB); -void (APIENTRYP pfglValidateProgramARB) (GLhandleARB); -void (APIENTRYP pfglUniform1fARB) (GLint, GLfloat); -void (APIENTRYP pfglUniform2fARB) (GLint, GLfloat, GLfloat); -void (APIENTRYP pfglUniform3fARB) (GLint, GLfloat, GLfloat, GLfloat); -void (APIENTRYP pfglUniform4fARB) (GLint, GLfloat, GLfloat, GLfloat, GLfloat); -void (APIENTRYP pfglUniform1iARB) (GLint, GLint); -void (APIENTRYP pfglUniform2iARB) (GLint, GLint, GLint); -void (APIENTRYP pfglUniform3iARB) (GLint, GLint, GLint, GLint); -void (APIENTRYP pfglUniform4iARB) (GLint, GLint, GLint, GLint, GLint); -void (APIENTRYP pfglUniform1fvARB) (GLint, GLsizei, const GLfloat *); -void (APIENTRYP pfglUniform2fvARB) (GLint, GLsizei, const GLfloat *); -void (APIENTRYP pfglUniform3fvARB) (GLint, GLsizei, const GLfloat *); -void (APIENTRYP pfglUniform4fvARB) (GLint, GLsizei, const GLfloat *); -void (APIENTRYP pfglUniform1ivARB) (GLint, GLsizei, const GLint *); -void (APIENTRYP pfglUniform2ivARB) (GLint, GLsizei, const GLint *); -void (APIENTRYP pfglUniform3ivARB) (GLint, GLsizei, const GLint *); -void (APIENTRYP pfglUniform4ivARB) (GLint, GLsizei, const GLint *); -void (APIENTRYP pfglUniformMatrix2fvARB) (GLint, GLsizei, GLboolean, const GLfloat *); -void (APIENTRYP pfglUniformMatrix3fvARB) (GLint, GLsizei, GLboolean, const GLfloat *); -void (APIENTRYP pfglUniformMatrix4fvARB) (GLint, GLsizei, GLboolean, const GLfloat *); -void (APIENTRYP pfglGetObjectParameterfvARB) (GLhandleARB, GLenum, GLfloat *); -void (APIENTRYP pfglGetObjectParameterivARB) (GLhandleARB, GLenum, GLint *); -void (APIENTRYP pfglGetInfoLogARB) (GLhandleARB, GLsizei, GLsizei *, GLcharARB *); -void (APIENTRYP pfglGetAttachedObjectsARB) (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *); -GLint (APIENTRYP pfglGetUniformLocationARB) (GLhandleARB, const GLcharARB *); -void (APIENTRYP pfglGetActiveUniformARB) (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); -void (APIENTRYP pfglGetUniformfvARB) (GLhandleARB, GLint, GLfloat *); -void (APIENTRYP pfglGetUniformivARB) (GLhandleARB, GLint, GLint *); -void (APIENTRYP pfglGetShaderSourceARB) (GLhandleARB, GLsizei, GLsizei *, GLcharARB *); - - -/* - ------------------------------ - ARB_VertexShader - ------------------------------ -*/ -void (APIENTRYP pfglBindAttribLocationARB) (GLhandleARB, GLuint, const GLcharARB *); -void (APIENTRYP pfglGetActiveAttribARB) (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); -GLint (APIENTRYP pfglGetAttribLocationARB) (GLhandleARB, const GLcharARB *); - - -/* - ----------------------- - EXT_BlendColor - ----------------------- -*/ -void (APIENTRYP pfglBlendColorEXT) (GLclampf, GLclampf, GLclampf, GLclampf); - - -/* - ------------------------- - EXT_CompiledVertexArray - ------------------------- -*/ -void ( APIENTRYP pfglLockArraysEXT) ( GLint, GLsizei ); -void ( APIENTRYP pfglUnlockArraysEXT) ( void ); - - -/* - ----------------------- - EXT_SecondaryColor - ----------------------- -*/ -void (APIENTRYP pfglSecondaryColor3bEXT) (GLbyte, GLbyte, GLbyte); -void (APIENTRYP pfglSecondaryColor3bvEXT) (const GLbyte *); -void (APIENTRYP pfglSecondaryColor3dEXT) (GLdouble, GLdouble, GLdouble); -void (APIENTRYP pfglSecondaryColor3dvEXT) (const GLdouble *); -void (APIENTRYP pfglSecondaryColor3fEXT) (GLfloat, GLfloat, GLfloat); -void (APIENTRYP pfglSecondaryColor3fvEXT) (const GLfloat *); -void (APIENTRYP pfglSecondaryColor3iEXT) (GLint, GLint, GLint); -void (APIENTRYP pfglSecondaryColor3ivEXT) (const GLint *); -void (APIENTRYP pfglSecondaryColor3sEXT) (GLshort, GLshort, GLshort); -void (APIENTRYP pfglSecondaryColor3svEXT) (const GLshort *); -void (APIENTRYP pfglSecondaryColor3ubEXT) (GLubyte, GLubyte, GLubyte); -void (APIENTRYP pfglSecondaryColor3ubvEXT) (const GLubyte *); -void (APIENTRYP pfglSecondaryColor3uiEXT) (GLuint, GLuint, GLuint); -void (APIENTRYP pfglSecondaryColor3uivEXT) (const GLuint *); -void (APIENTRYP pfglSecondaryColor3usEXT) (GLushort, GLushort, GLushort); -void (APIENTRYP pfglSecondaryColor3usvEXT) (const GLushort *); -void (APIENTRYP pfglSecondaryColorPointerEXT) (GLint, GLenum, GLsizei, const GLvoid *); - - -/* - ----------------------- - EXT_VertexShader - ----------------------- -*/ -void (APIENTRYP pfglBeginVertexShaderEXT) (void); -void (APIENTRYP pfglEndVertexShaderEXT) (void); -void (APIENTRYP pfglBindVertexShaderEXT) (GLuint); -GLuint (APIENTRYP pfglGenVertexShadersEXT) (GLuint); -void (APIENTRYP pfglDeleteVertexShaderEXT) (GLuint); -void (APIENTRYP pfglShaderOp1EXT) (GLenum, GLuint, GLuint); -void (APIENTRYP pfglShaderOp2EXT) (GLenum, GLuint, GLuint, GLuint); -void (APIENTRYP pfglShaderOp3EXT) (GLenum, GLuint, GLuint, GLuint, GLuint); -void (APIENTRYP pfglSwizzleEXT) (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum); -void (APIENTRYP pfglWriteMaskEXT) (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum); -void (APIENTRYP pfglInsertComponentEXT) (GLuint, GLuint, GLuint); -void (APIENTRYP pfglExtractComponentEXT) (GLuint, GLuint, GLuint); -GLuint (APIENTRYP pfglGenSymbolsEXT) (GLenum, GLenum, GLenum, GLuint); -void (APIENTRYP pfglSetInvariantEXT) (GLuint, GLenum, const GLvoid *); -void (APIENTRYP pfglSetLocalConstantEXT) (GLuint, GLenum, const GLvoid *); -void (APIENTRYP pfglVariantbvEXT) (GLuint, const GLbyte *); -void (APIENTRYP pfglVariantsvEXT) (GLuint, const GLshort *); -void (APIENTRYP pfglVariantivEXT) (GLuint, const GLint *); -void (APIENTRYP pfglVariantfvEXT) (GLuint, const GLfloat *); -void (APIENTRYP pfglVariantdvEXT) (GLuint, const GLdouble *); -void (APIENTRYP pfglVariantubvEXT) (GLuint, const GLubyte *); -void (APIENTRYP pfglVariantusvEXT) (GLuint, const GLushort *); -void (APIENTRYP pfglVariantuivEXT) (GLuint, const GLuint *); -void (APIENTRYP pfglVariantPointerEXT) (GLuint, GLenum, GLuint, const GLvoid *); -void (APIENTRYP pfglEnableVariantClientStateEXT) (GLuint); -void (APIENTRYP pfglDisableVariantClientStateEXT) (GLuint); -GLuint (APIENTRYP pfglBindLightParameterEXT) (GLenum, GLenum); -GLuint (APIENTRYP pfglBindMaterialParameterEXT) (GLenum, GLenum); -GLuint (APIENTRYP pfglBindTexGenParameterEXT) (GLenum, GLenum, GLenum); -GLuint (APIENTRYP pfglBindTextureUnitParameterEXT) (GLenum, GLenum); -GLuint (APIENTRYP pfglBindParameterEXT) (GLenum); -GLboolean (APIENTRYP pfglIsVariantEnabledEXT) (GLuint, GLenum); -void (APIENTRYP pfglGetVariantBooleanvEXT) (GLuint, GLenum, GLboolean *); -void (APIENTRYP pfglGetVariantIntegervEXT) (GLuint, GLenum, GLint *); -void (APIENTRYP pfglGetVariantFloatvEXT) (GLuint, GLenum, GLfloat *); -void (APIENTRYP pfglGetVariantPointervEXT) (GLuint, GLenum, GLvoid* *); -void (APIENTRYP pfglGetInvariantBooleanvEXT) (GLuint, GLenum, GLboolean *); -void (APIENTRYP pfglGetInvariantIntegervEXT) (GLuint, GLenum, GLint *); -void (APIENTRYP pfglGetInvariantFloatvEXT) (GLuint, GLenum, GLfloat *); -void (APIENTRYP pfglGetLocalConstantBooleanvEXT) (GLuint, GLenum, GLboolean *); -void (APIENTRYP pfglGetLocalConstantIntegervEXT) (GLuint, GLenum, GLint *); -void (APIENTRYP pfglGetLocalConstantFloatvEXT) (GLuint, GLenum, GLfloat *); - - -/* - ----------------------- - EXT_VertexWeighting - ----------------------- -*/ -void (APIENTRYP pfglVertexWeightfEXT) (GLfloat); -void (APIENTRYP pfglVertexWeightfvEXT) (const GLfloat *); -void (APIENTRYP pfglVertexWeightPointerEXT) (GLsizei, GLenum, GLsizei, const GLvoid *); - - - -////////////////////////////////// -// -// nVidia Extensions -// -////////////////////////////////// - - - -/* - ----------------------- - NV_Fence - ----------------------- -*/ -void (APIENTRYP pfglDeleteFencesNV) (GLsizei, const GLuint *); -void (APIENTRYP pfglGenFencesNV) (GLsizei, GLuint *); -GLboolean (APIENTRYP pfglIsFenceNV) (GLuint); -GLboolean (APIENTRYP pfglTestFenceNV) (GLuint); -void (APIENTRYP pfglGetFenceivNV) (GLuint, GLenum, GLint *); -void (APIENTRYP pfglFinishFenceNV) (GLuint); -void (APIENTRYP pfglSetFenceNV) (GLuint, GLenum); - - -/* - ----------------------- - NV_VertexArrayRange - ----------------------- -*/ -void (APIENTRYP pfglFlushVertexArrayRangeNV) (void); -void (APIENTRYP pfglVertexArrayRangeNV) (GLsizei, const GLvoid *); - - -/* - ----------------------- - NV_VertexProgram - ----------------------- -*/ -GLboolean (APIENTRYP pfglAreProgramsResidentNV) (GLsizei, const GLuint *, GLboolean *); -void (APIENTRYP pfglBindProgramNV) (GLenum, GLuint); -void (APIENTRYP pfglDeleteProgramsNV) (GLsizei, const GLuint *); -void (APIENTRYP pfglExecuteProgramNV) (GLenum, GLuint, const GLfloat *); -void (APIENTRYP pfglGenProgramsNV) (GLsizei, GLuint *); -void (APIENTRYP pfglGetProgramParameterdvNV) (GLenum, GLuint, GLenum, GLdouble *); -void (APIENTRYP pfglGetProgramParameterfvNV) (GLenum, GLuint, GLenum, GLfloat *); -void (APIENTRYP pfglGetProgramivNV) (GLuint, GLenum, GLint *); -void (APIENTRYP pfglGetProgramStringNV) (GLuint, GLenum, GLubyte *); -void (APIENTRYP pfglGetTrackMatrixivNV) (GLenum, GLuint, GLenum, GLint *); -void (APIENTRYP pfglGetVertexAttribdvNV) (GLuint, GLenum, GLdouble *); -void (APIENTRYP pfglGetVertexAttribfvNV) (GLuint, GLenum, GLfloat *); -void (APIENTRYP pfglGetVertexAttribivNV) (GLuint, GLenum, GLint *); -void (APIENTRYP pfglGetVertexAttribPointervNV) (GLuint, GLenum, GLvoid* *); -GLboolean (APIENTRYP pfglIsProgramNV) (GLuint); -void (APIENTRYP pfglLoadProgramNV) (GLenum, GLuint, GLsizei, const GLubyte *); -void (APIENTRYP pfglProgramParameter4dNV) (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -void (APIENTRYP pfglProgramParameter4dvNV) (GLenum, GLuint, const GLdouble *); -void (APIENTRYP pfglProgramParameter4fNV) (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -void (APIENTRYP pfglProgramParameter4fvNV) (GLenum, GLuint, const GLfloat *); -void (APIENTRYP pfglProgramParameters4dvNV) (GLenum, GLuint, GLuint, const GLdouble *); -void (APIENTRYP pfglProgramParameters4fvNV) (GLenum, GLuint, GLuint, const GLfloat *); -void (APIENTRYP pfglRequestResidentProgramsNV) (GLsizei, const GLuint *); -void (APIENTRYP pfglTrackMatrixNV) (GLenum, GLuint, GLenum, GLenum); -void (APIENTRYP pfglVertexAttribPointerNV) (GLuint, GLint, GLenum, GLsizei, const GLvoid *); -void (APIENTRYP pfglVertexAttrib1dNV) (GLuint, GLdouble); -void (APIENTRYP pfglVertexAttrib1dvNV) (GLuint, const GLdouble *); -void (APIENTRYP pfglVertexAttrib1fNV) (GLuint, GLfloat); -void (APIENTRYP pfglVertexAttrib1fvNV) (GLuint, const GLfloat *); -void (APIENTRYP pfglVertexAttrib1sNV) (GLuint, GLshort); -void (APIENTRYP pfglVertexAttrib1svNV) (GLuint, const GLshort *); -void (APIENTRYP pfglVertexAttrib2dNV) (GLuint, GLdouble, GLdouble); -void (APIENTRYP pfglVertexAttrib2dvNV) (GLuint, const GLdouble *); -void (APIENTRYP pfglVertexAttrib2fNV) (GLuint, GLfloat, GLfloat); -void (APIENTRYP pfglVertexAttrib2fvNV) (GLuint, const GLfloat *); -void (APIENTRYP pfglVertexAttrib2sNV) (GLuint, GLshort, GLshort); -void (APIENTRYP pfglVertexAttrib2svNV) (GLuint, const GLshort *); -void (APIENTRYP pfglVertexAttrib3dNV) (GLuint, GLdouble, GLdouble, GLdouble); -void (APIENTRYP pfglVertexAttrib3dvNV) (GLuint, const GLdouble *); -void (APIENTRYP pfglVertexAttrib3fNV) (GLuint, GLfloat, GLfloat, GLfloat); -void (APIENTRYP pfglVertexAttrib3fvNV) (GLuint, const GLfloat *); -void (APIENTRYP pfglVertexAttrib3sNV) (GLuint, GLshort, GLshort, GLshort); -void (APIENTRYP pfglVertexAttrib3svNV) (GLuint, const GLshort *); -void (APIENTRYP pfglVertexAttrib4dNV) (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -void (APIENTRYP pfglVertexAttrib4dvNV) (GLuint, const GLdouble *); -void (APIENTRYP pfglVertexAttrib4fNV) (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -void (APIENTRYP pfglVertexAttrib4fvNV) (GLuint, const GLfloat *); -void (APIENTRYP pfglVertexAttrib4sNV) (GLuint, GLshort, GLshort, GLshort, GLshort); -void (APIENTRYP pfglVertexAttrib4svNV) (GLuint, const GLshort *); -void (APIENTRYP pfglVertexAttrib4ubNV) (GLuint, GLubyte, GLubyte, GLubyte, GLubyte); -void (APIENTRYP pfglVertexAttrib4ubvNV) (GLuint, const GLubyte *); -void (APIENTRYP pfglVertexAttribs1dvNV) (GLuint, GLsizei, const GLdouble *); -void (APIENTRYP pfglVertexAttribs1fvNV) (GLuint, GLsizei, const GLfloat *); -void (APIENTRYP pfglVertexAttribs1svNV) (GLuint, GLsizei, const GLshort *); -void (APIENTRYP pfglVertexAttribs2dvNV) (GLuint, GLsizei, const GLdouble *); -void (APIENTRYP pfglVertexAttribs2fvNV) (GLuint, GLsizei, const GLfloat *); -void (APIENTRYP pfglVertexAttribs2svNV) (GLuint, GLsizei, const GLshort *); -void (APIENTRYP pfglVertexAttribs3dvNV) (GLuint, GLsizei, const GLdouble *); -void (APIENTRYP pfglVertexAttribs3fvNV) (GLuint, GLsizei, const GLfloat *); -void (APIENTRYP pfglVertexAttribs3svNV) (GLuint, GLsizei, const GLshort *); -void (APIENTRYP pfglVertexAttribs4dvNV) (GLuint, GLsizei, const GLdouble *); -void (APIENTRYP pfglVertexAttribs4fvNV) (GLuint, GLsizei, const GLfloat *); -void (APIENTRYP pfglVertexAttribs4svNV) (GLuint, GLsizei, const GLshort *); -void (APIENTRYP pfglVertexAttribs4ubvNV) (GLuint, GLsizei, const GLubyte *); - - -////////////////////////////////// -// -// ATI Extensions -// -////////////////////////////////// - -/* - ------------------------------ - ATI_EnvmapBumpmap - ------------------------------ -*/ -void (APIENTRYP pfglTexBumpParameterivATI) (GLenum, const GLint *); -void (APIENTRYP pfglTexBumpParameterfvATI) (GLenum, const GLfloat *); -void (APIENTRYP pfglGetTexBumpParameterivATI) (GLenum, GLint *); -void (APIENTRYP pfglGetTexBumpParameterfvATI) (GLenum, GLfloat *); - - -/* - ------------------------------ - ATI_FragmentShader - ------------------------------ -*/ -GLuint (APIENTRYP pfglGenFragmentShadersATI) (GLuint); -void (APIENTRYP pfglBindFragmentShaderATI) (GLuint); -void (APIENTRYP pfglDeleteFragmentShaderATI) (GLuint); -void (APIENTRYP pfglBeginFragmentShaderATI) (void); -void (APIENTRYP pfglEndFragmentShaderATI) (void); -void (APIENTRYP pfglPassTexCoordATI) (GLuint, GLuint, GLenum); -void (APIENTRYP pfglSampleMapATI) (GLuint, GLuint, GLenum); -void (APIENTRYP pfglColorFragmentOp1ATI) (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -void (APIENTRYP pfglColorFragmentOp2ATI) (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -void (APIENTRYP pfglColorFragmentOp3ATI) (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -void (APIENTRYP pfglAlphaFragmentOp1ATI) (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint); -void (APIENTRYP pfglAlphaFragmentOp2ATI) (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -void (APIENTRYP pfglAlphaFragmentOp3ATI) (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -void (APIENTRYP pfglSetFragmentShaderConstantATI) (GLuint, const GLfloat *); - -/* - ------------------------------ - ATI_VertexArrayObject - ------------------------------ -*/ -GLuint (APIENTRYP pfglNewObjectBufferATI) (GLsizei, const GLvoid *, GLenum); -GLboolean (APIENTRYP pfglIsObjectBufferATI) (GLuint); -void (APIENTRYP pfglUpdateObjectBufferATI) (GLuint, GLuint, GLsizei, const GLvoid *, GLenum); -void (APIENTRYP pfglGetObjectBufferfvATI) (GLuint, GLenum, GLfloat *); -void (APIENTRYP pfglGetObjectBufferivATI) (GLuint, GLenum, GLint *); -void (APIENTRYP pfglFreeObjectBufferATI) (GLuint); -void (APIENTRYP pfglArrayObjectATI) (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint); -void (APIENTRYP pfglGetArrayObjectfvATI) (GLenum, GLenum, GLfloat *); -void (APIENTRYP pfglGetArrayObjectivATI) (GLenum, GLenum, GLint *); -void (APIENTRYP pfglVariantArrayObjectATI) (GLuint, GLenum, GLsizei, GLuint, GLuint); -void (APIENTRYP pfglGetVariantArrayObjectfvATI) (GLuint, GLenum, GLfloat *); -void (APIENTRYP pfglGetVariantArrayObjectivATI) (GLuint, GLenum, GLint *); - - - - -/* - ------------------------------ - ATI_MapObjectBuffer - ------------------------------ -*/ -GLvoid* (APIENTRYP pfglMapObjectBufferATI) (GLuint); -void (APIENTRYP pfglUnmapObjectBufferATI) (GLuint); - - - - - - - - - -#endif /* __MYOPENGL_EXTENSION_H__ */ diff --git a/wolf3d/newCode/env/num_type.h b/wolf3d/newCode/env/num_type.h deleted file mode 100644 index 169716c..0000000 --- a/wolf3d/newCode/env/num_type.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - - Copyright (C) 2005 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - - num_type.h: System dependant float/double to integer conversions. - - - */ - - -#ifndef __NUM_TYPE_H__ -#define __NUM_TYPE_H__ - -#include "arch.h" - - - -#define BIT( x ) ( 1 << (x) ) - - - - -#define FloatToInt( a ) (SW32)(a) -#define DoubleToInt( a ) (SW32)(a) - - - - - -#endif /* __NUM_TYPE_H__ */ diff --git a/wolf3d/newCode/env/oggfile.c b/wolf3d/newCode/env/oggfile.c deleted file mode 100644 index 98dec77..0000000 --- a/wolf3d/newCode/env/oggfile.c +++ /dev/null @@ -1,154 +0,0 @@ -/* - - Copyright (C) 2009 Id Software, Inc. - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -#include "../wolfiphone.h" - -filehandle_t *fh; - -PRIVATE size_t ovc_read( void *ptr, size_t size, size_t nmemb, void *dataSource ) -{ - if( ! size || ! nmemb ) - { - return 0; - } - - return FS_ReadFile( ptr, size, nmemb, fh ); -} - -PRIVATE int ovc_seek( void *dataSource, ogg_int64_t offset, int whence ) -{ - return FS_FileSeek( fh, offset, whence ); -} - -PRIVATE int ovc_close( void *dataSource ) -{ - return 0; -} - -PRIVATE long ovc_tell( void *dataSource ) -{ - return FS_FileTell( fh ); -} - - - -/* ------------------------------------------------------------------------------ - Function: LoadOggInfo -Load ogg file. - - Parameters: filename -[in] Name of wav file to load. - wav -[out] wav data. - info -[out] wav sound info. - - Returns: True if file loaded, otherwise false. - - Notes: Caller is responsible for freeing wav data by calling Z_Free. - ------------------------------------------------------------------------------ -*/ -PUBLIC _boolean LoadOggInfo( const char *filename, W8 **wav, soundInfo_t *info ) -{ - W8 *data; - int size; - int dummy; - char *newFilename; - int len; - OggVorbis_File vorbisFile; - vorbis_info vorbisInfo; - ov_callbacks vorbisCallbacks = {ovc_read, ovc_seek, ovc_close, ovc_tell}; - int ret; - - newFilename = strdup( filename ); - - len = strlen( newFilename ); - if ( len < 5 || strcmp( newFilename + len - 4, ".wav" ) ) { - free( newFilename ); - return false; - } - - newFilename[ len - 3 ] = 'o'; - newFilename[ len - 2 ] = 'g'; - newFilename[ len - 1 ] = 'g'; - - fh = FS_OpenFile( newFilename, 0 ); - if( ! fh ) - { - free( newFilename ); - return false; - } - - if( (ret = ov_open_callbacks( fh, &vorbisFile, NULL, 0, vorbisCallbacks )) < 0 ) { - free( newFilename ); - return false; - } - - vorbisInfo = *ov_info( &vorbisFile, -1 ); - if( vorbisInfo.channels != 1 && vorbisInfo.channels != 2 ) - { - Com_Printf( "Only mono and stereo OGG files supported (%s)\n", newFilename ); - free( newFilename ); - return false; - } - - info->channels = vorbisInfo.channels; - info->sample_rate = vorbisInfo.rate; - info->sample_size = 2; - -#define BUFFER_SIZE ( 128 * 1024 ) - - data = (W8 *)malloc( BUFFER_SIZE ); - size = 0; - - while( size < BUFFER_SIZE ) - { - int read = 0; - read = ov_read( &vorbisFile, (char *)data + size, BUFFER_SIZE - size, &dummy ); - if( read == 0 ) - { - break; - } - - if( read <= 0 ) - { - Com_Printf( "Only mono and stereo OGG files supported (%s)\n", newFilename ); - free( newFilename ); - return false; - } - - size += read; - } - - info->samples = size / ( info->channels * info->sample_size ); - - Com_Printf("Loaded %s: channels=%d, sample_rate=%d, sample_size=%d, samples=%d. \n", newFilename, info->channels, info->sample_rate, info->sample_size, info->samples ); - free( newFilename ); - - *wav = (W8 *)Z_Malloc( size ); - memcpy(*wav, data, size ); - free( data ); - - - FS_CloseFile( fh ); - - return true; -} - diff --git a/wolf3d/newCode/env/oggfile.h b/wolf3d/newCode/env/oggfile.h deleted file mode 100644 index ff0e648..0000000 --- a/wolf3d/newCode/env/oggfile.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - - Copyright (C) 2009 Id Software, Inc. - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - - -#ifndef __LOADERS_OGGFILE_H__ -#define __LOADERS_OGGFILE_H__ - -extern _boolean LoadOggInfo( const char *filename, W8 **wav, soundInfo_t *info ); - -#endif /* __LOADERS_OGGFILE_H__ */ diff --git a/wolf3d/newCode/env/openal_binding.c b/wolf3d/newCode/env/openal_binding.c deleted file mode 100644 index 968db79..0000000 --- a/wolf3d/newCode/env/openal_binding.c +++ /dev/null @@ -1,335 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * openal_binding.c: Interface to OpenAL library. - * - * Author: Michael Liebscher - * Date: 2004 - * - */ - - -#include "../wolfiphone.h" - - -#ifdef _WIN32 - - HINSTANCE hinstOpenAL; - -#elif __unix__ - - void *OpenALLib; - -#elif IPHONE - - void *OpenALLib; - // from here on in this file, behave like unix - #define __unix__ 1 - -#else - - #error "Please define interface to OpenAL library!" - -#endif - - -/* ------------------------------------------------------------------------------ - Function: OpenAL_Shutdown -Shutdown interface to OpenAL. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - Unloads the specified Dynamic Link Library then NULLs out all the - proc pointers. - ------------------------------------------------------------------------------ -*/ -PUBLIC void OpenAL_Shutdown( void ) -{ - -#ifdef _WIN32 - - if( hinstOpenAL ) - { - FreeLibrary( hinstOpenAL ); - hinstOpenAL = NULL; - } - - hinstOpenAL = NULL; - -#elif __unix__ - - if( OpenALLib ) - { - dlclose( OpenALLib ); - OpenALLib = NULL; - } - - OpenALLib = NULL; - -#else - - #error "Please define interface to OpenAL library!" - -#endif - - - pfalcCloseDevice = NULL; - pfalcCreateContext = NULL; - pfalcDestroyContext = NULL; - pfalcGetContextsDevice = NULL; - pfalcGetCurrentContext = NULL; - pfalcGetEnumValue = NULL; - pfalcGetError = NULL; - pfalcGetIntegerv = NULL; - pfalcGetProcAddress = NULL; - pfalcGetString = NULL; - pfalcIsExtensionPresent = NULL; - pfalcMakeContextCurrent = NULL; - pfalcOpenDevice = NULL; - pfalcProcessContext = NULL; - pfalcSuspendContext = NULL; - - - pfalGenBuffers = NULL; - pfalDeleteBuffers = NULL; - pfalIsBuffer = NULL; - pfalBufferData = NULL; - pfalGetBufferf = NULL; - pfalGetBufferi = NULL; - pfalEnable = NULL; - pfalDisable = NULL; - pfalDopplerFactor = NULL; - pfalDopplerVelocity = NULL; - pfalDistanceModel = NULL; - pfalGetBoolean = NULL; - pfalGetBooleanv = NULL; - pfalGetDouble = NULL; - pfalGetDoublev = NULL; - pfalGetFloat = NULL; - pfalGetFloatv = NULL; - pfalGetInteger = NULL; - pfalGetIntegerv = NULL; - pfalGetEnumValue = NULL; - pfalGetError = NULL; - pfalGetProcAddress = NULL; - pfalGetString = NULL; - pfalIsExtensionPresent = NULL; - pfalIsEnabled = NULL; - pfalListenerf = NULL; - pfalListener3f = NULL; - pfalListenerfv = NULL; - pfalListeneri = NULL; - pfalGetListenerf = NULL; - pfalGetListener3f = NULL; - pfalGetListenerfv = NULL; - pfalGetListeneri = NULL; - pfalGenSources = NULL; - pfalDeleteSources = NULL; - pfalIsSource = NULL; - pfalSourcef = NULL; - pfalSourcefv = NULL; - pfalSource3f = NULL; - pfalSourcei = NULL; - pfalGetSourcef = NULL; - pfalGetSource3f = NULL; - pfalGetSourcefv = NULL; - pfalGetSourcei = NULL; - pfalSourcePlay = NULL; - pfalSourcePlayv = NULL; - pfalSourcePause = NULL; - pfalSourcePausev = NULL; - pfalSourceStop = NULL; - pfalSourceStopv = NULL; - pfalSourceRewind = NULL; - pfalSourceRewindv = NULL; - pfalSourceQueueBuffers = NULL; - pfalSourceUnqueueBuffers = NULL; - -} - - - -#ifdef _WIN32 - - #define GPA( a ) GetProcAddress( hinstOpenAL, a ) - -#elif __unix__ - - #define GPA( a ) dlsym( OpenALLib, a ) - -#else - - #error "Please define interface to OpenAL library!" - -#endif - - - - - -/* ------------------------------------------------------------------------------ - Function: OpenAL_Init -Setup interface to OpenAL. - - Parameters: dllname -[in] Name of the OpenAL dynamic link library. - - Returns: true on success, otherwise false. - - Notes: - This is responsible for binding our al function pointers to - the appropriate OpenAL stuff. In Windows this means doing a - LoadLibrary and a bunch of calls to GetProcAddress. On other - operating systems we need to do the right thing, whatever that - might be. - ------------------------------------------------------------------------------ -*/ -PUBLIC _boolean OpenAL_Init( const char *dllname ) -{ - -#ifdef _WIN32 - - char buffer[ 1024 ], *ptr; - - SearchPath( NULL, dllname, NULL, sizeof( buffer ) - 1, buffer, &ptr ); - - Com_Printf( "...calling LoadLibrary( %s ): ", buffer ); - - if( ( hinstOpenAL = LoadLibrary( dllname ) ) == 0 ) - { - char *buf = NULL; - - Com_Printf( "failed\n" ); - - FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, - NULL, GetLastError(), - MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ), - (LPTSTR) &buf, 0, NULL ); - - Com_Printf( "%s\n", buf ); - - return false; - } - -#elif __unix__ - - Com_Printf( "...calling dlopen( %s ): ", dllname ); - - if( ( OpenALLib = dlopen( dllname, RTLD_LAZY | RTLD_GLOBAL ) ) == 0 ) - { - Com_Printf( "failed\n" ); - - Com_Printf( "%s\n", dlerror() ); - - return false; - } - -#else - - #error "Please define interface to OpenAL library!" - -#endif - - - Com_Printf( "succeeded\n" ); - - - if( ! (pfalcCloseDevice = (ALCCLOSEDEVICE)GPA( "alcCloseDevice" )) ) return false; - if( ! (pfalcCreateContext = (ALCCREATECONTEXT)GPA( "alcCreateContext" )) ) return false; - if( ! (pfalcDestroyContext = (ALCDESTROYCONTEXT)GPA( "alcDestroyContext" )) ) return false; - if( ! (pfalcGetContextsDevice = (ALCGETCONTEXTSDEVICE)GPA( "alcGetContextsDevice" )) ) return false; - if( ! (pfalcGetCurrentContext = (ALCGETCURRENTCONTEXT)GPA( "alcGetCurrentContext" )) ) return false; - if( ! (pfalcGetEnumValue = (ALCGETENUMVALUE)GPA( "alcGetEnumValue" )) ) return false; - if( ! (pfalcGetError = (ALCGETERROR)GPA( "alcGetError" )) ) return false; - if( ! (pfalcGetIntegerv = (ALCGETINTEGERV)GPA( "alcGetIntegerv" )) ) return false; - if( ! (pfalcGetProcAddress = (ALCGETPROCADDRESS)GPA( "alcGetProcAddress" )) ) return false; - if( ! (pfalcGetString = (ALCGETSTRING)GPA( "alcGetString" )) ) return false; - if( ! (pfalcIsExtensionPresent = (ALCISEXTENSIONPRESENT)GPA( "alcIsExtensionPresent" )) ) return false; - if( ! (pfalcMakeContextCurrent = (ALCMAKECONTEXTCURRENT)GPA( "alcMakeContextCurrent" )) ) return false; - if( ! (pfalcOpenDevice = (ALCOPENDEVICE)GPA( "alcOpenDevice" )) ) return false; - if( ! (pfalcProcessContext = (ALCPROCESSCONTEXT)GPA( "alcProcessContext" )) ) return false; - if( ! (pfalcSuspendContext = (ALCSUSPENDCONTEXT)GPA( "alcSuspendContext" )) ) return false; - - - if( ! (pfalGenBuffers = (ALGENBUFFERS)GPA("alGenBuffers")) ) return false; - if( ! (pfalDeleteBuffers = (ALDELETEBUFFERS)GPA("alDeleteBuffers")) ) return false; - if( ! (pfalIsBuffer = (ALISBUFFER)GPA("alIsBuffer")) ) return false; - if( ! (pfalBufferData = (ALBUFFERDATA)GPA("alBufferData")) ) return false; - if( ! (pfalGetBufferf = (ALGETBUFFERF)GPA("alGetBufferf")) ) return false; - if( ! (pfalGetBufferi = (ALGETBUFFERI)GPA("alGetBufferi")) ) return false; - if( ! (pfalEnable = (ALENABLE)GPA("alEnable")) ) return false; - if( ! (pfalDisable = (ALDISABLE)GPA("alDisable")) ) return false; - if( ! (pfalDopplerFactor = (ALDOPPLERFACTOR)GPA("alDopplerFactor")) ) return false; - if( ! (pfalDopplerVelocity = (ALDOPPLERVELOCITY)GPA("alDopplerVelocity")) ) return false; - if( ! (pfalDistanceModel = (ALDISTANCEMODEL)GPA("alDistanceModel")) ) return false; - if( ! (pfalGetBoolean = (ALGETBOOLEAN)GPA("alGetBoolean")) ) return false; - if( ! (pfalGetBooleanv = (ALGETBOOLEANV)GPA("alGetBooleanv")) ) return false; - if( ! (pfalGetDouble = (ALGETDOUBLE)GPA("alGetDouble")) ) return false; - if( ! (pfalGetDoublev = (ALGETDOUBLEV)GPA("alGetDoublev")) ) return false; - if( ! (pfalGetFloat = (ALGETFLOAT)GPA("alGetFloat")) ) return false; - if( ! (pfalGetFloatv = (ALGETFLOATV)GPA("alGetFloatv")) ) return false; - if( ! (pfalGetInteger = (ALGETINTEGER)GPA("alGetInteger")) ) return false; - if( ! (pfalGetIntegerv = (ALGETINTEGERV)GPA("alGetIntegerv")) ) return false; - if( ! (pfalGetEnumValue = (ALGETENUMVALUE)GPA("alGetEnumValue")) ) return false; - if( ! (pfalGetError = (ALGETERROR)GPA("alGetError")) ) return false; - if( ! (pfalGetProcAddress = (ALGETPROCADDRESS)GPA("alGetProcAddress")) ) return false; - if( ! (pfalGetString = (ALGETSTRING)GPA("alGetString")) ) return false; - if( ! (pfalIsExtensionPresent = (ALISEXTENSIONPRESENT)GPA("alIsExtensionPresent")) ) return false; - if( ! (pfalIsEnabled = (ALISENABLED)GPA("alIsEnabled")) ) return false; - if( ! (pfalListenerf = (ALLISTENERF)GPA("alListenerf")) ) return false; - if( ! (pfalListener3f = (ALLISTENER3F)GPA("alListener3f")) ) return false; - if( ! (pfalListenerfv = (ALLISTENERFV)GPA("alListenerfv")) ) return false; - if( ! (pfalListeneri = (ALLISTENERI)GPA("alListeneri")) ) return false; - if( ! (pfalGetListenerf = (ALGETLISTENERF)GPA("alGetListenerf")) ) return false; - if( ! (pfalGetListener3f = (ALGETLISTENER3F)GPA("alGetListener3f")) ) return false; - if( ! (pfalGetListenerfv = (ALGETLISTENERFV)GPA("alGetListenerfv")) ) return false; - if( ! (pfalGetListeneri = (ALGETLISTENERI)GPA("alGetListeneri")) ) return false; - if( ! (pfalGenSources = (ALGENSOURCES)GPA("alGenSources")) ) return false; - if( ! (pfalDeleteSources = (ALDELETESOURCES)GPA("alDeleteSources")) ) return false; - if( ! (pfalIsSource = (ALISSOURCE)GPA("alIsSource")) ) return false; - if( ! (pfalSourcef = (ALSOURCEF)GPA("alSourcef")) ) return false; - if( ! (pfalSourcefv = (ALSOURCEFV)GPA("alSourcefv")) ) return false; - if( ! (pfalSource3f = (ALSOURCE3F)GPA("alSource3f")) ) return false; - if( ! (pfalSourcei = (ALSOURCEI)GPA("alSourcei")) ) return false; - if( ! (pfalGetSourcef = (ALGETSOURCEF)GPA("alGetSourcef")) ) return false; - if( ! (pfalGetSource3f = (ALGETSOURCE3F)GPA("alGetSource3f")) ) return false; - if( ! (pfalGetSourcefv = (ALGETSOURCEFV)GPA("alGetSourcefv")) ) return false; - if( ! (pfalGetSourcei = (ALGETSOURCEI)GPA("alGetSourcei")) ) return false; - if( ! (pfalSourcePlay = (ALSOURCEPLAY)GPA("alSourcePlay")) ) return false; - if( ! (pfalSourcePlayv = (ALSOURCEPLAYV)GPA("alSourcePlayv")) ) return false; - if( ! (pfalSourcePause = (ALSOURCEPAUSE)GPA("alSourcePause")) ) return false; - if( ! (pfalSourcePausev = (ALSOURCEPAUSEV)GPA("alSourcePausev")) ) return false; - if( ! (pfalSourceStop = (ALSOURCESTOP)GPA("alSourceStop")) ) return false; - if( ! (pfalSourceStopv = (ALSOURCESTOPV)GPA("alSourceStopv")) ) return false; - if( ! (pfalSourceRewind = (ALSOURCEREWIND)GPA("alSourceRewind")) ) return false; - if( ! (pfalSourceRewindv = (ALSOURCEREWINDV)GPA("alSourceRewindv")) ) return false; - if( ! (pfalSourceQueueBuffers = (ALSOURCEQUEUEBUFFERS)GPA("alSourceQueueBuffers")) ) return false; - if( ! (pfalSourceUnqueueBuffers = (ALSOURCEUNQUEUEBUFFERS)GPA("alSourceUnqueueBuffers")) ) return false; - - - return true; - -} - diff --git a/wolf3d/newCode/env/openal_binding.h b/wolf3d/newCode/env/openal_binding.h deleted file mode 100644 index ba88024..0000000 --- a/wolf3d/newCode/env/openal_binding.h +++ /dev/null @@ -1,186 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * openal_binding.h: Interface to OpenAL library. - * - * Author: Michael Liebscher - * Date: 2004 - * - */ - - -#ifndef __OPENAL_BINDING_H__ -#define __OPENAL_BINDING_H__ - -extern _boolean OpenAL_Init( const char *dllname ); -extern void OpenAL_Shutdown( void ); - - - -typedef ALCAPI ALCvoid ( * ALCCLOSEDEVICE)(ALCdevice *pDevice); -typedef ALCAPI ALCcontext*( * ALCCREATECONTEXT)(ALCdevice *device, const ALCint *attrList); -typedef ALCAPI ALCvoid ( * ALCDESTROYCONTEXT)(ALCcontext *context); -typedef ALCAPI ALCdevice* ( * ALCGETCONTEXTSDEVICE)(ALCcontext *pContext); -typedef ALCAPI ALCcontext * ( * ALCGETCURRENTCONTEXT)(ALCvoid); -typedef ALCAPI ALCenum ( * ALCGETENUMVALUE)(ALCdevice *device, const ALCubyte *enumName); -typedef ALCAPI ALCenum ( * ALCGETERROR)(ALCdevice *device); -typedef ALCAPI ALCvoid ( * ALCGETINTEGERV)(ALCdevice *device,ALCenum param,ALsizei size,ALCint *data); -typedef ALCAPI ALCvoid * ( * ALCGETPROCADDRESS)(ALCdevice *device, const ALCubyte *funcName); -typedef ALCAPI const ALCubyte* ( * ALCGETSTRING)(ALCdevice *device,ALCenum param); -typedef ALCAPI ALCboolean ( * ALCISEXTENSIONPRESENT)(ALCdevice *device, const ALCubyte *extName); -typedef ALCAPI ALCboolean ( * ALCMAKECONTEXTCURRENT)(ALCcontext *context); -typedef ALCAPI ALCdevice* ( * ALCOPENDEVICE)(const ALCubyte *deviceName); -typedef ALCAPI ALCvoid ( * ALCPROCESSCONTEXT)(ALCcontext *pContext); -typedef ALCAPI ALCvoid ( * ALCSUSPENDCONTEXT)(ALCcontext *pContext); - - - -typedef ALCAPI ALvoid ( * ALGENBUFFERS)(ALsizei n, ALuint* bufferNames); -typedef ALCAPI ALvoid ( * ALDELETEBUFFERS)(ALsizei n, const ALuint* bufferNames); -typedef ALCAPI ALboolean ( * ALISBUFFER)(ALuint bufferName); -typedef ALCAPI ALvoid ( * ALBUFFERDATA)(ALuint bufferName, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq); -typedef ALCAPI ALvoid ( * ALGETBUFFERF)(ALuint bufferName, ALenum param, ALfloat* value); -typedef ALCAPI ALvoid ( * ALGETBUFFERI)(ALuint bufferName, ALenum param, ALint* value); -typedef ALCAPI ALvoid ( * ALENABLE)(ALenum capability); -typedef ALCAPI ALvoid ( * ALDISABLE)(ALenum capability); -typedef ALCAPI ALvoid ( * ALDOPPLERFACTOR)(ALfloat value); -typedef ALCAPI ALvoid ( * ALDOPPLERVELOCITY)(ALfloat value); -typedef ALCAPI ALvoid ( * ALDISTANCEMODEL)(ALenum value); -typedef ALCAPI ALboolean ( * ALGETBOOLEAN)(ALenum param); -typedef ALCAPI ALvoid ( * ALGETBOOLEANV)(ALenum param, ALboolean* data); -typedef ALCAPI ALdouble ( * ALGETDOUBLE)(ALenum param); -typedef ALCAPI ALvoid ( * ALGETDOUBLEV)(ALenum param, ALdouble* data); -typedef ALCAPI ALfloat ( * ALGETFLOAT)(ALenum param); -typedef ALCAPI ALvoid ( * ALGETFLOATV)(ALenum param, ALfloat* data); -typedef ALCAPI ALint ( * ALGETINTEGER)(ALenum param); -typedef ALCAPI ALvoid ( * ALGETINTEGERV)(ALenum param, ALint* data); -typedef ALCAPI ALenum ( * ALGETENUMVALUE)(const ALubyte* ename); -typedef ALCAPI ALenum ( * ALGETERROR)(ALvoid); -typedef ALCAPI ALvoid* ( * ALGETPROCADDRESS)(const ALubyte* fname); -typedef ALCAPI const ALubyte* ( * ALGETSTRING)(ALenum param); -typedef ALCAPI ALboolean ( * ALISEXTENSIONPRESENT)(const ALubyte* ename); -typedef ALCAPI ALboolean ( * ALISENABLED)(ALenum capability); -typedef ALCAPI ALvoid ( * ALLISTENERF)(ALenum param, ALfloat value); -typedef ALCAPI ALvoid ( * ALLISTENER3F)(ALenum param, ALfloat v1, ALfloat v2, ALfloat v3); -typedef ALCAPI ALvoid ( * ALLISTENERFV)(ALenum param, const ALfloat* values); -typedef ALCAPI ALvoid ( * ALLISTENERI)(ALenum param, ALint value); -typedef ALCAPI ALvoid ( * ALGETLISTENERF)(ALenum param, ALfloat* value); -typedef ALCAPI ALvoid ( * ALGETLISTENER3F)(ALenum param, ALfloat* v1, ALfloat* v2, ALfloat* v3); -typedef ALCAPI ALvoid ( * ALGETLISTENERFV)(ALenum param, ALfloat* values); -typedef ALCAPI ALvoid ( * ALGETLISTENERI)(ALenum param, ALint* value); -typedef ALCAPI ALvoid ( * ALGENSOURCES)(ALsizei n, ALuint* sourceNames); -typedef ALCAPI ALvoid ( * ALDELETESOURCES)(ALsizei n, const ALuint* sourceNames); -typedef ALCAPI ALboolean ( * ALISSOURCE)(ALuint sourceName); -typedef ALCAPI ALvoid ( * ALSOURCEF)(ALuint sourceName, ALenum param, ALfloat value); -typedef ALCAPI ALvoid ( * ALSOURCEFV)(ALuint sourceName, ALenum param, const ALfloat* values); -typedef ALCAPI ALvoid ( * ALSOURCE3F)(ALuint sourceName, ALenum param, ALfloat v1, ALfloat v2, ALfloat v3); -typedef ALCAPI ALvoid ( * ALSOURCEI)(ALuint sourceName, ALenum param, ALint value); -typedef ALCAPI ALvoid ( * ALGETSOURCEF)(ALuint sourceName, ALenum param, ALfloat* value); -typedef ALCAPI ALvoid ( * ALGETSOURCE3F)(ALuint sourceName, ALenum param, ALfloat* v1, ALfloat* v2, ALfloat* v3); -typedef ALCAPI ALvoid ( * ALGETSOURCEFV)(ALuint sourceName, ALenum param, ALfloat* values); -typedef ALCAPI ALvoid ( * ALGETSOURCEI)(ALuint sourceName, ALenum param, ALint* value); -typedef ALCAPI ALvoid ( * ALSOURCEPLAY)(ALuint sourceName); -typedef ALCAPI ALvoid ( * ALSOURCEPLAYV)(ALsizei n, const ALuint* sourceNames); -typedef ALCAPI ALvoid ( * ALSOURCEPAUSE)(ALuint sourceName); -typedef ALCAPI ALvoid ( * ALSOURCEPAUSEV)(ALsizei n, const ALuint* sourceNames); -typedef ALCAPI ALvoid ( * ALSOURCESTOP)(ALuint sourceName); -typedef ALCAPI ALvoid ( * ALSOURCESTOPV)(ALsizei n, const ALuint* sourceNames); -typedef ALCAPI ALvoid ( * ALSOURCEREWIND)(ALuint sourceName); -typedef ALCAPI ALvoid ( * ALSOURCEREWINDV)(ALsizei n, const ALuint* sourceNames); -typedef ALCAPI ALvoid ( * ALSOURCEQUEUEBUFFERS)(ALuint sourceName, ALsizei n, const ALuint* buffers); -typedef ALCAPI ALvoid ( * ALSOURCEUNQUEUEBUFFERS)(ALuint sourceName, ALsizei n, ALuint* buffers); - - - -ALCCLOSEDEVICE pfalcCloseDevice; -ALCCREATECONTEXT pfalcCreateContext; -ALCDESTROYCONTEXT pfalcDestroyContext; -ALCGETCONTEXTSDEVICE pfalcGetContextsDevice; -ALCGETCURRENTCONTEXT pfalcGetCurrentContext; -ALCGETENUMVALUE pfalcGetEnumValue; -ALCGETERROR pfalcGetError; -ALCGETINTEGERV pfalcGetIntegerv; -ALCGETPROCADDRESS pfalcGetProcAddress; -ALCGETSTRING pfalcGetString; -ALCISEXTENSIONPRESENT pfalcIsExtensionPresent; -ALCMAKECONTEXTCURRENT pfalcMakeContextCurrent; -ALCOPENDEVICE pfalcOpenDevice; -ALCPROCESSCONTEXT pfalcProcessContext; -ALCSUSPENDCONTEXT pfalcSuspendContext; - -ALGENBUFFERS pfalGenBuffers; -ALDELETEBUFFERS pfalDeleteBuffers; -ALISBUFFER pfalIsBuffer; -ALBUFFERDATA pfalBufferData; -ALGETBUFFERF pfalGetBufferf; -ALGETBUFFERI pfalGetBufferi; -ALENABLE pfalEnable; -ALDISABLE pfalDisable; -ALDOPPLERFACTOR pfalDopplerFactor; -ALDOPPLERVELOCITY pfalDopplerVelocity; -ALDISTANCEMODEL pfalDistanceModel; -ALGETBOOLEAN pfalGetBoolean; -ALGETBOOLEANV pfalGetBooleanv; -ALGETDOUBLE pfalGetDouble; -ALGETDOUBLEV pfalGetDoublev; -ALGETFLOAT pfalGetFloat; -ALGETFLOATV pfalGetFloatv; -ALGETINTEGER pfalGetInteger; -ALGETINTEGERV pfalGetIntegerv; -ALGETENUMVALUE pfalGetEnumValue; -ALGETERROR pfalGetError; -ALGETPROCADDRESS pfalGetProcAddress; -ALGETSTRING pfalGetString; -ALISEXTENSIONPRESENT pfalIsExtensionPresent; -ALISENABLED pfalIsEnabled; -ALLISTENERF pfalListenerf; -ALLISTENER3F pfalListener3f; -ALLISTENERFV pfalListenerfv; -ALLISTENERI pfalListeneri; -ALGETLISTENERF pfalGetListenerf; -ALGETLISTENER3F pfalGetListener3f; -ALGETLISTENERFV pfalGetListenerfv; -ALGETLISTENERI pfalGetListeneri; -ALGENSOURCES pfalGenSources; -ALDELETESOURCES pfalDeleteSources; -ALISSOURCE pfalIsSource; -ALSOURCEF pfalSourcef; -ALSOURCEFV pfalSourcefv; -ALSOURCE3F pfalSource3f; -ALSOURCEI pfalSourcei; -ALGETSOURCEF pfalGetSourcef; -ALGETSOURCE3F pfalGetSource3f; -ALGETSOURCEFV pfalGetSourcefv; -ALGETSOURCEI pfalGetSourcei; -ALSOURCEPLAY pfalSourcePlay; -ALSOURCEPLAYV pfalSourcePlayv; -ALSOURCEPAUSE pfalSourcePause; -ALSOURCEPAUSEV pfalSourcePausev; -ALSOURCESTOP pfalSourceStop; -ALSOURCESTOPV pfalSourceStopv; -ALSOURCEREWIND pfalSourceRewind; -ALSOURCEREWINDV pfalSourceRewindv; -ALSOURCEQUEUEBUFFERS pfalSourceQueueBuffers; -ALSOURCEUNQUEUEBUFFERS pfalSourceUnqueueBuffers; - - - -#endif /* __OPENAL_BINDING_H__ */ diff --git a/wolf3d/newCode/env/openal_main.c b/wolf3d/newCode/env/openal_main.c deleted file mode 100644 index dd26477..0000000 --- a/wolf3d/newCode/env/openal_main.c +++ /dev/null @@ -1,244 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * openal_main.c: Interface to Sound Device. - * - * Author: Michael Liebscher - * Date: 2004 - * - */ - -#include "../wolfiphone.h" - - -#ifdef _WIN32 - - #define OPENAL_DLL_NAME "openal32.dll" - -#elif __unix__ - - #define OPENAL_DLL_NAME "libopenal.so" - -#elif IPHONE - -#define OPENAL_DLL_NAME "/System/Library/Frameworks/OpenAL.framework/OpenAL" - -#else - - #error "Please define OPENAL_DLL_NAME" - -#endif - -PRIVATE ALCcontext *Context; -PRIVATE ALCdevice *Device; - - -cvar_t *s_driver; -cvar_t *s_device; - - -char *deviceList; -char *sound_devices[ 12 ]; - -W16 numSoundDevices, numDefaultSoundDevice; - - - -/* ------------------------------------------------------------------------------ - Function: Sound_Device_getDeviceList -Get OpenAL device list. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PRIVATE void Sound_Device_getDeviceList( void ) -{ - char deviceName[ 256 ]; - - my_strlcpy( deviceName, s_device->string, sizeof( deviceName ) ); - if( pfalcIsExtensionPresent( NULL, (ALubyte*)"ALC_ENUMERATION_EXT") == AL_TRUE ) - { - // try out enumeration extension - deviceList = (char *)pfalcGetString( NULL, ALC_DEVICE_SPECIFIER ); - for( numSoundDevices = 0 ; numSoundDevices < 12 ; ++numSoundDevices ) - { - sound_devices[ numSoundDevices ] = NULL; - } - - for( numSoundDevices = 0 ; numSoundDevices < 12 ; ++numSoundDevices ) - { - sound_devices[ numSoundDevices ] = deviceList; - if( strcmp( sound_devices[ numSoundDevices ], deviceName ) == 0 ) - { - numDefaultSoundDevice = numSoundDevices; - } - deviceList += strlen( deviceList ); - if( deviceList[ 0 ] == 0 ) - { - if( deviceList[ 1 ] == 0 ) - { - break; - } - else - { - deviceList += 1; - } - } - - } // End for numSoundDevices = 0 ; numSoundDevices < 12 ; ++numSoundDevices - } - -} - - -/* ------------------------------------------------------------------------------ - Function: Sound_Device_Register -Register OpenAL cvars. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PRIVATE void Sound_Device_Register( void ) -{ - s_driver = Cvar_Get( "s_driver", OPENAL_DLL_NAME, CVAR_ARCHIVE ); - s_device = Cvar_Get( "s_device", "", CVAR_LATCH | CVAR_ARCHIVE ); -} - -/* ------------------------------------------------------------------------------ - Function: Sound_Device_Setup -Setup OpenAL sound device. - - Parameters: Nothing. - - Returns: true on success, otherwise false. - - Notes: Call Sound_Device_Shutdown() when you are done. ------------------------------------------------------------------------------ -*/ -PUBLIC _boolean Sound_Device_Setup( void ) -{ - Com_Printf( "...Initializing OpenAL subsystem\n" ); - - Sound_Device_Register(); - - // Initialize our OpenAL dynamic bindings - if( ! OpenAL_Init( s_driver->string ) ) - { - Com_Printf( "[%s]: Dynamic binding of (%s) failed\n", "openal_main.c", s_driver->string ); - - goto failed; - } - - - Sound_Device_getDeviceList(); - - - Device = pfalcOpenDevice( (ALCubyte *)( (s_device->string[ 0 ]) ? s_device->string : NULL ) ); - if( Device == NULL ) - { - Com_Printf( "Failed to Initialize OpenAL\n" ); - - goto failed; - } - - // Create context(s) - Context = pfalcCreateContext( Device, NULL ); - if( Context == NULL ) - { - Com_Printf( "Failed to initialize OpenAL\n" ); - - goto failed; - } - - - - // Set active context - pfalcGetError( Device ); - pfalcMakeContextCurrent( Context ); - if( pfalcGetError( Device ) != ALC_NO_ERROR ) - { - Com_Printf( "Failed to Make Context Current\n" ); - - goto failed; - } - - return true; - - - -failed: - - OpenAL_Shutdown(); - - if( Context ) - { - pfalcDestroyContext( Context ); - Context = NULL; - } - - if( Device ) - { - pfalcCloseDevice( Device ); - Device = NULL; - } - - return false; -} - -/* ------------------------------------------------------------------------------ - Function: Sound_Device_Shutdown -Shutdown OpenAL sound device. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void Sound_Device_Shutdown( void ) -{ - if( Context ) - { - pfalcMakeContextCurrent( NULL ); - pfalcDestroyContext( Context ); - - Context = NULL; - } - - if( Device ) - { - pfalcCloseDevice( Device ); - - Device = NULL; - } - - OpenAL_Shutdown(); -} - diff --git a/wolf3d/newCode/env/opengl_draw.c b/wolf3d/newCode/env/opengl_draw.c deleted file mode 100644 index ccec2b8..0000000 --- a/wolf3d/newCode/env/opengl_draw.c +++ /dev/null @@ -1,339 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * opengl_draw.c: OpenGL drawing routines. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - - -#include "../wolfiphone.h" - -texture_t *draw_chars; - -//extern _boolean scrap_dirty; -//void Scrap_Upload (void); - - - -/* ------------------------------------------------------------------------------ - Function: R_Draw_Char -Draw ASCII character to the screen. - - Parameters: x -[in] x-coordinate. - y -[in] y-coordinate. - num -[in] ASCII character value. - myfont -[in] Valid pointer to font_t structure. - - Returns: Nothing. - - Notes: - It can be clipped to the top of the screen to allow the console to be - smoothly scrolled off. - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_Draw_Character( int x, int y, int num, font_t *myfont ) -{ - int row, col; - int scale, sh; // scaled width, height - float frow, fcol; - - num &= 255; - - if( (num & 127) == 32 ) - { - return; // space - } - - if( y <= -myfont->nMaxHeight ) - { - return; // totally off screen - } - - scale = myfont->nSize; - sh = myfont->nMaxHeight; - - row = (num >> 4) - 2; - col = num & 15; - - frow = row * myfont->hFrac; - fcol = col * myfont->wFrac; - - - pfglColor4ubv( myfont->colour ); - - pfglEnable( GL_BLEND ); - - - R_Bind( myfont->texfont->texnum ); - - - pfglBegin( GL_QUADS ); - - - pfglTexCoord2f( fcol, frow ); - pfglVertex2i( x, y ); - - pfglTexCoord2f( fcol+myfont->wFrac, frow ); - pfglVertex2i( x+myfont->nMaxWidth*scale, y ); - - pfglTexCoord2f( fcol+myfont->wFrac, frow+myfont->hFrac ); - pfglVertex2i( x+myfont->nMaxWidth*scale, (y+sh*scale) ); - - pfglTexCoord2f( fcol, frow+myfont->hFrac ); - pfglVertex2i( x, (y+sh*scale) ); - - - - pfglEnd(); - - pfglDisable( GL_BLEND ); - pfglColor3f( 1, 1, 1 ); -} - - -/* ------------------------------------------------------------------------------ - Function: R_Draw_StretchPic -Draw stretched image to the screen. - - Parameters: x -[in] x-coordinate. - y -[in] y-coordinate. - w -[in] width of region. - h -[in] height of region. - pic -[in] Image filename to stretch. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_Draw_StretchPic( int x, int y, int w, int h, const char *pic ) -{ - texture_t *gl; - - gl = TM_FindTexture( pic, TT_Pic ); - if( ! gl ) - { - Com_Printf( "Can't find pic: %s\n", pic ); - return; - } - -// if( scrap_dirty ) -// Scrap_Upload(); - - - R_Bind( gl->texnum ); - - pfglBegin( GL_QUADS ); - - pfglTexCoord2f( 0.0f, 0.0f ); pfglVertex2i( x, y ); - pfglTexCoord2f( 1.0f, 0.0f ); pfglVertex2i( x+w, y ); - pfglTexCoord2f( 1.0f, 1.0f ); pfglVertex2i( x+w, y+h ); - pfglTexCoord2f( 0.0f, 1.0f ); pfglVertex2i( x, y+h ); - - pfglEnd(); -} - - -/* ------------------------------------------------------------------------------ - Function: R_Draw_Pic -Draw image to the screen. - - Parameters: x -[in] x-coordinate. - y -[in] y-coordinate. - pic -[in] Image filename to draw. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_Draw_Pic( int x, int y, const char *pic ) -{ - texture_t *tex; - - tex = TM_FindTexture( pic, TT_Pic ); - if( ! tex ) - { - Com_Printf( "Can't find pic: %s\n", pic ); - return; - } -// if( scrap_dirty ) -// Scrap_Upload(); - - - - R_Bind( tex->texnum ); - - pfglBegin( GL_QUADS ); - - pfglTexCoord2f( 0.0, 0.0 ); pfglVertex2i( x, y ); - pfglTexCoord2f( 1.0, 0.0 ); pfglVertex2i( x + tex->width, y ); - pfglTexCoord2f( 1.0, 1.0 ); pfglVertex2i( x + tex->width, y + tex->height ); - pfglTexCoord2f( 0.0, 1.0 ); pfglVertex2i( x, y + tex->height ); - - pfglEnd(); - -} - - - -/* ------------------------------------------------------------------------------ - Function: R_Draw_Tile -Tile image on the screen. - - Parameters: x -[in] x-coordinate. - y -[in] y-coordinate. - w -[in] width of region. - h -[in] height of region. - pic -[in] Image filename to draw. - - Returns: Nothing. - - Notes: - This repeats a tile graphic to fill a region on the screen. ------------------------------------------------------------------------------ -*/ -PUBLIC void R_Draw_Tile( int x, int y, int w, int h, const char *pic ) -{ - texture_t *image; - - image = TM_FindTexture( pic, TT_Wall ); - if( ! image ) - { - Com_Printf( "Can't find pic: %s\n", pic ); - return; - } - - - R_Bind( image->texnum ); - - pfglBegin( GL_QUADS ); - - - pfglTexCoord2i( x/image->upload_width, y/image->upload_height); - pfglVertex2i( x, y ); - - pfglTexCoord2i( (x + w)/image->upload_width, y/image->upload_height); - pfglVertex2i( x + w, y ); - - pfglTexCoord2i( (x+w)/image->upload_width, (y+h)/image->upload_height); - pfglVertex2i( x + w, y + h ); - - pfglTexCoord2i( x/image->upload_width, (y+h)/image->upload_height ); - pfglVertex2i( x, y + h ); - - - pfglEnd (); - -} - - -/* ------------------------------------------------------------------------------ - Function: R_Draw_Fill -Fills a box of pixels with a single color. - - Parameters: x -[in] x-coordinate. - y -[in] y-coordinate. - w -[in] width of region. - h -[in] height of region. - c -[in] Colour to fill region. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_Draw_Fill( int x, int y, int w, int h, colour3_t c ) -{ - qglScissor( x, 320-(y+h), w, h ); - qglEnable( GL_SCISSOR_TEST ); - qglClearColor( c[0] / 255.0f, c[1] / 255.0f, c[2] / 255.0f, 1.0f ); - qglClear( GL_COLOR_BUFFER_BIT ); - qglDisable( GL_SCISSOR_TEST ); -} - -PUBLIC void R_Draw_Blend( int x, int y, int w, int h, colour4_t c ) -{ - pfglDisable( GL_TEXTURE_2D ); - pfglColor4ubv( c ); - - pfglBegin( GL_QUADS ); - - pfglVertex2i( x, y ); - pfglVertex2i( x+w, y ); - pfglVertex2i( x+w, y+h ); - pfglVertex2i( x, y+h ); - - pfglEnd(); - - pfglColor3f( 1, 1, 1 ); - pfglEnable( GL_TEXTURE_2D ); -} - -/* ------------------------------------------------------------------------------ - Function: R_Draw_Line -Draw a line on the screen. - - Parameters: nXStart -[in] x-coordinate of starting point. - nYStart -[in] y-coordinate of starting point. - nXEnd -[in] x-coordinate of ending point. - nYEnd -[in] y-coordinate of ending point. - c -[in] Colour value. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_Draw_Line( int nXStart, int nYStart, int nXEnd, int nYEnd, int width, colour3_t c ) -{ - pfglDisable( GL_TEXTURE_2D ); - - - pfglColor3ubv( c ); - - - pfglLineWidth( (float)width ); - - pfglBegin( GL_LINES ); - - pfglVertex2i( nXStart, nYStart ); - pfglVertex2i( nXEnd, nYEnd ); - - pfglEnd(); - - pfglColor3f( 1, 1, 1 ); - pfglEnable( GL_TEXTURE_2D ); -} - - diff --git a/wolf3d/newCode/env/opengl_extension.c b/wolf3d/newCode/env/opengl_extension.c deleted file mode 100644 index 7c3b654..0000000 --- a/wolf3d/newCode/env/opengl_extension.c +++ /dev/null @@ -1,1024 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * myopengl_extension.c: Interface to OpenGL extensions. - * - * Author: Michael Liebscher - * Date: 2004 - * - */ - -/* - - This module implements the binding of OpenGL extensions - to our function pointers. - - To use this module call the function GL_ConfigExtensions(). - -*/ - -#include - -#include "myopengl.h" -#include "opengl_local.h" -#include "myopengl_extension.h" -#include "../../common/common_utils.h" -#include "../../common/common.h" - - - - /* Implemented here */ - - -// Define what you require here. -// If hardware does not meet these defines, then extension load will fail. -#define MY_MAX_ARB_TEXTURESTAGES 4 - -#define MY_GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTR 128 -#define MY_GL_MAX_VERTEX_SHADER_LOCALS_EXT 68 -#define MY_GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 2 -#define MY_GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 97 -#define MY_GL_MAX_VERTEX_SHADER_VARIANTS_EXT 4 - - - - -GL_Extensions gl_ext; - - - -////////////////////////////// -// -// ARB Functions -// -////////////////////////////// - -PRIVATE W8 ConfigARBMultiTexture( const char *glext ) -{ - if( strstr( glext, "GL_ARB_multitexture" ) == NULL ) - { - Com_Printf( "...GL_ARB_multitexture not found\n" ); - return 0; - } - - if( ! (pfglActiveTextureARB = ( void * )pfwglGetProcAddress( "glActiveTextureARB" )) ) return 0; - if( ! (pfglClientActiveTextureARB = ( void * )pfwglGetProcAddress("glClientActiveTextureARB")))return 0; - - if( ! (pfglMultiTexCoord1sARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord1sARB" ))) return 0; - if( ! (pfglMultiTexCoord1iARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord1iARB" ))) return 0; - if( ! (pfglMultiTexCoord1fARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord1fARB" ))) return 0; - if( ! (pfglMultiTexCoord1dARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord1dARB" ))) return 0; - if( ! (pfglMultiTexCoord2sARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord2sARB" ))) return 0; - if( ! (pfglMultiTexCoord2iARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord2iARB" ))) return 0; - if( ! (pfglMultiTexCoord2fARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord2fARB" ))) return 0; - if( ! (pfglMultiTexCoord2dARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord2dARB" ))) return 0; - if( ! (pfglMultiTexCoord3sARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord3sARB" ))) return 0; - if( ! (pfglMultiTexCoord3iARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord3iARB" ))) return 0; - if( ! (pfglMultiTexCoord3fARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord3fARB" ))) return 0; - if( ! (pfglMultiTexCoord3dARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord3dARB" ))) return 0; - if( ! (pfglMultiTexCoord4sARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord4sARB" ))) return 0; - if( ! (pfglMultiTexCoord4iARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord4iARB" ))) return 0; - if( ! (pfglMultiTexCoord4fARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord4fARB" ))) return 0; - if( ! (pfglMultiTexCoord4dARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord4dARB" ))) return 0; - - if( ! (pfglMultiTexCoord1svARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord1svARB" ))) return 0; - if( ! (pfglMultiTexCoord1ivARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord1ivARB" ))) return 0; - if( ! (pfglMultiTexCoord1fvARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord1fvARB" ))) return 0; - if( ! (pfglMultiTexCoord1dvARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord1dvARB" ))) return 0; - if( ! (pfglMultiTexCoord2svARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord2svARB" ))) return 0; - if( ! (pfglMultiTexCoord2ivARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord2ivARB" ))) return 0; - if( ! (pfglMultiTexCoord2fvARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord2fvARB" ))) return 0; - if( ! (pfglMultiTexCoord2dvARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord2dvARB" ))) return 0; - if( ! (pfglMultiTexCoord3svARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord3svARB" ))) return 0; - if( ! (pfglMultiTexCoord3ivARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord3ivARB" ))) return 0; - if( ! (pfglMultiTexCoord3fvARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord3fvARB" ))) return 0; - if( ! (pfglMultiTexCoord3dvARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord3dvARB" ))) return 0; - if( ! (pfglMultiTexCoord4svARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord4svARB" ))) return 0; - if( ! (pfglMultiTexCoord4ivARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord4ivARB" ))) return 0; - if( ! (pfglMultiTexCoord4fvARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord4fvARB" ))) return 0; - if( ! (pfglMultiTexCoord4dvARB = ( void * )pfwglGetProcAddress( "glMultiTexCoord4dvARB" ))) return 0; - - - Com_Printf( "...enabling GL_ARB_multitexture\n" ); - - return 1; -} - - -PRIVATE W8 ConfigARBTextureCompression( const char *glext ) -{ - if( strstr( glext, "GL_ARB_texture_compression" ) == NULL ) - { - Com_Printf( "...GL_ARB_texture_compression not found\n" ); - return 0; - } - - if( ! (pfglCompressedTexImage3DARB = ( void * )pfwglGetProcAddress( "glCompressedTexImage3DARB" ))) return 0; - if( ! (pfglCompressedTexImage2DARB = ( void * )pfwglGetProcAddress( "glCompressedTexImage2DARB" ))) return 0; - if( ! (pfglCompressedTexImage1DARB = ( void * )pfwglGetProcAddress( "glCompressedTexImage1DARB" ))) return 0; - if( ! (pfglCompressedTexSubImage3DARB = ( void * )pfwglGetProcAddress( "glCompressedTexSubImage3DARB" ))) return 0; - if( ! (pfglCompressedTexSubImage2DARB = ( void * )pfwglGetProcAddress( "glCompressedTexSubImage2DARB" ))) return 0; - if( ! (pfglCompressedTexSubImage1DARB = ( void * )pfwglGetProcAddress( "glCompressedTexSubImage1DARB" ))) return 0; - if( ! (pfglGetCompressedTexImageARB = ( void * )pfwglGetProcAddress( "glGetCompressedTexImageARB" ))) return 0; - - Com_Printf( "...enabling GL_ARB_texture_compression\n" ); - - return 1; -} - - -PRIVATE W8 CheckARBTextureCubeMap( const char *glext ) -{ - if( strstr( glext, "GL_ARB_texture_cube_map" ) == NULL ) - { - Com_Printf( "...GL_ARB_texture_cube_map not found\n" ); - return 0; - } - - Com_Printf( "...enabling GL_ARB_texture_cube_map\n" ); - - return 1; -} - -PRIVATE W8 ConfigARBVertexProgram( const char *glext ) -{ - if( strstr( glext, "GL_ARB_vertex_program" ) == NULL ) - { - return 0; - } - - if( ! (pfglVertexAttrib1sARB = ( void * )pfwglGetProcAddress("glVertexAttrib1sARB"))) return 0; - if( ! (pfglVertexAttrib1fARB = ( void * )pfwglGetProcAddress("glVertexAttrib1fARB"))) return 0; - if( ! (pfglVertexAttrib1dARB = ( void * )pfwglGetProcAddress("glVertexAttrib1dARB"))) return 0; - if( ! (pfglVertexAttrib2sARB = ( void * )pfwglGetProcAddress("glVertexAttrib2sARB"))) return 0; - if( ! (pfglVertexAttrib2fARB = ( void * )pfwglGetProcAddress("glVertexAttrib2fARB"))) return 0; - if( ! (pfglVertexAttrib2dARB = ( void * )pfwglGetProcAddress("glVertexAttrib2dARB"))) return 0; - if( ! (pfglVertexAttrib3sARB = ( void * )pfwglGetProcAddress("glVertexAttrib3sARB"))) return 0; - if( ! (pfglVertexAttrib3fARB = ( void * )pfwglGetProcAddress("glVertexAttrib3fARB"))) return 0; - if( ! (pfglVertexAttrib3dARB = ( void * )pfwglGetProcAddress("glVertexAttrib3dARB"))) return 0; - if( ! (pfglVertexAttrib4sARB = ( void * )pfwglGetProcAddress("glVertexAttrib4sARB"))) return 0; - if( ! (pfglVertexAttrib4fARB = ( void * )pfwglGetProcAddress("glVertexAttrib4fARB"))) return 0; - if( ! (pfglVertexAttrib4dARB = ( void * )pfwglGetProcAddress("glVertexAttrib4dARB"))) return 0; - if( ! (pfglVertexAttrib4NubARB = ( void * )pfwglGetProcAddress("glVertexAttrib4NubARB"))) return 0; - if( ! (pfglVertexAttrib1svARB = ( void * )pfwglGetProcAddress("glVertexAttrib1svARB"))) return 0; - if( ! (pfglVertexAttrib1fvARB = ( void * )pfwglGetProcAddress("glVertexAttrib1fvARB"))) return 0; - if( ! (pfglVertexAttrib1dvARB = ( void * )pfwglGetProcAddress("glVertexAttrib1dvARB"))) return 0; - if( ! (pfglVertexAttrib2svARB = ( void * )pfwglGetProcAddress("glVertexAttrib2svARB"))) return 0; - if( ! (pfglVertexAttrib2fvARB = ( void * )pfwglGetProcAddress("glVertexAttrib2fvARB"))) return 0; - if( ! (pfglVertexAttrib2dvARB = ( void * )pfwglGetProcAddress("glVertexAttrib2dvARB"))) return 0; - if( ! (pfglVertexAttrib3svARB = ( void * )pfwglGetProcAddress("glVertexAttrib3svARB"))) return 0; - if( ! (pfglVertexAttrib3fvARB = ( void * )pfwglGetProcAddress("glVertexAttrib3fvARB"))) return 0; - if( ! (pfglVertexAttrib3dvARB = ( void * )pfwglGetProcAddress("glVertexAttrib3dvARB"))) return 0; - if( ! (pfglVertexAttrib4bvARB = ( void * )pfwglGetProcAddress("glVertexAttrib4bvARB"))) return 0; - if( ! (pfglVertexAttrib4svARB = ( void * )pfwglGetProcAddress("glVertexAttrib4svARB"))) return 0; - if( ! (pfglVertexAttrib4ivARB = ( void * )pfwglGetProcAddress("glVertexAttrib4ivARB"))) return 0; - if( ! (pfglVertexAttrib4ubvARB = ( void * )pfwglGetProcAddress("glVertexAttrib4ubvARB"))) return 0; - if( ! (pfglVertexAttrib4usvARB = ( void * )pfwglGetProcAddress("glVertexAttrib4usvARB"))) return 0; - if( ! (pfglVertexAttrib4uivARB = ( void * )pfwglGetProcAddress("glVertexAttrib4uivARB"))) return 0; - if( ! (pfglVertexAttrib4fvARB = ( void * )pfwglGetProcAddress("glVertexAttrib4fvARB"))) return 0; - if( ! (pfglVertexAttrib4dvARB = ( void * )pfwglGetProcAddress("glVertexAttrib4dvARB"))) return 0; - if( ! (pfglVertexAttrib4NbvARB = ( void * )pfwglGetProcAddress("glVertexAttrib4NbvARB"))) return 0; - if( ! (pfglVertexAttrib4NsvARB = ( void * )pfwglGetProcAddress("glVertexAttrib4NsvARB"))) return 0; - if( ! (pfglVertexAttrib4NivARB = ( void * )pfwglGetProcAddress("glVertexAttrib4NivARB"))) return 0; - if( ! (pfglVertexAttrib4NubvARB = ( void * )pfwglGetProcAddress("glVertexAttrib4NubvARB"))) return 0; - if( ! (pfglVertexAttrib4NusvARB = ( void * )pfwglGetProcAddress("glVertexAttrib4NusvARB"))) return 0; - if( ! (pfglVertexAttrib4NuivARB = ( void * )pfwglGetProcAddress("glVertexAttrib4NuivARB"))) return 0; - if( ! (pfglVertexAttribPointerARB = ( void * )pfwglGetProcAddress("glVertexAttribPointerARB"))) return 0; - if( ! (pfglEnableVertexAttribArrayARB = ( void * )pfwglGetProcAddress("glEnableVertexAttribArrayARB"))) return 0; - if( ! (pfglDisableVertexAttribArrayARB = ( void * )pfwglGetProcAddress("glDisableVertexAttribArrayARB"))) return 0; - if( ! (pfglProgramStringARB = ( void * )pfwglGetProcAddress("glProgramStringARB"))) return 0; - if( ! (pfglBindProgramARB = ( void * )pfwglGetProcAddress("glBindProgramARB"))) return 0; - if( ! (pfglDeleteProgramsARB = ( void * )pfwglGetProcAddress("glDeleteProgramsARB"))) return 0; - if( ! (pfglGenProgramsARB = ( void * )pfwglGetProcAddress("glGenProgramsARB"))) return 0; - if( ! (pfglProgramEnvParameter4fARB = ( void * )pfwglGetProcAddress("glProgramEnvParameter4fARB"))) return 0; - if( ! (pfglProgramEnvParameter4dARB = ( void * )pfwglGetProcAddress("glProgramEnvParameter4dARB"))) return 0; - if( ! (pfglProgramEnvParameter4fvARB = ( void * )pfwglGetProcAddress("glProgramEnvParameter4fvARB"))) return 0; - if( ! (pfglProgramEnvParameter4dvARB = ( void * )pfwglGetProcAddress("glProgramEnvParameter4dvARB"))) return 0; - if( ! (pfglProgramLocalParameter4fARB = ( void * )pfwglGetProcAddress("glProgramLocalParameter4fARB"))) return 0; - if( ! (pfglProgramLocalParameter4dARB = ( void * )pfwglGetProcAddress("glProgramLocalParameter4dARB"))) return 0; - if( ! (pfglProgramLocalParameter4fvARB = ( void * )pfwglGetProcAddress("glProgramLocalParameter4fvARB"))) return 0; - if( ! (pfglProgramLocalParameter4dvARB = ( void * )pfwglGetProcAddress("glProgramLocalParameter4dvARB"))) return 0; - if( ! (pfglGetProgramEnvParameterfvARB = ( void * )pfwglGetProcAddress("glGetProgramEnvParameterfvARB"))) return 0; - if( ! (pfglGetProgramEnvParameterdvARB = ( void * )pfwglGetProcAddress("glGetProgramEnvParameterdvARB"))) return 0; - if( ! (pfglGetProgramLocalParameterfvARB = ( void * )pfwglGetProcAddress("glGetProgramLocalParameterfvARB"))) return 0; - if( ! (pfglGetProgramLocalParameterdvARB = ( void * )pfwglGetProcAddress("glGetProgramLocalParameterdvARB"))) return 0; - if( ! (pfglGetProgramivARB = ( void * )pfwglGetProcAddress("glGetProgramivARB"))) return 0; - if( ! (pfglGetProgramStringARB = ( void * )pfwglGetProcAddress("glGetProgramStringARB"))) return 0; - if( ! (pfglGetVertexAttribdvARB = ( void * )pfwglGetProcAddress("glGetVertexAttribdvARB"))) return 0; - if( ! (pfglGetVertexAttribfvARB = ( void * )pfwglGetProcAddress("glGetVertexAttribfvARB"))) return 0; - if( ! (pfglGetVertexAttribivARB = ( void * )pfwglGetProcAddress("glGetVertexAttribivARB"))) return 0; - if( ! (pfglGetVertexAttribPointervARB = ( void * )pfwglGetProcAddress("glGetVertexAttribPointervARB"))) return 0; - if( ! (pfglIsProgramARB = ( void * )pfwglGetProcAddress("glIsProgramARB"))) return 0; - - Com_Printf( "...enabling GL_ARB_vertex_program\n" ); - - return 1; -} - - -//////////////////////////////////////////////////////////// - - - - -////////////////////////////// -// -// EXT Functions -// -////////////////////////////// - - -PRIVATE W8 CheckEXTTextureCompressionS3TC( const char *glext ) -{ - if( strstr( glext, "GL_EXT_texture_compression_s3tc" ) == NULL ) - { - Com_Printf( "...GL_EXT_texture_compression_s3tc not found\n" ); - return 0; - } - - Com_Printf( "...enabling GL_EXT_texture_compression_s3tc\n" ); - - return 1; -} - -PRIVATE W8 CheckEXTTextureEnvCombine( const char *glext ) -{ - if( strstr( glext, "GL_EXT_texture_env_combine" ) == NULL ) - { - Com_Printf( "...GL_EXT_texture_env_combine not found\n" ); - return 0; - } - - Com_Printf( "...enabling GL_EXT_texture_env_combine\n" ); - - return 1; -} - - - -PRIVATE W8 ConfigEXTSecondaryColor( const char *glext ) -{ - if( strstr( glext, "GL_EXT_secondary_color" ) == NULL ) - { - Com_Printf( "...GL_EXT_secondary_color not found\n" ); - return 0; - } - - - if( ! (pfglSecondaryColor3bEXT = ( void * )pfwglGetProcAddress("glSecondaryColor3bEXT"))) return 0; - if( ! (pfglSecondaryColor3bvEXT = ( void * )pfwglGetProcAddress("glSecondaryColor3bvEXT"))) return 0; - if( ! (pfglSecondaryColor3dEXT = ( void * )pfwglGetProcAddress("glSecondaryColor3dEXT"))) return 0; - if( ! (pfglSecondaryColor3dvEXT = ( void * )pfwglGetProcAddress("glSecondaryColor3dvEXT"))) return 0; - if( ! (pfglSecondaryColor3fEXT = ( void * )pfwglGetProcAddress("glSecondaryColor3fEXT"))) return 0; - if( ! (pfglSecondaryColor3fvEXT = ( void * )pfwglGetProcAddress("glSecondaryColor3fvEXT"))) return 0; - if( ! (pfglSecondaryColor3iEXT = ( void * )pfwglGetProcAddress("glSecondaryColor3iEXT"))) return 0; - if( ! (pfglSecondaryColor3ivEXT = ( void * )pfwglGetProcAddress("glSecondaryColor3ivEXT"))) return 0; - if( ! (pfglSecondaryColor3sEXT = ( void * )pfwglGetProcAddress("glSecondaryColor3sEXT"))) return 0; - if( ! (pfglSecondaryColor3svEXT = ( void * )pfwglGetProcAddress("glSecondaryColor3svEXT"))) return 0; - if( ! (pfglSecondaryColor3ubEXT = ( void * )pfwglGetProcAddress("glSecondaryColor3ubEXT"))) return 0; - if( ! (pfglSecondaryColor3ubvEXT = ( void * )pfwglGetProcAddress("glSecondaryColor3ubvEXT"))) return 0; - if( ! (pfglSecondaryColor3uiEXT = ( void * )pfwglGetProcAddress("glSecondaryColor3uiEXT"))) return 0; - if( ! (pfglSecondaryColor3uivEXT = ( void * )pfwglGetProcAddress("glSecondaryColor3uivEXT"))) return 0; - if( ! (pfglSecondaryColor3usEXT = ( void * )pfwglGetProcAddress("glSecondaryColor3usEXT"))) return 0; - if( ! (pfglSecondaryColor3usvEXT = ( void * )pfwglGetProcAddress("glSecondaryColor3usvEXT"))) return 0; - if( ! (pfglSecondaryColorPointerEXT = ( void * )pfwglGetProcAddress("glSecondaryColorPointerEXT"))) return 0; - - Com_Printf( "...enabling GL_EXT_secondary_color\n" ); - - return 1; -} - -PRIVATE W8 ConfigEXTBlendColor( const char *glext ) -{ - if( strstr( glext, "GL_EXT_blend_color" ) == NULL ) - { - Com_Printf( "...GL_EXT_blend_color not found\n" ); - return 0; - } - - if( ! (pfglBlendColorEXT = (void *)pfwglGetProcAddress( "glBlendColorEXT" ))) return 0; - - Com_Printf( "...enabling GL_EXT_blend_color\n" ); - - return 1; -} - -PRIVATE W8 ConfigEXTVertexShader( const char *glext ) -{ - GLint glnum; - - if( strstr( glext, "GL_EXT_vertex_shader" ) == NULL ) - { - return 0; - } - - if( ! (pfglBeginVertexShaderEXT = ( void * )pfwglGetProcAddress("glBeginVertexShaderEXT"))) return 0; - if( ! (pfglEndVertexShaderEXT = ( void * )pfwglGetProcAddress("glEndVertexShaderEXT"))) return 0; - if( ! (pfglBindVertexShaderEXT = ( void * )pfwglGetProcAddress("glBindVertexShaderEXT"))) return 0; - if( ! (pfglGenVertexShadersEXT = ( void * )pfwglGetProcAddress("glGenVertexShadersEXT"))) return 0; - if( ! (pfglDeleteVertexShaderEXT = ( void * )pfwglGetProcAddress("glDeleteVertexShaderEXT"))) return 0; - if( ! (pfglShaderOp1EXT = ( void * )pfwglGetProcAddress("glShaderOp1EXT"))) return 0; - if( ! (pfglShaderOp2EXT = ( void * )pfwglGetProcAddress("glShaderOp2EXT"))) return 0; - if( ! (pfglShaderOp3EXT = ( void * )pfwglGetProcAddress("glShaderOp3EXT"))) return 0; - if( ! (pfglSwizzleEXT = ( void * )pfwglGetProcAddress("glSwizzleEXT"))) return 0; - if( ! (pfglWriteMaskEXT = ( void * )pfwglGetProcAddress("glWriteMaskEXT"))) return 0; - if( ! (pfglInsertComponentEXT = ( void * )pfwglGetProcAddress("glInsertComponentEXT"))) return 0; - if( ! (pfglExtractComponentEXT = ( void * )pfwglGetProcAddress("glExtractComponentEXT"))) return 0; - if( ! (pfglGenSymbolsEXT = ( void * )pfwglGetProcAddress("glGenSymbolsEXT"))) return 0; - if( ! (pfglSetInvariantEXT = ( void * )pfwglGetProcAddress("glSetInvariantEXT"))) return 0; - if( ! (pfglSetLocalConstantEXT = ( void * )pfwglGetProcAddress("glSetLocalConstantEXT"))) return 0; - if( ! (pfglVariantPointerEXT = ( void * )pfwglGetProcAddress("glVariantPointerEXT"))) return 0; - if( ! (pfglEnableVariantClientStateEXT = ( void * )pfwglGetProcAddress("glEnableVariantClientStateEXT"))) return 0; - if( ! (pfglDisableVariantClientStateEXT = ( void * )pfwglGetProcAddress("glDisableVariantClientStateEXT"))) return 0; - if( ! (pfglBindLightParameterEXT = ( void * )pfwglGetProcAddress("glBindLightParameterEXT"))) return 0; - if( ! (pfglBindMaterialParameterEXT = ( void * )pfwglGetProcAddress("glBindMaterialParameterEXT"))) return 0; - if( ! (pfglBindTexGenParameterEXT = ( void * )pfwglGetProcAddress("glBindTexGenParameterEXT"))) return 0; - if( ! (pfglBindTextureUnitParameterEXT = ( void * )pfwglGetProcAddress("glBindTextureUnitParameterEXT"))) return 0; - if( ! (pfglBindParameterEXT = ( void * )pfwglGetProcAddress("glBindParameterEXT"))) return 0; - if( ! (pfglIsVariantEnabledEXT = ( void * )pfwglGetProcAddress("glIsVariantEnabledEXT"))) return 0; - if( ! (pfglGetVariantBooleanvEXT = ( void * )pfwglGetProcAddress("glGetVariantBooleanvEXT"))) return 0; - if( ! (pfglGetVariantIntegervEXT = ( void * )pfwglGetProcAddress("glGetVariantIntegervEXT"))) return 0; - if( ! (pfglGetVariantFloatvEXT = ( void * )pfwglGetProcAddress("glGetVariantFloatvEXT"))) return 0; - if( ! (pfglGetVariantPointervEXT = ( void * )pfwglGetProcAddress("glGetVariantPointervEXT"))) return 0; - if( ! (pfglGetInvariantBooleanvEXT = ( void * )pfwglGetProcAddress("glGetInvariantBooleanvEXT"))) return 0; - if( ! (pfglGetInvariantIntegervEXT = ( void * )pfwglGetProcAddress("glGetInvariantIntegervEXT"))) return 0; - if( ! (pfglGetInvariantFloatvEXT = ( void * )pfwglGetProcAddress("glGetInvariantFloatvEXT"))) return 0; - if( ! (pfglGetLocalConstantBooleanvEXT = ( void * )pfwglGetProcAddress("glGetLocalConstantBooleanvEXT"))) return 0; - if( ! (pfglGetLocalConstantIntegervEXT = ( void * )pfwglGetProcAddress("glGetLocalConstantIntegervEXT"))) return 0; - if( ! (pfglGetLocalConstantFloatvEXT = ( void * )pfwglGetProcAddress("glGetLocalConstantFloatvEXT"))) return 0; - -// -// Checks to see if hardware is able to run our stuff -// - pfglGetIntegerv( GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT, &glnum ); - if( glnum < MY_GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTR ) - { - return 0; - } - - - pfglGetIntegerv( GL_MAX_VERTEX_SHADER_LOCALS_EXT, &glnum ); - if( glnum < MY_GL_MAX_VERTEX_SHADER_LOCALS_EXT ) - { - Com_Printf( "...Some vertex programs may fail to load" ); - return 0; - } - - - pfglGetIntegerv( GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT, &glnum ); - if( glnum < MY_GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT ) - { - return 0; - } - - - pfglGetIntegerv( GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT, &glnum ); - if( glnum < MY_GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT ) - { - return 0; - } - - - pfglGetIntegerv( GL_MAX_VERTEX_SHADER_VARIANTS_EXT, &glnum ); - if( glnum < MY_GL_MAX_VERTEX_SHADER_VARIANTS_EXT ) - { - return 0; - } - - - Com_Printf( "...enabling GL_EXT_vertex_shader\n" ); - - return 1; -} - - -PRIVATE W8 ConfigEXTVertexWeighting( const char *glext ) -{ - if( strstr( glext, "GL_EXT_vertex_weighting" ) == NULL ) - { - Com_Printf( "...GL_EXT_vertex_weighting not found\n" ); - return 0; - } - - - if( ! (pfglVertexWeightfEXT = ( void * )pfwglGetProcAddress( "glVertexWeightfEXT" ))) return 0; - if( ! (pfglVertexWeightfvEXT = ( void * )pfwglGetProcAddress( "glVertexWeightfvEXT" ))) return 0; - if( ! (pfglVertexWeightPointerEXT = ( void * )pfwglGetProcAddress( "glVertexWeightPointerEXT" ))) return 0; - - Com_Printf( "...enabling GL_EXT_vertex_weighting\n" ); - - return 1; -} - -PRIVATE W8 CheckEXTTextureFilterAnisotropic( const char *glext ) -{ - if( strstr( glext, "GL_EXT_texture_filter_anisotropic" ) == NULL ) - { - Com_Printf( "...GL_EXT_texture_filter_anisotropic not found\n" ); - return 0; - } - - Com_Printf( "...enabling GL_EXT_texture_filter_anisotropic\n" ); - - return 1; -} - -//////////////////////////////////////////////////////////// - - - - - -////////////////////////////// -// -// Nvidia Functions -// -////////////////////////////// - -PRIVATE W8 ConfigNVVertexArrayRange( const char *glext ) -{ - // Test if VAR is present. - if( strstr( glext, "GL_NV_vertex_array_range" ) == NULL ) - { - return 0; - } - - // Test if Fence - if( strstr( glext, "GL_NV_fence" ) == NULL ) - { - return 0; - } - - - // Setup Vertex Array Range - if( ! (pfglFlushVertexArrayRangeNV = ( void * )pfwglGetProcAddress("glFlushVertexArrayRangeNV")))return 0; - if( ! (pfglVertexArrayRangeNV = ( void * )pfwglGetProcAddress("glVertexArrayRangeNV")))return 0; - -#ifdef _WIN32 - - if( ! (pfwglAllocateMemoryNV = ( void * )pfwglGetProcAddress("wglAllocateMemoryNV"))) return 0; - if( ! (pfwglFreeMemoryNV = ( void * )pfwglGetProcAddress("wglFreeMemoryNV"))) return 0; - -#elif __unix__ - - if( ! (pfwglAllocateMemoryNV = ( void * )pfwglGetProcAddress( "glXAllocateMemoryNV" ))) return 0; - if( ! (pfwglFreeMemoryNV = ( void * )pfwglGetProcAddress( "glXFreeMemoryNV" ))) return 0; - -#else - - #error "Please define OS interface to GL_NV_vertex_array_range" - -#endif - - - // Setup fence - if( ! (pfglDeleteFencesNV = ( void * )pfwglGetProcAddress( "glDeleteFencesNV" ))) return 0; - if( ! (pfglGenFencesNV = ( void * )pfwglGetProcAddress( "glGenFencesNV" ))) return 0; - if( ! (pfglIsFenceNV = ( void * )pfwglGetProcAddress( "glIsFenceNV" ))) return 0; - if( ! (pfglTestFenceNV = ( void * )pfwglGetProcAddress( "glTestFenceNV" ))) return 0; - if( ! (pfglGetFenceivNV = ( void * )pfwglGetProcAddress( "glGetFenceivNV" ))) return 0; - if( ! (pfglFinishFenceNV = ( void * )pfwglGetProcAddress( "glFinishFenceNV" ))) return 0; - if( ! (pfglSetFenceNV = ( void * )pfwglGetProcAddress( "glSetFenceNV" ))) return 0; - - Com_Printf( "...enabling GL_NV_vertex_array_range & GL_NV_fence\n" ); - - return 1; -} - -PRIVATE W8 CheckNVVertexArrayRange2( const char *glext ) -{ - if( strstr( glext, "GL_NV_vertex_array_range2" ) == NULL ) - { - Com_Printf( "...GL_NV_vertex_array_range2 not found\n" ); - return 0; - } - - Com_Printf( "...enabling GL_NV_vertex_array_range2\n" ); - - return 1; -} - -PRIVATE W8 CheckNVTextureEnvCombine4( const char *glext ) -{ - if( strstr( glext, "GL_NV_texture_env_combine4") == NULL ) - { - Com_Printf( "...GL_NV_texture_env_combine4 not found\n" ); - return 0; - } - - Com_Printf( "...enabling GL_NV_texture_env_combine4\n" ); - - return 1; -} - -PRIVATE W8 ConfigNVVertexProgram( const char *glext ) -{ - if( strstr( glext, "GL_NV_vertex_program" ) == NULL ) - return 0; - - - if( ! (pfglAreProgramsResidentNV = ( void * )pfwglGetProcAddress("glAreProgramsResidentNV"))) return 0; - if( ! (pfglBindProgramNV = ( void * )pfwglGetProcAddress("glBindProgramNV"))) return 0; - if( ! (pfglDeleteProgramsNV = ( void * )pfwglGetProcAddress("glDeleteProgramsNV"))) return 0; - if( ! (pfglExecuteProgramNV = ( void * )pfwglGetProcAddress("glExecuteProgramNV"))) return 0; - if( ! (pfglGenProgramsNV = ( void * )pfwglGetProcAddress("glGenProgramsNV"))) return 0; - if( ! (pfglGetProgramParameterdvNV = ( void * )pfwglGetProcAddress("glGetProgramParameterdvNV"))) return 0; - if( ! (pfglGetProgramParameterfvNV = ( void * )pfwglGetProcAddress("glGetProgramParameterfvNV"))) return 0; - if( ! (pfglGetProgramivNV = ( void * )pfwglGetProcAddress("glGetProgramivNV"))) return 0; - if( ! (pfglGetProgramStringNV = ( void * )pfwglGetProcAddress("glGetProgramStringNV"))) return 0; - if( ! (pfglGetTrackMatrixivNV = ( void * )pfwglGetProcAddress("glGetTrackMatrixivNV"))) return 0; - if( ! (pfglGetVertexAttribdvNV = ( void * )pfwglGetProcAddress("glGetVertexAttribdvNV"))) return 0; - if( ! (pfglGetVertexAttribfvNV = ( void * )pfwglGetProcAddress("glGetVertexAttribfvNV"))) return 0; - if( ! (pfglGetVertexAttribivNV = ( void * )pfwglGetProcAddress("glGetVertexAttribivNV"))) return 0; - if( ! (pfglGetVertexAttribPointervNV = ( void * )pfwglGetProcAddress("glGetVertexAttribPointervNV"))) return 0; - if( ! (pfglIsProgramNV = ( void * )pfwglGetProcAddress("glIsProgramNV"))) return 0; - if( ! (pfglLoadProgramNV = ( void * )pfwglGetProcAddress("glLoadProgramNV"))) return 0; - if( ! (pfglProgramParameter4dNV = ( void * )pfwglGetProcAddress("glProgramParameter4dNV"))) return 0; - if( ! (pfglProgramParameter4dvNV = ( void * )pfwglGetProcAddress("glProgramParameter4dvNV"))) return 0; - if( ! (pfglProgramParameter4fNV = ( void * )pfwglGetProcAddress("glProgramParameter4fNV"))) return 0; - if( ! (pfglProgramParameter4fvNV = ( void * )pfwglGetProcAddress("glProgramParameter4fvNV"))) return 0; - if( ! (pfglProgramParameters4dvNV = ( void * )pfwglGetProcAddress("glProgramParameters4dvNV"))) return 0; - if( ! (pfglProgramParameters4fvNV = ( void * )pfwglGetProcAddress("glProgramParameters4fvNV"))) return 0; - if( ! (pfglRequestResidentProgramsNV = ( void * )pfwglGetProcAddress("glRequestResidentProgramsNV"))) return 0; - if( ! (pfglTrackMatrixNV = ( void * )pfwglGetProcAddress("glTrackMatrixNV"))) return 0; - if( ! (pfglVertexAttribPointerNV = ( void * )pfwglGetProcAddress("glVertexAttribPointerNV"))) return 0; - if( ! (pfglVertexAttrib1dNV = ( void * )pfwglGetProcAddress("glVertexAttrib1dNV"))) return 0; - if( ! (pfglVertexAttrib1dvNV = ( void * )pfwglGetProcAddress("glVertexAttrib1dvNV"))) return 0; - if( ! (pfglVertexAttrib1fNV = ( void * )pfwglGetProcAddress("glVertexAttrib1fNV"))) return 0; - if( ! (pfglVertexAttrib1fvNV = ( void * )pfwglGetProcAddress("glVertexAttrib1fvNV"))) return 0; - if( ! (pfglVertexAttrib1sNV = ( void * )pfwglGetProcAddress("glVertexAttrib1sNV"))) return 0; - if( ! (pfglVertexAttrib1svNV = ( void * )pfwglGetProcAddress("glVertexAttrib1svNV"))) return 0; - if( ! (pfglVertexAttrib2dNV = ( void * )pfwglGetProcAddress("glVertexAttrib2dNV"))) return 0; - if( ! (pfglVertexAttrib2dvNV = ( void * )pfwglGetProcAddress("glVertexAttrib2dvNV"))) return 0; - if( ! (pfglVertexAttrib2fNV = ( void * )pfwglGetProcAddress("glVertexAttrib2fNV"))) return 0; - if( ! (pfglVertexAttrib2fvNV = ( void * )pfwglGetProcAddress("glVertexAttrib2fvNV"))) return 0; - if( ! (pfglVertexAttrib2sNV = ( void * )pfwglGetProcAddress("glVertexAttrib2sNV"))) return 0; - if( ! (pfglVertexAttrib2svNV = ( void * )pfwglGetProcAddress("glVertexAttrib2svNV"))) return 0; - if( ! (pfglVertexAttrib3dNV = ( void * )pfwglGetProcAddress("glVertexAttrib3dNV"))) return 0; - if( ! (pfglVertexAttrib3dvNV = ( void * )pfwglGetProcAddress("glVertexAttrib3dvNV"))) return 0; - if( ! (pfglVertexAttrib3fNV = ( void * )pfwglGetProcAddress("glVertexAttrib3fNV"))) return 0; - if( ! (pfglVertexAttrib3fvNV = ( void * )pfwglGetProcAddress("glVertexAttrib3fvNV"))) return 0; - if( ! (pfglVertexAttrib3sNV = ( void * )pfwglGetProcAddress("glVertexAttrib3sNV"))) return 0; - if( ! (pfglVertexAttrib3svNV = ( void * )pfwglGetProcAddress("glVertexAttrib3svNV"))) return 0; - if( ! (pfglVertexAttrib4dNV = ( void * )pfwglGetProcAddress("glVertexAttrib4dNV"))) return 0; - if( ! (pfglVertexAttrib4dvNV = ( void * )pfwglGetProcAddress("glVertexAttrib4dvNV"))) return 0; - if( ! (pfglVertexAttrib4fNV = ( void * )pfwglGetProcAddress("glVertexAttrib4fNV"))) return 0; - if( ! (pfglVertexAttrib4fvNV = ( void * )pfwglGetProcAddress("glVertexAttrib4fvNV"))) return 0; - if( ! (pfglVertexAttrib4sNV = ( void * )pfwglGetProcAddress("glVertexAttrib4sNV"))) return 0; - if( ! (pfglVertexAttrib4svNV = ( void * )pfwglGetProcAddress("glVertexAttrib4svNV"))) return 0; - if( ! (pfglVertexAttrib4ubvNV = ( void * )pfwglGetProcAddress("glVertexAttrib4ubvNV"))) return 0; - if( ! (pfglVertexAttribs1dvNV = ( void * )pfwglGetProcAddress("glVertexAttribs1dvNV"))) return 0; - if( ! (pfglVertexAttribs1fvNV = ( void * )pfwglGetProcAddress("glVertexAttribs1fvNV"))) return 0; - if( ! (pfglVertexAttribs1svNV = ( void * )pfwglGetProcAddress("glVertexAttribs1svNV"))) return 0; - if( ! (pfglVertexAttribs2dvNV = ( void * )pfwglGetProcAddress("glVertexAttribs2dvNV"))) return 0; - if( ! (pfglVertexAttribs2fvNV = ( void * )pfwglGetProcAddress("glVertexAttribs2fvNV"))) return 0; - if( ! (pfglVertexAttribs2svNV = ( void * )pfwglGetProcAddress("glVertexAttribs2svNV"))) return 0; - if( ! (pfglVertexAttribs3dvNV = ( void * )pfwglGetProcAddress("glVertexAttribs3dvNV"))) return 0; - if( ! (pfglVertexAttribs3fvNV = ( void * )pfwglGetProcAddress("glVertexAttribs3fvNV"))) return 0; - if( ! (pfglVertexAttribs3svNV = ( void * )pfwglGetProcAddress("glVertexAttribs3svNV"))) return 0; - if( ! (pfglVertexAttribs4dvNV = ( void * )pfwglGetProcAddress("glVertexAttribs4dvNV"))) return 0; - if( ! (pfglVertexAttribs4fvNV = ( void * )pfwglGetProcAddress("glVertexAttribs4fvNV"))) return 0; - if( ! (pfglVertexAttribs4svNV = ( void * )pfwglGetProcAddress("glVertexAttribs4svNV"))) return 0; - if( ! (pfglVertexAttribs4ubvNV = ( void * )pfwglGetProcAddress("glVertexAttribs4ubvNV"))) return 0; - - - Com_Printf( "...enabling GL_NV_vertex_program\n" ); - - return 1; -} - - - - - -PRIVATE W8 CheckNVTextureShader( const char *glext ) -{ - if( strstr( glext, "GL_NV_texture_shader" ) == NULL ) - { - return 0; - } - - Com_Printf( "...enabling GL_NV_texture_shader\n" ); - - return 1; -} - -//////////////////////////////////////////////////////////// - - -////////////////////////////// -// -// ATI Functions -// -////////////////////////////// - - -PRIVATE W8 ConfigATIVertexArrayObject( const char *glext ) -{ - if( strstr( glext, "GL_ATI_vertex_array_object" ) == NULL ) - { - return 0; - } - - if( ! (pfglBlendColorEXT = ( void * )pfwglGetProcAddress("glBlendColorEXT"))) return 0; - if( ! (pfglNewObjectBufferATI = ( void * )pfwglGetProcAddress("glNewObjectBufferATI"))) return 0; - if( ! (pfglIsObjectBufferATI = ( void * )pfwglGetProcAddress("glIsObjectBufferATI"))) return 0; - if( ! (pfglUpdateObjectBufferATI = ( void * )pfwglGetProcAddress("glUpdateObjectBufferATI"))) return 0; - if( ! (pfglGetObjectBufferfvATI = ( void * )pfwglGetProcAddress("glGetObjectBufferfvATI"))) return 0; - if( ! (pfglGetObjectBufferivATI = ( void * )pfwglGetProcAddress("glGetObjectBufferivATI"))) return 0; - - if( ! (pfglFreeObjectBufferATI = ( void * )pfwglGetProcAddress("glFreeObjectBufferATI"))) return 0; - - if( ! (pfglArrayObjectATI = ( void * )pfwglGetProcAddress("glArrayObjectATI"))) return 0; - if( ! (pfglGetArrayObjectfvATI = ( void * )pfwglGetProcAddress("glGetArrayObjectfvATI"))) return 0; - if( ! (pfglGetArrayObjectivATI = ( void * )pfwglGetProcAddress("glGetArrayObjectivATI"))) return 0; - if( ! (pfglVariantArrayObjectATI = ( void * )pfwglGetProcAddress("glVariantArrayObjectATI"))) return 0; - if( ! (pfglGetVariantArrayObjectfvATI = ( void * )pfwglGetProcAddress("glGetVariantArrayObjectfvATI"))) return 0; - if( ! (pfglGetVariantArrayObjectivATI = ( void * )pfwglGetProcAddress("glGetVariantArrayObjectivATI"))) return 0; - - Com_Printf( "...enabling GL_ATI_vertex_array_object\n" ); - - return 1; -} - - -PRIVATE W8 ConfigATIMapObjectBuffer( const char *glext ) -{ - if( strstr( glext, "GL_ATI_map_object_buffer" ) == NULL ) - { - return 0; - } - - if( ! (pfglMapObjectBufferATI = ( void * )pfwglGetProcAddress("glMapObjectBufferATI"))) return 0; - if( ! (pfglUnmapObjectBufferATI = ( void * )pfwglGetProcAddress("glUnmapObjectBufferATI"))) return 0; - - Com_Printf( "...enabling GL_ATI_map_object_buffer\n" ); - - return 1; -} - - - - -PRIVATE W8 ConfigATIFragmentShader( const char *glext ) -{ - if( strstr( glext, "GL_ATI_fragment_shader" ) == NULL ) - { - return 0; - } - - if( ! (pfglGenFragmentShadersATI = ( void * )pfwglGetProcAddress("glGenFragmentShadersATI"))) return 0; - if( ! (pfglBindFragmentShaderATI = ( void * )pfwglGetProcAddress("glBindFragmentShaderATI"))) return 0; - if( ! (pfglDeleteFragmentShaderATI = ( void * )pfwglGetProcAddress("glDeleteFragmentShaderATI"))) return 0; - if( ! (pfglBeginFragmentShaderATI = ( void * )pfwglGetProcAddress("glBeginFragmentShaderATI"))) return 0; - if( ! (pfglEndFragmentShaderATI = ( void * )pfwglGetProcAddress("glEndFragmentShaderATI"))) return 0; - if( ! (pfglPassTexCoordATI = ( void * )pfwglGetProcAddress("glPassTexCoordATI"))) return 0; - if( ! (pfglSampleMapATI = ( void * )pfwglGetProcAddress("glSampleMapATI"))) return 0; - if( ! (pfglColorFragmentOp1ATI = ( void * )pfwglGetProcAddress("glColorFragmentOp1ATI"))) return 0; - if( ! (pfglColorFragmentOp2ATI = ( void * )pfwglGetProcAddress("glColorFragmentOp2ATI"))) return 0; - if( ! (pfglColorFragmentOp3ATI = ( void * )pfwglGetProcAddress("glColorFragmentOp3ATI"))) return 0; - if( ! (pfglAlphaFragmentOp1ATI = ( void * )pfwglGetProcAddress("glAlphaFragmentOp1ATI"))) return 0; - if( ! (pfglAlphaFragmentOp2ATI = ( void * )pfwglGetProcAddress("glAlphaFragmentOp2ATI"))) return 0; - if( ! (pfglAlphaFragmentOp3ATI = ( void * )pfwglGetProcAddress("glAlphaFragmentOp3ATI"))) return 0; - if( ! (pfglSetFragmentShaderConstantATI = ( void * )pfwglGetProcAddress("glSetFragmentShaderConstantATI"))) return 0; - - Com_Printf( "...enabling GL_ATI_fragment_shader\n" ); - - return 1; -} - -PRIVATE W8 CheckATITextureEnvCombine3( const char *glext ) -{ - if( strstr( glext, "GL_ATI_texture_env_combine3" ) == NULL ) - { - return 0; - } - - Com_Printf( "...enabling GL_ATI_texture_env_combine3\n" ); - - return 1; -} - - -PRIVATE W8 CheckATIXTextureEnvRoute(const char *glext) -{ - if( strstr( glext, "GL_ATIX_texture_env_route" ) == NULL ) - { - return 0; - } - - Com_Printf( "...enabling GL_ATIX_texture_env_route\n" ); - - return 1; -} - - -PRIVATE W8 ConfigATIEnvMapBumpMap( const char *glext ) -{ - if( strstr( glext, "GL_ATI_envmap_bumpmap" ) == NULL ) - { - return 0; - } - - if( ! (pfglTexBumpParameterivATI = ( void * ) pfwglGetProcAddress("glTexBumpParameterivATI"))) return 0; - if( ! (pfglTexBumpParameterfvATI = ( void * ) pfwglGetProcAddress("glTexBumpParameterfvATI"))) return 0; - if( ! (pfglGetTexBumpParameterivATI = ( void * ) pfwglGetProcAddress("glGetTexBumpParameterivATI"))) return 0; - if( ! (pfglGetTexBumpParameterfvATI = ( void * ) pfwglGetProcAddress("glGetTexBumpParameterfvATI"))) return 0; - - Com_Printf( "...enabling GL_ATI_envmap_bumpmap\n" ); - - return 1; -} -/* -PRIVATE W8 ConfigARBFragmentProgram( const char *glext ) -{ - if( strstr( glext, "GL_ARB_fragment_program" ) == NULL ) - { - return 0; - } - - if( ! (pfglProgramStringARB = ( void * )pfwglGetProcAddress("glProgramStringARB"))) return 0; - if( ! (pfglBindProgramARB = ( void * )pfwglGetProcAddress("glBindProgramARB"))) return 0; - if( ! (pfglDeleteProgramsARB = ( void * )pfwglGetProcAddress("glDeleteProgramsARB"))) return 0; - if( ! (pfglGenProgramsARB = ( void * )pfwglGetProcAddress("glGenProgramsARB"))) return 0; - if( ! (pfglProgramEnvParameter4dARB = ( void * )pfwglGetProcAddress("glProgramEnvParameter4dARB"))) return 0; - if( ! (pfglProgramEnvParameter4dvARB = ( void * )pfwglGetProcAddress("glProgramEnvParameter4dvARB"))) return 0; - if( ! (pfglProgramEnvParameter4fARB = ( void * )pfwglGetProcAddress("glProgramEnvParameter4fARB"))) return 0; - if( ! (pfglProgramEnvParameter4fvARB = ( void * )pfwglGetProcAddress("glProgramEnvParameter4fvARB"))) return 0; - if( ! (pfglGetProgramLocalParameter4dARB = ( void * )pfwglGetProcAddress("glProgramLocalParameter4dARB"))) return 0; - if( ! (pfglGetProgramLocalParameter4dvARB = ( void * )pfwglGetProcAddress("glProgramLocalParameter4dvARB"))) return 0; - if( ! (pfglGetProgramLocalParameter4fARB = ( void * )pfwglGetProcAddress("glProgramLocalParameter4fARB"))) return 0; - if( ! (pfglGetProgramLocalParameter4fvARB = ( void * )pfwglGetProcAddress("glProgramLocalParameter4fvARB"))) return 0; - if( ! (pfglGetProgramEnvParameterdvARB = ( void * )pfwglGetProcAddress("glGetProgramEnvParameterdvARB"))) return 0; - if( ! (pfglGetProgramEnvParameterfvARB = ( void * )pfwglGetProcAddress("glGetProgramEnvParameterfvARB"))) return 0; - if( ! (pfglGetProgramLocalParameterdvARB = ( void * )pfwglGetProcAddress("glGetProgramLocalParameterdvARB"))) return 0; - if( ! (pfglGetProgramLocalParameterfvARB = ( void * )pfwglGetProcAddress("glGetProgramLocalParameterfvARB"))) return 0; - if( ! (pfglGetProgramivARB = ( void * )pfwglGetProcAddress("glGetProgramivARB"))) return 0; - if( ! (pfglGetProgramStringARB = ( void * )pfwglGetProcAddress("glGetProgramStringARB"))) return 0; - if( ! (pfglIsProgramARB = ( void * )pfwglGetProcAddress("glIsProgramARB"))) return 0; - - return 1; -} - - -PRIVATE W8 ConfigARBVertexBufferObject( const char *glext ) -{ - if( strstr( glext, "GL_ARB_vertex_buffer_object" ) == NULL ) - return 0; - - if( ! (pfglBindBufferARB = ( void * )pfwglGetProcAddress("glBindBufferARB"))) return 0; - if( ! (pfglDeleteBuffersARB = ( void * )pfwglGetProcAddress("glDeleteBuffersARB"))) return 0; - if( ! (pfglGenBuffersARB = ( void * )pfwglGetProcAddress("glGenBuffersARB"))) return 0; - if( ! (pfglIsBufferARB = ( void * )pfwglGetProcAddress("glIsBufferARB"))) return 0; - if( ! (pfglBufferDataARB = ( void * )pfwglGetProcAddress("glBufferDataARB"))) return 0; - if( ! (pfglBufferSubDataARB = ( void * )pfwglGetProcAddress("glBufferSubDataARB"))) return 0; - if( ! (pfglGetBufferSubDataARB = ( void * )pfwglGetProcAddress("glGetBufferSubDataARB"))) return 0; - if( ! (pfglMapBufferARB = ( void * )pfwglGetProcAddress("glMapBufferARB"))) return 0; - if( ! (pfglUnmapBufferARB = ( void * )pfwglGetProcAddress("glUnmapBufferARB"))) return 0; - if( ! (pfglGetBufferParameterivARB = ( void * )pfwglGetProcAddress("glGetBufferParameterivARB"))) return 0; - if( ! (pfglGetBufferPointervARB = ( void * )pfwglGetProcAddress("glGetBufferPointervARB"))) return 0; - - return 1; -}*/ - - - - -#ifdef _WIN32 - -PRIVATE W8 ConfigWGLARBPBuffer( const char *glext ) -{ - if( strstr( glext, "WGL_ARB_pbuffer" ) == NULL ) - { - Com_Printf( "...WGL_ARB_pbuffer not found\n" ); - return 0; - } - - if( ! (pfwglCreatePbufferARB = ( void * )pfwglGetProcAddress( "wglCreatePbufferARB" ))) return 0; - if( ! (pfwglGetPbufferDCARB = ( void * )pfwglGetProcAddress( "wglGetPbufferDCARB" ))) return 0; - if( ! (pfwglReleasePbufferDCARB = ( void * )pfwglGetProcAddress( "wglReleasePbufferDCARB" ))) return 0; - if( ! (pfwglDestroyPbufferARB = ( void * )pfwglGetProcAddress( "wglDestroyPbufferARB" ))) return 0; - if( ! (pfwglQueryPbufferARB = ( void * )pfwglGetProcAddress( "wglQueryPbufferARB" ))) return 0; - - Com_Printf( "...enabling WGL_ARB_pbuffer\n" ); - - return 1; -} - - -PRIVATE W8 ConfigWGLARBPixelFormat ( const char *glext ) -{ - if( strstr( glext, "WGL_ARB_pixel_format" ) == NULL ) - { - Com_Printf( "...WGL_ARB_pixel_format not found\n" ); - return 0; - } - - if( ! (pfwglGetPixelFormatAttribivARB = ( void * )pfwglGetProcAddress( "wglGetPixelFormatAttribivARB" ))) return 0; - if( ! (pfwglGetPixelFormatAttribfvARB = ( void * )pfwglGetProcAddress( "wglGetPixelFormatAttribfvARB" ))) return 0; - if( ! (pfwglChoosePixelFormatARB = ( void * )pfwglGetProcAddress( "wglChoosePixelFormatARB" ))) return 0; - - Com_Printf( "...enabling WGL_ARB_pixel_format\n" ); - - return 1; -} - -PRIVATE W8 ConfigWGLEXTSwapControl( const char *glext ) -{ - if( strstr( glext, "WGL_EXT_swap_control" ) == NULL ) - { - Com_Printf( "...WGL_EXT_swap_control not found\n" ); - return 0; - } - - if( ! (pfwglSwapIntervalEXT = (WGLSWAPINTERVALEXT)pfwglGetProcAddress( "wglSwapIntervalEXT" ) ) ) return 0; - if( ! (pfwglGetSwapIntervalEXT = (WGLGETSWAPINTERVALEXT)pfwglGetProcAddress( "wglGetSwapIntervalEXT" ) ) ) return 0; - - Com_Printf( "...enabling WGL_EXT_swap_control\n" ); - - return 1; -} - -#endif /* _WIN32 */ - - - - - - - - - - -/* ------------------------------------------------------------------------------ - Function: GL_ConfigExtensions - - - Parameters: glext -[in] Pointer to string containing the gl extension names. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void GL_ConfigExtensions( const char *glext ) -{ - GLint ntext; - - - memset( &gl_ext, 0, sizeof( GL_Extensions ) ); - - gl_ext.ARBMultiTexture = ConfigARBMultiTexture( glext ); - if( gl_ext.ARBMultiTexture ) - { - pfglGetIntegerv( GL_MAX_TEXTURE_UNITS_ARB, &ntext ); - - // There could be more than MY_MAX_ARB_TEXTURESTAGES, but we only - // require MY_MAX_ARB_TEXTURESTAGES texture stages so take min. - gl_ext.nTextureStages = ( ntext < ( (GLint)MY_MAX_ARB_TEXTURESTAGES) ? ntext : MY_MAX_ARB_TEXTURESTAGES ); - } - - - gl_ext.EXTTextureFilterAnisotropic = CheckEXTTextureFilterAnisotropic( glext ); - if( gl_ext.EXTTextureFilterAnisotropic ) - { - pfglGetFloatv( GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &gl_ext.nMaxAnisotropy ); - - if( gl_ext.nMaxAnisotropy < 2.0f ) - { - gl_ext.nMaxAnisotropy = 0; - } - - } - - - gl_ext.EXTTextureEnvCombine = CheckEXTTextureEnvCombine( glext ); - - - gl_ext.ARBTextureCompression = ConfigARBTextureCompression( glext ); - - - gl_ext.EXTTextureCompressionS3TC = (gl_ext.ARBTextureCompression && CheckEXTTextureCompressionS3TC( glext ) ); - - - gl_ext.ARBTextureCubeMap = CheckARBTextureCubeMap( glext ); - - - gl_ext.EXTSecondaryColor = ConfigEXTSecondaryColor( glext ); - - - gl_ext.EXTBlendColor = ConfigEXTBlendColor( glext ); - - - // nVidia extensions - // ----------------- - - - gl_ext.NVVertexArrayRange = ConfigNVVertexArrayRange( glext ); - if( gl_ext.NVVertexArrayRange ) - { - GLint nverts; - pfglGetIntegerv( (GLenum)GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV, &nverts ); - gl_ext.NVVertexArrayRangeMaxVertex = nverts; - } - - - gl_ext.EXTVertexWeighting = ConfigEXTVertexWeighting( glext ); - - - gl_ext.NVVertexArrayRange2 = CheckNVVertexArrayRange2( glext ); - if( gl_ext.NVVertexArrayRange2 ) - { - // VBHard swap without flush of the VAR. - gl_ext.NVStateVARWithoutFlush = GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV; - } - else - { - // VBHard with unusefull flush of the VAR. - gl_ext.NVStateVARWithoutFlush = GL_VERTEX_ARRAY_RANGE_NV; - } - - - gl_ext.NVTextureEnvCombine4 = CheckNVTextureEnvCombine4( glext ); - - - if( ! gl_ext.DisableHardwareVertexProgram ) - { - gl_ext.NVVertexProgram = ConfigNVVertexProgram( glext ); - gl_ext.EXTVertexShader = ConfigEXTVertexShader( glext ); - gl_ext.ARBVertexProgram= ConfigARBVertexProgram( glext ); - } - else - { - gl_ext.NVVertexProgram = false; - gl_ext.EXTVertexShader = false; - gl_ext.ARBVertexProgram = false; - } - - - gl_ext.NVTextureShader = CheckNVTextureShader( glext ); - if( gl_ext.NVVertexProgram && ! gl_ext.NVTextureShader ) - { - // if GL_NV_texture_shader is not here, - // then we are not on a GeForce3. - gl_ext.NVVertexProgramEmulated = true; - } - - - // ATI extensions - // -------------- - - gl_ext.ATIVertexArrayObject = ConfigATIVertexArrayObject( glext ); - gl_ext.ATIMapObjectBuffer = ConfigATIMapObjectBuffer( glext ); - - - gl_ext.ATITextureEnvCombine3 = CheckATITextureEnvCombine3( glext ); - - gl_ext.ATIXTextureEnvRoute = CheckATIXTextureEnvRoute( glext ); - - gl_ext.ATIEnvMapBumpMap = ConfigATIEnvMapBumpMap( glext ); - -// gl_ext.ATIFragmentShader = setupATIFragmentShader( glext ); - - - - - - -#ifdef _WIN32 - - - ConfigWGLARBPBuffer( glext ); - - - ConfigWGLARBPixelFormat( glext ); - - - ConfigWGLEXTSwapControl( glext ); - - -#endif - - - - -} diff --git a/wolf3d/newCode/env/opengl_local.h b/wolf3d/newCode/env/opengl_local.h deleted file mode 100644 index 3102bcf..0000000 --- a/wolf3d/newCode/env/opengl_local.h +++ /dev/null @@ -1,256 +0,0 @@ -/* - - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -#ifndef __OPENGL_LOCAL_H__ -#define __OPENGL_LOCAL_H__ - -extern int glMaxTexSize; // maximum texture size - - -//=================================================================== - - -extern void GL_SetDefaultState( void ); -extern void GL_UpdateSwapInterval( void ); - -extern float gldepthmin, gldepthmax; - - - -//==================================================== - - - -extern int gl_filter_min, gl_filter_max; - -// -// view origin -// -extern vec3_t vup; -extern vec3_t vpn; -extern vec3_t vright; -extern vec3_t r_origin; - -// -// screen size info -// -//extern refdef_t r_newrefdef; -extern int r_viewcluster, r_viewcluster2, r_oldviewcluster, r_oldviewcluster2; - -extern cvar_t *r_norefresh; -extern cvar_t *r_lefthand; -extern cvar_t *r_speeds; -extern cvar_t *r_novis; -extern cvar_t *r_nocull; - - -extern cvar_t *gl_vertex_arrays; - -extern cvar_t *gl_ext_swapinterval; -extern cvar_t *gl_ext_palettedtexture; -extern cvar_t *gl_ext_multitexture; -extern cvar_t *gl_ext_pointparameters; -extern cvar_t *gl_ext_compiled_vertex_array; - - -extern cvar_t *gl_nosubimage; -extern cvar_t *gl_bitdepth; -extern cvar_t *gl_mode; -extern cvar_t *gl_lightmap; -extern cvar_t *gl_shadows; -extern cvar_t *gl_dynamic; -extern cvar_t *gl_nobind; -extern cvar_t *gl_round_down; -extern cvar_t *gl_picmip; -extern cvar_t *gl_skymip; -extern cvar_t *gl_showtris; -extern cvar_t *gl_finish; -extern cvar_t *gl_ztrick; -extern cvar_t *gl_clear; -extern cvar_t *gl_cull; -extern cvar_t *gl_poly; -extern cvar_t *gl_texsort; -extern cvar_t *gl_polyblend; -extern cvar_t *gl_flashblend; -extern cvar_t *gl_lightmaptype; -extern cvar_t *gl_modulate; -extern cvar_t *gl_playermip; -extern cvar_t *gl_drawbuffer; -extern cvar_t *gl_driver; -extern cvar_t *gl_swapinterval; -extern cvar_t *gl_texturemode; -extern cvar_t *gl_saturatelighting; - -extern cvar_t *r_fullscreen; -extern cvar_t *vid_gamma; - -extern cvar_t *intensity; - -extern int gl_lightmap_format; -extern int gl_solid_format; -extern int gl_alpha_format; -extern int gl_tex_alpha_format; - - - - -extern void R_Bind( int texnum ); -extern void R_MBind( GLenum target, int texnum ); -extern void R_TexEnv( GLenum value ); -extern void R_EnableMultitexture( _boolean enable ); -extern void R_SelectTexture( GLenum ); - - -//==================================================================== - - -extern int registration_sequence; - - - -typedef struct -{ - const char *renderer_string; - const char *vendor_string; - const char *version_string; - const char *extensions_string; - _boolean Version_1_2; - -} glconfig_t; - -typedef struct -{ - float inverse_intensity; - _boolean fullscreen; - - int prev_mode; - - int lightmap_textures; - - int currenttextures[2]; - int currenttmu; - - -} glstate_t; - -extern glconfig_t gl_config; -extern glstate_t gl_state; - - -////////////////////////////////////////////////////// - - -typedef struct -{ - _boolean ARBMultiTexture; - int nTextureStages; // Number of texture stages supported - _boolean EXTTextureEnvCombine; - - _boolean EXTTextureFilterAnisotropic; - float nMaxAnisotropy; - // NB: Fence extension is not here, because NVVertexArrayRange is false if GL_NV_fence is not here. - _boolean NVVertexArrayRange; - int NVVertexArrayRangeMaxVertex; - _boolean EXTTextureCompressionS3TC; - _boolean EXTVertexWeighting; - _boolean EXTSeparateSpecularColor; - _boolean NVTextureEnvCombine4; - _boolean ARBTextureCubeMap; - _boolean NVVertexProgram; - _boolean EXTVertexShader; - _boolean NVTextureShader; - // true if NVVertexProgram and if we know that VP is emulated - _boolean NVVertexProgramEmulated; - _boolean EXTSecondaryColor; - _boolean EXTBlendColor; - // NVVertexArrayRange2. - _boolean NVVertexArrayRange2; - // equal to GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV if possible, or GL_VERTEX_ARRAY_RANGE_NV - int NVStateVARWithoutFlush; - - /* WGL ARB Extensions */ - _boolean WGLARBPBuffer; - _boolean WGLARBPixelFormat; - _boolean WGLEXTSwapControl; - - /* ATI Extensions */ - _boolean ATIVertexArrayObject; - _boolean ATIMapObjectBuffer; - _boolean ATITextureEnvCombine3; - _boolean ATIEnvMapBumpMap; - _boolean ATIFragmentShader; - _boolean ATIXTextureEnvRoute; - - /* ARB Extensions */ - _boolean ARBTextureCompression; - _boolean ARBFragmentProgram; - _boolean ARBVertexBufferObject; - _boolean ARBVertexProgram; - - /* Disable Hardware feature */ - _boolean DisableHardwareVertexProgram; - _boolean DisableHardwareTextureShader; - -} GL_Extensions; - -extern GL_Extensions gl_ext; - - -extern void GL_ConfigExtensions( const char *glext ); - -extern void MYgluPerspective( GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar ); - - -extern void PrintGLError( W32 err, const char *from ); - - - - -/* -==================================================================== - -IMPLEMENTATION SPECIFIC FUNCTIONS - -==================================================================== -*/ - -#ifdef __cplusplus -extern "C" { -#endif - -void GLimp_BeginFrame(); -void GLimp_EndFrame( void ); -_boolean GLimp_Init( void *hinstance, void *hWnd ); -void GLimp_Shutdown( void ); -int GLimp_SetMode( int *pwidth, int *pheight, int mode, _boolean fullscreen ); -void GLimp_AppActivate( _boolean active ); - -#ifdef __cplusplus -} -#endif - - - - - - - - -#endif /* __OPENGL_LOCAL_H__ */ diff --git a/wolf3d/newCode/env/opengl_main.c b/wolf3d/newCode/env/opengl_main.c deleted file mode 100644 index 61eae74..0000000 --- a/wolf3d/newCode/env/opengl_main.c +++ /dev/null @@ -1,497 +0,0 @@ -/* - - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -#include "../wolfiphone.h" - - -viddef_t viddef; - -float gldepthmin, gldepthmax; - -glconfig_t gl_config; -glstate_t gl_state; - - - - - -// -// view origin -// -vec3_t vup; -vec3_t vpn; -vec3_t vright; -vec3_t r_origin; - -cvar_t *r_norefresh; -cvar_t *r_speeds; -cvar_t *r_novis; -cvar_t *r_nocull; -cvar_t *r_lefthand; - - -cvar_t *gl_nosubimage; - - -cvar_t *gl_vertex_arrays; - - - -cvar_t *gl_ext_swapinterval; -cvar_t *gl_ext_palettedtexture; -cvar_t *gl_ext_multitexture; -cvar_t *gl_ext_pointparameters; -cvar_t *gl_ext_compiled_vertex_array; - -//cvar_t *gl_ext_TextureCompressionS3TC; - -cvar_t *gl_bitdepth; -cvar_t *gl_drawbuffer; -cvar_t *gl_driver; -cvar_t *gl_lightmap; -cvar_t *gl_shadows; -cvar_t *gl_mode; -cvar_t *gl_dynamic; -cvar_t *gl_modulate; -cvar_t *gl_nobind; -cvar_t *gl_round_down; -cvar_t *gl_picmip; -cvar_t *gl_skymip; -cvar_t *gl_showtris; -cvar_t *gl_ztrick; -cvar_t *gl_finish; -cvar_t *gl_clear; -cvar_t *gl_cull; -cvar_t *gl_polyblend; -cvar_t *gl_flashblend; -cvar_t *gl_playermip; -cvar_t *gl_saturatelighting; -cvar_t *gl_swapinterval; -cvar_t *gl_texturemode; - -cvar_t *r_fullscreen; -cvar_t *vid_gamma; -cvar_t *r_ref; - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void MYgluPerspective( GLdouble fovy, GLdouble aspect, - GLdouble zNear, GLdouble zFar ) -{ - GLdouble xmin, xmax, ymin, ymax; - - ymax = zNear * tan( fovy * M_PI / 360.0 ); - ymin = -ymax; - - xmin = ymin * aspect; - xmax = ymax * aspect; - - xmin += -( 2 * 0 ) / zNear; - xmax += -( 2 * 0 ) / zNear; - - pfglFrustum( xmin, xmax, ymin, ymax, zNear, zFar ); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PRIVATE void R_ScreenShot_f( void ) -{ - W8 *buffer; - char picname[ 80 ]; - char checkname[ MAX_OSPATH ]; - int i; - FILE *f; - - // create the scrnshots directory if it doesn't exist - my_snprintf( checkname, sizeof( checkname ), "%s/scrnshot", FS_Gamedir() ); - FS_CreateDirectory( checkname ); - -// -// find a file name to save it to -// - my_strlcpy( picname, "scrn00.tga", sizeof( picname ) ); - - for( i = 0 ; i <= 99 ; ++i ) - { - picname[ 4 ] = i / 10 + '0'; - picname[ 5 ] = i % 10 + '0'; - my_snprintf( checkname, sizeof( checkname ), "%s/scrnshot/%s", FS_Gamedir(), picname ); - f = fopen( checkname, "rb" ); - if( ! f ) - { - break; // file doesn't exist - } - - fclose( f ); - } - - if( i == 100 ) - { - Com_Printf( "R_ScreenShot_f: Couldn't create a file\n" ); - return; - } - - - buffer = MM_MALLOC( viddef.width * viddef.height * 3 ); - - - pfglReadPixels( 0, 0, viddef.width, viddef.height, GL_RGB, GL_UNSIGNED_BYTE, buffer ); - - - WriteTGA( checkname, 24, viddef.width, viddef.height, buffer, 1, 1 ); - - - MM_FREE( buffer ); - Com_Printf( "Wrote %s\n", picname ); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PRIVATE void R_Strings_f( void ) -{ - Com_Printf( "GL_VENDOR: %s\n", gl_config.vendor_string ); - Com_Printf( "GL_RENDERER: %s\n", gl_config.renderer_string ); - Com_Printf( "GL_VERSION: %s\n", gl_config.version_string ); - Com_Printf( "GL_EXTENSIONS: %s\n", gl_config.extensions_string ); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PRIVATE void R_Register( void ) -{ - gl_round_down = Cvar_Get ("gl_round_down", "1", CVAR_INIT); - - r_lefthand = Cvar_Get( "hand", "0", CVAR_USERINFO | CVAR_ARCHIVE ); - r_norefresh = Cvar_Get ("r_norefresh", "0", CVAR_INIT); - r_novis = Cvar_Get ("r_novis", "0", CVAR_INIT); - r_nocull = Cvar_Get ("r_nocull", "0", CVAR_INIT); - r_speeds = Cvar_Get ("r_speeds", "0", CVAR_INIT); - - - gl_nosubimage = Cvar_Get( "gl_nosubimage", "0", CVAR_INIT ); - - - gl_modulate = Cvar_Get ("gl_modulate", "1", CVAR_ARCHIVE ); - gl_bitdepth = Cvar_Get( "gl_bitdepth", "0", CVAR_INIT ); - gl_mode = Cvar_Get( "gl_mode", "0", CVAR_ARCHIVE ); - gl_lightmap = Cvar_Get ("gl_lightmap", "0", CVAR_INIT); - gl_dynamic = Cvar_Get ("gl_dynamic", "1", CVAR_INIT); - gl_nobind = Cvar_Get ("gl_nobind", "0", CVAR_INIT); - gl_picmip = Cvar_Get ("gl_picmip", "0", CVAR_INIT); - gl_skymip = Cvar_Get ("gl_skymip", "0", CVAR_INIT); - gl_showtris = Cvar_Get( "gl_showtris", "0", CVAR_INIT ); - gl_ztrick = Cvar_Get( "gl_ztrick", "0", CVAR_INIT ); - gl_finish = Cvar_Get( "gl_finish", "0", CVAR_ARCHIVE ); - gl_clear = Cvar_Get( "gl_clear", "0", CVAR_INIT ); - gl_cull = Cvar_Get( "gl_cull", "1", CVAR_INIT ); - gl_polyblend = Cvar_Get( "gl_polyblend", "1", CVAR_INIT ); - gl_flashblend = Cvar_Get( "gl_flashblend", "0", CVAR_INIT ); - gl_playermip = Cvar_Get( "gl_playermip", "0", CVAR_INIT ); - gl_driver = Cvar_Get( "gl_driver", OPENGL_DLL_NAME, CVAR_ARCHIVE ); - - gl_vertex_arrays = Cvar_Get( "gl_vertex_arrays", "0", CVAR_ARCHIVE ); - - gl_ext_swapinterval = Cvar_Get( "gl_ext_swapinterval", "1", CVAR_ARCHIVE ); - gl_ext_palettedtexture = Cvar_Get( "gl_ext_palettedtexture", "1", CVAR_ARCHIVE ); - gl_ext_multitexture = Cvar_Get( "gl_ext_multitexture", "1", CVAR_ARCHIVE ); - gl_ext_pointparameters = Cvar_Get( "gl_ext_pointparameters", "1", CVAR_ARCHIVE ); - gl_ext_compiled_vertex_array = Cvar_Get( "gl_ext_compiled_vertex_array", "1", CVAR_ARCHIVE ); - - gl_drawbuffer = Cvar_Get( "gl_drawbuffer", "GL_BACK", CVAR_INIT ); - gl_swapinterval = Cvar_Get( "gl_swapinterval", "1", CVAR_ARCHIVE ); - -// gl_saturatelighting = Cvar_Get( "gl_saturatelighting", "0", CVAR_INIT ); - - r_fullscreen = Cvar_Get( "r_fullscreen", "0", CVAR_ARCHIVE ); - vid_gamma = Cvar_Get( "vid_gamma", "1.0", CVAR_ARCHIVE ); - r_ref = Cvar_Get( "r_ref", "gl", CVAR_ARCHIVE ); - - Cmd_AddCommand( "screenshot", R_ScreenShot_f ); - Cmd_AddCommand( "r_strings", R_Strings_f ); -} - - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void R_Init() -{ - char renderer_buffer[ 1000 ]; - char vendor_buffer[ 1000 ]; - int err; - int a, b; - - - Com_Printf( "\n------ Display Initialization ------\n" ); - - Com_Printf( "Initializing OpenGL Subsystem\n" ); - - R_Register(); - - // set our "safe" modes - gl_state.prev_mode = 0; - - viddef.width = 480; - viddef.height = 320; - - // get various GL strings - gl_config.vendor_string = (char *)pfglGetString( GL_VENDOR ); - Com_Printf( "GL_VENDOR: %s\n", gl_config.vendor_string ); - - gl_config.renderer_string = (char *)pfglGetString( GL_RENDERER ); - Com_Printf( "GL_RENDERER: %s\n", gl_config.renderer_string ); - - gl_config.version_string = (char *)pfglGetString( GL_VERSION ); - Com_Printf( "GL_VERSION: %s\n", gl_config.version_string ); - - gl_config.extensions_string = (char *)pfglGetString( GL_EXTENSIONS ); - Com_Printf( "GL_EXTENSIONS: %s\n", gl_config.extensions_string ); - - my_strlcpy( renderer_buffer, gl_config.renderer_string, sizeof( renderer_buffer ) ); - (void)my_strlwr( renderer_buffer ); - - my_strlcpy( vendor_buffer, gl_config.vendor_string, sizeof( vendor_buffer ) ); - (void)my_strlwr( vendor_buffer ); - - - sscanf( gl_config.version_string, "%d.%d", &a, &b ); - if( a >= 1 && b >= 2 ) - { - gl_config.Version_1_2 = true; - } - - pfglGetIntegerv( GL_MAX_TEXTURE_SIZE, &glMaxTexSize ); - Com_Printf( "GL_MAX_TEXTURE_SIZE: %d\n", glMaxTexSize); - - GL_SetDefaultState(); - - TM_Init(); - Font_Init(); - - err = pfglGetError(); - if( err != GL_NO_ERROR ) - { - Com_Printf( "glGetError() = 0x%x\n", err ); - } -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void R_Shutdown( void ) -{ -// Cmd_RemoveCommand ("modellist"); -// Cmd_RemoveCommand ("screenshot"); -// Cmd_RemoveCommand ("imagelist"); -// Cmd_RemoveCommand ("gl_strings"); - -// Mod_FreeAll (); - - TM_Shutdown(); - - /* - ** shut down OS specific OpenGL stuff like contexts, etc. - */ - GLimp_Shutdown(); - - /* - ** shutdown our OpenGL subsystem - */ -#ifndef IPHONE - OpenGL_Shutdown(); -#endif -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void R_EndFrame( void ) -{ - GLimp_EndFrame(); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void R_AppActivate( _boolean active ) -{ - GLimp_AppActivate( active ); -} - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void GL_UpdateSwapInterval( void ) -{ - if ( gl_swapinterval->modified ) - { - gl_swapinterval->modified = false; - -#ifdef _WIN32 - - if ( pfwglSwapIntervalEXT ) - { - pfwglSwapIntervalEXT( FloatToInt( gl_swapinterval->value ) ); - } - -#endif - - } -} - - - -/* ------------------------------------------------------------------------------ - Function: PrintGLError -Print OpenGL error message. - - Parameters: err -[in] Error code. - from -[in] function name that produced the error. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void PrintGLError( W32 err, const char *from ) -{ - if( err == GL_NO_ERROR ) - { - return; - } - - if( from != "" ) - { - Com_Printf( "\n\n\nGL Error: %s\n", from ); - } - - switch( err ) - { - case GL_NO_ERROR: - Com_Printf( "GL_NO_ERROR:\nNo error has been recorded. The value of this symbolic constant is guaranteed to be zero.\n" ); - break; - - case GL_INVALID_ENUM: - Com_Printf( "GL_INVALID_ENUM:\nAn unacceptable value is specified for an enumerated argument. The offending function is ignored, having no side effect other than to set the error flag.\n" ); - break; - - case GL_INVALID_VALUE: - Com_Printf( "GL_INVALID_VALUE:\nA numeric argument is out of range. The offending function is ignored, having no side effect other than to set the error flag.\n" ); - break; - - case GL_INVALID_OPERATION: - Com_Printf( "GL_INVALID_OPERATION:\nThe specified operation is not allowed in the current state. The offending function is ignored, having no side effect other than to set the error flag.\n" ); - break; - - case GL_STACK_OVERFLOW: - Com_Printf( "GL_STACK_OVERFLOW:\nThis function would cause a stack overflow. The offending function is ignored, having no side effect other than to set the error flag.\n" ); - break; - - case GL_STACK_UNDERFLOW: - Com_Printf( "GL_STACK_UNDERFLOW:\nThis function would cause a stack underflow. The offending function is ignored, having no side effect other than to set the error flag.\n" ); - break; - - case GL_OUT_OF_MEMORY: - Com_Printf( "GL_OUT_OF_MEMORY:\nThere is not enough memory left to execute the function. The state of OpenGL is undefined, except for the state of the error flags, after this error is recorded.\n" ); - break; - - default: - Com_Printf( "Unknown GL error flag 0x%x\n", err ); - } -} diff --git a/wolf3d/newCode/env/opengl_texture.c b/wolf3d/newCode/env/opengl_texture.c deleted file mode 100644 index eabeb77..0000000 --- a/wolf3d/newCode/env/opengl_texture.c +++ /dev/null @@ -1,253 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * opengl_texture.c: OpenGL Texture Manager. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#include "../wolfiphone.h" - -int currentTextures[ 4 ]; -int currenttmu; - -int glMaxTexSize; - -// *************************************************************************** - -// *************************************************************************** - - - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_DeleteTexture( unsigned int texnum ) -{ - pfglDeleteTextures( 1, &texnum ); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_TexEnv( GLenum mode ) -{ - static int lastmodes[ 4 ] = { -1, -1, -1, -1 }; - - if ( mode != lastmodes[ currenttmu ] ) - { - pfglTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, mode ); - lastmodes[ currenttmu ] = mode; - } -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_SelectTexture( GLenum texture ) -{ - int tmu; - -#ifndef IPHONE - if( ! pfglActiveTextureARB ) - { - return; - } -#endif - - if( texture == GL_TEXTURE0 ) - { - tmu = 0; - } - else if( texture == GL_TEXTURE1 ) - { - tmu = 1; - } - else if( texture == GL_TEXTURE2 ) - { - tmu = 2; - } - else - { - tmu = 3; - } - - if( tmu == currenttmu ) - { - return; - } - - - currenttmu = tmu; - - pfglActiveTextureARB( texture ); - pfglClientActiveTextureARB( texture ); - -} - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_Bind( int texnum ) -{ - // Is this texture already bound - if( currentTextures[ currenttmu ] == texnum ) - { - return; - } - - currentTextures[ currenttmu ] = texnum; - - pfglBindTexture( GL_TEXTURE_2D, texnum ); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_MBind( GLenum target, int texnum ) -{ - R_SelectTexture( target ); - - if( target == GL_TEXTURE0 ) - { - if ( currentTextures[ 0 ] == texnum ) - { - return; - } - } - else if( target == GL_TEXTURE1 ) - { - if( currentTextures[ 1 ] == texnum ) - { - return; - } - } - else if( target == GL_TEXTURE2 ) - { - if( currentTextures[ 2 ] == texnum ) - { - return; - } - } - else - { - if( currentTextures[ 3 ] == texnum ) - { - return; - } - } - - R_Bind( texnum ); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_EnableMultitexture( _boolean enable ) -{ -#ifndef IPHONE - if( ! pfglActiveTextureARB ) - { - return; - } -#endif - - if( enable ) - { - R_SelectTexture( GL_TEXTURE1 ); - pfglEnable( GL_TEXTURE_2D ); - R_TexEnv( GL_REPLACE ); - } - else - { - R_SelectTexture( GL_TEXTURE1 ); - pfglDisable( GL_TEXTURE_2D ); - R_TexEnv( GL_REPLACE ); - } - - R_SelectTexture( GL_TEXTURE0 ); - R_TexEnv( GL_REPLACE ); - -} - diff --git a/wolf3d/newCode/env/random_number.c b/wolf3d/newCode/env/random_number.c deleted file mode 100644 index 7256694..0000000 --- a/wolf3d/newCode/env/random_number.c +++ /dev/null @@ -1,107 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * random_number.c: Wolfenstein3-D random number generator. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from Wolfenstein3-D, and was originally - * written by Id Software, Inc. - * - */ - - -#include "../wolfiphone.h" - -/* This is just John Carmack's table driven pseudo-random number generator */ - -W32 rndtable[] = { - 0, 8, 109, 220, 222, 241, 149, 107, 75, 248, 254, 140, 16, 66, - 74, 21, 211, 47, 80, 242, 154, 27, 205, 128, 161, 89, 77, 36, - 95, 110, 85, 48, 212, 140, 211, 249, 22, 79, 200, 50, 28, 188, - 52, 140, 202, 120, 68, 145, 62, 70, 184, 190, 91, 197, 152, 224, - 149, 104, 25, 178, 252, 182, 202, 182, 141, 197, 4, 81, 181, 242, - 145, 42, 39, 227, 156, 198, 225, 193, 219, 93, 122, 175, 249, 0, - 175, 143, 70, 239, 46, 246, 163, 53, 163, 109, 168, 135, 2, 235, - 25, 92, 20, 145, 138, 77, 69, 166, 78, 176, 173, 212, 166, 113, - 94, 161, 41, 50, 239, 49, 111, 164, 70, 60, 2, 37, 171, 75, - 136, 156, 11, 56, 42, 146, 138, 229, 73, 146, 77, 61, 98, 196, - 135, 106, 63, 197, 195, 86, 96, 203, 113, 101, 170, 247, 181, 113, - 80, 250, 108, 7, 255, 237, 129, 226, 79, 107, 112, 166, 103, 241, - 24, 223, 239, 120, 198, 58, 60, 82, 128, 3, 184, 66, 143, 224, - 145, 224, 81, 206, 163, 45, 63, 90, 168, 114, 59, 33, 159, 95, - 28, 139, 123, 98, 125, 196, 15, 70, 194, 253, 54, 14, 109, 226, - 71, 17, 161, 93, 186, 87, 244, 138, 20, 52, 123, 251, 26, 36, - 17, 46, 52, 231, 232, 76, 31, 221, 84, 37, 216, 165, 212, 106, - 197, 242, 98, 43, 39, 175, 254, 145, 190, 84, 118, 222, 187, 136, - 120, 163, 236, 249 -}; - -W32 rndindex = 0; - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void US_InitRndT( int randomize ) -{ - if( randomize ) - { - rndindex = time( NULL ) & 0xFF; - } - else - { - rndindex = 0; - } -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC int US_RndT( void ) -{ - rndindex++; - rndindex &= 0xFF; - - return rndtable[ rndindex ]; -} - - diff --git a/wolf3d/newCode/env/random_number.h b/wolf3d/newCode/env/random_number.h deleted file mode 100644 index 6fae19d..0000000 --- a/wolf3d/newCode/env/random_number.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * mymath.h: Math routines. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from Wolfenstein3-D, and was originally - * written by Id Software, Inc. - * - */ - -#ifndef __RANDOM_NUMBER_H__ -#define __RANDOM_NUMBER_H__ - - -#define random() ( (rand() & 0x7fff) / ((float)0x7fff) ) -#define crandom() ( 2.0 * (random() - 0.5) ) - - -extern void US_InitRndT( int randomize ); -extern int US_RndT( void ); - - - - - -#endif /* __RANDOM_NUMBER_H__ */ diff --git a/wolf3d/newCode/env/renderer.h b/wolf3d/newCode/env/renderer.h deleted file mode 100644 index f0fe712..0000000 --- a/wolf3d/newCode/env/renderer.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * renderer.h: Interface to graphics API. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -/* - - Notes: - - This module communicates with the graphics API. The API can be any graphics - API, e.g OpenGL, DirectX, SDL, GDI, etc; as long as the functions listed in - this header are implemented. - -*/ - -#ifndef __RENDERER_H__ -#define __RENDERER_H__ - - -#ifdef _WIN32 - - #define OPENGL_DLL_NAME "opengl32.dll" - -#elif __unix__ - - #define OPENGL_DLL_NAME "libGL.so.1" - -#elif IPHONE - - #define OPENGL_DLL_NAME "not applicable" - -#else - - #error "Define OPENGL_DLL_NAME" - -#endif - - - - - -typedef enum -{ - rserr_ok, - - rserr_invalid_fullscreen, - rserr_invalid_mode, - - rserr_unknown - -} rserr_t; - - -extern int registration_sequence; - -extern void R_Init( void ); -extern void R_Shutdown( void ); - -extern void R_BeginRegistration( const char *model ); -extern void R_BeginFrame( void ); -extern void R_EndFrame( void ); - -extern void R_AppActivate( _boolean active ); -extern void R_SwapBuffers( int ); -extern void R_SetPalette( const unsigned char *palette); - - -extern void R_DeleteTexture( unsigned int texnum ); - - -extern void R_Draw_Pic( int x, int y, const char *name ); -extern void R_Draw_StretchPic( int x, int y, int w, int h, const char *name ); -extern void R_Draw_Character( int x, int y, int num, font_t *myfont ); -extern void R_Draw_Tile( int x, int y, int w, int h, const char *name ); -extern void R_Draw_Fill( int x, int y, int w, int h, colour3_t c ); -extern void R_Draw_Line( int nXStart, int nYStart, int nXEnd, int nYEnd, int width, colour3_t c ); - - -#endif /* __RENDERER_H__ */ diff --git a/wolf3d/newCode/env/share.c b/wolf3d/newCode/env/share.c deleted file mode 100644 index 26b2da2..0000000 --- a/wolf3d/newCode/env/share.c +++ /dev/null @@ -1,189 +0,0 @@ -/* - - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -#include "../wolfiphone.h" - - -char com_token[128]; - - - - -/* -============================================================================ - - BYTE ORDER FUNCTIONS - -============================================================================ -*/ - - - -/* ------------------------------------------------------------------------------ - Function: va() -Does a varargs printf into a temp buffer, so I don't need to - have varargs versions of all text functions. - - Parameters: format -[in] Format-control string. - ... -[in] Optional arguments. - - Returns: Formatted string. - - Notes: - If format string is longer than 1024 it will be truncated. ------------------------------------------------------------------------------ -*/ -PUBLIC char *va( char *format, ... ) -{ - va_list argptr; - static char string[ 1024 ]; - - va_start( argptr, format ); - (void)vsnprintf( string, sizeof( string ), format, argptr ); - va_end( argptr ); - - string[ sizeof( string ) - 1 ] = '\0'; - - return string; -} - - -/* ------------------------------------------------------------------------------ - Function: COM_Parse() -Parse a token out of a string. - - Parameters: data_p -[in] String to parse. - - Returns: On success it will return the token string, otherwise it will - return "". - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC char *COM_Parse( char **data_p ) -{ - int c; - int len; - char *data; - - data = *data_p; - len = 0; - com_token[ 0 ] = 0; - - if( ! data ) - { - *data_p = NULL; - return ""; - } - -// skip whitespace -skipwhite: - while( (c = *data) <= ' ') - { - if( c == 0 ) - { - *data_p = NULL; - return ""; - } - data++; - } - -// skip // comments - if( c == '/' && data[ 1 ] == '/' ) - { - while( *data && *data != '\n' ) - { - data++; - } - goto skipwhite; - } - -// handle quoted strings specially - if( c == '\"' ) - { - data++; - while( 1 ) - { - c = *data++; - if( c == '\"' || ! c ) - { - com_token[ len ] = 0; - *data_p = data; - return com_token; - } - if( len < MAX_TOKEN_CHARS ) - { - com_token[ len ] = c; - len++; - } - } - } - -// parse a regular word - do - { - if( len < MAX_TOKEN_CHARS ) - { - com_token[ len ] = c; - len++; - } - data++; - c = *data; - - } while( c > 32 ); - - if( len == MAX_TOKEN_CHARS ) - { -// Com_Printf ("Token exceeded %i chars, discarded.\n", MAX_TOKEN_CHARS); - len = 0; - } - com_token[ len ] = 0; - - *data_p = data; - - return com_token; -} - - -/* ------------------------------------------------------------------------------ - Function: Com_PageInMemory() - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -int paged_total; - -PUBLIC void Com_PageInMemory( PW8 buffer, int size ) -{ - int i; - - for( i = size - 1 ; i > 0 ; i -= 4096 ) - { - paged_total += buffer[ i ]; - } -} - diff --git a/wolf3d/newCode/env/sound.c b/wolf3d/newCode/env/sound.c deleted file mode 100644 index 9332e79..0000000 --- a/wolf3d/newCode/env/sound.c +++ /dev/null @@ -1,791 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * sound.c: - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - * Acknowledgement: - * Portion of this code was derived from Quake II Evolved. - * - */ - -#include "../wolfiphone.h" - - -#define MAX_PLAYSOUNDS 128 - -#define MAX_CHANNELS 64 - -PRIVATE playSound_t s_playSounds[ MAX_PLAYSOUNDS ]; -PRIVATE playSound_t s_freePlaySounds; -PRIVATE playSound_t s_pendingPlaySounds; - -PRIVATE channel_t s_channels[ MAX_CHANNELS ]; -PRIVATE int s_numChannels; - -PRIVATE listener_t s_listener; - -PRIVATE int s_frameCount; - -PRIVATE _boolean s_activeApp; - -_boolean sound_initialized = false; - -cvar_t *s_initSound; -cvar_t *s_masterVolume; -cvar_t *s_sfxVolume; -cvar_t *s_musicVolume; -cvar_t *s_minDistance; -cvar_t *s_maxDistance; -cvar_t *s_rolloffFactor; -cvar_t *s_dopplerFactor; -cvar_t *s_dopplerVelocity; - - - -///////////////////////////////////////////////////////////////////// -// -// Sound Channels -// -///////////////////////////////////////////////////////////////////// - - -/* ------------------------------------------------------------------------------ - Function: Sound_AllocChannels -Allocate sound channels. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void Sound_AllocChannels( void ) -{ - channel_t *ch; - int i; - - for( i = 0, ch = s_channels ; i < MAX_CHANNELS ; ++i, ++ch ) - { - pfalGenSources( 1, &ch->sourceName ); - - if( pfalGetError() != AL_NO_ERROR ) - { - break; - } - - s_numChannels++; - } -} - -/* ------------------------------------------------------------------------------ - Function: Sound_FreeChannels -Free sound channels. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void Sound_FreeChannels( void ) -{ - channel_t *ch; - int i; - - for( i = 0, ch = s_channels; i < s_numChannels; i++, ch++) - { - pfalDeleteSources( 1, &ch->sourceName ); - - memset( ch, 0, sizeof( *ch ) ); - } - - s_numChannels = 0; -} - -/* ------------------------------------------------------------------------------ - Function: Sound_FreeChannels -Free sound channels. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE int Sound_ChannelState( channel_t *ch ) -{ - int state; - - pfalGetSourcei( ch->sourceName, AL_SOURCE_STATE, &state ); - - return state; -} - - -PRIVATE void Sound_PlayChannel( channel_t *ch, sfx_t *sfx ) -{ - ch->sfx = sfx; - - pfalSourcei( ch->sourceName, AL_BUFFER, sfx->bufferNum ); - pfalSourcei( ch->sourceName, AL_LOOPING, ch->loopSound ); - pfalSourcei( ch->sourceName, AL_SOURCE_RELATIVE, AL_FALSE ); - pfalSourcePlay( ch->sourceName ); -} - - -PRIVATE void Sound_StopChannel( channel_t *ch ) -{ - ch->sfx = NULL; - - pfalSourceStop( ch->sourceName ); - pfalSourcei( ch->sourceName, AL_BUFFER, 0 ); -#ifdef IPHONE - // OpenAL on the iphone doesn't seem to stop sounds properly. - // Maybe regenning the source will work... - pfalDeleteSources( 1, &ch->sourceName ); - pfalGenSources( 1, &ch->sourceName ); -#endif -} - - -PRIVATE void Sound_SpatializeChannel( channel_t *ch ) -{ -// vec3_t position, velocity; - - // Update position and velocity - if( ch->entNum == 0 || ! ch->distanceMult ) - { - pfalSourcefv( ch->sourceName, AL_POSITION, s_listener.position ); - pfalSourcefv( ch->sourceName, AL_VELOCITY, s_listener.velocity ); - } - else - { - if( ch->fixedPosition ) - { - pfalSource3f( ch->sourceName, AL_POSITION, ch->position[1], ch->position[2], -ch->position[0] ); - pfalSource3f( ch->sourceName, AL_VELOCITY, 0, 0, 0 ); - } -/* else - { - if( ch->loopSound ) - { - Client_GetEntitySoundSpatialization( ch->loopNum, position, velocity ); - } - else - { - Client_GetEntitySoundSpatialization( ch->entNum, position, velocity ); - } - - pfalSource3f( ch->sourceName, AL_POSITION, position[1], position[2], -position[0] ); - pfalSource3f( ch->sourceName, AL_VELOCITY, velocity[1], velocity[2], -velocity[0] ); - } -*/ - } - - // Update min/max distance - if( ch->distanceMult ) - { - pfalSourcef( ch->sourceName, AL_REFERENCE_DISTANCE, s_minDistance->value * ch->distanceMult ); - } - else - { - pfalSourcef( ch->sourceName, AL_REFERENCE_DISTANCE, s_maxDistance->value ); - } - - pfalSourcef( ch->sourceName, AL_MAX_DISTANCE, s_maxDistance->value ); - - // Update volume and rolloff factor - pfalSourcef( ch->sourceName, AL_GAIN, s_sfxVolume->value * ch->volume ); - pfalSourcef( ch->sourceName, AL_ROLLOFF_FACTOR, s_rolloffFactor->value ); -} - - -/* ------------------------------------------------------------------------------ - Function: Sound_PickChannel - - - Parameters: - - Returns: - - Notes: - Tries to find a free channel, or tries to replace an active channel. ------------------------------------------------------------------------------ -*/ -PUBLIC channel_t *Sound_PickChannel( W32 entNum, W32 entChannel ) -{ - channel_t *ch; - int i; - int firstToDie = -1; - int oldestTime = iphoneFrameNum; - - for( i = 0, ch = s_channels ; i < s_numChannels ; ++i, ++ch ) - { - // Don't let game sounds override streaming sounds - if( ch->streaming ) - { - continue; - } - - // Check if this channel is active - if( ! ch->sfx ) - { - // Free channel - firstToDie = i; - break; - } - - // Channel 0 never overrides - if( entChannel != 0 && (ch->entNum == entNum && ch->entChannel == entChannel ) ) - { - // Always override sound from same entity - firstToDie = i; - break; - } - - // Replace the oldest sound - if( ch->startTime < oldestTime ) - { - oldestTime = ch->startTime; - firstToDie = i; - } - } - - if( firstToDie == -1 ) - { - return NULL; - } - - ch = &s_channels[ firstToDie ]; - - ch->entNum = entNum; - ch->entChannel = entChannel; - ch->startTime = iphoneFrameNum; - - // Make sure this channel is stopped - Sound_StopChannel( ch ); - - return ch; -} - -///////////////////////////////////////////////////////////////////// -// End of Sound Channels -///////////////////////////////////////////////////////////////////// - - -/* ------------------------------------------------------------------------------ - Function: Sound_AddLoopingSounds - - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - Entities with a a->sound field will generate looping sounds that are - automatically started and stopped as the entities are sent to the - client. ------------------------------------------------------------------------------ -*/ -PRIVATE void Sound_AddLoopingSounds( void ) -{ - -} - - - -PRIVATE playSound_t *Sound_AllocPlaySound( void ) -{ - playSound_t *ps; - - ps = s_freePlaySounds.next; - if( ps == &s_freePlaySounds ) - { - return NULL; // No free playSounds - } - - ps->prev->next = ps->next; - ps->next->prev = ps->prev; - - return ps; -} - - -PRIVATE void Sound_FreePlaySound( playSound_t *ps ) -{ - ps->prev->next = ps->next; - ps->next->prev = ps->prev; - - // Add to free list - ps->next = s_freePlaySounds.next; - s_freePlaySounds.next->prev = ps; - ps->prev = &s_freePlaySounds; - s_freePlaySounds.next = ps; -} - -/* ------------------------------------------------------------------------------ - Function: Sound_IssuePlaySounds - - - Parameters: - - Returns: Nothing. - - Notes: - Take the next playsound and begin it on the channel. - This is never called directly by Sound_StartSound*, but only by the update loop. ------------------------------------------------------------------------------ -*/ -PRIVATE void Sound_IssuePlaySounds( void ) -{ - playSound_t *ps; - channel_t *ch; - - while( 1 ) - { - ps = s_pendingPlaySounds.next; - if( ps == &s_pendingPlaySounds ) - { - break; // No more pending playSounds - } - - if( ps->beginTime > iphoneFrameNum ) - { - break; // No more pending playSounds this frame - } - - // Pick a channel and start the sound effect - ch = Sound_PickChannel( ps->entNum, ps->entChannel ); - if( ! ch ) - { - if( ps->sfx->name[ 0 ] == '#' ) - Com_DPrintf( "Dropped sound %s\n", &ps->sfx->name[1]); - else - Com_DPrintf( "Dropped sound sound/%s\n", ps->sfx->name); - - Sound_FreePlaySound( ps ); - continue; - } - - ch->loopSound = false; - ch->fixedPosition = ps->fixedPosition; - vectorCopy( ps->position, ch->position ); - ch->volume = ps->volume; - - if( ps->attenuation != ATTN_NONE ) - { - ch->distanceMult = 1.0f / ps->attenuation; - } - else - { - ch->distanceMult = 0.0; - } - - Sound_SpatializeChannel( ch ); - - Sound_PlayChannel( ch, ps->sfx ); - - // Free the playSound - Sound_FreePlaySound( ps ); - } -} - - -/* ------------------------------------------------------------------------------ - Function: Sound_StartSound - - - Parameters: - - Returns: Nothing. - - Notes: - Validates the parms and queues the sound up. - If origin is NULL, the sound will be dynamically sourced from the - entity. - entChannel 0 will never override a playing sound. ------------------------------------------------------------------------------ -*/ -PUBLIC void Sound_StartSound( const vec3_t position, int entNum, int entChannel, sfx_t *sfx, float volume, float attenuation, int timeOfs ) -{ - playSound_t *ps, *sort; - - if( ! sound_initialized ) - { - return; - } - - if( ! sfx ) - { - return; - } - - - // Make sure the sound is loaded - if( ! Sound_LoadSound( sfx ) ) - { - return; - } - - // Allocate a playSound - ps = Sound_AllocPlaySound(); - if( ! ps ) - { - if( sfx->name[0] == '#' ) - Com_DPrintf( "Dropped sound %s\n", &sfx->name[1] ); - else - Com_DPrintf( "Dropped sound sound/%s\n", sfx->name); - - return; - } - - ps->sfx = sfx; - ps->entNum = entNum; - ps->entChannel = entChannel; - - if( position ) - { - ps->fixedPosition = true; - vectorCopy( position, ps->position ); - } - else - { - ps->fixedPosition = false; - } - - ps->volume = volume; - ps->attenuation = attenuation; - ps->beginTime = iphoneFrameNum; - - // Sort into the pending playSounds list - for( sort = s_pendingPlaySounds.next ; sort != &s_pendingPlaySounds && sort->beginTime < ps->beginTime ; sort = sort->next ) - { - ; - } - - ps->next = sort; - ps->prev = sort->prev; - - ps->next->prev = ps; - ps->prev->next = ps; -} - - -PUBLIC void Sound_StartLocalSound( const char *filename ) -{ - sfx_t *sfx; - - if( ! sound_initialized ) - { - return; - } - - sfx = Sound_RegisterSound( filename ); - if( ! sfx ) - { - Com_Printf( "Sound_StartLocalSound: could not cache (%s)\n", filename ); - return; - } - - Sound_StartSound( NULL, 0, 0, sfx, 1, ATTN_NONE, 0 ); -} - - -PUBLIC void Sound_StopAllSounds( void ) -{ - channel_t *ch; - int i; - - if( ! sound_initialized ) - { - return; - } - - // Clear all the playSounds - memset( s_playSounds, 0, sizeof( s_playSounds ) ); - - s_freePlaySounds.next = s_freePlaySounds.prev = &s_freePlaySounds; - s_pendingPlaySounds.next = s_pendingPlaySounds.prev = &s_pendingPlaySounds; - - for( i = 0 ; i < MAX_PLAYSOUNDS ; ++i ) - { - s_playSounds[ i ].prev = &s_freePlaySounds; - s_playSounds[ i ].next = s_freePlaySounds.next; - s_playSounds[ i ].prev->next = &s_playSounds[ i ]; - s_playSounds[ i ].next->prev = &s_playSounds[ i ]; - } - - // Stop all the channels - for( i = 0, ch = s_channels ; i < s_numChannels ; ++i, ++ch ) - { - if( ! ch->sfx ) - { - continue; - } - - Sound_StopChannel( ch ); - } - - // Reset frame count - s_frameCount = 0; -} - - -/* ------------------------------------------------------------------------------ - Function: Sound_Update - - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - Called once each time through the main loop. ------------------------------------------------------------------------------ -*/ -PUBLIC void Sound_Update( const vec3_t position, const vec3_t velocity, const vec3_t at, const vec3_t up) -{ - channel_t *ch; - int i, total = 0; - - if( ! sound_initialized ) - { - return; - } - - // Bump frame count - s_frameCount++; - - // Set up listener - vectorSet( s_listener.position, position[1], position[2], -position[0] ); - vectorSet( s_listener.velocity, velocity[1], velocity[2], -velocity[0] ); - vectorSet( &s_listener.orientation[0], at[1], -at[2], -at[0] ); - vectorSet( &s_listener.orientation[3], up[1], -up[2], -up[0] ); - - pfalListenerfv( AL_POSITION, s_listener.position ); - pfalListenerfv( AL_VELOCITY, s_listener.velocity ); - pfalListenerfv( AL_ORIENTATION, s_listener.orientation ); - pfalListenerf( AL_GAIN, (s_activeApp) ? s_masterVolume->value : 0.0); - - // Set state - pfalDistanceModel( AL_INVERSE_DISTANCE_CLAMPED ); - - pfalDopplerFactor( s_dopplerFactor->value ); - pfalDopplerVelocity( s_dopplerVelocity->value ); - - // Stream background track - Sound_StreamBGTrack(); - - // Add looping sounds - Sound_AddLoopingSounds(); - - // Issue playSounds - Sound_IssuePlaySounds(); - - // Update spatialization for all sounds - for( i = 0, ch = s_channels ; i < s_numChannels ; ++i, ++ch ) - { - if( ! ch->sfx ) - { - continue; // Not active - } - - // Check for stop - if( ch->loopSound ) - { - if( ch->loopFrame != s_frameCount ) - { - Sound_StopChannel( ch ); - - continue; - } - } - else - { - if( Sound_ChannelState(ch) == AL_STOPPED ) - { - Sound_StopChannel( ch ); - - continue; - } - } - - // Respatialize channel - Sound_SpatializeChannel( ch ); - - total++; - } - - -} - - -PUBLIC void Sound_Activate( _boolean active ) -{ - s_activeApp = active; - - if( ! sound_initialized ) - { - return; - } - - pfalListenerf( AL_GAIN, ( active ) ? s_masterVolume->value : 0.0 ); - -} - - -///////////////////////////////////////////////////////////////////// -// -// Console Commands -// -///////////////////////////////////////////////////////////////////// - -PRIVATE void Sound_Play_f( void ) -{ - - int i = 1; - char name[ MAX_GAMEPATH ]; - - if( Cmd_Argc() == 1 ) - { - Com_Printf( "Usage: play \n" ); - return; - } - - while( i < Cmd_Argc() ) - { - my_strlcpy( name, Cmd_Argv( i ), sizeof( name ) ); - - Sound_StartLocalSound( name ); - - i++; - } -} - -PRIVATE void Sound_StopSound_f( void ) -{ - Sound_StopAllSounds(); -} - - -/* ------------------------------------------------------------------------------ - Function: Sound_Restart_f -Console function to restart the sound module. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - Restart the sound subsystem so it can pick up new parameters and flush - all sounds. ------------------------------------------------------------------------------ -*/ -PRIVATE void Sound_Restart_f( void ) -{ - Sound_Shutdown(); - Sound_Init(); -} - -///////////////////////////////////////////////////////////////////// -// End of Console Commands -///////////////////////////////////////////////////////////////////// - - -extern void Sound_SoundList_f( void ); - - -PRIVATE void Sound_Register( void ) -{ - s_initSound = Cvar_Get( "s_initSound", "1", CVAR_INIT ); - s_masterVolume = Cvar_Get( "s_masterVolume", "1.0", CVAR_ARCHIVE ); - s_sfxVolume = Cvar_Get( "s_sfxVolume", "1.0", CVAR_ARCHIVE ); - s_musicVolume = Cvar_Get( "s_musicVolume", "1.0", CVAR_ARCHIVE ); - s_minDistance = Cvar_Get( "s_minDistance", "0.0", CVAR_ARCHIVE ); - s_maxDistance = Cvar_Get( "s_maxDistance", "1.0", CVAR_ARCHIVE ); - s_rolloffFactor = Cvar_Get( "s_rolloffFactor", "1.0", CVAR_ARCHIVE ); - s_dopplerFactor = Cvar_Get( "s_dopplerFactor", "1.0", CVAR_ARCHIVE ); - s_dopplerVelocity = Cvar_Get( "s_dopplerVelocity", "0.0", CVAR_ARCHIVE ); - - Cmd_AddCommand( "play", Sound_Play_f ); - Cmd_AddCommand( "stopsound", Sound_StopSound_f ); - Cmd_AddCommand( "listSounds", Sound_SoundList_f ); - Cmd_AddCommand( "snd_restart", Sound_Restart_f ); -} - - -PUBLIC void Sound_Init( void ) -{ - Com_Printf( "\n------- Sound Initialization -------\n" ); - - - Sound_Register(); - - - if( ! Sound_Device_Setup() ) - { - Com_Printf( "------------------------------------\n" ); - return; - } - - sound_initialized = true; - - Sound_AllocChannels(); - Sound_StopAllSounds(); - - - Com_Printf( "------------------------------------\n" ); -} - - -PUBLIC void Sound_Shutdown( void ) -{ - Cmd_RemoveCommand( "play" ); - Cmd_RemoveCommand( "stopsound" ); - Cmd_RemoveCommand( "listSounds" ); - Cmd_RemoveCommand( "snd_restart" ); - - if( ! sound_initialized ) - { - return; - } - - Sound_FreeSounds(); - Sound_FreeChannels(); - - Sound_Device_Shutdown(); - - sound_initialized = false; -} diff --git a/wolf3d/newCode/env/sound.h b/wolf3d/newCode/env/sound.h deleted file mode 100644 index 92a25f4..0000000 --- a/wolf3d/newCode/env/sound.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * sound.h: - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - * Acknowledgement: - * Portion of this code was derived from Quake II Evolved. - * - */ - -#ifndef __SOUND_H__ -#define __SOUND_H__ - -// Sound channels -// Channel 0 never willingly overrides -// Other channels (1-7) always override a playing sound on that channel -#define CHAN_AUTO 0 -#define CHAN_WEAPON 1 -#define CHAN_VOICE 2 -#define CHAN_ITEM 3 -#define CHAN_BODY 4 - -// Modifier flags -#define CHAN_NO_PHS_ADD 8 // Send to all clients, not just ones in PHS (ATTN 0 will also do this) -#define CHAN_RELIABLE 16 // Send by reliable message, not datagram - -// Sound attenuation values -#define ATTN_NONE 0 // Full volume the entire level -#define ATTN_NORM 1 -#define ATTN_IDLE 2 -#define ATTN_STATIC 3 // Diminish very rapidly with distance - - -extern cvar_t *s_device; -extern cvar_t *s_masterVolume; -extern cvar_t *s_sfxVolume; -extern cvar_t *s_musicVolume; - -extern char *sound_devices[ 12 ]; -extern W16 numSoundDevices; -extern W16 numDefaultSoundDevice; - -extern W8 sound_initialized; - -extern void Sound_Init( void ); -extern void Sound_Shutdown( void ); - -extern void Sound_Update( const vec3_t position, const vec3_t velocity, const vec3_t at, const vec3_t up); - -extern void Sound_Activate( _boolean active ); - -extern channel_t *Sound_PickChannel( W32 entNum, W32 entChannel ); - -extern sfx_t *Sound_RegisterSound( const char *name ); -extern void Sound_StartLocalSound( const char *filename ); - -extern void Sound_StreamBGTrack( void ); -extern void Sound_StartStreaming( void ); -extern void Sound_StopStreaming( void ); -extern void Sound_StartBGTrack( const char *introTrack, const char *loopTrack ); -extern void Sound_StopBGTrack( void ); - -extern void Sound_StartSound( const vec3_t position, int entNum, int entChannel, sfx_t *sfx, float volume, float attenuation, int timeOfs ); - -extern void Sound_StopAllSounds( void ); - - -#endif /* __SOUND_H__ */ diff --git a/wolf3d/newCode/env/sound_local.h b/wolf3d/newCode/env/sound_local.h deleted file mode 100644 index 94246a8..0000000 --- a/wolf3d/newCode/env/sound_local.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * sound_local.h: - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - * Acknowledgement: - * Portion of this code was derived from Quake II Evolved. - * - */ - - -#ifndef __SOUND_LOCAL_H__ -#define __SOUND_LOCAL_H__ - - -typedef struct sfx_s -{ - char name[ MAX_GAMEPATH ]; - _boolean defaulted; - _boolean loaded; - - int samples; - int rate; - unsigned format; /* Sound samples: format specifier */ - unsigned bufferNum; - - struct sfx_s *nextHash; - -} sfx_t; - -// A playSound will be generated by each call to S_StartSound. -// When the mixer reaches playSound->beginTime, the playSound will be -// assigned to a channel. -typedef struct playSound_s -{ - struct playSound_s *prev, *next; - sfx_t *sfx; - int entNum; - int entChannel; - _boolean fixedPosition; // Use position instead of fetching entity's origin - vec3_t position; // Only use if fixedPosition is set - float volume; - float attenuation; - int beginTime; // Begin at this time - -} playSound_t; - -typedef struct -{ - _boolean streaming; - sfx_t *sfx; // NULL if unused - int entNum; // To allow overriding a specific sound - int entChannel; - int startTime; // For overriding oldest sounds - _boolean loopSound; // Looping sound - int loopNum; // Looping entity number - int loopFrame; // For stopping looping sounds - _boolean fixedPosition; // Use position instead of fetching entity's origin - vec3_t position; // Only use if fixedPosition is set - float volume; - float distanceMult; - unsigned sourceName; // OpenAL sourceName - -} channel_t; - -typedef struct -{ - vec3_t position; - vec3_t velocity; - float orientation[ 6 ]; - -} listener_t; - - - -// extern void Sound_SoundList_f( void ); -extern _boolean Sound_LoadSound( sfx_t *sfx ); -extern sfx_t *Sound_FindSound( const char *name ); -extern void Sound_FreeSounds( void ); - -extern _boolean Sound_Device_Setup( void ); -extern void Sound_Device_Shutdown( void ); - - -#endif /* __SOUND_LOCAL_H__ */ - diff --git a/wolf3d/newCode/env/sound_sfx_id.c b/wolf3d/newCode/env/sound_sfx_id.c deleted file mode 100644 index 99e5155..0000000 --- a/wolf3d/newCode/env/sound_sfx_id.c +++ /dev/null @@ -1,314 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * sound_sfx_id.c: - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - * Acknowledgement: - * Portion of this code was derived from Quake II Evolved. - * - */ - -#include "../wolfiphone.h" - - - -#define SFX_HASHSIZE 256 - -#define MAX_SFX 1024 - -PRIVATE sfx_t *s_sfxHash[ SFX_HASHSIZE ]; -PRIVATE sfx_t *s_sfx[ MAX_SFX ]; -PRIVATE int s_numSfx; - - -PRIVATE _boolean s_registering = false; -PRIVATE W32 s_registration_sequence = 0; - - - - -void Sound_SoundList_f( void ) -{ - -} - - - -/* ------------------------------------------------------------------------------ - Function: Sound_UploadSound -Upload sound data to buffer. - - Parameters: data -[in] Sound data. - sample_size -[in] Sound sample size. - channels -[in] Number of sound channels. - sfx -[in] valid pointer to sfx_t structure. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void Sound_UploadSound( W8 *data, int sample_size, int channels, sfx_t *sfx ) -{ - int size; - - // Calculate buffer size - size = sfx->samples * sample_size * channels; - - // Set buffer format - if( sample_size == 2 ) - { - if( channels == 2 ) - { - sfx->format = AL_FORMAT_STEREO16; - } - else - { - sfx->format = AL_FORMAT_MONO16; - } - - // Upload the sound - pfalGenBuffers( 1, &sfx->bufferNum ); - pfalBufferData( sfx->bufferNum, sfx->format, data, size, sfx->rate ); - } - else - { - /* - We upsample the sound to 16 bit here because the iphone - pops at the beginning and end of buffers with 8 bit. -Cass - (Brian Harris wants to be acknowledeged for helping find - this workaround.) - */ - short *d = (short *)malloc( size * 2 ); - for ( int i = 0; i < size; i++ ) { - d[i] = ((short)data[i] - 128) * 256; - } - if( channels == 2 ) - { - sfx->format = AL_FORMAT_STEREO16; - } - else - { - sfx->format = AL_FORMAT_MONO16; - } - - // Upload the sound - pfalGenBuffers( 1, &sfx->bufferNum ); - pfalBufferData( sfx->bufferNum, sfx->format, d, size * 2, sfx->rate ); - free( d ); - } -} - -/* ------------------------------------------------------------------------------ - Function: Sound_LoadSound -Load sound data. - - Parameters: sfx -[in] Pointer to valid sfx_t structure. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC _boolean Sound_LoadSound( sfx_t *sfx ) -{ - char name[ MAX_GAMEPATH ]; - W8 *data; - soundInfo_t info; - - if( sfx->name[ 0 ] == '*' ) - { - return false; - } - - // See if still in memory - if( sfx->loaded ) - { - return true; - } - - my_strlcpy( name, sfx->name, sizeof( name ) ); - - - if( ! LoadWavInfo( name, &data, &info ) ) - { - if ( ! LoadOggInfo( name, &data, &info ) ) { - sfx->defaulted = true; - - Com_Printf( "Could not find sound (%s)\n", name ); - - return false; - } - } - - sfx->loaded = true; - sfx->samples = info.samples; - sfx->rate = info.sample_rate; - - Sound_UploadSound( data, info.sample_size, info.channels, sfx ); - - Z_Free( data ); - - return true; -} - -/* ------------------------------------------------------------------------------ - Function: Sound_FindSound -Load sound data. - - Parameters: sfx -[in] Pointer to valid sfx_t structure. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC sfx_t *Sound_FindSound( const char *name ) -{ - sfx_t *sfx; - unsigned hashKey; - - if( ! name || ! name[ 0 ] ) - { - Com_Printf( "Sound_FindSound: NULL sound name\n" ); - - return NULL; - } - - if( strlen( name ) >= MAX_GAMEPATH ) - { - Com_Printf( "Sound_FindSound: sound name exceeds MAX_GAMEPATH\n"); - - return NULL; - } - - // See if already loaded - hashKey = (my_strhash( name ) % SFX_HASHSIZE); - - for( sfx = s_sfxHash[ hashKey ] ; sfx ; sfx = sfx->nextHash ) - { - if( ! my_stricmp( sfx->name, name ) ) - { - return sfx; - } - } - - // Create a new sfx_t - if( s_numSfx == MAX_SFX ) - { - Com_Printf( "Sound_FindSound: MAX_SFX hit\n" ); - - return NULL; - } - - s_sfx[ s_numSfx++ ] = sfx = Z_Malloc( sizeof( sfx_t ) ); - - my_strlcpy( sfx->name, name, sizeof( sfx->name ) ); - - // Add to hash table - sfx->nextHash = s_sfxHash[ hashKey ]; - s_sfxHash[ hashKey ] = sfx; - - return sfx; -} - - -PUBLIC void Sound_BeginRegistration( void ) -{ - s_registration_sequence++; - s_registering = true; -} - -PUBLIC sfx_t *Sound_RegisterSound( const char *name ) -{ - sfx_t *sfx; - - if( ! sound_initialized ) - { - return NULL; - } - - if( g_version->value == 1 ) - { - char tempname[ 256 ]; - - my_snprintf( tempname, sizeof( tempname ), "sod%s", name ); - - sfx = Sound_FindSound( tempname ); - } - else - { - sfx = Sound_FindSound( name ); - } - - if( ! s_registering ) - { - Sound_LoadSound( sfx ); - } - - return sfx; -} - -PUBLIC void Sound_EndRegistration( void ) -{ - - s_registering = false; -} - - - - - - -void Sound_FreeSounds( void ) -{ - sfx_t *sfx; - int i; - - // Stop all sounds - Sound_StopAllSounds(); - - // Free all sounds - for( i = 0 ; i < s_numSfx ; ++i ) - { - sfx = s_sfx[ i ]; - - pfalDeleteBuffers( 1, &sfx->bufferNum ); - - Z_Free( sfx ); - } - - memset( s_sfxHash, 0, sizeof( s_sfxHash ) ); - memset( s_sfx, 0, sizeof( s_sfx ) ); - - s_numSfx = 0; -} diff --git a/wolf3d/newCode/env/sound_stream.c b/wolf3d/newCode/env/sound_stream.c deleted file mode 100644 index 567c948..0000000 --- a/wolf3d/newCode/env/sound_stream.c +++ /dev/null @@ -1,516 +0,0 @@ -/* - - Copyright (C) 2005 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * sound_stream.c: Sound Stream manager. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from Quake II Evolved. - * - */ - -#include "../wolfiphone.h" - - -typedef struct -{ - char introName[ MAX_GAMEPATH ]; - char loopName[ MAX_GAMEPATH ]; - _boolean looping; - - filehandle_t *hFile; - - - int start; - int rate; - unsigned format; - void *vorbisFile; - -} musicTrack_t; - - -// anything greater than 1<<13 caused crashes on iphone OS 2.1 (on a 3G iphone) -#define BUFFER_SIZE (1<<13) - -PRIVATE musicTrack_t bgTrack; - -PRIVATE channel_t *s_streamingChannel; - - -extern void Sound_StopBGTrack( void ); - - - -/* ------------------------------------------------------------------------------ - Function: ovc_read -OGG read Callback. Reads data from a stream. - - Parameters: - ptr -[in] Storage location for data. - size -[in] Item size in bytes. - nmemb -[in] Maximum number of items to be read. - datasource -[in] music track data structure. - - Returns: Nothing - - Notes: ------------------------------------------------------------------------------ -*/ -PRIVATE size_t ovc_read( void *ptr, size_t size, size_t nmemb, void *datasource ) -{ - musicTrack_t *track = (musicTrack_t *)datasource; - - - if( ! size || ! nmemb ) - { - return 0; - } - - - return FS_ReadFile( ptr, size, nmemb, track->hFile ); -} - -/* ------------------------------------------------------------------------------ - Function: ovc_read -OGG seek Callback. Moves the file pointer to a specified - location. - - Parameters: - datasource -[in] music track data structure. - offset -[in] Number of bytes from whence. - whence -[in] Initial position. - - - Returns: - If successful, fseek returns 0. Otherwise, it returns a nonzero - value. - - Notes: ------------------------------------------------------------------------------ -*/ -PRIVATE int ovc_seek( void *datasource, ogg_int64_t offset, int whence ) -{ - musicTrack_t *track = (musicTrack_t *)datasource; - - return FS_FileSeek( track->hFile, offset, whence ); -} - -/* ------------------------------------------------------------------------------ - Function: ovc_close -OGG close Callback. Closes a stream. - - Parameters: datasource -[in] music track data structure. - - Returns: 0 if the stream is successfully closed, otherwise nonzero. - - Notes: ------------------------------------------------------------------------------ -*/ -PRIVATE int ovc_close( void *datasource ) -{ - return 0; -} - -/* ------------------------------------------------------------------------------ - Function: ovc_tell -OGG tell Callback. Gets the current position of a file - pointer. - - Parameters: datasource -[in] music track data structure. - - Returns: The current file position. - - Notes: ------------------------------------------------------------------------------ -*/ -PRIVATE long ovc_tell( void *datasource ) -{ - musicTrack_t *track = (musicTrack_t *)datasource; - - return FS_FileTell( track->hFile ); -} - -/* ------------------------------------------------------------------------------ - Function: Sound_OpenBGTrack -OGG read Callback. - - Parameters: - name -[in] File name to open. - track -[in/out] Music track data structure. - - Returns: False on error, otherwise true. - - Notes: ------------------------------------------------------------------------------ -*/ -PRIVATE _boolean Sound_OpenBGTrack( const char *name, musicTrack_t *track ) -{ - OggVorbis_File *vorbisFile; - vorbis_info *vorbisInfo; - ov_callbacks vorbisCallbacks = {ovc_read, ovc_seek, ovc_close, ovc_tell}; - int ret; - extern cvar_t *music; - - if ( music->value == 0 ) { - return 0; - } - - track->hFile = FS_OpenFile( name, 0 ); - if( ! track->hFile ) - { - return false; - } - - - track->vorbisFile = vorbisFile = Z_Malloc( sizeof( OggVorbis_File ) ); - - if( (ret = ov_open_callbacks( track, vorbisFile, NULL, 0, vorbisCallbacks )) < 0 ) - { - switch( ret ) - { - case OV_EREAD: - Com_DPrintf( "A read from media returned an error.(%s)\n", name ); - break; - case OV_ENOTVORBIS: - Com_DPrintf( "Bitstream is not Vorbis data.(%s)\n", name ); - break; - case OV_EVERSION: - Com_DPrintf( "Vorbis version mismatch.(%s)\n", name ); - break; - case OV_EBADHEADER: - Com_DPrintf( "Invalid Vorbis bitstream header.(%s)\n", name ); - break; - case OV_EFAULT: - Com_DPrintf( "Internal logic fault; indicates a bug or heap/stack corruption.(%s)\n", name ); - break; - - } - Com_DPrintf( "Could not open OGG stream (%s)\n", name ); - - return false; - } - - vorbisInfo = ov_info( vorbisFile, -1 ); - if( vorbisInfo->channels != 1 && vorbisInfo->channels != 2 ) - { - Com_DPrintf( "Only mono and stereo OGG files supported (%s)\n", name ); - - return false; - } - - track->start = ov_raw_tell( vorbisFile ); - track->rate = vorbisInfo->rate; - track->format = (vorbisInfo->channels == 2) ? AL_FORMAT_STEREO16 : AL_FORMAT_MONO16; - - return true; -} - -/* ------------------------------------------------------------------------------ - Function: Sound_CloseBGTrack -Close out background music track. - - Parameters: track -[in] Music track to close. - - Returns: Nothing - - Notes: ------------------------------------------------------------------------------ -*/ -PRIVATE void Sound_CloseBGTrack( musicTrack_t *track ) -{ - if( track->vorbisFile ) - { - ov_clear( track->vorbisFile ); - - Z_Free( track->vorbisFile ); - track->vorbisFile = NULL; - } - - if( track->hFile ) - { - FS_CloseFile( track->hFile ); - } -} - -/* ------------------------------------------------------------------------------ - Function: Sound_StreamBGTrack -Called each frame to update streaming music - track. - - Parameters: Nothing - - Returns: Nothing - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void Sound_StreamBGTrack( void ) -{ - - W8 data[BUFFER_SIZE]; - int processed, queued, state; - int size, read, dummy; - unsigned buffer; - - if( ! s_musicVolume->value ) - { - return; - } - - if( ! s_streamingChannel ) - { - return; - } - - // Unqueue and delete any processed buffers - pfalGetSourcei( s_streamingChannel->sourceName, AL_BUFFERS_PROCESSED, &processed ); - if( processed > 0 ) - { - while (processed--) - { - pfalSourceUnqueueBuffers( s_streamingChannel->sourceName, 1, &buffer ); - pfalDeleteBuffers( 1, &buffer ); - } - } - - // Make sure we always have at least 4 buffers in the queue - pfalGetSourcei( s_streamingChannel->sourceName, AL_BUFFERS_QUEUED, &queued ); - while( queued < 4 ) - { - size = 0; - - // Stream from disk - while( size < BUFFER_SIZE ) - { - read = ov_read( bgTrack.vorbisFile, (char *)data + size, BUFFER_SIZE - size, &dummy ); - if( read == 0 ) - { - // End of file - if( ! bgTrack.looping) - { - // Close the intro track - Sound_CloseBGTrack( &bgTrack ); - - // Open the loop track - if( ! Sound_OpenBGTrack( bgTrack.loopName, &bgTrack ) ) - { - Sound_StopBGTrack(); - return; - } - - bgTrack.looping = true; - } - - // Restart the track, skipping over the header - ov_raw_seek( bgTrack.vorbisFile, (ogg_int64_t)bgTrack.start ); - - // Try streaming again - read = ov_read( bgTrack.vorbisFile, (char *)data + size, BUFFER_SIZE - size, &dummy ); - } - - if( read <= 0 ) - { - // An error occurred - Sound_StopBGTrack(); - return; - } - - size += read; - } - - // Upload and queue the new buffer - pfalGenBuffers( 1, &buffer ); - pfalBufferData( buffer, bgTrack.format, data, size, bgTrack.rate ); - pfalSourceQueueBuffers( s_streamingChannel->sourceName, 1, &buffer ); - - queued++; - } - - // Update volume - pfalSourcef( s_streamingChannel->sourceName, AL_GAIN, s_musicVolume->value ); - - // If not playing, then do so - pfalGetSourcei( s_streamingChannel->sourceName, AL_SOURCE_STATE, &state ); - if( state != AL_PLAYING ) - { - pfalSourcePlay(s_streamingChannel->sourceName); - } -} - -/* ------------------------------------------------------------------------------ - Function: Sound_StartStreaming -Start streaming background music track. - - Parameters: Nothing - - Returns: Nothing - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void Sound_StartStreaming( void ) -{ - if( ! sound_initialized ) - { - return; - } - - if( s_streamingChannel ) - { - return; - } - - s_streamingChannel = Sound_PickChannel( 0, 0 ); - if( ! s_streamingChannel ) - { - return; - } - - s_streamingChannel->streaming = true; - - // hmmm... - pfalDeleteSources( 1, &s_streamingChannel->sourceName ); - pfalGenSources( 1, &s_streamingChannel->sourceName ); - - // Set up the source - pfalSourcei( s_streamingChannel->sourceName, AL_BUFFER, 0 ); - pfalSourcei( s_streamingChannel->sourceName, AL_LOOPING, AL_FALSE ); - pfalSourcei( s_streamingChannel->sourceName, AL_SOURCE_RELATIVE, AL_TRUE ); - pfalSourcefv( s_streamingChannel->sourceName, AL_POSITION, vec3_origin ); - pfalSourcefv( s_streamingChannel->sourceName, AL_VELOCITY, vec3_origin ); - pfalSourcef( s_streamingChannel->sourceName, AL_REFERENCE_DISTANCE, 1.0 ); - pfalSourcef( s_streamingChannel->sourceName, AL_MAX_DISTANCE, 1.0 ); - pfalSourcef( s_streamingChannel->sourceName, AL_ROLLOFF_FACTOR, 0.0 ); -} - -/* ------------------------------------------------------------------------------ - Function: Sound_StopStreaming -Stop playing streaming music track. - - Parameters: Nothing - - Returns: Nothing - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void Sound_StopStreaming( void ) -{ - int processed; - unsigned buffer; - - if( ! sound_initialized ) - { - return; - } - - if( ! s_streamingChannel ) - { - return; - } - - s_streamingChannel->streaming = false; - - - pfalSourceStop( s_streamingChannel->sourceName ); - - pfalGetSourcei( s_streamingChannel->sourceName, AL_BUFFERS_PROCESSED, &processed ); - if( processed > 0 ) - { - while( processed-- ) - { - pfalSourceUnqueueBuffers( s_streamingChannel->sourceName, 1, &buffer ); - pfalDeleteBuffers( 1, &buffer ); - } - } - - pfalSourcei( s_streamingChannel->sourceName, AL_BUFFER, 0 ); - - // hmmm... - pfalDeleteSources( 1, &s_streamingChannel->sourceName ); - pfalGenSources( 1, &s_streamingChannel->sourceName ); - - s_streamingChannel = NULL; -} - -/* ------------------------------------------------------------------------------ - Function: Sound_StartBGTrack -Play background music track. - - Parameters: - introTrack -[in] File name of intro track. - loopTrack -[in] File name of loop track. - - Returns: Nothing - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void Sound_StartBGTrack( const char *introTrack, const char *loopTrack ) -{ - if( ! sound_initialized ) - { - return; - } - - Sound_StopBGTrack(); - - - my_strlcpy( bgTrack.introName, introTrack, sizeof( bgTrack.introName ) ); - my_strlcpy( bgTrack.loopName, loopTrack, sizeof( bgTrack.loopName) ); - - Sound_StartStreaming(); - - if( ! Sound_OpenBGTrack( bgTrack.introName, &bgTrack ) ) - { - Sound_StopBGTrack(); - return; - } - - Sound_StreamBGTrack(); -} - -/* ------------------------------------------------------------------------------ - Function: Sound_StopBGTrack -Stop playing background track. - - Parameters: Nothing - - Returns: Nothing - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void Sound_StopBGTrack( void ) -{ - if( ! sound_initialized ) - { - return; - } - - Sound_StopStreaming(); - - Sound_CloseBGTrack( &bgTrack ); - - memset( &bgTrack, 0, sizeof( musicTrack_t ) ); -} diff --git a/wolf3d/newCode/env/texture_manager.c b/wolf3d/newCode/env/texture_manager.c deleted file mode 100644 index 815c855..0000000 --- a/wolf3d/newCode/env/texture_manager.c +++ /dev/null @@ -1,1379 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, Inc. - Copyright (C) 1995 Spencer Kimball and Peter Mattis. - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * texture_manager.c: Texture manager. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from - * The GIMP (an image manipulation program) and was originally - * written by Spencer Kimball and Peter Mattis. - * - * Portion of this code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#include "../wolfiphone.h" - -PRIVATE texture_t ttextures[ MAX_TEXTURES ]; -PRIVATE int numttextures; - -PRIVATE texture_t *r_notexture; // use for bad textures - -cvar_t *gl_round_down; - -int registration_sequence; -W32 texture_registration_sequence; - -extern int currentTextures[ 4 ]; -extern int currenttmu; -extern int glMaxTexSize; - -PRIVATE INLINECALL GLenum WrapToGL( TWrapMode mode ) -{ - if( mode == Repeat ) - { - return GL_REPEAT; - } - else - { - return GL_CLAMP_TO_EDGE; - } -} - -PRIVATE INLINECALL GLenum MagFilterToGL( TMagFilter MagFilter ) -{ - switch( MagFilter ) - { - case Nearest: - return GL_NEAREST; - - case Linear: - return GL_LINEAR; - - default: - break; - } - - return GL_LINEAR; -} - - - -PRIVATE INLINECALL GLenum MinFilterToGL( _boolean MipMap, TMinFilter MinFilter ) -{ - if( MipMap ) - { - switch( MinFilter ) - { - case NearestMipMapOff: - return GL_NEAREST; - - case NearestMipMapNearest: - return GL_NEAREST_MIPMAP_NEAREST; - - case NearestMipMapLinear: - return GL_NEAREST_MIPMAP_LINEAR; - - case LinearMipMapOff: - return GL_LINEAR; - - case LinearMipMapNearest: - return GL_LINEAR_MIPMAP_NEAREST; - - case LinearMipMapLinear: - return GL_LINEAR_MIPMAP_LINEAR; - - default: - break; - } - } - else - { - switch( MinFilter ) - { - case NearestMipMapOff: - case NearestMipMapNearest: - case NearestMipMapLinear: - return GL_NEAREST; - - case LinearMipMapOff: - case LinearMipMapNearest: - case LinearMipMapLinear: - return GL_LINEAR; - - default: - break; - } - } - - return GL_LINEAR; -} - - -/* ------------------------------------------------------------------------------ - Function: TM_TextureList_f -Console function to list loaded textures. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void TM_TextureList_f( void ) -{ - int i; - texture_t *image; - int texels; - const char *palstrings[ 2 ] = - { - "RGB", - "PAL" - }; - - Com_Printf( "------------------\n" ); - texels = 0; - - for( i = 0, image = ttextures ; i < numttextures ; ++i, ++image ) - { - if( image->texnum <= 0 ) - continue; - - texels += image->upload_width * image->upload_height; - - switch( image->type ) - { - case TT_Sprite: - Com_Printf( "S" ); - break; - - case TT_Wall: - Com_Printf( "W" ); - break; - - case TT_Pic: - Com_Printf( "P" ); - break; - - default: - Com_Printf( " " ); - break; - } - - Com_Printf( " %3i %3i %s: %s\n", - image->upload_width, image->upload_height, palstrings[ 0 ], image->name ); - } - - Com_Printf( "Total texel count (not counting mipmaps): %i\n", texels ); - -} - -texture_t *TM_AllocateTexture( const char *name ) { - texture_t *tex; - int i; - - assert( strlen( name ) < sizeof( tex->name ) ); - - // find a free texture_t space - for( i = 0, tex = ttextures; i < numttextures; ++i, ++tex ) - { - if( ! tex->texnum ) - { - break; - } - } - - if( i == numttextures ) - { - if( numttextures == MAX_TEXTURES ) - { - Com_DPrintf( "MAX_TEXTURES reached\n" ); - return r_notexture; - } - - numttextures++; - } - tex = &ttextures[ i ]; - memset( tex, 0, sizeof( *tex ) ); - my_strlcpy( tex->name, name, MAX_GAMEPATH ); - tex->registration_sequence = texture_registration_sequence; - - // don't let R_Bind skip the next bind call - currentTextures[ currenttmu ] = -1; - - pfglGenTextures( 1, &tex->texnum ); - pfglBindTexture( GL_TEXTURE_2D, tex->texnum ); - - return tex; -} - -/* ------------------------------------------------------------------------------ - Function: TM_LoadTexture -Load raw image into video memory. - - Parameters: - name -[in] Name of texture image. - data -[in] Raw pixel data in the format described by PixelFormat. - width -[in] Width of image in pixels. - height -[in] Height of image in pixels. - type -[in] - PixelFormat [in] - - Returns: Pointer to filled out texture_t structure. - - Notes: Any texture that was not touched on this registration sequence will be freed. ------------------------------------------------------------------------------ -*/ -PUBLIC texture_t *TM_LoadTexture( const char *name, W8 *data, int width, int height, texturetype_t type, W16 bytes ) -{ - texture_t *tex; - W8 *scaled; - W16 scaled_width, scaled_height; - - tex = TM_AllocateTexture( name ); - - tex->width = width; - tex->height = height; - tex->type = type; - tex->bytes = bytes; - - switch( type ) - { - case TT_Pic: - tex->MipMap = false; - tex->WrapS = Clamp; - tex->WrapT = Clamp; - tex->MinFilter = Nearest; - tex->MagFilter = NearestMipMapOff; - break; - - case TT_Wall: - tex->MipMap = true; - tex->WrapS = Repeat; - tex->WrapT = Repeat; -// tex->MinFilter = LinearMipMapLinear; - tex->MinFilter = LinearMipMapNearest; - tex->MagFilter = Linear; - break; - - default: - tex->WrapS = Repeat; - tex->WrapT = Repeat; - tex->MinFilter = Nearest; - tex->MagFilter = NearestMipMapOff; - break; - } - - - for( scaled_width = 1 ; scaled_width < tex->width ; scaled_width <<= 1 ) - { - ; - } - - if( gl_round_down->value && scaled_width > tex->width && tex->MipMap ) - { - scaled_width >>= 1; - } - - for( scaled_height = 1 ; scaled_height < tex->height ; scaled_height <<= 1 ) - { - ; - } - - if( gl_round_down->value && scaled_height > tex->height && tex->MipMap ) - { - scaled_height >>= 1; - } - - // let people sample down the world textures for speed - if( tex->MipMap ) - { - scaled_width >>= (int)gl_picmip->value; - scaled_height >>= (int)gl_picmip->value; - } - - // don't ever bother with > glMaxTexSize textures - if( scaled_width > glMaxTexSize ) - { - scaled_width = glMaxTexSize; - } - if( scaled_height > glMaxTexSize ) - { - scaled_height = glMaxTexSize; - } - - if( scaled_width < 1 ) - { - scaled_width = 1; - } - if( scaled_height < 1 ) - { - scaled_height = 1; - } - - tex->upload_width = scaled_width; - tex->upload_height = scaled_height; - - if( scaled_width == tex->width && scaled_height == tex->height ) - { - scaled = data; - } - else - { - scaled = Z_Malloc( scaled_width * scaled_height * tex->bytes ); - TM_ResampleTexture( data, tex->width, tex->height, scaled, scaled_width, scaled_height, tex->bytes, INTERPOLATION_NONE ); - } - - { - // upload base image - GLenum internalFormat[] = { GL_LUMINANCE, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB, GL_RGBA }; -#if 0 - GLenum externalFormat[] = { GL_LUMINANCE, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_5_5_1 }; - pfglTexImage2D( GL_TEXTURE_2D, 0, internalFormat[ tex->bytes ], scaled_width, scaled_height, 0, tex->bytes == 4 ? GL_RGBA : GL_RGB, externalFormat[ tex->bytes ], scaled ); -#else - pfglTexImage2D( GL_TEXTURE_2D, 0, internalFormat[ tex->bytes ], scaled_width, scaled_height, 0, tex->bytes == 4 ? GL_RGBA : GL_RGB, GL_UNSIGNED_BYTE, scaled ); -#endif - - - // upload mipmaps if required -#ifdef IPHONE - glGenerateMipmapOES( GL_TEXTURE_2D ); -#else - if( tex->MipMap ) - { - int miplevel = 0; - - while( TM_MipMap( scaled, &scaled_width, &scaled_height, tex->bytes ) ) - { - pfglTexImage2D( GL_TEXTURE_2D, ++miplevel, internalFormat[ tex->bytes ], scaled_width, scaled_height, 0, tex->bytes == 4 ? GL_RGBA : GL_RGB, GL_UNSIGNED_BYTE, scaled ); - } - } -#endif - } - - if ( scaled != data ) { - Z_Free( scaled ); - } - - pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, WrapToGL( tex->WrapS ) ); - pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, WrapToGL( tex->WrapT ) ); - pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, MinFilterToGL( tex->MipMap, tex->MinFilter ) ); - pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, MagFilterToGL( tex->MagFilter ) ); - -#ifdef IPHONE - if ( type == TT_Wall ) { - pfglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 2.0f ); - } else { - pfglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 0 ); - } -#endif - - - return tex; -} - - -/* ------------------------------------------------------------------------------ - Function: TM_FreeUnusedTextures -Free unused textures. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: Any texture that was not touched on this registration sequence will be freed. ------------------------------------------------------------------------------ -*/ -PUBLIC void TM_FreeUnusedTextures( void ) -{ -#if 0 - int i; - texture_t *tex; - - // never free r_notexture texture - r_notexture->registration_sequence = texture_registration_sequence; - - for( i = 0, tex = ttextures ; i < numttextures ; ++i, ++tex ) - { - if( tex->registration_sequence == texture_registration_sequence ) - continue; // used this sequence - - if( ! tex->registration_sequence ) - continue; // free image_t slot - - if( tex->type == TT_Pic ) - continue; // don't free pics - - // free texture - R_DeleteTexture( tex->texnum ); - memset( tex, 0, sizeof( *tex ) ); - } -#endif -} - - -/* ------------------------------------------------------------------------------ - Function: TM_FindTexture -Find texture. - - Parameters: name -[in] Name of the texture to find. - type -[in] Type of texture (see texturetype_t). - - Returns: r_notexture if the texture is not found, otherwise it will - return a valid texture_t structure. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC texture_t *TM_FindTexture( const char *name, texturetype_t type ) -{ - texture_t *tex; - int i, len; - W8 *data; /* raw texture data */ - W16 width, height; /* width, height of texture */ - W16 bytes; - char digested[1024]; - filehandle_t *fh; - - if( ! name || ! *name ) - { - return r_notexture; - } - - // Check for file extension - len = strlen( name ); - if( len < 5 ) - { - return r_notexture; - } - - // look for it in the texture cache - for( i = 0, tex = ttextures; i < numttextures; ++i, ++tex ) - { - if( ! strcmp( name, tex->name ) ) - { - tex->registration_sequence = texture_registration_sequence; - return tex; - } - } - - // - // load the texture from disk - // - data = NULL; - if( strcmp( name + len - 4, ".tga" ) ) { - return r_notexture; - } - - // look for the pre-digested 5551 version - strcpy( digested, name ); - strcpy( digested + len - 4, ".5551" ); - fh = FS_OpenFile( digested, 0 ); - if ( fh ) { - picHeader_t *ph = (picHeader_t *)fh->filedata; - int w = ph->uploadWidth; - int h = ph->uploadHeight; - int l = 0; - texture_t *tx = TM_AllocateTexture( name ); - tx->width = w; - tx->height = h; - tx->upload_width = w; - tx->upload_height = h; - tx->header = *ph; - unsigned short *s = (unsigned short *)(ph+1); - while( 1 ) { - pfglTexImage2D( GL_TEXTURE_2D, l, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, s ); - if ( w == 1 && h == 1 ) { - break; - } - l++; - s += w*h; - w >>= 1; - if ( w == 0 ) { - w = 1; - } - h >>= 1; - if ( h == 0 ) { - h = 1; - } - } - FS_CloseFile( fh ); - pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); - pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); - pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR ); - pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); - - if ( type == TT_Wall ) { - pfglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 2.0f ); - } else { - pfglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 0 ); - } - return tx; - } - - // load a normal TGA - LoadTGA( name, &data, &width, &height, &bytes ); - if ( data ) { - tex = TM_LoadTexture( name, data, width, height, type, bytes ); - MM_FREE( data ); - return tex; - } - - // load a jpg - { - int jpgSize = 0; - W8 *jpgData; - void iPhoneLoadJPG( W8* jpegData, int jpegBytes, W8 **pic, W16 *width, W16 *height, W16 *bytes ); - // try jpeg if no tga exists - strcpy( digested, name ); - strcpy( digested + len - 4, ".jpg" ); - fh = FS_OpenFile( digested, 0 ); - if ( fh == NULL ) { - Com_Printf( "Failed to find texture %s\n", name ); - return r_notexture; - } - jpgSize = FS_GetFileSize( fh ); - jpgData = fh->ptrStart; - - iPhoneLoadJPG( jpgData, jpgSize, &data, &width, &height, &bytes ); - FS_CloseFile( fh ); - - if ( ! data ) { - free( jpgData ); - return r_notexture; - } - tex = TM_LoadTexture( name, data, width, height, type, bytes ); - MM_FREE( data ); - return tex; - } - - return NULL; -} - -/* ------------------------------------------------------------------------------ - Function: TM_GetTextureSize -Find texture. - - Parameters:width -[out] Width of texture. - height -[out] Height of texture. - name -[in] Name of the texture to get dimensions of. - - - Returns: Nothing. - - Notes: If texture is not found, width and height are -1. ------------------------------------------------------------------------------ -*/ -PUBLIC void TM_GetTextureSize( SW32 *width, SW32 *height, const char *name ) -{ - texture_t *tex; - - tex = TM_FindTexture( name, TT_Pic ); - if( ! tex ) - { - *width = *height = -1; - return; - } - - *width = tex->width; - *height = tex->height; -} - - - - - - - -/* Note: cubic function no longer clips result */ -PRIVATE INLINECALL double -cubic (double dx, - int jm1, - int j, - int jp1, - int jp2) -{ - /* Catmull-Rom - not bad */ - return (double) ((( ( - jm1 + 3 * j - 3 * jp1 + jp2 ) * dx + - ( 2 * jm1 - 5 * j + 4 * jp1 - jp2 ) ) * dx + - ( - jm1 + jp1 ) ) * dx + (j + j) ) / 2.0; -} - -_boolean pixel_region_has_alpha( int bytes ) -{ - if( bytes == 2 || bytes == 4 ) - { - return true; - } - else - { - return false; - } -} - - -PRIVATE void -expand_line( double *dest, - double *src, - int bytes, - int old_width, - int width ) -{ - double ratio; - int x,b; - int src_col; - double frac; - double *s; - - ratio = old_width / (double) width; - - /* we can overflow src's boundaries, so we expect our caller to have - allocated extra space for us to do so safely (see scale_region ()) */ - - /* this could be optimized much more by precalculating the coefficients for - each x */ - - for( x = 0; x < width; ++x ) - { - src_col = ((int) (x * ratio + 2.0 - 0.5)) - 2; - /* +2, -2 is there because (int) rounds towards 0 and we need - to round down */ - frac = (x * ratio - 0.5) - src_col; - s = &src[ src_col * bytes ]; - for( b = 0 ; b < bytes ; b++ ) - dest[ b ] = cubic( frac, (int)s[ b - bytes ], (int)s[ b ], (int)s[ b + bytes ], (int)s[ b + bytes * 2 ] ); - - dest += bytes; - } - -} - - -PRIVATE void -shrink_line( double *dest, - double *src, - int bytes, - int old_width, - int width ) -{ - int x; - int b; - double *srcp; - double *destp; - double accum[4]; - double slice; - const double avg_ratio = (double) width / old_width; - const double inv_width = 1.0 / width; - int slicepos; /* slice position relative to width */ - -#if 0 - - Com_DPrintf( "shrink_line bytes=%d old_width=%d width=%d interp=%d " - "avg_ratio=%f\n", - bytes, old_width, width, interp, avg_ratio); - -#endif - -// g_return_if_fail( bytes <= 4 ); - - /* This algorithm calculates the weighted average of pixel data that - each output pixel must receive, taking into account that it always - scales down, i.e. there's always more than one input pixel per each - output pixel. */ - - srcp = src; - destp = dest; - - slicepos = 0; - - /* Initialize accum to the first pixel slice. As there is no partial - pixel at start, that value is 0. The source data is interleaved, so - we maintain BYTES accumulators at the same time to deal with that - many channels simultaneously. */ - for( b = 0 ; b < bytes ; ++b ) - { - accum[ b ] = 0.0; - } - - for( x = 0 ; x < width ; x++ ) - { - /* Accumulate whole pixels. */ - do - { - for( b = 0 ; b < bytes ; b++ ) - accum[ b ] += *srcp++; - - slicepos += width; - } - while( slicepos < old_width ); - slicepos -= old_width; - - if( ! (slicepos < width)) - Com_Printf( "Assertion (slicepos < width) failed. Please report.\n" ); - - if( slicepos == 0 ) - { - /* Simplest case: we have reached a whole pixel boundary. Store - the average value per channel and reset the accumulators for - the next round. - - The main reason to treat this case separately is to avoid an - access to out-of-bounds memory for the first pixel. */ - for (b = 0; b < bytes; b++) - { - *destp++ = accum[b] * avg_ratio; - accum[b] = 0.0; - } - } - else - { - for( b = 0; b < bytes; b++ ) - { - /* We have accumulated a whole pixel per channel where just a - slice of it was needed. Subtract now the previous pixel's - extra slice. */ - slice = srcp[- bytes + b] * slicepos * inv_width; - *destp++ = (accum[b] - slice) * avg_ratio; - - /* That slice is the initial value for the next round. */ - accum[b] = slice; - } - } - } - - /* Sanity check: srcp should point to the next-to-last position, and - slicepos should be zero. */ - if( ! (srcp - src == old_width * bytes && slicepos == 0) ) - { - Com_Printf ("Assertion (srcp - src == old_width * bytes && slicepos == 0)" - " failed. Please report."); - } -} - -PRIVATE void pixel_region_get_row( W8 *src, int y, int width, W8 *tmp_src, int BytesPerPixel ) -{ - int i; - unsigned long k = 0; - unsigned char *scanline = tmp_src; - unsigned char *ptr = src; - - for( i = 0 ; i < (width * BytesPerPixel) ; ++i ) - { - scanline[ k++ ] = ptr[ y * width * BytesPerPixel + i ]; - } -} - -PRIVATE void pixel_region_set_row( W8 *dest, - int BytesPerPixel, - int y, - int width, - W8 *data ) -{ - int i; - unsigned long k = 0; - unsigned char *scanline = dest; - unsigned char *ptr = data; - - for( i = 0 ; i < (width * BytesPerPixel) ; ++i ) - { - scanline[ y * width * BytesPerPixel + i ] = ptr[ k++ ]; - } -} - -PRIVATE void -get_premultiplied_double_row( W8 *in, - int PRbytes, - int x, - int y, - int w, - double *row, - W8 *tmp_src, - int n ) -{ - int b; - int bytes = PRbytes; - - pixel_region_get_row( in, y, w, tmp_src, bytes ); - - if( pixel_region_has_alpha( bytes ) ) - { - /* premultiply the alpha into the double array */ - double *irow = row; - int alpha = bytes - 1; - double mod_alpha; - - for( x = 0; x < w; ++x ) - { - mod_alpha = tmp_src[ alpha ] / 255.0; - for( b = 0; b < alpha; ++b ) - { - irow[ b ] = mod_alpha * tmp_src[ b ]; - } - - irow[ b ] = tmp_src[ alpha ]; - irow += bytes; - tmp_src += bytes; - } - } - else /* no alpha */ - { - for( x = 0; x < w * bytes; ++x ) - { - row[ x ] = tmp_src[ x ]; - } - } - - /* set the off edge pixels to their nearest neighbor */ - for( b = 0; b < 2 * bytes; b++ ) - { - row[ b - 2 * bytes ] = row[ b % bytes ]; - } - - for( b = 0; b < bytes * 2; b++ ) - { - row[ b + w * bytes ] = row[ (w - 1) * bytes + b % bytes ]; - } -} - - -PRIVATE INLINECALL void -rotate_pointers( W8 **p, W32 n ) -{ - W32 i; - W8 *tmp; - - tmp = p[ 0 ]; - for( i = 0 ; i < n-1 ; i++ ) - { - p[ i ] = p[ i + 1 ]; - } - - p[ i ] = tmp; -} - -PRIVATE void -get_scaled_row( double **src, - int y, - int new_width, - double *row, - W8 *src_tmp, - W8 *srcPR, - int old_width, - int old_height, - int bytes ) -{ - /* get the necesary lines from the source image, scale them, - and put them into src[] */ - rotate_pointers( (unsigned char **)src, 4 ); - - if( y < 0 ) - { - y = 0; - } - - if( y < old_height ) - { - get_premultiplied_double_row( srcPR, bytes, 0, y, old_width, - row, src_tmp, 1 ); - if( new_width > old_width ) - { - expand_line( src[3], row, bytes, old_width, new_width ); - } - else if( old_width > new_width ) - { - shrink_line( src[3], row, bytes, old_width, new_width ); - } - else /* no scailing needed */ - { - memcpy( src[3], row, sizeof( double ) * new_width * bytes ); - } - } - else - { - memcpy( src[3], src[2], sizeof( double ) * new_width * bytes ); - } -} - - -/* -non-interpolating scale_region. - */ -PRIVATE void -scale_region_no_resample( W8 *in, int inwidth, int inheight, - W8 *out, int outwidth, int outheight, char bytes ) -{ - int *x_src_offsets; - int *y_src_offsets; - W8 *src; - W8 *dest; - int width, height, orig_width, orig_height; - int last_src_y; - int row_bytes; - int x, y, b; - - - orig_width = inwidth; - orig_height = inheight; - - width = outwidth; - height = outheight; - - - /* the data pointers... */ - x_src_offsets = (int *) MM_MALLOC( sizeof( int ) * width * bytes ); - y_src_offsets = (int *) MM_MALLOC( sizeof( int ) * height ); - src = (unsigned char *) MM_MALLOC( orig_width * bytes); - dest = (unsigned char *) MM_MALLOC( width * bytes); - - /* pre-calc the scale tables */ - for( b = 0; b < bytes; b++ ) - { - for( x = 0; x < width; x++ ) - { - x_src_offsets[ b + x * bytes ] = - b + bytes * ((x * orig_width + orig_width / 2) / width); - } - } - - for( y = 0; y < height; y++ ) - { - y_src_offsets[ y ] = (y * orig_height + orig_height / 2) / height; - } - - /* do the scaling */ - row_bytes = width * bytes; - last_src_y = -1; - for( y = 0; y < height; y++ ) - { - /* if the source of this line was the same as the source - * of the last line, there's no point in re-rescaling. - */ - if( y_src_offsets[ y ] != last_src_y ) - { - pixel_region_get_row( in, y_src_offsets[ y ], orig_width, src, bytes ); - //pixel_region_get_row( srcPR, 0, y_src_offsets[y], orig_width, src, 1 ); - for( x = 0 ; x < row_bytes ; x++ ) - { - dest[ x ] = src[ x_src_offsets[ x ] ]; - } - last_src_y = y_src_offsets[ y ]; - } - - pixel_region_set_row( out, bytes, y, width, dest ); - } - - MM_FREE( x_src_offsets ); - MM_FREE( y_src_offsets ); - MM_FREE( src ); - MM_FREE( dest ); -} - - -/* ------------------------------------------------------------------------------ - Function: TM_ResampleTexture -Resize texture. - - Parameters: - in -[in] Original texture data. - inwidth -[in] Original width of texture in pixels. - inheight -[in] Original height of texture in pixels. - out -[in/out] Resized texture data. - outwidth -[in] New width of texture in pixels. - outheight -[in] New height of texture in pixels. - bytes -[in] Number of bytes per pixel. - interpolation -[in] see InterpolationType - - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void TM_ResampleTexture( W8 *in, int inwidth, int inheight, W8 *out, int outwidth, int outheight, W8 bytes, InterpolationType interpolation ) -{ - double *src[ 4 ]; - W8 *src_tmp; - W8 *dest; - double *row, *accum; - int b; - int width, height; - int orig_width, orig_height; - double y_rat; - int i; - int old_y = -4; - int new_y; - int x, y; - - - if( interpolation == INTERPOLATION_NONE ) - { - scale_region_no_resample( in, inwidth, inheight, out, outwidth, outheight, bytes ); - return; - } - - - orig_width = inwidth; - orig_height = inheight; - - width = outwidth; - height = outheight; - -#if 0 - - Com_DPrintf( "scale_region: (%d x %d) -> (%d x %d)\n", - orig_width, orig_height, width, height ); - -#endif - - /* find the ratios of old y to new y */ - y_rat = (double) orig_height / (double) height; - - - /* the data pointers... */ - for( i = 0 ; i < 4 ; ++i ) - { - src[ i ] = (double *) MM_MALLOC( sizeof( double ) * width * bytes ); - } - - dest = (PW8) MM_MALLOC( width * bytes); - - src_tmp = (PW8) MM_MALLOC( orig_width * bytes ); - - /* offset the row pointer by 2*bytes so the range of the array - is [-2*bytes] to [(orig_width + 2)*bytes] */ - row = (double *) MM_MALLOC( sizeof( double ) * (orig_width + 2 * 2) * bytes ); - row += bytes * 2; - - accum = (double *) MM_MALLOC( sizeof( double ) * width * bytes ); - - - /* Scale the selected region */ - - for( y = 0 ; y < height ; y++ ) - { - - if( height < orig_height ) - { - int max; - double frac; - const double inv_ratio = 1.0 / y_rat; - - if( y == 0 ) /* load the first row if this is the first time through */ - { - get_scaled_row( &src[0], 0, width, row, src_tmp, in, orig_width, orig_height, bytes ); - } - - new_y = (int)(y * y_rat); - frac = 1.0 - (y * y_rat - new_y); - for( x = 0 ; x < width * bytes; ++x ) - { - accum[x] = src[3][x] * frac; - } - - max = (int) ((y + 1) * y_rat) - new_y - 1; - - get_scaled_row( &src[ 0 ], ++new_y, width, row, src_tmp, in, orig_width, orig_height, bytes ); - - while( max > 0 ) - { - for( x = 0 ; x < width * bytes ; ++x ) - { - accum[x] += src[ 3 ][ x ]; - } - - get_scaled_row( &src[ 0 ], ++new_y, width, row, src_tmp, in, orig_width, orig_height, bytes ); - max--; - } - - frac = (y + 1) * y_rat - ((int) ((y + 1) * y_rat)); - for( x = 0 ; x < width * bytes ; ++x ) - { - accum[ x ] += frac * src[ 3 ][ x ]; - accum[ x ] *= inv_ratio; - } - } - else if( height > orig_height ) - { - double p0, p1, p2, p3; - double dy; - - new_y = (int)floor( y * y_rat - 0.5 ); - - while( old_y <= new_y ) - { - /* get the necesary lines from the source image, scale them, - and put them into src[] */ - get_scaled_row( &src[ 0 ], old_y + 2, width, row, src_tmp, in, orig_width, orig_height, bytes ); - old_y++; - } - - dy = (y * y_rat - 0.5) - new_y; - - p0 = cubic( dy, 1, 0, 0, 0 ); - p1 = cubic( dy, 0, 1, 0, 0 ); - p2 = cubic( dy, 0, 0, 1, 0 ); - p3 = cubic( dy, 0, 0, 0, 1 ); - - for( x = 0 ; x < width * bytes ; ++x ) - { - accum[ x ] = ( p0 * src[ 0 ][ x ] + p1 * src[ 1 ][ x ] + - p2 * src[ 2 ][ x ] + p3 * src[ 3 ][ x ] ); - } - - - } - else /* height == orig_height */ - { - get_scaled_row( &src[ 0 ], y, width, row, src_tmp, in, orig_width, orig_height, bytes ); - memcpy( accum, src[ 3 ], sizeof( double ) * width * bytes ); - } - - if( pixel_region_has_alpha( bytes ) ) - { - /* unmultiply the alpha */ - double inv_alpha; - double *p = accum; - int alpha = bytes - 1; - int result; - W8 *d = dest; - - for( x = 0 ; x < width ; ++x ) - { - if( p[ alpha ] > 0.001 ) - { - inv_alpha = 255.0 / p[ alpha ]; - for( b = 0 ; b < alpha ; b++ ) - { - result = RINT( inv_alpha * p[ b ] ); - if( result < 0 ) - { - d[ b ] = 0; - } - else if( result > 255 ) - { - d[ b ] = 255; - } - else - { - d[ b ] = result; - } - } - result = RINT( p[ alpha ] ); - if( result > 255 ) - { - d[ alpha ] = 255; - } - else - { - d[ alpha ] = result; - } - } - else /* alpha <= 0 */ - { - for( b = 0 ; b <= alpha ; ++b ) - { - d[ b ] = 0; - } - } - - d += bytes; - p += bytes; - } - } - else - { - int w = width * bytes; - - for( x = 0 ; x < w ; ++x ) - { - if( accum[ x ] < 0.0 ) - { - dest[ x ] = 0; - } - else if( accum[ x ] > 255.0 ) - { - dest[ x ] = 255; - } - else - { - dest[ x ] = RINT( accum[ x ] ); - } - } - } - pixel_region_set_row( out, bytes, y, width, dest ); - } - - /* free up temporary arrays */ - MM_FREE( accum ); - - for( i = 0 ; i < 4 ; ++i ) - { - MM_FREE( src[ i ] ); - } - - MM_FREE( src_tmp ); - MM_FREE( dest ); - - row -= 2 * bytes; - MM_FREE( row ); -} - - -/* ------------------------------------------------------------------------------ - Function: TM_MipMap -Generate MipMap. - - Parameters: - in -[in/out] Texture data. - width -[in] Width of texture in pixels. - height -[in] Height of texture in pixels. - - Returns: Nothing. - - Notes: Operates in place, quartering the size of the texture. ------------------------------------------------------------------------------ -*/ -PUBLIC _boolean TM_MipMap( PW8 in, W16 *width, W16 *height, W16 bytes ) -{ - W16 new_width, new_height; - - if( *width == 1 && *height == 1 ) - { - return false; - } - - - if( *width < 2 ) - { - new_width = 1; - } - else - { - new_width = *width >> 1; - } - - if( *height < 2 ) - { - new_height = 1; - } - else - { - new_height = *height >> 1; - } - - TM_ResampleTexture( in, *width, *height, in, new_width, new_height, bytes, INTERPOLATION_CUBIC ); - - *width = new_width; - *height = new_height; - - return true; -} - - -/* ------------------------------------------------------------------------------ - Function: TM_Init -Initialize Texture Manager. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: Generates default texture. ------------------------------------------------------------------------------ -*/ -PUBLIC void TM_Init( void ) -{ - W8 *ptr; - W8 *data; - int x, y; - - gl_round_down = Cvar_Get ("gl_round_down", "1", CVAR_INIT); - - texture_registration_sequence = 1; - -// create a checkerboard texture - data = MM_MALLOC( 16 * 16 * 4 ); - for( y = 0; y < 16; ++y ) - { - for( x = 0; x < 16; ++x ) - { - ptr = &data[ (y * 16 + x) * 4 ]; - if( (y < 8) ^ (x < 8) ) - { - ptr[ 0 ] = ptr[ 1 ] = ptr[ 2 ] = 0x00; - ptr[ 3 ] = 0xFF; - } - else - { - ptr[ 0 ] = ptr[ 1 ] = ptr[ 2 ] = 0xFF; - ptr[ 3 ] = 0xFF; - } - } - } - - r_notexture = TM_LoadTexture( "***r_notexture***", data, 16, 16, TT_Pic, 4 ); - - MM_FREE( data ); - - - Cmd_AddCommand( "listTextures", TM_TextureList_f ); - - -} - -/* ------------------------------------------------------------------------------ - Function: TM_Shutdown -Shutdown Texture Manager. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void TM_Shutdown( void ) -{ - int i; - texture_t *tex; - - for( i = 0, tex = ttextures; i < numttextures; ++i, ++tex ) - { - if( ! tex->registration_sequence ) - { - continue; // free image_t slot - } - - // free texture - R_DeleteTexture( tex->texnum ); - memset( tex, 0, sizeof( *tex ) ); - } - - Cmd_RemoveCommand( "listTextures" ); -} - diff --git a/wolf3d/newCode/env/texture_manager.h b/wolf3d/newCode/env/texture_manager.h deleted file mode 100644 index abc4d1b..0000000 --- a/wolf3d/newCode/env/texture_manager.h +++ /dev/null @@ -1,176 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, Inc. - Copyright (C) 1995 Spencer Kimball and Peter Mattis. - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * texture_manager.c: Texture manager. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from - * The GIMP (an image manipulation program) and was originally - * written by Spencer Kimball and Peter Mattis. - * - * Portion of this code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#ifndef __TEXTURE_MANAGER_H__ -#define __TEXTURE_MANAGER_H__ - -#define MAX_TEXTURES 1024 - - -typedef enum -{ - TT_Sprite, - TT_Wall, - TT_Pic, - - TextureTypeCount - -} texturetype_t; - -typedef enum -{ - Repeat = 0, - Clamp, - - WrapModeCount // Number of Wrap modes - -} TWrapMode; - -typedef enum -{ - Auto = 0, - RGBA8888, - RGBA4444, - RGBA5551, - RGB888, - RGB565, - DXTC1, - DXTC1Alpha, - DXTC3, - DXTC5, - Luminance, - Alpha, - AlphaLuminance, - DsDt, - - UpImageFormatCount // Number of Upload formats - -} TTexFormat; - -typedef enum -{ - Nearest = 0, - Linear, - - MagFilterCount // Number of Magnification filters - -} TMagFilter; - -typedef enum -{ - NearestMipMapOff = 0, - NearestMipMapNearest, - NearestMipMapLinear, - LinearMipMapOff, - LinearMipMapNearest, - LinearMipMapLinear, - - MinFilterCount // Number of Min filters - -} TMinFilter; - -// this is the header from the pre-digested binary files with sprite bounds -typedef struct { - int hasAlpha; - int srcWidth; - int srcHeight; - int uploadWidth; - int uploadHeight; - int numBounds; - int bounds[2][2][2]; -} picHeader_t; - - -typedef struct texture_s -{ - _boolean MipMap; - _boolean isTextureCube; - TTexFormat UploadFormat; - TWrapMode WrapS; - TWrapMode WrapT; - TWrapMode WrapR; - TMinFilter MinFilter; - TMagFilter MagFilter; - W32 registration_sequence; // 0 = free - W16 width, height; - W16 upload_width, upload_height; - unsigned int texnum; - W16 bytes; - texturetype_t type; - char name[ MAX_GAMEPATH ]; // game path, including extension - picHeader_t header; -} texture_t; - - - -typedef enum -{ - - INTERPOLATION_NONE, /* None (Fastest) */ - INTERPOLATION_LINEAR, /* Linear */ - INTERPOLATION_CUBIC /* Cubic (Best) */ - -} InterpolationType; - - -extern W32 texture_registration_sequence; - - - -extern void TM_Init( void ); -extern void TM_Shutdown( void ); - - -extern _boolean TM_MipMap( PW8 in, W16 *width, W16 *height, W16 bytes ); - -extern texture_t *wallTextures[1000]; -extern texture_t *spriteTextures[1000]; - -extern texture_t *TM_FindTexture( const char *name, texturetype_t type ); - -extern void TM_GetTextureSize( SW32 *width, SW32 *height, const char *name ); - -extern void TM_ResampleTexture( PW8 in, int inwidth, int inheight, PW8 out, int outwidth, int outheight, W8 bytes, InterpolationType interpolation ); - -extern void TM_FreeUnusedTextures( void ); - - - - - -#endif /* __TEXTURE_MANAGER_H__ */ diff --git a/wolf3d/newCode/env/tga.c b/wolf3d/newCode/env/tga.c deleted file mode 100644 index 82312db..0000000 --- a/wolf3d/newCode/env/tga.c +++ /dev/null @@ -1,783 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - Copyright (C) 1995 Spencer Kimball and Peter Mattis - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * tga.h: Handle Targa file format. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * Portion of this code was derived from The GIMP -- an image manipulation - * program, and was originally written by Spencer Kimball and Peter Mattis. - * - */ - -/* - Notes: - -*/ - -#include "../wolfiphone.h" - - -#define TGA_HEADER_SIZE 18 - -#ifndef IPHONE -PRIVATE W8 *p_buf; // current pointer to tga data block -#endif - - - /* TRUEVISION-XFILE magic signature string */ -static W8 magic[ 18 ] = -{ - 0x54, 0x52, 0x55, 0x45, 0x56, 0x49, 0x53, 0x49, 0x4f, - 0x4e, 0x2d, 0x58, 0x46, 0x49, 0x4c, 0x45, 0x2e, 0x0 -}; - - -typedef struct _TargaHeader -{ - W8 idLength; - W8 colorMapType; - - W8 imageType; -/* Known image types. */ -#define TGA_TYPE_MAPPED 1 -#define TGA_TYPE_COLOR 2 -#define TGA_TYPE_GRAY 3 - - W8 imageCompression; -/* Only known compression is RLE */ -#define TGA_COMP_NONE 0 -#define TGA_COMP_RLE 1 - -/* Color Map Specification. */ - W16 colorMapIndex; - W16 colorMapLength; - W8 colorMapSize; - -/* Image Specification. */ - W16 xOrigin; - W16 yOrigin; - - W16 width; - W16 height; - - W8 bpp; - W8 bytes; - - W8 alphaBits; - W8 flipHoriz; - W8 flipVert; - -} TargaHeader; - - - -PRIVATE void flip_line( W8 *buffer, TargaHeader *info ) -{ - W8 temp; - W8 *alt; - SW32 x, s; - - alt = buffer + (info->bytes * (info->width - 1)); - - for( x = 0; x * 2 <= info->width; ++x ) - { - for( s = 0; s < info->bytes; ++s ) - { - temp = buffer[ s ]; - buffer[ s ] = alt[ s ]; - alt[ s ] = temp; - } - - buffer += info->bytes; - alt -= info->bytes; - } -} - -PRIVATE void upsample( W8 *dest, W8 *src, - W32 width, W32 bytes, W8 alphaBits ) -{ - W32 x; - - for( x = 0 ; x < width ; ++x ) - { - dest[0] = ((src[1] << 1) & 0xf8); - dest[0] += (dest[0] >> 5); - - dest[1] = ((src[0] & 0xe0) >> 2) + ((src[1] & 0x03) << 6); - dest[1] += (dest[1] >> 5); - - dest[2] = ((src[0] << 3) & 0xf8); - dest[2] += (dest[2] >> 5); - - switch( alphaBits ) - { - case 1: - dest[ 3 ] = (src[ 1 ] & 0x80) ? 0 : 255; - dest += 4; - break; - - default: - dest += 3; - } - - src += bytes; - } -} - -PRIVATE void bgr2rgb( W8 *dest, W8 *src, - W32 width, W32 bytes, W32 alpha ) -{ - W32 x; - - if( alpha ) - { - for( x = 0 ; x < width ; ++x ) - { - *(dest++) = src[2]; - *(dest++) = src[1]; - *(dest++) = src[0]; - - *(dest++) = src[3]; - - src += bytes; - } - } - else - { - for( x = 0 ; x < width ; ++x ) - { - *(dest++) = src[2]; - *(dest++) = src[1]; - *(dest++) = src[0]; - - src += bytes; - } - } - - -} - -PRIVATE SW32 rle_read( filehandle_t *fp, W8 *buffer, - TargaHeader *info ) -{ - static SW32 repeat = 0; - static SW32 direct = 0; - static W8 sample[ 4 ]; - SW32 head; - W8 temphead; - SW32 x, k; - - for( x = 0; x < info->width; ++x ) - { - if( repeat == 0 && direct == 0 ) - { - FS_ReadFile( &temphead, 1, 1, fp ); - head = temphead; - - if( head >= 128 ) - { - repeat = head - 127; - - if( FS_ReadFile( sample, info->bytes, 1, fp ) < 1 ) - { - return EOF; - } - } - else - { - direct = head + 1; - } - } - - if( repeat > 0 ) - { - for( k = 0 ; k < info->bytes ; ++k ) - { - buffer[ k ] = sample[ k ]; - } - - repeat--; - } - else /* direct > 0 */ - { - if( FS_ReadFile( buffer, info->bytes, 1, fp ) < 1 ) - { - return EOF; - } - - direct--; - } - - buffer += info->bytes; - } - - return 0; -} - - -PRIVATE void read_line( filehandle_t *fp, - W8 *row, - W8 *buffer, - TargaHeader *info ) -{ - if( info->imageCompression == TGA_COMP_RLE ) - { - if( rle_read( fp, buffer, info ) == EOF ) - { - return; - } - } - else - { - FS_ReadFile( buffer, info->bytes, info->width, fp ); - } - - if( info->flipHoriz ) - { - flip_line( buffer, info ); - } - - if( info->imageType == TGA_TYPE_COLOR ) - { - if( info->bpp == 16 || info->bpp == 15 ) - { - upsample( row, buffer, info->width, info->bytes, info->alphaBits ); - } - else - { - bgr2rgb( row, buffer, info->width, info->bytes, info->bytes == 4 ? 1 : 0 ); - } - } - else - { - memcpy( row, buffer, info->width * info->bpp ); - } -} - - - -PUBLIC void LoadTGA( const char *filename, W8 **pic, W16 *width, W16 *height, W16 *bytes ) -{ - TargaHeader targa_header; - W8 header[ 18 ]; - W8 footer[ 26 ]; - W8 extension[ 495 ]; - W32 cmap_bytes; - SW32 offset; - W8 tga_cmap[4 * 256], gimp_cmap[3 * 256]; - W8 *buffer, *data, *row; - int i; - SW32 datalength; - filehandle_t *hFile; - - - - *pic = NULL; - -// -// Load the file -// - hFile = FS_OpenFile( filename, 0 ); - if( ! hFile ) - { - Com_DPrintf( "Could not open (%s) for reading\n", filename ); - - goto TGALOADFAILED; - } - - datalength = FS_GetFileSize( hFile ); - - if( ! FS_FileSeek( hFile, -26L, SEEK_END ) ) - { - /* Is file big enough for a footer? */ - if( FS_ReadFile( footer, sizeof( footer ), 1, hFile ) != 1 ) - { - Com_DPrintf( "Cannot read footer from (%s)\n" , filename ); - - goto TGALOADFAILED; - } - else if( memcmp( footer + 8, magic, sizeof( magic ) ) == 0 ) - { - /* Check the signature. */ - offset = footer[ 0 ] + (footer[ 1 ] * 256) + (footer[ 2 ] * 65536) - + (footer[ 3 ] * 16777216); - - if( offset != 0 ) - { - if( FS_FileSeek( hFile, offset, SEEK_SET ) || - FS_ReadFile( extension, sizeof( extension ), 1, hFile ) != 1 ) - { - Com_DPrintf( "Cannot read extension from '%s'\n", filename ); - - goto TGALOADFAILED; - } - - /* Eventually actually handle version 2 TGA here */ - - } - } - - } - - -// -// Get header information. -// - if( datalength < TGA_HEADER_SIZE ) - { - Com_Printf( "Could not read header from (%s)\n", filename ); - - goto TGALOADFAILED; - } - - if( FS_FileSeek( hFile, 0, SEEK_SET ) || - FS_ReadFile( header, sizeof( header ), 1, hFile ) != 1 ) - { - Com_Printf( "Cannot read header from (%s)\n", filename ); - - goto TGALOADFAILED; - } - - - - targa_header.idLength = header[ 0 ]; - targa_header.colorMapType = header[ 1 ]; - - switch( header[ 2 ] ) - { - case 1: - targa_header.imageType = TGA_TYPE_MAPPED; - targa_header.imageCompression = TGA_COMP_NONE; - break; - - case 2: - targa_header.imageType = TGA_TYPE_COLOR; - targa_header.imageCompression = TGA_COMP_NONE; - break; - - case 3: - targa_header.imageType = TGA_TYPE_GRAY; - targa_header.imageCompression = TGA_COMP_NONE; - break; - - - - case 9: - targa_header.imageType = TGA_TYPE_MAPPED; - targa_header.imageCompression = TGA_COMP_RLE; - break; - - case 10: - targa_header.imageType = TGA_TYPE_COLOR; - targa_header.imageCompression = TGA_COMP_RLE; - break; - - case 11: - targa_header.imageType = TGA_TYPE_GRAY; - targa_header.imageCompression = TGA_COMP_RLE; - break; - - - default: - targa_header.imageType = 0; - } - - targa_header.colorMapIndex = header[ 3 ] + header[ 4 ] * 256; - targa_header.colorMapLength = header[ 5 ] + header[ 6 ] * 256; - targa_header.colorMapSize = header[ 7 ]; - - targa_header.xOrigin = header[ 8 ] + header[ 9 ] * 256; - targa_header.yOrigin = header[ 10 ] + header[ 11 ] * 256; - targa_header.width = header[ 12 ] + header[ 13 ] * 256; - targa_header.height = header[ 14 ] + header[ 15 ] * 256; - - targa_header.bpp = header[ 16 ]; - targa_header.bytes = (targa_header.bpp + 7) / 8; - targa_header.alphaBits = header[ 17 ] & 0x0f; /* Just the low 4 bits */ - targa_header.flipHoriz = (header[ 17 ] & 0x10) ? 1 : 0; - targa_header.flipVert = (header[ 17 ] & 0x20) ? 0 : 1; - -// -// Analyze header information. -// - switch( targa_header.imageType ) - { - case TGA_TYPE_MAPPED: - if( targa_header.bpp != 8 ) - { - Com_DPrintf( "Unhandled sub-format in (%s)\n", filename ); - - goto TGALOADFAILED; - } - - goto TGALOADFAILED; - - break; - - case TGA_TYPE_COLOR: - if( targa_header.bpp != 15 && targa_header.bpp != 16 && targa_header.bpp != 24 - && targa_header.bpp != 32 ) - { - Com_DPrintf( "Unhandled sub-format in (%s)\n", filename ); - goto TGALOADFAILED; - } - break; - - case TGA_TYPE_GRAY: - if( targa_header.bpp != 8 && (targa_header.alphaBits != 8 || (targa_header.bpp != 16 && targa_header.bpp != 15 ))) - { - Com_DPrintf( "Unhandled sub-format in (%s)\n", filename ); - goto TGALOADFAILED; - } - - - goto TGALOADFAILED; - - - break; - - default: - Com_DPrintf( "Unknown image type for (%s)\n", filename ); - goto TGALOADFAILED; - - } /* end of switch targa_header.imageType */ - - /* Plausible but unhandled formats */ - if( targa_header.bytes * 8 != targa_header.bpp && ! (targa_header.bytes == 2 && targa_header.bpp == 15) ) - { - Com_DPrintf( "No support yet for TGA with these parameters\n" ); - - goto TGALOADFAILED; - } - - /* Check that we have a color map only when we need it. */ - if( targa_header.imageType == TGA_TYPE_MAPPED && targa_header.colorMapType != 1 ) - { - Com_DPrintf( "Indexed image has invalid color map type %d\n", - targa_header.colorMapType ); - - goto TGALOADFAILED; - } - else if( targa_header.imageType != TGA_TYPE_MAPPED && targa_header.colorMapType != 0 ) - { - Com_DPrintf( "Non-indexed image has invalid color map type %d\n", - targa_header.colorMapType ); - - goto TGALOADFAILED; - } - - /* Skip the image ID field. */ - if( targa_header.idLength && FS_FileSeek( hFile, targa_header.idLength, SEEK_CUR ) ) - { - Com_DPrintf( "File (%s) is truncated or corrupted\n", filename ); - - goto TGALOADFAILED; - } - - - - /* Handle colormap */ - if( targa_header.colorMapType == 1 ) - { - cmap_bytes = (targa_header.colorMapSize + 7 ) / 8; - if( cmap_bytes <= 4 && - FS_ReadFile( tga_cmap, targa_header.colorMapLength * cmap_bytes, 1, hFile ) == 1 ) - { - if( targa_header.colorMapSize == 32 ) - { - bgr2rgb( gimp_cmap, tga_cmap, targa_header.colorMapLength, cmap_bytes, 1); - } - else if( targa_header.colorMapSize == 24 ) - { - bgr2rgb( gimp_cmap, tga_cmap, targa_header.colorMapLength, cmap_bytes, 0); - } - else if( targa_header.colorMapSize == 16 || targa_header.colorMapSize == 15 ) - { - upsample( gimp_cmap, tga_cmap, targa_header.colorMapLength, cmap_bytes, targa_header.alphaBits); - } - - } - else - { - Com_DPrintf( "File (%s) is truncated or corrupted\n", filename ); - - goto TGALOADFAILED; - } - } - - - /* Allocate the data. */ - data = MM_MALLOC( targa_header.width * targa_header.height * targa_header.bytes ); - if( data == NULL ) - { - MM_OUTOFMEM( "data" ); - } - - buffer = (PW8) MM_MALLOC( targa_header.width * targa_header.bytes ); - if( buffer == NULL ) - { - MM_FREE( data ); - MM_OUTOFMEM( "buffer" ); - } - - if( targa_header.flipVert ) - { - for( i = targa_header.height-1 ; i >= 0 ; --i ) - { - row = data + (targa_header.width * targa_header.bytes * i); - read_line( hFile, row, buffer, &targa_header ); - } - } - else - { - for( i = 0 ; i < targa_header.height ; ++i ) - { - row = data + (targa_header.width * targa_header.bytes * i); - read_line( hFile, row, buffer, &targa_header ); - } - } - - - MM_FREE( buffer ); - - FS_CloseFile( hFile ); - - *pic = data; - *width = targa_header.width; - *height = targa_header.height; - *bytes = targa_header.bytes; - - return; - - - -TGALOADFAILED: - *pic = NULL; - *width = 0; - *height = 0; - *bytes = 0; - - if( hFile ) - { - FS_CloseFile( hFile ); - } - -} - -/* ------------------------------------------------------------------------------ - Function: rle_write -Run length encode scanline. - - Parameters: fp -[in] Pointer to valid FILE structure. - buffer -[in] Scanline data. - width -[in] Image scanline width. - bytes -[in] Bytes per pixel. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PRIVATE void rle_write( FILE *fp, - W8 *buffer, - W32 width, - W32 bytes ) -{ - SW32 repeat = 0; - SW32 direct = 0; - W8 *from = buffer; - W32 x; - - for( x = 1 ; x < width ; ++x ) - { - if( memcmp( buffer, buffer + bytes, bytes ) ) - { - /* next pixel is different */ - if( repeat ) - { - putc( 128 + repeat, fp ); - fwrite( from, bytes, 1, fp ); - from = buffer + bytes; /* point to first different pixel */ - repeat = 0; - direct = 0; - } - else - { - direct += 1; - } - } - else - { - /* next pixel is the same */ - if( direct ) - { - putc( direct - 1, fp ); - fwrite( from, bytes, direct, fp ); - from = buffer; /* point to first identical pixel */ - direct = 0; - repeat = 1; - } - else - { - repeat += 1; - } - } - - if( repeat == 128 ) - { - putc( 255, fp ); - fwrite( from, bytes, 1, fp ); - from = buffer + bytes; - direct = 0; - repeat = 0; - } - else if( direct == 128 ) - { - putc( 127, fp ); - fwrite( from, bytes, direct, fp ); - from = buffer + bytes; - direct = 0; - repeat = 0; - } - - buffer += bytes; - } - - if( repeat > 0 ) - { - putc( 128 + repeat, fp ); - fwrite( from, bytes, 1, fp ); - } - else - { - putc( direct, fp ); - fwrite( from, bytes, direct + 1, fp ); - } -} - - -/* ------------------------------------------------------------------------------ - Function: WriteTGA -Write targa image file. - - Parameters: filename -[in] Name of TGA file to save as. - bpp -[in] Bits per pixel. (16, 24 or 32). - width -[in] Width of image. - height -[in] Height of image. - Data -[in] Raw image data. - upsideDown -[in] Is the data upside down? 1 yes, 0 no. - rle -[in] Run Length encode? 1 yes, 0 no. - - Returns: 0 on error, otherwise 1. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC W8 WriteTGA( const char *filename, W16 bpp, W16 width, W16 height, - void *Data, W8 upsideDown, W8 rle ) -{ - W16 i, x, y, BytesPerPixel; - W8 *scanline; - W8 header[ 18 ]; - FILE *filestream; - W8 *ptr = (PW8) Data; - W8 temp; - - BytesPerPixel = bpp >> 3; - - filestream = fopen( filename, "wb" ); - if( filestream == NULL ) - { - Com_DPrintf( "Could not open file (%s) for write!\n", filename ); - return 0; - } - - memset( header, 0, 18 ); - header[2] = rle ? 10 : 2; - - header[12] = width & 255; // width low - header[13] = width >> 8; // width high - - header[14] = height & 255; // height low - header[15] = height >> 8; // height high - - header[16] = bpp & 255; // pixel size - - if( upsideDown ) - { - header[17] |= 1 << 5; // Image Descriptor - } - - - fwrite( header, sizeof( W8 ), sizeof( header ), filestream ); - - - - scanline = (PW8) MM_MALLOC( width * BytesPerPixel ); - if( scanline == NULL ) - { - fclose( filestream ); - - return 0; - } - - for( y = 0; y < height; ++y ) - { - W32 k = 0; - - for( i = 0; i < (width * BytesPerPixel); ++i ) - { - scanline[ k++ ] = ptr[ (height - y - 1) * width * BytesPerPixel + i ]; - } - - - - if( bpp == 24 || bpp == 32 ) - { - // swap rgb to bgr - for( x = 0; x < (width * BytesPerPixel); x += BytesPerPixel ) - { - temp = scanline[ x ]; - scanline[ x ] = scanline[ x + 2 ]; - scanline[ x + 2 ] = temp; - } - } - - - if( rle ) - { - rle_write( filestream, scanline, width, BytesPerPixel ); - } - else - { - fwrite( scanline, sizeof( W8 ), width * BytesPerPixel, filestream ); - } - } - - MM_FREE( scanline ); - - fclose( filestream ); - - return 1; -} diff --git a/wolf3d/newCode/env/tga.h b/wolf3d/newCode/env/tga.h deleted file mode 100644 index 509c90b..0000000 --- a/wolf3d/newCode/env/tga.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, Inc. - Copyright (C) 1995 Spencer Kimball and Peter Mattis - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * tga.h: Handle Targa file format. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from Quake II, and was - * originally written by id Software, Inc. - * - * Portion of this code was derived from The GIMP -- an image manipulation - * program, and was originally written by Spencer Kimball and Peter Mattis. - */ - -#ifndef __TGA_H__ -#define __TGA_H__ - -extern void LoadTGA( const char *filename, W8 **pic, W16 *width, W16 *height, W16 *bytes ); - - - -extern W8 WriteTGA( const char *filename, W16 bpp, W16 width, W16 height, - void *Data, W8 upsideDown, W8 rle ); - - -#endif /* __TGA_H__ */ - diff --git a/wolf3d/newCode/env/timer.h b/wolf3d/newCode/env/timer.h deleted file mode 100644 index c9aca45..0000000 --- a/wolf3d/newCode/env/timer.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * timer.h: Timer. - * - * Author: Id Software, Inc. - * Date: 1997-2001 - * - */ - -/* - Notes: - This module is implemented by win_timer.c or unix_timer.c. - -*/ - -#ifndef __TIMER_H__ -#define __TIMER_H__ - -extern W32 curtime; // time returned by last Sys_Milliseconds() - -extern W32 Sys_Milliseconds( void ); - - -#endif /* __TIMER_H__ */ - diff --git a/wolf3d/newCode/env/unix_file.c b/wolf3d/newCode/env/unix_file.c deleted file mode 100644 index adc34ba..0000000 --- a/wolf3d/newCode/env/unix_file.c +++ /dev/null @@ -1,286 +0,0 @@ -/* - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * unix_file.c: Handles non-portable file services. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#include "../wolfiphone.h" - - -PRIVATE char findbase[ MAX_OSPATH ]; -PRIVATE char findpath[ MAX_OSPATH ]; -PRIVATE char findpattern[ MAX_OSPATH ]; -PRIVATE DIR *fdir; - - -/* ------------------------------------------------------------------------------ - Function: FS_CreateDirectory() -Creates a new directory. - - Parameters: dirname -[in] Pointer to a NUL-terminated string that specifies - the path of the directory to be created. - - Returns: On success nonzero, otherwise zero. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC W8 FS_CreateDirectory( const char *dirname ) -{ - int ret_val = mkdir( dirname, S_IRUSR | S_IWUSR | S_IXUSR ); - - if( ret_val == -1 && errno == EEXIST ) - { - return 1; - } - - return (W8)(! ret_val); -} - -/* ------------------------------------------------------------------------------ - Function: FS_ChangeCurrentDirectory() -Changes the current directory - - Parameters: path -[in] Pointer to a NUL-terminated string that specifies - the path to the new directory. - - Returns: On success nonzero, otherwise zero. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC W8 FS_ChangeCurrentDirectory( const char *path ) -{ - return ! chdir( path ); -} - -/* ------------------------------------------------------------------------------ - Function: CompareAttributes() -Compare directory and file attributes. - - Parameters: path -[in] Specifies the path to compare file attributes. - musthave -[in] File or directory must have these attributes. - canthave- [in] File or directory can not have these attributes. - - Returns: On success true, otherwise false. - - Notes: ------------------------------------------------------------------------------ -*/ -PRIVATE _boolean CompareAttributes( const char *path, W32 musthave, W32 canthave ) -{ - struct stat st; - - if( stat( path, &st ) == -1 ) - { - return false; - } - - if( ( st.st_mode & S_IFDIR ) && ( canthave & FA_DIR ) ) - { - return false; - } - - if( ( musthave & FA_DIR ) && !( st.st_mode & S_IFDIR ) ) - { - return false; - } - - return true; -} - -/* ------------------------------------------------------------------------------ - Function: FS_FindFirstFile() -Searches a directory for a file. - - Parameters: path -[in] Pointer to a NUL-terminated string that specifies - a valid directory or path and file name. - musthave -[in] File or directory must have these attributes. - canthave- [in] File or directory can not have these attributes. - - Returns: On success string of file name or directory, otherwise NULL. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC char *FS_FindFirst( const char *path, W32 musthave, W32 canthave ) -{ - struct dirent *d; - char *p; - p; - - if( fdir ) - { - Com_Printf( "FS_FindFirst without close\n" ); - - return NULL; - } - - FS_FilePath( (char *)path, findbase ); - my_strlcpy( (char *)findpattern, FS_SkipPath( (char *)path ), sizeof( findpattern ) ); - - if( ! *findbase ) - { - if( (fdir = opendir( "." )) == NULL ) - { - return NULL; - } - } - else - { - if( (fdir = opendir( findbase )) == NULL ) - { - return NULL; - } - } - - while( (d = readdir( fdir )) != NULL ) - { - if( ! *findpattern || glob_match( findpattern, d->d_name ) ) - { - if( ! *findbase ) - { - my_strlcpy( findpath, d->d_name, sizeof( findpath ) ); - } - else - { - my_snprintf( findpath, sizeof( findpath ), "%s/%s", findbase, d->d_name ); - } - - if( CompareAttributes( findpath, musthave, canthave ) ) - { - return findpath; - } - } - } - - return NULL; - -} - -/* ------------------------------------------------------------------------------ - Function: FS_FindNext -Continues a file search from a previous call to - the FS_FindFirst function. - - Parameters: musthave -[in] File or directory must have these attributes. - canthave- [in] File or directory can not have these attributes. - - Returns: On success string of file name or directory, otherwise NULL. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC char *FS_FindNext( W32 musthave, W32 canthave ) -{ - struct dirent *d; - - if( fdir == NULL ) - { - return NULL; - } - - while( (d = readdir( fdir ) ) != NULL) - { - if( ! *findpattern || glob_match( findpattern, d->d_name ) ) - { - if( ! *findbase ) - { - my_strlcpy( findpath, d->d_name, sizeof( findpath ) ); - } - else - { - my_snprintf( findpath, sizeof( findpath ), "%s/%s", findbase, d->d_name ); - } - - if( CompareAttributes( findpath, musthave, canthave ) ) - { - return findpath; - } - } - } - - return NULL; -} - -/* ------------------------------------------------------------------------------ - Function: FS_FindClose() -Closes the search handle. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void FS_FindClose( void ) -{ - if( fdir ) - { - closedir( fdir ); - } - - fdir = NULL; -} - -/* ------------------------------------------------------------------------------ - Function: FS_DeleteFile() -Deletes an existing file. - - Parameters: filename -[in] Pointer to a NUL-terminated string that - specifies the file to be deleted. - - Returns: If successful the return value is nonzero, otherwise zero. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC _boolean FS_DeleteFile( const char *filename ) -{ - return( ! unlink( filename ) ); -} - -/* ------------------------------------------------------------------------------ - Function: FS_RemoveDirectory() -Deletes an existing empty directory. - - Parameters: pathname -[in] Pointer to a NUL-terminated string that - specifies the directory to be deleted. - - Returns: If successful the return value is nonzero, otherwise zero. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC _boolean FS_RemoveDirectory( const char *pathname ) -{ - return( ! rmdir( pathname ) ); -} - diff --git a/wolf3d/newCode/env/unix_timer.c b/wolf3d/newCode/env/unix_timer.c deleted file mode 100644 index 38b6f42..0000000 --- a/wolf3d/newCode/env/unix_timer.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * unix_timer.c: unix timer. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#include "../wolfiphone.h" - -PUBLIC W32 curtime; - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC W32 Sys_Milliseconds( void ) -{ - struct timeval tp; - struct timezone tzp; - static int secbase; - - gettimeofday( &tp, &tzp ); - - if( ! secbase ) - { - secbase = tp.tv_sec; - return tp.tv_usec / 1000; - } - - curtime = (tp.tv_sec - secbase) * 1000 + tp.tv_usec / 1000; - - return curtime; -} diff --git a/wolf3d/newCode/env/vector.c b/wolf3d/newCode/env/vector.c deleted file mode 100644 index 9d200b1..0000000 --- a/wolf3d/newCode/env/vector.c +++ /dev/null @@ -1,650 +0,0 @@ -/* - - Copyright (C) 2005 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * vector.h: 2D and 3D vector math routines. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * Portion of this code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#include "../wolfiphone.h" - -vec3_t vec3_origin = { 0, 0, 0 }; - - -vec_t _VectorNormalize( vec3_t v ); - -vec_t (*pfVectorNormalize)( vec3_t v ) = _VectorNormalize; - - -/* ------------------------------------------------------------------------------ - Function: _VectorNormalize -Normalize a 3D vector. - - Parameters: v -[in] 3D vector to normalize. - - Returns: Unit vector value. - - Notes: - For a given vector, the process of finding a unit vector which is - parallel to it. This is done by dividing the given vector by its - magnitude. ------------------------------------------------------------------------------ -*/ -PUBLIC vec_t _VectorNormalize( vec3_t v ) -{ - float length, ilength; - - length = (float)pfSqrt( v[ 0 ] * v[ 0 ] + v[ 1 ] * v[ 1 ] + v[ 2 ] * v[ 2 ] ); - - if( length ) - { - ilength = 1 / length; - v[ 0 ] *= ilength; - v[ 1 ] *= ilength; - v[ 2 ] *= ilength; - } - - return length; -} - -/* ------------------------------------------------------------------------------ - Function: ProjectPointOnPlane -Project a point onto a plane. - - Parameters: dst -[out] Destination Point on Plane. - p -[in] Point to project onto the plane. - normal -[in] A vector to specify the orientation of the plane. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void ProjectPointOnPlane( vec3_t dst, const vec3_t p, const vec3_t normal ) -{ - float d; - vec3_t n; - float inv_denom; - - inv_denom = 1.0f / DotProduct( normal, normal ); - - d = DotProduct( normal, p ) * inv_denom; - - n[ 0 ] = normal[ 0 ] * inv_denom; - n[ 1 ] = normal[ 1 ] * inv_denom; - n[ 2 ] = normal[ 2 ] * inv_denom; - - dst[ 0 ] = p[ 0 ] - d * n[ 0 ]; - dst[ 1 ] = p[ 1 ] - d * n[ 1 ]; - dst[ 2 ] = p[ 2 ] - d * n[ 2 ]; -} - -/* ------------------------------------------------------------------------------ - Function: PerpendicularVector - - - Parameters:dst -[out] Perpendicular Vector. - src -[in] Normalized vector. - - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void PerpendicularVector( vec3_t dst, const vec3_t src ) -{ - int pos; - int i; - float minelem = 1.0F; - vec3_t tempvec; - - /* find the smallest magnitude axially aligned vector */ - for( pos = 0, i = 0 ; i < 3 ; ++i ) - { - if( fabs( src[ i ] ) < minelem ) - { - pos = i; - minelem = (float)fabs( src[ i ] ); - } - } - tempvec[ 0 ] = tempvec[ 1 ] = tempvec[ 2 ] = 0.0F; - tempvec[ pos ] = 1.0F; - - /* project the point onto the plane defined by src */ - ProjectPointOnPlane( dst, tempvec, src ); - - /* normalize the result */ - pfVectorNormalize( dst ); -} - -/* ------------------------------------------------------------------------------ - Function: RotatePointAroundVector -Rotate a point around a vector. - - Parameters: dst -[out] Point after rotation. - dir -[in] vector. - point -[in] Point. - degrees -[in] Degrees of rotation. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void RotatePointAroundVector( vec3_t dst, const vec3_t dir, const vec3_t point, float degrees ) -{ - mat3_t m; - mat3_t im; - mat3_t zrot; - mat3_t tmpmat; - mat3_t rot; - vec3_t vr, vup, vf; - float rad; - - vf[0] = dir[0]; - vf[1] = dir[1]; - vf[2] = dir[2]; - - PerpendicularVector( vr, dir ); - vectorCrossProduct( vr, vf, vup ); - - m[0] = vr[0]; - m[3] = vr[1]; - m[6] = vr[2]; - - m[1] = vup[0]; - m[4] = vup[1]; - m[7] = vup[2]; - - m[2] = vf[0]; - m[5] = vf[1]; - m[8] = vf[2]; - - memcpy( im, m, sizeof( im ) ); - - im[1] = m[3]; - im[2] = m[6]; - im[3] = m[1]; - im[5] = m[7]; - im[6] = m[2]; - im[7] = m[5]; - - memset( zrot, 0, sizeof( zrot ) ); - zrot[0] = zrot[4] = zrot[8] = 1.0F; - - rad = DEG2RAD( degrees ); - zrot[0] = (float)cos( rad ); - zrot[1] = (float)sin( rad ); - zrot[3] = (float)-sin( rad ); - zrot[4] = (float)cos( rad ); - - Matrix3x3Multiply( m, zrot, tmpmat ); - Matrix3x3Multiply( tmpmat, im, rot ); - - dst[0] = rot[0] * point[0] + rot[1] * point[1] + rot[2] * point[2]; - dst[1] = rot[3] * point[0] + rot[4] * point[1] + rot[5] * point[2]; - dst[2] = rot[6] * point[0] + rot[7] * point[1] + rot[8] * point[2]; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC float RadiusFromBounds( const vec3_t mins, const vec3_t maxs ) -{ - int i; - vec3_t corner; - float a, b; - - for( i = 0; i < 3; ++i ) - { - a = (float)fabs( mins[i] ); - b = (float)fabs( maxs[i] ); - corner[i] = a > b ? a : b; - } - - return vectorLength( corner ); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void AddPointToBounds( vec3_t v, vec3_t mins, vec3_t maxs ) -{ - if ( v[0] < mins[0] ) - { - mins[0] = v[0]; - } - if ( v[0] > maxs[0]) - { - maxs[0] = v[0]; - } - - if ( v[1] < mins[1] ) - { - mins[1] = v[1]; - } - if ( v[1] > maxs[1]) - { - maxs[1] = v[1]; - } - - if ( v[2] < mins[2] ) - { - mins[2] = v[2]; - } - if ( v[2] > maxs[2]) - { - maxs[2] = v[2]; - } -} - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void AngleVectors( const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up ) -{ - float angle; - static float sr, sp, sy, cr, cp, cy; - // static to help MS compiler fp bugs - - angle = angles[YAW] * ( M_PI*2 / 360 ); - sy = (float)sin( angle ); - cy = (float)cos( angle ); - angle = angles[PITCH] * ( M_PI*2 / 360 ); - sp = (float)sin( angle ); - cp = (float)cos( angle ); - angle = angles[ROLL] * ( M_PI*2 / 360 ); - sr = (float)sin( angle ); - cr = (float)cos( angle ); - - if( forward ) - { - forward[0] = cp*cy; - forward[1] = cp*sy; - forward[2] = -sp; - } - - if( right ) - { - right[0] = (-1*sr*sp*cy+-1*cr*-sy); - right[1] = (-1*sr*sp*sy+-1*cr*cy); - right[2] = -1*sr*cp; - } - - if( up ) - { - up[0] = (cr*sp*cy+-sr*-sy); - up[1] = (cr*sp*sy+-sr*cy); - up[2] = cr*cp; - } -} - -/* ------------------------------------------------------------------------------ - Function: vectorCompare -Compares two vectors for equality. - - Parameters: v1, v2 -[in] 3d vectors to compare. - - Returns: 1 if they are equal, otherwise 0. - - Notes: ------------------------------------------------------------------------------ -*/ -INLINECALL int vectorCompare( const vec3_t v1, const vec3_t v2 ) -{ - if( v1[ 0 ] != v2[ 0 ] || - v1[ 1 ] != v2[ 1 ] || - v1[ 2 ] != v2[ 2 ] ) - { - return 0; - } - - return 1; -} - -/* ------------------------------------------------------------------------------ - Function: vectorLength -Get the length of a vector. - - Parameters: v -[in] 3D vector to get the length of. - - Returns: The length of the vector. - - Notes: - Since the square of length is a sum of squares, and squares - (of real numbers) are always positive, length is always positive. - The only time the length of a 3D vector is zero is when the vector - is the zero vector. ------------------------------------------------------------------------------ -*/ -INLINECALL vec_t vectorLength( const vec3_t v ) -{ - return (vec_t)pfSqrt( v[ 0 ] * v[ 0 ] + v[ 1 ] * v[ 1 ] + v[ 2 ] * v[ 2 ] ); -} - -/* ------------------------------------------------------------------------------ - Function: CrossProduct -Calulates the cross product of two vectors. - - Parameters: v1, v2 -[in] 3D vectors. - cross -[out] The vector cross product. - - Returns: Nothing - - Notes: - The vector cross product takes two vector operands to produce a - vector result. The result, like all geometric vectors, has two - properties: length and orientation. - - To find a vector perpendicular to a particular plane, compute the - cross product of two vectors in that plane. But there are two - directions perpendicular to the plane. Which one does the cross - product give you? That is determined by the right hand rule. - - The cross product of two vectors is perpendicular to both; the right - hand rule picks the one out of two possible perpendicular directions. - - Computing Cross Product from Column Matrices: - u × v = ( uj vk - uk vj , uk vi - ui vk , ui vj - uj vi )T ------------------------------------------------------------------------------ -*/ -PUBLIC void vectorCrossProduct( const vec3_t v1, const vec3_t v2, vec3_t cross ) -{ - cross[ 0 ] = v1[ 1 ] * v2[ 2 ] - v1[ 2 ] * v2[ 1 ]; // X - cross[ 1 ] = v1[ 2 ] * v2[ 0 ] - v1[ 0 ] * v2[ 2 ]; // Y - cross[ 2 ] = v1[ 0 ] * v2[ 1 ] - v1[ 1 ] * v2[ 0 ]; // Z -} - - -#if defined(__i386__) && defined(_MSC_VER) - -// Taken from an article written by Michael Abrash that originally appeared in -// Dr. Dobb's Journal. -PUBLIC void vectorCrossProduct_asm( const vec3_t v1, const vec3_t v2, vec3_t cross ) -{ - __asm - { - mov eax, cross - mov ecx, v2 - mov edx, v1 - - ;optimized cross product; 22 cycles - fld dword ptr [ecx+4] ;starts & ends on cycle 0 - fmul dword ptr [edx+8] ;starts on cycle 1 - fld dword ptr [ecx+8] ;starts & ends on cycle 2 - fmul dword ptr [edx+0] ;starts on cycle 3 - fld dword ptr [ecx+0] ;starts & ends on cycle 4 - fmul dword ptr [edx+4] ;starts on cycle 5 - fld dword ptr [ecx+8] ;starts & ends on cycle 6 - fmul dword ptr [edx+4] ;starts on cycle 7 - fld dword ptr [ecx+0] ;starts & ends on cycle 8 - fmul dword ptr [edx+8] ;starts on cycle 9 - fld dword ptr [ecx+4] ;starts & ends on cycle 10 - fmul dword ptr [edx+0] ;starts on cycle 11 - fxch st(2) ;no cost - fsubrp st(5),st(0) ;starts on cycle 12 - fsubrp st(3),st(0) ;starts on cycle 13 - fsubrp st(1),st(0) ;starts on cycle 14 - fxch st(2) ;no cost, stalls for cycle 15 - fstp dword ptr [eax+0] ;starts on cycle 16, ends on cycle 17 - fstp dword ptr [eax+4] ;starts on cycle 18, ends on cycle 19 - fstp dword ptr [eax+8] ;starts on cycle 20, ends on cycle 21 - } -} - -#endif /* __i386__ */ - - - -/* ------------------------------------------------------------------------------ - Function: _DotProduct -Calculates the dot product. - - Parameters: v1, v2 -[in] 3D vectors to compute dot product. - - Returns: the dot product - - Notes: - Dot product, which takes two vectors as operands and produces a real - number as its output. Sometimes the dot product is called the inner - product or the scalar product. - The dot product is: - a · b = a1b1 + a2b2 + a3b3 ------------------------------------------------------------------------------ -*/ -PUBLIC vec_t _vectorDotProduct( const vec3_t v1, const vec3_t v2 ) -{ - return v1[ 0 ] * v2[ 0 ] + v1[ 1 ] * v2[ 1 ] + v1[ 2 ] * v2[ 2 ]; -} - - -#if defined(__i386__) && defined(_MSC_VER) - -// Taken from an article written by Michael Abrash that originally appeared in -// Dr. Dobb's Journal. -PUBLIC vec_t _vectorDotProduct_asm( const vec3_t v1, const vec3_t v2 ) -{ - float dotret; - - __asm - { - mov eax, v2 - mov ecx, v1 - - ;optimized dot product; 15 cycles - fld dword ptr [eax+0] ;starts & ends on cycle 0 - fmul dword ptr [ecx+0] ;starts on cycle 1 - fld dword ptr [eax+4] ;starts & ends on cycle 2 - fmul dword ptr [ecx+4] ;starts on cycle 3 - fld dword ptr [eax+8] ;starts & ends on cycle 4 - fmul dword ptr [ecx+8] ;starts on cycle 5 - fxch st(1) ;no cost - faddp st(2),st(0) ;starts on cycle 6, stalls for cycles 7-8 - faddp st(1),st(0) ;starts on cycle 9, stalls for cycles 10-12 - fstp dword ptr [dotret] ;starts on cycle 13, ends on cycle 14 - } - - return dotret; -} - -#endif /* __i386__ */ - - - -/* ------------------------------------------------------------------------------ - Function: _vectorSubtract -Vector Difference. - - Parameters: veca, vecb -[in] 3D vectors. - out -[out] The vector difference of vectors A and B. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -INLINECALL void _vectorSubtract( const vec3_t veca, const vec3_t vecb, vec3_t out ) -{ - out[ 0 ] = veca[ 0 ] - vecb[ 0 ]; - out[ 1 ] = veca[ 1 ] - vecb[ 1 ]; - out[ 2 ] = veca[ 2 ] - vecb[ 2 ]; -} - -/* ------------------------------------------------------------------------------ - Function: _vectorAdd -Vector addition. - - Parameters: veca, vecb -[in] 3D vectors. - out -[out] The vector sum of vectors A and B - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -INLINECALL void _vectorAdd( const vec3_t veca, const vec3_t vecb, vec3_t out ) -{ - out[ 0 ] = veca[ 0 ] + vecb[ 0 ]; - out[ 1 ] = veca[ 1 ] + vecb[ 1 ]; - out[ 2 ] = veca[ 2 ] + vecb[ 2 ]; -} - -/* ------------------------------------------------------------------------------ - Function: _vectorCopy -Copy a vector. - - Parameters: in -[in] Source vector. - out -[out] Destination vector. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -INLINECALL void _vectorCopy( const vec3_t in, vec3_t out ) -{ - out[ 0 ] = in[ 0 ]; - out[ 1 ] = in[ 1 ]; - out[ 2 ] = in[ 2 ]; -} - -/* ------------------------------------------------------------------------------ - Function: _vectorScale -Scale a vector. - - Parameters: in -[in] Source vector. - scale -[in] Scale vector. - out -[out] Destination vector. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -INLINECALL void _vectorScale( const vec3_t in, const vec_t scale, vec3_t out ) -{ - out[ 0 ] = in[ 0 ] * scale; - out[ 1 ] = in[ 1 ] * scale; - out[ 2 ] = in[ 2 ] * scale; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -INLINECALL void _vectorMA( const vec3_t veca, float scale, const vec3_t vecb, vec3_t vecc ) -{ - vecc[ 0 ] = veca[ 0 ] + scale * vecb[ 0 ]; - vecc[ 1 ] = veca[ 1 ] + scale * vecb[ 1 ]; - vecc[ 2 ] = veca[ 2 ] + scale * vecb[ 2 ]; -} - - - - - - -///////////////////////////////////////////////////////////////////// -// -// 2D Vector routines -// -///////////////////////////////////////////////////////////////////// - - -/* ------------------------------------------------------------------------------ - Function: vector2DCompare -Compares two vectors for equality. - - Parameters: v1, v2 -[in] 2d vectors to compare. - - Returns: 1 if they are equal, otherwise 0. - - Notes: ------------------------------------------------------------------------------ -*/ -INLINECALL W32 vector2DCompare( const vec2_t v1, const vec2_t v2 ) -{ - if( v1[ 0 ] != v2[ 0 ] || v1[ 1 ] != v2[ 1 ] ) - { - return 0; - } - - return 1; -} - -/* ------------------------------------------------------------------------------ - Function: vector2DLength -Get the length of a vector. - - Parameters: v -[in] 2D vector to get the length of. - - Returns: The length of the vector. - - Notes: ------------------------------------------------------------------------------ -*/ -INLINECALL vec_t vector2DLength( const vec2_t v ) -{ - return (vec_t)pfSqrt( v[ 0 ] * v[ 0 ] + v[ 1 ] * v[ 1 ] ); -} - - - diff --git a/wolf3d/newCode/env/vector.h b/wolf3d/newCode/env/vector.h deleted file mode 100644 index c2ef60c..0000000 --- a/wolf3d/newCode/env/vector.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - - Copyright (C) 2005 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * vector.h: 2D and 3D vector math routines. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * Portion of this code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#ifndef __VECTOR_H__ -#define __VECTOR_H__ - -typedef float vec_t; -typedef vec_t vec2_t[ 2 ]; -typedef vec_t vec3_t[ 3 ]; -typedef vec_t vec4_t[ 4 ]; -typedef vec_t vec5_t[ 5 ]; - - - -extern vec3_t vec3_origin; - - -///////////////////////////////////////////////////////////////////// -// -// 3D Vector routines -// -///////////////////////////////////////////////////////////////////// - -#define vectorClear( a ) ( (a)[ 0 ] = (a)[ 1 ] = (a)[ 2 ] = 0 ) -#define vectorNegate( a, b ) ( (b)[ 0 ] = (-a)[ 0 ], (b)[ 1 ] = (-a)[ 1 ], (b)[ 2 ] = (-a)[ 2 ] ) -#define vectorSet( v, x, y, z ) ( (v)[ 0 ] = ( x ), (v)[ 1 ] = ( y ), (v)[ 2 ] = ( z ) ) -#define vectorInverse( a ) ( (a)[ 0 ] = (-a)[ 0 ], (a)[ 1 ] = (-a)[ 1 ], (a)[ 2 ] = (-a)[ 2 ] ) - -#if 1 - - #define DotProduct( x, y ) ( (x)[ 0 ] * (y)[ 0 ] + (x)[ 1 ] * (y)[ 1 ] + (x)[ 2 ] * (y)[ 2 ] ) - #define vectorSubtract( a, b, c ) ( (c)[ 0 ] = (a)[ 0 ] - (b)[ 0 ], (c)[ 1 ] = (a)[ 1 ] - (b)[ 1 ], (c)[ 2 ] = (a)[ 2 ] - (b)[ 2 ] ) - #define vectorAdd( a, b, c ) ( (c)[ 0 ] = (a)[ 0 ] + (b)[ 0 ], (c)[ 1 ] = (a)[ 1 ] + (b)[ 1 ], (c)[ 2 ] = (a)[ 2 ] + (b)[ 2 ] ) - #define vectorCopy( a, b ) ( (b)[ 0 ] = (a)[ 0 ], (b)[ 1 ] = (a)[ 1 ], (b)[ 2 ] = (a)[ 2 ] ) - #define vectorScale( v, s, o ) ( (o)[ 0 ] = (v)[ 0 ] * (s),(o)[ 1 ] = (v)[ 1 ] * (s), (o)[ 2 ] = (v)[ 2 ] * (s) ) - #define vectorMA( v, s, b, o ) ( (o)[ 0 ] = (v)[ 0 ] + (b)[ 0 ]*(s),(o)[ 1 ] = (v)[ 1 ] + (b)[ 1 ] * (s),(o)[ 2 ] = (v)[ 2 ] + (b)[ 2 ] * (s) ) - -#else - - /* just in case you don't want to use the macros */ - #define DotProduct( x, y ) _vectorDotProduct( x, y ) - #define vectorSubtract( a, b, c ) _vectorSubtract( a, b, c ) - #define vectorAdd( a, b, c ) _vectorAdd( a, b, c ) - #define vectorCopy( a, b ) _vectorCopy( a, b ) - #define vectorScale( v, s, o ) _vectorScale( v, s, o ) - #define vectorMA( v, s, b, o ) _vectorMA( v, s, b, o ) - -#endif - - -extern void vectorCrossProduct( const vec3_t v1, const vec3_t v2, vec3_t cross ); - - -extern int vectorCompare( const vec3_t v1, const vec3_t v2 ); -extern vec_t vectorLength( const vec3_t v ); -extern vec_t (*pfVectorNormalize)( vec3_t vec ); - -extern void angleVectors( const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up ); - - -extern void RotatePointAroundVector( vec3_t dst, const vec3_t dir, const vec3_t point, float degrees ); -extern void PerpendicularVector( vec3_t dst, const vec3_t src ); -extern void ProjectPointOnPlane( vec3_t dst, const vec3_t p, const vec3_t normal ); - - -extern void AddPointToBounds( vec3_t v, vec3_t mins, vec3_t maxs ); -extern float RadiusFromBounds( const vec3_t mins, const vec3_t maxs ); - - - -///////////////////////////////////////////////////////////////////// -// -// 2D Vector routines -// -///////////////////////////////////////////////////////////////////// - -#define vector2DClear( a ) ( (a)[ 0 ] = (a)[ 1 ] = 0 ) -#define vector2DNegate( a, b ) ( (b)[ 0 ] = (-a)[ 0 ], (b)[ 1 ] = (-a)[ 1 ] ) -#define vector2DSet( v, x, y ) ( (v)[ 0 ] = ( x ), (v)[ 1 ] = ( y ) ) -#define vector2DInverse( a ) ( (a)[ 0 ] = (-a)[ 0 ], (a)[ 1 ] = (-a)[ 1 ] ) - -#define vector2DPerpDot( a, b ) ( (a)[ 0 ] * (b)[ 1 ] - (a)[ 1 ] * (b)[ 0 ] ) -#define vector2DDotProduct( x, y ) ( (x)[ 0 ] * (y)[ 0 ] + (x)[ 1 ] * (y)[ 1 ] ) -#define vector2DSubtract( a, b, c ) ( (c)[ 0 ] = (a)[ 0 ] - (b)[ 0 ], (c)[ 1 ] = (a)[ 1 ] - (b)[ 1 ] ) -#define vector2DAdd( a, b, c ) ( (c)[ 0 ] = (a)[ 0 ] + (b)[ 0 ], (c)[ 1 ] = (a)[ 1 ] + (b)[ 1 ] ) -#define vector2DCopy( a, b ) ( (b)[ 0 ] = (a)[ 0 ], (b)[ 1 ] = (a)[ 1 ] ) -#define vector2DScale( v, s, o ) ( (o)[ 0 ] = (v)[ 0 ] * (s), (o)[ 1 ] = (v)[ 1 ] * (s) ) -#define vector2DMA( v, s, b, o ) ( (o)[ 0 ] = (v)[ 0 ] + (b)[ 0 ]*(s), (o)[ 1 ] = (v)[ 1 ] + (b)[ 1 ] * (s) ) - - -extern W32 vector2DCompare( const vec2_t v1, const vec2_t v2 ); -extern vec_t vector2DLength( const vec2_t v ); - - -#endif /* __VECTOR_H__ */ - diff --git a/wolf3d/newCode/env/video.h b/wolf3d/newCode/env/video.h deleted file mode 100644 index 8d12592..0000000 --- a/wolf3d/newCode/env/video.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * video.h -- video driver defs. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -/* - Notes: - This module is implemented by vid_sys.c. - -*/ - - - -#ifndef __VIDEO_H__ -#define __VIDEO_H__ - -typedef struct vrect_s -{ - int x, y, width, height; - -} vrect_t; - -typedef struct -{ - unsigned width, height; // coordinates from main game -} viddef_t; - -extern viddef_t viddef; // global video state - -// Video module initialisation etc -extern void Video_Init( void ); -extern void Video_Shutdown( void ); -extern void Video_CheckChanges( void ); - - -extern void VID_NewWindow ( int width, int height ); -extern _boolean VID_GetModeInfo( int *width, int *height, int mode ); - - -#endif /* __VIDEO_H__ */ diff --git a/wolf3d/newCode/env/wavfile.c b/wolf3d/newCode/env/wavfile.c deleted file mode 100644 index 47e89ea..0000000 --- a/wolf3d/newCode/env/wavfile.c +++ /dev/null @@ -1,241 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wav.c: Wav file loader. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#include "../wolfiphone.h" - - -PRIVATE W8 *iff_pdata; -PRIVATE W8 *iff_end; -PRIVATE W8 *iff_last_chunk; -PRIVATE W8 *iff_data; -PRIVATE int iff_chunk_len; - - - -PRIVATE short Wav_GetLittleShort( void ) -{ - short val = 0; - - val = *iff_pdata; - val += (*(iff_pdata + 1) << 8); - - iff_pdata += 2; - - return val; -} - - -PRIVATE int Wav_GetLittleLong( void ) -{ - int val = 0; - - val = *iff_pdata; - val += (*(iff_pdata + 1) << 8); - val += (*(iff_pdata + 2) << 16); - val += (*(iff_pdata + 3) << 24); - - iff_pdata += 4; - - return val; -} - - -PRIVATE void Wav_FindNextChunk( const char *name ) -{ - while( 1 ) - { - iff_pdata = iff_last_chunk; - - if( iff_pdata >= iff_end ) - { - // Didn't find the chunk - iff_pdata = NULL; - return; - } - - iff_pdata += 4; - iff_chunk_len = Wav_GetLittleLong(); - if( iff_chunk_len < 0 ) - { - iff_pdata = NULL; - return; - } - - iff_pdata -= 8; - iff_last_chunk = iff_pdata + 8 + ((iff_chunk_len + 1) & ~1); - if( ! my_strnicmp((const char *)iff_pdata, name, 4) ) - { - return; - } - } -} - - -PRIVATE void Wav_FindChunk( const char *name ) -{ - iff_last_chunk = iff_data; - - Wav_FindNextChunk( name ); -} - -PRIVATE void DumpChunks( void ) -{ - char str[ 5 ]; - - str[ 4 ] = 0; - iff_pdata = iff_data; - do - { - memcpy( str, iff_pdata, 4 ); - iff_pdata += 4; - iff_chunk_len = Wav_GetLittleLong(); - Com_Printf( "0x%x : %s (%d)\n", (int)(iff_pdata - 4), str, iff_chunk_len ); - iff_pdata += (iff_chunk_len + 1) & ~1; - - } while( iff_pdata < iff_end ); - -} - - -/* ------------------------------------------------------------------------------ - Function: LoadWavInfo -Load wav file. - - Parameters: filename -[in] Name of wav file to load. - wav -[out] wav data. - info -[out] wav sound info. - - Returns: True if file loaded, otherwise false. - - Notes: Caller is responsible for freeing wav data by calling Z_Free. - ------------------------------------------------------------------------------ -*/ -PUBLIC _boolean LoadWavInfo( const char *filename, W8 **wav, soundInfo_t *info ) -{ - filehandle_t *hFile; - W8 *data; - W32 wavlength; - - hFile = FS_OpenFile( filename, 0 ); - if( ! hFile ) - { - return false; - } - - data = (PW8)FS_GetLoadedFilePointer( hFile, SEEK_SET ); - wavlength = FS_GetFileSize( hFile ); - - iff_data = data; - iff_end = data + wavlength; - - // look for RIFF signature - Wav_FindChunk( "RIFF" ); - if( ! (iff_pdata && ! my_strnicmp( (const char *)iff_pdata + 8, "WAVE", 4 ) ) ) - { - Com_DPrintf( "[LoadWavInfo]: Missing RIFF/WAVE chunks (%s)\n", filename ); - FS_CloseFile( hFile ); - - return false; - } - - // Get "fmt " chunk - iff_data = iff_pdata + 12; - - Wav_FindChunk( "fmt " ); - if( ! iff_pdata ) - { - Com_DPrintf( "[LoadWavInfo]: Missing fmt chunk (%s)\n", filename ); - FS_CloseFile( hFile ); - - return false; - } - - iff_pdata += 8; - - if( Wav_GetLittleShort() != 1 ) - { - Com_DPrintf( "[LoadWavInfo]: Microsoft PCM format only (%s)\n", filename ); - FS_CloseFile( hFile ); - - return false; - } - - info->channels = Wav_GetLittleShort(); - info->sample_rate = Wav_GetLittleLong(); - - iff_pdata += 4; - - info->sample_size = Wav_GetLittleShort(); // Bytes Per Sample - - if (info->sample_size != 1 && info->sample_size != 2) - { - Com_DPrintf( "[LoadWavInfo]: only 8 and 16 bit WAV files supported (%s)\n", filename ); - FS_CloseFile( hFile ); - - return false; - } - - iff_pdata += 2; - - - // Find data chunk - Wav_FindChunk( "data" ); - if( ! iff_pdata ) - { - Com_DPrintf( "[LoadWavInfo]: missing 'data' chunk (%s)\n", filename ); - FS_CloseFile( hFile ); - - return false; - } - - iff_pdata += 4; - info->samples = Wav_GetLittleLong() / info->sample_size; - - if( info->samples <= 0 ) - { - Com_DPrintf( "[LoadWavInfo]: file with 0 samples (%s)\n", filename ); - FS_CloseFile( hFile ); - - return false; - } - - // Load the data - *wav = Z_Malloc( info->samples * info->sample_size ); - memcpy( *wav, data + (iff_pdata - data), info->samples * info->sample_size ); - - FS_CloseFile( hFile ); - - return true; -} - diff --git a/wolf3d/newCode/env/wavfile.h b/wolf3d/newCode/env/wavfile.h deleted file mode 100644 index c06ec21..0000000 --- a/wolf3d/newCode/env/wavfile.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wav.h: Wav file loader. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#ifndef __WAV_H__ -#define __WAV_H__ - - -// Structure used to describe a sound. -typedef struct -{ - W32 sample_rate; // Sample rate in Hz - W32 channels; // Number of Channels (0x01 = Mono, 0x02 = Stereo) - W32 sample_size; // Bytes per sample - // 1 = 8 bit Mono - // 2 = 8 bit Stereo or 16 bit Mono - // 4 = 16 bit Stereo - W32 samples; - -} soundInfo_t; - - -extern _boolean LoadWavInfo( const char *filename, W8 **wav, soundInfo_t *info ); - -#endif /* __WAV_H__ */ diff --git a/wolf3d/newCode/env/zmem.c b/wolf3d/newCode/env/zmem.c deleted file mode 100644 index 872d594..0000000 --- a/wolf3d/newCode/env/zmem.c +++ /dev/null @@ -1,191 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * zmem.c: Zone memory management. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -/* - Notes: - - Add the following line in your initization function: - z_chain.next = z_chain.prev = &z_chain; - -*/ - -#include "../wolfiphone.h" - - -// just cleared malloc with counters now... - - -#define Z_MAGIC 0x1d1d - - -PRIVATE int z_count, z_bytes; - -zhead_t z_chain; - - - -/* ------------------------------------------------------------------------------ - Function: Z_Free -Deallocates or frees a zone memory block. - - Parameters: memblock -[in] Previously allocated zone memory block to be freed. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void Z_Free( void *memblock ) -{ - zhead_t *z; - - z = ( (zhead_t *)memblock ) - 1; - - if( z->magic != Z_MAGIC ) - { - Com_Error( ERR_FATAL, "Z_Free: bad magic" ); - } - - z->prev->next = z->next; - z->next->prev = z->prev; - - z_count--; - z_bytes -= z->size; - - MM_FREE( z ); -} - -/* ------------------------------------------------------------------------------ - Function: Z_Stats_f -Console function to list zone memory usage. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: Lists number of bytes and blocks of zone memory allocated. ------------------------------------------------------------------------------ -*/ -PUBLIC void Z_Stats_f( void ) -{ - Com_Printf( "%i bytes in %i blocks\n", z_bytes, z_count ); -} - - -/* ------------------------------------------------------------------------------ - Function: Z_FreeTags -Free allocated zone memory blocks based on tag. - - Parameters: tag -[in] Tag of zone memory blocks to free (see header for tag). - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void Z_FreeTags( int tag ) -{ - zhead_t *z, *next; - - for( z = z_chain.next; z != &z_chain; z = next ) - { - next = z->next; - if( z->tag == tag ) - { - Z_Free( (void *)(z+1) ); - } - } -} - -/* ------------------------------------------------------------------------------ - Function: Z_TagMalloc -Allocates zone memory blocks. - - Parameters: - size -[in] Bytes to allocate. - tag -[in] Tag to associate with memory (see header for tag). - - Returns: - A void pointer to the allocated space, or will shutdown application - if there is insufficient memory available. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void *Z_TagMalloc( size_t size, int tag ) -{ - zhead_t *z; - - // Allocate memory - size += sizeof( zhead_t ); - z = MM_MALLOC( size ); - - - if( ! z ) - { - Com_Error( ERR_FATAL, "Z_Malloc: failed on allocation of %i bytes", size ); - } - - // Set memory block to zero and fill in header. - memset( z, 0, size ); - z_count++; - z_bytes += size; - z->magic = Z_MAGIC; - z->tag = tag; - z->size = size; - - // Add new memory block to chain. - z->next = z_chain.next; - z->prev = &z_chain; - z_chain.next->prev = z; - z_chain.next = z; - - return (void *)(z+1); -} - -/* ------------------------------------------------------------------------------ - Function: Z_Malloc -Allocates zone memory blocks. - - Parameters: size -[in] Bytes to allocate. - - Returns: - A void pointer to the allocated space, or will shutdown application - if there is insufficient memory available. - - Notes: Calls Z_TagMalloc() with tag set to zero. ------------------------------------------------------------------------------ -*/ -PUBLIC void *Z_Malloc( size_t size ) -{ - return Z_TagMalloc( size, 0 ); -} diff --git a/wolf3d/newCode/env/zmem.h b/wolf3d/newCode/env/zmem.h deleted file mode 100644 index 855fc89..0000000 --- a/wolf3d/newCode/env/zmem.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * zmem.h: Zone memory management. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -/* - Notes: - This module is implemented by zmem.c - -*/ - -#ifndef __ZMEM_H__ -#define __ZMEM_H__ - -#include - -// memory tags to allow dynamic memory to be cleaned up -#define TAG_GAME 765 /* clear when unloading the dll */ -#define TAG_LEVEL 766 /* clear when loading a new level */ -#define TAG_LEVEL_SCP 767 /* clear when unloading level script */ - - - -typedef struct zhead_s -{ - struct zhead_s *prev, *next; - - short magic; - short tag; // for group free - int size; - -} zhead_t; - -extern zhead_t z_chain; - - -// Returns 0 filled memory block -extern void *Z_Malloc( size_t size ); - -extern void *Z_TagMalloc( size_t size, int tag ); -extern void Z_Free( void *memblock ); -extern void Z_FreeTags( int tag ); - -extern void Z_Stats_f( void ); - - -#endif /* __ZMEM_H__ */ diff --git a/wolf3d/newCode/iphone/.DS_Store b/wolf3d/newCode/iphone/.DS_Store deleted file mode 100644 index 219174a..0000000 Binary files a/wolf3d/newCode/iphone/.DS_Store and /dev/null differ diff --git a/wolf3d/newCode/iphone/EAGLView.h b/wolf3d/newCode/iphone/EAGLView.h deleted file mode 100644 index 80e8881..0000000 --- a/wolf3d/newCode/iphone/EAGLView.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - - Copyright (C) 2009 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - */ - - -#import -#import -#import -#import - -/* -This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass. -The view content is basically an EAGL surface you render your OpenGL scene into. -Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel. -*/ -@interface EAGLView : UIView { -@public - UITextField *textField; - -@private - /* The pixel dimensions of the backbuffer */ - GLint backingWidth; - GLint backingHeight; - - EAGLContext *context; - - /* OpenGL names for the renderbuffer and framebuffers used to render to this view */ - GLuint viewRenderbuffer, viewFramebuffer; - - /* OpenGL name for the depth buffer that is attached to viewFramebuffer, if it exists (0 if it does not exist) */ - GLuint depthRenderbuffer; - - NSTimer *animationTimer; - NSTimeInterval animationInterval; - -} - -@property NSTimeInterval animationInterval; - -- (void)drawView; - -@end diff --git a/wolf3d/newCode/iphone/EAGLView.m b/wolf3d/newCode/iphone/EAGLView.m deleted file mode 100644 index 34a41f4..0000000 --- a/wolf3d/newCode/iphone/EAGLView.m +++ /dev/null @@ -1,293 +0,0 @@ -// -// EAGLView.m -// wolf3d -// -// Created by Cass Everitt on 2/20/09. -// Copyright Id Software 2009. All rights reserved. -// - - - -#import -#import - -#import "EAGLView.h" -#import "wolf3dAppDelegate.h" - -#include "wolfiphone.h" - -EAGLView *eaglview; - -// A class extension to declare private methods -@interface EAGLView () - -@property (nonatomic, retain) EAGLContext *context; -@property (nonatomic, assign) NSTimer *animationTimer; - -- (void) destroyFramebuffer; -- (void) swapBuffers; - -@end - - -@implementation EAGLView - -@synthesize context; -@synthesize animationTimer; -@synthesize animationInterval; - - -// You must implement this method -+ (Class)layerClass { - return [CAEAGLLayer class]; -} - - -//The GL view is stored in the nib file. When it's unarchived it's sent -initWithCoder: -- (id)initWithCoder:(NSCoder*)coder { - self = [super initWithCoder:coder]; - - eaglview = self; - - // Get the layer - CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer; - - eaglLayer.opaque = YES; - eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys: - - [NSNumber numberWithBool:NO], - kEAGLDrawablePropertyRetainedBacking, - - kEAGLColorFormatRGB565, - /* kEAGLColorFormatRGBA8, */ - kEAGLDrawablePropertyColorFormat, - - nil]; - - context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1]; - assert( context ); - - if ( ![EAGLContext setCurrentContext:context]) { - [self release]; - return nil; - } - self.multipleTouchEnabled = true; - - [EAGLContext setCurrentContext:context]; - - glGenFramebuffersOES(1, &viewFramebuffer); - glGenRenderbuffersOES(1, &viewRenderbuffer); - - glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer); - glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer); - [context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:(CAEAGLLayer*)self.layer]; - glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, viewRenderbuffer); - - glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth); - glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight); - - glGenRenderbuffersOES(1, &depthRenderbuffer); - glBindRenderbufferOES(GL_RENDERBUFFER_OES, depthRenderbuffer); - glRenderbufferStorageOES(GL_RENDERBUFFER_OES, GL_DEPTH_COMPONENT16_OES, backingWidth, backingHeight); - glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_DEPTH_ATTACHMENT_OES, GL_RENDERBUFFER_OES, depthRenderbuffer); - - if(glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES) != GL_FRAMEBUFFER_COMPLETE_OES) { - NSLog(@"failed to make complete framebuffer object %x", glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES)); - } - - self.animationTimer = [NSTimer scheduledTimerWithTimeInterval:0.032 - target:self - selector:@selector(drawView) - userInfo:nil repeats:YES]; - return self; -} - -- (void)drawView { - int start, end; - - [EAGLContext setCurrentContext:context]; - - glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer); - - [ (wolf3dAppDelegate *)[UIApplication sharedApplication].delegate restartAccelerometerIfNeeded]; - - start = Sys_Milliseconds(); - - extern void iphoneFrame(); - iphoneFrame(); - - end = Sys_Milliseconds(); -// Com_Printf( "msec: %i\n", end - start ); - - [self swapBuffers]; -} - -void GLimp_EndFrame() { - [eaglview swapBuffers]; -} - -- (void)swapBuffers { - glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer); - [context presentRenderbuffer:GL_RENDERBUFFER_OES]; -} - -- (void)layoutSubviews { - [self drawView]; -} - - - -- (void)destroyFramebuffer { - - glDeleteFramebuffersOES(1, &viewFramebuffer); - viewFramebuffer = 0; - glDeleteRenderbuffersOES(1, &viewRenderbuffer); - viewRenderbuffer = 0; - glDeleteRenderbuffersOES(1, &depthRenderbuffer); - depthRenderbuffer = 0; -} - - -- (void)dealloc { - if ([EAGLContext currentContext] == context) { - [EAGLContext setCurrentContext:nil]; - } - - [context release]; - [super dealloc]; -} - -void WolfensteinTouches( int numTouches, int touches[16] ); - -- (void) handleTouches:(NSSet*)touches withEvent:(UIEvent*)event { - int touchCount = 0; - int points[16]; - static int previousTouchCount; - - NSSet *t = [event allTouches]; - for (UITouch *myTouch in t) - { - CGPoint touchLocation = [myTouch locationInView:nil]; - - points[ 2 * touchCount + 0 ] = touchLocation.x; - points[ 2 * touchCount + 1 ] = touchLocation.y; // ( h - 1 ) - touchLocation.y; - - touchCount++; - - if (myTouch.phase == UITouchPhaseBegan) { - // new touch handler - } - if (myTouch.phase == UITouchPhaseMoved) { - // touch moved handler - } - if (myTouch.phase == UITouchPhaseEnded) { - touchCount--; - } - } - - // toggle the console with four touches - if ( touchCount == 4 && previousTouchCount != 4 ) { - if ( textField == nil ) { - void iphoneActivateConsole(); - textField = [UITextField alloc]; - [textField initWithFrame:CGRectMake( 0, 0, 20, 20 ) ]; - [self addSubview:textField]; - [textField release]; - textField.hidden = true; - textField.delegate = self; - textField.autocapitalizationType = UITextAutocapitalizationTypeNone; - textField.autocorrectionType = UITextAutocorrectionTypeNo; - [textField becomeFirstResponder]; - - iphoneActivateConsole(); - } else { - void iphoneDeactivateConsole(); - [textField resignFirstResponder]; - [textField removeFromSuperview]; - textField = nil; - - iphoneDeactivateConsole(); - } - } - previousTouchCount = touchCount; - - WolfensteinTouches( touchCount, points ); -} - - -- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event { - [self handleTouches:touches withEvent:event]; -} - -- (void) touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event { - [self handleTouches:touches withEvent:event]; -} - -- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { - [self handleTouches:touches withEvent:event]; -} - - -- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { - [self handleTouches:touches withEvent:event]; -} - - - -@end - - -@implementation EAGLView (UITextFieldDelegate) - -- (BOOL)textFieldShouldReturn:(UITextField *)_textField -{ - void iphoneExecuteCommandLine(); - iphoneExecuteCommandLine(); - return YES; -} - -@end - -const char * GetCurrentCommandLine() { - assert( eaglview->textField != nil ); - return [ eaglview->textField.text UTF8String ]; -} - -void SetCurrentCommandLine( const char * str) { - assert( eaglview->textField != nil ); - eaglview->textField.text = [ NSString stringWithUTF8String: str ]; -} - -void OpenURL( const char *url ) { - Com_Printf( "OpenURL char *: %s\n", url ); - - NSString *nss = [NSString stringWithCString: url encoding: NSASCIIStringEncoding]; - [[UIApplication sharedApplication] openURL:[NSURL URLWithString: nss]]; -} - - -void iPhoneLoadJPG( W8* jpegData, int jpegBytes, W8 **pic, W16 *width, W16 *height, W16 *bytes ) { - CFDataRef data; - int dataBytes = 0; - UIImage *img = [ UIImage imageWithData: [NSData dataWithBytes: (const char *)jpegData length: (NSUInteger)jpegBytes ] ]; - int imgBytes; - *width = img.size.width; - *height = img.size.height; - imgBytes = (int)(*width) * (int)(*height) * 4; - data = CGDataProviderCopyData( CGImageGetDataProvider( img.CGImage ) ); - dataBytes = CFDataGetLength( data ); - *bytes = 4; - if ( dataBytes > imgBytes ) { - *pic = NULL; - return; - } - *pic = (W8 *)malloc( imgBytes ); - CFDataGetBytes( data, CFRangeMake(0, dataBytes), *pic ); - // convert BGRA to RGBA - for ( imgBytes = 0; imgBytes < dataBytes; imgBytes+= 4 ) { - W8 tmp = pic[0][ imgBytes + 0 ]; - pic[0][ imgBytes + 0 ] = pic[0][ imgBytes + 2 ]; - pic[0][ imgBytes + 2 ] = tmp; - } -} - diff --git a/wolf3d/newCode/iphone/Info.plist b/wolf3d/newCode/iphone/Info.plist deleted file mode 100644 index 75d10f1..0000000 --- a/wolf3d/newCode/iphone/Info.plist +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - ${PRODUCT_NAME}_icon.png - CFBundleIdentifier - com.idsoftware.${PRODUCT_NAME:identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - NSMainNibFile - MainWindow - UIInterfaceOrientation - UIInterfaceOrientationLandscapeLeft - UIStatusBarHidden - - - diff --git a/wolf3d/newCode/iphone/MainWindow.xib b/wolf3d/newCode/iphone/MainWindow.xib deleted file mode 100644 index fc76dc5..0000000 --- a/wolf3d/newCode/iphone/MainWindow.xib +++ /dev/null @@ -1,223 +0,0 @@ - - - - 528 - 9E17 - 672 - 949.33 - 352.00 - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - IBFilesOwner - - - IBFirstResponder - - - - - 1316 - - YES - - - 1298 - {320, 480} - - - 3 - MQA - - 2 - - - NO - - - - {320, 480} - - - 1 - MSAxIDEAA - - NO - YES - - - - - YES - - - delegate - - - - 4 - - - - window - - - - 5 - - - - glView - - - - 9 - - - - - YES - - 0 - - YES - - - - - - 2 - - - YES - - - - - - -1 - - - RmlsZSdzIE93bmVyA - - - 3 - - - - - 8 - - - - - -2 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 2.IBAttributePlaceholdersKey - 2.IBEditorWindowLastContentRect - 2.IBPluginDependency - 3.CustomClassName - 3.IBPluginDependency - 8.CustomClassName - 8.IBPluginDependency - - - YES - UIApplication - UIResponder - - YES - - YES - - - YES - - - {{500, 343}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - wolf3dAppDelegate - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - EAGLView - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - YES - - - YES - - - - - YES - - YES - - - YES - - - - 9 - - - - YES - - EAGLView - UIView - - IBProjectSource - Classes/EAGLView.h - - - - wolf3dAppDelegate - NSObject - - YES - - YES - glView - window - - - YES - EAGLView - UIWindow - - - - IBProjectSource - Classes/wolf3dAppDelegate.h - - - - - 0 - wolf3d.xcodeproj - 3 - - diff --git a/wolf3d/newCode/iphone/default.png b/wolf3d/newCode/iphone/default.png deleted file mode 100644 index ed576c0..0000000 Binary files a/wolf3d/newCode/iphone/default.png and /dev/null differ diff --git a/wolf3d/newCode/iphone/dist.plist b/wolf3d/newCode/iphone/dist.plist deleted file mode 100644 index ce373e1..0000000 --- a/wolf3d/newCode/iphone/dist.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - get-task-allow - - - diff --git a/wolf3d/newCode/iphone/gles_glue.c b/wolf3d/newCode/iphone/gles_glue.c deleted file mode 100644 index 08ac8f7..0000000 --- a/wolf3d/newCode/iphone/gles_glue.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - - Copyright (C) 2009 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - */ - - -#include "wolfiphone.h" - -//int registration_sequence; - -#include "iphone_qgl.h" - - -#ifdef QGL_LOG_GL_CALLS -unsigned int QGLLogGLCalls = 1; -FILE *QGLDebugFile(void) { - return stdout; -} -#endif - -void QGLCheckError(const char *message) { - GLint err = qglGetError(); - if ( err != GL_NO_ERROR ) { - printf( "GL ERROR %d from %s\n", err, message ); - } -} - -unsigned int QGLBeginStarted = 0; - - - - -struct Vertex { - float xyz[3]; - float st[2]; - GLubyte c[4]; -}; - -#define MAX_VERTS 16384 - -typedef struct Vertex Vertex; -Vertex immediate[ MAX_VERTS ]; -Vertex vab; -short quad_indexes[MAX_VERTS * 3 / 2 ]; -int curr_vertex; -GLenum curr_prim; - -void InitImmediateModeGL() { - for ( int i = 0; i < MAX_VERTS * 3 / 2; i+=6 ) { - int q = i / 6 * 4; - quad_indexes[ i + 0 ] = q + 0; - quad_indexes[ i + 1 ] = q + 1; - quad_indexes[ i + 2 ] = q + 2; - - quad_indexes[ i + 3 ] = q + 0; - quad_indexes[ i + 4 ] = q + 2; - quad_indexes[ i + 5 ] = q + 3; - } - - qglVertexPointer( 3, GL_FLOAT, sizeof( Vertex ), immediate[ 0 ].xyz ); - qglTexCoordPointer( 2, GL_FLOAT, sizeof( Vertex ), immediate[ 0 ].st ); - qglColorPointer( 4, GL_UNSIGNED_BYTE, sizeof( Vertex ), immediate[ 0 ].c ); - qglEnableClientState( GL_VERTEX_ARRAY ); - qglEnableClientState( GL_TEXTURE_COORD_ARRAY ); - qglEnableClientState( GL_COLOR_ARRAY ); -} - -void pfglBegin( GLenum prim ) { - curr_vertex = 0; - curr_prim = prim; -} - -void pfglVertex3f( float x, float y, float z ) { - assert( curr_vertex < MAX_VERTS ); - vab.xyz[ 0 ] = x; - vab.xyz[ 1 ] = y; - vab.xyz[ 2 ] = z; - immediate[ curr_vertex ] = vab; - curr_vertex++; -} -void pfglVertex2i( GLint x, GLint y ) { - assert( curr_vertex < MAX_VERTS ); - vab.xyz[ 0 ] = (float)x; - vab.xyz[ 1 ] = (float)y; - vab.xyz[ 2 ] = 0.0f; - immediate[ curr_vertex ] = vab; - curr_vertex++; -} -void pfglColor4ub( GLubyte r, GLubyte g, GLubyte b, GLubyte a ) { - vab.c[ 0 ] = r; - vab.c[ 1 ] = g; - vab.c[ 2 ] = b; - vab.c[ 3 ] = a; -} -void pfglColor4f( GLfloat r, GLfloat g, GLfloat b, GLfloat a ) { - vab.c[ 0 ] = (GLubyte) ( r * 255 ); - vab.c[ 1 ] = (GLubyte) ( g * 255 ); - vab.c[ 2 ] = (GLubyte) ( b * 255 ); - vab.c[ 3 ] = (GLubyte) ( a * 255 ); -} -void pfglTexCoord2i( GLint s, GLint t ) { - vab.st[ 0 ] = (float)s; - vab.st[ 1 ] = (float)t; -} -void pfglTexCoord2f( GLfloat s, GLfloat t ) { - vab.st[ 0 ] = s; - vab.st[ 1 ] = t; -} - -void pfglEnd() { - if ( curr_prim == GL_QUADS ) { - qglDrawElements( GL_TRIANGLES, curr_vertex / 4 * 6, GL_UNSIGNED_SHORT, quad_indexes ); - } else { - qglDrawArrays( curr_prim, 0, curr_vertex ); - } - curr_vertex = 0; - curr_prim = 0; -} - diff --git a/wolf3d/newCode/iphone/gles_glue.h b/wolf3d/newCode/iphone/gles_glue.h deleted file mode 100644 index 6eca2a8..0000000 --- a/wolf3d/newCode/iphone/gles_glue.h +++ /dev/null @@ -1,77 +0,0 @@ - - -#ifndef __GLES_GLUE_H__ -#define __GLES_GLUE_H__ - -#include "iphone_qgl.h" - -typedef GLfloat GLdouble; - -#define pfglEnable qglEnable -#define pfglDisable qglDisable -#define pfglActiveTextureARB qglActiveTexture -#define pfglGenTextures qglGenTextures -#define pfglDeleteTextures qglDeleteTextures -#define pfglDepthRange qglDepthRangef -#define pfglDepthFunc qglDepthFunc -#define pfglCullFace qglCullFace -#define pfglColor3f(r,g,b) pfglColor4f(r,g,b,1.0f) -#define pfglColor3ubv(c) pfglColor4ub( (c)[0], (c)[1], (c)[2], 255 ) -#define pfglColor4ubv(c) pfglColor4ub( (c)[0], (c)[1], (c)[2], (c)[3] ) -#define pfglBlendFunc qglBlendFunc -#define pfglClearColor qglClearColor -#define pfglClear qglClear -#define pfglDrawBuffer(buffer) -#define pfglLineWidth qglLineWidth -#define pfglBindTexture qglBindTexture -#define pfglTexParameteri qglTexParameteri -#define pfglTexParameterf qglTexParameterf -#define pfglTexImage2D qglTexImage2D -#define pfglFrustum qglFrustumf -#define pfglOrtho qglOrthof -#define pfglLoadIdentity qglLoadIdentity -#define pfglMatrixMode qglMatrixMode -#define pfglShadeModel qglShadeModel -#define pfglRotatef qglRotatef -#define pfglTranslatef qglTranslatef -#define pfglReadPixels qglReadPixels -#define pfglAlphaFunc qglAlphaFunc -#define pfglViewport qglViewport -#define pfglTexEnvi qglTexEnvi -#define pfglClientActiveTextureARB qglClientActiveTexture - -#define pfglGetIntegerv qglGetIntegerv -#define pfglGetString qglGetString -#define pfglGetError qglGetError - - -#define GL_QUADS 888 - -/* -void GLimp_BeginFrame(); -void GLimp_EndFrame( void ); -_boolean GLimp_Init( void *hinstance, void *hWnd ); -void GLimp_Shutdown( void ); -int GLimp_SetMode( int *pwidth, int *pheight, int mode, _boolean fullscreen ); -void GLimp_AppActivate( _boolean active ); -*/ - -#ifdef __cplusplus -extern "C" { -#endif - -void pfglBegin( GLenum prim ); -void pfglVertex3f( float x, float y, float z ); -void pfglVertex2i( GLint x, GLint y ); -void pfglColor4ub( GLubyte r, GLubyte g, GLubyte b, GLubyte a ); -void pfglColor4f( GLfloat r, GLfloat g, GLfloat b, GLfloat a ); -void pfglTexCoord2i( GLint s, GLint t ); -void pfglTexCoord2f( GLfloat s, GLfloat t ); - -void pfglEnd(); - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file diff --git a/wolf3d/newCode/iphone/iphone_loop.c b/wolf3d/newCode/iphone/iphone_loop.c deleted file mode 100644 index a64902a..0000000 --- a/wolf3d/newCode/iphone/iphone_loop.c +++ /dev/null @@ -1,1025 +0,0 @@ -/* - remove wolf_render.c - for the iphone build, we only need the following lsfx files: - - 001 - 003 - 008 - 009 - 012 - 023 - 028 - 030 - 031 - 033 - 034 - 035 - 036 - 037 - 038 - 040 - 044 - 045 - 061 - 062 - 064 - 069 - 076 - 078 - 080 - 085 - 086 - - */ - -#include "../wolfiphone.h" - -currentMap_t currentMap; - -vec3_t vnull = { 0, 0, 0 }; - -int iphoneFrameNum; -int intermissionTriggerFrame; -int slowAIFrame; - -// console mode -int consoleActive; - -// the native iPhone code should set the following each frame: -int numTouches; -int touches[5][2]; // [0] = x, [1] = y in landscape mode, raster order with y = 0 at top -float tilt; // -1.0 to 1.0 -float tiltPitch; - -#define MAX_TILT_HISTORY 64 -float tiltHistory[MAX_TILT_HISTORY][4]; -int tiltHistoryNum; - -// so we can detect button releases -int numPrevTouches; -int prevTouches[5][2]; - - -// the layout drawing code sets these, which are then used -// by the touch processing -int fireButtonX, fireButtonY, fireButtonSize; -int moveAxisX, moveAxisY, moveAxisSize; -int turnAxisX, turnAxisY, turnAxisSize; - -texture_t *numberPics[10]; - -int damageflash; -int bonusFrameNum; -int attackDirTime[2]; - -/* - ================== - iphoneActivateConsole - - ================== - */ -void iphoneActivateConsole() { - extern float scr_conlines; - scr_conlines = 0.5f; - consoleActive = 1; -} - -/* - ================== - iphoneDeactivateConsole - - ================== - */ -void iphoneDeactivateConsole() { - extern float scr_conlines; - scr_conlines = 0.0f; - consoleActive = 0; -} - -/* - ================== - iphoneExecuteCommandLine - - ================== - */ -void iphoneExecuteCommandLine() { - const char * GetCurrentCommandLine(); - void SetCurrentCommandLine(const char *); - char buf[256]; - strcpy( buf, GetCurrentCommandLine() ); - - Cmd_ExecuteString( buf ); - SetCurrentCommandLine( "" ); -} - - - -/* - ================== - iphoneSavePrevTouches - - ================== - */ -void iphoneSavePrevTouches() { - numPrevTouches = numTouches; - memcpy( prevTouches, touches, sizeof( prevTouches ) ); -#if 0 - // display the touch locations - for ( int i = 0 ; i < numTouches ; i++ ) { - int w = 32; - iphoneDrawPic( touches[i][0] - w/2, touches[i][1] - w/2, w, w, "iphone/diractional_02.tga" ); - } -#endif -} - -/* - ================== - iphoneCenterText - - Returns the width in pixels - ================== - */ -extern font_t *myfonts[ 1 ]; -int iphoneCenterText( int x, int y, const char *str ) { - int l = strlen( str ); - int i; - font_t *myfont = myfonts[0]; - int scale; - int step = 10; - - scale = 16; - - x -= l * step / 2; - - R_Bind( myfont->texfont->texnum ); - pfglBegin( GL_QUADS ); - - for ( i = 0 ; i < l ; i++, x += step ) { - int row, col; - float frow, fcol; - int num = str[i]; - - if ( num == ' ' ) { - continue; - } - - row = (num >> 4) - 2; - col = num & 15; - - frow = row * myfont->hFrac; - fcol = col * myfont->wFrac; - - pfglTexCoord2f( fcol, frow ); - pfglVertex2i( x, y ); - - pfglTexCoord2f( fcol+myfont->wFrac, frow ); - pfglVertex2i( x+scale, y ); - - pfglTexCoord2f( fcol+myfont->wFrac, frow+myfont->hFrac ); - pfglVertex2i( x+scale, y+scale ); - - pfglTexCoord2f( fcol, frow+myfont->hFrac ); - pfglVertex2i( x, y+scale ); - } - - pfglEnd(); - - return l * step; -} - - -/* - ================== - TouchDown - - Checks all touches against a square - ================== - */ -int TouchDown( int x, int y, int w, int h ) { - int i; - for ( i = 0 ; i < numTouches ; i++ ) { - if ( touches[i][0] >= x && touches[i][1] >= y - && touches[i][0] < x + w && touches[i][1] < y + h ) { - return 1; - } - } - return 0; -} - -/* - ================== - TouchReleased - - Perform an action when released in the box. - If not down this frame, but down the previous frame, it is released - ================== - */ -int TouchReleased( int x, int y, int w, int h ) { - int i; - int downPrev = 0; - int downNow = 0; - - for ( i = 0 ; i < numPrevTouches ; i++ ) { - if ( prevTouches[i][0] >= x && prevTouches[i][1] >= y - && prevTouches[i][0] < x + w && prevTouches[i][1] < y + h ) { - downPrev = 1; - break; - } - } - - // see if not down this frame - for ( i = 0 ; i < numTouches ; i++ ) { - if ( touches[i][0] >= x && touches[i][1] >= y - && touches[i][0] < x + w && touches[i][1] < y + h ) { - downNow = 1; - break; - } - } - - if ( !downPrev ) { - if ( downNow ) { - Sound_StartLocalSound( "iphone/bdown_01.wav" ); - } - // wasn't down the previous frame - return 0; - } - - if ( downNow ) { - // still down - return 0; - } - - if ( numTouches != 0 ) { - // finger dragged off - Sound_StartLocalSound( "iphone/baborted_01.wav" ); - return 0; - } - - // released - Sound_StartLocalSound( "iphone/baction_01.wav" ); - return 1; -} - -/* - ================== - iphoneSet2D - - ================== - */ -void iphoneSet2D( void ) { - pfglViewport( 0,0, 480, 320 ); - pfglMatrixMode( GL_MODELVIEW ); - pfglLoadIdentity(); - pfglDisable( GL_DEPTH_TEST ); - pfglDisable( GL_CULL_FACE ); - pfglEnable( GL_BLEND ); - pfglBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); - pfglDisable( GL_ALPHA_TEST ); - pfglColor4f( 1,1,1,1 ); - - pfglMatrixMode( GL_PROJECTION ); - pfglLoadIdentity(); - pfglRotatef( 90, 0, 0, 1 ); - pfglOrtho( 0, 480, 320, 0, -99999, 99999 ); -} - - -/* - ================== - DeadBandAdjust - - Compresses the 0.0 - 1.0 range into deadband - 1.0 - ================== - */ -float DeadBandAdjust( float f, float deadBand ) { - if ( f < 0 ) { - return -DeadBandAdjust( -f, deadBand ); - } - if ( f > 1.0 ) { - return 1.0; - } - if ( f < deadBand ) { - return 0; - } - return (f-deadBand) / (1.0 - deadBand); -} - -/* -================== -AxisHit - -Returns a -1 to 1 range - -If activeFraction is less than 1.0, the range will clamp -to the limits before the edge of the box is hit. -================== -*/ -float AxisHit( int x, int y, int size, int isXaxis, float activeFraction ) { - int i; - - // allow the touches to go outside the indicated bounds with clamping - x -= size/2; - y -= size/2; - size *= 2; - activeFraction *= 0.5f; - - for ( i = 0 ; i < numTouches ; i++ ) { - if ( touches[i][0] >= x && touches[i][1] >= y - && touches[i][0] < x + size && touches[i][1] < y + size ) { - float f; - if ( isXaxis ) { - f = (float)( touches[i][0] - x ) / size * 2.0f - 1.0f; - } else { - f = (float)( touches[i][1] - y ) / size * 2.0f - 1.0f; - } - f /= activeFraction; - if ( f > 1.0f ) { - f = 1.0f; - } else if ( f < -1.0f ) { - f = -1.0f; - } - if ( f > -stickDeadBand->value && f < stickDeadBand->value ) { - f = 0; - } - return f; - } - } - return 0; -} - -void WolfensteinTouches( int _numTouches, int _touches[16] ) { - numTouches = _numTouches; - for ( int i = 0 ; i < numTouches ; i++ ) { - touches[i][0] = 480 - _touches[i*2+1]; - touches[i][1] = _touches[i*2+0]; - } -} - -void WolfensteinTilts( float *tilts ) { - int i; - int j; - int c; - float sum[3]; - static float prevTime; - - c = tiltAverages->value; - if ( c < 1 ) { - c = 1; - } else if ( c > MAX_TILT_HISTORY ) { - c = MAX_TILT_HISTORY; - } - - // acc[0] - [2] are accelerometer values, ax[3] is the timestamp - for ( i = 0 ; i < 3 ; i++ ) { - tiltHistory[tiltHistoryNum&(MAX_TILT_HISTORY-1)][i] = tilts[i]; - sum[i] = 0; - for ( j = 0 ; j < c ; j++ ) { - sum[i] += tiltHistory[(tiltHistoryNum-j)&(MAX_TILT_HISTORY-1)][i]; - } - sum[i] /= c; - } - // save the timestamp for analysis - tiltHistory[tiltHistoryNum&(MAX_TILT_HISTORY-1)][3] = tilts[3] - prevTime; - prevTime = tilts[3]; - tiltHistoryNum++; - - tilt = sum[1]; - tiltPitch = sum[0]; -// Com_Printf( "%4.2f %4.2f %4.2f\n", tilts[0], tilts[1], tilts[2] ); -} - -void ShowTilt() { - int i; - int axis = (int)showTilt->value; - colour4_t fillColor = { 255, 0, 0, 255 }; - colour4_t whiteColor = { 255, 255, 255, 255 }; - colour4_t nowColor = { 0, 255, 0, 255 }; - float x; - - if ( axis < 0 || axis > 2 ) { - return; - } - for ( i = 0 ; i < MAX_TILT_HISTORY ; i++ ) { - x = tiltHistory[(tiltHistoryNum-1-i)&(MAX_TILT_HISTORY-1)][axis] * ( 10 / 0.018168604 ); - if ( x < 0 ) { - R_Draw_Fill( 240 + x, i*4, -x, 4, fillColor ); - } else if ( x > 0 ) { - R_Draw_Fill( 240, i*4, x, 4, fillColor ); - } - } - x = tilt * ( 10 / 0.018168604 ); - if ( x < 0 ) { - R_Draw_Fill( 240 + x, i*4, -x, 4, nowColor ); - } else if ( x > 0 ) { - R_Draw_Fill( 240, i*4, x, 4, nowColor ); - } - R_Draw_Fill( 240, 0, 1, MAX_TILT_HISTORY*4, whiteColor ); -} - - -/* -================== -CreateIphoneUserCmd - -Build the movement, angles, and buttons for a frame of action: - -Player.position.angle -Player.cmd.buttons -Player.cmd.forwardMove -Player.cmd.sideMove -================== -*/ -PRIVATE void CreateIphoneUserCmd() -{ - float stickTurnValue; - float stickMoveValue; - - stickTurnValue = stickTurnBase->value + stickTurnScale->value * sensitivity->value; - stickMoveValue = stickMoveBase->value + stickMoveScale->value * sensitivity->value; - - usercmd_t *cmd = &Player.cmd; - memset( cmd, 0, sizeof( *cmd ) ); - - if ( TouchDown( fireButtonX, fireButtonY, fireButtonSize, fireButtonSize ) ) { - cmd->buttons |= BUTTON_ATTACK; - } - if ( tiltFire->value > 0 && tiltPitch < tiltFire->value ) { - cmd->buttons |= BUTTON_ATTACK; - } - - cmd->forwardmove = -stickMoveValue * AxisHit( moveAxisX, moveAxisY, moveAxisSize, 0, 0.8f ); - - if( controlScheme->value == 0 || controlScheme->value == 1 ) { - Player.position.angle += -stickTurnValue * AxisHit( moveAxisX, moveAxisY, moveAxisSize, 1, 0.8f ); - } else { - Player.position.angle += -stickTurnValue * AxisHit( turnAxisX, turnAxisY, turnAxisSize, 1, 0.8f ); - cmd->sidemove = stickMoveValue * AxisHit( moveAxisX, moveAxisY, moveAxisSize, 1, 0.8f ); - } - - // accelerometer tilting - cmd->sidemove += tiltMove->value * DeadBandAdjust( tilt, tiltDeadBand->value ); - Player.position.angle -= tiltTurn->value * DeadBandAdjust( tilt, tiltDeadBand->value ); - - // always use - if ( iphoneFrameNum & 1 ) { - cmd->buttons |= BUTTON_USE; - } -} - - -/* -================== -iphoneHighlightPicWhenTouched - -Draw transparent except when touched -================= -*/ -void iphoneHighlightPicWhenTouched( int x, int y, int w, int h, const char *pic ) { - if ( TouchDown( x, y, w, h ) ) { - pfglColor4f(1,1,1,1); - } else { - pfglColor4f(1,1,1,0.5); - } - R_Draw_StretchPic( x, y, w, h, pic ); - pfglColor4f(1,1,1,1); -} -int iphoneActivatePicWhenTouched( int x, int y, int w, int h, const char *pic ) { - iphoneHighlightPicWhenTouched( x, y, w, h, pic ); - return TouchReleased( x, y, w, h ); -} - - -/* -================== -iphoneDrawControls - - scheme 0: turnstick on left - scheme 1: turnstick on right - scheme 2: dualstick, move on left - scheme 3: dualstick, move on right -================= -*/ -static const int BUTTON_SIZE = 100; -void iphoneDrawControls( void ) { - int ss = (int)stickSize->value; - - switch ( (int)controlScheme->value ) { - case 0: - moveAxisX = 0; - moveAxisY = 320 - ss; - moveAxisSize = ss; - iphoneHighlightPicWhenTouched( moveAxisX, moveAxisY, moveAxisSize, moveAxisSize, "iphone/diractional_02.tga" ); - - fireButtonX = 480 - BUTTON_SIZE; - fireButtonY = 320 - BUTTON_SIZE; - fireButtonSize = BUTTON_SIZE; - break; - - case 1: - moveAxisX = 480 - ss; - moveAxisY = 320 - ss; - moveAxisSize = ss; - iphoneHighlightPicWhenTouched( moveAxisX, moveAxisY, moveAxisSize, moveAxisSize, "iphone/diractional_02.tga" ); - - fireButtonX = 0; - fireButtonY = 320 - BUTTON_SIZE; - fireButtonSize = BUTTON_SIZE; - break; - - case 2: - moveAxisX = 0; - moveAxisY = 320 - ss; - moveAxisSize = ss; - iphoneHighlightPicWhenTouched( moveAxisX, moveAxisY, moveAxisSize, moveAxisSize, "iphone/diractional_01.tga" ); - - turnAxisX = 480 - ss; - turnAxisY = 320 - ss; - turnAxisSize = ss; - iphoneHighlightPicWhenTouched( turnAxisX, turnAxisY, turnAxisSize, turnAxisSize, "iphone/diractional_03.tga" ); - - fireButtonX = 480-BUTTON_SIZE; - fireButtonY = 0; - fireButtonSize = BUTTON_SIZE; - break; - case 3: - moveAxisX = 480 - ss; - moveAxisY = 320 - ss; - moveAxisSize = ss; - iphoneHighlightPicWhenTouched( moveAxisX, moveAxisY, moveAxisSize, moveAxisSize, "iphone/diractional_01.tga" ); - - turnAxisX = 0; - turnAxisY = 320 - ss; - turnAxisSize = ss; - iphoneHighlightPicWhenTouched( turnAxisX, turnAxisY, turnAxisSize, turnAxisSize, "iphone/diractional_03.tga" ); - - fireButtonX = 480-BUTTON_SIZE; - fireButtonY = 0; - fireButtonSize = BUTTON_SIZE; - break; - } - - iphoneHighlightPicWhenTouched( fireButtonX, fireButtonY, fireButtonSize, fireButtonSize, "iphone/shoot.tga" ); -} - -/* - ================== - iphoneDrawWeapon - - ================== - */ -void iphoneDrawWeapon( void ) { - char name[ 32 ]; - texture_t *tex; - static int w = 200; - static int h = 200; - int x = (viddef.width - w ) >> 1; - int y = viddef.height - 80 - h; - int frame; - - if ( gunFrame->value ) { - // screenshots look better with the muzzle flash - frame = Player.weapon * 5 + gunFrame->value + SPR_KNIFEREADY; - } else { - frame = Player.weapon * 5 + Player.weaponframe + SPR_KNIFEREADY; - } - - my_snprintf( name, sizeof( name ), "%s/%d.tga", spritelocation, frame); - tex = TM_FindTexture( name, TT_Pic ); - - R_Bind( tex->texnum ); - - pfglBegin( GL_QUADS ); - - pfglTexCoord2f( 0.01f, 0.01f ); pfglVertex2i( x, y ); - pfglTexCoord2f( 0.99f, 0.01f ); pfglVertex2i( x + w, y ); - pfglTexCoord2f( 0.99f, 0.99f ); pfglVertex2i( x + w, y + h ); - pfglTexCoord2f( 0.01f, 0.99f ); pfglVertex2i( x, y + h ); - - pfglEnd(); -} - -/* - ================== - iphoneDrawNumber - - ================== - */ -void iphoneDrawNumber( int x, int y, int number, int charWidth, int charHeight ) { - texture_t *tex; - int i; - char string[ 20 ]; - W32 length; - float charStep = charWidth * 0.8; // trim off extra width - - if ( number < 0 ) { - number = 0; - } - my_snprintf( string, sizeof( string ), "%d", number ); - length = strlen( string ); - - x -= length * charStep / 2; - - for( i = 0 ; i < length ; i++ ) { - int digit = string[i] - '0'; - tex = numberPics[digit]; - R_Bind( tex->texnum ); - pfglBegin( GL_QUADS ); - - pfglTexCoord2f( 0, 0 ); pfglVertex2i( x, y ); - pfglTexCoord2f( 1, 0 ); pfglVertex2i( x+charWidth, y ); - pfglTexCoord2f( 1, 1 ); pfglVertex2i( x+charWidth, y+charHeight ); - pfglTexCoord2f( 0, 1 ); pfglVertex2i( x, y+charHeight ); - - pfglEnd(); - x += charStep; - } -} - -/* - ================== - iphoneDrawHUD - - ================== - */ -void iphoneDrawHUD( void ) { - int y; - - if( Player.items & ITEM_KEY_1 ) { - R_Draw_Pic( 0, 100, "iphone/GOLDKEYPIC.tga" ); - } - - if( Player.items & ITEM_KEY_2 ) { - R_Draw_Pic( 0, 130, "iphone/SILVERKEYPIC.tga" ); - } - - iphoneDrawNumber( 240, 304, Player.health, 16, 16 ); - if ( fireButtonY < 160 ) { - y = fireButtonY + fireButtonSize + 8; - } else { - y = fireButtonY - 8 - 48; - } - iphoneDrawNumber( fireButtonX + fireButtonSize/2, y, Player.ammo[AMMO_BULLETS], 48, 48 ); -} - -/* - ================== - iphoneDrawFace - - ================== - */ -void iphoneDrawFace( void ) { - int i; - int w = 64; - int h = 80; - int x = (viddef.width - w ) >> 1; - int y = viddef.height - h; - const char *pic; - static const char *mugshotnames[ 24 ] = - { - "iphone/newhead/FACE1APIC.tga", - "iphone/newhead/FACE1BPIC.tga", - "iphone/newhead/FACE1CPIC.tga", - - "iphone/newhead/FACE2APIC.tga", - "iphone/newhead/FACE2BPIC.tga", - "iphone/newhead/FACE2CPIC.tga", - - "iphone/newhead/FACE3APIC.tga", - "iphone/newhead/FACE3BPIC.tga", - "iphone/newhead/FACE3CPIC.tga", - - "iphone/newhead/FACE4APIC.tga", - "iphone/newhead/FACE4BPIC.tga", - "iphone/newhead/FACE4CPIC.tga", - - "iphone/newhead/FACE5APIC.tga", - "iphone/newhead/FACE5BPIC.tga", - "iphone/newhead/FACE5CPIC.tga", - - "iphone/newhead/FACE6APIC.tga", - "iphone/newhead/FACE6BPIC.tga", - "iphone/newhead/FACE6CPIC.tga", - - "iphone/newhead/FACE7APIC.tga", - "iphone/newhead/FACE7BPIC.tga", - "iphone/newhead/FACE7CPIC.tga", - - "iphone/newhead/FACE8APIC.tga" - }; - - static const char *godmugshotnames[] = - { - "iphone/newhead/GODMODEFACE0PIC.tga", - "iphone/newhead/GODMODEFACE1PIC.tga", - "iphone/newhead/GODMODEFACE2PIC.tga" - }; - - iphoneDrawPic( 240 - 64, 320 - 80, 128, 80, "iphone/status_hud.tga" ); - - Player.facecount += tics; - if ( Player.face_gotgun && Player.facecount > 0 ) { - // gotgun will set facecount to a negative number initially, go back - // to normal face with random look after expired. - Player.face_gotgun = false; - } - if( Player.facecount > US_RndT() ) - { - Player.face_gotgun = Player.face_ouch = false; - Player.faceframe = US_RndT() >> 6; - if( Player.faceframe == 3 ) - { - Player.faceframe = 0; - } - - Player.facecount = 0; - } - - if( Player.health ) - { - if( g_version->value == SPEAROFDESTINY && Player.flags & FL_GODMODE ) - { - pic = godmugshotnames[ Player.faceframe ]; - } - else if( Player.face_gotgun ) - { - pic = "iphone/newhead/GOTGATLINGPIC.tga"; - } - else - { - int h = Player.health; - if ( h > 100 ) { - h = 100; - } - if ( h < 0 ) { - h = 0; - } - pic = mugshotnames[ 3*((100-h)/16)+Player.faceframe ]; - } - } - else - { -#if 0 // forgot to convert the mutant face pic... - if( Player.LastAttacker && Player.LastAttacker->type == en_needle ) - { - pic = "iphone/MUTANTBJPIC.tga"; - } - else -#endif - { - pic = "iphone/newhead/FACE8APIC.tga"; - } - } - - R_Draw_StretchPic( x, y, w, h, pic ); - - // blend the right / left damage indicators on the side - for ( i = 0 ; i < 2 ; i++ ) { - float f; - if ( attackDirTime[i] == 0 ) { - continue; - } - f = iphoneFrameNum - attackDirTime[i]; - if ( f > 30 ) { - attackDirTime[i] = 0; - continue; - } - if ( f < 20 ) { - f = 1.0; - } else { - f = ( 30 - f ) * 0.1; - } - pfglColor4f( 1, 1, 1, f ); - if ( i == 0 ) { - iphoneDrawPic( 240 - 64, 320 - 80, 40, 80, "iphone/L_damage.tga" ); - } else { - iphoneDrawPic( 240 + 64 - 40, 320 - 80, 40, 80, "iphone/R_damage.tga" ); - } - pfglColor4f( 1, 1, 1, 1 ); - } -} - -/* - ================== - iphoneSetNotifyText - - Notify text is a single centered line for "got a key", "found a secret", etc - ================== - */ -char notifyText[128]; -int notifyFrameNum; -void iphoneSetNotifyText( const char *str, ... ) { - va_list argptr; - - va_start( argptr, str ); - (void)vsnprintf( notifyText, sizeof( notifyText )-1, str, argptr ); - va_end( argptr ); - - notifyFrameNum = iphoneFrameNum; -} - -void iphoneDrawNotifyText() { - if ( notifyFrameNum == 0 ) { - return; - } - // display for three seconds, then fade over 0.3 - float f = iphoneFrameNum - notifyFrameNum - 80; - if ( f < 0 ) { - f = 1.0; - } else { - f = 1.0 - f * 0.1f; - if ( f < 0 ) { - notifyFrameNum = 0; - return; - } - } - - pfglColor4f( 1, 1, 1, f ); - iphoneCenterText( 240, 20, notifyText ); - pfglColor4f( 1, 1, 1, 1 ); -} - -void iphoneStartBonusFlash() { - bonusFrameNum = iphoneFrameNum; -} - -void iphoneStartDamageFlash( int damage ) { - damageflash += damage; - if ( damageflash > 64 ) { - damageflash = 64; - } - if ( damageflash < 10 ) { - damageflash = 10; - } -} - -/* - ================== - iphoneSetAttackDirection - - +1 = attacked from the left - -1 = attacked from the right - ================== - */ -void iphoneSetAttackDirection( int dir ) { - if ( dir > 0 ) { - attackDirTime[0] = iphoneFrameNum; - } - if ( dir < 0 ) { - attackDirTime[1] = iphoneFrameNum; - } -} - - -/* -================== -iphoneFrame - -================== -*/ -void iphoneFrame() { - unsigned char blendColor[4]; - - int msec = 14; // fixed time - - iphoneFrameNum++; - - // check for delayed intermission trigger after boss kill - if ( intermissionTriggerFrame > 0 && iphoneFrameNum >= intermissionTriggerFrame ) { - iphoneStartIntermission( 0 ); - } - - // toggle / scroll down the console - Client_Screen_RunConsole(); - - - // fixed frame timing, assume we go 30hz - tics = 2; // wolf's global rate counter - - Sound_Update( vnull, vnull, vnull, vnull ); - - if ( consoleActive ) { - iphoneSet2D(); - - Client_Screen_DrawConsole(); - - iphoneSavePrevTouches(); - GLimp_EndFrame(); - return; - } - if ( menuState != IPM_GAME ) { - iphoneSet2D(); - - iphoneDrawMenus(); - - iphoneSavePrevTouches(); - GLimp_EndFrame(); - return; - } - - //------------------ - // normal gameplay - //------------------ - - if( Player.playstate != ex_dead ) - { - CreateIphoneUserCmd(); - Player.position.angle = NormalizeAngle( Player.position.angle ); - - PL_Process( &Player, r_world ); // Player processing - if ( !slowAI->value || --slowAIFrame < 0 ) { - // slowAIframe is for slow-motion screenshot capture - slowAIFrame += slowAI->value; - ProcessGuards(); - } - PushWall_Process(); - Door_ProcessDoors_e( &r_world->Doors, tics, msec ); - - levelstate.time += tics; - } - - // fill the floor and ceiling - R_Draw_Fill( 0, 0, viddef.width, viddef.height >> 1, r_world->ceilingColour ); - R_Draw_Fill( 0, viddef.height >> 1, viddef.width, viddef.height, r_world->floorColour ); - - // draw 3D world - R_SetGL3D( Player.position ); - R_RayCast( Player.position, r_world ); - R_DrawSprites(); - - // draw 2D overlays - iphoneSet2D(); - - // do a full screen blend for damage, death, and bonus pickup - if( Player.playstate == ex_dead ) { - static int deathFadeIntensity; - blendColor[0] = 255; - blendColor[1] = 0; - blendColor[2] = 0; - blendColor[3] = deathFadeIntensity; - deathFadeIntensity += 2; - if( deathFadeIntensity >= 240 ) { - deathFadeIntensity = 0; - PL_NewGame( &Player ); - iphoneStartMap( currentMap.episode, currentMap.map, currentMap.skill ); - } - } else { - iphoneDrawWeapon(); - if( damageflash ) { - blendColor[0] = 255; - blendColor[1] = 0; - blendColor[2] = 0; - blendColor[3] = damageflash >= 64 ? 255 : damageflash * 4; - - if( (damageflash -= 1) < 0 ) { - damageflash = 0; - } - } else if ( bonusFrameNum ) { - float f = ( iphoneFrameNum - bonusFrameNum ) * 0.1; - if ( f > 1.0 ) { - bonusFrameNum = 0; - } else { - blendColor[0] = 255; - blendColor[1] = 255; - blendColor[2] = 128; - blendColor[3] = ( 1.0 - f ) * 64; - } - } - } - if ( blendColor[3] != 0 && blends->value != 0 ) { - R_DrawBox( 0, 0, viddef.width, viddef.height, *(int *)blendColor ); - } - - iphoneDrawNotifyText(); - - iphoneDrawFace(); - - iphoneDrawControls(); - - iphoneDrawHUD(); - - // draw menu and map buttons - if ( controlScheme->value < 2 ) { - if ( iphoneActivatePicWhenTouched( 480-50, 0, 50, 50, "iphone/menu.tga" ) ) { - menuState = IPM_MAIN; - } - if ( iphoneActivatePicWhenTouched( 0, 0, 50, 50, "iphone/map.tga" ) ) { - iphoneOpenAutomap(); - } - } else { - if ( iphoneActivatePicWhenTouched( 0, 50, 50, 50, "iphone/menu.tga" ) ) { - menuState = IPM_MAIN; - } - if ( iphoneActivatePicWhenTouched( 0, 0, 50, 50, "iphone/map.tga" ) ) { - iphoneOpenAutomap(); - } - } - - Client_Screen_DrawConsole(); - - ShowTilt(); - - iphoneSavePrevTouches(); - - // do the swapbuffers - GLimp_EndFrame(); -} diff --git a/wolf3d/newCode/iphone/iphone_main.c b/wolf3d/newCode/iphone/iphone_main.c deleted file mode 100644 index bbcd626..0000000 --- a/wolf3d/newCode/iphone/iphone_main.c +++ /dev/null @@ -1,244 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * unix_main.c: UNIX interface to application. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * This code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#include "../wolfiphone.h" - - -cvar_t *controlScheme; -cvar_t *sensitivity; -cvar_t *stickSize; -cvar_t *stickTurnBase; -cvar_t *stickTurnScale; -cvar_t *stickMoveBase; -cvar_t *stickMoveScale; -cvar_t *stickDeadBand; -cvar_t *tiltTurn; -cvar_t *tiltMove; -cvar_t *tiltDeadBand; -cvar_t *tiltAverages; -cvar_t *tiltFire; -cvar_t *music; -cvar_t *showTilt; -cvar_t *cropSprites; -cvar_t *blends; -cvar_t *gunFrame; -cvar_t *slowAI; - -W32 sys_frame_time; - -void Sys_Error( const char *format, ... ) -{ - va_list argptr; - char string[ 1024 ]; - - va_start( argptr, format ); - (void)vsnprintf( string, sizeof( string ), format, argptr ); - va_end( argptr ); - - fprintf( stderr, "Error: %s\n", string ); - - _exit( 1 ); - -} - -void Sys_Quit (void) -{ - _exit( 0 ); -} - -void Sys_SendKeyEvents (void) -{ -} - -char *Sys_GetClipboardData( void ) -{ - return NULL; -} - -void Reset_f() { - memset( ¤tMap, 0, sizeof( currentMap ) ); - currentMap.skill = 1; - cvar_vars = NULL; // don't write any cvars to the config file - iphoneShutdown(); -} - -/* - ================== - iphoneStartup - - ================== - */ -void iphoneStartup() { - int i; - char *s; - int start = Sys_Milliseconds(); - - z_chain.next = z_chain.prev = &z_chain; - - InitImmediateModeGL(); - - // Prepare enough of the subsystems to handle - // cvar and command buffer management. - COM_InitArgv( 0, NULL ); // FIXME: get args... - - Cmd_Init(); - Cvar_Init(); - Con_Init(); - FS_InitFilesystem(); - - // We need to add the early commands twice, because - // a basedir or cddir needs to be set before execing - // config files, but we want other parms to override - // the settings of the config files. - Cbuf_AddEarlyCommands( false ); - Cbuf_Execute(); - - R_Init(); - - Cmd_AddCommand( "reset", Reset_f ); - - developer = Cvar_Get( "developer", "0", CVAR_INIT ); - logfile_active = Cvar_Get( "logfile", "0", CVAR_INIT ); - - s = va( "%s %s %s %s %s %s", APP_VERSION, RELEASENAME, CPUSTRING, __DATE__, __TIME__, BUILDSTRING ); - Cvar_Get( "version", s, CVAR_SERVERINFO | CVAR_NOSET ); - - Con_Init(); - - Sound_Init(); - - Game_Init(); // game and player init - - Cbuf_AddText( "exec config.cfg\n" ); - Cbuf_AddEarlyCommands( true ); - Cbuf_Execute(); - - // add + commands from command line - Cbuf_AddLateCommands(); - Cbuf_Execute(); - - for ( i = 0 ; i < 10 ; i++ ) { - char name[64]; - sprintf( name, "iphone/font/%i.tga", i ); - numberPics[i] = TM_FindTexture( name, TT_Pic ); - } - - Com_Printf( "\n====== Application Initialized ======\n\n" ); - - Sound_Activate( true ); - consoleActive = 0; - - controlScheme = Cvar_Get( "controlScheme", "0", CVAR_ARCHIVE ); - sensitivity = Cvar_Get( "sensitivity", "0.3", CVAR_ARCHIVE ); - - stickSize = Cvar_Get( "stickSize", "120", CVAR_ARCHIVE ); - stickTurnBase = Cvar_Get( "stickTurnBase", "300", CVAR_ARCHIVE ); - stickTurnScale = Cvar_Get( "stickTurnScale", "500", CVAR_ARCHIVE ); - stickMoveBase = Cvar_Get( "stickMoveBase", "3000", CVAR_ARCHIVE ); - stickMoveScale = Cvar_Get( "stickMoveScale", "5000", CVAR_ARCHIVE ); - stickDeadBand = Cvar_Get( "stickDeadBand", "0.2", CVAR_ARCHIVE ); - tiltTurn = Cvar_Get( "tiltTurn", "0", CVAR_ARCHIVE ); - tiltMove = Cvar_Get( "tiltMove", "0", CVAR_ARCHIVE ); - tiltFire = Cvar_Get( "tiltFire", "0", CVAR_ARCHIVE ); - music = Cvar_Get( "music", "1", CVAR_ARCHIVE ); - tiltDeadBand = Cvar_Get( "tiltDeadBand", "0.08", CVAR_ARCHIVE ); - tiltAverages = Cvar_Get( "tiltAverages", "3", CVAR_ARCHIVE ); - cropSprites = Cvar_Get( "cropSprites", "1", 0 ); - showTilt = Cvar_Get( "showTilt", "-1", 0 ); - blends = Cvar_Get( "blends", "1", 0 ); - gunFrame = Cvar_Get( "gunFrame", "0", 0 ); - slowAI = Cvar_Get( "slowAI", "0", 0 ); - - // these should get overwritten by LoadTheGame - currentMap.skill = 1; - currentMap.episode = 0; - - if ( !LoadTheGame() ) { - memset( currentMap.mapFlags, 0,sizeof( currentMap.mapFlags ) ); - PL_NewGame( &Player ); - iphoneStartMap( 0, 0, 1 ); - } - - // always start at main menu - menuState = IPM_MAIN; - - Com_Printf( "startup time: %i msec\n", Sys_Milliseconds() - start ); -} - -/* - ================== - iphoneWriteConfig - - ================== - */ -void iphoneWriteConfig( void ) { - FILE *fp; - char path[ MAX_OSPATH]; - cvar_t *var; - char buffer[1024]; - - my_snprintf( path, sizeof( path ), "%s/config.cfg", iphoneDocDirectory ); - fp = fopen( path, "w" ); - if( ! fp ) { - Com_Printf( "Could not write config.cfg.\n" ); - return; - } - - // write out commands to set the archived cvars - for( var = cvar_vars ; var ; var = var->next ) { - if( var->flags & CVAR_ARCHIVE ) { - my_snprintf( buffer, sizeof( buffer ), "set %s \"%s\"\n", var->name, var->string ); - fprintf( fp, "%s", buffer ); - Com_Printf( "%s", buffer ); - } - } - - fclose( fp ); -} - - -/* - ================== - iphoneShutdown - - Save the game at this position - ================== - */ -void iphoneShutdown() { - Sound_StopAllSounds(); - Sound_StopBGTrack(); - iphoneWriteConfig(); - SaveTheGame(); - exit( 0 ); -} - diff --git a/wolf3d/newCode/iphone/iphone_menus.c b/wolf3d/newCode/iphone/iphone_menus.c deleted file mode 100644 index 91ba1d6..0000000 --- a/wolf3d/newCode/iphone/iphone_menus.c +++ /dev/null @@ -1,1061 +0,0 @@ -/* - - Copyright (C) 2009 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - */ - -#include "../wolfiphone.h" - -int intermissionStartFrameNum; -int hasReleased; - -menuState_t menuState; -colour4_t highlightColor = { 128, 128, 128, 255 }; -colour4_t colorPressed = { 128, 128, 0, 255 }; - -/* - ================== - iphoneDrawPic - - ================== - */ -void iphoneDrawPic( int x, int y, int w, int h, const char *pic ) { - R_Draw_StretchPic( x, y, w, h, pic ); -} - -/* - ================== - iphoneDrawPicWithTouch - - ================== - */ -int iphoneDrawPicWithTouch( int x, int y, int w, int h, const char *pic ) { - int r = TouchReleased( x, y, w, h ); - - if ( r ) { - // make sure it is full intensity if it is touch-released, even if - // it wasn't active previously - pfglColor3f( 1, 1, 1 ); - } - R_Draw_StretchPic( x, y, w, h, pic ); - if ( TouchDown( x, y, w, h ) ) { - colour4_t color = { 255, 255, 255, 64 }; - R_Draw_Blend( x, y, w, h, color ); - } - return r; -} - - - -/* - ================== - iphoneSlider - - ================== - */ -void iphoneSlider( int x, int y, int w, int h, const char *title, cvar_t *cvar, - float min, float max ) { - float value = cvar->value; - char str[80]; - float f = ( value - min ) / ( max - min ); - colour4_t backColor = { 32, 32, 80, 255 }; - colour4_t highlightColor = { 64, 64, 160, 255 }; - - if ( f < 0 ) { - f = 0; - } - if ( f > 1 ) { - f = 1; - } - - // draw the background - R_Draw_Fill( x, y, w, h, backColor ); - - // draw the current range - R_Draw_Fill( x+2, y+2, f*(w-4), h-4, highlightColor ); - - // draw the title and fraction - sprintf( str, "%s : %i%%", title, (int)(f*100) ); - iphoneCenterText( x+ w/2, y+h/2-8, str ); - - // check for touches - if ( numTouches > 0 && touches[0][0] >= x && touches[0][0] < x + w - && touches[0][1] >= y && touches[0][1] < y+ h ) { - float newValue; - float delta; - - f = (float)( touches[0][0] - x ) / w; - // round to tenths - f = (int)( ( f + 0.05 ) * 10 ) * 0.1f; - if ( f < 0 ) { - f = 0; - } - if ( f > 1.0 ) { - f = 1.0; - } - - newValue = min + f * ( max - min ); - delta = fabs( newValue - cvar->value ); - if ( f == 0 && cvar->value == 0 ) { - // special case of disable-at-0 - } else if ( delta > 0.01 ) { - Cvar_SetValue( cvar->name, newValue ); - Sound_StartLocalSound( "iphone/slide_01.wav" ); - } - } - -} - -/* - ================== - BackButton - - ================== - */ -int BackButton() { - if ( iphoneDrawPicWithTouch( 0, 0, 64, 32, "iphone/button_back.tga" ) ) { - return 1; - } - return 0; -} - -void GetMoreLevels( int x, int y ) { - if ( iphoneDrawPicWithTouch( x, y, 128, 64, "iphone/button_levels.tga" ) ) { - // directly to the app store for more levels - OpenURL( "http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=304694876" ); - } -} - - -/* - ================== - SaveTheGame - - ================== - */ -extern W8 areaconnect[ NUMAREAS ][ NUMAREAS ]; -extern _boolean areabyplayer[ NUMAREAS ]; - -void SaveTheGame() { - FILE *f; - char path[1024]; - int version = SAVEGAME_VERSION; - int i; - - my_snprintf( path, sizeof( path ), "%s/savegame.bin", iphoneDocDirectory ); - f = fopen( path, "wb" ); - if( ! f ) { - Com_Printf( "Could not open savegame.bin.\n" ); - return; - } - - // turn the r_world->Doors.doors from pointers to indexes - // ok to be destructive, because we are quiting - for ( i = 0 ; i < r_world->Doors.doornum ; i++ ) { - int index = r_world->Doors.Doors[i] - &r_world->Doors.DoorMap[0][0]; - assert( index >= 0 && index < 4096 ); - r_world->Doors.Doors[i] = (void *)index; - } - - // this is only used for the mutant death face, so just - // clear it instead of fixing it up - Player.LastAttacker = NULL; - - currentMap.version = SAVEGAME_VERSION; - fwrite( ¤tMap, 1,sizeof(currentMap), f ); - fwrite( r_world, 1,sizeof(*r_world), f ); - fwrite( &LevelRatios, 1,sizeof(LevelRatios), f ); - fwrite( &levelstate, 1,sizeof(levelstate), f ); - fwrite( Guards, 1,sizeof(Guards), f ); - fwrite( areaconnect, 1,sizeof(areaconnect), f ); - fwrite( areabyplayer, 1,sizeof(areabyplayer), f ); - fwrite( &PWall, 1,sizeof(PWall), f ); - fwrite( &Player, 1,sizeof(Player), f ); - fwrite( &version, 1,sizeof(version), f ); - - fclose( f ); -} - -/* - ================== - LoadTheGame - - ================== - */ -int LoadTheGame() { - FILE *f; - char path[1024]; - int version; - int i; - int oldCompleted; - - my_snprintf( path, sizeof( path ), "%s/savegame.bin", iphoneDocDirectory ); - f = fopen( path, "rb" ); - if( ! f ) { - Com_Printf( "Could not open savegame.bin.\n" ); - return 0; - } - - fread( ¤tMap, 1,sizeof(currentMap) , f); - - if ( currentMap.version != SAVEGAME_VERSION ) { - Com_Printf( "Savegame header version mismatch: %i != %i\n", currentMap.version, SAVEGAME_VERSION ); - fclose( f ); - return 0; - } - - // do a normal map start - Cvar_SetValue( skill->name, currentMap.skill ); - PL_NewGame( &Player ); - - oldCompleted = currentMap.levelCompleted; - iphoneStartMap( currentMap.episode, currentMap.map, currentMap.skill ); - currentMap.levelCompleted = oldCompleted; - - // load modifiactions on top - r_world = Z_Malloc( sizeof( *r_world ) ); - fread( r_world, 1,sizeof(*r_world), f); - fread( &LevelRatios, 1,sizeof(LRstruct), f ); - fread( &levelstate, 1,sizeof(levelstate), f ); - fread( Guards, 1,sizeof(Guards), f ); - fread( areaconnect, 1,sizeof(areaconnect), f ); - fread( areabyplayer, 1,sizeof(areabyplayer), f ); - fread( &PWall, 1,sizeof(PWall), f ); - fread( &Player, 1,sizeof(Player), f ); - fread( &version, 1,sizeof(version), f ); - - fclose( f ); - - if ( version != SAVEGAME_VERSION ) { - Com_Printf( "Savegame trailer version mismatch: %i != %i\n", version, SAVEGAME_VERSION ); - return 0; - } - - // turn the r_world->Doors.doors back to pointers - for ( i = 0 ; i < r_world->Doors.doornum ; i++ ) { - int index = (int)r_world->Doors.Doors[i]; - assert( index >= 0 && index < 4096 ); - r_world->Doors.Doors[i] = &r_world->Doors.DoorMap[0][0] + index; - } - return 1; -} - - -/* - ================== - iphoneStartMap - - This does not reset the player, so call PL_NewGame( &Player ) if it is a new start. - ================== - */ -void iphoneStartMap( int episodeNum, int mapNum, int skillLevel ) { - char command[128]; - int levelNum = episodeNum*10+mapNum; - - Com_Printf( "iphoneStartMap( %i, %i, %i )\n", episodeNum, mapNum, skillLevel ); - - // get the sound playing - Sound_Update( vnull, vnull, vnull, vnull ); - - // clean up game feedback - damageflash = 0; - bonusFrameNum = 0; - attackDirTime[0] = 0; - attackDirTime[1] = 0; - - // note that this has been tried now - currentMap.mapFlags[currentMap.skill][levelNum] |= MF_TRIED; - - // start the game - currentMap.episode = episodeNum; - currentMap.map = mapNum; - currentMap.skill = skillLevel; - currentMap.levelCompleted = 0; - - Cvar_SetValue( skill->name, skillLevel ); - Cvar_SetValue( episode->name, episodeNum ); - sprintf( command, "w%i%i", currentMap.episode, currentMap.map ); - Client_PrepRefresh( command ); - - menuState = IPM_GAME; -} - -/* - ================== - iphoneMainMenu - - ================== - */ -void iphoneMainMenu() { - char str[80]; - float scale = 40 / 32.0; - - iphoneDrawPic( 480-256, 0, 256, 128, "iphone/wolf_logo.tga" ); -#ifdef EPISODE1 - iphoneDrawPic( -20, 0, 256, 64, "iphone/ep_1.tga" ); - GetMoreLevels( 0, 96 ); -#else - iphoneDrawPic( -20, 0, 256, 64, "iphone/ep_1_6.tga" ); -#endif - iphoneDrawPic( 0, 320 - 128, 128, 128, "iphone/id_logo.tga" ); - - if ( iphoneDrawPicWithTouch( 300 - 64*scale, 80, 128*scale, 64*scale, "iphone/button_resume.tga" ) ) { - // if the game was saved at the intermission screen, immediately - // bring it back up when it is loaded - if ( currentMap.levelCompleted ) { - iphoneStartIntermission( 0 ); - } else { - menuState = IPM_GAME; - } - } - sprintf( str, "E%iM%i", currentMap.episode+1, currentMap.map+1 ); - iphoneCenterText( 300, 80+34*scale, str ); - - if ( iphoneDrawPicWithTouch( 300 - 64*scale, 170, 128*scale, 32*scale, "iphone/button_control.tga" ) ) { - menuState = IPM_CONTROLS; - } - if ( iphoneDrawPicWithTouch( 300 - 64*scale, 220, 128*scale, 32*scale, "iphone/button_new.tga" ) ) { - menuState = IPM_SKILL; - } - if ( iphoneDrawPicWithTouch( 300 - 64*scale, 270, 128*scale, 32*scale, "iphone/button_web.tga" ) ) { - OpenURL( "http://www.idsoftware.com/wolfenstein3dclassic/" ); - } - -} - - -/* - ================== - iphoneControlMenu - - ================== - */ -void iphoneControlMenu() { - int i; - - if ( BackButton() ) { - menuState = IPM_MAIN; - } - - for ( i = 0 ; i < 4 ; i++ ) { - char str[128]; - int remap[4] = { 3,4,1,2}; // artist named them differently than intended... - sprintf( str, "iphone/layout_%i.tga", remap[i] ); - if ( i != controlScheme->value ) { - pfglColor3f( 0.5, 0.5, 0.5 ); - } - if ( iphoneDrawPicWithTouch( 120 * i, 40, 120, 120, str ) ) { - Cvar_SetValue( controlScheme->name, i ); - } - pfglColor3f( 1, 1, 1 ); - } - - iphoneSlider( 20, 170, 440, 40, "sensitivity", sensitivity, 0, 1 ); - - iphoneSlider( 20, 220, 440, 40, "tilt move speed", tiltMove, 5000, 30000 ); - if ( tiltMove->value == 5000 ) { - Cvar_SetValue( tiltMove->name, 0 ); - } - if ( tiltMove->value ) { - Cvar_SetValue( tiltTurn->name, 0 ); - } - iphoneSlider( 20, 270, 440, 40, "tilt turn speed", tiltTurn, 500, 3000 ); - if ( tiltTurn->value == 500 ) { - Cvar_SetValue( tiltTurn->name, 0 ); - } - if ( tiltTurn->value ) { - Cvar_SetValue( tiltMove->name, 0 ); - } - - //iphoneSlider( 20, 280, 440, 40, "tilt fire", tiltFire, 0, 1 ); - -} - -/* - ================== - iphoneSkillMenu - - ================== - */ -void iphoneSkillMenu() { - int s; - char str[64]; - - if ( BackButton() ) { - menuState = IPM_MAIN; - } - - // highlight the current skill selection - s = (int)skill->value; -// R_Draw_Fill( 80, 40+64*s, 320, 64, highlightColor ); - - for ( s = 0 ; s < 4 ; s++ ) { - my_snprintf( str, sizeof( str ), "iphone/button_skill%i.tga", s+1 ); - - if ( s != (int)skill->value ) { - pfglColor3f( 0.5, 0.5, 0.5 ); - } - if ( iphoneDrawPicWithTouch( 112, 40+64*s, 256, 64, str ) ) { - Cvar_SetValue( skill->name, s ); - menuState = IPM_EPISODE; - } - pfglColor3f( 1, 1, 1 ); - } -} - -/* - ================== - iphoneEpisodeMenu - - ================== - */ -void iphoneEpisodeMenu() { - int e; - char str[64]; -#ifdef EPISODE1 - int numE = 1; -#else - int numE = 6; -#endif - - if ( BackButton() ) { - menuState = IPM_SKILL; - } - - // 96 x 48 images - for ( e = 0 ; e < numE ; e++ ) { - my_snprintf( str, sizeof( str ), "iphone/button_ep%i.tga", e+1 ); - - if ( e != (int)episode->value ) { - pfglColor3f( 0.5, 0.5, 0.5 ); - } - if ( iphoneDrawPicWithTouch( 48, 32+48*e, 384, 48, str ) ) { - Cvar_SetValue( episode->name, e ); - menuState = IPM_MAPS; - } - pfglColor3f( 1, 1, 1 ); - } - -#ifdef EPISODE1 - // buy more episodes button - GetMoreLevels( 240 - 64, 200 ); -#endif -} - -/* - ================== - iphoneMapMenu - - ================== - */ -void iphoneMapMenu() { - int e, m, s; - char str[64]; - - if ( BackButton() ) { - menuState = IPM_EPISODE; - } - - // draw the level selection - e = episode->value; - if ( e < 0 ) { - e = 0; - } - if ( e > 5 ) { - e = 5; - } - s = skill->value; - if ( s < 0 ) { - s = 0; - } - if ( s > 3 ) { - s = 3; - } - - // draw the episode selection - my_snprintf( str, sizeof( str ), "iphone/button_ep%i.tga", e+1 ); - iphoneDrawPicWithTouch( 96, 0, 384, 48, str ); - - // draw the individual maps - for ( m = 0 ; m < 10 ; m++ ) { - int x; - int y; - colour4_t colorSecret = { 32, 32, 32, 255 }; - colour4_t colorNoTry = { 0, 0, 0, 255 }; - colour4_t colorTried = { 80, 80, 0, 255 }; - colour4_t colorCompleted = { 0, 80, 0, 255 }; - - if ( m == 9 ) { - sprintf( str, "SECRET" ); - x = 120; - y = 90 + 160; - } else if ( m == 8 ) { - sprintf( str, "BOSS" ); - x = 360; - y = 90 + 160; - } else { - sprintf( str, "LEVEL %i", m+1 ); - x = 60 + 120 * ( m % 4 ); - y = 90 + 80 * ( m / 4 ); - } - - unsigned char *color = colorNoTry; - // decide on the background color - int levelNum = e*10+m; - int ch = currentMap.mapFlags[s][levelNum]; - // bit1 = attempted - // bit2 = completed - // bit3 = 100% kills - // bit4 = 100% secrets - // bit5 = 100% treasure - if ( m == 9 && !( ch & MF_TRIED ) ) { - color = colorSecret; - } if ( ch & MF_COMPLETED ) { - color = colorCompleted; - } else if ( ch & MF_TRIED ) { - color = colorTried; - } else { - color = colorNoTry; - } - - // blink the level you are currently on - if ( ( iphoneFrameNum & 8 ) && levelNum == currentMap.map && e == currentMap.episode ) { - color = colorNoTry; - } - - // draw the level text and check for button hit - if ( TouchDown( x-46, y-9, 88, 32 ) ) { - color = colorPressed; - } - R_Draw_Fill( x-46, y-9, 88, 32, color ); - iphoneCenterText( x, y, str ); - - // draw awards - if ( ch & MF_KILLS ) { - iphoneDrawPic( x-46,y+23, 22, 22, "iphone/kills.tga" ); - } - if ( ch & MF_SECRETS ) { - iphoneDrawPic( x-24,y+23, 22, 22, "iphone/secrets.tga" ); - } - if ( ch & MF_TREASURE ) { - iphoneDrawPic( x-2,y+23, 22, 22, "iphone/treasure.tga" ); - } - if ( ch & MF_TIME ) { - iphoneDrawPic( x+20,y+23, 22, 22, "iphone/partime.tga" ); - } - - // don't let them go to the secret level unless they earned it - if ( m == 9 && !( ch & MF_TRIED ) ) { - continue; - } - - if ( TouchReleased( x - 46, y - 9, 88, 32 ) ) { - PL_NewGame( &Player ); - iphoneStartMap( e, m, s ); - } - } -} - -/* - ================== - iphoneStartIntermission - - The framesFromNow value allow boss death animations to be triggered - ================== - */ -void iphoneStartIntermission( int framesFromNow ) { - // this goes in the savegame if they save at the intermission point, - // which will cause it to come back up there on return - currentMap.levelCompleted = 1; - - // mark this level as having been completed for the level selection menu - int mapNum = currentMap.episode * 10 + currentMap.map; - - // note that this has been tried now - currentMap.mapFlags[currentMap.skill][mapNum] |= MF_COMPLETED; - - // mark the awards - if ( levelstate.time / 70.0f < levelstate.fpartime * 60 ) { // fpartime is in minutes, time is in tics - currentMap.mapFlags[currentMap.skill][mapNum] |= MF_TIME; - } - if( levelstate.killed_monsters == levelstate.total_monsters ) { - currentMap.mapFlags[currentMap.skill][mapNum] |= MF_KILLS; - } - if( levelstate.found_secrets == levelstate.total_secrets ) { - currentMap.mapFlags[currentMap.skill][mapNum] |= MF_SECRETS; - } - if( levelstate.found_treasure == levelstate.total_treasure ) { - currentMap.mapFlags[currentMap.skill][mapNum] |= MF_TREASURE; - } - - intermissionStartFrameNum = iphoneFrameNum; - - if ( framesFromNow ) { - intermissionTriggerFrame = iphoneFrameNum + framesFromNow; - return; - } - - intermissionTriggerFrame = 0; - menuState = IPM_INTERMISSION; - hasReleased = 0; // ensure touch up before skipping intermission -} - -/* - ================== - DrawDigit - - ================== - */ -void DrawDigit( int x, int y, int digit ) { - R_Bind( numberPics[digit]->texnum ); - pfglBegin( GL_QUADS ); - - pfglTexCoord2f( 0, 0 ); pfglVertex2i( x, y ); - pfglTexCoord2f( 1, 0 ); pfglVertex2i( x+32, y ); - pfglTexCoord2f( 1, 1 ); pfglVertex2i( x+32, y+32 ); - pfglTexCoord2f( 0, 1 ); pfglVertex2i( x, y+32 ); - - pfglEnd(); -} - -void DrawDoubleDigit( int x, int y, int number ) { - int step = 32; - if ( number >= 100 ) { - // cram three digits into the same space - DrawDigit( x-8, y, number / 100 ); - number %= 100; - x += 16; - step = 24; - } - if ( number >= 10 ) { - DrawDigit( x, y, number / 10 ); - number %= 10; - } - DrawDigit( x+step, y, number ); -} - -void DrawTime( int x, int y, int seconds ) { - int min = seconds / 60; - int sec = seconds % 60; - - DrawDoubleDigit( x, y, min ); -// DrawDoubleDigit( x+76, y, sec ); - // always print both digits of seconds, so 2:00 prints correctly - DrawDigit( x+76, y, sec / 10 ); - DrawDigit( x+76+32, y, sec % 10 ); -} - -void DrawRatio( int y, int got, int total, const char *bonusPic ) { - DrawDoubleDigit( 285, y, got ); - DrawDoubleDigit( 361, y, total ); - - // draw the award icon - if ( got == total ) { - iphoneDrawPic( 480 - 40, y, 32, 32, bonusPic ); - } -} - -/* - ================== - iphoneIntermission - - ================== - */ -void iphoneIntermission() { - int nextLevel = 0; - char str[128]; - - iphoneDrawPic( 0, 0, 480, 320, "iphone/intermission.tga" ); - - // episode - my_snprintf( str, sizeof( str ), "iphone/button_ep%i.tga", currentMap.episode+1 ); - iphoneDrawPic( 0, 0, 384, 48, str ); - - // level - iphoneDrawNumber( 430, 0, currentMap.map + 1, 48, 48 ); - - // par / time - DrawTime( 51, 63, levelstate.fpartime * 60 ); // fpartime is in minutes - DrawTime( 285, 63, levelstate.time / 70 ); // levelstate.time is in tics - if ( levelstate.time/70 <= levelstate.fpartime * 60 ) { - iphoneDrawPic( 480 - 40, 63, 32, 32, "iphone/partime.tga" ); - } - - // ratios - DrawRatio( 124, levelstate.killed_monsters, levelstate.total_monsters, "iphone/kills.tga" ); - DrawRatio( 189, levelstate.found_secrets, levelstate.total_secrets, "iphone/secrets.tga" ); - DrawRatio( 255, levelstate.found_treasure, levelstate.total_treasure, "iphone/treasure.tga" ); - - // require all touches off before the intermission can exit - if ( numTouches == 0 && hasReleased == 0 ) { - hasReleased = 1; - return; // don't let the TouchReleased immediately fire - } - if ( !hasReleased ) { - return; - } - - //---------------------- - // tap for next level - //---------------------- - if ( !TouchReleased( 0, 0, 480, 320 ) ) { - return; - } - - menuState = IPM_GAME; - - PL_NextLevel( &Player ); - - if( g_version->value == SPEAROFDESTINY ) { - } - else - { - int currentLevel = currentMap.episode * 10 + currentMap.map; - - if( Player.playstate == ex_secretlevel ) { - switch( currentLevel ) { - case 0: nextLevel = 9; break; - case 10: nextLevel = 19; break; - case 26: nextLevel = 29; break; - case 32: nextLevel = 39; break; - case 44: nextLevel = 49; break; - case 52: nextLevel = 59; break; - } - } else { - switch ( currentLevel ) { - case 8: - case 18: - case 28: - case 38: - case 48: - case 58: - // go back to the episode select screen - menuState = IPM_VICTORY; - Sound_StartBGTrack( "music/URAHERO.ogg", "music/URAHERO.ogg" ); - return; - case 9: nextLevel = 1; break; - case 19: nextLevel = 11; break; - case 29: nextLevel = 27; break; - case 39: nextLevel = 33; break; - case 49: nextLevel = 44; break; - case 59: nextLevel = 53; break; - default: nextLevel = currentLevel + 1; break; - } - } - } - - iphoneStartMap( (nextLevel/10), (nextLevel%10), skill->value ); -} - -/* - ================== - iphoneVictory - - ================== - */ -void iphoneVictory() { - iphoneDrawPic( 0, 0, 480, 320, "iphone/victory.tga" ); - if ( !TouchReleased( 0, 0, 480, 320 ) ) { - return; - } - menuState = IPM_EPISODE; -} - -/* - ================== - iphoneAutomap - - ================== - */ -float mapOrigin[2]; -float mapCenterY; -float mapScale; - -typedef struct { - W8 x, y; - short texnum; -} mapTile_t; -#define MAPTILE_SPRITE_FLAG 1024 -#define MAX_MAP_TILES 5000 // 4096 tiles + sprites -mapTile_t mapTiles[MAX_MAP_TILES]; -int numMapTiles; - -int MapTileSort( const void *a, const void *b ) { - return ((mapTile_t *)a)->texnum - ((mapTile_t *)b)->texnum; -} - -void iphoneOpenAutomap() { - mapTile_t *mt = mapTiles; - numMapTiles = 0; - int x, y; - int xx, yy; - W32 tx, ty, n; - sprite_t* sprt; - - mapOrigin[0] = Player.position.origin[0] / (float)TILEGLOBAL; - mapOrigin[1] = Player.position.origin[1] / (float)TILEGLOBAL; - mapScale = 10; - menuState = IPM_AUTOMAP; - - // identify all the tiles to fill in - for( x = 0 ; x < 64; ++x ) { - for( y = 0 ; y < 64; ++y ) { - if ( r_world->tilemap[ x ][ y ] & ( WALL_TILE | PUSHWALL_TILE ) ) { - int visible = 0; - // check all 8 surrounding tiles for visibility - for ( xx = -1 ; xx <= 1 ; xx++ ) { - if ( x + xx < 0 ) { - continue; - } - if ( x + xx > 63 ) { - continue; - } - for ( yy = -1 ; yy <= 1 ; yy++ ) { - if ( y + yy < 0 ) { - continue; - } - if ( y + yy > 63 ) { - continue; - } - if ( r_world->tileEverVisible[x+xx][y+yy] ) { - visible = 1; - break; - } - } - } - if ( !visible ) { - continue; - } - int tex = r_world->wall_tex_y[ x ][ y ]; - // special hack for the elevator switch tile, which is always - // facing east west for the switch, and north south for the railing - if ( tex == 40 && ( ( x>0 && r_world->tileEverVisible[x+1][y] ) - || ( x < 63 && r_world->tileEverVisible[x-1][y] ) ) ) { - tex = r_world->wall_tex_x[ x ][ y ]; - } - if ( tex < 0x6a ) { // skip pushwall destinations - assert( tex >= 0 && tex < 1000 ); - mt->x = x; - mt->y = y; - mt->texnum = tex; - if ( !wallTextures[mt->texnum] ) { - char name[1024]; - my_snprintf( name, sizeof( name ), "walls/%.3d.tga", mt->texnum ); - wallTextures[mt->texnum] = TM_FindTexture( name, TT_Wall ); - assert( wallTextures[mt->texnum] ); - } - mt++; - continue; - } - } - if ( !r_world->tileEverVisible[x][y] ) { - continue; - } - if( r_world->tilemap[ x ][ y ] & DOOR_TILE ) { - mt->x = x; - mt->y = y; - mt->texnum = r_world->Doors.DoorMap[ x ][ y ].texture; - if ( !wallTextures[ mt->texnum] ) { - char name[1024]; - my_snprintf( name, sizeof( name ), "walls/%.3d.tga", mt->texnum ); - wallTextures[mt->texnum] = TM_FindTexture( name, TT_Wall ); - assert( wallTextures[mt->texnum] ); - } - mt++; - continue; - } - // solid floor - mt->x = x; - mt->y = y; - mt->texnum = -1; - mt++; - } - } - - // add solid sprite objects - for( n = 0, sprt = Spr_Sprites; n < n_of_sprt; ++n, ++sprt ) { - if( sprt->flags & SPRT_REMOVE ) { - continue; - } - if ( sprt->tex[0] >= SPR_GRD_S_1 ) { - // don't draw enemies, only static sprites - continue; - } - - tx = sprt->tilex; - ty = sprt->tiley; - - if( tx > 63 ) { - continue; - } - if( ty > 63 ) { - continue; - } - if ( !r_world->tileEverVisible[tx][ty] ) { - continue; - } - mt->x = tx; - mt->y = ty; - mt->texnum = MAPTILE_SPRITE_FLAG | sprt->tex[0]; - mt++; - - if ( !spriteTextures[ sprt->tex[0] ] ) { - char name[1024]; - my_snprintf( name, sizeof( name ), "sprites/%.3d.tga", sprt->tex[0] ); - spriteTextures[sprt->tex[0]] = TM_FindTexture( name, TT_Sprite ); - } - - if ( mt == &mapTiles[MAX_MAP_TILES] ) { - break; // list is full, some items won't show (shouldn't happen) - } - } - - // sort the tiles to be drawn by texture - numMapTiles = mt - mapTiles; - - qsort( mapTiles, numMapTiles, sizeof( mapTiles[0] ), MapTileSort ); -} - -void iphoneAutomap() { - mapTile_t *mt; - float px, py; - float angle, c, s; - int texnum; - - // do touch ops before drawing for minimum latency - - // drag for scrolling - if ( numTouches == 1 ) { - if ( numPrevTouches == 1 ) { - mapOrigin[0] -= ( touches[0][0] - prevTouches[0][0] ) / mapScale; - mapOrigin[1] += ( touches[0][1] - prevTouches[0][1] ) / mapScale; - } - } - - // pinch for scaling - if ( numTouches == 2 ) { - if ( numPrevTouches == 2 ) { - float curDist = sqrt( - ( touches[0][0] - touches[1][0] ) * ( touches[0][0] - touches[1][0] ) + - ( touches[0][1] - touches[1][1] ) * ( touches[0][1] - touches[1][1] ) ); - float prevDist = sqrt( - ( prevTouches[0][0] - prevTouches[1][0] ) * ( prevTouches[0][0] - prevTouches[1][0] ) + - ( prevTouches[0][1] - prevTouches[1][1] ) * ( prevTouches[0][1] - prevTouches[1][1] ) ); - if ( prevDist == 0 ) { - prevDist = curDist; - } - mapScale *= curDist / prevDist; - if ( mapScale < 4 ) { - mapScale = 4; - } - if ( mapScale > 64 ) { - mapScale = 64; - } - } - - } - - // todo -- double tap for center on player - - - // set up matrix for drawing in tile units - pfglMatrixMode( GL_PROJECTION ); - pfglLoadIdentity(); - pfglRotatef( 90, 0, 0, 1 ); - pfglOrtho( mapOrigin[0]-240.0 / mapScale, mapOrigin[0]+240.0 / mapScale, - mapOrigin[1]-160.0 / mapScale, mapOrigin[1]+160.0 / mapScale, -99999, 99999 ); - - mt = mapTiles; - texnum = 99999; - for ( int i = 0 ; i < numMapTiles ; i++, mt++ ) { - if ( texnum != mt->texnum ) { - texnum = mt->texnum; - if ( i != 0 ) { - pfglEnd(); - } - if ( mt->texnum == -1 ) { - qglDisable( GL_TEXTURE_2D ); - pfglColor3f( r_world->floorColour[0]/255.0, r_world->floorColour[1]/255.0, r_world->floorColour[2]/255.0 ); - } else if ( mt->texnum & MAPTILE_SPRITE_FLAG ) { - qglEnable( GL_TEXTURE_2D ); - pfglColor3f( 1, 1, 1 ); - R_Bind( spriteTextures[mt->texnum&~MAPTILE_SPRITE_FLAG]->texnum ); - } else { - qglEnable( GL_TEXTURE_2D ); - pfglColor3f( 1, 1, 1 ); - R_Bind( wallTextures[mt->texnum]->texnum ); - } - pfglBegin( GL_QUADS ); - } - pfglTexCoord2f( 0, 1 ); - pfglVertex2i( mt->x, mt->y ); - pfglTexCoord2f( 1, 1 ); - pfglVertex2i( mt->x+1, mt->y ); - pfglTexCoord2f( 1, 0 ); - pfglVertex2i( mt->x+1, mt->y+1 ); - pfglTexCoord2f( 0, 0 ); - pfglVertex2i( mt->x, mt->y+1 ); - } - pfglEnd(); - - // draw the yellow player triangle - qglDisable( GL_TEXTURE_2D ); - if ( iphoneFrameNum & 8 ) { // blink it - pfglColor3f( 1, 1, 0 ); - } else { - pfglColor3f( 0.5, 0.5, 0 ); - } - angle = M_PI * Player.position.angle / (float)ANG_180; - c = cos( angle ); - s = sin( angle ); - px = Player.position.origin[0] / (float)TILEGLOBAL; - py = Player.position.origin[1] / (float)TILEGLOBAL; - pfglBegin( GL_TRIANGLES ); - pfglVertex3f( px + c * 0.5, py + s * 0.5, 0 ); - pfglVertex3f( px - c * 0.5 - s * 0.3, py - s * 0.5 + c * 0.3, 0 ); - pfglVertex3f( px - c * 0.5 + s * 0.3, py - s * 0.5 - c * 0.3, 0 ); - pfglEnd(); - - qglEnable( GL_TEXTURE_2D ); - pfglColor3f( 1, 1, 1 ); - - // back button for returning to game - pfglMatrixMode( GL_PROJECTION ); - pfglLoadIdentity(); - pfglRotatef( 90, 0, 0, 1 ); - pfglOrtho( 0, 480, 320, 0, -99999, 99999 ); - if ( BackButton() ) { - menuState = IPM_GAME; - } -} - -void iphoneDrawMenus() { - iphoneDrawPic( 0, 0, 480, 320, "iphone/background_1.tga" ); - - switch ( menuState ) { - case IPM_MAIN: iphoneMainMenu(); break; - case IPM_SKILL: iphoneSkillMenu(); break; - case IPM_EPISODE: iphoneEpisodeMenu(); break; - case IPM_MAPS: iphoneMapMenu(); break; - case IPM_CONTROLS: iphoneControlMenu(); break; - case IPM_INTERMISSION: iphoneIntermission(); break; - case IPM_VICTORY: iphoneVictory(); break; - case IPM_AUTOMAP: iphoneAutomap(); break; - } -} - - diff --git a/wolf3d/newCode/iphone/iphone_qgl.h b/wolf3d/newCode/iphone/iphone_qgl.h deleted file mode 100644 index 793ec74..0000000 --- a/wolf3d/newCode/iphone/iphone_qgl.h +++ /dev/null @@ -1,2392 +0,0 @@ -/**** This file is autogenerated. Run GenerateQGL.pl to update it ****/ - -#ifndef _IPHONE_QGL_H_ -#define _IPHONE_QGL_H_ - -#ifdef QGL_LOG_GL_CALLS -extern unsigned int QGLLogGLCalls; -#ifdef __cplusplus -extern "C" { -#endif - FILE *QGLDebugFile(void); -#ifdef __cplusplus -} -#endif -#endif - -#include "iphone_qgl_enumerants.h" - - -#ifdef __cplusplus -extern "C" { -#endif - void QGLCheckError(const char *message); -#ifdef __cplusplus -} -#endif -extern unsigned int QGLBeginStarted; - -// This has to be done to avoid infinite recursion between our glGetError wrapper and QGLCheckError() -static inline GLenum _glGetError(void) { - return glGetError(); -} - -// void glAlphaFunc (GLenum func, GLclampf ref); -static inline void qglAlphaFunc(GLenum func, GLclampf ref) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glAlphaFunc(func=%s, ref=%f)\n", StringFromGLEnumerant( func ), ref); -#endif - glAlphaFunc(func, ref); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glAlphaFunc"); -#endif -} - -// void glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -static inline void qglClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glClearColor(red=%f, green=%f, blue=%f, alpha=%f)\n", red, green, blue, alpha); -#endif - glClearColor(red, green, blue, alpha); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glClearColor"); -#endif -} - -// void glClearDepthf (GLclampf depth); -static inline void qglClearDepthf(GLclampf depth) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glClearDepthf(depth=%f)\n", depth); -#endif - glClearDepthf(depth); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glClearDepthf"); -#endif -} - -// void glClipPlanef (GLenum plane, const GLfloat *equation); -static inline void qglClipPlanef(GLenum plane, const GLfloat *equation) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glClipPlanef(plane=%s, equation=%p)\n", StringFromGLEnumerant( plane ), equation); -#endif - glClipPlanef(plane, equation); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glClipPlanef"); -#endif -} - -// void glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -// void glDepthRangef (GLclampf zNear, GLclampf zFar); -static inline void qglDepthRangef(GLclampf zNear, GLclampf zFar) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glDepthRangef(zNear=%f, zFar=%f)\n", zNear, zFar); -#endif - glDepthRangef(zNear, zFar); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glDepthRangef"); -#endif -} - -// void glFogf (GLenum pname, GLfloat param); -static inline void qglFogf(GLenum pname, GLfloat param) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glFogf(pname=%s, param=%f)\n", StringFromGLEnumerant( pname ), param); -#endif - glFogf(pname, param); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glFogf"); -#endif -} - -// void glFogfv (GLenum pname, const GLfloat *params); -static inline void qglFogfv(GLenum pname, const GLfloat *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glFogfv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params); -#endif - glFogfv(pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glFogfv"); -#endif -} - -// void glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); -static inline void qglFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glFrustumf(left=%f, right=%f, bottom=%f, top=%f, zNear=%f, zFar=%f)\n", left, right, bottom, top, zNear, zFar); -#endif - glFrustumf(left, right, bottom, top, zNear, zFar); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glFrustumf"); -#endif -} - -// void glGetClipPlanef (GLenum pname, GLfloat *equation); -static inline void qglGetClipPlanef(GLenum pname, GLfloat *equation) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetClipPlanef(pname=%s, equation=%p)\n", StringFromGLEnumerant( pname ), equation); -#endif - glGetClipPlanef(pname, equation); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetClipPlanef"); -#endif -} - -// void glGetFloatv (GLenum pname, GLfloat *params); -static inline void qglGetFloatv(GLenum pname, GLfloat *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetFloatv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params); -#endif - glGetFloatv(pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetFloatv"); -#endif -} - -// void glGetLightfv (GLenum light, GLenum pname, GLfloat *params); -static inline void qglGetLightfv(GLenum light, GLenum pname, GLfloat *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetLightfv(light=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( light ), StringFromGLEnumerant( pname ), params); -#endif - glGetLightfv(light, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetLightfv"); -#endif -} - -// void glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params); -static inline void qglGetMaterialfv(GLenum face, GLenum pname, GLfloat *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetMaterialfv(face=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( face ), StringFromGLEnumerant( pname ), params); -#endif - glGetMaterialfv(face, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetMaterialfv"); -#endif -} - -// void glGetTexEnvfv (GLenum env, GLenum pname, GLfloat *params); -static inline void qglGetTexEnvfv(GLenum env, GLenum pname, GLfloat *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetTexEnvfv(env=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( env ), StringFromGLEnumerant( pname ), params); -#endif - glGetTexEnvfv(env, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetTexEnvfv"); -#endif -} - -// void glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); -static inline void qglGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetTexParameterfv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params); -#endif - glGetTexParameterfv(target, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetTexParameterfv"); -#endif -} - -// void glLightModelf (GLenum pname, GLfloat param); -static inline void qglLightModelf(GLenum pname, GLfloat param) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glLightModelf(pname=%s, param=%f)\n", StringFromGLEnumerant( pname ), param); -#endif - glLightModelf(pname, param); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glLightModelf"); -#endif -} - -// void glLightModelfv (GLenum pname, const GLfloat *params); -static inline void qglLightModelfv(GLenum pname, const GLfloat *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glLightModelfv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params); -#endif - glLightModelfv(pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glLightModelfv"); -#endif -} - -// void glLightf (GLenum light, GLenum pname, GLfloat param); -static inline void qglLightf(GLenum light, GLenum pname, GLfloat param) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glLightf(light=%s, pname=%s, param=%f)\n", StringFromGLEnumerant( light ), StringFromGLEnumerant( pname ), param); -#endif - glLightf(light, pname, param); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glLightf"); -#endif -} - -// void glLightfv (GLenum light, GLenum pname, const GLfloat *params); -static inline void qglLightfv(GLenum light, GLenum pname, const GLfloat *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glLightfv(light=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( light ), StringFromGLEnumerant( pname ), params); -#endif - glLightfv(light, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glLightfv"); -#endif -} - -// void glLineWidth (GLfloat width); -static inline void qglLineWidth(GLfloat width) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glLineWidth(width=%f)\n", width); -#endif - glLineWidth(width); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glLineWidth"); -#endif -} - -// void glLoadMatrixf (const GLfloat *m); -static inline void qglLoadMatrixf(const GLfloat *m) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glLoadMatrixf(m=%p)\n", m); -#endif - glLoadMatrixf(m); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glLoadMatrixf"); -#endif -} - -// void glMaterialf (GLenum face, GLenum pname, GLfloat param); -static inline void qglMaterialf(GLenum face, GLenum pname, GLfloat param) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glMaterialf(face=%s, pname=%s, param=%f)\n", StringFromGLEnumerant( face ), StringFromGLEnumerant( pname ), param); -#endif - glMaterialf(face, pname, param); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glMaterialf"); -#endif -} - -// void glMaterialfv (GLenum face, GLenum pname, const GLfloat *params); -static inline void qglMaterialfv(GLenum face, GLenum pname, const GLfloat *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glMaterialfv(face=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( face ), StringFromGLEnumerant( pname ), params); -#endif - glMaterialfv(face, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glMaterialfv"); -#endif -} - -// void glMultMatrixf (const GLfloat *m); -static inline void qglMultMatrixf(const GLfloat *m) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glMultMatrixf(m=%p)\n", m); -#endif - glMultMatrixf(m); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glMultMatrixf"); -#endif -} - -// void glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -static inline void qglMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glMultiTexCoord4f(target=%s, s=%f, t=%f, r=%f, q=%f)\n", StringFromGLEnumerant( target ), s, t, r, q); -#endif - glMultiTexCoord4f(target, s, t, r, q); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glMultiTexCoord4f"); -#endif -} - -// void glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz); -static inline void qglNormal3f(GLfloat nx, GLfloat ny, GLfloat nz) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glNormal3f(nx=%f, ny=%f, nz=%f)\n", nx, ny, nz); -#endif - glNormal3f(nx, ny, nz); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glNormal3f"); -#endif -} - -// void glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); -static inline void qglOrthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glOrthof(left=%f, right=%f, bottom=%f, top=%f, zNear=%f, zFar=%f)\n", left, right, bottom, top, zNear, zFar); -#endif - glOrthof(left, right, bottom, top, zNear, zFar); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glOrthof"); -#endif -} - -// void glPointParameterf (GLenum pname, GLfloat param); -static inline void qglPointParameterf(GLenum pname, GLfloat param) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glPointParameterf(pname=%s, param=%f)\n", StringFromGLEnumerant( pname ), param); -#endif - glPointParameterf(pname, param); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glPointParameterf"); -#endif -} - -// void glPointParameterfv (GLenum pname, const GLfloat *params); -static inline void qglPointParameterfv(GLenum pname, const GLfloat *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glPointParameterfv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params); -#endif - glPointParameterfv(pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glPointParameterfv"); -#endif -} - -// void glPointSize (GLfloat size); -static inline void qglPointSize(GLfloat size) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glPointSize(size=%f)\n", size); -#endif - glPointSize(size); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glPointSize"); -#endif -} - -// void glPolygonOffset (GLfloat factor, GLfloat units); -static inline void qglPolygonOffset(GLfloat factor, GLfloat units) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glPolygonOffset(factor=%f, units=%f)\n", factor, units); -#endif - glPolygonOffset(factor, units); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glPolygonOffset"); -#endif -} - -// void glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -static inline void qglRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glRotatef(angle=%f, x=%f, y=%f, z=%f)\n", angle, x, y, z); -#endif - glRotatef(angle, x, y, z); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glRotatef"); -#endif -} - -// void glScalef (GLfloat x, GLfloat y, GLfloat z); -static inline void qglScalef(GLfloat x, GLfloat y, GLfloat z) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glScalef(x=%f, y=%f, z=%f)\n", x, y, z); -#endif - glScalef(x, y, z); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glScalef"); -#endif -} - -// void glTexEnvf (GLenum target, GLenum pname, GLfloat param); -static inline void qglTexEnvf(GLenum target, GLenum pname, GLfloat param) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glTexEnvf(target=%s, pname=%s, param=%f)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), param); -#endif - glTexEnvf(target, pname, param); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glTexEnvf"); -#endif -} - -// void glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params); -static inline void qglTexEnvfv(GLenum target, GLenum pname, const GLfloat *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glTexEnvfv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params); -#endif - glTexEnvfv(target, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glTexEnvfv"); -#endif -} - -// void glTexParameterf (GLenum target, GLenum pname, GLfloat param); -static inline void qglTexParameterf(GLenum target, GLenum pname, GLfloat param) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glTexParameterf(target=%s, pname=%s, param=%f)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), param); -#endif - glTexParameterf(target, pname, param); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glTexParameterf"); -#endif -} - -// void glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); -static inline void qglTexParameterfv(GLenum target, GLenum pname, const GLfloat *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glTexParameterfv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params); -#endif - glTexParameterfv(target, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glTexParameterfv"); -#endif -} - -// void glTranslatef (GLfloat x, GLfloat y, GLfloat z); -static inline void qglTranslatef(GLfloat x, GLfloat y, GLfloat z) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glTranslatef(x=%f, y=%f, z=%f)\n", x, y, z); -#endif - glTranslatef(x, y, z); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glTranslatef"); -#endif -} - -// void glActiveTexture (GLenum texture); -static inline void qglActiveTexture(GLenum texture) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glActiveTexture(texture=%s)\n", StringFromGLEnumerant( texture )); -#endif - glActiveTexture(texture); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glActiveTexture"); -#endif -} - -// void glAlphaFuncx (GLenum func, GLclampx ref); -static inline void qglAlphaFuncx(GLenum func, GLclampx ref) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glAlphaFuncx(func=%s, ref=%ld)\n", StringFromGLEnumerant( func ), ref); -#endif - glAlphaFuncx(func, ref); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glAlphaFuncx"); -#endif -} - -// void glBindBuffer (GLenum target, GLuint buffer); -static inline void qglBindBuffer(GLenum target, GLuint buffer) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glBindBuffer(target=%s, buffer=%lu)\n", StringFromGLEnumerant( target ), buffer); -#endif - glBindBuffer(target, buffer); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glBindBuffer"); -#endif -} - -// void glBindTexture (GLenum target, GLuint texture); -static inline void qglBindTexture(GLenum target, GLuint texture) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glBindTexture(target=%s, texture=%lu)\n", StringFromGLEnumerant( target ), texture); -#endif - glBindTexture(target, texture); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glBindTexture"); -#endif -} - -// void glBlendFunc (GLenum sfactor, GLenum dfactor); -static inline void qglBlendFunc(GLenum sfactor, GLenum dfactor) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glBlendFunc(sfactor=%s, dfactor=%s)\n", StringFromGLEnumerant( sfactor ), StringFromGLEnumerant( dfactor )); -#endif - glBlendFunc(sfactor, dfactor); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glBlendFunc"); -#endif -} - -// void glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); -static inline void qglBufferData(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glBufferData(target=%s, size=%ld, data=%p, usage=%s)\n", StringFromGLEnumerant( target ), size, data, StringFromGLEnumerant( usage )); -#endif - glBufferData(target, size, data, usage); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glBufferData"); -#endif -} - -// void glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); -static inline void qglBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glBufferSubData(target=%s, offset=%ld, size=%ld, data=%p)\n", StringFromGLEnumerant( target ), offset, size, data); -#endif - glBufferSubData(target, offset, size, data); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glBufferSubData"); -#endif -} - -// void glClear (GLbitfield mask); -static inline void qglClear(GLbitfield mask) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glClear(mask=%lu)\n", mask); -#endif - glClear(mask); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glClear"); -#endif -} - -// void glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); -static inline void qglClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glClearColorx(red=%ld, green=%ld, blue=%ld, alpha=%ld)\n", red, green, blue, alpha); -#endif - glClearColorx(red, green, blue, alpha); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glClearColorx"); -#endif -} - -// void glClearDepthx (GLclampx depth); -static inline void qglClearDepthx(GLclampx depth) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glClearDepthx(depth=%ld)\n", depth); -#endif - glClearDepthx(depth); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glClearDepthx"); -#endif -} - -// void glClearStencil (GLint s); -static inline void qglClearStencil(GLint s) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glClearStencil(s=%ld)\n", s); -#endif - glClearStencil(s); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glClearStencil"); -#endif -} - -// void glClientActiveTexture (GLenum texture); -static inline void qglClientActiveTexture(GLenum texture) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glClientActiveTexture(texture=%s)\n", StringFromGLEnumerant( texture )); -#endif - glClientActiveTexture(texture); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glClientActiveTexture"); -#endif -} - -// void glClipPlanex (GLenum plane, const GLfixed *equation); -static inline void qglClipPlanex(GLenum plane, const GLfixed *equation) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glClipPlanex(plane=%s, equation=%p)\n", StringFromGLEnumerant( plane ), equation); -#endif - glClipPlanex(plane, equation); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glClipPlanex"); -#endif -} - -// void glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); -static inline void qglColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glColor4ub(red=%u, green=%u, blue=%u, alpha=%u)\n", red, green, blue, alpha); -#endif - glColor4ub(red, green, blue, alpha); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glColor4ub"); -#endif -} - -// void glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -static inline void qglColor4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glColor4x(red=%ld, green=%ld, blue=%ld, alpha=%ld)\n", red, green, blue, alpha); -#endif - glColor4x(red, green, blue, alpha); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glColor4x"); -#endif -} - -// void glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -static inline void qglColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glColorMask(red=%u, green=%u, blue=%u, alpha=%u)\n", red, green, blue, alpha); -#endif - glColorMask(red, green, blue, alpha); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glColorMask"); -#endif -} - -// void glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -static inline void qglColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glColorPointer(size=%ld, type=%s, stride=%ld, pointer=%p)\n", size, StringFromGLEnumerant( type ), stride, pointer); -#endif - glColorPointer(size, type, stride, pointer); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glColorPointer"); -#endif -} - -// void glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -static inline void qglCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glCompressedTexImage2D(target=%s, level=%ld, internalformat=%s, width=%ld, height=%ld, border=%ld, imageSize=%ld, data=%p)\n", StringFromGLEnumerant( target ), level, StringFromGLEnumerant( internalformat ), width, height, border, imageSize, data); -#endif - glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glCompressedTexImage2D"); -#endif -} - -// void glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -static inline void qglCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glCompressedTexSubImage2D(target=%s, level=%ld, xoffset=%ld, yoffset=%ld, width=%ld, height=%ld, format=%s, imageSize=%ld, data=%p)\n", StringFromGLEnumerant( target ), level, xoffset, yoffset, width, height, StringFromGLEnumerant( format ), imageSize, data); -#endif - glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glCompressedTexSubImage2D"); -#endif -} - -// void glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -static inline void qglCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glCopyTexImage2D(target=%s, level=%ld, internalformat=%s, x=%ld, y=%ld, width=%ld, height=%ld, border=%ld)\n", StringFromGLEnumerant( target ), level, StringFromGLEnumerant( internalformat ), x, y, width, height, border); -#endif - glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glCopyTexImage2D"); -#endif -} - -// void glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -static inline void qglCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glCopyTexSubImage2D(target=%s, level=%ld, xoffset=%ld, yoffset=%ld, x=%ld, y=%ld, width=%ld, height=%ld)\n", StringFromGLEnumerant( target ), level, xoffset, yoffset, x, y, width, height); -#endif - glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glCopyTexSubImage2D"); -#endif -} - -// void glCullFace (GLenum mode); -static inline void qglCullFace(GLenum mode) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glCullFace(mode=%s)\n", StringFromGLEnumerant( mode )); -#endif - glCullFace(mode); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glCullFace"); -#endif -} - -// void glDeleteBuffers (GLsizei n, const GLuint *buffers); -static inline void qglDeleteBuffers(GLsizei n, const GLuint *buffers) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glDeleteBuffers(n=%ld, buffers=%p)\n", n, buffers); -#endif - glDeleteBuffers(n, buffers); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glDeleteBuffers"); -#endif -} - -// void glDeleteTextures (GLsizei n, const GLuint *textures); -static inline void qglDeleteTextures(GLsizei n, const GLuint *textures) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glDeleteTextures(n=%ld, textures=%p)\n", n, textures); -#endif - glDeleteTextures(n, textures); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glDeleteTextures"); -#endif -} - -// void glDepthFunc (GLenum func); -static inline void qglDepthFunc(GLenum func) -{ - func = GL_ALWAYS; -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glDepthFunc(func=%s)\n", StringFromGLEnumerant( func )); -#endif - glDepthFunc(func); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glDepthFunc"); -#endif -} - -// void glDepthMask (GLboolean flag); -static inline void qglDepthMask(GLboolean flag) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glDepthMask(flag=%u)\n", flag); -#endif - glDepthMask(flag); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glDepthMask"); -#endif -} - -// void glDepthRangex (GLclampx zNear, GLclampx zFar); -static inline void qglDepthRangex(GLclampx zNear, GLclampx zFar) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glDepthRangex(zNear=%ld, zFar=%ld)\n", zNear, zFar); -#endif - glDepthRangex(zNear, zFar); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glDepthRangex"); -#endif -} - -// void glDisable (GLenum cap); -static inline void qglDisable(GLenum cap) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glDisable(cap=%s)\n", StringFromGLEnumerant( cap )); -#endif - glDisable(cap); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glDisable"); -#endif -} - -// void glDisableClientState (GLenum array); -static inline void qglDisableClientState(GLenum array) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glDisableClientState(array=%s)\n", StringFromGLEnumerant( array )); -#endif - glDisableClientState(array); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glDisableClientState"); -#endif -} - -// void glDrawArrays (GLenum mode, GLint first, GLsizei count); -static inline void qglDrawArrays(GLenum mode, GLint first, GLsizei count) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glDrawArrays(mode=%s, first=%ld, count=%ld)\n", StringFromGLEnumerant( mode ), first, count); -#endif - glDrawArrays(mode, first, count); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glDrawArrays"); -#endif -} - -// void glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); -static inline void qglDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glDrawElements(mode=%s, count=%ld, type=%s, indices=%p)\n", StringFromGLEnumerant( mode ), count, StringFromGLEnumerant( type ), indices); -#endif - glDrawElements(mode, count, type, indices); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glDrawElements"); -#endif -} - -// void glEnable (GLenum cap); -static inline void qglEnable(GLenum cap) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glEnable(cap=%s)\n", StringFromGLEnumerant( cap )); -#endif - glEnable(cap); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glEnable"); -#endif -} - -// void glEnableClientState (GLenum array); -static inline void qglEnableClientState(GLenum array) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glEnableClientState(array=%s)\n", StringFromGLEnumerant( array )); -#endif - glEnableClientState(array); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glEnableClientState"); -#endif -} - -// void glFinish (void); -static inline void qglFinish(void) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glFinish(void)\n"); -#endif - glFinish(); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glFinish"); -#endif -} - -// void glFlush (void); -static inline void qglFlush(void) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glFlush(void)\n"); -#endif - glFlush(); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glFlush"); -#endif -} - -// void glFogx (GLenum pname, GLfixed param); -static inline void qglFogx(GLenum pname, GLfixed param) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glFogx(pname=%s, param=%ld)\n", StringFromGLEnumerant( pname ), param); -#endif - glFogx(pname, param); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glFogx"); -#endif -} - -// void glFogxv (GLenum pname, const GLfixed *params); -static inline void qglFogxv(GLenum pname, const GLfixed *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glFogxv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params); -#endif - glFogxv(pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glFogxv"); -#endif -} - -// void glFrontFace (GLenum mode); -static inline void qglFrontFace(GLenum mode) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glFrontFace(mode=%s)\n", StringFromGLEnumerant( mode )); -#endif - glFrontFace(mode); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glFrontFace"); -#endif -} - -// void glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); -static inline void qglFrustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glFrustumx(left=%ld, right=%ld, bottom=%ld, top=%ld, zNear=%ld, zFar=%ld)\n", left, right, bottom, top, zNear, zFar); -#endif - glFrustumx(left, right, bottom, top, zNear, zFar); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glFrustumx"); -#endif -} - -// void glGetBooleanv (GLenum pname, GLboolean *params); -static inline void qglGetBooleanv(GLenum pname, GLboolean *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetBooleanv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params); -#endif - glGetBooleanv(pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetBooleanv"); -#endif -} - -// void glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); -static inline void qglGetBufferParameteriv(GLenum target, GLenum pname, GLint *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetBufferParameteriv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params); -#endif - glGetBufferParameteriv(target, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetBufferParameteriv"); -#endif -} - -// void glGetClipPlanex (GLenum pname, GLfixed eqn[4]); -static inline void qglGetClipPlanex(GLenum pname, GLfixed eqn[4]) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetClipPlanex(pname=%s, eqn=%ld)\n", StringFromGLEnumerant( pname ), eqn); -#endif - glGetClipPlanex(pname, eqn); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetClipPlanex"); -#endif -} - -// void glGenBuffers (GLsizei n, GLuint *buffers); -static inline void qglGenBuffers(GLsizei n, GLuint *buffers) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGenBuffers(n=%ld, buffers=%p)\n", n, buffers); -#endif - glGenBuffers(n, buffers); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGenBuffers"); -#endif -} - -// void glGenTextures (GLsizei n, GLuint *textures); -static inline void qglGenTextures(GLsizei n, GLuint *textures) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGenTextures(n=%ld, textures=%p)\n", n, textures); -#endif - glGenTextures(n, textures); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGenTextures"); -#endif -} - -// GLenum glGetError (void); -static inline GLenum qglGetError(void) -{ - GLenum returnValue; -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetError(void)\n"); -#endif - returnValue = glGetError(); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetError"); -#endif - return returnValue; -} - -// void glGetFixedv (GLenum pname, GLfixed *params); -static inline void qglGetFixedv(GLenum pname, GLfixed *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetFixedv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params); -#endif - glGetFixedv(pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetFixedv"); -#endif -} - -// void glGetIntegerv (GLenum pname, GLint *params); -static inline void qglGetIntegerv(GLenum pname, GLint *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetIntegerv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params); -#endif - glGetIntegerv(pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetIntegerv"); -#endif -} - -// void glGetLightxv (GLenum light, GLenum pname, GLfixed *params); -static inline void qglGetLightxv(GLenum light, GLenum pname, GLfixed *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetLightxv(light=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( light ), StringFromGLEnumerant( pname ), params); -#endif - glGetLightxv(light, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetLightxv"); -#endif -} - -// void glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params); -static inline void qglGetMaterialxv(GLenum face, GLenum pname, GLfixed *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetMaterialxv(face=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( face ), StringFromGLEnumerant( pname ), params); -#endif - glGetMaterialxv(face, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetMaterialxv"); -#endif -} - -// void glGetPointerv (GLenum pname, void **params); -static inline void qglGetPointerv(GLenum pname, void **params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetPointerv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params); -#endif - glGetPointerv(pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetPointerv"); -#endif -} - -// const GLubyte * glGetString (GLenum name); -static inline const GLubyte * qglGetString(GLenum name) -{ - const GLubyte * returnValue; -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetString(name=%s)\n", StringFromGLEnumerant( name )); -#endif - returnValue = glGetString(name); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetString"); -#endif - return returnValue; -} - -// void glGetTexEnviv (GLenum env, GLenum pname, GLint *params); -static inline void qglGetTexEnviv(GLenum env, GLenum pname, GLint *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetTexEnviv(env=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( env ), StringFromGLEnumerant( pname ), params); -#endif - glGetTexEnviv(env, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetTexEnviv"); -#endif -} - -// void glGetTexEnvxv (GLenum env, GLenum pname, GLfixed *params); -static inline void qglGetTexEnvxv(GLenum env, GLenum pname, GLfixed *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetTexEnvxv(env=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( env ), StringFromGLEnumerant( pname ), params); -#endif - glGetTexEnvxv(env, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetTexEnvxv"); -#endif -} - -// void glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); -static inline void qglGetTexParameteriv(GLenum target, GLenum pname, GLint *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetTexParameteriv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params); -#endif - glGetTexParameteriv(target, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetTexParameteriv"); -#endif -} - -// void glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params); -static inline void qglGetTexParameterxv(GLenum target, GLenum pname, GLfixed *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glGetTexParameterxv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params); -#endif - glGetTexParameterxv(target, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glGetTexParameterxv"); -#endif -} - -// void glHint (GLenum target, GLenum mode); -static inline void qglHint(GLenum target, GLenum mode) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glHint(target=%s, mode=%s)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( mode )); -#endif - glHint(target, mode); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glHint"); -#endif -} - -// GLboolean glIsBuffer (GLuint buffer); -static inline GLboolean qglIsBuffer(GLuint buffer) -{ - GLboolean returnValue; -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glIsBuffer(buffer=%lu)\n", buffer); -#endif - returnValue = glIsBuffer(buffer); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glIsBuffer"); -#endif - return returnValue; -} - -// GLboolean glIsEnabled (GLenum cap); -static inline GLboolean qglIsEnabled(GLenum cap) -{ - GLboolean returnValue; -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glIsEnabled(cap=%s)\n", StringFromGLEnumerant( cap )); -#endif - returnValue = glIsEnabled(cap); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glIsEnabled"); -#endif - return returnValue; -} - -// GLboolean glIsTexture (GLuint texture); -static inline GLboolean qglIsTexture(GLuint texture) -{ - GLboolean returnValue; -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glIsTexture(texture=%lu)\n", texture); -#endif - returnValue = glIsTexture(texture); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glIsTexture"); -#endif - return returnValue; -} - -// void glLightModelx (GLenum pname, GLfixed param); -static inline void qglLightModelx(GLenum pname, GLfixed param) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glLightModelx(pname=%s, param=%ld)\n", StringFromGLEnumerant( pname ), param); -#endif - glLightModelx(pname, param); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glLightModelx"); -#endif -} - -// void glLightModelxv (GLenum pname, const GLfixed *params); -static inline void qglLightModelxv(GLenum pname, const GLfixed *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glLightModelxv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params); -#endif - glLightModelxv(pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glLightModelxv"); -#endif -} - -// void glLightx (GLenum light, GLenum pname, GLfixed param); -static inline void qglLightx(GLenum light, GLenum pname, GLfixed param) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glLightx(light=%s, pname=%s, param=%ld)\n", StringFromGLEnumerant( light ), StringFromGLEnumerant( pname ), param); -#endif - glLightx(light, pname, param); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glLightx"); -#endif -} - -// void glLightxv (GLenum light, GLenum pname, const GLfixed *params); -static inline void qglLightxv(GLenum light, GLenum pname, const GLfixed *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glLightxv(light=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( light ), StringFromGLEnumerant( pname ), params); -#endif - glLightxv(light, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glLightxv"); -#endif -} - -// void glLineWidthx (GLfixed width); -static inline void qglLineWidthx(GLfixed width) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glLineWidthx(width=%ld)\n", width); -#endif - glLineWidthx(width); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glLineWidthx"); -#endif -} - -// void glLoadIdentity (void); -static inline void qglLoadIdentity(void) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glLoadIdentity(void)\n"); -#endif - glLoadIdentity(); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glLoadIdentity"); -#endif -} - -// void glLoadMatrixx (const GLfixed *m); -static inline void qglLoadMatrixx(const GLfixed *m) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glLoadMatrixx(m=%p)\n", m); -#endif - glLoadMatrixx(m); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glLoadMatrixx"); -#endif -} - -// void glLogicOp (GLenum opcode); -static inline void qglLogicOp(GLenum opcode) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glLogicOp(opcode=%s)\n", StringFromGLEnumerant( opcode )); -#endif - glLogicOp(opcode); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glLogicOp"); -#endif -} - -// void glMaterialx (GLenum face, GLenum pname, GLfixed param); -static inline void qglMaterialx(GLenum face, GLenum pname, GLfixed param) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glMaterialx(face=%s, pname=%s, param=%ld)\n", StringFromGLEnumerant( face ), StringFromGLEnumerant( pname ), param); -#endif - glMaterialx(face, pname, param); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glMaterialx"); -#endif -} - -// void glMaterialxv (GLenum face, GLenum pname, const GLfixed *params); -static inline void qglMaterialxv(GLenum face, GLenum pname, const GLfixed *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glMaterialxv(face=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( face ), StringFromGLEnumerant( pname ), params); -#endif - glMaterialxv(face, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glMaterialxv"); -#endif -} - -// void glMatrixMode (GLenum mode); -static inline void qglMatrixMode(GLenum mode) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glMatrixMode(mode=%s)\n", StringFromGLEnumerant( mode )); -#endif - glMatrixMode(mode); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glMatrixMode"); -#endif -} - -// void glMultMatrixx (const GLfixed *m); -static inline void qglMultMatrixx(const GLfixed *m) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glMultMatrixx(m=%p)\n", m); -#endif - glMultMatrixx(m); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glMultMatrixx"); -#endif -} - -// void glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); -static inline void qglMultiTexCoord4x(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glMultiTexCoord4x(target=%s, s=%ld, t=%ld, r=%ld, q=%ld)\n", StringFromGLEnumerant( target ), s, t, r, q); -#endif - glMultiTexCoord4x(target, s, t, r, q); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glMultiTexCoord4x"); -#endif -} - -// void glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz); -static inline void qglNormal3x(GLfixed nx, GLfixed ny, GLfixed nz) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glNormal3x(nx=%ld, ny=%ld, nz=%ld)\n", nx, ny, nz); -#endif - glNormal3x(nx, ny, nz); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glNormal3x"); -#endif -} - -// void glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer); -static inline void qglNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glNormalPointer(type=%s, stride=%ld, pointer=%p)\n", StringFromGLEnumerant( type ), stride, pointer); -#endif - glNormalPointer(type, stride, pointer); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glNormalPointer"); -#endif -} - -// void glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); -static inline void qglOrthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glOrthox(left=%ld, right=%ld, bottom=%ld, top=%ld, zNear=%ld, zFar=%ld)\n", left, right, bottom, top, zNear, zFar); -#endif - glOrthox(left, right, bottom, top, zNear, zFar); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glOrthox"); -#endif -} - -// void glPixelStorei (GLenum pname, GLint param); -static inline void qglPixelStorei(GLenum pname, GLint param) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glPixelStorei(pname=%s, param=%ld)\n", StringFromGLEnumerant( pname ), param); -#endif - glPixelStorei(pname, param); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glPixelStorei"); -#endif -} - -// void glPointParameterx (GLenum pname, GLfixed param); -static inline void qglPointParameterx(GLenum pname, GLfixed param) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glPointParameterx(pname=%s, param=%ld)\n", StringFromGLEnumerant( pname ), param); -#endif - glPointParameterx(pname, param); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glPointParameterx"); -#endif -} - -// void glPointParameterxv (GLenum pname, const GLfixed *params); -static inline void qglPointParameterxv(GLenum pname, const GLfixed *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glPointParameterxv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params); -#endif - glPointParameterxv(pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glPointParameterxv"); -#endif -} - -// void glPointSizex (GLfixed size); -static inline void qglPointSizex(GLfixed size) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glPointSizex(size=%ld)\n", size); -#endif - glPointSizex(size); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glPointSizex"); -#endif -} - -// void glPolygonOffsetx (GLfixed factor, GLfixed units); -static inline void qglPolygonOffsetx(GLfixed factor, GLfixed units) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glPolygonOffsetx(factor=%ld, units=%ld)\n", factor, units); -#endif - glPolygonOffsetx(factor, units); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glPolygonOffsetx"); -#endif -} - -// void glPopMatrix (void); -static inline void qglPopMatrix(void) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glPopMatrix(void)\n"); -#endif - glPopMatrix(); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glPopMatrix"); -#endif -} - -// void glPushMatrix (void); -static inline void qglPushMatrix(void) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glPushMatrix(void)\n"); -#endif - glPushMatrix(); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glPushMatrix"); -#endif -} - -// void glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); -static inline void qglReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glReadPixels(x=%ld, y=%ld, width=%ld, height=%ld, format=%s, type=%s, pixels=%p)\n", x, y, width, height, StringFromGLEnumerant( format ), StringFromGLEnumerant( type ), pixels); -#endif - glReadPixels(x, y, width, height, format, type, pixels); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glReadPixels"); -#endif -} - -// void glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); -static inline void qglRotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glRotatex(angle=%ld, x=%ld, y=%ld, z=%ld)\n", angle, x, y, z); -#endif - glRotatex(angle, x, y, z); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glRotatex"); -#endif -} - -// void glSampleCoverage (GLclampf value, GLboolean invert); -static inline void qglSampleCoverage(GLclampf value, GLboolean invert) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glSampleCoverage(value=%f, invert=%u)\n", value, invert); -#endif - glSampleCoverage(value, invert); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glSampleCoverage"); -#endif -} - -// void glSampleCoveragex (GLclampx value, GLboolean invert); -static inline void qglSampleCoveragex(GLclampx value, GLboolean invert) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glSampleCoveragex(value=%ld, invert=%u)\n", value, invert); -#endif - glSampleCoveragex(value, invert); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glSampleCoveragex"); -#endif -} - -// void glScalex (GLfixed x, GLfixed y, GLfixed z); -static inline void qglScalex(GLfixed x, GLfixed y, GLfixed z) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glScalex(x=%ld, y=%ld, z=%ld)\n", x, y, z); -#endif - glScalex(x, y, z); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glScalex"); -#endif -} - -// void glScissor (GLint x, GLint y, GLsizei width, GLsizei height); -static inline void qglScissor(GLint x, GLint y, GLsizei width, GLsizei height) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glScissor(x=%ld, y=%ld, width=%ld, height=%ld)\n", x, y, width, height); -#endif - // fixme - int vidHeight = 320; -glScissor(vidHeight - y - height, x, height, width); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glScissor"); -#endif -} - -// void glShadeModel (GLenum mode); -static inline void qglShadeModel(GLenum mode) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glShadeModel(mode=%s)\n", StringFromGLEnumerant( mode )); -#endif - glShadeModel(mode); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glShadeModel"); -#endif -} - -// void glStencilFunc (GLenum func, GLint ref, GLuint mask); -static inline void qglStencilFunc(GLenum func, GLint ref, GLuint mask) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glStencilFunc(func=%s, ref=%ld, mask=%lu)\n", StringFromGLEnumerant( func ), ref, mask); -#endif - glStencilFunc(func, ref, mask); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glStencilFunc"); -#endif -} - -// void glStencilMask (GLuint mask); -static inline void qglStencilMask(GLuint mask) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glStencilMask(mask=%lu)\n", mask); -#endif - glStencilMask(mask); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glStencilMask"); -#endif -} - -// void glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); -static inline void qglStencilOp(GLenum fail, GLenum zfail, GLenum zpass) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glStencilOp(fail=%s, zfail=%s, zpass=%s)\n", StringFromGLEnumerant( fail ), StringFromGLEnumerant( zfail ), StringFromGLEnumerant( zpass )); -#endif - glStencilOp(fail, zfail, zpass); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glStencilOp"); -#endif -} - -// void glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -static inline void qglTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glTexCoordPointer(size=%ld, type=%s, stride=%ld, pointer=%p)\n", size, StringFromGLEnumerant( type ), stride, pointer); -#endif - glTexCoordPointer(size, type, stride, pointer); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glTexCoordPointer"); -#endif -} - -// void glTexEnvi (GLenum target, GLenum pname, GLint param); -static inline void qglTexEnvi(GLenum target, GLenum pname, GLint param) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glTexEnvi(target=%s, pname=%s, param=%ld)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), param); -#endif - glTexEnvi(target, pname, param); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glTexEnvi"); -#endif -} - -// void glTexEnvx (GLenum target, GLenum pname, GLfixed param); -static inline void qglTexEnvx(GLenum target, GLenum pname, GLfixed param) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glTexEnvx(target=%s, pname=%s, param=%ld)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), param); -#endif - glTexEnvx(target, pname, param); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glTexEnvx"); -#endif -} - -// void glTexEnviv (GLenum target, GLenum pname, const GLint *params); -static inline void qglTexEnviv(GLenum target, GLenum pname, const GLint *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glTexEnviv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params); -#endif - glTexEnviv(target, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glTexEnviv"); -#endif -} - -// void glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params); -static inline void qglTexEnvxv(GLenum target, GLenum pname, const GLfixed *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glTexEnvxv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params); -#endif - glTexEnvxv(target, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glTexEnvxv"); -#endif -} - -// void glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -static inline void qglTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glTexImage2D(target=%s, level=%ld, internalformat=%ld, width=%ld, height=%ld, border=%ld, format=%s, type=%s, pixels=%p)\n", StringFromGLEnumerant( target ), level, internalformat, width, height, border, StringFromGLEnumerant( format ), StringFromGLEnumerant( type ), pixels); -#endif - glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glTexImage2D"); -#endif -} - -// void glTexParameteri (GLenum target, GLenum pname, GLint param); -static inline void qglTexParameteri(GLenum target, GLenum pname, GLint param) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glTexParameteri(target=%s, pname=%s, param=%ld)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), param); -#endif - glTexParameteri(target, pname, param); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glTexParameteri"); -#endif -} - -// void glTexParameterx (GLenum target, GLenum pname, GLfixed param); -static inline void qglTexParameterx(GLenum target, GLenum pname, GLfixed param) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glTexParameterx(target=%s, pname=%s, param=%ld)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), param); -#endif - glTexParameterx(target, pname, param); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glTexParameterx"); -#endif -} - -// void glTexParameteriv (GLenum target, GLenum pname, const GLint *params); -static inline void qglTexParameteriv(GLenum target, GLenum pname, const GLint *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glTexParameteriv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params); -#endif - glTexParameteriv(target, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glTexParameteriv"); -#endif -} - -// void glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params); -static inline void qglTexParameterxv(GLenum target, GLenum pname, const GLfixed *params) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glTexParameterxv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params); -#endif - glTexParameterxv(target, pname, params); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glTexParameterxv"); -#endif -} - -// void glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -static inline void qglTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glTexSubImage2D(target=%s, level=%ld, xoffset=%ld, yoffset=%ld, width=%ld, height=%ld, format=%s, type=%s, pixels=%p)\n", StringFromGLEnumerant( target ), level, xoffset, yoffset, width, height, StringFromGLEnumerant( format ), StringFromGLEnumerant( type ), pixels); -#endif - glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glTexSubImage2D"); -#endif -} - -// void glTranslatex (GLfixed x, GLfixed y, GLfixed z); -static inline void qglTranslatex(GLfixed x, GLfixed y, GLfixed z) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glTranslatex(x=%ld, y=%ld, z=%ld)\n", x, y, z); -#endif - glTranslatex(x, y, z); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glTranslatex"); -#endif -} - -// void glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -static inline void qglVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glVertexPointer(size=%ld, type=%s, stride=%ld, pointer=%p)\n", size, StringFromGLEnumerant( type ), stride, pointer); -#endif - glVertexPointer(size, type, stride, pointer); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glVertexPointer"); -#endif -} - -// void glViewport (GLint x, GLint y, GLsizei width, GLsizei height); -static inline void qglViewport(GLint x, GLint y, GLsizei width, GLsizei height) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glViewport(x=%ld, y=%ld, width=%ld, height=%ld)\n", x, y, width, height); -#endif -//extern glconfig_t glConfig; - int vidHeight = 320; - glViewport(vidHeight - y - height, x, height, width); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glViewport"); -#endif -} - -// void glCurrentPaletteMatrixOES (GLuint matrixpaletteindex); -static inline void qglCurrentPaletteMatrixOES(GLuint matrixpaletteindex) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glCurrentPaletteMatrixOES(matrixpaletteindex=%lu)\n", matrixpaletteindex); -#endif - glCurrentPaletteMatrixOES(matrixpaletteindex); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glCurrentPaletteMatrixOES"); -#endif -} - -// void glLoadPaletteFromModelViewMatrixOES (void); -static inline void qglLoadPaletteFromModelViewMatrixOES(void) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glLoadPaletteFromModelViewMatrixOES(void)\n"); -#endif - glLoadPaletteFromModelViewMatrixOES(); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glLoadPaletteFromModelViewMatrixOES"); -#endif -} - -// void glMatrixIndexPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -static inline void qglMatrixIndexPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glMatrixIndexPointerOES(size=%ld, type=%s, stride=%ld, pointer=%p)\n", size, StringFromGLEnumerant( type ), stride, pointer); -#endif - glMatrixIndexPointerOES(size, type, stride, pointer); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glMatrixIndexPointerOES"); -#endif -} - -// void glWeightPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -static inline void qglWeightPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glWeightPointerOES(size=%ld, type=%s, stride=%ld, pointer=%p)\n", size, StringFromGLEnumerant( type ), stride, pointer); -#endif - glWeightPointerOES(size, type, stride, pointer); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glWeightPointerOES"); -#endif -} - -// void glPointSizePointerOES (GLenum type, GLsizei stride, const GLvoid *pointer); -static inline void qglPointSizePointerOES(GLenum type, GLsizei stride, const GLvoid *pointer) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glPointSizePointerOES(type=%s, stride=%ld, pointer=%p)\n", StringFromGLEnumerant( type ), stride, pointer); -#endif - glPointSizePointerOES(type, stride, pointer); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glPointSizePointerOES"); -#endif -} - -// void glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); -static inline void qglDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glDrawTexsOES(x=%d, y=%d, z=%d, width=%d, height=%d)\n", x, y, z, width, height); -#endif - glDrawTexsOES(x, y, z, width, height); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glDrawTexsOES"); -#endif -} - -// void glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height); -static inline void qglDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glDrawTexiOES(x=%ld, y=%ld, z=%ld, width=%ld, height=%ld)\n", x, y, z, width, height); -#endif - glDrawTexiOES(x, y, z, width, height); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glDrawTexiOES"); -#endif -} - -// void glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); -static inline void qglDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glDrawTexxOES(x=%ld, y=%ld, z=%ld, width=%ld, height=%ld)\n", x, y, z, width, height); -#endif - glDrawTexxOES(x, y, z, width, height); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glDrawTexxOES"); -#endif -} - -// void glDrawTexsvOES (const GLshort *coords); -static inline void qglDrawTexsvOES(const GLshort *coords) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glDrawTexsvOES(coords=%p)\n", coords); -#endif - glDrawTexsvOES(coords); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glDrawTexsvOES"); -#endif -} - -// void glDrawTexivOES (const GLint *coords); -static inline void qglDrawTexivOES(const GLint *coords) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glDrawTexivOES(coords=%p)\n", coords); -#endif - glDrawTexivOES(coords); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glDrawTexivOES"); -#endif -} - -// void glDrawTexxvOES (const GLfixed *coords); -static inline void qglDrawTexxvOES(const GLfixed *coords) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glDrawTexxvOES(coords=%p)\n", coords); -#endif - glDrawTexxvOES(coords); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glDrawTexxvOES"); -#endif -} - -// void glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); -static inline void qglDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glDrawTexfOES(x=%f, y=%f, z=%f, width=%f, height=%f)\n", x, y, z, width, height); -#endif - glDrawTexfOES(x, y, z, width, height); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glDrawTexfOES"); -#endif -} - -// void glDrawTexfvOES (const GLfloat *coords); -static inline void qglDrawTexfvOES(const GLfloat *coords) -{ -#if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS) - if (QGLLogGLCalls) - fprintf(QGLDebugFile(), "glDrawTexfvOES(coords=%p)\n", coords); -#endif - glDrawTexfvOES(coords); -#if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS) - if (!QGLBeginStarted) - QGLCheckError("glDrawTexfvOES"); -#endif -} - -// Prevent calls to the 'normal' GL functions -#define glAlphaFunc CALL_THE_QGL_VERSION_OF_glAlphaFunc -#define glClearColor CALL_THE_QGL_VERSION_OF_glClearColor -#define glClearDepthf CALL_THE_QGL_VERSION_OF_glClearDepthf -#define glClipPlanef CALL_THE_QGL_VERSION_OF_glClipPlanef -#define glDepthRangef CALL_THE_QGL_VERSION_OF_glDepthRangef -#define glFogf CALL_THE_QGL_VERSION_OF_glFogf -#define glFogfv CALL_THE_QGL_VERSION_OF_glFogfv -#define glFrustumf CALL_THE_QGL_VERSION_OF_glFrustumf -#define glGetClipPlanef CALL_THE_QGL_VERSION_OF_glGetClipPlanef -#define glGetFloatv CALL_THE_QGL_VERSION_OF_glGetFloatv -#define glGetLightfv CALL_THE_QGL_VERSION_OF_glGetLightfv -#define glGetMaterialfv CALL_THE_QGL_VERSION_OF_glGetMaterialfv -#define glGetTexEnvfv CALL_THE_QGL_VERSION_OF_glGetTexEnvfv -#define glGetTexParameterfv CALL_THE_QGL_VERSION_OF_glGetTexParameterfv -#define glLightModelf CALL_THE_QGL_VERSION_OF_glLightModelf -#define glLightModelfv CALL_THE_QGL_VERSION_OF_glLightModelfv -#define glLightf CALL_THE_QGL_VERSION_OF_glLightf -#define glLightfv CALL_THE_QGL_VERSION_OF_glLightfv -#define glLineWidth CALL_THE_QGL_VERSION_OF_glLineWidth -#define glLoadMatrixf CALL_THE_QGL_VERSION_OF_glLoadMatrixf -#define glMaterialf CALL_THE_QGL_VERSION_OF_glMaterialf -#define glMaterialfv CALL_THE_QGL_VERSION_OF_glMaterialfv -#define glMultMatrixf CALL_THE_QGL_VERSION_OF_glMultMatrixf -#define glMultiTexCoord4f CALL_THE_QGL_VERSION_OF_glMultiTexCoord4f -#define glNormal3f CALL_THE_QGL_VERSION_OF_glNormal3f -#define glOrthof CALL_THE_QGL_VERSION_OF_glOrthof -#define glPointParameterf CALL_THE_QGL_VERSION_OF_glPointParameterf -#define glPointParameterfv CALL_THE_QGL_VERSION_OF_glPointParameterfv -#define glPointSize CALL_THE_QGL_VERSION_OF_glPointSize -#define glPolygonOffset CALL_THE_QGL_VERSION_OF_glPolygonOffset -#define glRotatef CALL_THE_QGL_VERSION_OF_glRotatef -#define glScalef CALL_THE_QGL_VERSION_OF_glScalef -#define glTexEnvf CALL_THE_QGL_VERSION_OF_glTexEnvf -#define glTexEnvfv CALL_THE_QGL_VERSION_OF_glTexEnvfv -#define glTexParameterf CALL_THE_QGL_VERSION_OF_glTexParameterf -#define glTexParameterfv CALL_THE_QGL_VERSION_OF_glTexParameterfv -#define glTranslatef CALL_THE_QGL_VERSION_OF_glTranslatef -#define glActiveTexture CALL_THE_QGL_VERSION_OF_glActiveTexture -#define glAlphaFuncx CALL_THE_QGL_VERSION_OF_glAlphaFuncx -#define glBindBuffer CALL_THE_QGL_VERSION_OF_glBindBuffer -#define glBindTexture CALL_THE_QGL_VERSION_OF_glBindTexture -#define glBlendFunc CALL_THE_QGL_VERSION_OF_glBlendFunc -#define glBufferData CALL_THE_QGL_VERSION_OF_glBufferData -#define glBufferSubData CALL_THE_QGL_VERSION_OF_glBufferSubData -#define glClear CALL_THE_QGL_VERSION_OF_glClear -#define glClearColorx CALL_THE_QGL_VERSION_OF_glClearColorx -#define glClearDepthx CALL_THE_QGL_VERSION_OF_glClearDepthx -#define glClearStencil CALL_THE_QGL_VERSION_OF_glClearStencil -#define glClientActiveTexture CALL_THE_QGL_VERSION_OF_glClientActiveTexture -#define glClipPlanex CALL_THE_QGL_VERSION_OF_glClipPlanex -#define glColor4ub CALL_THE_QGL_VERSION_OF_glColor4ub -#define glColor4x CALL_THE_QGL_VERSION_OF_glColor4x -#define glColorMask CALL_THE_QGL_VERSION_OF_glColorMask -#define glColorPointer CALL_THE_QGL_VERSION_OF_glColorPointer -#define glCompressedTexImage2D CALL_THE_QGL_VERSION_OF_glCompressedTexImage2D -#define glCompressedTexSubImage2D CALL_THE_QGL_VERSION_OF_glCompressedTexSubImage2D -#define glCopyTexImage2D CALL_THE_QGL_VERSION_OF_glCopyTexImage2D -#define glCopyTexSubImage2D CALL_THE_QGL_VERSION_OF_glCopyTexSubImage2D -#define glCullFace CALL_THE_QGL_VERSION_OF_glCullFace -#define glDeleteBuffers CALL_THE_QGL_VERSION_OF_glDeleteBuffers -#define glDeleteTextures CALL_THE_QGL_VERSION_OF_glDeleteTextures -#define glDepthFunc CALL_THE_QGL_VERSION_OF_glDepthFunc -#define glDepthMask CALL_THE_QGL_VERSION_OF_glDepthMask -#define glDepthRangex CALL_THE_QGL_VERSION_OF_glDepthRangex -#define glDisable CALL_THE_QGL_VERSION_OF_glDisable -#define glDisableClientState CALL_THE_QGL_VERSION_OF_glDisableClientState -#define glDrawArrays CALL_THE_QGL_VERSION_OF_glDrawArrays -#define glDrawElements CALL_THE_QGL_VERSION_OF_glDrawElements -#define glEnable CALL_THE_QGL_VERSION_OF_glEnable -#define glEnableClientState CALL_THE_QGL_VERSION_OF_glEnableClientState -#define glFinish CALL_THE_QGL_VERSION_OF_glFinish -#define glFlush CALL_THE_QGL_VERSION_OF_glFlush -#define glFogx CALL_THE_QGL_VERSION_OF_glFogx -#define glFogxv CALL_THE_QGL_VERSION_OF_glFogxv -#define glFrontFace CALL_THE_QGL_VERSION_OF_glFrontFace -#define glFrustumx CALL_THE_QGL_VERSION_OF_glFrustumx -#define glGetBooleanv CALL_THE_QGL_VERSION_OF_glGetBooleanv -#define glGetBufferParameteriv CALL_THE_QGL_VERSION_OF_glGetBufferParameteriv -#define glGetClipPlanex CALL_THE_QGL_VERSION_OF_glGetClipPlanex -#define glGenBuffers CALL_THE_QGL_VERSION_OF_glGenBuffers -#define glGenTextures CALL_THE_QGL_VERSION_OF_glGenTextures -#define glGetError CALL_THE_QGL_VERSION_OF_glGetError -#define glGetFixedv CALL_THE_QGL_VERSION_OF_glGetFixedv -#define glGetIntegerv CALL_THE_QGL_VERSION_OF_glGetIntegerv -#define glGetLightxv CALL_THE_QGL_VERSION_OF_glGetLightxv -#define glGetMaterialxv CALL_THE_QGL_VERSION_OF_glGetMaterialxv -#define glGetPointerv CALL_THE_QGL_VERSION_OF_glGetPointerv -#define glGetString CALL_THE_QGL_VERSION_OF_glGetString -#define glGetTexEnviv CALL_THE_QGL_VERSION_OF_glGetTexEnviv -#define glGetTexEnvxv CALL_THE_QGL_VERSION_OF_glGetTexEnvxv -#define glGetTexParameteriv CALL_THE_QGL_VERSION_OF_glGetTexParameteriv -#define glGetTexParameterxv CALL_THE_QGL_VERSION_OF_glGetTexParameterxv -#define glHint CALL_THE_QGL_VERSION_OF_glHint -#define glIsBuffer CALL_THE_QGL_VERSION_OF_glIsBuffer -#define glIsEnabled CALL_THE_QGL_VERSION_OF_glIsEnabled -#define glIsTexture CALL_THE_QGL_VERSION_OF_glIsTexture -#define glLightModelx CALL_THE_QGL_VERSION_OF_glLightModelx -#define glLightModelxv CALL_THE_QGL_VERSION_OF_glLightModelxv -#define glLightx CALL_THE_QGL_VERSION_OF_glLightx -#define glLightxv CALL_THE_QGL_VERSION_OF_glLightxv -#define glLineWidthx CALL_THE_QGL_VERSION_OF_glLineWidthx -#define glLoadIdentity CALL_THE_QGL_VERSION_OF_glLoadIdentity -#define glLoadMatrixx CALL_THE_QGL_VERSION_OF_glLoadMatrixx -#define glLogicOp CALL_THE_QGL_VERSION_OF_glLogicOp -#define glMaterialx CALL_THE_QGL_VERSION_OF_glMaterialx -#define glMaterialxv CALL_THE_QGL_VERSION_OF_glMaterialxv -#define glMatrixMode CALL_THE_QGL_VERSION_OF_glMatrixMode -#define glMultMatrixx CALL_THE_QGL_VERSION_OF_glMultMatrixx -#define glMultiTexCoord4x CALL_THE_QGL_VERSION_OF_glMultiTexCoord4x -#define glNormal3x CALL_THE_QGL_VERSION_OF_glNormal3x -#define glNormalPointer CALL_THE_QGL_VERSION_OF_glNormalPointer -#define glOrthox CALL_THE_QGL_VERSION_OF_glOrthox -#define glPixelStorei CALL_THE_QGL_VERSION_OF_glPixelStorei -#define glPointParameterx CALL_THE_QGL_VERSION_OF_glPointParameterx -#define glPointParameterxv CALL_THE_QGL_VERSION_OF_glPointParameterxv -#define glPointSizex CALL_THE_QGL_VERSION_OF_glPointSizex -#define glPolygonOffsetx CALL_THE_QGL_VERSION_OF_glPolygonOffsetx -#define glPopMatrix CALL_THE_QGL_VERSION_OF_glPopMatrix -#define glPushMatrix CALL_THE_QGL_VERSION_OF_glPushMatrix -#define glReadPixels CALL_THE_QGL_VERSION_OF_glReadPixels -#define glRotatex CALL_THE_QGL_VERSION_OF_glRotatex -#define glSampleCoverage CALL_THE_QGL_VERSION_OF_glSampleCoverage -#define glSampleCoveragex CALL_THE_QGL_VERSION_OF_glSampleCoveragex -#define glScalex CALL_THE_QGL_VERSION_OF_glScalex -#define glScissor CALL_THE_QGL_VERSION_OF_glScissor -#define glShadeModel CALL_THE_QGL_VERSION_OF_glShadeModel -#define glStencilFunc CALL_THE_QGL_VERSION_OF_glStencilFunc -#define glStencilMask CALL_THE_QGL_VERSION_OF_glStencilMask -#define glStencilOp CALL_THE_QGL_VERSION_OF_glStencilOp -#define glTexCoordPointer CALL_THE_QGL_VERSION_OF_glTexCoordPointer -#define glTexEnvi CALL_THE_QGL_VERSION_OF_glTexEnvi -#define glTexEnvx CALL_THE_QGL_VERSION_OF_glTexEnvx -#define glTexEnviv CALL_THE_QGL_VERSION_OF_glTexEnviv -#define glTexEnvxv CALL_THE_QGL_VERSION_OF_glTexEnvxv -#define glTexImage2D CALL_THE_QGL_VERSION_OF_glTexImage2D -#define glTexParameteri CALL_THE_QGL_VERSION_OF_glTexParameteri -#define glTexParameterx CALL_THE_QGL_VERSION_OF_glTexParameterx -#define glTexParameteriv CALL_THE_QGL_VERSION_OF_glTexParameteriv -#define glTexParameterxv CALL_THE_QGL_VERSION_OF_glTexParameterxv -#define glTexSubImage2D CALL_THE_QGL_VERSION_OF_glTexSubImage2D -#define glTranslatex CALL_THE_QGL_VERSION_OF_glTranslatex -#define glVertexPointer CALL_THE_QGL_VERSION_OF_glVertexPointer -#define glViewport CALL_THE_QGL_VERSION_OF_glViewport -#define glCurrentPaletteMatrixOES CALL_THE_QGL_VERSION_OF_glCurrentPaletteMatrixOES -#define glLoadPaletteFromModelViewMatrixOES CALL_THE_QGL_VERSION_OF_glLoadPaletteFromModelViewMatrixOES -#define glMatrixIndexPointerOES CALL_THE_QGL_VERSION_OF_glMatrixIndexPointerOES -#define glWeightPointerOES CALL_THE_QGL_VERSION_OF_glWeightPointerOES -#define glPointSizePointerOES CALL_THE_QGL_VERSION_OF_glPointSizePointerOES -#define glDrawTexsOES CALL_THE_QGL_VERSION_OF_glDrawTexsOES -#define glDrawTexiOES CALL_THE_QGL_VERSION_OF_glDrawTexiOES -#define glDrawTexxOES CALL_THE_QGL_VERSION_OF_glDrawTexxOES -#define glDrawTexsvOES CALL_THE_QGL_VERSION_OF_glDrawTexsvOES -#define glDrawTexivOES CALL_THE_QGL_VERSION_OF_glDrawTexivOES -#define glDrawTexxvOES CALL_THE_QGL_VERSION_OF_glDrawTexxvOES -#define glDrawTexfOES CALL_THE_QGL_VERSION_OF_glDrawTexfOES -#define glDrawTexfvOES CALL_THE_QGL_VERSION_OF_glDrawTexfvOES - -#endif // _IPHONE_QGL_H_ diff --git a/wolf3d/newCode/iphone/iphone_qgl_enumerants.h b/wolf3d/newCode/iphone/iphone_qgl_enumerants.h deleted file mode 100644 index 01892dd..0000000 --- a/wolf3d/newCode/iphone/iphone_qgl_enumerants.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - - Copyright (C) 2009 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - */ - -#ifndef IPHONE_QGL_ENUMERANTS_H -#define IPHONE_QGL_ENUMERANTS_H - -#ifdef QGL_LOG_GL_CALLS - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - const char *StringFromGLEnumerant( GLenum enumerant ); - -#ifdef __cplusplus -} -#endif - -#endif // QGL_LOG_GL_CALLS - -#endif // IPHONE_QGL_ENUMERANTS_H \ No newline at end of file diff --git a/wolf3d/newCode/iphone/iphone_wolf.h b/wolf3d/newCode/iphone/iphone_wolf.h deleted file mode 100644 index 5314edf..0000000 --- a/wolf3d/newCode/iphone/iphone_wolf.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - - Copyright (C) 2009 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - */ - -// define this to get only the first episode on selections, and the -// automatic sell screen at the end of episode 1 -//#define EPISODE_ONE_ONLY - -extern viddef_t viddef; - -typedef enum menuState { - IPM_GAME, - IPM_MAIN, - IPM_SKILL, - IPM_EPISODE, - IPM_MAPS, - IPM_CONTROLS, - IPM_INTERMISSION, - IPM_VICTORY, - IPM_AUTOMAP -} menuState_t; - -extern menuState_t menuState; - -void iphoneDrawMenus(); - -#define SAVEGAME_VERSION 106 - -#define MAX_SKILLS 4 -#define MAX_MAPS 60 - -#define MF_TRIED 1 -#define MF_COMPLETED 2 -#define MF_KILLS 4 -#define MF_SECRETS 8 -#define MF_TREASURE 16 -#define MF_TIME 32 - -typedef struct { - int episode; - int map; - int skill; - int levelCompleted; // already at intermission when saved - int version; - int mapFlags[MAX_SKILLS][MAX_MAPS]; -} currentMap_t; - -extern currentMap_t currentMap; - -void iphoneStartMap( int episodeNum, int mapNum, int skillLevel ); - -extern char iphoneDocDirectory[1024]; -extern char iphoneAppDirectory[1024]; - -extern texture_t *numberPics[10]; - -extern vec3_t vnull; - -void Client_PrepRefresh( const char *r_mapname ); - -extern int iphoneFrameNum; -extern int intermissionTriggerFrame; -extern int consoleActive; - -extern cvar_t *controlScheme; -extern cvar_t *sensitivity; -extern cvar_t *stickSize; -extern cvar_t *stickTurnBase; -extern cvar_t *stickTurnScale; -extern cvar_t *stickMoveBase; -extern cvar_t *stickMoveScale; -extern cvar_t *stickDeadBand; -extern cvar_t *tiltTurn; -extern cvar_t *tiltMove; -extern cvar_t *tiltDeadBand; -extern cvar_t *tiltAverages; -extern cvar_t *tiltFire; -extern cvar_t *music; -extern cvar_t *showTilt; -extern cvar_t *cropSprites; -extern cvar_t *blends; -extern cvar_t *gunFrame; -extern cvar_t *slowAI; - -// the native iPhone code should set the following each frame: -extern int numTouches; -extern int touches[5][2]; // [0] = x, [1] = y in landscape mode, raster order with y = 0 at top -extern float tilt; // -1.0 to 1.0 -extern float tiltPitch; - -// so we can detect button releases -extern int numPrevTouches; -extern int prevTouches[5][2]; - - -// the layout drawing code sets these, which are then used -// by the touch processing -extern int menuButtonX, menuButtonY, menuButtonSize; -extern int fireButtonX, fireButtonY, fireButtonSize; -extern int moveAxisX, moveAxisY, moveAxisSize; -extern int turnAxisX, turnAxisY, turnAxisSize; - -// incremented once each frame, regardless of framerate -extern int frameNum; - -int TouchDown( int x, int y, int w, int h ); -int TouchReleased( int x, int y, int w, int h ); -int iphoneCenterText( int x, int y, const char *str ); -void iphoneDrawNumber( int x, int y, int number, int charWidth, int charHeight ); -void iphoneDrawPic( int x, int y, int w, int h, const char *pic ); -void R_Draw_Blend( int x, int y, int w, int h, colour4_t c ); -void SaveTheGame(); -int LoadTheGame(); -void StartGame( void ); -void iphoneShutdown(); -void iphoneOpenAutomap(); - -void InitImmediateModeGL(); - -extern colour4_t colorPressed; - -extern int damageflash; -extern int bonusFrameNum; -extern int attackDirTime[2]; - -// interfaces from the game code -void iphoneStartBonusFlash(); -void iphoneStartDamageFlash( int points ); -void iphoneSetAttackDirection( int dir ); -void iphoneStartIntermission( int framesFromNow ); -void iphoneSetNotifyText( const char *str, ... ); - -// interfaces to hadware / system -void OpenURL( const char *url ); - diff --git a/wolf3d/newCode/iphone/main.m b/wolf3d/newCode/iphone/main.m deleted file mode 100644 index 189bf40..0000000 --- a/wolf3d/newCode/iphone/main.m +++ /dev/null @@ -1,45 +0,0 @@ -/* - - Copyright (C) 2009 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - */ - -#import -#include -#include - -int main(int argc, char *argv[]) { - - { - char cwd[256]; - strcpy( cwd, argv[0] ); - int len = strlen( cwd ); - for( int i = len-1; i >= 0; i-- ) { - if ( cwd[i] == '/' ) { - cwd[i] = 0; - break; - } - cwd[i] = 0; - } - setenv( "CWD", cwd, 1 ); - } - - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, nil); - [pool release]; - return retVal; -} diff --git a/wolf3d/newCode/iphone/wolf3d.xcodeproj/project.pbxproj b/wolf3d/newCode/iphone/wolf3d.xcodeproj/project.pbxproj deleted file mode 100644 index be678b7..0000000 --- a/wolf3d/newCode/iphone/wolf3d.xcodeproj/project.pbxproj +++ /dev/null @@ -1,847 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; - 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; }; - 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; }; - 4333CCE80F5CC23E00AE2B6F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4333CCE70F5CC23E00AE2B6F /* AudioToolbox.framework */; }; - 4364BF3F0F5CB25900F29317 /* dist.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4364BF3E0F5CB25900F29317 /* dist.plist */; }; - 43AE7CAB0F61FB0E00B2F562 /* wolf3dEpisode1_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 43AE7CAA0F61FB0E00B2F562 /* wolf3dEpisode1_icon.png */; }; - 43AE7E9F0F67387500B2F562 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43AE7E9E0F67387500B2F562 /* CoreGraphics.framework */; }; - 43CF02ED0F56955F00E4A23D /* wolf3d_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 43CF02EC0F56955F00E4A23D /* wolf3d_icon.png */; }; - 43CF02FF0F56974E00E4A23D /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 43CF02FE0F56974E00E4A23D /* Default.png */; }; - 43CF030A0F56D5C200E4A23D /* iphone_loop.c in Sources */ = {isa = PBXBuildFile; fileRef = 43CF03090F56D5C200E4A23D /* iphone_loop.c */; }; - 43E8D2E10F4FC61E003F09B2 /* iphone_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 43E8D2DF0F4FC61E003F09B2 /* iphone_main.c */; }; - 43E8D4E00F51B48B003F09B2 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43E8D4DF0F51B48B003F09B2 /* OpenAL.framework */; }; - 7229CC460F6B3222004123C5 /* wolf_actor_ai.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC250F6B3222004123C5 /* wolf_actor_ai.c */; }; - 7229CC470F6B3222004123C5 /* wolf_actors.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC270F6B3222004123C5 /* wolf_actors.c */; }; - 7229CC480F6B3222004123C5 /* wolf_ai_com.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC290F6B3222004123C5 /* wolf_ai_com.c */; }; - 7229CC490F6B3222004123C5 /* wolf_areas.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC2B0F6B3222004123C5 /* wolf_areas.c */; }; - 7229CC4A0F6B3222004123C5 /* wolf_bj.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC2C0F6B3222004123C5 /* wolf_bj.c */; }; - 7229CC4B0F6B3222004123C5 /* wolf_client_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC2E0F6B3222004123C5 /* wolf_client_main.c */; }; - 7229CC4D0F6B3222004123C5 /* wolf_doors.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC300F6B3222004123C5 /* wolf_doors.c */; }; - 7229CC4E0F6B3222004123C5 /* wolf_level.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC310F6B3222004123C5 /* wolf_level.c */; }; - 7229CC4F0F6B3222004123C5 /* wolf_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC340F6B3222004123C5 /* wolf_main.c */; }; - 7229CC500F6B3222004123C5 /* wolf_math.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC350F6B3222004123C5 /* wolf_math.c */; }; - 7229CC510F6B3222004123C5 /* wolf_opengl.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC370F6B3222004123C5 /* wolf_opengl.c */; }; - 7229CC520F6B3222004123C5 /* wolf_player.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC380F6B3222004123C5 /* wolf_player.c */; }; - 7229CC530F6B3222004123C5 /* wolf_powerups.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC3A0F6B3222004123C5 /* wolf_powerups.c */; }; - 7229CC540F6B3222004123C5 /* wolf_pushwalls.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC3C0F6B3222004123C5 /* wolf_pushwalls.c */; }; - 7229CC550F6B3222004123C5 /* wolf_raycast.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC3D0F6B3222004123C5 /* wolf_raycast.c */; }; - 7229CC560F6B3222004123C5 /* wolf_renderer.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC3F0F6B3222004123C5 /* wolf_renderer.c */; }; - 7229CC570F6B3222004123C5 /* wolf_sprites.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC410F6B3222004123C5 /* wolf_sprites.c */; }; - 7229CC580F6B3222004123C5 /* wolf_sv_ccmds.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC430F6B3222004123C5 /* wolf_sv_ccmds.c */; }; - 7229CC590F6B3222004123C5 /* wolf_weapon.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC440F6B3222004123C5 /* wolf_weapon.c */; }; - 7229CC7D0F6B3295004123C5 /* bitwise.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC5D0F6B3295004123C5 /* bitwise.c */; }; - 7229CC7E0F6B3295004123C5 /* block.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC5E0F6B3295004123C5 /* block.c */; }; - 7229CC7F0F6B3295004123C5 /* codebook.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC600F6B3295004123C5 /* codebook.c */; }; - 7229CC800F6B3295004123C5 /* floor0.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC640F6B3295004123C5 /* floor0.c */; }; - 7229CC810F6B3295004123C5 /* floor1.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC650F6B3295004123C5 /* floor1.c */; }; - 7229CC820F6B3295004123C5 /* framing.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC660F6B3295004123C5 /* framing.c */; }; - 7229CC830F6B3295004123C5 /* info.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC670F6B3295004123C5 /* info.c */; }; - 7229CC850F6B3295004123C5 /* mapping0.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC6C0F6B3295004123C5 /* mapping0.c */; }; - 7229CC860F6B3295004123C5 /* mdct.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC6D0F6B3295004123C5 /* mdct.c */; }; - 7229CC870F6B3295004123C5 /* registry.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC740F6B3295004123C5 /* registry.c */; }; - 7229CC880F6B3295004123C5 /* res012.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC760F6B3295004123C5 /* res012.c */; }; - 7229CC890F6B3295004123C5 /* sharedbook.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC770F6B3295004123C5 /* sharedbook.c */; }; - 7229CC8A0F6B3295004123C5 /* synthesis.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC780F6B3295004123C5 /* synthesis.c */; }; - 7229CC8B0F6B3295004123C5 /* vorbisfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC790F6B3295004123C5 /* vorbisfile.c */; }; - 7229CC8C0F6B3295004123C5 /* window.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CC7A0F6B3295004123C5 /* window.c */; }; - 7229CE4A0F6C89F8004123C5 /* EAGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7229CE460F6C89F8004123C5 /* EAGLView.m */; }; - 7229CE4C0F6C89F8004123C5 /* wolf3dAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7229CE490F6C89F8004123C5 /* wolf3dAppDelegate.m */; }; - 7229CE550F6C8CDE004123C5 /* gles_glue.c in Sources */ = {isa = PBXBuildFile; fileRef = 7229CE540F6C8CDE004123C5 /* gles_glue.c */; }; - 72935B740F6B2D9D0085DD28 /* angle.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B1A0F6B2D9D0085DD28 /* angle.c */; }; - 72935B750F6B2D9D0085DD28 /* arch.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B1D0F6B2D9D0085DD28 /* arch.c */; }; - 72935B790F6B2D9D0085DD28 /* cmd.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B230F6B2D9D0085DD28 /* cmd.c */; }; - 72935B7A0F6B2D9D0085DD28 /* com_string.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B250F6B2D9D0085DD28 /* com_string.c */; }; - 72935B7B0F6B2D9D0085DD28 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B270F6B2D9D0085DD28 /* common.c */; }; - 72935B7C0F6B2D9D0085DD28 /* console.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B2A0F6B2D9D0085DD28 /* console.c */; }; - 72935B7E0F6B2D9D0085DD28 /* cvar.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B2D0F6B2D9D0085DD28 /* cvar.c */; }; - 72935B7F0F6B2D9D0085DD28 /* fileio.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B2F0F6B2D9D0085DD28 /* fileio.c */; }; - 72935B800F6B2D9D0085DD28 /* files.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B310F6B2D9D0085DD28 /* files.c */; }; - 72935B810F6B2D9D0085DD28 /* filestring.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B320F6B2D9D0085DD28 /* filestring.c */; }; - 72935B820F6B2D9D0085DD28 /* font_manager.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B350F6B2D9D0085DD28 /* font_manager.c */; }; - 72935B830F6B2D9D0085DD28 /* glob.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B370F6B2D9D0085DD28 /* glob.c */; }; - 72935B870F6B2D9D0085DD28 /* math.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B3E0F6B2D9D0085DD28 /* math.c */; }; - 72935B880F6B2D9D0085DD28 /* matrix.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B3F0F6B2D9D0085DD28 /* matrix.c */; }; - 72935B890F6B2D9D0085DD28 /* memory.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B410F6B2D9D0085DD28 /* memory.c */; }; - 72935B8B0F6B2D9D0085DD28 /* oggfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B490F6B2D9D0085DD28 /* oggfile.c */; }; - 72935B8C0F6B2D9D0085DD28 /* openal_binding.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B4B0F6B2D9D0085DD28 /* openal_binding.c */; }; - 72935B8D0F6B2D9D0085DD28 /* openal_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B4D0F6B2D9D0085DD28 /* openal_main.c */; }; - 72935B8F0F6B2D9D0085DD28 /* opengl_draw.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B500F6B2D9D0085DD28 /* opengl_draw.c */; }; - 72935B910F6B2D9D0085DD28 /* opengl_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B530F6B2D9D0085DD28 /* opengl_main.c */; }; - 72935B920F6B2D9D0085DD28 /* opengl_texture.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B540F6B2D9D0085DD28 /* opengl_texture.c */; }; - 72935B930F6B2D9D0085DD28 /* random_number.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B560F6B2D9D0085DD28 /* random_number.c */; }; - 72935B940F6B2D9D0085DD28 /* share.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B590F6B2D9D0085DD28 /* share.c */; }; - 72935B950F6B2D9D0085DD28 /* sound.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B5A0F6B2D9D0085DD28 /* sound.c */; }; - 72935B960F6B2D9D0085DD28 /* sound_sfx_id.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B5D0F6B2D9D0085DD28 /* sound_sfx_id.c */; }; - 72935B970F6B2D9D0085DD28 /* sound_stream.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B5E0F6B2D9D0085DD28 /* sound_stream.c */; }; - 72935B990F6B2D9D0085DD28 /* texture_manager.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B610F6B2D9D0085DD28 /* texture_manager.c */; }; - 72935B9A0F6B2D9D0085DD28 /* tga.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B630F6B2D9D0085DD28 /* tga.c */; }; - 72935B9C0F6B2D9D0085DD28 /* unix_file.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B680F6B2D9D0085DD28 /* unix_file.c */; }; - 72935B9E0F6B2D9D0085DD28 /* unix_timer.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B6A0F6B2D9D0085DD28 /* unix_timer.c */; }; - 72935B9F0F6B2D9D0085DD28 /* vector.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B6B0F6B2D9D0085DD28 /* vector.c */; }; - 72935BA00F6B2D9D0085DD28 /* wavfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B6E0F6B2D9D0085DD28 /* wavfile.c */; }; - 72935BA20F6B2D9D0085DD28 /* zmem.c in Sources */ = {isa = PBXBuildFile; fileRef = 72935B720F6B2D9D0085DD28 /* zmem.c */; }; - 72A7E8F70F5F2063005B83C0 /* iphone_menus.c in Sources */ = {isa = PBXBuildFile; fileRef = 72A7E8F60F5F2063005B83C0 /* iphone_menus.c */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D6058910D05DD3D006BFB54 /* wolf3d.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = wolf3d.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; - 28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; - 28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 32CA4F630368D1EE00C91783 /* wolf3d_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wolf3d_Prefix.pch; sourceTree = ""; }; - 4333CCE70F5CC23E00AE2B6F /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; - 4364BF3E0F5CB25900F29317 /* dist.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = dist.plist; sourceTree = ""; }; - 43AE7CAA0F61FB0E00B2F562 /* wolf3dEpisode1_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = wolf3dEpisode1_icon.png; sourceTree = ""; }; - 43AE7E9E0F67387500B2F562 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 43CF02EC0F56955F00E4A23D /* wolf3d_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = wolf3d_icon.png; sourceTree = ""; }; - 43CF02FE0F56974E00E4A23D /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; - 43CF03090F56D5C200E4A23D /* iphone_loop.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = iphone_loop.c; sourceTree = ""; }; - 43E8D2DF0F4FC61E003F09B2 /* iphone_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = iphone_main.c; sourceTree = ""; }; - 43E8D4DF0F51B48B003F09B2 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = /System/Library/Frameworks/OpenAL.framework; sourceTree = ""; }; - 7229CC240F6B3222004123C5 /* wolf_act_stat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wolf_act_stat.h; path = ../wolf/wolf_act_stat.h; sourceTree = SOURCE_ROOT; }; - 7229CC250F6B3222004123C5 /* wolf_actor_ai.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolf_actor_ai.c; path = ../wolf/wolf_actor_ai.c; sourceTree = SOURCE_ROOT; }; - 7229CC260F6B3222004123C5 /* wolf_actor_ai.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wolf_actor_ai.h; path = ../wolf/wolf_actor_ai.h; sourceTree = SOURCE_ROOT; }; - 7229CC270F6B3222004123C5 /* wolf_actors.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolf_actors.c; path = ../wolf/wolf_actors.c; sourceTree = SOURCE_ROOT; }; - 7229CC280F6B3222004123C5 /* wolf_actors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wolf_actors.h; path = ../wolf/wolf_actors.h; sourceTree = SOURCE_ROOT; }; - 7229CC290F6B3222004123C5 /* wolf_ai_com.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolf_ai_com.c; path = ../wolf/wolf_ai_com.c; sourceTree = SOURCE_ROOT; }; - 7229CC2A0F6B3222004123C5 /* wolf_ai_com.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wolf_ai_com.h; path = ../wolf/wolf_ai_com.h; sourceTree = SOURCE_ROOT; }; - 7229CC2B0F6B3222004123C5 /* wolf_areas.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolf_areas.c; path = ../wolf/wolf_areas.c; sourceTree = SOURCE_ROOT; }; - 7229CC2C0F6B3222004123C5 /* wolf_bj.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolf_bj.c; path = ../wolf/wolf_bj.c; sourceTree = SOURCE_ROOT; }; - 7229CC2D0F6B3222004123C5 /* wolf_bj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wolf_bj.h; path = ../wolf/wolf_bj.h; sourceTree = SOURCE_ROOT; }; - 7229CC2E0F6B3222004123C5 /* wolf_client_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolf_client_main.c; path = ../wolf/wolf_client_main.c; sourceTree = SOURCE_ROOT; }; - 7229CC300F6B3222004123C5 /* wolf_doors.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolf_doors.c; path = ../wolf/wolf_doors.c; sourceTree = SOURCE_ROOT; }; - 7229CC310F6B3222004123C5 /* wolf_level.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolf_level.c; path = ../wolf/wolf_level.c; sourceTree = SOURCE_ROOT; }; - 7229CC320F6B3222004123C5 /* wolf_level.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wolf_level.h; path = ../wolf/wolf_level.h; sourceTree = SOURCE_ROOT; }; - 7229CC330F6B3222004123C5 /* wolf_local.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wolf_local.h; path = ../wolf/wolf_local.h; sourceTree = SOURCE_ROOT; }; - 7229CC340F6B3222004123C5 /* wolf_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolf_main.c; path = ../wolf/wolf_main.c; sourceTree = SOURCE_ROOT; }; - 7229CC350F6B3222004123C5 /* wolf_math.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolf_math.c; path = ../wolf/wolf_math.c; sourceTree = SOURCE_ROOT; }; - 7229CC360F6B3222004123C5 /* wolf_math.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wolf_math.h; path = ../wolf/wolf_math.h; sourceTree = SOURCE_ROOT; }; - 7229CC370F6B3222004123C5 /* wolf_opengl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolf_opengl.c; path = ../wolf/wolf_opengl.c; sourceTree = SOURCE_ROOT; }; - 7229CC380F6B3222004123C5 /* wolf_player.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolf_player.c; path = ../wolf/wolf_player.c; sourceTree = SOURCE_ROOT; }; - 7229CC390F6B3222004123C5 /* wolf_player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wolf_player.h; path = ../wolf/wolf_player.h; sourceTree = SOURCE_ROOT; }; - 7229CC3A0F6B3222004123C5 /* wolf_powerups.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolf_powerups.c; path = ../wolf/wolf_powerups.c; sourceTree = SOURCE_ROOT; }; - 7229CC3B0F6B3222004123C5 /* wolf_powerups.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wolf_powerups.h; path = ../wolf/wolf_powerups.h; sourceTree = SOURCE_ROOT; }; - 7229CC3C0F6B3222004123C5 /* wolf_pushwalls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolf_pushwalls.c; path = ../wolf/wolf_pushwalls.c; sourceTree = SOURCE_ROOT; }; - 7229CC3D0F6B3222004123C5 /* wolf_raycast.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolf_raycast.c; path = ../wolf/wolf_raycast.c; sourceTree = SOURCE_ROOT; }; - 7229CC3E0F6B3222004123C5 /* wolf_raycast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wolf_raycast.h; path = ../wolf/wolf_raycast.h; sourceTree = SOURCE_ROOT; }; - 7229CC3F0F6B3222004123C5 /* wolf_renderer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolf_renderer.c; path = ../wolf/wolf_renderer.c; sourceTree = SOURCE_ROOT; }; - 7229CC400F6B3222004123C5 /* wolf_renderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wolf_renderer.h; path = ../wolf/wolf_renderer.h; sourceTree = SOURCE_ROOT; }; - 7229CC410F6B3222004123C5 /* wolf_sprites.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolf_sprites.c; path = ../wolf/wolf_sprites.c; sourceTree = SOURCE_ROOT; }; - 7229CC420F6B3222004123C5 /* wolf_sprites.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wolf_sprites.h; path = ../wolf/wolf_sprites.h; sourceTree = SOURCE_ROOT; }; - 7229CC430F6B3222004123C5 /* wolf_sv_ccmds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolf_sv_ccmds.c; path = ../wolf/wolf_sv_ccmds.c; sourceTree = SOURCE_ROOT; }; - 7229CC440F6B3222004123C5 /* wolf_weapon.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolf_weapon.c; path = ../wolf/wolf_weapon.c; sourceTree = SOURCE_ROOT; }; - 7229CC5B0F6B3295004123C5 /* asm_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = asm_arm.h; path = ../Tremor/asm_arm.h; sourceTree = SOURCE_ROOT; }; - 7229CC5C0F6B3295004123C5 /* backends.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = backends.h; path = ../Tremor/backends.h; sourceTree = SOURCE_ROOT; }; - 7229CC5D0F6B3295004123C5 /* bitwise.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bitwise.c; path = ../Tremor/bitwise.c; sourceTree = SOURCE_ROOT; }; - 7229CC5E0F6B3295004123C5 /* block.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = block.c; path = ../Tremor/block.c; sourceTree = SOURCE_ROOT; }; - 7229CC5F0F6B3295004123C5 /* block.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = block.h; path = ../Tremor/block.h; sourceTree = SOURCE_ROOT; }; - 7229CC600F6B3295004123C5 /* codebook.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = codebook.c; path = ../Tremor/codebook.c; sourceTree = SOURCE_ROOT; }; - 7229CC610F6B3295004123C5 /* codebook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = codebook.h; path = ../Tremor/codebook.h; sourceTree = SOURCE_ROOT; }; - 7229CC620F6B3295004123C5 /* codec_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = codec_internal.h; path = ../Tremor/codec_internal.h; sourceTree = SOURCE_ROOT; }; - 7229CC630F6B3295004123C5 /* config_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config_types.h; path = ../Tremor/config_types.h; sourceTree = SOURCE_ROOT; }; - 7229CC640F6B3295004123C5 /* floor0.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = floor0.c; path = ../Tremor/floor0.c; sourceTree = SOURCE_ROOT; }; - 7229CC650F6B3295004123C5 /* floor1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = floor1.c; path = ../Tremor/floor1.c; sourceTree = SOURCE_ROOT; }; - 7229CC660F6B3295004123C5 /* framing.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = framing.c; path = ../Tremor/framing.c; sourceTree = SOURCE_ROOT; }; - 7229CC670F6B3295004123C5 /* info.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = info.c; path = ../Tremor/info.c; sourceTree = SOURCE_ROOT; }; - 7229CC680F6B3295004123C5 /* ivorbiscodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ivorbiscodec.h; path = ../Tremor/ivorbiscodec.h; sourceTree = SOURCE_ROOT; }; - 7229CC690F6B3295004123C5 /* ivorbisfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ivorbisfile.h; path = ../Tremor/ivorbisfile.h; sourceTree = SOURCE_ROOT; }; - 7229CC6B0F6B3295004123C5 /* lsp_lookup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lsp_lookup.h; path = ../Tremor/lsp_lookup.h; sourceTree = SOURCE_ROOT; }; - 7229CC6C0F6B3295004123C5 /* mapping0.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mapping0.c; path = ../Tremor/mapping0.c; sourceTree = SOURCE_ROOT; }; - 7229CC6D0F6B3295004123C5 /* mdct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mdct.c; path = ../Tremor/mdct.c; sourceTree = SOURCE_ROOT; }; - 7229CC6E0F6B3295004123C5 /* mdct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mdct.h; path = ../Tremor/mdct.h; sourceTree = SOURCE_ROOT; }; - 7229CC6F0F6B3295004123C5 /* mdct_lookup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mdct_lookup.h; path = ../Tremor/mdct_lookup.h; sourceTree = SOURCE_ROOT; }; - 7229CC700F6B3295004123C5 /* misc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = misc.h; path = ../Tremor/misc.h; sourceTree = SOURCE_ROOT; }; - 7229CC710F6B3295004123C5 /* ogg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ogg.h; path = ../Tremor/ogg.h; sourceTree = SOURCE_ROOT; }; - 7229CC720F6B3295004123C5 /* os.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = os.h; path = ../Tremor/os.h; sourceTree = SOURCE_ROOT; }; - 7229CC730F6B3295004123C5 /* os_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = os_types.h; path = ../Tremor/os_types.h; sourceTree = SOURCE_ROOT; }; - 7229CC740F6B3295004123C5 /* registry.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = registry.c; path = ../Tremor/registry.c; sourceTree = SOURCE_ROOT; }; - 7229CC750F6B3295004123C5 /* registry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = registry.h; path = ../Tremor/registry.h; sourceTree = SOURCE_ROOT; }; - 7229CC760F6B3295004123C5 /* res012.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = res012.c; path = ../Tremor/res012.c; sourceTree = SOURCE_ROOT; }; - 7229CC770F6B3295004123C5 /* sharedbook.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sharedbook.c; path = ../Tremor/sharedbook.c; sourceTree = SOURCE_ROOT; }; - 7229CC780F6B3295004123C5 /* synthesis.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = synthesis.c; path = ../Tremor/synthesis.c; sourceTree = SOURCE_ROOT; }; - 7229CC790F6B3295004123C5 /* vorbisfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vorbisfile.c; path = ../Tremor/vorbisfile.c; sourceTree = SOURCE_ROOT; }; - 7229CC7A0F6B3295004123C5 /* window.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = window.c; path = ../Tremor/window.c; sourceTree = SOURCE_ROOT; }; - 7229CC7B0F6B3295004123C5 /* window.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = window.h; path = ../Tremor/window.h; sourceTree = SOURCE_ROOT; }; - 7229CC7C0F6B3295004123C5 /* window_lookup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = window_lookup.h; path = ../Tremor/window_lookup.h; sourceTree = SOURCE_ROOT; }; - 7229CC8E0F6B3363004123C5 /* wolfiphone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wolfiphone.h; path = ../wolfiphone.h; sourceTree = SOURCE_ROOT; }; - 7229CE450F6C89F8004123C5 /* EAGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EAGLView.h; sourceTree = ""; }; - 7229CE460F6C89F8004123C5 /* EAGLView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EAGLView.m; sourceTree = ""; }; - 7229CE480F6C89F8004123C5 /* wolf3dAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wolf3dAppDelegate.h; sourceTree = ""; }; - 7229CE490F6C89F8004123C5 /* wolf3dAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = wolf3dAppDelegate.m; sourceTree = ""; }; - 7229CE540F6C8CDE004123C5 /* gles_glue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gles_glue.c; sourceTree = ""; }; - 72935B1A0F6B2D9D0085DD28 /* angle.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = angle.c; path = ../env/angle.c; sourceTree = SOURCE_ROOT; }; - 72935B1B0F6B2D9D0085DD28 /* angle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = angle.h; path = ../env/angle.h; sourceTree = SOURCE_ROOT; }; - 72935B1C0F6B2D9D0085DD28 /* app_def.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = app_def.h; path = ../env/app_def.h; sourceTree = SOURCE_ROOT; }; - 72935B1D0F6B2D9D0085DD28 /* arch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = arch.c; path = ../env/arch.c; sourceTree = SOURCE_ROOT; }; - 72935B1E0F6B2D9D0085DD28 /* arch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = arch.h; path = ../env/arch.h; sourceTree = SOURCE_ROOT; }; - 72935B230F6B2D9D0085DD28 /* cmd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmd.c; path = ../env/cmd.c; sourceTree = SOURCE_ROOT; }; - 72935B240F6B2D9D0085DD28 /* cmd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cmd.h; path = ../env/cmd.h; sourceTree = SOURCE_ROOT; }; - 72935B250F6B2D9D0085DD28 /* com_string.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = com_string.c; path = ../env/com_string.c; sourceTree = SOURCE_ROOT; }; - 72935B260F6B2D9D0085DD28 /* com_string.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = com_string.h; path = ../env/com_string.h; sourceTree = SOURCE_ROOT; }; - 72935B270F6B2D9D0085DD28 /* common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = common.c; path = ../env/common.c; sourceTree = SOURCE_ROOT; }; - 72935B280F6B2D9D0085DD28 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = common.h; path = ../env/common.h; sourceTree = SOURCE_ROOT; }; - 72935B290F6B2D9D0085DD28 /* common_utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = common_utils.h; path = ../env/common_utils.h; sourceTree = SOURCE_ROOT; }; - 72935B2A0F6B2D9D0085DD28 /* console.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = console.c; path = ../env/console.c; sourceTree = SOURCE_ROOT; }; - 72935B2B0F6B2D9D0085DD28 /* console.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = console.h; path = ../env/console.h; sourceTree = SOURCE_ROOT; }; - 72935B2D0F6B2D9D0085DD28 /* cvar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cvar.c; path = ../env/cvar.c; sourceTree = SOURCE_ROOT; }; - 72935B2E0F6B2D9D0085DD28 /* cvar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cvar.h; path = ../env/cvar.h; sourceTree = SOURCE_ROOT; }; - 72935B2F0F6B2D9D0085DD28 /* fileio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = fileio.c; path = ../env/fileio.c; sourceTree = SOURCE_ROOT; }; - 72935B310F6B2D9D0085DD28 /* files.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = files.c; path = ../env/files.c; sourceTree = SOURCE_ROOT; }; - 72935B320F6B2D9D0085DD28 /* filestring.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = filestring.c; path = ../env/filestring.c; sourceTree = SOURCE_ROOT; }; - 72935B330F6B2D9D0085DD28 /* filestring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = filestring.h; path = ../env/filestring.h; sourceTree = SOURCE_ROOT; }; - 72935B340F6B2D9D0085DD28 /* filesystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = filesystem.h; path = ../env/filesystem.h; sourceTree = SOURCE_ROOT; }; - 72935B350F6B2D9D0085DD28 /* font_manager.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = font_manager.c; path = ../env/font_manager.c; sourceTree = SOURCE_ROOT; }; - 72935B360F6B2D9D0085DD28 /* font_manager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = font_manager.h; path = ../env/font_manager.h; sourceTree = SOURCE_ROOT; }; - 72935B370F6B2D9D0085DD28 /* glob.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = glob.c; path = ../env/glob.c; sourceTree = SOURCE_ROOT; }; - 72935B380F6B2D9D0085DD28 /* glob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = glob.h; path = ../env/glob.h; sourceTree = SOURCE_ROOT; }; - 72935B3E0F6B2D9D0085DD28 /* math.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = math.c; path = ../env/math.c; sourceTree = SOURCE_ROOT; }; - 72935B3F0F6B2D9D0085DD28 /* matrix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = matrix.c; path = ../env/matrix.c; sourceTree = SOURCE_ROOT; }; - 72935B400F6B2D9D0085DD28 /* matrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = matrix.h; path = ../env/matrix.h; sourceTree = SOURCE_ROOT; }; - 72935B410F6B2D9D0085DD28 /* memory.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = memory.c; path = ../env/memory.c; sourceTree = SOURCE_ROOT; }; - 72935B420F6B2D9D0085DD28 /* memory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = memory.h; path = ../env/memory.h; sourceTree = SOURCE_ROOT; }; - 72935B450F6B2D9D0085DD28 /* mymath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mymath.h; path = ../env/mymath.h; sourceTree = SOURCE_ROOT; }; - 72935B460F6B2D9D0085DD28 /* myopengl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = myopengl.h; path = ../env/myopengl.h; sourceTree = SOURCE_ROOT; }; - 72935B470F6B2D9D0085DD28 /* myopengl_extension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = myopengl_extension.h; path = ../env/myopengl_extension.h; sourceTree = SOURCE_ROOT; }; - 72935B480F6B2D9D0085DD28 /* num_type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = num_type.h; path = ../env/num_type.h; sourceTree = SOURCE_ROOT; }; - 72935B490F6B2D9D0085DD28 /* oggfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = oggfile.c; path = ../env/oggfile.c; sourceTree = SOURCE_ROOT; }; - 72935B4A0F6B2D9D0085DD28 /* oggfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = oggfile.h; path = ../env/oggfile.h; sourceTree = SOURCE_ROOT; }; - 72935B4B0F6B2D9D0085DD28 /* openal_binding.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = openal_binding.c; path = ../env/openal_binding.c; sourceTree = SOURCE_ROOT; }; - 72935B4C0F6B2D9D0085DD28 /* openal_binding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = openal_binding.h; path = ../env/openal_binding.h; sourceTree = SOURCE_ROOT; }; - 72935B4D0F6B2D9D0085DD28 /* openal_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = openal_main.c; path = ../env/openal_main.c; sourceTree = SOURCE_ROOT; }; - 72935B500F6B2D9D0085DD28 /* opengl_draw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = opengl_draw.c; path = ../env/opengl_draw.c; sourceTree = SOURCE_ROOT; }; - 72935B520F6B2D9D0085DD28 /* opengl_local.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = opengl_local.h; path = ../env/opengl_local.h; sourceTree = SOURCE_ROOT; }; - 72935B530F6B2D9D0085DD28 /* opengl_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = opengl_main.c; path = ../env/opengl_main.c; sourceTree = SOURCE_ROOT; }; - 72935B540F6B2D9D0085DD28 /* opengl_texture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = opengl_texture.c; path = ../env/opengl_texture.c; sourceTree = SOURCE_ROOT; }; - 72935B560F6B2D9D0085DD28 /* random_number.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = random_number.c; path = ../env/random_number.c; sourceTree = SOURCE_ROOT; }; - 72935B570F6B2D9D0085DD28 /* random_number.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = random_number.h; path = ../env/random_number.h; sourceTree = SOURCE_ROOT; }; - 72935B580F6B2D9D0085DD28 /* renderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = renderer.h; path = ../env/renderer.h; sourceTree = SOURCE_ROOT; }; - 72935B590F6B2D9D0085DD28 /* share.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = share.c; path = ../env/share.c; sourceTree = SOURCE_ROOT; }; - 72935B5A0F6B2D9D0085DD28 /* sound.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sound.c; path = ../env/sound.c; sourceTree = SOURCE_ROOT; }; - 72935B5B0F6B2D9D0085DD28 /* sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sound.h; path = ../env/sound.h; sourceTree = SOURCE_ROOT; }; - 72935B5C0F6B2D9D0085DD28 /* sound_local.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sound_local.h; path = ../env/sound_local.h; sourceTree = SOURCE_ROOT; }; - 72935B5D0F6B2D9D0085DD28 /* sound_sfx_id.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sound_sfx_id.c; path = ../env/sound_sfx_id.c; sourceTree = SOURCE_ROOT; }; - 72935B5E0F6B2D9D0085DD28 /* sound_stream.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sound_stream.c; path = ../env/sound_stream.c; sourceTree = SOURCE_ROOT; }; - 72935B610F6B2D9D0085DD28 /* texture_manager.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = texture_manager.c; path = ../env/texture_manager.c; sourceTree = SOURCE_ROOT; }; - 72935B620F6B2D9D0085DD28 /* texture_manager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = texture_manager.h; path = ../env/texture_manager.h; sourceTree = SOURCE_ROOT; }; - 72935B630F6B2D9D0085DD28 /* tga.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tga.c; path = ../env/tga.c; sourceTree = SOURCE_ROOT; }; - 72935B640F6B2D9D0085DD28 /* tga.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tga.h; path = ../env/tga.h; sourceTree = SOURCE_ROOT; }; - 72935B650F6B2D9D0085DD28 /* timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = timer.h; path = ../env/timer.h; sourceTree = SOURCE_ROOT; }; - 72935B680F6B2D9D0085DD28 /* unix_file.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = unix_file.c; path = ../env/unix_file.c; sourceTree = SOURCE_ROOT; }; - 72935B6A0F6B2D9D0085DD28 /* unix_timer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = unix_timer.c; path = ../env/unix_timer.c; sourceTree = SOURCE_ROOT; }; - 72935B6B0F6B2D9D0085DD28 /* vector.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vector.c; path = ../env/vector.c; sourceTree = SOURCE_ROOT; }; - 72935B6C0F6B2D9D0085DD28 /* vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = vector.h; path = ../env/vector.h; sourceTree = SOURCE_ROOT; }; - 72935B6D0F6B2D9D0085DD28 /* video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = video.h; path = ../env/video.h; sourceTree = SOURCE_ROOT; }; - 72935B6E0F6B2D9D0085DD28 /* wavfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wavfile.c; path = ../env/wavfile.c; sourceTree = SOURCE_ROOT; }; - 72935B6F0F6B2D9D0085DD28 /* wavfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wavfile.h; path = ../env/wavfile.h; sourceTree = SOURCE_ROOT; }; - 72935B720F6B2D9D0085DD28 /* zmem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = zmem.c; path = ../env/zmem.c; sourceTree = SOURCE_ROOT; }; - 72935B730F6B2D9D0085DD28 /* zmem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = zmem.h; path = ../env/zmem.h; sourceTree = SOURCE_ROOT; }; - 72A7E8F30F5F2001005B83C0 /* iphone_wolf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iphone_wolf.h; sourceTree = ""; }; - 72A7E8F60F5F2063005B83C0 /* iphone_menus.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = iphone_menus.c; sourceTree = ""; }; - 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */, - 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */, - 43E8D4E00F51B48B003F09B2 /* OpenAL.framework in Frameworks */, - 4333CCE80F5CC23E00AE2B6F /* AudioToolbox.framework in Frameworks */, - 43AE7E9F0F67387500B2F562 /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* wolf3d.app */, - 4364BF3E0F5CB25900F29317 /* dist.plist */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - 43AE7E9E0F67387500B2F562 /* CoreGraphics.framework */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 72935B180F6B2D630085DD28 /* env */, - 7229CC5A0F6B324A004123C5 /* tremor */, - 72935B190F6B2D720085DD28 /* wolf */, - 32CA4F630368D1EE00C91783 /* wolf3d_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - 7229CE540F6C8CDE004123C5 /* gles_glue.c */, - 7229CE450F6C89F8004123C5 /* EAGLView.h */, - 7229CE460F6C89F8004123C5 /* EAGLView.m */, - 7229CE480F6C89F8004123C5 /* wolf3dAppDelegate.h */, - 7229CE490F6C89F8004123C5 /* wolf3dAppDelegate.m */, - 7229CC8E0F6B3363004123C5 /* wolfiphone.h */, - 72A7E8F30F5F2001005B83C0 /* iphone_wolf.h */, - 72A7E8F60F5F2063005B83C0 /* iphone_menus.c */, - 43CF03090F56D5C200E4A23D /* iphone_loop.c */, - 43E8D2DF0F4FC61E003F09B2 /* iphone_main.c */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 43AE7CAA0F61FB0E00B2F562 /* wolf3dEpisode1_icon.png */, - 43CF02FE0F56974E00E4A23D /* Default.png */, - 43CF02EC0F56955F00E4A23D /* wolf3d_icon.png */, - 28AD733E0D9D9553002E5188 /* MainWindow.xib */, - 8D1107310486CEB800E47090 /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 4333CCE70F5CC23E00AE2B6F /* AudioToolbox.framework */, - 43E8D4DF0F51B48B003F09B2 /* OpenAL.framework */, - 28FD15070DC6FC5B0079059D /* QuartzCore.framework */, - 28FD14FF0DC6FC520079059D /* OpenGLES.framework */, - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 7229CC5A0F6B324A004123C5 /* tremor */ = { - isa = PBXGroup; - children = ( - 7229CC5B0F6B3295004123C5 /* asm_arm.h */, - 7229CC5C0F6B3295004123C5 /* backends.h */, - 7229CC5D0F6B3295004123C5 /* bitwise.c */, - 7229CC5E0F6B3295004123C5 /* block.c */, - 7229CC5F0F6B3295004123C5 /* block.h */, - 7229CC600F6B3295004123C5 /* codebook.c */, - 7229CC610F6B3295004123C5 /* codebook.h */, - 7229CC620F6B3295004123C5 /* codec_internal.h */, - 7229CC630F6B3295004123C5 /* config_types.h */, - 7229CC640F6B3295004123C5 /* floor0.c */, - 7229CC650F6B3295004123C5 /* floor1.c */, - 7229CC660F6B3295004123C5 /* framing.c */, - 7229CC670F6B3295004123C5 /* info.c */, - 7229CC680F6B3295004123C5 /* ivorbiscodec.h */, - 7229CC690F6B3295004123C5 /* ivorbisfile.h */, - 7229CC6B0F6B3295004123C5 /* lsp_lookup.h */, - 7229CC6C0F6B3295004123C5 /* mapping0.c */, - 7229CC6D0F6B3295004123C5 /* mdct.c */, - 7229CC6E0F6B3295004123C5 /* mdct.h */, - 7229CC6F0F6B3295004123C5 /* mdct_lookup.h */, - 7229CC700F6B3295004123C5 /* misc.h */, - 7229CC710F6B3295004123C5 /* ogg.h */, - 7229CC720F6B3295004123C5 /* os.h */, - 7229CC730F6B3295004123C5 /* os_types.h */, - 7229CC740F6B3295004123C5 /* registry.c */, - 7229CC750F6B3295004123C5 /* registry.h */, - 7229CC760F6B3295004123C5 /* res012.c */, - 7229CC770F6B3295004123C5 /* sharedbook.c */, - 7229CC780F6B3295004123C5 /* synthesis.c */, - 7229CC790F6B3295004123C5 /* vorbisfile.c */, - 7229CC7A0F6B3295004123C5 /* window.c */, - 7229CC7B0F6B3295004123C5 /* window.h */, - 7229CC7C0F6B3295004123C5 /* window_lookup.h */, - ); - name = tremor; - sourceTree = ""; - }; - 72935B180F6B2D630085DD28 /* env */ = { - isa = PBXGroup; - children = ( - 72935B1A0F6B2D9D0085DD28 /* angle.c */, - 72935B1B0F6B2D9D0085DD28 /* angle.h */, - 72935B1C0F6B2D9D0085DD28 /* app_def.h */, - 72935B1D0F6B2D9D0085DD28 /* arch.c */, - 72935B1E0F6B2D9D0085DD28 /* arch.h */, - 72935B230F6B2D9D0085DD28 /* cmd.c */, - 72935B240F6B2D9D0085DD28 /* cmd.h */, - 72935B250F6B2D9D0085DD28 /* com_string.c */, - 72935B260F6B2D9D0085DD28 /* com_string.h */, - 72935B270F6B2D9D0085DD28 /* common.c */, - 72935B280F6B2D9D0085DD28 /* common.h */, - 72935B290F6B2D9D0085DD28 /* common_utils.h */, - 72935B2A0F6B2D9D0085DD28 /* console.c */, - 72935B2B0F6B2D9D0085DD28 /* console.h */, - 72935B2D0F6B2D9D0085DD28 /* cvar.c */, - 72935B2E0F6B2D9D0085DD28 /* cvar.h */, - 72935B2F0F6B2D9D0085DD28 /* fileio.c */, - 72935B310F6B2D9D0085DD28 /* files.c */, - 72935B320F6B2D9D0085DD28 /* filestring.c */, - 72935B330F6B2D9D0085DD28 /* filestring.h */, - 72935B340F6B2D9D0085DD28 /* filesystem.h */, - 72935B350F6B2D9D0085DD28 /* font_manager.c */, - 72935B360F6B2D9D0085DD28 /* font_manager.h */, - 72935B370F6B2D9D0085DD28 /* glob.c */, - 72935B380F6B2D9D0085DD28 /* glob.h */, - 72935B3E0F6B2D9D0085DD28 /* math.c */, - 72935B3F0F6B2D9D0085DD28 /* matrix.c */, - 72935B400F6B2D9D0085DD28 /* matrix.h */, - 72935B410F6B2D9D0085DD28 /* memory.c */, - 72935B420F6B2D9D0085DD28 /* memory.h */, - 72935B450F6B2D9D0085DD28 /* mymath.h */, - 72935B460F6B2D9D0085DD28 /* myopengl.h */, - 72935B470F6B2D9D0085DD28 /* myopengl_extension.h */, - 72935B480F6B2D9D0085DD28 /* num_type.h */, - 72935B490F6B2D9D0085DD28 /* oggfile.c */, - 72935B4A0F6B2D9D0085DD28 /* oggfile.h */, - 72935B4B0F6B2D9D0085DD28 /* openal_binding.c */, - 72935B4C0F6B2D9D0085DD28 /* openal_binding.h */, - 72935B4D0F6B2D9D0085DD28 /* openal_main.c */, - 72935B500F6B2D9D0085DD28 /* opengl_draw.c */, - 72935B520F6B2D9D0085DD28 /* opengl_local.h */, - 72935B530F6B2D9D0085DD28 /* opengl_main.c */, - 72935B540F6B2D9D0085DD28 /* opengl_texture.c */, - 72935B560F6B2D9D0085DD28 /* random_number.c */, - 72935B570F6B2D9D0085DD28 /* random_number.h */, - 72935B580F6B2D9D0085DD28 /* renderer.h */, - 72935B590F6B2D9D0085DD28 /* share.c */, - 72935B5A0F6B2D9D0085DD28 /* sound.c */, - 72935B5B0F6B2D9D0085DD28 /* sound.h */, - 72935B5C0F6B2D9D0085DD28 /* sound_local.h */, - 72935B5D0F6B2D9D0085DD28 /* sound_sfx_id.c */, - 72935B5E0F6B2D9D0085DD28 /* sound_stream.c */, - 72935B610F6B2D9D0085DD28 /* texture_manager.c */, - 72935B620F6B2D9D0085DD28 /* texture_manager.h */, - 72935B630F6B2D9D0085DD28 /* tga.c */, - 72935B640F6B2D9D0085DD28 /* tga.h */, - 72935B650F6B2D9D0085DD28 /* timer.h */, - 72935B680F6B2D9D0085DD28 /* unix_file.c */, - 72935B6A0F6B2D9D0085DD28 /* unix_timer.c */, - 72935B6B0F6B2D9D0085DD28 /* vector.c */, - 72935B6C0F6B2D9D0085DD28 /* vector.h */, - 72935B6D0F6B2D9D0085DD28 /* video.h */, - 72935B6E0F6B2D9D0085DD28 /* wavfile.c */, - 72935B6F0F6B2D9D0085DD28 /* wavfile.h */, - 72935B720F6B2D9D0085DD28 /* zmem.c */, - 72935B730F6B2D9D0085DD28 /* zmem.h */, - ); - name = env; - sourceTree = ""; - }; - 72935B190F6B2D720085DD28 /* wolf */ = { - isa = PBXGroup; - children = ( - 7229CC240F6B3222004123C5 /* wolf_act_stat.h */, - 7229CC250F6B3222004123C5 /* wolf_actor_ai.c */, - 7229CC260F6B3222004123C5 /* wolf_actor_ai.h */, - 7229CC270F6B3222004123C5 /* wolf_actors.c */, - 7229CC280F6B3222004123C5 /* wolf_actors.h */, - 7229CC290F6B3222004123C5 /* wolf_ai_com.c */, - 7229CC2A0F6B3222004123C5 /* wolf_ai_com.h */, - 7229CC2B0F6B3222004123C5 /* wolf_areas.c */, - 7229CC2C0F6B3222004123C5 /* wolf_bj.c */, - 7229CC2D0F6B3222004123C5 /* wolf_bj.h */, - 7229CC2E0F6B3222004123C5 /* wolf_client_main.c */, - 7229CC300F6B3222004123C5 /* wolf_doors.c */, - 7229CC310F6B3222004123C5 /* wolf_level.c */, - 7229CC320F6B3222004123C5 /* wolf_level.h */, - 7229CC330F6B3222004123C5 /* wolf_local.h */, - 7229CC340F6B3222004123C5 /* wolf_main.c */, - 7229CC350F6B3222004123C5 /* wolf_math.c */, - 7229CC360F6B3222004123C5 /* wolf_math.h */, - 7229CC370F6B3222004123C5 /* wolf_opengl.c */, - 7229CC380F6B3222004123C5 /* wolf_player.c */, - 7229CC390F6B3222004123C5 /* wolf_player.h */, - 7229CC3A0F6B3222004123C5 /* wolf_powerups.c */, - 7229CC3B0F6B3222004123C5 /* wolf_powerups.h */, - 7229CC3C0F6B3222004123C5 /* wolf_pushwalls.c */, - 7229CC3D0F6B3222004123C5 /* wolf_raycast.c */, - 7229CC3E0F6B3222004123C5 /* wolf_raycast.h */, - 7229CC3F0F6B3222004123C5 /* wolf_renderer.c */, - 7229CC400F6B3222004123C5 /* wolf_renderer.h */, - 7229CC410F6B3222004123C5 /* wolf_sprites.c */, - 7229CC420F6B3222004123C5 /* wolf_sprites.h */, - 7229CC430F6B3222004123C5 /* wolf_sv_ccmds.c */, - 7229CC440F6B3222004123C5 /* wolf_weapon.c */, - ); - name = wolf; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* wolf3d */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "wolf3d" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - 435F41A90F532CA300887552 /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = wolf3d; - productName = wolf3d; - productReference = 1D6058910D05DD3D006BFB54 /* wolf3d.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "wolf3d" */; - compatibilityVersion = "Xcode 3.1"; - hasScannedForEncodings = 1; - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* wolf3d */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, - 43CF02ED0F56955F00E4A23D /* wolf3d_icon.png in Resources */, - 43CF02FF0F56974E00E4A23D /* Default.png in Resources */, - 4364BF3F0F5CB25900F29317 /* dist.plist in Resources */, - 43AE7CAB0F61FB0E00B2F562 /* wolf3dEpisode1_icon.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 435F41A90F532CA300887552 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/bin/sh -x"; - shellScript = "PBXCP=${DEVELOPER_DIR}/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp\n${PBXCP} -exclude .svn \"${PROJECT_DIR}/../../base\" \"${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/\"\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 43E8D2E10F4FC61E003F09B2 /* iphone_main.c in Sources */, - 43CF030A0F56D5C200E4A23D /* iphone_loop.c in Sources */, - 72A7E8F70F5F2063005B83C0 /* iphone_menus.c in Sources */, - 72935B740F6B2D9D0085DD28 /* angle.c in Sources */, - 72935B750F6B2D9D0085DD28 /* arch.c in Sources */, - 72935B790F6B2D9D0085DD28 /* cmd.c in Sources */, - 72935B7A0F6B2D9D0085DD28 /* com_string.c in Sources */, - 72935B7B0F6B2D9D0085DD28 /* common.c in Sources */, - 72935B7C0F6B2D9D0085DD28 /* console.c in Sources */, - 72935B7E0F6B2D9D0085DD28 /* cvar.c in Sources */, - 72935B7F0F6B2D9D0085DD28 /* fileio.c in Sources */, - 72935B800F6B2D9D0085DD28 /* files.c in Sources */, - 72935B810F6B2D9D0085DD28 /* filestring.c in Sources */, - 72935B820F6B2D9D0085DD28 /* font_manager.c in Sources */, - 72935B830F6B2D9D0085DD28 /* glob.c in Sources */, - 72935B870F6B2D9D0085DD28 /* math.c in Sources */, - 72935B880F6B2D9D0085DD28 /* matrix.c in Sources */, - 72935B890F6B2D9D0085DD28 /* memory.c in Sources */, - 72935B8B0F6B2D9D0085DD28 /* oggfile.c in Sources */, - 72935B8C0F6B2D9D0085DD28 /* openal_binding.c in Sources */, - 72935B8D0F6B2D9D0085DD28 /* openal_main.c in Sources */, - 72935B8F0F6B2D9D0085DD28 /* opengl_draw.c in Sources */, - 72935B910F6B2D9D0085DD28 /* opengl_main.c in Sources */, - 72935B920F6B2D9D0085DD28 /* opengl_texture.c in Sources */, - 72935B930F6B2D9D0085DD28 /* random_number.c in Sources */, - 72935B940F6B2D9D0085DD28 /* share.c in Sources */, - 72935B950F6B2D9D0085DD28 /* sound.c in Sources */, - 72935B960F6B2D9D0085DD28 /* sound_sfx_id.c in Sources */, - 72935B970F6B2D9D0085DD28 /* sound_stream.c in Sources */, - 72935B990F6B2D9D0085DD28 /* texture_manager.c in Sources */, - 72935B9A0F6B2D9D0085DD28 /* tga.c in Sources */, - 72935B9C0F6B2D9D0085DD28 /* unix_file.c in Sources */, - 72935B9E0F6B2D9D0085DD28 /* unix_timer.c in Sources */, - 72935B9F0F6B2D9D0085DD28 /* vector.c in Sources */, - 72935BA00F6B2D9D0085DD28 /* wavfile.c in Sources */, - 72935BA20F6B2D9D0085DD28 /* zmem.c in Sources */, - 7229CC460F6B3222004123C5 /* wolf_actor_ai.c in Sources */, - 7229CC470F6B3222004123C5 /* wolf_actors.c in Sources */, - 7229CC480F6B3222004123C5 /* wolf_ai_com.c in Sources */, - 7229CC490F6B3222004123C5 /* wolf_areas.c in Sources */, - 7229CC4A0F6B3222004123C5 /* wolf_bj.c in Sources */, - 7229CC4B0F6B3222004123C5 /* wolf_client_main.c in Sources */, - 7229CC4D0F6B3222004123C5 /* wolf_doors.c in Sources */, - 7229CC4E0F6B3222004123C5 /* wolf_level.c in Sources */, - 7229CC4F0F6B3222004123C5 /* wolf_main.c in Sources */, - 7229CC500F6B3222004123C5 /* wolf_math.c in Sources */, - 7229CC510F6B3222004123C5 /* wolf_opengl.c in Sources */, - 7229CC520F6B3222004123C5 /* wolf_player.c in Sources */, - 7229CC530F6B3222004123C5 /* wolf_powerups.c in Sources */, - 7229CC540F6B3222004123C5 /* wolf_pushwalls.c in Sources */, - 7229CC550F6B3222004123C5 /* wolf_raycast.c in Sources */, - 7229CC560F6B3222004123C5 /* wolf_renderer.c in Sources */, - 7229CC570F6B3222004123C5 /* wolf_sprites.c in Sources */, - 7229CC580F6B3222004123C5 /* wolf_sv_ccmds.c in Sources */, - 7229CC590F6B3222004123C5 /* wolf_weapon.c in Sources */, - 7229CC7D0F6B3295004123C5 /* bitwise.c in Sources */, - 7229CC7E0F6B3295004123C5 /* block.c in Sources */, - 7229CC7F0F6B3295004123C5 /* codebook.c in Sources */, - 7229CC800F6B3295004123C5 /* floor0.c in Sources */, - 7229CC810F6B3295004123C5 /* floor1.c in Sources */, - 7229CC820F6B3295004123C5 /* framing.c in Sources */, - 7229CC830F6B3295004123C5 /* info.c in Sources */, - 7229CC850F6B3295004123C5 /* mapping0.c in Sources */, - 7229CC860F6B3295004123C5 /* mdct.c in Sources */, - 7229CC870F6B3295004123C5 /* registry.c in Sources */, - 7229CC880F6B3295004123C5 /* res012.c in Sources */, - 7229CC890F6B3295004123C5 /* sharedbook.c in Sources */, - 7229CC8A0F6B3295004123C5 /* synthesis.c in Sources */, - 7229CC8B0F6B3295004123C5 /* vorbisfile.c in Sources */, - 7229CC8C0F6B3295004123C5 /* window.c in Sources */, - 7229CE4A0F6C89F8004123C5 /* EAGLView.m in Sources */, - 7229CE4C0F6C89F8004123C5 /* wolf3dAppDelegate.m in Sources */, - 7229CE550F6C8CDE004123C5 /* gles_glue.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Cass Everitt"; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = wolf3d_Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = IPHONE; - HEADER_SEARCH_PATHS = ""; - INFOPLIST_FILE = Info.plist; - PRODUCT_NAME = wolf3d; - PROFILE_PREFIX = com.idsoftware; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = "242E7162-329E-4733-B361-E893AB528543"; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: John Carmack"; - COPY_PHASE_STRIP = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = wolf3d_Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = IPHONE; - HEADER_SEARCH_PATHS = ""; - INFOPLIST_FILE = Info.plist; - PRODUCT_NAME = wolf3d; - PROFILE_PREFIX = com.idsoftware; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = "329BF7D2-0B30-4F7B-9204-EB2CBD012BA8"; - }; - name = Release; - }; - 4364BF480F5CB27300F29317 /* AdHocDist */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - CODE_SIGN_ENTITLEMENTS = dist.plist; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Cass Everitt"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_THUMB_SUPPORT = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = "E2E91433-8CD1-46DB-9DC5-B7E4C84FD1C2"; - SDKROOT = iphoneos2.0; - }; - name = AdHocDist; - }; - 4364BF490F5CB27300F29317 /* AdHocDist */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: id Software"; - COPY_PHASE_STRIP = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = wolf3d_Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = IPHONE; - HEADER_SEARCH_PATHS = ""; - INFOPLIST_FILE = Info.plist; - PRODUCT_NAME = wolf3d; - PROFILE_PREFIX = nu.r3; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = "31C73095-0DD9-4ABA-BB25-8D23F661F10F"; - }; - name = AdHocDist; - }; - 43AE7CA40F61EC4E00B2F562 /* ReleaseEpisode1 */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_THUMB_SUPPORT = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = iphoneos2.0; - }; - name = ReleaseEpisode1; - }; - 43AE7CA50F61EC4E00B2F562 /* ReleaseEpisode1 */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: John Carmack"; - COPY_PHASE_STRIP = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = wolf3d_Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - EPISODE1, - IPHONE, - ); - HEADER_SEARCH_PATHS = ""; - INFOPLIST_FILE = Info.plist; - PRODUCT_NAME = wolf3dEpisode1; - PROFILE_PREFIX = com.idsoftware; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = "329BF7D2-0B30-4F7B-9204-EB2CBD012BA8"; - }; - name = ReleaseEpisode1; - }; - 43AE7CAE0F61FC9200B2F562 /* DebugEpisode1 */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - SDKROOT = iphoneos2.0; - }; - name = DebugEpisode1; - }; - 43AE7CAF0F61FC9200B2F562 /* DebugEpisode1 */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: John Carmack"; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = wolf3d_Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - EPISODE1, - IPHONE, - ); - HEADER_SEARCH_PATHS = ""; - INFOPLIST_FILE = Info.plist; - PRODUCT_NAME = wolf3dEpisode1; - PROFILE_PREFIX = com.idsoftware; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = "329BF7D2-0B30-4F7B-9204-EB2CBD012BA8"; - }; - name = DebugEpisode1; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - SDKROOT = iphoneos2.0; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_THUMB_SUPPORT = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = iphoneos2.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "wolf3d" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 43AE7CAF0F61FC9200B2F562 /* DebugEpisode1 */, - 1D6058950D05DD3E006BFB54 /* Release */, - 43AE7CA50F61EC4E00B2F562 /* ReleaseEpisode1 */, - 4364BF490F5CB27300F29317 /* AdHocDist */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "wolf3d" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - 43AE7CAE0F61FC9200B2F562 /* DebugEpisode1 */, - C01FCF5008A954540054247B /* Release */, - 43AE7CA40F61EC4E00B2F562 /* ReleaseEpisode1 */, - 4364BF480F5CB27300F29317 /* AdHocDist */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/wolf3d/newCode/iphone/wolf3dAppDelegate.h b/wolf3d/newCode/iphone/wolf3dAppDelegate.h deleted file mode 100644 index 6875a75..0000000 --- a/wolf3d/newCode/iphone/wolf3dAppDelegate.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - - Copyright (C) 2009 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - */ - -#import -#import - -#ifdef _cplusplus -extern "C" { -#endif -void vibrateDevice(); -#ifdef _cplusplus -} -#endif - -@class EAGLView; - -@interface wolf3dAppDelegate : NSObject { - UIWindow *window; - EAGLView *glView; - int lastAccelUpdateMsec; -} - -@property (nonatomic, retain) IBOutlet UIWindow *window; -@property (nonatomic, retain) IBOutlet EAGLView *glView; - -- (void)restartAccelerometerIfNeeded; - -@end - diff --git a/wolf3d/newCode/iphone/wolf3dAppDelegate.m b/wolf3d/newCode/iphone/wolf3dAppDelegate.m deleted file mode 100644 index 9c0e6f6..0000000 --- a/wolf3d/newCode/iphone/wolf3dAppDelegate.m +++ /dev/null @@ -1,120 +0,0 @@ -/* - - Copyright (C) 2009 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - */ - -#import "wolf3dAppDelegate.h" -#import "EAGLView.h" -#import - -extern int iphoneStartup(); -extern int iphoneShutdown(); - -char iphoneDocDirectory[1024]; -char iphoneAppDirectory[1024]; - - -void vibrateDevice() { - printf( "vibrate\n" ); - AudioServicesPlaySystemSound( kSystemSoundID_Vibrate ); -} - -@implementation wolf3dAppDelegate - -@synthesize window; -@synthesize glView; - -- (void)applicationDidFinishLaunching:(UIApplication *)application { - application.statusBarHidden = YES; - application.statusBarOrientation = UIInterfaceOrientationLandscapeLeft; - - // get the documents directory, where we will write configs and save games - NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); - NSString *documentsDirectory = [paths objectAtIndex:0]; - [documentsDirectory getCString: iphoneDocDirectory - maxLength: sizeof( iphoneDocDirectory ) - 1 - encoding: NSASCIIStringEncoding ]; - - // get the app directory, where our data files live - paths = NSSearchPathForDirectoriesInDomains(NSApplicationDirectory, NSUserDomainMask, YES); - NSString *appDirectory = documentsDirectory = [paths objectAtIndex:0]; - [appDirectory getCString: iphoneAppDirectory - maxLength: sizeof( iphoneAppDirectory ) - 1 - encoding: NSASCIIStringEncoding ]; - - // start the flow of accelerometer events - UIAccelerometer *accelerometer = [UIAccelerometer sharedAccelerometer]; - accelerometer.delegate = self; - accelerometer.updateInterval = 0.01; - - // do all the game startup work - iphoneStartup(); -} - - -- (void)applicationWillResignActive:(UIApplication *)application { -} - - -- (void)applicationDidBecomeActive:(UIApplication *)application { -} - -- (void)applicationWillTerminate:(UIApplication *)application { - iphoneShutdown(); -} - - - -- (void)dealloc { - [window release]; - [glView release]; - [super dealloc]; -} - -- (void)restartAccelerometerIfNeeded { - int Sys_Milliseconds(); - - // I have no idea why this seems to happen sometimes... - if ( Sys_Milliseconds() - lastAccelUpdateMsec > 1000 ) { - static int count; - if ( ++count < 100 ) { - printf( "Restarting accelerometer updates.\n" ); - } - UIAccelerometer *accelerometer = [UIAccelerometer sharedAccelerometer]; - accelerometer.delegate = self; - accelerometer.updateInterval = 0.01; - } -} - -- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration -{ - int Sys_Milliseconds(); - void WolfensteinTilts( float *tilts ); - float acc[4]; - acc[0] = acceleration.x; - acc[1] = acceleration.y; - acc[2] = acceleration.z; - acc[3] = acceleration.timestamp; - WolfensteinTilts( acc ); - lastAccelUpdateMsec = Sys_Milliseconds(); -} - -@end - - - diff --git a/wolf3d/newCode/iphone/wolf3dEpisode1_icon.png b/wolf3d/newCode/iphone/wolf3dEpisode1_icon.png deleted file mode 100644 index 2e2d986..0000000 Binary files a/wolf3d/newCode/iphone/wolf3dEpisode1_icon.png and /dev/null differ diff --git a/wolf3d/newCode/iphone/wolf3d_Prefix.pch b/wolf3d/newCode/iphone/wolf3d_Prefix.pch deleted file mode 100644 index 58ef796..0000000 --- a/wolf3d/newCode/iphone/wolf3d_Prefix.pch +++ /dev/null @@ -1,8 +0,0 @@ -// -// Prefix header for all source files of the 'wolf3d' target in the 'wolf3d' project -// - -#ifdef __OBJC__ -#import -#import -#endif diff --git a/wolf3d/newCode/iphone/wolf3d_icon.png b/wolf3d/newCode/iphone/wolf3d_icon.png deleted file mode 100644 index 956a45a..0000000 Binary files a/wolf3d/newCode/iphone/wolf3d_icon.png and /dev/null differ diff --git a/wolf3d/newCode/wolf/wolf_act_stat.h b/wolf3d/newCode/wolf/wolf_act_stat.h deleted file mode 100644 index a3b6022..0000000 --- a/wolf3d/newCode/wolf/wolf_act_stat.h +++ /dev/null @@ -1,1619 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_act_stat.h: Wolfenstein3-D entity management. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - * Portion of this code was derived from Wolfenstein3-D, and was originally - * written by Id Software, Inc. - * - */ - -/* - Notes: - - -*/ - -#ifndef __WOLF_ACT_STAT_H__ -#define __WOLF_ACT_STAT_H__ - -#include "wolf_bj.h" -#include "wolf_actor_ai.h" -#include "wolf_ai_com.h" -#include "wolf_sprites.h" - -#define ST_INFO_NULL { 0, SPR_DEMO, 0, NULL, NULL, st_dead } - -/* - 1-if object can be rotated, 0 if one sprite for every direction - base object's state texture if rotation is on facing player - after how man frames change state to .next_state - what to do every frame - what to do once per state - next state -*/ - -stateinfo objstate[ NUMENEMIES ][ NUMSTATES ] = -{ - // en_guard, - { - { 1, SPR_GRD_S_1, 0, T_Stand, NULL, st_stand }, // st_stand, - - { 1, SPR_GRD_W1_1, 20, T_Path, NULL, st_path1s }, // st_path1, - { 1, SPR_GRD_W1_1, 5, NULL, NULL, st_path2 }, // st_path1s, - { 1, SPR_GRD_W2_1, 15, T_Path, NULL, st_path3 }, // st_path2, - { 1, SPR_GRD_W3_1, 20, T_Path, NULL, st_path3s }, // st_path3, - { 1, SPR_GRD_W3_1, 5, NULL, NULL, st_path4 }, // st_path3s, - { 1, SPR_GRD_W4_1, 15, T_Path, NULL, st_path1 }, // st_path4, - - { 0, SPR_GRD_PAIN_1, 10, NULL, NULL, st_chase1},// st_pain, - { 0, SPR_GRD_PAIN_2, 10, NULL, NULL, st_chase1},// st_pain1, - - { 0, SPR_GRD_SHOOT1, 20, NULL, NULL, st_shoot2},// st_shoot1, - { 0, SPR_GRD_SHOOT2, 20, NULL, T_Shoot,st_shoot3},// st_shoot2, - { 0, SPR_GRD_SHOOT3, 20, NULL, NULL, st_chase1},// st_shoot3, - - { 0, SPR_DEMO, 0, NULL, NULL, st_chase1 }, // st_shoot4, - { 0, SPR_DEMO, 0, NULL, NULL, st_chase1 }, // st_shoot5, - { 0, SPR_DEMO, 0, NULL, NULL, st_chase1 }, // st_shoot6, - { 0, SPR_DEMO, 0, NULL, NULL, st_chase1 }, // st_shoot7, - { 0, SPR_DEMO, 0, NULL, NULL, st_chase1 }, // st_shoot8, - { 0, SPR_DEMO, 0, NULL, NULL, st_chase1 }, // st_shoot9, - - { 1, SPR_GRD_W1_1, 10, T_Chase, NULL, st_chase1s }, // st_chase1, - { 1, SPR_GRD_W1_1, 3, NULL, NULL, st_chase2 }, // st_chase1s, - { 1, SPR_GRD_W2_1, 8, T_Chase, NULL, st_chase3 }, // st_chase2, - { 1, SPR_GRD_W3_1, 10, T_Chase, NULL, st_chase3s }, // st_chase3, - { 1, SPR_GRD_W3_1, 3, NULL, NULL, st_chase4 }, // st_chase3s, - { 1, SPR_GRD_W4_1, 8, T_Chase, NULL, st_chase1 }, // st_chase4, - - { 0, SPR_GRD_DIE_1, 15, NULL, A_DeathScream,st_die2 }, // st_die1, - { 0, SPR_GRD_DIE_2, 15, NULL, NULL, st_die3 }, // st_die2, - { 0, SPR_GRD_DIE_3, 15, NULL, NULL, st_dead }, // st_die3, - - { 0, SPR_DEMO, 0, NULL, NULL, st_dead }, // st_die4, - { 0, SPR_DEMO, 0, NULL, NULL, st_dead }, // st_die5, - { 0, SPR_DEMO, 0, NULL, NULL, st_dead }, // st_die6, - { 0, SPR_DEMO, 0, NULL, NULL, st_dead }, // st_die7, - { 0, SPR_DEMO, 0, NULL, NULL, st_dead }, // st_die8, - { 0, SPR_DEMO, 0, NULL, NULL, st_dead }, // st_die9, - - { 0, SPR_GRD_DEAD, 0, NULL, NULL, st_dead } // st_dead - }, - // en_officer, - { - {1, SPR_OFC_S_1, 0, T_Stand, NULL, st_stand}, // st_stand, - - {1, SPR_OFC_W1_1, 20, T_Path, NULL, st_path1s},// st_path1, - {1, SPR_OFC_W1_1, 5, NULL , NULL, st_path2}, // st_path1s, - {1, SPR_OFC_W2_1, 15, T_Path, NULL, st_path3}, // st_path2, - {1, SPR_OFC_W3_1, 20, T_Path, NULL, st_path3s},// st_path3, - {1, SPR_OFC_W3_1, 5, NULL , NULL, st_path4}, // st_path3s, - {1, SPR_OFC_W4_1, 15, T_Path, NULL, st_path1}, // st_path4, - - {0, SPR_OFC_PAIN_1, 10, NULL, NULL, st_chase1},// st_pain, - {0, SPR_OFC_PAIN_2, 10, NULL, NULL, st_chase1},// st_pain1, - - {0, SPR_OFC_SHOOT1, 6, NULL, NULL, st_shoot2},// st_shoot1, - {0, SPR_OFC_SHOOT2, 20, NULL, T_Shoot, st_shoot3},// st_shoot2, - {0, SPR_OFC_SHOOT3, 10, NULL, NULL, st_chase1},// st_shoot3, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot4, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot5, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot6, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot7, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot8, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot9, - - {1, SPR_OFC_W1_1, 10, T_Chase, NULL, st_chase1s},// st_chase1, - {1, SPR_OFC_W1_1, 3, NULL , NULL, st_chase2}, // st_chase1s, - {1, SPR_OFC_W2_1, 8, T_Chase, NULL, st_chase3}, // st_chase2, - {1, SPR_OFC_W3_1, 10, T_Chase, NULL, st_chase3s},// st_chase3, - {1, SPR_OFC_W3_1, 3, NULL , NULL, st_chase4}, // st_chase3s, - {1, SPR_OFC_W4_1, 8, T_Chase, NULL, st_chase1}, // st_chase4, - - {0, SPR_OFC_DIE_1, 11, NULL, A_DeathScream, st_die2},// st_die1, - {0, SPR_OFC_DIE_2, 11, NULL, NULL, st_die3},// st_die2, - {0, SPR_OFC_DIE_3, 11, NULL, NULL, st_dead},// st_die3, - - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die4, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die5, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die6, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die7, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die8, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die9, - - {0, SPR_OFC_DEAD, 0, NULL, NULL, st_dead} // st_dead - }, - // en_ss, - { - {1, SPR_SS_S_1, 0, T_Stand, NULL, st_stand}, // st_stand, - - {1, SPR_SS_W1_1, 20, T_Path, NULL, st_path1s},// st_path1, - {1, SPR_SS_W1_1, 5, NULL , NULL, st_path2}, // st_path1s, - {1, SPR_SS_W2_1, 15, T_Path, NULL, st_path3}, // st_path2, - {1, SPR_SS_W3_1, 20, T_Path, NULL, st_path3s},// st_path3, - {1, SPR_SS_W3_1, 5, NULL , NULL, st_path4}, // st_path3s, - {1, SPR_SS_W4_1, 15, T_Path, NULL, st_path1}, // st_path4, - - {0, SPR_SS_PAIN_1, 10, NULL, NULL, st_chase1},// st_pain, - {0, SPR_SS_PAIN_2, 10, NULL, NULL, st_chase1},// st_pain1, - - {0, SPR_SS_SHOOT1, 20, NULL, NULL, st_shoot2},// st_shoot1, - {0, SPR_SS_SHOOT2, 20, NULL, T_Shoot, st_shoot3},// st_shoot2, - {0, SPR_SS_SHOOT3, 10, NULL, NULL, st_shoot4},// st_shoot3, - {0, SPR_SS_SHOOT2, 10, NULL, T_Shoot, st_shoot5},// st_shoot4, - {0, SPR_SS_SHOOT3, 10, NULL, NULL, st_shoot6},// st_shoot5, - {0, SPR_SS_SHOOT2, 10, NULL, T_Shoot, st_shoot7},// st_shoot6, - {0, SPR_SS_SHOOT3, 10, NULL, NULL, st_shoot8},// st_shoot7, - {0, SPR_SS_SHOOT2, 10, NULL, T_Shoot, st_shoot9},// st_shoot8, - {0, SPR_SS_SHOOT3, 10, NULL, NULL, st_chase1},// st_shoot9, - - {1, SPR_SS_W1_1, 10, T_Chase, NULL, st_chase1s},// st_chase1, - {1, SPR_SS_W1_1, 3, NULL , NULL, st_chase2}, // st_chase1s, - {1, SPR_SS_W2_1, 8, T_Chase, NULL, st_chase3}, // st_chase2, - {1, SPR_SS_W3_1, 10, T_Chase, NULL, st_chase3s},// st_chase3, - {1, SPR_SS_W3_1, 3, NULL , NULL, st_chase4}, // st_chase3s, - {1, SPR_SS_W4_1, 8, T_Chase, NULL, st_chase1}, // st_chase4, - - {0, SPR_SS_DIE_1, 15, NULL, A_DeathScream, st_die2},// st_die1, - {0, SPR_SS_DIE_2, 15, NULL, NULL, st_die3},// st_die2, - {0, SPR_SS_DIE_3, 15, NULL, NULL, st_dead},// st_die3, - - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die4, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die5, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die6, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die7, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die8, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die9, - - {0, SPR_SS_DEAD, 0, NULL, NULL, st_dead} // st_dead - }, - // en_dog, - { - {0, SPR_DEMO, 0, NULL, NULL, st_stand}, // st_stand, - - {1, SPR_DOG_W1_1, 20, T_Path, NULL, st_path1s},// st_path1, - {1, SPR_DOG_W1_1, 5, NULL , NULL, st_path2}, // st_path1s, - {1, SPR_DOG_W2_1, 15, T_Path, NULL, st_path3}, // st_path2, - {1, SPR_DOG_W3_1, 20, T_Path, NULL, st_path3s},// st_path3, - {1, SPR_DOG_W3_1, 5, NULL , NULL, st_path4}, // st_path3s, - {1, SPR_DOG_W4_1, 15, T_Path, NULL, st_path1}, // st_path4, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain1, - - {0, SPR_DOG_JUMP1, 10, NULL, NULL, st_shoot2},// st_shoot1, - {0, SPR_DOG_JUMP2, 10, NULL, T_Bite, st_shoot3},// st_shoot2, - {0, SPR_DOG_JUMP3, 10, NULL, NULL, st_shoot4},// st_shoot3, - {0, SPR_DOG_JUMP1, 10, NULL, NULL, st_shoot5},// st_shoot4, - {0, SPR_DOG_W1_1, 10, NULL, NULL, st_chase1},// st_shoot5, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot6, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot7, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot8, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot9, - - {1, SPR_DOG_W1_1, 10, T_DogChase, NULL, st_chase1s},// st_chase1, - {1, SPR_DOG_W1_1, 3, NULL , NULL, st_chase2}, // st_chase1s, - {1, SPR_DOG_W2_1, 8, T_DogChase, NULL, st_chase3}, // st_chase2, - {1, SPR_DOG_W3_1, 10, T_DogChase, NULL, st_chase3s},// st_chase3, - {1, SPR_DOG_W3_1, 3, NULL , NULL, st_chase4}, // st_chase3s, - {1, SPR_DOG_W4_1, 8, T_DogChase, NULL, st_chase1}, // st_chase4, - - {0, SPR_DOG_DIE_1, 15, NULL, A_DeathScream, st_die2},// st_die1, - {0, SPR_DOG_DIE_2, 15, NULL, NULL, st_die3},// st_die2, - {0, SPR_DOG_DIE_3, 15, NULL, NULL, st_dead},// st_die3, - - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die4, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die5, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die6, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die7, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die8, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die9, - - {0, SPR_DOG_DEAD, 0, NULL, NULL, st_dead} // st_dead - }, - // en_boss, - { - {0, SPR_BOSS_W1, 0, T_Stand, NULL, st_stand}, // st_stand, - - {0, SPR_DEMO, 0, NULL, NULL, st_path1s},// st_path1, - {0, SPR_DEMO, 0, NULL, NULL, st_path2}, // st_path1s, - {0, SPR_DEMO, 0, NULL, NULL, st_path3}, // st_path2, - {0, SPR_DEMO, 0, NULL, NULL, st_path3s},// st_path3, - {0, SPR_DEMO, 0, NULL, NULL, st_path4}, // st_path3s, - {0, SPR_DEMO, 0, NULL, NULL, st_path1}, // st_path4, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain1, - - {0, SPR_BOSS_SHOOT1, 30, NULL, NULL, st_shoot2},// st_shoot1, - {0, SPR_BOSS_SHOOT2, 10, NULL, T_Shoot, st_shoot3},// st_shoot2, - {0, SPR_BOSS_SHOOT3, 10, NULL, T_Shoot, st_shoot4},// st_shoot3, - {0, SPR_BOSS_SHOOT2, 10, NULL, T_Shoot, st_shoot5},// st_shoot4, - {0, SPR_BOSS_SHOOT3, 10, NULL, T_Shoot, st_shoot6},// st_shoot5, - {0, SPR_BOSS_SHOOT2, 10, NULL, T_Shoot, st_shoot7},// st_shoot6, - {0, SPR_BOSS_SHOOT3, 10, NULL, T_Shoot, st_shoot8},// st_shoot7, - {0, SPR_BOSS_SHOOT1, 10, NULL, NULL, st_chase1},// st_shoot8, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot9, - - {0, SPR_BOSS_W1, 10, T_Chase, NULL, st_chase1s},// st_chase1, - {0, SPR_BOSS_W1, 3, NULL , NULL, st_chase2}, // st_chase1s, - {0, SPR_BOSS_W2, 8, T_Chase, NULL, st_chase3}, // st_chase2, - {0, SPR_BOSS_W3, 10, T_Chase, NULL, st_chase3s},// st_chase3, - {0, SPR_BOSS_W3, 3, NULL , NULL, st_chase4}, // st_chase3s, - {0, SPR_BOSS_W4, 8, T_Chase, NULL, st_chase1}, // st_chase4, - - {0, SPR_BOSS_DIE1, 15, NULL, A_DeathScream, st_die2},// st_die1, - {0, SPR_BOSS_DIE2, 15, NULL, NULL, st_die3},// st_die2, - {0, SPR_BOSS_DIE3, 15, NULL, NULL, st_dead},// st_die3, - - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die4, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die5, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die6, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die7, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die8, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die9, - - {0, SPR_BOSS_DEAD, 0, NULL, NULL, st_dead} // st_dead - }, - // en_schabbs, - { - {0, SPR_SCHABB_W1, 0, T_Stand, NULL, st_stand}, // st_stand, - - {0, SPR_DEMO, 0, NULL, NULL, st_path1s},// st_path1, - {0, SPR_DEMO, 0, NULL, NULL, st_path2}, // st_path1s, - {0, SPR_DEMO, 0, NULL, NULL, st_path3}, // st_path2, - {0, SPR_DEMO, 0, NULL, NULL, st_path3s},// st_path3, - {0, SPR_DEMO, 0, NULL, NULL, st_path4}, // st_path3s, - {0, SPR_DEMO, 0, NULL, NULL, st_path1}, // st_path4, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain1, - - {0, SPR_SCHABB_SHOOT1, 30, NULL, NULL, st_shoot2},// st_shoot1, - {0, SPR_SCHABB_SHOOT2, 10, NULL, T_Launch, st_chase1},// st_shoot2, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot3, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot4, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot5, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot6, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot7, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot8, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot9, - - {0, SPR_SCHABB_W1, 10, T_BossChase, NULL, st_chase1s},// st_chase1, - {0, SPR_SCHABB_W1, 3, NULL , NULL, st_chase2}, // st_chase1s, - {0, SPR_SCHABB_W2, 8, T_BossChase, NULL, st_chase3}, // st_chase2, - {0, SPR_SCHABB_W3, 10, T_BossChase, NULL, st_chase3s},// st_chase3, - {0, SPR_SCHABB_W3, 3, NULL , NULL, st_chase4}, // st_chase3s, - {0, SPR_SCHABB_W4, 8, T_BossChase, NULL, st_chase1}, // st_chase4, - - {0, SPR_SCHABB_W1, 10, NULL, A_DeathScream, st_die2},// st_die1, - {0, SPR_SCHABB_W1, 10, NULL, NULL, st_die3},// st_die2, - {0, SPR_SCHABB_DIE1, 10, NULL, NULL, st_die4},// st_die3, - {0, SPR_SCHABB_DIE2, 10, NULL, NULL, st_die5},// st_die4, - {0, SPR_SCHABB_DIE3, 10, NULL, NULL, st_dead},// st_die5, - - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die6, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die7, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die8, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die9, - - {0, SPR_SCHABB_DEAD, 0, NULL, A_StartDeathCam, st_dead} // st_dead - }, - // en_fake, - { - {0, SPR_FAKE_W1, 0, T_Stand, NULL, st_stand}, // st_stand, - - {0, SPR_DEMO, 0, NULL, NULL, st_path1s},// st_path1, - {0, SPR_DEMO, 0, NULL, NULL, st_path2}, // st_path1s, - {0, SPR_DEMO, 0, NULL, NULL, st_path3}, // st_path2, - {0, SPR_DEMO, 0, NULL, NULL, st_path3s},// st_path3, - {0, SPR_DEMO, 0, NULL, NULL, st_path4}, // st_path3s, - {0, SPR_DEMO, 0, NULL, NULL, st_path1}, // st_path4, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain1, - - {0, SPR_FAKE_SHOOT, 8, NULL, T_Launch, st_shoot2},// st_shoot1, - {0, SPR_FAKE_SHOOT, 8, NULL, T_Launch, st_shoot3},// st_shoot2, - {0, SPR_FAKE_SHOOT, 8, NULL, T_Launch, st_shoot4},// st_shoot3, - {0, SPR_FAKE_SHOOT, 8, NULL, T_Launch, st_shoot5},// st_shoot4, - {0, SPR_FAKE_SHOOT, 8, NULL, T_Launch, st_shoot6},// st_shoot4, - {0, SPR_FAKE_SHOOT, 8, NULL, T_Launch, st_shoot7},// st_shoot4, - {0, SPR_FAKE_SHOOT, 8, NULL, T_Launch, st_shoot8},// st_shoot4, - {0, SPR_FAKE_SHOOT, 8, NULL, T_Launch, st_shoot9},// st_shoot4, - {0, SPR_FAKE_SHOOT, 8, NULL, NULL, st_chase1},// st_shoot4, - - {0, SPR_FAKE_W1, 10, T_Fake, NULL, st_chase1s},// st_chase1, - {0, SPR_FAKE_W1, 3, NULL , NULL, st_chase2}, // st_chase1s, - {0, SPR_FAKE_W2, 8, T_Fake, NULL, st_chase3}, // st_chase2, - {0, SPR_FAKE_W3, 10, T_Fake, NULL, st_chase3s},// st_chase3, - {0, SPR_FAKE_W3, 3, NULL , NULL, st_chase4}, // st_chase3s, - {0, SPR_FAKE_W4, 8, T_Fake, NULL, st_chase1}, // st_chase4, - - {0, SPR_FAKE_DIE1, 10, NULL, A_DeathScream, st_die2},// st_die1, - {0, SPR_FAKE_DIE2, 10, NULL, NULL, st_die3},// st_die2, - {0, SPR_FAKE_DIE3, 10, NULL, NULL, st_die4},// st_die3, - {0, SPR_FAKE_DIE4, 10, NULL, NULL, st_die5},// st_die4, - {0, SPR_FAKE_DIE5, 10, NULL, NULL, st_dead},// st_die5, - - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die6, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die7, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die8, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die9, - - {0, SPR_FAKE_DEAD, 0, NULL, NULL, st_dead} // st_dead - }, - // en_hitler, (mecha) - { - {0, SPR_MECHA_W1, 0, T_Stand, NULL, st_stand}, // st_stand, - - {0, SPR_DEMO, 0, NULL, NULL, st_path1s},// st_path1, - {0, SPR_DEMO, 0, NULL, NULL, st_path2}, // st_path1s, - {0, SPR_DEMO, 0, NULL, NULL, st_path3}, // st_path2, - {0, SPR_DEMO, 0, NULL, NULL, st_path3s},// st_path3, - {0, SPR_DEMO, 0, NULL, NULL, st_path4}, // st_path3s, - {0, SPR_DEMO, 0, NULL, NULL, st_path1}, // st_path4, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain1, - - {0, SPR_MECHA_SHOOT1, 30, NULL, NULL, st_shoot2},// st_shoot1, - {0, SPR_MECHA_SHOOT2, 10, NULL, T_Shoot, st_shoot3},// st_shoot2, - {0, SPR_MECHA_SHOOT3, 10, NULL, T_Shoot, st_shoot4},// st_shoot3, - {0, SPR_MECHA_SHOOT2, 10, NULL, T_Shoot, st_shoot5},// st_shoot4, - {0, SPR_MECHA_SHOOT3, 10, NULL, T_Shoot, st_shoot6},// st_shoot5, - {0, SPR_MECHA_SHOOT2, 10, NULL, T_Shoot, st_chase1},// st_shoot6, - - {0, SPR_DEMO, 0, NULL, NULL, st_shoot8},// st_shoot7, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot9},// st_shoot8, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot9, - - {0, SPR_MECHA_W1, 10, T_Chase, A_MechaSound, st_chase1s},// st_chase1, - {0, SPR_MECHA_W1, 6, NULL , NULL, st_chase2}, // st_chase1s, - {0, SPR_MECHA_W2, 8, T_Chase, NULL, st_chase3}, // st_chase2, - {0, SPR_MECHA_W3, 10, T_Chase, A_MechaSound, st_chase3s},// st_chase3, - {0, SPR_MECHA_W3, 6, NULL , NULL, st_chase4}, // st_chase3s, - {0, SPR_MECHA_W4, 8, T_Chase, NULL, st_chase1}, // st_chase4, - - {0, SPR_MECHA_DIE1, 10, NULL, A_DeathScream, st_die2},// st_die1, - {0, SPR_MECHA_DIE2, 10, NULL, NULL, st_die3},// st_die2, - {0, SPR_MECHA_DIE3, 10, NULL, A_HitlerMorph, st_dead},// st_die3, - - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die4, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die5, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die6, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die7, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die8, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die9, - - {0, SPR_MECHA_DEAD, 0, NULL, NULL, st_dead} // st_dead - }, - // en_hitler, - { - {0, SPR_DEMO, 0, NULL, NULL, st_stand}, // st_stand, - - {0, SPR_DEMO, 0, NULL, NULL, st_path1s},// st_path1, - {0, SPR_DEMO, 0, NULL, NULL, st_path2}, // st_path1s, - {0, SPR_DEMO, 0, NULL, NULL, st_path3}, // st_path2, - {0, SPR_DEMO, 0, NULL, NULL, st_path3s},// st_path3, - {0, SPR_DEMO, 0, NULL, NULL, st_path4}, // st_path3s, - {0, SPR_DEMO, 0, NULL, NULL, st_path1}, // st_path4, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain1, - - {0, SPR_HITLER_SHOOT1, 30, NULL, NULL, st_shoot2},// st_shoot1, - {0, SPR_HITLER_SHOOT2, 10, NULL, T_Shoot, st_shoot3},// st_shoot2, - {0, SPR_HITLER_SHOOT3, 10, NULL, T_Shoot, st_shoot4},// st_shoot3, - {0, SPR_HITLER_SHOOT2, 10, NULL, T_Shoot, st_shoot5},// st_shoot4, - {0, SPR_HITLER_SHOOT3, 10, NULL, T_Shoot, st_shoot6},// st_shoot5, - {0, SPR_HITLER_SHOOT2, 10, NULL, T_Shoot, st_chase1},// st_shoot6, - - {0, SPR_DEMO, 0, NULL, NULL, st_shoot8},// st_shoot7, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot9},// st_shoot8, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot9, - - {0, SPR_HITLER_W1, 6, T_Chase, NULL, st_chase1s}, // st_chase1, - {0, SPR_HITLER_W1, 4, NULL , NULL, st_chase2}, // st_chase1s, - {0, SPR_HITLER_W2, 2, T_Chase, NULL, st_chase3}, // st_chase2, - {0, SPR_HITLER_W3, 6, T_Chase, NULL, st_chase3s}, // st_chase3, - {0, SPR_HITLER_W3, 4, NULL , NULL, st_chase4}, // st_chase3s, - {0, SPR_HITLER_W4, 2, T_Chase, NULL, st_chase1}, // st_chase4, - - {0, SPR_HITLER_W1, 1, NULL, A_DeathScream, st_die2},// st_die1, - {0, SPR_HITLER_W1, 10, NULL, NULL, st_die3},// st_die2, - {0, SPR_HITLER_DIE1, 10, NULL, NULL, st_dead},// st_die3, - {0, SPR_HITLER_DIE2, 10, NULL, NULL, st_dead},// st_die4, - {0, SPR_HITLER_DIE3, 10, NULL, NULL, st_dead},// st_die5, - {0, SPR_HITLER_DIE4, 10, NULL, NULL, st_dead},// st_die6, - {0, SPR_HITLER_DIE5, 10, NULL, NULL, st_dead},// st_die7, - {0, SPR_HITLER_DIE6, 10, NULL, NULL, st_dead},// st_die8, - {0, SPR_HITLER_DIE7, 10, NULL, NULL, st_dead},// st_die9, - - {0, SPR_HITLER_DEAD, 0, NULL, A_StartDeathCam, st_dead} // st_dead - }, - // en_mutant, - { - {1, SPR_MUT_S_1, 0, T_Stand, NULL, st_stand}, // st_stand, - - {1, SPR_MUT_W1_1, 20, T_Path, NULL, st_path1s},// st_path1, - {1, SPR_MUT_W1_1, 5, NULL , NULL, st_path2}, // st_path1s, - {1, SPR_MUT_W2_1, 15, T_Path, NULL, st_path3}, // st_path2, - {1, SPR_MUT_W3_1, 20, T_Path, NULL, st_path3s},// st_path3, - {1, SPR_MUT_W3_1, 5, NULL , NULL, st_path4}, // st_path3s, - {1, SPR_MUT_W4_1, 15, T_Path, NULL, st_path1}, // st_path4, - - {0, SPR_MUT_PAIN_1, 10, NULL, NULL, st_chase1},// st_pain, - {0, SPR_MUT_PAIN_2, 10, NULL, NULL, st_chase1},// st_pain1, - - {0, SPR_MUT_SHOOT1, 6, NULL, T_Shoot, st_shoot2}, // st_shoot1, - {0, SPR_MUT_SHOOT2, 20, NULL, NULL, st_shoot3}, // st_shoot2, - {0, SPR_MUT_SHOOT3, 10, NULL, T_Shoot, st_shoot4}, // st_shoot3, - {0, SPR_MUT_SHOOT4, 20, NULL, NULL, st_chase1}, // st_shoot4, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot5, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot6, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot7, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot8, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot9, - - {1, SPR_MUT_W1_1, 10, T_Chase, NULL, st_chase1s},// st_chase1, - {1, SPR_MUT_W1_1, 3, NULL , NULL, st_chase2}, // st_chase1s, - {1, SPR_MUT_W2_1, 8, T_Chase, NULL, st_chase3}, // st_chase2, - {1, SPR_MUT_W3_1, 10, T_Chase, NULL, st_chase3s},// st_chase3, - {1, SPR_MUT_W3_1, 3, NULL , NULL, st_chase4}, // st_chase3s, - {1, SPR_MUT_W4_1, 8, T_Chase, NULL, st_chase1}, // st_chase4, - - {0, SPR_MUT_DIE_1, 7, NULL, A_DeathScream, st_die2},// st_die1, - {0, SPR_MUT_DIE_2, 7, NULL, NULL, st_die3},// st_die2, - {0, SPR_MUT_DIE_3, 7, NULL, NULL, st_die4},// st_die3, - {0, SPR_MUT_DIE_4, 7, NULL, NULL, st_dead},// st_die4, - - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die5, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die6, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die7, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die8, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die9, - - {0, SPR_MUT_DEAD, 0, NULL, NULL, st_dead} // st_dead - }, - // en_blinky, - { - {0, SPR_DEMO, 0, NULL, NULL, st_stand}, // st_stand, - - {0, SPR_DEMO, 0, NULL, NULL, st_path1s},// st_path1, - {0, SPR_DEMO, 0, NULL, NULL, st_path2}, // st_path1s, - {0, SPR_DEMO, 0, NULL, NULL, st_path3}, // st_path2, - {0, SPR_DEMO, 0, NULL, NULL, st_path3s},// st_path3, - {0, SPR_DEMO, 0, NULL, NULL, st_path4}, // st_path3s, - {0, SPR_DEMO, 0, NULL, NULL, st_path1}, // st_path4, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain1, - - {0, SPR_DEMO, 0, NULL, NULL, st_shoot2},// st_shoot1, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot3},// st_shoot2, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot4},// st_shoot3, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot5},// st_shoot4, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot6},// st_shoot5, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot6, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot8},// st_shoot7, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot9},// st_shoot8, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot9, - - {0, SPR_BLINKY_W1, 10, T_Ghosts, NULL, st_chase2},// st_chase1, - {0, SPR_DEMO, 0, NULL, NULL, st_chase2}, // st_chase1s, - {0, SPR_BLINKY_W2, 10, T_Ghosts, NULL, st_chase1},// st_chase2, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase3s},// st_chase3, - {0, SPR_DEMO, 0, NULL, NULL, st_chase4}, // st_chase3s, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1}, // st_chase4, - - {0, SPR_DEMO, 10, NULL, NULL, st_die2},// st_die1, - {0, SPR_DEMO, 10, NULL, NULL, st_die3},// st_die2, - {0, SPR_DEMO, 10, NULL, NULL, st_dead},// st_die3, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die4, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die5, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die6, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die7, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die8, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die9, - - {0, SPR_DEMO, 0, NULL, NULL, st_dead} // st_dead - }, - // en_clyde, - { - {0, SPR_DEMO, 0, NULL, NULL, st_stand}, // st_stand, - - {0, SPR_DEMO, 0, NULL, NULL, st_path1s},// st_path1, - {0, SPR_DEMO, 0, NULL, NULL, st_path2}, // st_path1s, - {0, SPR_DEMO, 0, NULL, NULL, st_path3}, // st_path2, - {0, SPR_DEMO, 0, NULL, NULL, st_path3s},// st_path3, - {0, SPR_DEMO, 0, NULL, NULL, st_path4}, // st_path3s, - {0, SPR_DEMO, 0, NULL, NULL, st_path1}, // st_path4, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain1, - - {0, SPR_DEMO, 0, NULL, NULL, st_shoot2},// st_shoot1, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot3},// st_shoot2, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot4},// st_shoot3, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot5},// st_shoot4, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot6},// st_shoot5, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot6, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot8},// st_shoot7, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot9},// st_shoot8, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot9, - - {0, SPR_CLYDE_W1, 10, T_Ghosts, NULL, st_chase2},// st_chase1, - {0, SPR_DEMO, 0, NULL, NULL, st_chase2}, // st_chase1s, - {0, SPR_CLYDE_W2, 10, T_Ghosts, NULL, st_chase1},// st_chase2, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase3s},// st_chase3, - {0, SPR_DEMO, 0, NULL, NULL, st_chase4}, // st_chase3s, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1}, // st_chase4, - - {0, SPR_DEMO, 10, NULL, NULL, st_die2},// st_die1, - {0, SPR_DEMO, 10, NULL, NULL, st_die3},// st_die2, - {0, SPR_DEMO, 10, NULL, NULL, st_dead},// st_die3, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die4, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die5, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die6, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die7, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die8, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die9, - - {0, SPR_DEMO, 0, NULL, NULL, st_dead} // st_dead - }, - // en_pinky, - { - {0, SPR_DEMO, 0, NULL, NULL, st_stand}, // st_stand, - - {0, SPR_DEMO, 0, NULL, NULL, st_path1s},// st_path1, - {0, SPR_DEMO, 0, NULL, NULL, st_path2}, // st_path1s, - {0, SPR_DEMO, 0, NULL, NULL, st_path3}, // st_path2, - {0, SPR_DEMO, 0, NULL, NULL, st_path3s},// st_path3, - {0, SPR_DEMO, 0, NULL, NULL, st_path4}, // st_path3s, - {0, SPR_DEMO, 0, NULL, NULL, st_path1}, // st_path4, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain1, - - {0, SPR_DEMO, 0, NULL, NULL, st_shoot2},// st_shoot1, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot3},// st_shoot2, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot4},// st_shoot3, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot5},// st_shoot4, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot6},// st_shoot5, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot6, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot8},// st_shoot7, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot9},// st_shoot8, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot9, - - {0, SPR_PINKY_W1, 10, T_Ghosts, NULL, st_chase2},// st_chase1, - {0, SPR_DEMO, 0, NULL, NULL, st_chase2}, // st_chase1s, - {0, SPR_PINKY_W2, 10, T_Ghosts, NULL, st_chase1},// st_chase2, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase3s},// st_chase3, - {0, SPR_DEMO, 0, NULL, NULL, st_chase4}, // st_chase3s, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1}, // st_chase4, - - {0, SPR_DEMO, 10, NULL, NULL, st_die2},// st_die1, - {0, SPR_DEMO, 10, NULL, NULL, st_die3},// st_die2, - {0, SPR_DEMO, 10, NULL, NULL, st_dead},// st_die3, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die4, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die5, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die6, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die7, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die8, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die9, - - {0, SPR_DEMO, 0, NULL, NULL, st_dead} // st_dead - }, - // en_inky, - { - {0, SPR_DEMO, 0, NULL, NULL, st_stand}, // st_stand, - - {0, SPR_DEMO, 0, NULL, NULL, st_path1s},// st_path1, - {0, SPR_DEMO, 0, NULL, NULL, st_path2}, // st_path1s, - {0, SPR_DEMO, 0, NULL, NULL, st_path3}, // st_path2, - {0, SPR_DEMO, 0, NULL, NULL, st_path3s},// st_path3, - {0, SPR_DEMO, 0, NULL, NULL, st_path4}, // st_path3s, - {0, SPR_DEMO, 0, NULL, NULL, st_path1}, // st_path4, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain1, - - {0, SPR_DEMO, 0, NULL, NULL, st_shoot2},// st_shoot1, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot3},// st_shoot2, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot4},// st_shoot3, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot5},// st_shoot4, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot6},// st_shoot5, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot6, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot8},// st_shoot7, - {0, SPR_DEMO, 0, NULL, NULL, st_shoot9},// st_shoot8, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot9, - - {0, SPR_INKY_W1, 10, T_Ghosts, NULL, st_chase2},// st_chase1, - {0, SPR_DEMO, 0, NULL, NULL, st_chase2}, // st_chase1s, - {0, SPR_INKY_W2, 10, T_Ghosts, NULL, st_chase1},// st_chase2, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase3s},// st_chase3, - {0, SPR_DEMO, 0, NULL, NULL, st_chase4}, // st_chase3s, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1}, // st_chase4, - - {0, SPR_DEMO, 10, NULL, NULL, st_die2},// st_die1, - {0, SPR_DEMO, 10, NULL, NULL, st_die3},// st_die2, - {0, SPR_DEMO, 10, NULL, NULL, st_dead},// st_die3, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die4, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die5, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die6, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die7, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die8, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die9, - - {0, SPR_DEMO, 0, NULL, NULL, st_dead} // st_dead - }, - // en_gretel, - { - {0, SPR_GRETEL_W1, 0, T_Stand, NULL, st_stand}, // st_stand, - - {0, SPR_DEMO, 0, NULL, NULL, st_path1s},// st_path1, - {0, SPR_DEMO, 0, NULL, NULL, st_path2}, // st_path1s, - {0, SPR_DEMO, 0, NULL, NULL, st_path3}, // st_path2, - {0, SPR_DEMO, 0, NULL, NULL, st_path3s},// st_path3, - {0, SPR_DEMO, 0, NULL, NULL, st_path4}, // st_path3s, - {0, SPR_DEMO, 0, NULL, NULL, st_path1}, // st_path4, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain1, - - {0, SPR_GRETEL_SHOOT1, 30, NULL, NULL, st_shoot2},// st_shoot1, - {0, SPR_GRETEL_SHOOT2, 10, NULL, T_Shoot, st_shoot3},// st_shoot2, - {0, SPR_GRETEL_SHOOT3, 10, NULL, T_Shoot, st_shoot4},// st_shoot3, - {0, SPR_GRETEL_SHOOT2, 10, NULL, T_Shoot, st_shoot5},// st_shoot4, - {0, SPR_GRETEL_SHOOT3, 10, NULL, T_Shoot, st_shoot6},// st_shoot5, - {0, SPR_GRETEL_SHOOT2, 10, NULL, T_Shoot, st_shoot7},// st_shoot6, - {0, SPR_GRETEL_SHOOT3, 10, NULL, T_Shoot, st_shoot8},// st_shoot7, - {0, SPR_GRETEL_SHOOT1, 10, NULL, NULL, st_chase1},// st_shoot8, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot9, - - {0, SPR_GRETEL_W1, 10, T_Chase, NULL, st_chase1s},// st_chase1, - {0, SPR_GRETEL_W1, 3, NULL , NULL, st_chase2}, // st_chase1s, - {0, SPR_GRETEL_W2, 8, T_Chase, NULL, st_chase3}, // st_chase2, - {0, SPR_GRETEL_W3, 10, T_Chase, NULL, st_chase3s},// st_chase3, - {0, SPR_GRETEL_W3, 3, NULL , NULL, st_chase4}, // st_chase3s, - {0, SPR_GRETEL_W4, 8, T_Chase, NULL, st_chase1}, // st_chase4, - - {0, SPR_GRETEL_DIE1, 15, NULL, A_DeathScream, st_die2},// st_die1, - {0, SPR_GRETEL_DIE2, 15, NULL, NULL, st_die3},// st_die2, - {0, SPR_GRETEL_DIE3, 15, NULL, NULL, st_dead},// st_die3, - - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die4, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die5, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die6, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die7, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die8, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die9, - - {0, SPR_GRETEL_DEAD, 0, NULL, NULL, st_dead} // st_dead - }, - // en_gift, - { - {0, SPR_GIFT_W1, 0, T_Stand, NULL, st_stand}, // st_stand, - - {0, SPR_DEMO, 0, NULL, NULL, st_path1s},// st_path1, - {0, SPR_DEMO, 0, NULL, NULL, st_path2}, // st_path1s, - {0, SPR_DEMO, 0, NULL, NULL, st_path3}, // st_path2, - {0, SPR_DEMO, 0, NULL, NULL, st_path3s},// st_path3, - {0, SPR_DEMO, 0, NULL, NULL, st_path4}, // st_path3s, - {0, SPR_DEMO, 0, NULL, NULL, st_path1}, // st_path4, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain1, - - {0, SPR_GIFT_SHOOT1, 30, NULL, NULL, st_shoot2},// st_shoot1, - {0, SPR_GIFT_SHOOT2, 10, NULL, T_Launch, st_chase1},// st_shoot2, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot3, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot4, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot5, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot6, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot7, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot8, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot9, - - {0, SPR_GIFT_W1, 10, T_BossChase, NULL, st_chase1s},// st_chase1, - {0, SPR_GIFT_W1, 3, NULL , NULL, st_chase2}, // st_chase1s, - {0, SPR_GIFT_W2, 8, T_BossChase, NULL, st_chase3}, // st_chase2, - {0, SPR_GIFT_W3, 10, T_BossChase, NULL, st_chase3s},// st_chase3, - {0, SPR_GIFT_W3, 3, NULL , NULL, st_chase4}, // st_chase3s, - {0, SPR_GIFT_W4, 8, T_BossChase, NULL, st_chase1}, // st_chase4, - - {0, SPR_GIFT_W1, 10, NULL, A_DeathScream, st_die2},// st_die1, - {0, SPR_GIFT_W1, 10, NULL, NULL, st_die3},// st_die2, - {0, SPR_GIFT_DIE1, 10, NULL, NULL, st_die4},// st_die3, - {0, SPR_GIFT_DIE2, 10, NULL, NULL, st_die5},// st_die4, - {0, SPR_GIFT_DIE3, 10, NULL, NULL, st_dead},// st_die5, - - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die6, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die7, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die8, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die9, - - {0, SPR_GIFT_DEAD, 0, NULL, A_StartDeathCam, st_dead} // st_dead - }, - // en_fat, - { - {0, SPR_FAT_W1, 0, T_Stand, NULL, st_stand}, // st_stand, - - {0, SPR_DEMO, 0, NULL, NULL, st_path1s},// st_path1, - {0, SPR_DEMO, 0, NULL, NULL, st_path2}, // st_path1s, - {0, SPR_DEMO, 0, NULL, NULL, st_path3}, // st_path2, - {0, SPR_DEMO, 0, NULL, NULL, st_path3s},// st_path3, - {0, SPR_DEMO, 0, NULL, NULL, st_path4}, // st_path3s, - {0, SPR_DEMO, 0, NULL, NULL, st_path1}, // st_path4, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_pain1, - - {0, SPR_FAT_SHOOT1, 30, NULL, NULL, st_shoot2},// st_shoot1, - {0, SPR_FAT_SHOOT2, 10, NULL, T_Launch, st_shoot3},// st_shoot2, - {0, SPR_FAT_SHOOT3, 10, NULL, T_Shoot, st_shoot4},// st_shoot3, - {0, SPR_FAT_SHOOT4, 10, NULL, T_Shoot, st_shoot5},// st_shoot4, - {0, SPR_FAT_SHOOT3, 10, NULL, T_Shoot, st_shoot6},// st_shoot5, - {0, SPR_FAT_SHOOT4, 10, NULL, T_Shoot, st_chase1},// st_shoot6, - - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot7, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot8, - {0, SPR_DEMO, 0, NULL, NULL, st_chase1},// st_shoot9, - - {0, SPR_FAT_W1, 10, T_BossChase, NULL, st_chase1s},// st_chase1, - {0, SPR_FAT_W1, 3, NULL , NULL, st_chase2}, // st_chase1s, - {0, SPR_FAT_W2, 8, T_BossChase, NULL, st_chase3}, // st_chase2, - {0, SPR_FAT_W3, 10, T_BossChase, NULL, st_chase3s},// st_chase3, - {0, SPR_FAT_W3, 3, NULL , NULL, st_chase4}, // st_chase3s, - {0, SPR_FAT_W4, 8, T_BossChase, NULL, st_chase1}, // st_chase4, - - {0, SPR_FAT_W1, 10, NULL, A_DeathScream, st_die2},// st_die1, - {0, SPR_FAT_W1, 10, NULL, NULL, st_die3},// st_die2, - {0, SPR_FAT_DIE1, 10, NULL, NULL, st_die4},// st_die3, - {0, SPR_FAT_DIE2, 10, NULL, NULL, st_die5},// st_die4, - {0, SPR_FAT_DIE3, 10, NULL, NULL, st_dead},// st_die5, - - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die6, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die7, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die8, - {0, SPR_DEMO, 0, NULL, NULL, st_dead},// st_die9, - - {0, SPR_FAT_DEAD, 0, NULL, A_StartDeathCam, st_dead} // st_dead - }, -// --- Projectiles - // en_needle, - { - ST_INFO_NULL, // st_stand, - - {0, SPR_HYPO1, 6, T_Projectile, NULL, st_path2}, // st_path1, - ST_INFO_NULL, // st_path1s, - {0, SPR_HYPO2, 6, T_Projectile, NULL, st_path3}, // st_path2, - {0, SPR_HYPO3, 6, T_Projectile, NULL, st_path4}, // st_path3, - ST_INFO_NULL, // st_path3s, - {0, SPR_HYPO4, 6, T_Projectile, NULL, st_path1}, // st_path4, - - ST_INFO_NULL,// st_pain, - ST_INFO_NULL,// st_pain1, - - ST_INFO_NULL,// st_shoot1, - ST_INFO_NULL,// st_shoot2, - ST_INFO_NULL,// st_shoot3, - ST_INFO_NULL,// st_shoot4, - ST_INFO_NULL,// st_shoot5, - ST_INFO_NULL,// st_shoot6, - - ST_INFO_NULL,// st_shoot7, - ST_INFO_NULL,// st_shoot8, - ST_INFO_NULL,// st_shoot9, - - ST_INFO_NULL,// st_chase1, - ST_INFO_NULL, // st_chase1s, - ST_INFO_NULL, // st_chase2, - ST_INFO_NULL,// st_chase3, - ST_INFO_NULL, // st_chase3s, - ST_INFO_NULL, // st_chase4, - - ST_INFO_NULL, // st_die1, - ST_INFO_NULL, // st_die2, - ST_INFO_NULL, // st_die3, - ST_INFO_NULL,// st_die4, - ST_INFO_NULL,// st_die5, - - ST_INFO_NULL,// st_die6, - ST_INFO_NULL,// st_die7, - ST_INFO_NULL,// st_die8, - ST_INFO_NULL,// st_die9, - - ST_INFO_NULL // st_dead - }, - // en_fire, - { - ST_INFO_NULL, // st_stand, - - {0, SPR_FIRE1, 6, NULL, T_Projectile, st_path2}, // st_path1, - ST_INFO_NULL, // st_path1s, - {0, SPR_FIRE2, 6, NULL, T_Projectile, st_path1}, // st_path2, - ST_INFO_NULL, // st_path3, - ST_INFO_NULL, // st_path3s, - ST_INFO_NULL, // st_path4, - - ST_INFO_NULL,// st_pain, - ST_INFO_NULL,// st_pain1, - - ST_INFO_NULL,// st_shoot1, - ST_INFO_NULL,// st_shoot2, - ST_INFO_NULL,// st_shoot3, - ST_INFO_NULL,// st_shoot4, - ST_INFO_NULL,// st_shoot5, - ST_INFO_NULL,// st_shoot6, - - ST_INFO_NULL,// st_shoot7, - ST_INFO_NULL,// st_shoot8, - ST_INFO_NULL,// st_shoot9, - - ST_INFO_NULL,// st_chase1, - ST_INFO_NULL, // st_chase1s, - ST_INFO_NULL, // st_chase2, - ST_INFO_NULL,// st_chase3, - ST_INFO_NULL, // st_chase3s, - ST_INFO_NULL, // st_chase4, - - ST_INFO_NULL, // st_die1, - ST_INFO_NULL, // st_die2, - ST_INFO_NULL, // st_die3, - ST_INFO_NULL,// st_die4, - ST_INFO_NULL,// st_die5, - - ST_INFO_NULL,// st_die6, - ST_INFO_NULL,// st_die7, - ST_INFO_NULL,// st_die8, - ST_INFO_NULL,// st_die9, - - ST_INFO_NULL // st_dead - }, - // en_rocket, - { - {1, SPR_ROCKET_1, 3, T_Projectile, A_Smoke, st_stand}, // st_stand, - - ST_INFO_NULL,// st_path1, - ST_INFO_NULL, // st_path1s, - ST_INFO_NULL, // st_path2, - ST_INFO_NULL,// st_path3, - ST_INFO_NULL, // st_path3s, - ST_INFO_NULL, // st_path4, - - ST_INFO_NULL,// st_pain, - ST_INFO_NULL,// st_pain1, - - ST_INFO_NULL,// st_shoot1, - ST_INFO_NULL,// st_shoot2, - ST_INFO_NULL,// st_shoot3, - ST_INFO_NULL,// st_shoot4, - ST_INFO_NULL,// st_shoot5, - ST_INFO_NULL,// st_shoot6, - - ST_INFO_NULL,// st_shoot7, - ST_INFO_NULL,// st_shoot8, - ST_INFO_NULL,// st_shoot9, - - ST_INFO_NULL,// st_chase1, - ST_INFO_NULL, // st_chase1s, - ST_INFO_NULL, // st_chase2, - ST_INFO_NULL,// st_chase3, - ST_INFO_NULL, // st_chase3s, - ST_INFO_NULL, // st_chase4, - - {0, SPR_BOOM_1, 6, NULL, NULL, st_die2}, // st_die1, - {0, SPR_BOOM_2, 6, NULL, NULL, st_die3}, // st_die2, - {0, SPR_BOOM_3, 6, NULL, NULL, st_remove}, // st_die3, - ST_INFO_NULL,// st_die4, - ST_INFO_NULL,// st_die5, - - ST_INFO_NULL,// st_die6, - ST_INFO_NULL,// st_die7, - ST_INFO_NULL,// st_die8, - ST_INFO_NULL,// st_die9, - - ST_INFO_NULL // st_dead - }, - // en_smoke, - { - ST_INFO_NULL, // st_stand, - - ST_INFO_NULL, // st_path1, - ST_INFO_NULL, // st_path1s, - ST_INFO_NULL, // st_path2, - ST_INFO_NULL, // st_path3, - ST_INFO_NULL, // st_path3s, - ST_INFO_NULL, // st_path4, - - ST_INFO_NULL, // st_pain, - ST_INFO_NULL, // st_pain1, - - ST_INFO_NULL, // st_shoot1, - ST_INFO_NULL, // st_shoot2, - ST_INFO_NULL, // st_shoot3, - ST_INFO_NULL, // st_shoot4, - ST_INFO_NULL, // st_shoot5, - ST_INFO_NULL, // st_shoot6, - - ST_INFO_NULL, // st_shoot7, - ST_INFO_NULL, // st_shoot8, - ST_INFO_NULL, // st_shoot9, - - ST_INFO_NULL, // st_chase1, - ST_INFO_NULL, // st_chase1s, - ST_INFO_NULL, // st_chase2, - ST_INFO_NULL, // st_chase3, - ST_INFO_NULL, // st_chase3s, - ST_INFO_NULL, // st_chase4, - - {0, SPR_SMOKE_1, 3, NULL, NULL, st_die2}, // st_die1, - {0, SPR_SMOKE_2, 3, NULL, NULL, st_die3}, // st_die2, - {0, SPR_SMOKE_3, 3, NULL, NULL, st_die4}, // st_die3, - {0, SPR_SMOKE_4, 3, NULL, NULL, st_remove}, // st_die4, - ST_INFO_NULL, // st_die5, - - ST_INFO_NULL, // st_die6, - ST_INFO_NULL, // st_die7, - ST_INFO_NULL, // st_die8, - ST_INFO_NULL, // st_die9, - - ST_INFO_NULL // st_dead - }, - // en_bj, - { - ST_INFO_NULL, // st_stand, - - {0, SPR_BJ_W1, 12, T_BJRun, NULL, st_path1s}, // st_path1, - {0, SPR_BJ_W1, 3, NULL, NULL, st_path2}, // st_path1s, - {0, SPR_BJ_W2, 8, T_BJRun, NULL, st_path3}, // st_path2, - {0, SPR_BJ_W3, 12, T_BJRun, NULL, st_path3s}, // st_path3, - {0, SPR_BJ_W3, 3, NULL, NULL, st_path4}, // st_path3s, - {0, SPR_BJ_W4, 8, T_BJRun, NULL, st_path1}, // st_path4, - - ST_INFO_NULL, // st_pain, - ST_INFO_NULL, // st_pain1, - - {0, SPR_BJ_JUMP1, 14, T_BJJump, NULL, st_shoot2}, // st_shoot1, - {0, SPR_BJ_JUMP2, 14, T_BJJump, T_BJYell, st_shoot3}, // st_shoot2, - {0, SPR_BJ_JUMP3, 14, T_BJJump, NULL, st_shoot4}, // st_shoot3, - {0, SPR_BJ_JUMP4,300, NULL, T_BJDone, st_shoot4}, // st_shoot4, - ST_INFO_NULL, // st_shoot5, - ST_INFO_NULL, // st_shoot6, - - ST_INFO_NULL, // st_shoot7, - ST_INFO_NULL, // st_shoot8, - ST_INFO_NULL, // st_shoot9, - - ST_INFO_NULL, // st_chase1, - ST_INFO_NULL, // st_chase1s, - ST_INFO_NULL, // st_chase2, - ST_INFO_NULL, // st_chase3, - ST_INFO_NULL, // st_chase3s, - ST_INFO_NULL, // st_chase4, - - ST_INFO_NULL, // st_die1, - ST_INFO_NULL, // st_die2, - ST_INFO_NULL, // st_die3, - ST_INFO_NULL, // st_die4, - ST_INFO_NULL, // st_die5, - - ST_INFO_NULL, // st_die6, - ST_INFO_NULL, // st_die7, - ST_INFO_NULL, // st_die8, - ST_INFO_NULL, // st_die9, - - ST_INFO_NULL // st_dead - }, - -// --- Spear of destiny! - // en_spark, - { - ST_INFO_NULL, // st_stand, - - {0, SPR_SPARK1, 6, T_Projectile, NULL, st_path2}, // st_path1, - ST_INFO_NULL, // st_path1s, - {0, SPR_SPARK2, 6, T_Projectile, NULL, st_path3}, // st_path2, - {0, SPR_SPARK3, 6, T_Projectile, NULL, st_path4}, // st_path3, - ST_INFO_NULL, // st_path3s, - {0, SPR_SPARK4, 6, T_Projectile, NULL, st_path1}, // st_path4, - - ST_INFO_NULL,// st_pain, - ST_INFO_NULL,// st_pain1, - - ST_INFO_NULL,// st_shoot1, - ST_INFO_NULL,// st_shoot2, - ST_INFO_NULL,// st_shoot3, - ST_INFO_NULL,// st_shoot4, - ST_INFO_NULL,// st_shoot5, - ST_INFO_NULL,// st_shoot6, - - ST_INFO_NULL,// st_shoot7, - ST_INFO_NULL,// st_shoot8, - ST_INFO_NULL,// st_shoot9, - - ST_INFO_NULL,// st_chase1, - ST_INFO_NULL, // st_chase1s, - ST_INFO_NULL, // st_chase2, - ST_INFO_NULL,// st_chase3, - ST_INFO_NULL, // st_chase3s, - ST_INFO_NULL, // st_chase4, - - ST_INFO_NULL, // st_die1, - ST_INFO_NULL, // st_die2, - ST_INFO_NULL, // st_die3, - ST_INFO_NULL,// st_die4, - ST_INFO_NULL,// st_die5, - - ST_INFO_NULL,// st_die6, - ST_INFO_NULL,// st_die7, - ST_INFO_NULL,// st_die8, - ST_INFO_NULL,// st_die9, - - ST_INFO_NULL // st_dead - }, - // en_hrocket, - { - {1, SPR_HROCKET_1, 3, T_Projectile, A_Smoke, st_stand}, // st_stand, - - ST_INFO_NULL,// st_path1, - ST_INFO_NULL, // st_path1s, - ST_INFO_NULL, // st_path2, - ST_INFO_NULL,// st_path3, - ST_INFO_NULL, // st_path3s, - ST_INFO_NULL, // st_path4, - - ST_INFO_NULL,// st_pain, - ST_INFO_NULL,// st_pain1, - - ST_INFO_NULL,// st_shoot1, - ST_INFO_NULL,// st_shoot2, - ST_INFO_NULL,// st_shoot3, - ST_INFO_NULL,// st_shoot4, - ST_INFO_NULL,// st_shoot5, - ST_INFO_NULL,// st_shoot6, - - ST_INFO_NULL,// st_shoot7, - ST_INFO_NULL,// st_shoot8, - ST_INFO_NULL,// st_shoot9, - - ST_INFO_NULL,// st_chase1, - ST_INFO_NULL, // st_chase1s, - ST_INFO_NULL, // st_chase2, - ST_INFO_NULL,// st_chase3, - ST_INFO_NULL, // st_chase3s, - ST_INFO_NULL, // st_chase4, - - {0, SPR_HBOOM_1, 6, NULL, NULL, st_die2}, // st_die1, - {0, SPR_HBOOM_2, 6, NULL, NULL, st_die3}, // st_die2, - {0, SPR_HBOOM_3, 6, NULL, NULL, st_remove}, // st_die3, - ST_INFO_NULL,// st_die4, - ST_INFO_NULL,// st_die5, - - ST_INFO_NULL,// st_die6, - ST_INFO_NULL,// st_die7, - ST_INFO_NULL,// st_die8, - ST_INFO_NULL,// st_die9, - - ST_INFO_NULL // st_dead - }, - // en_hsmoke, - { - ST_INFO_NULL, // st_stand, - - ST_INFO_NULL, // st_path1, - ST_INFO_NULL, // st_path1s, - ST_INFO_NULL, // st_path2, - ST_INFO_NULL, // st_path3, - ST_INFO_NULL, // st_path3s, - ST_INFO_NULL, // st_path4, - - ST_INFO_NULL, // st_pain, - ST_INFO_NULL, // st_pain1, - - ST_INFO_NULL, // st_shoot1, - ST_INFO_NULL, // st_shoot2, - ST_INFO_NULL, // st_shoot3, - ST_INFO_NULL, // st_shoot4, - ST_INFO_NULL, // st_shoot5, - ST_INFO_NULL, // st_shoot6, - - ST_INFO_NULL, // st_shoot7, - ST_INFO_NULL, // st_shoot8, - ST_INFO_NULL, // st_shoot9, - - ST_INFO_NULL, // st_chase1, - ST_INFO_NULL, // st_chase1s, - ST_INFO_NULL, // st_chase2, - ST_INFO_NULL, // st_chase3, - ST_INFO_NULL, // st_chase3s, - ST_INFO_NULL, // st_chase4, - - {0, SPR_HSMOKE_1, 3, NULL, NULL, st_die2}, // st_die1, - {0, SPR_HSMOKE_2, 3, NULL, NULL, st_die3}, // st_die2, - {0, SPR_HSMOKE_3, 3, NULL, NULL, st_die4}, // st_die3, - {0, SPR_HSMOKE_4, 3, NULL, NULL, st_remove}, // st_die4, - ST_INFO_NULL, // st_die5, - - ST_INFO_NULL, // st_die6, - ST_INFO_NULL, // st_die7, - ST_INFO_NULL, // st_die8, - ST_INFO_NULL, // st_die9, - - ST_INFO_NULL // st_dead - }, - // en_spectre, - { - ST_INFO_NULL, // st_stand, - - {0, SPR_SPECTRE_W1, 10, T_Stand, NULL, st_path2}, // st_path1, - ST_INFO_NULL, // st_path1s, - {0, SPR_SPECTRE_W2, 10, T_Stand, NULL, st_path3}, // st_path2, - {0, SPR_SPECTRE_W3, 10, T_Stand, NULL, st_path4}, // st_path3, - ST_INFO_NULL, // st_path3s, - {0, SPR_SPECTRE_W4, 10, T_Stand, NULL, st_path1}, // st_path4, - - ST_INFO_NULL, // st_pain, - ST_INFO_NULL, // st_pain1, - - ST_INFO_NULL, // st_shoot1, - ST_INFO_NULL, // st_shoot2, - ST_INFO_NULL, // st_shoot3, - ST_INFO_NULL, // st_shoot4, - ST_INFO_NULL, // st_shoot5, - ST_INFO_NULL, // st_shoot6, - - ST_INFO_NULL, // st_shoot7, - ST_INFO_NULL, // st_shoot8, - ST_INFO_NULL, // st_shoot9, - - {0, SPR_SPECTRE_W1, 10, T_Ghosts, NULL, st_chase2}, // st_chase1, - ST_INFO_NULL, // st_chase1s, - {0, SPR_SPECTRE_W2, 10, T_Ghosts, NULL, st_chase3}, // st_chase2, - {0, SPR_SPECTRE_W3, 10, T_Ghosts, NULL, st_chase4}, // st_chase3, - ST_INFO_NULL, // st_chase3s, - {0, SPR_SPECTRE_W4, 10, T_Ghosts, NULL, st_chase1}, // st_chase4, - - {0, SPR_SPECTRE_F1, 10, NULL, NULL, st_die2}, // st_die1, - {0, SPR_SPECTRE_F2, 10, NULL, NULL, st_die3}, // st_die2, - {0, SPR_SPECTRE_F3, 10, NULL, NULL, st_die4}, // st_die3, - {0, SPR_SPECTRE_F4, 300, NULL, NULL, st_die5}, // st_die4, - {0, SPR_SPECTRE_F4, 10, NULL, A_Dormant, st_die5}, // st_die5, - - ST_INFO_NULL, // st_die6, - ST_INFO_NULL, // st_die7, - ST_INFO_NULL, // st_die8, - ST_INFO_NULL, // st_die9, - - ST_INFO_NULL // st_dead - }, - // en_angel, - { - {0, SPR_ANGEL_W1, 0, T_Stand, NULL, st_stand}, // st_stand, - - ST_INFO_NULL, // st_path1, - ST_INFO_NULL, // st_path1s, - ST_INFO_NULL, // st_path2, - ST_INFO_NULL, // st_path3, - ST_INFO_NULL, // st_path3s, - ST_INFO_NULL, // st_path4, - - {0, SPR_ANGEL_TIRED1, 40, NULL, A_Breathing, st_pain1}, // st_pain, - {0, SPR_ANGEL_TIRED2, 40, NULL, NULL, st_shoot4}, // st_pain1, - - {0, SPR_ANGEL_SHOOT1, 10, NULL, A_StartAttack, st_shoot2}, // st_shoot1, - {0, SPR_ANGEL_SHOOT2, 20, NULL, T_Launch, st_shoot3}, // st_shoot2, - {0, SPR_ANGEL_SHOOT1, 10, NULL, A_Relaunch, st_shoot2}, // st_shoot3, - - {0, SPR_ANGEL_TIRED1, 40, NULL, A_Breathing, st_shoot5}, // st_shoot4, - {0, SPR_ANGEL_TIRED2, 40, NULL, NULL, st_shoot6}, // st_shoot5, - {0, SPR_ANGEL_TIRED1, 40, NULL, A_Breathing, st_shoot7}, // st_shoot6, - {0, SPR_ANGEL_TIRED2, 40, NULL, NULL, st_shoot8}, // st_shoot7, - {0, SPR_ANGEL_TIRED1, 40, NULL, A_Breathing, st_chase1}, // st_shoot8, - ST_INFO_NULL, // st_shoot9, - - {0, SPR_ANGEL_W1, 10, T_BossChase, NULL, st_chase1s}, // st_chase1, - {0, SPR_ANGEL_W1, 3, NULL, NULL, st_chase2}, // st_chase1s, - {0, SPR_ANGEL_W2, 8, T_BossChase, NULL, st_chase3}, // st_chase2, - {0, SPR_ANGEL_W3, 10, T_BossChase, NULL, st_chase3s}, // st_chase3, - {0, SPR_ANGEL_W3, 3, NULL, NULL, st_chase4}, // st_chase3s, - {0, SPR_ANGEL_W4, 8, T_BossChase, NULL, st_chase1}, // st_chase4, - - {0, SPR_ANGEL_W1, 1, NULL, A_DeathScream, st_die2}, // st_die1, - {0, SPR_ANGEL_W1, 1, NULL, NULL, st_die3}, // st_die2, - {0, SPR_ANGEL_DIE1, 10, NULL, A_Slurpie, st_die4}, // st_die3, - {0, SPR_ANGEL_DIE2, 10, NULL, NULL, st_die5}, // st_die4, - {0, SPR_ANGEL_DIE3, 10, NULL, NULL, st_die6}, // st_die5, - {0, SPR_ANGEL_DIE4, 10, NULL, NULL, st_die7}, // st_die6, - {0, SPR_ANGEL_DIE5, 10, NULL, NULL, st_die8}, // st_die7, - {0, SPR_ANGEL_DIE6, 10, NULL, NULL, st_die9}, // st_die8, - {0, SPR_ANGEL_DIE7, 10, NULL, NULL, st_dead}, // st_die9, - - {0, SPR_ANGEL_DEAD, 130, NULL, A_Victory, st_dead} // st_dead - }, - // en_trans, - { - {0, SPR_TRANS_W1, 0, T_Stand, NULL, st_stand}, // st_stand, - - ST_INFO_NULL, // st_path1, - ST_INFO_NULL, // st_path1s, - ST_INFO_NULL, // st_path2, - ST_INFO_NULL, // st_path3, - ST_INFO_NULL, // st_path3s, - ST_INFO_NULL, // st_path4, - - ST_INFO_NULL, // st_pain, - ST_INFO_NULL, // st_pain1, - - {0, SPR_TRANS_SHOOT1, 30, NULL, NULL, st_shoot2}, // st_shoot1, - {0, SPR_TRANS_SHOOT2, 10, NULL, T_Shoot, st_shoot3}, // st_shoot2, - {0, SPR_TRANS_SHOOT3, 10, NULL, T_Shoot, st_shoot4}, // st_shoot3, - {0, SPR_TRANS_SHOOT2, 10, NULL, T_Shoot, st_shoot5}, // st_shoot4, - {0, SPR_TRANS_SHOOT3, 10, NULL, T_Shoot, st_shoot6}, // st_shoot5, - {0, SPR_TRANS_SHOOT2, 10, NULL, T_Shoot, st_shoot7}, // st_shoot6, - {0, SPR_TRANS_SHOOT3, 10, NULL, T_Shoot, st_shoot8}, // st_shoot7, - {0, SPR_TRANS_SHOOT1, 10, NULL, NULL, st_chase1}, // st_shoot8, - ST_INFO_NULL, // st_shoot9, - - {0, SPR_TRANS_W1, 10, T_Chase, NULL, st_chase1s}, // st_chase1, - {0, SPR_TRANS_W1, 3, NULL, NULL, st_chase2}, // st_chase1s, - {0, SPR_TRANS_W2, 8, T_Chase, NULL, st_chase3}, // st_chase2, - {0, SPR_TRANS_W3, 10, T_Chase, NULL, st_chase3s}, // st_chase3, - {0, SPR_TRANS_W3, 3, NULL, NULL, st_chase4}, // st_chase3s, - {0, SPR_TRANS_W4, 8, T_Chase, NULL, st_chase1}, // st_chase4, - - {0, SPR_TRANS_W1, 1, NULL, A_DeathScream, st_die2}, // st_die1, - {0, SPR_TRANS_W1, 1, NULL, NULL, st_die3}, // st_die2, - {0, SPR_TRANS_DIE1, 15, NULL, NULL, st_die4}, // st_die3, - {0, SPR_TRANS_DIE2, 15, NULL, NULL, st_die5}, // st_die4, - {0, SPR_TRANS_DIE3, 15, NULL, NULL, st_dead}, // st_die5, - ST_INFO_NULL, // st_die6, - ST_INFO_NULL, // st_die7, - ST_INFO_NULL, // st_die8, - ST_INFO_NULL, // st_die9, - - {0, SPR_TRANS_DEAD, 0, NULL, NULL, st_dead} // st_dead - }, - // en_uber, - { - {0, SPR_UBER_W1, 0, T_Stand, NULL, st_stand}, // st_stand, - - ST_INFO_NULL, // st_path1, - ST_INFO_NULL, // st_path1s, - ST_INFO_NULL, // st_path2, - ST_INFO_NULL, // st_path3, - ST_INFO_NULL, // st_path3s, - ST_INFO_NULL, // st_path4, - - ST_INFO_NULL, // st_pain, - ST_INFO_NULL, // st_pain1, - - {0, SPR_UBER_SHOOT1, 30, NULL, NULL, st_shoot2}, // st_shoot1, - {0, SPR_UBER_SHOOT2, 12, NULL, T_UShoot, st_shoot3}, // st_shoot2, - {0, SPR_UBER_SHOOT3, 12, NULL, T_UShoot, st_shoot4}, // st_shoot3, - {0, SPR_UBER_SHOOT4, 12, NULL, T_UShoot, st_shoot5}, // st_shoot4, - {0, SPR_UBER_SHOOT3, 12, NULL, T_UShoot, st_shoot6}, // st_shoot5, - {0, SPR_UBER_SHOOT2, 12, NULL, T_UShoot, st_shoot7}, // st_shoot6, - {0, SPR_UBER_SHOOT1, 12, NULL, NULL, st_chase1}, // st_shoot7, - ST_INFO_NULL, // st_shoot8, - ST_INFO_NULL, // st_shoot9, - - {0, SPR_UBER_W1, 10, T_Chase, NULL, st_chase1s}, // st_chase1, - {0, SPR_UBER_W1, 3, NULL, NULL, st_chase2}, // st_chase1s, - {0, SPR_UBER_W2, 8, T_Chase, NULL, st_chase3}, // st_chase2, - {0, SPR_UBER_W3, 10, T_Chase, NULL, st_chase3s}, // st_chase3, - {0, SPR_UBER_W3, 3, NULL, NULL, st_chase4}, // st_chase3s, - {0, SPR_UBER_W4, 8, T_Chase, NULL, st_chase1}, // st_chase4, - - {0, SPR_UBER_W1, 1, NULL, A_DeathScream, st_die2}, // st_die1, - {0, SPR_UBER_W1, 1, NULL, NULL, st_die3}, // st_die2, - {0, SPR_UBER_DIE1, 15, NULL, NULL, st_die4}, // st_die3, - {0, SPR_UBER_DIE2, 15, NULL, NULL, st_die5}, // st_die4, - {0, SPR_UBER_DIE3, 15, NULL, NULL, st_die6}, // st_die5, - {0, SPR_UBER_DIE4, 15, NULL, NULL, st_dead}, // st_die6, - ST_INFO_NULL, // st_die7, - ST_INFO_NULL, // st_die8, - ST_INFO_NULL, // st_die9, - - {0, SPR_UBER_DEAD, 0, NULL, NULL, st_dead} // st_dead - }, - // en_will, - { - {0, SPR_WILL_W1, 0, T_Stand, NULL, st_stand}, // st_stand, - - ST_INFO_NULL, // st_path1, - ST_INFO_NULL, // st_path1s, - ST_INFO_NULL, // st_path2, - ST_INFO_NULL, // st_path3, - ST_INFO_NULL, // st_path3s, - ST_INFO_NULL, // st_path4, - - ST_INFO_NULL, // st_pain, - ST_INFO_NULL, // st_pain1, - - {0, SPR_WILL_SHOOT1, 30, NULL, NULL, st_shoot2}, // st_shoot1, - {0, SPR_WILL_SHOOT2, 10, NULL, T_Launch, st_shoot3}, // st_shoot2, - {0, SPR_WILL_SHOOT3, 10, NULL, T_Shoot, st_shoot4}, // st_shoot3, - {0, SPR_WILL_SHOOT4, 10, NULL, T_Shoot, st_shoot5}, // st_shoot4, - {0, SPR_WILL_SHOOT3, 10, NULL, T_Shoot, st_shoot6}, // st_shoot5, - {0, SPR_WILL_SHOOT4, 10, NULL, T_Shoot, st_chase1}, // st_shoot6, - ST_INFO_NULL, // st_shoot7, - ST_INFO_NULL, // st_shoot8, - ST_INFO_NULL, // st_shoot9, - - {0, SPR_WILL_W1, 10, T_BossChase, NULL, st_chase1s}, // st_chase1, - {0, SPR_WILL_W1, 3, NULL, NULL, st_chase2}, // st_chase1s, - {0, SPR_WILL_W2, 8, T_BossChase, NULL, st_chase3}, // st_chase2, - {0, SPR_WILL_W3, 10, T_BossChase, NULL, st_chase3s}, // st_chase3, - {0, SPR_WILL_W3, 3, NULL, NULL, st_chase4}, // st_chase3s, - {0, SPR_WILL_W4, 8, T_BossChase, NULL, st_chase1}, // st_chase4, - - {0, SPR_WILL_W1, 1, NULL, A_DeathScream, st_die2}, // st_die1, - {0, SPR_WILL_W1, 10, NULL, NULL, st_die3}, // st_die2, - {0, SPR_WILL_DIE1, 10, NULL, NULL, st_die4}, // st_die3, - {0, SPR_WILL_DIE2, 10, NULL, NULL, st_die5}, // st_die4, - {0, SPR_WILL_DIE3, 10, NULL, NULL, st_dead}, // st_die5, - ST_INFO_NULL, // st_die6, - ST_INFO_NULL, // st_die7, - ST_INFO_NULL, // st_die8, - ST_INFO_NULL, // st_die9, - - {0, SPR_WILL_DEAD, 20, NULL, NULL, st_dead} // st_dead - }, - // en_death - { - {0, SPR_DEATH_W1, 0, T_Stand, NULL, st_stand}, // st_stand, - - ST_INFO_NULL, // st_path1, - ST_INFO_NULL, // st_path1s, - ST_INFO_NULL, // st_path2, - ST_INFO_NULL, // st_path3, - ST_INFO_NULL, // st_path3s, - ST_INFO_NULL, // st_path4, - - ST_INFO_NULL, // st_pain, - ST_INFO_NULL, // st_pain1, - - {0, SPR_DEATH_SHOOT1, 30, NULL, NULL, st_shoot2}, // st_shoot1, - {0, SPR_DEATH_SHOOT2, 10, NULL, T_Launch, st_shoot3}, // st_shoot2, - {0, SPR_DEATH_SHOOT4, 10, NULL, T_Shoot, st_shoot4}, // st_shoot3, - {0, SPR_DEATH_SHOOT3, 10, NULL, T_Launch, st_shoot5}, // st_shoot4, - {0, SPR_DEATH_SHOOT4, 10, NULL, T_Shoot, st_chase1}, // st_shoot5, - ST_INFO_NULL, // st_shoot6, - ST_INFO_NULL, // st_shoot7, - ST_INFO_NULL, // st_shoot8, - ST_INFO_NULL, // st_shoot9, - - {0, SPR_DEATH_W1, 10, T_BossChase, NULL, st_chase1s}, // st_chase1, - {0, SPR_DEATH_W1, 3, NULL, NULL, st_chase2}, // st_chase1s, - {0, SPR_DEATH_W2, 8, T_BossChase, NULL, st_chase3}, // st_chase2, - {0, SPR_DEATH_W3, 10, T_BossChase, NULL, st_chase3s}, // st_chase3, - {0, SPR_DEATH_W3, 3, NULL, NULL, st_chase4}, // st_chase3s, - {0, SPR_DEATH_W4, 8, T_BossChase, NULL, st_chase1}, // st_chase4, - - {0, SPR_DEATH_W1, 1, NULL, A_DeathScream, st_die2}, // st_die1, - {0, SPR_DEATH_W1, 10, NULL, NULL, st_die3}, // st_die2, - {0, SPR_DEATH_DIE1, 10, NULL, NULL, st_die4}, // st_die3, - {0, SPR_DEATH_DIE2, 10, NULL, NULL, st_die5}, // st_die4, - {0, SPR_DEATH_DIE3, 10, NULL, NULL, st_die6}, // st_die5, - {0, SPR_DEATH_DIE4, 10, NULL, NULL, st_die7}, // st_die6, - {0, SPR_DEATH_DIE5, 10, NULL, NULL, st_die7}, // st_die7, - {0, SPR_DEATH_DIE6, 10, NULL, NULL, st_die7}, // st_die8, - ST_INFO_NULL, // st_die9, - - {0, SPR_DEATH_DEAD, 0, NULL, NULL, st_dead} // st_dead - } - -}; - -int starthitpoints[ 4 ][ NUMENEMIES ] = -// -// BABY MODE -// -{ - {25, // guards - 50, // officer - 100, // SS - 1, // dogs - 850, // Hans - 850, // Schabbs - 200, // fake hitler - 800, // mecha hitler - 500, // hitler - 45, // mutants - 25, // ghosts - 25, // ghosts - 25, // ghosts - 25, // ghosts - - 850, // Gretel - 850, // Gift - 850, // Fat - -// --- Projectiles - 0, // en_needle, - 0, // en_fire, - 0, // en_rocket, - 0, // en_smoke, - 100, // en_bj, -// --- Spear of destiny! - 0, // en_spark, - 0, // en_hrocket, - 0, // en_hsmoke, - - 5, // en_spectre, - 1450, // en_angel, - 850, // en_trans, - 1050, // en_uber, - 950, // en_will, - 1250 // en_death - }, - // - // DON'T HURT ME MODE - // - {25, // guards - 50, // officer - 100, // SS - 1, // dogs - 950, // Hans - 950, // Schabbs - 300, // fake hitler - 950, // mecha hitler - 700, // hitler - 55, // mutants - 25, // ghosts - 25, // ghosts - 25, // ghosts - 25, // ghosts - - 950, // Gretel - 950, // Gift - 950, // Fat - -// --- Projectiles - 0, // en_needle, - 0, // en_fire, - 0, // en_rocket, - 0, // en_smoke, - 100, // en_bj, -// --- Spear of destiny! - 0, // en_spark, - 0, // en_hrocket, - 0, // en_hsmoke, - - 10, // en_spectre, - 1550, // en_angel, - 950, // en_trans, - 1150, // en_uber, - 1050, // en_will, - 1350 // en_death - }, - // - // BRING 'EM ON MODE - // - {25, // guards - 50, // officer - 100, // SS - 1, // dogs - - 1050, // Hans - 1550, // Schabbs - 400, // fake hitler - 1050, // mecha hitler - 800, // hitler - - 55, // mutants - 25, // ghosts - 25, // ghosts - 25, // ghosts - 25, // ghosts - - 1050, // Gretel - 1050, // Gift - 1050, // Fat - -// --- Projectiles - 0, // en_needle, - 0, // en_fire, - 0, // en_rocket, - 0, // en_smoke, - 100, // en_bj, -// --- Spear of destiny! - 0, // en_spark, - 0, // en_hrocket, - 0, // en_hsmoke, - - 15, // en_spectre, - 1650, // en_angel, - 1050, // en_trans, - 1250, // en_uber, - 1150, // en_will, - 1450 // en_death - }, - // - // DEATH INCARNATE MODE - // - {25, // guards - 50, // officer - 100, // SS - 1, // dogs - - 1200, // Hans - 2400, // Schabbs - 500, // fake hitler - 1200, // mecha hitler - 900, // hitler - - 65, // mutants - 25, // ghosts - 25, // ghosts - 25, // ghosts - 25, // ghosts - - 1200, // Gretel - 1200, // Gift - 1200, // Fat - -// --- Projectiles - 0, // en_needle, - 0, // en_fire, - 0, // en_rocket, - 0, // en_smoke, - 100, // en_bj, -// --- Spear of destiny! - 0, // en_spark, - 0, // en_hrocket, - 0, // en_hsmoke, - - 25, // en_spectre, - 2000, // en_angel, - 1200, // en_trans, - 1400, // en_uber, - 1300, // en_will, - 1600 // en_death - } -}; - - -#endif /* __WOLF_ACT_STAT_H__ */ - diff --git a/wolf3d/newCode/wolf/wolf_actor_ai.c b/wolf3d/newCode/wolf/wolf_actor_ai.c deleted file mode 100644 index 05718df..0000000 --- a/wolf3d/newCode/wolf/wolf_actor_ai.c +++ /dev/null @@ -1,968 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2001 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_actor_ai.c: Wolfenstein3-D artificial intelligence. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - */ - -#include "../wolfiphone.h" - -const char dsounds[ 7 ][ 32 ] = -{ - "sfx/025.wav", - "sfx/026.wav", - "sfx/086.wav", - "sfx/088.wav", - "sfx/105.wav", - "sfx/107.wav", - "sfx/109.wav" -}; - -const char dsodsounds[ 7 ][ 32 ] = -{ - "sfx/021.wav", - "sfx/022.wav", - "sfx/052.wav", - "sfx/054.wav", - "sfx/057.wav", - "sfx/059.wav", - "sfx/061.wav" -}; - -/* ------------------------------------------------------------------------------ - Function: A_DeathScream() -Do a death scream sound depending on actor type. - - Parameters: self -[in] Valid Pointer to an entity_t structure. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void A_DeathScream( entity_t *self ) -{ - switch( self->type ) - { - case en_mutant: - if( g_version->value == SPEAROFDESTINY ) - { - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/033.wav" ), 1, ATTN_NORM, 0 ); - } - else - { - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/037.wav" ), 1, ATTN_NORM, 0 ); - } - break; - - case en_guard: - if( g_version->value == SPEAROFDESTINY ) - { - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( dsodsounds[ US_RndT() % 6 ] ), 1, ATTN_NORM, 0 ); - } - else - { - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( dsounds[ US_RndT() % 6 ] ), 1, ATTN_NORM, 0 ); - } - break; - - case en_officer: - if( g_version->value == SPEAROFDESTINY ) - { - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/046.wav" ), 1, ATTN_NORM, 0 ); - } - else - { - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/074.wav" ), 1, ATTN_NORM, 0 ); - } - break; - - case en_ss: - if( g_version->value == SPEAROFDESTINY ) - { - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/035.wav" ), 1, ATTN_NORM, 0 ); - } - else - { - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/046.wav" ), 1, ATTN_NORM, 0 ); - } - break; - - case en_dog: - if( g_version->value == SPEAROFDESTINY ) - { - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/031.wav" ), 1, ATTN_NORM, 0 ); - } - else - { - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/035.wav" ), 1, ATTN_NORM, 0 ); - } - break; - - case en_boss: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/019.wav" ), 1, ATTN_NORM, 0 ); - break; - - case en_schabbs: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/061.wav" ), 1, ATTN_NORM, 0 ); - break; - - case en_fake: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/069.wav" ), 1, ATTN_NORM, 0 ); - break; - - case en_mecha: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/084.wav" ), 1, ATTN_NORM, 0 ); - break; - - case en_hitler: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/044.wav" ), 1, ATTN_NORM, 0 ); - break; - - case en_gretel: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/115.wav" ), 1, ATTN_NORM, 0 ); - break; - - case en_gift: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/091.wav" ), 1, ATTN_NORM, 0 ); - break; - - case en_fat: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/119.wav" ), 1, ATTN_NORM, 0 ); - break; - - case en_spectre: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "lsfx/062.wav" ), 1, ATTN_NORM, 0 ); - break; - - case en_angel: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/098.wav" ), 1, ATTN_NORM, 0 ); - break; - - case en_trans: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/070.wav" ), 1, ATTN_NORM, 0 ); - break; - - case en_uber: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/082.wav" ), 1, ATTN_NORM, 0 ); - break; - - case en_will: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/072.wav" ), 1, ATTN_NORM, 0 ); - break; - - case en_death: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/090.wav" ), 1, ATTN_NORM, 0 ); - break; - } -} - -/* ------------------------------------------------------------------------------ - Function: A_FirstSighting() -Puts an actor into attack mode and possibly - reverses the direction if the player is - behind it. - - Parameters: self -[in] Valid Pointer to an entity_t structure. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void A_FirstSighting( entity_t *self ) -{ - switch( self->type ) - { - case en_guard: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/001.wav" ), 1, ATTN_NORM, 0 ); - self->speed *= 3; // go faster when chasing player - break; - - case en_officer: - if( g_version->value == SPEAROFDESTINY ) - { - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/043.wav" ), 1, ATTN_NORM, 0 ); - } - else - { - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/071.wav" ), 1, ATTN_NORM, 0 ); - } - self->speed *= 5; // go faster when chasing player - break; - - case en_mutant: - self->speed *= 3; // go faster when chasing player - break; - - case en_ss: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/015.wav" ), 1, ATTN_NORM, 0 ); - self->speed *= 4; // go faster when chasing player - break; - - case en_dog: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/002.wav" ), 1, ATTN_NORM, 0 ); - self->speed *= 2; // go faster when chasing player - break; - - case en_boss: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/017.wav" ), 1, ATTN_NORM, 0 ); - self->speed = SPDPATROL * 3; // go faster when chasing player - break; - - case en_gretel: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/112.wav" ), 1, ATTN_NORM, 0 ); - self->speed *= 3; // go faster when chasing player - break; - - case en_gift: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/096.wav" ), 1, ATTN_NORM, 0 ); - self->speed *= 3; // go faster when chasing player - break; - - case en_fat: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/102.wav" ), 1, ATTN_NORM, 0 ); - self->speed *= 3; // go faster when chasing player - break; - - case en_schabbs: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/065.wav" ), 1, ATTN_NORM, 0 ); - self->speed *= 3; // go faster when chasing player - break; - - case en_fake: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/054.wav" ), 1, ATTN_NORM, 0 ); - self->speed *= 3; // go faster when chasing player - break; - - case en_mecha: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/040.wav" ), 1, ATTN_NORM, 0 ); - self->speed *= 3; // go faster when chasing player - break; - - case en_hitler: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/040.wav" ), 1, ATTN_NORM, 0 ); - self->speed *= 5; // go faster when chasing player - break; - - case en_blinky: - case en_clyde: - case en_pinky: - case en_inky: - self->speed *= 2; // go faster when chasing player - break; - -// -// Spear of Destiny -// - case en_spectre: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "lsfx/003.wav" ), 1, ATTN_NORM, 0 ); - self->speed = 800; // go faster when chasing player - break; - - case en_angel: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/095.wav" ), 1, ATTN_NORM, 0 ); - self->speed = 1536; // go faster when chasing player - break; - - case en_trans: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/066.wav" ), 1, ATTN_NORM, 0 ); - self->speed = 1536; // go faster when chasing player - break; - - case en_uber: - self->speed = 3000; // go faster when chasing player - break; - - case en_will: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/073.wav" ), 1, ATTN_NORM, 0 ); - self->speed = 2048; // go faster when chasing player - break; - - case en_death: - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/085.wav" ), 1, ATTN_NORM, 0 ); - self->speed = 2048; // go faster when chasing player - break; - - default: - return; - } - - A_StateChange( self, st_chase1 ); - if( self->waitfordoorx ) - { - self->waitfordoorx = self->waitfordoory = 0; // ignore the door opening command - } - - self->dir = dir8_nodir; - self->flags |= FL_ATTACKMODE | FL_FIRSTATTACK; -} - - -/* ------------------------------------------------------------------------------ - Function: A_KillActor() -Actor has been killed, so give points and spawn - powerups. - - Parameters: self -[in] Valid Pointer to an entity_t structure. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void A_KillActor( entity_t *self ) -{ - int tilex, tiley; - - tilex = self->tilex = self->x >> TILESHIFT; // drop item on center - tiley = self->tiley = self->y >> TILESHIFT; - - switch( self->type ) - { - case en_guard: - PL_GivePoints( &Player, 100 ); - Powerup_Spawn( tilex, tiley, pow_clip2, r_world ); - break; - - case en_officer: - PL_GivePoints( &Player, 400 ); - Powerup_Spawn( tilex, tiley, pow_clip2, r_world ); - break; - - case en_mutant: - PL_GivePoints( &Player, 700 ); - Powerup_Spawn( tilex, tiley, pow_clip2, r_world ); - break; - - case en_ss: - PL_GivePoints( &Player, 500 ); - if( Player.items & ITEM_WEAPON_3 ) // have a schmeiser? - { - Powerup_Spawn( tilex, tiley, pow_clip2, r_world ); - } - else - { - Powerup_Spawn( tilex, tiley, pow_machinegun, r_world ); - } - break; - - case en_dog: - PL_GivePoints( &Player, 200 ); - break; - - case en_boss: - PL_GivePoints( &Player, 5000 ); - Powerup_Spawn( tilex, tiley, pow_key1, r_world ); - break; - - case en_gretel: - PL_GivePoints( &Player, 5000 ); - Powerup_Spawn( tilex, tiley, pow_key1, r_world ); - break; - - case en_gift: - PL_GivePoints( &Player, 5000 ); - A_StartDeathCam( self ); - break; - - case en_fat: - PL_GivePoints( &Player, 5000 ); - A_StartDeathCam( self ); - break; - - case en_schabbs: - PL_GivePoints( &Player, 5000 ); - A_DeathScream( self ); - A_StartDeathCam( self ); - break; - - case en_fake: - PL_GivePoints( &Player, 2000 ); - break; - - case en_mecha: - PL_GivePoints( &Player, 5000 ); - break; - - case en_hitler: - PL_GivePoints( &Player, 5000 ); - A_DeathScream( self ); - A_StartDeathCam( self ); - break; - - case en_spectre: - PL_GivePoints( &Player, 200 ); - break; - - case en_angel: - PL_GivePoints( &Player, 5000 ); - break; - - case en_trans: - PL_GivePoints( &Player, 5000 ); - Powerup_Spawn( tilex, tiley, pow_key1, r_world ); - break; - - case en_uber: - PL_GivePoints( &Player, 5000 ); - Powerup_Spawn( tilex, tiley, pow_key1, r_world ); - break; - - case en_will: - PL_GivePoints( &Player, 5000 ); - Powerup_Spawn( tilex, tiley, pow_key1, r_world ); - break; - - case en_death: - PL_GivePoints( &Player, 5000 ); - Powerup_Spawn( tilex, tiley, pow_key1, r_world ); - break; - } - - A_StateChange( self, st_die1 ); - - if ( ++levelstate.killed_monsters == levelstate.total_monsters ) { - iphoneSetNotifyText( "You killed the last enemy!" ); - } - - self->flags &= ~FL_SHOOTABLE; - self->flags |= FL_NONMARK; - -} - -/* ------------------------------------------------------------------------------ - Function: A_DamageActor() -Called when the player succesfully hits an enemy. - - Parameters: self -[in] Valid Pointer to an entity_t structure. - - Returns: Nothing. - - Notes: - Does damage points to enemy ob, either putting it into a stun frame or - killing it. ------------------------------------------------------------------------------ -*/ -PUBLIC void A_DamageActor( entity_t *self, int damage ) -{ - Player.madenoise = 1; - -// do double damage if shooting a non attack mode actor - if( ! (self->flags & FL_ATTACKMODE) ) - { - damage <<= 1; - } - - self->health -= damage; - - if( self->health <= 0 ) - { - A_KillActor( self ); - } - else - { - if( ! (self->flags & FL_ATTACKMODE) ) - { - A_FirstSighting( self ); // put into combat mode - } - - switch( self->type ) // dogs only have one hit point - { - case en_guard: - case en_officer: - case en_mutant: - case en_ss: - if( self->health & 1 ) - { - A_StateChange( self, st_pain ); - } - else - { - A_StateChange( self, st_pain1 ); - } - break; - } - } -} - -/////////////////////////// -// -// Hitler -// -/////////////////////////// - - -/* ------------------------------------------------------------------------------ - Function: A_MechaSound -Play Mecha sound. - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void A_MechaSound( entity_t *self ) -{ - if( areabyplayer[ self->areanumber ] ) - { - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "sfx/080.wav" ), 1, ATTN_NORM, 0 ); - } -} - -/* ------------------------------------------------------------------------------ - Function: A_Slurpie -Play Slurpie sound. - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void A_Slurpie( entity_t *self ) -{ - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "lsfx/061.wav" ), 1, ATTN_NORM, 0 ); -} - - -/* ------------------------------------------------------------------------------ - Function: A_HitlerMorph() -Spawn new actor, when Mecha Hitler is dead. - - Parameters: self -[in] Valid Pointer to an entity_t structure. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void A_HitlerMorph( entity_t *self ) -{ - int hitpoints[ 4 ] = { 500, 700, 800, 900 }; - entity_t *hitler; - - hitler = GetNewActor(); - if( ! hitler ) - { - return; - } - - hitler->x = self->x;// - hitler->y = self->y;// - hitler->distance = self->distance; - hitler->tilex = self->tilex;// - hitler->tiley = self->tiley;// - hitler->angle = self->angle;// - hitler->dir = self->dir;// - hitler->health = hitpoints[ (int)skill->value ]; - hitler->areanumber = self->areanumber; - hitler->state = st_chase1;// - hitler->type = en_hitler; // - hitler->speed = SPDPATROL * 5;// - hitler->ticcount = 0;// - hitler->flags=self->flags | FL_SHOOTABLE; // - hitler->sprite = Sprite_GetNewSprite(); - - if ( ++levelstate.killed_monsters == levelstate.total_monsters ) { - iphoneSetNotifyText( "You killed the last enemy!" ); - } -} - -/////////////////////////// -// -// Angel of Death -// -/////////////////////////// - -/* - Angel can't shoot more then 3 sparks in a row. - It will get tired! -*/ - -PRIVATE int angel_temp = 0; - -// - -/* ------------------------------------------------------------------------------ - Function: A_Breathing -Play Angel of Death Breathing sound. - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void A_Breathing( entity_t *self ) -{ - Sound_StartSound( NULL, 0, CHAN_VOICE, Sound_RegisterSound( "lsfx/080.wav" ), 1, ATTN_NORM, 0 ); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void A_StartAttack( entity_t *self ) -{ - angel_temp = 0; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void A_Relaunch( entity_t *self ) -{ - if( ++angel_temp == 3 ) - { - A_StateChange( self, st_pain ); - return; - } - - if( US_RndT() & 1 ) - { - A_StateChange( self, st_chase1 ); - return; - } -} - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void A_Victory( entity_t *self ) -{ - iphoneStartIntermission( 0 ); -} - - -/* ------------------------------------------------------------------------------ - Function: A_Dormant() -Entity is dormant state. - - Parameters: self -[in] Valid Pointer to an entity_t structure. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void A_Dormant( entity_t *self ) -{ - int deltax, deltay; - int xl, xh, yl, yh, x, y, n; - - deltax = self->x - Player.position.origin[ 0 ]; - - if( deltax < -MINACTORDIST || deltax > MINACTORDIST ) - { - goto moveok; - } - - deltay = self->y - Player.position.origin[ 1 ]; - if( deltay < -MINACTORDIST || deltay > MINACTORDIST ) - { - goto moveok; - } - - return; - -moveok: - xl = (self->x - MINDIST) >> TILESHIFT; - xh = (self->x + MINDIST) >> TILESHIFT; - yl = (self->y - MINDIST) >> TILESHIFT; - yh = (self->y + MINDIST) >> TILESHIFT; - - for( y = yl ; y <= yh ; ++y ) - for( x = xl ; x <= xh ; ++x ) - { - if( r_world->tilemap[ x ][ y ] & SOLID_TILE ) - { - return; - } - - for( n = 0 ; n < NumGuards ; ++n ) - { - if( Guards[ n ].state >= st_die1 ) - { - continue; - } - - if( Guards[ n ].tilex == x && Guards[ n ].tiley == y ) - { - return; // another guard in path - } - } - } - - self->flags |= FL_AMBUSH | FL_SHOOTABLE; - self->flags &= ~FL_ATTACKMODE; - self->dir = dir8_nodir; - A_StateChange( self, st_path1 ); -} - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void A_StartDeathCam( entity_t *self ) -{ - // the DeathCam feature isn't implimented, but we want to give the animation time - // to play before declaring victory. - iphoneStartIntermission( 50 ); -} - - -/* ------------------------------------------------------------------------------ - Function: A_Smoke() -Rockets emmit smoke. - - Parameters: self -[in] Valid Pointer to an entity_t structure. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void A_Smoke( entity_t *self ) -{ - entity_t *smoke; - - smoke = GetNewActor(); - if( ! smoke ) - { - return; - } - - smoke->x = self->x; - smoke->y = self->y; - smoke->tilex = self->tilex; - smoke->tiley = self->tiley; - smoke->state = st_die1; - smoke->type = (self->type==en_hrocket) ? en_hsmoke : en_smoke; - smoke->ticcount = 6; - smoke->flags = FL_NEVERMARK; - smoke->sprite = Sprite_GetNewSprite(); -} - - -/* ------------------------------------------------------------------------------ - Function: ProjectileTryMove() -Called when projectile is airborne. - - Parameters: self -[in] Valid Pointer to an entity_t structure. - lvl -[in] Valid Pointer to LevelData_t structure. - - Returns: true if move ok, otherwise false. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE _boolean ProjectileTryMove( entity_t *self, LevelData_t *lvl ) -{ - #define PROJSIZE 0x2000 - - - int xl, yl, xh, yh, x, y; - - xl = (self->x - PROJSIZE) >> TILESHIFT; - yl = (self->y - PROJSIZE) >> TILESHIFT; - - xh = (self->x + PROJSIZE) >> TILESHIFT; - yh = (self->y + PROJSIZE) >> TILESHIFT; - - // Checking for solid walls: - for( y = yl ; y <= yh ; ++y ) - { - for( x = xl ; x <= xh ; ++x ) - { -// FIXME: decide what to do with statics & Doors! - if( lvl->tilemap[ x ][ y ] & (WALL_TILE | BLOCK_TILE) ) - { - return false; - } - - if( lvl->tilemap[ x ][ y ] & DOOR_TILE ) - { - if( Door_Opened( &lvl->Doors, x, y ) != DOOR_FULLOPEN ) - { - return false; - } - } - } - } -// FIXME: Projectile will fly through objects (even guards & columns) - must fix to create rocket launcher! - return true; -} - - -/* ------------------------------------------------------------------------------ - Function: T_Projectile() -Called when projectile is airborne. - - Parameters: self -[in] Valid Pointer to an entity_t structure. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void T_Projectile( entity_t *self ) -{ - #define PROJECTILESIZE 0xC000 - - - int deltax, deltay, speed, damage; - - speed = self->speed * tics; - - deltax = (int)(speed * CosTable[ self->angle ]); - deltay = (int)(speed * SinTable[ self->angle ]); - - if( deltax > TILEGLOBAL ) - { - deltax = TILEGLOBAL; - } - - if( deltax < -TILEGLOBAL ) - { - deltax = -TILEGLOBAL; // my - } - - if( deltay > TILEGLOBAL) - { - deltay = TILEGLOBAL; - } - - if( deltay < -TILEGLOBAL) - { - deltay = -TILEGLOBAL; // my - } - - self->x += deltax; - self->y += deltay; - - deltax = ABS( self->x-Player.position.origin[ 0 ] ); - deltay = ABS( self->y-Player.position.origin[ 1 ] ); - - if( ! ProjectileTryMove( self, r_world ) ) - { - if( self->type == en_rocket || self->type == en_hrocket ) - { // rocket ran into obstacle, draw explosion! - if( g_version->value == SPEAROFDESTINY ) - { - Sound_StartSound( NULL, 1, CHAN_WEAPON, Sound_RegisterSound( "lsfx/001.wav" ), 1, ATTN_NORM, 0 ); - } - else - { - Sound_StartSound( NULL, 1, CHAN_WEAPON, Sound_RegisterSound( "lsfx/086.wav" ), 1, ATTN_NORM, 0 ); - } - A_StateChange( self, st_die1 ); - } - else - { - A_StateChange( self, st_remove ); // mark for removal - } - return; - } - - if( deltax < PROJECTILESIZE && deltay < PROJECTILESIZE ) - { // hit the player - switch( self->type ) - { - case en_needle: - damage = (US_RndT() >> 3) + 20; - break; - - case en_rocket: - case en_hrocket: - case en_spark: - damage = (US_RndT()>>3) + 30; - break; - - case en_fire: - damage = (US_RndT() >> 3); - break; - - default: - damage = 0; - break; - } - - PL_Damage( &Player, self, damage ); - A_StateChange( self, st_remove ); // mark for removal - return; - } - - self->tilex = self->x >> TILESHIFT; - self->tiley = self->y >> TILESHIFT; -} diff --git a/wolf3d/newCode/wolf/wolf_actor_ai.h b/wolf3d/newCode/wolf/wolf_actor_ai.h deleted file mode 100644 index f428cb6..0000000 --- a/wolf3d/newCode/wolf/wolf_actor_ai.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_actor_ai.h: Wolfenstein3-D entity management. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - * Portion of this code was derived from Wolfenstein3-D, and was originally - * written by Id Software, Inc. - * - */ - -/* - Notes: - This module is implemented by wolf_actor_ai.c. - -*/ - -#ifndef __WOLF_ACTOR_AI_H__ -#define __WOLF_ACTOR_AI_H__ - -#include "wolf_actors.h" - -extern void A_DeathScream( entity_t *self ); -extern void A_FirstSighting( entity_t *self ); -extern void A_DamageActor( entity_t *self, int damage ); - -// hitler -extern void A_MechaSound( entity_t *self ); -extern void A_Slurpie( entity_t *self ); -extern void A_HitlerMorph( entity_t *self ); - -// angel -extern void A_Breathing( entity_t *self ); -extern void A_StartAttack( entity_t *self ); -extern void A_Relaunch( entity_t *self ); -extern void A_Victory( entity_t *self ); - -// ghost -extern void A_Dormant( entity_t *self ); - -extern void A_StartDeathCam( entity_t *self ); - -// missiles -extern void T_Projectile( entity_t *self ); -extern void A_Smoke( entity_t *self ); - - -#endif /* __WOLF_ACTOR_AI_H__ */ diff --git a/wolf3d/newCode/wolf/wolf_actors.c b/wolf3d/newCode/wolf/wolf_actors.c deleted file mode 100644 index 51f97e0..0000000 --- a/wolf3d/newCode/wolf/wolf_actors.c +++ /dev/null @@ -1,471 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2001 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_actors.c: Wolfenstein3-D actor manager. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - */ - -#include "../wolfiphone.h" - -#include "wolf_act_stat.h" - -entity_t Guards[ MAX_GUARDS + 1 ], *New; -W16 NumGuards = 0; -W8 add8dir[ 9 ] = { 4, 5, 6, 7, 0, 1, 2, 3, 0 }; -W8 r_add8dir[ 9 ]= { 4, 7, 6, 5, 0, 1, 2, 3, 0 }; - - - -/* ------------------------------------------------------------------------------ - Function: A_StateChange -Changes guard's state to that defined in NewState. - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void A_StateChange( entity_t *ent, en_state NewState ) -{ - ent->state = NewState; - assert( ent->type >= 0 && ent->type < NUMENEMIES ); - if ( NewState == st_remove ) { - ent->ticcount = 0; - } else { - assert( ent->state >= 0 && ent->state < NUMSTATES ); - ent->ticcount = objstate[ ent->type ][ ent->state ].timeout; //0; - } -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PRIVATE int DoGuard( entity_t *ent ) // FIXME: revise! -{ // returns 0 if we must remove this Guard from Guards list, otherwise 1; - think_t think; - - assert( ent->tilex >= 0 && ent->tilex < 64 ); - assert( ent->tiley >= 0 && ent->tiley < 64 ); - assert( ent->dir >= 0 && ent->dir <= 8 ); - - // ticcounts fire discrete actions separate from think functions - if ( ent->ticcount ) { - ent->ticcount -= tics; - while( ent->ticcount <= 0 ) - { - assert( ent->type >= 0 && ent->type < NUMENEMIES ); - assert( ent->state >= 0 && ent->state < NUMSTATES ); - think = objstate[ ent->type ][ ent->state ].action; // end of state action - if( think ) - { - think( ent ); - if( ent->state == st_remove ) - { - return 0; - } - } - - ent->state = objstate[ ent->type ][ ent->state ].next_state; - if( ent->state == st_remove ) - { - return 0; - } - - if( ! objstate[ ent->type ][ ent->state ].timeout ) - { - ent->ticcount = 0; - break; - } - - ent->ticcount += objstate[ ent->type ][ ent->state ].timeout; - } - } - -// -// think -// - assert( ent->type >= 0 && ent->type < NUMENEMIES ); - assert( ent->state >= 0 && ent->state < NUMSTATES ); - think = objstate[ ent->type ][ ent->state ].think; - if( think ) - { - think( ent ); - if( ent->state == st_remove ) - { - return 0; - } - } - - return 1; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PRIVATE void RemoveActor( entity_t *actor ) -{ - Sprite_RemoveSprite( actor->sprite ); - memmove( actor, actor+1, (int)(&Guards[ NumGuards ]) - (int)(actor+1) ); - NumGuards--; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void ProcessGuards( void ) -{ - int n, tex; - assert( NumGuards < MAX_GUARDS ); - for( n = 0 ; n < NumGuards ; ++n ) - { - if( ! DoGuard( &Guards[ n ] ) ) - { // remove guard from the game forever! - RemoveActor( &Guards[ n-- ] ); - continue; - } - - Sprite_SetPos( Guards[ n ].sprite, Guards[ n ].x, Guards[ n ].y, Guards[ n ].angle ); - tex = objstate[ Guards[ n ].type ][ Guards[ n ].state ].texture; - - if( objstate[ Guards[ n ].type ][ Guards[ n ].state ].rotate ) - { - if( Guards[ n ].type == en_rocket || Guards[ n ].type == en_hrocket ) - { - tex += r_add8dir[ Get8dir( angle_wise( FINE2RAD(Player.position.angle), FINE2RAD(Guards[ n ].angle) ) ) ]; - } - else - { - tex += add8dir[ Get8dir( angle_wise( FINE2RAD(Player.position.angle), FINE2RAD(Guards[ n ].angle) ) ) ]; - } - } - - Sprite_SetTex( Guards[ n ].sprite, 0, tex ); - } -} - - -/* ------------------------------------------------------------------------------ - Function: ResetGuards -Reset actors status - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void ResetGuards( void ) -{ - memset( Guards, 0, sizeof( Guards ) ); - NumGuards = 0; - New = NULL; -} - - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC entity_t *GetNewActor( void ) -{ - if( NumGuards > MAX_GUARDS ) - { - return NULL; - } - - memset( &Guards[ NumGuards ], 0, sizeof( Guards[ 0 ] ) ); - - return &Guards[ NumGuards++ ]; -} - - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC entity_t *SpawnActor( enemy_t which, int x, int y, dir4type dir, LevelData_t *lvl ) -{ - entity_t *new_actor; - - new_actor = GetNewActor(); - if( ! new_actor ) - { - return NULL; - } - - new_actor->x = TILE2POS( x ); - new_actor->y = TILE2POS( y ); - - new_actor->tilex = x; - new_actor->tiley = y; - - assert( dir >= 0 && dir <= 4 ); - new_actor->angle = dir4angle[ dir ]; - new_actor->dir = dir4to8[ dir ]; - - new_actor->areanumber = lvl->areas[ x ][ y ]; -// Com_Printf( "Actor at %i,%i had areaNum: %i\n", x, y, new_actor->areanumber ); - if ( new_actor->areanumber < 0 ) { - // ambush marker tiles are listed as -3 area - new_actor->areanumber = 0; - } - - assert( new_actor->areanumber >= 0 && new_actor->areanumber < NUMAREAS ); - new_actor->type = which; - - new_actor->health = starthitpoints[ (int)skill->value ][ which ]; - new_actor->sprite = Sprite_GetNewSprite(); - - return new_actor; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void SpawnStand( enemy_t which, int x, int y, int dir, LevelData_t *lvl ) -{ - entity_t *self; - - self = SpawnActor( which, x, y, dir, r_world ); - if( ! self ) - { - return; - } - - self->state = st_stand; - self->speed = SPDPATROL; - self->ticcount = objstate[ which ][ st_stand ].timeout ? US_RndT() % objstate[ which ][ st_stand ].timeout + 1 : 0; - self->flags |= FL_SHOOTABLE; - if( lvl->tilemap[ x ][ y ] & AMBUSH_TILE ) - { - self->flags |= FL_AMBUSH; - } - - levelstate.total_monsters++; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void SpawnPatrol( enemy_t which, int x, int y, int dir ) -{ - entity_t *self; - - self = SpawnActor( which, x, y, dir, r_world ); - if( ! self ) - { - return; - } - - self->state = st_path1; - self->speed = (which == en_dog) ? SPDDOG : SPDPATROL; - self->distance = TILEGLOBAL; - self->ticcount = objstate[ which ][ st_path1 ].timeout ? US_RndT() % objstate[ which ][ st_path1 ].timeout + 1 : 0; - self->flags |= FL_SHOOTABLE; - - levelstate.total_monsters++; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void SpawnDeadGuard( enemy_t which, int x, int y ) -{ - entity_t *self; - - self = SpawnActor( which, x, y, dir4_nodir, r_world ); - if( ! self ) - { - return; - } - - self->state = st_dead; - self->speed = 0; - self->health = 0; - self->ticcount = objstate[ which ][ st_dead ].timeout ? US_RndT() % objstate[ which ][ st_dead ].timeout + 1 : 0; - -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void SpawnBoss( enemy_t which, int x, int y ) -{ - entity_t *self; - dir4type face; - - switch( which ) - { - case en_boss: - case en_schabbs: - case en_fat: - case en_hitler: - face = dir4_south; - break; - - case en_fake: - case en_gretel: - case en_gift: - face = dir4_north; - break; - - case en_trans: - case en_uber: - case en_will: - case en_death: - case en_angel: - case en_spectre: - face = dir4_nodir; - break; - - default: - face = dir4_nodir; - break; - } - - self = SpawnActor( which, x, y, face, r_world ); - if( ! self ) - { - return; - } - - self->state = which == en_spectre ? st_path1 : st_stand; - self->speed = SPDPATROL; - self->health = starthitpoints[ (int)skill->value ][ which ]; - self->ticcount = objstate[ which ][ st_stand ].timeout ? US_RndT() % objstate[ which ][ st_stand ].timeout + 1 : 0; - self->flags |= FL_SHOOTABLE | FL_AMBUSH; - - levelstate.total_monsters++; - -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void SpawnGhosts( enemy_t which, int x, int y ) -{ - entity_t *self; - - self = SpawnActor( which, x, y, dir4_nodir, r_world ); - if( ! self ) - { - return; - } - - self->state = st_chase1; - self->speed = SPDPATROL * 3; - self->health = starthitpoints[ (int)skill->value ][ which ]; - self->ticcount = objstate[ which ][ st_chase1 ].timeout ? US_RndT() % objstate[ which ][ st_chase1 ].timeout + 1: 0; - self->flags |= FL_AMBUSH; - - levelstate.total_monsters++; -} diff --git a/wolf3d/newCode/wolf/wolf_actors.h b/wolf3d/newCode/wolf/wolf_actors.h deleted file mode 100644 index d7439b8..0000000 --- a/wolf3d/newCode/wolf/wolf_actors.h +++ /dev/null @@ -1,172 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_actors.h: Wolfenstein3-D entity management. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - * Portion of this code was derived from Wolfenstein3-D, and was originally - * written by Id Software, Inc. - * - */ - -/* - Notes: - This module is implemented by wolf_actors.c - -*/ - -#ifndef __WOLF_ACTORS_H__ -#define __WOLF_ACTORS_H__ - -#define SPDPATROL 512 -#define SPDDOG 1500 - -#define FL_SHOOTABLE 1 -#define FL_BONUS 2 -#define FL_NEVERMARK 4 -#define FL_VISABLE 8 -#define FL_ATTACKMODE 16 -#define FL_FIRSTATTACK 32 -#define FL_AMBUSH 64 -#define FL_NONMARK 128 - -#define MAX_GUARDS 255 -#define NUMENEMIES 31 -#define NUMSTATES 34 - -#define MINACTORDIST 0x10000 // minimum dist from player center to any actor center - -typedef enum -{ - en_guard, - en_officer, - en_ss, - en_dog, - en_boss, - en_schabbs, - en_fake, - en_mecha, - en_hitler, - en_mutant, - en_blinky, - en_clyde, - en_pinky, - en_inky, - en_gretel, - en_gift, - en_fat, -// --- Projectiles - en_needle, - en_fire, - en_rocket, - en_smoke, - en_bj, -// --- Spear of destiny! - en_spark, - en_hrocket, - en_hsmoke, - - en_spectre, - en_angel, - en_trans, - en_uber, - en_will, - en_death - -} enemy_t; - -typedef enum -{ - st_stand, - st_path1, st_path1s, st_path2, st_path3, st_path3s, st_path4, - st_pain, st_pain1, - st_shoot1, st_shoot2, st_shoot3, st_shoot4, st_shoot5, st_shoot6, st_shoot7, st_shoot8, st_shoot9, - st_chase1, st_chase1s, st_chase2, st_chase3, st_chase3s, st_chase4, - st_die1, st_die2, st_die3, st_die4, st_die5, st_die6, st_die7, st_die8, st_die9, - st_dead, - st_remove - -} en_state; - -typedef struct entity_s -{ - int x, y, angle; - int type; - int health; - int max_health; - int speed; - int ticcount; - int temp2; - int distance; - char tilex, tiley; - char areanumber; - int waitfordoorx, waitfordoory; // waiting on this door if non 0 - W8 flags; // FL_SHOOTABLE, etc - en_state state; - dir8type dir; - int sprite; - -} entity_t; - -typedef void (*think_t)( entity_t *self ); - -typedef struct -{ - char rotate; // 1-if object can be rotated, 0 if one sprite for every direction - int texture; // base object's state texture if rotation is on facing player - int timeout; // after how man ticks change state to .next_state - think_t think; // what to do every frame - think_t action; // what to do once per state - en_state next_state; // next state - -} stateinfo; - - - -extern entity_t Guards[ MAX_GUARDS + 1 ]; -extern entity_t *New; -extern W16 NumGuards; -extern stateinfo objstate[ NUMENEMIES ][ NUMSTATES ]; - -extern void ResetGuards(void); - - -extern entity_t *GetNewActor( void ); -extern entity_t *SpawnActor( enemy_t which, int x, int y, dir4type dir, LevelData_t *lvl ); -extern void A_StateChange( entity_t *Guard, en_state NewState ); - - -extern void SpawnStand( enemy_t which, int tilex, int tiley, int dir, LevelData_t *lvl ); -extern void SpawnPatrol( enemy_t which, int tilex, int tiley, int dir ); -extern void SpawnDeadGuard( enemy_t which, int x, int y ); -extern void SpawnBoss( enemy_t which, int x, int y ); -extern void SpawnGhosts( enemy_t which, int x, int y ); - - -#endif /* __WOLF_ACTORS_H__ */ - diff --git a/wolf3d/newCode/wolf/wolf_ai_com.c b/wolf3d/newCode/wolf/wolf_ai_com.c deleted file mode 100644 index dcdc6a4..0000000 --- a/wolf3d/newCode/wolf/wolf_ai_com.c +++ /dev/null @@ -1,1315 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_ai_com.c: Wolfenstein3-D actor manager. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - */ - -#include "../wolfiphone.h" - - - -#define RUNSPEED 6000 - - -/* ------------------------------------------------------------------------------ - Function: AI_ChangeDir() -Entity is going to move in a new direction. - - Parameters: - - Returns: 1 if direction is OK, otherwise 0. - - Notes: - Called, when actor finished previous moving & located in the 'center' of - the tile. Entity will try walking in direction. - ------------------------------------------------------------------------------ -*/ -PRIVATE int AI_ChangeDir( entity_t *self, dir8type new_dir, LevelData_t *lvl ) -{ - int oldx, oldy, newx, newy; // all it tiles - int n; - - oldx = POS2TILE( self->x ); - oldy = POS2TILE( self->y ); - assert( new_dir >= 0 && new_dir <= 8 ); - newx = oldx + dx8dir[ new_dir ]; - newy = oldy + dy8dir[ new_dir ]; - - if( new_dir & 0x01 ) // same as %2 (diagonal dir) - { - if( lvl->tilemap[ newx ][ oldy ] & SOLID_TILE || - lvl->tilemap[ oldx ][ newy ] & SOLID_TILE || - lvl->tilemap[ newx ][ newy ] & SOLID_TILE ) - { - return 0; - } - - for( n = 0 ; n < NumGuards ; ++n ) - { - if( Guards[ n ].state >= st_die1 ) - continue; - - if( Guards[ n ].tilex == newx && Guards[ n ].tiley == newy ) - return 0; // another guard in path - - if( Guards[ n ].tilex == oldx && Guards[ n ].tiley == newy ) - return 0; // another guard in path - - if( Guards[ n ].tilex == newx && Guards[ n ].tiley == oldy ) - return 0; // another guard in path - } - } - else // linear dir (E, N, W, S) - { - if( lvl->tilemap[ newx ][ newy ] & SOLID_TILE ) - { - return 0; - } - - if( lvl->tilemap[ newx ][ newy ] & DOOR_TILE ) - { - if( self->type == en_fake || self->type == en_dog) // they can't open doors - { - if( lvl->Doors.DoorMap[ newx ][ newy ].action != dr_open ) // path is blocked by a closed opened door - { - return 0; - } - } - else - { - self->waitfordoorx = newx; - self->waitfordoory = newy; - goto moveok; - } - } - for( n = 0 ; n < NumGuards ; ++n ) - { - if( Guards[ n ].state >= st_die1 ) - { - continue; - } - - if( Guards[ n ].tilex == newx && Guards[ n ].tiley == newy ) - { - return 0; // another guard in path - } - } - } - -moveok: - self->tilex = newx; - self->tiley = newy; - - lvl->tilemap[ oldx ][ oldy ] &= ~ACTOR_TILE; // update map status - lvl->tilemap[ newx ][ newy ] |= ACTOR_TILE; - - if( lvl->areas[ newx ][ newy ] > 0 ) - { // ambush tiles don't have valid area numbers (-3), so don't change the area if walking over them - self->areanumber = lvl->areas[ newx ][ newy ]; - assert( self->areanumber >= 0 && self->areanumber < NUMAREAS ); - } - - self->distance = TILEGLOBAL; - self->dir = new_dir; - - return 1; -} - -/* ------------------------------------------------------------------------------ - Function: AI_Path() -Entity is going to turn on a way point. - - Parameters: - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void AI_Path( entity_t *self ) -{ - if( r_world->tilemap[ self->x >> TILESHIFT ][ self->y >> TILESHIFT ] & WAYPOINT_TILE ) - { - long tileinfo = r_world->tilemap[self->x>>TILESHIFT][self->y>>TILESHIFT]; - if(tileinfo&TILE_IS_E_TURN) - self->dir=dir8_east; - else if(tileinfo&TILE_IS_NE_TURN) - self->dir=dir8_northeast; - else if(tileinfo&TILE_IS_N_TURN) - self->dir=dir8_north; - else if(tileinfo&TILE_IS_NW_TURN) - self->dir=dir8_northwest; - else if(tileinfo&TILE_IS_W_TURN) - self->dir=dir8_west; - else if(tileinfo&TILE_IS_SW_TURN) - self->dir=dir8_southwest; - else if(tileinfo&TILE_IS_S_TURN) - self->dir=dir8_south; - else if(tileinfo&TILE_IS_SE_TURN) - self->dir=dir8_southeast; - } - - if( ! AI_ChangeDir( self, self->dir, r_world )) - { - self->dir=dir8_nodir; - } -} - -/* ------------------------------------------------------------------------------ - Function: AI_Dodge() -Attempts to choose and initiate a movement for entity - that sends it towards the player while dodging. - - Parameters: - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void AI_Dodge( entity_t *self ) -{ - int deltax, deltay, i; - dir8type dirtry[ 5 ], turnaround, tdir; - - if( self->flags & FL_FIRSTATTACK ) - { -// turning around is only ok the very first time after noticing the player - turnaround = dir8_nodir; - self->flags &= ~FL_FIRSTATTACK; - } - else - { - turnaround = opposite8[ self->dir ]; - } - - deltax = POS2TILE( Player.position.origin[ 0 ] ) - POS2TILE( self->x ); - deltay = POS2TILE( Player.position.origin[ 1 ] ) - POS2TILE( self->y ); - -// -// arange 5 direction choices in order of preference -// the four cardinal directions plus the diagonal straight towards -// the player -// - - if( deltax > 0 ) - { - dirtry[ 1 ] = dir8_east; - dirtry[ 3 ] = dir8_west; - } - else - { - dirtry[ 1 ] = dir8_west; - dirtry[ 3 ] = dir8_east; - } - - if( deltay > 0 ) - { - dirtry[ 2 ] = dir8_north; - dirtry[ 4 ] = dir8_south; - } - else - { - dirtry[ 2 ] = dir8_south; - dirtry[ 4 ] = dir8_north; - } - -// randomize a bit for dodging - if( ABS( deltax ) > ABS( deltay ) ) - { - tdir = dirtry[1]; dirtry[1]=dirtry[2]; dirtry[2]=tdir; // => swap dirtry[1] & dirtry[2] - tdir = dirtry[3]; dirtry[3]=dirtry[4]; dirtry[4]=tdir; // => swap dirtry[3] & dirtry[4] - } - - if( US_RndT() < 128 ) - { - tdir=dirtry[1]; dirtry[1]=dirtry[2]; dirtry[2]=tdir; - tdir=dirtry[3]; dirtry[3]=dirtry[4]; dirtry[4]=tdir; - } - - dirtry[ 0 ] = diagonal[ dirtry[ 1 ] ][ dirtry[ 2 ] ]; - -// try the directions util one works - for( i = 0 ; i < 5 ; ++i ) - { - if( dirtry[ i ] == dir8_nodir || dirtry[ i ] == turnaround ) - { - continue; - } - - if( AI_ChangeDir( self, dirtry[ i ], r_world ) ) - { - return; - } - } - -// turn around only as a last resort - if( turnaround != dir8_nodir ) - { - if( AI_ChangeDir( self, turnaround, r_world ) ) - { - return; - } - } - - self->dir = dir8_nodir; -} - -/* ------------------------------------------------------------------------------ - Function: AI_Chase() -As AI_Dodge, but doesn't try to dodge. - - Parameters: - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void AI_Chase( entity_t *self ) -{ - int deltax, deltay; - dir8type d[2]; - dir8type tdir, olddir, turnaround; - - olddir = self->dir; - turnaround = opposite8[ olddir ]; - d[ 0 ] = d[ 1 ] = dir8_nodir; - - deltax = POS2TILE( Player.position.origin[ 0 ] ) - POS2TILE( self->x ); - deltay = POS2TILE( Player.position.origin[ 1 ] ) - POS2TILE( self->y ); - - if( deltax > 0 ) - { - d[ 0 ] = dir8_east; - } - else if( deltax < 0 ) - { - d[ 0 ] = dir8_west; - } - - if( deltay > 0 ) - { - d[ 1 ] = dir8_north; - } - else if( deltay < 0 ) - { - d[ 1 ] = dir8_south; - } - - if( ABS( deltay ) > ABS( deltax ) ) - { - tdir = d[ 0 ]; - d[ 0 ] = d[ 1 ]; - d[ 1 ] = tdir; - } // swap d[0] & d[1] - - if( d[ 0 ] == turnaround ) - { - d[ 0 ] = dir8_nodir; - } - - if( d[ 1 ] == turnaround ) - { - d[ 1 ] = dir8_nodir; - } - - if( d[ 0 ] != dir8_nodir ) - { - if( AI_ChangeDir( self, d[ 0 ], r_world ) ) - { - return; - } - } - - if( d[ 1 ] != dir8_nodir ) - { - if( AI_ChangeDir( self, d[ 1 ], r_world ) ) - { - return; - } - } - - // there is no direct path to the player, so pick another direction - if( olddir != dir8_nodir ) - { - if( AI_ChangeDir( self, olddir, r_world ) ) - { - return; - } - } - - if(US_RndT()>128) // randomly determine direction of search - { - for( tdir = dir8_east; tdir <= dir8_south; tdir += 2 ) // * Revision - { - if( tdir != turnaround ) - { - if( AI_ChangeDir(self, tdir, r_world) ) - { - return; - } - } - } - } - else - { - for( tdir = dir8_south; (int)tdir >= dir8_east; tdir -= 2 ) // * Revision (JDC fix for unsigned enums) - { - if( tdir != turnaround ) - { - if( AI_ChangeDir( self, tdir, r_world ) ) - { - return; - } - } - - } - } - - if( turnaround != dir8_nodir ) - { - if( AI_ChangeDir( self, turnaround, r_world ) ) - { - return; - } - } - - self->dir = dir8_nodir; // can't move -} - - -/* ------------------------------------------------------------------------------ - Function: AI_Retreat() -Run Away from player. - - Parameters: - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void AI_Retreat( entity_t *self ) -{ - int deltax, deltay; - dir8type d[2], tdir; - - deltax = POS2TILE( Player.position.origin[ 0 ] ) - POS2TILE( self->x ); - deltay = POS2TILE( Player.position.origin[ 1 ] ) - POS2TILE( self->y ); - - d[ 0 ] = deltax < 0 ? dir8_east : dir8_west; - d[ 1 ] = deltay < 0 ? dir8_north : dir8_south; - - if( ABS( deltay ) > ABS( deltax ) ) - { - tdir = d[ 0 ]; - d[ 0 ] = d[ 1 ]; - d[ 1 ] = tdir; - } // swap d[0] & d[1] - - if( AI_ChangeDir( self, d[ 0 ], r_world) ) - { - return; - } - - if( AI_ChangeDir( self, d[ 1 ], r_world) ) - { - return; - } - -// there is no direct path to the player, so pick another direction - - if( US_RndT() > 128 ) // randomly determine direction of search - { - for(tdir = dir8_east; tdir <= dir8_south; tdir += 2 ) // * Revision - { - if( AI_ChangeDir(self, tdir, r_world) ) - { - return; - } - } - } - else - { - for( tdir = dir8_south; (int)tdir >= dir8_east; tdir -= 2 ) // * Revision (JDC fix for unsigned enums) - { - if( AI_ChangeDir(self, tdir, r_world) ) - { - return; - } - } - } - - self->dir=dir8_nodir; // can't move -} - - -/* ------------------------------------------------------------------------------ - Function: AI_CheckSight() -Checks a straight line between player and - current object. - - Parameters: buf -[out] Storage location for data. - offset -[in] Number of bytes from beginning of file. - length -[in] Maximum number of items to be read. - - Returns: true if the player has been spoted, otherwise false. - - Notes: - If the sight is ok, check alertness and angle to see if they notice. ------------------------------------------------------------------------------ -*/ -PRIVATE _boolean AI_CheckSight( entity_t *self ) -{ - #define MINSIGHT 0x18000 - - - int deltax, deltay; - - -// don't bother tracing a line if the area isn't connected to the player's - if( ! (self->flags & FL_AMBUSH) ) - { - if( ! areabyplayer[ self->areanumber ] ) - { - return false; - } - } - -// if the player is real close, sight is automatic - deltax = Player.position.origin[ 0 ] - self->x; - deltay = Player.position.origin[ 1 ] - self->y; - - if( ABS( deltax ) < MINSIGHT && ABS( deltay ) < MINSIGHT ) - { - return true; - } - -// see if they are looking in the right direction - switch( self->dir ) - { - case dir8_north: - if( deltay < 0 ) - return false; - break; - - case dir8_east: - if( deltax < 0 ) - return false; - break; - - case dir8_south: - if( deltay > 0 ) - return false; - break; - - case dir8_west: - if( deltax > 0 ) - return false; - break; - } - -// trace a line to check for blocking tiles (corners) - return Level_CheckLine( self->x, self->y, Player.position.origin[0], Player.position.origin[1], r_world ); -} - - -/* ------------------------------------------------------------------------------ - Function: AI_FindTarget() -Called by entities that ARE NOT chasing the player. - - Parameters: - - Returns: - If the player is detected (by sight, noise, or proximity), the entity - is put into its combat frame and true is returned. - - Notes: - Incorporates a random reaction delay. ------------------------------------------------------------------------------ -*/ -PRIVATE _boolean AI_FindTarget( entity_t *self ) -{ - if( self->temp2 ) // count down reaction time - { - self->temp2 -= tics; - if( self->temp2 > 0 ) - { - return false; - } - self->temp2 = 0; // time to react - } - else - { - // check if we can/want to see/hear player - if( Player.flags & FL_NOTARGET ) - { - return false; // notarget cheat - } - assert( self->areanumber >= 0 && self->areanumber < NUMAREAS ); - if( ! (self->flags & FL_AMBUSH) && ! areabyplayer[ self->areanumber ] ) - { - return false; - } - - - if( ! AI_CheckSight( self ) ) // Player is visible - normal behavior - { - if( self->flags & FL_AMBUSH || ! Player.madenoise ) - { - return false; - } - } - self->flags &= ~FL_AMBUSH; - -// if we are here we see/hear player!!! - switch( self->type ) - { - case en_guard: - self->temp2 = 1 + US_RndT() / 4; - break; - - case en_officer: - self->temp2 = 2; - break; - - case en_mutant: - self->temp2 = 1 + US_RndT() / 6; - break; - - case en_ss: - self->temp2 = 1 + US_RndT() / 6; - break; - - case en_dog: - self->temp2 = 1 + US_RndT() / 8; - break; - - case en_boss: - case en_schabbs: - case en_fake: - case en_mecha: - case en_hitler: - case en_gretel: - case en_gift: - case en_fat: - case en_spectre: - case en_angel: - case en_trans: - case en_uber: - case en_will: - case en_death: - self->temp2 = 1; - break; - } - - return false; // we are amazed & waiting to understand what to do! - } - - A_FirstSighting( self ); - - return true; -} - - -/* ------------------------------------------------------------------------------ - Function: T_Move() -Moves object for distance in global units, - in ob->dir direction. - - Parameters: - - Returns: - If the player is detected (by sight, noise, or proximity), the entity - is put into its combat frame and true is returned. - - Notes: - ob->x = adjusted for new position - ob->y - - Actors are not allowed to move inside the player. - Does NOT check to see if the move is tile map valid. ------------------------------------------------------------------------------ -*/ -PRIVATE void T_Move( entity_t *self, long dist ) -{ - - if( self->dir == dir8_nodir || ! dist ) - { - return; - } - - self->x += dist * dx8dir[ self->dir ]; - self->y += dist * dy8dir[ self->dir ]; - -// check to make sure it's not on top of player - if( ABS( self->x - Player.position.origin[ 0 ] ) <= MINACTORDIST ) - if( ABS( self->y - Player.position.origin[ 1 ] ) <= MINACTORDIST ) - { - if(self->type==en_blinky|| - self->type==en_clyde || - self->type==en_pinky || - self->type==en_inky || - self->type==en_spectre) PL_Damage(&Player, self, 2); // ghosts hurt player! -// -// back up -// - self->x -= dist * dx8dir[ self->dir ]; - self->y -= dist * dy8dir[ self->dir ]; - return; - } - - self->distance -= dist; - if( self->distance < 0 ) - { - self->distance = 0; - } -} - - -/* ------------------------------------------------------------------------------ - Function: T_Advance() -Move object forward. - - Parameters: - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void T_Advance( entity_t *self, think_t think ) -{ - long move; - - if( ! think ) - { - Com_DPrintf( "Warning: Advance without proc\n" ); - return; - } - - move = self->speed * tics; - while( move > 0) - { - -// waiting for a door to open - if( self->waitfordoorx ) - { - doors_t *door = &r_world->Doors.DoorMap[ self->waitfordoorx ][ self->waitfordoory ]; - - Door_OpenDoor( door ); - if( door->action != dr_open ) - { - return; // not opened yet... - } - self->waitfordoorx = self->waitfordoory = 0; // go ahead, the door is now open - } - - if( move < self->distance ) - { - T_Move( self, move ); - break; - } - -// fix position to account for round off during moving - self->x = TILE2POS( self->tilex ); - self->y = TILE2POS( self->tiley ); - - move -= self->distance; - -// think: Where to go now? - think( self ); - self->angle = dir8angle[ self->dir ]; - if( self->dir == dir8_nodir ) - { - return; // all movement is blocked - } - } -} - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void T_Stand( entity_t *self ) -{ - AI_FindTarget( self ); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void T_Path( entity_t *self ) -{ - - if( AI_FindTarget( self ) ) - { - return; - } - - if( ! self->speed ) - { - return; // if patroling with a speed of 0 - } - - if( self->dir == dir8_nodir ) - { - AI_Path( self ); - if( self->dir == dir8_nodir ) - { - return; // all movement is blocked - } - } - - T_Advance(self, AI_Path); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void T_Ghosts( entity_t *self ) -{ - if( self->dir == dir8_nodir ) - { - AI_Chase( self ); - if( self->dir == dir8_nodir ) - { - return; // object is blocked in - } - - self->angle = dir8angle[ self->dir ]; - } - - T_Advance( self, AI_Chase ); -} - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void T_Chase( entity_t *self ) -{ - int dx,dy,dist,chance; - char dodge; - - // if (gamestate.victoryflag) return; - - dodge = 0; - if( Level_CheckLine( self->x, self->y, Player.position.origin[0], Player.position.origin[1], r_world ) ) // got a shot at player? - { - dx = ABS( POS2TILE( self->x ) - POS2TILE( Player.position.origin[ 0 ] ) ); - dy = ABS( POS2TILE( self->y ) - POS2TILE( Player.position.origin[ 1 ] ) ); - dist = max_of_2(dx, dy); - if( ! dist || (dist == 1 && self->distance < 16) ) - { - chance = 300; - } - else - { - chance = (tics << 4) / dist;//100/dist; - } - - if( US_RndT() < chance ) - { // go into attack frame - A_StateChange(self, st_shoot1); - return; - } - dodge = 1; - } - - if( self->dir == dir8_nodir ) - { - if( dodge ) - { - AI_Dodge( self ); - } - else - { - AI_Chase( self ); - } - - if( self->dir == dir8_nodir ) - { - return; // object is blocked in - } - self->angle = dir8angle[ self->dir ]; - } - - T_Advance( self, dodge ? AI_Dodge : AI_Chase ); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void T_Bite( entity_t *self ) -{ - long dx, dy; - - Sound_StartSound( NULL, 1, CHAN_VOICE, Sound_RegisterSound( "lsfx/076.wav" ), 1, ATTN_NORM, 0 ); - - dx = ABS( Player.position.origin[ 0 ] - self->x ) - TILEGLOBAL; - if( dx <= MINACTORDIST ) - { - dy = ABS( Player.position.origin[ 1 ] - self->y ) - TILEGLOBAL; - if( dy <= MINACTORDIST ) - { - if(US_RndT()<180) - { - PL_Damage(&Player, self, US_RndT()>>4); - return; - } - } - } -} - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void T_DogChase( entity_t *self ) -{ - long dx, dy; - - if( self->dir == dir8_nodir ) - { - AI_Dodge( self ); - self->angle = dir8angle[ self->dir ]; - if( self->dir == dir8_nodir ) - { - return; // object is blocked in - } - } - -// -// check for bite range -// - dx = ABS( Player.position.origin[ 0 ] - self->x ) - TILEGLOBAL / 2; - if(dx <= MINACTORDIST) - { - dy = ABS( Player.position.origin[ 1 ] - self->y ) - TILEGLOBAL / 2; - if( dy <= MINACTORDIST ) - { - A_StateChange( self, st_shoot1 ); - return; // bite player! - } - } - - T_Advance( self, AI_Dodge ); -} - - -/* ------------------------------------------------------------------------------ - Function: T_BossChase - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - They retreat if too close to player. ------------------------------------------------------------------------------ -*/ -PUBLIC void T_BossChase( entity_t *self ) -{ - int dx, dy, dist; - W8 dodge; - - dodge = 0; - dx = ABS( self->tilex - POS2TILE( Player.position.origin[ 0 ] ) ); - dy = ABS( self->tiley - POS2TILE( Player.position.origin[ 1 ] ) ); - dist = max_of_2( dx, dy ); - - if( Level_CheckLine( self->x, self->y, Player.position.origin[0], Player.position.origin[1], r_world ) ) // got a shot at player? - { - if( US_RndT() < tics << 3 ) - { // go into attack frame - A_StateChange( self, st_shoot1 ); - return; - } - dodge = 1; - } - - if( self->dir == dir8_nodir ) - { - if(dodge) - { - AI_Dodge(self); - } - else - { - AI_Chase(self); - } - - if( self->dir == dir8_nodir ) - { - return; // object is blocked in - } - } - - T_Advance( self, dist < 4 ? AI_Retreat : (dodge ? AI_Dodge : AI_Chase)); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void T_Fake( entity_t *self ) -{ - - if( Level_CheckLine( self->x, self->y, Player.position.origin[0], Player.position.origin[1], r_world ) ) // got a shot at player? - { - if( US_RndT() < tics << 1 ) - { // go into attack frame - A_StateChange( self, st_shoot1 ); - return; - } - } - - if( self->dir == dir8_nodir ) - { - AI_Dodge( self ); - if( self->dir == dir8_nodir ) - { - return; // object is blocked in - } - } - - T_Advance( self, AI_Dodge ); -} - - - -/* ------------------------------------------------------------------------------ - Function: T_Shoot -Try to damage the player. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void T_Shoot( entity_t *self ) -{ - int dx, dy, dist; - int hitchance, damage; - - if( ! areabyplayer[ self->areanumber ] ) - { - return; - } - - if( ! Level_CheckLine( self->x, self->y, Player.position.origin[0], Player.position.origin[1], r_world ) ) - { - return; // player is behind a wall - } - - dx = ABS( POS2TILE( self->x ) - POS2TILE( Player.position.origin[ 0 ] ) ); - dy = ABS( POS2TILE( self->y ) - POS2TILE( Player.position.origin[ 1 ] ) ); - dist = max_of_2( dx, dy ); - - if( self->type == en_ss || self->type == en_boss ) - { - dist = dist * 2 / 3; // ss are better shots - } - - if( Player.speed >= RUNSPEED ) - { - hitchance = 160; - } - else - { - hitchance = 256; - } - -// if guard is visible by player -// player can see to dodge -// (if CheckLine both player & enemy see each other) -// So left only check if guard is in player's fov: FIXME: not fixed fov! - if( angle_diff( TransformPoint( self->x, self->y, Player.position.origin[0], Player.position.origin[1] ), FINE2DEG( Player.position.angle ) ) < (M_PI/3) ) - { - hitchance -= dist * 16; - } - else - { - hitchance -= dist * 8; - } - -// see if the shot was a hit - if( US_RndT() < hitchance ) - { - if( dist < 2 ) - { - damage = US_RndT() >> 2; - } - else if( dist < 4 ) - { - damage = US_RndT() >> 3; - } - else - { - damage = US_RndT() >> 4; - } - - PL_Damage( &Player, self, damage ); - } - - switch( self->type ) - { - case en_ss: - if( g_version->value == SPEAROFDESTINY ) - { - Sound_StartSound( NULL, 1, CHAN_WEAPON, Sound_RegisterSound( "sfx/020.wav" ), 1, ATTN_NORM, 0 ); - } - else - { - Sound_StartSound( NULL, 1, CHAN_WEAPON, Sound_RegisterSound( "sfx/024.wav" ), 1, ATTN_NORM, 0 ); - } - break; - - case en_gift: - case en_fat: - case en_mecha: - case en_hitler: - case en_boss: - Sound_StartSound( NULL, 1, CHAN_WEAPON, Sound_RegisterSound( "sfx/022.wav" ), 1, ATTN_NORM, 0 ); - break; - - default: - if( g_version->value == SPEAROFDESTINY ) - { - Sound_StartSound( NULL, 1, CHAN_WEAPON, Sound_RegisterSound( "sfx/038.wav" ), 1, ATTN_NORM, 0 ); - } - else - { - Sound_StartSound( NULL, 1, CHAN_WEAPON, Sound_RegisterSound( "sfx/049.wav" ), 1, ATTN_NORM, 0 ); - } - break; - } -} - -/* ------------------------------------------------------------------------------ - Function: T_UShoot -[UberMutant] - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void T_UShoot( entity_t *self ) -{ - int dx, dy, dist; - - T_Shoot( self ); - - dx = ABS( self->tilex - POS2TILE( Player.position.origin[ 0 ] ) ); - dy = ABS( self->tiley - POS2TILE( Player.position.origin[ 1 ] ) ); - dist = max_of_2( dx, dy ); - - if( dist <= 1 ) - { - PL_Damage( &Player, self, 10 ); - } -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void T_Launch( entity_t *self ) -{ - entity_t *proj; - float iangle; - - iangle = TransformPoint( self->x, self->y, Player.position.origin[ 0 ], Player.position.origin[ 1 ] ) + M_PI; - if( iangle > 2 * M_PI ) - { - iangle -= 2 * M_PI; - } - - if( self->type == en_death ) - {// death knight launches 2 rockets with 4 degree shift each. - T_Shoot( self ); - if( self->state == st_shoot2 ) - { - iangle = normalize_angle( iangle - DEG2RAD( 4 ) ); - } - else - { - iangle = normalize_angle( iangle + DEG2RAD( 4 ) ); - } - } - - proj = GetNewActor(); - if( proj == NULL ) - { - return; - } - - proj->x = self->x; - proj->y = self->y; - - proj->tilex = self->tilex; - proj->tiley = self->tiley; - - proj->state = st_stand; - proj->ticcount = 1; - proj->dir = dir8_nodir; - - proj->angle = RAD2FINE( iangle ); - proj->speed = 0x2000; - proj->flags = FL_NONMARK; // FL_NEVERMARK; - proj->sprite = Sprite_GetNewSprite(); - - switch( self->type ) - { - case en_death: - proj->type = en_hrocket; - Sound_StartSound( NULL, 1, CHAN_WEAPON, Sound_RegisterSound( "lsfx/078.wav" ), 1, ATTN_NORM, 0 ); - break; - - case en_angel: - proj->type = en_spark; - proj->state = st_path1; - Sound_StartSound( NULL, 1, CHAN_WEAPON, Sound_RegisterSound( "lsfx/069.wav" ), 1, ATTN_NORM, 0 ); - break; - - case en_fake: - proj->type = en_fire; - proj->state = st_path1; - proj->flags = FL_NEVERMARK; - proj->speed = 0x1200; - Sound_StartSound( NULL, 1, CHAN_WEAPON, Sound_RegisterSound( "lsfx/069.wav" ), 1, ATTN_NORM, 0 ); - break; - - case en_schabbs: - proj->type = en_needle; - proj->state = st_path1; - Sound_StartSound( NULL, 1, CHAN_WEAPON, Sound_RegisterSound( "lsfx/008.wav" ), 1, ATTN_NORM, 0 ); - break; - - default: - proj->type = en_rocket; - - if( g_version->value == SPEAROFDESTINY ) - { - Sound_StartSound( NULL, 1, CHAN_WEAPON, Sound_RegisterSound( "lsfx/008.wav" ), 1, ATTN_NORM, 0 ); - } - else - { - Sound_StartSound( NULL, 1, CHAN_WEAPON, Sound_RegisterSound( "lsfx/085.wav" ), 1, ATTN_NORM, 0 ); - } - } - -} diff --git a/wolf3d/newCode/wolf/wolf_ai_com.h b/wolf3d/newCode/wolf/wolf_ai_com.h deleted file mode 100644 index 9fb8a1a..0000000 --- a/wolf3d/newCode/wolf/wolf_ai_com.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_ai_com.h: Wolfenstein3-D entity management. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - * Portion of this code was derived from Wolfenstein3-D, and was originally - * written by Id Software, Inc. - * - */ - -/* - Notes: - This module is implemented by wolf_ai_com.c - -*/ - -#ifndef __WOLF_AI_COM_H__ -#define __WOLF_AI_COM_H__ - -#include "wolf_actors.h" - -// common AI functions - -extern void T_Stand( entity_t *self ); -extern void T_Path( entity_t *self ); -extern void T_Ghosts( entity_t *self ); -extern void T_Chase( entity_t *self ); -extern void T_Bite( entity_t *self ); -extern void T_DogChase( entity_t *self ); -extern void T_BossChase( entity_t *self ); -extern void T_Fake( entity_t *self ); - -extern void T_Shoot( entity_t *self ); -extern void T_UShoot( entity_t *self ); -extern void T_Launch( entity_t *self ); - - -#endif /* __WOLF_AI_COM_H__ */ - diff --git a/wolf3d/newCode/wolf/wolf_areas.c b/wolf3d/newCode/wolf/wolf_areas.c deleted file mode 100644 index 960a502..0000000 --- a/wolf3d/newCode/wolf/wolf_areas.c +++ /dev/null @@ -1,170 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_areas.c: Wolfenstein3-D area management. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - * Acknowledgement: - * Portion of this code was derived from Wolfenstein3-D, and was originally - * written by Id Software, Inc. - * - */ - - -/* - Notes: - - Open doors connect two areas, so sounds will travel between them and sight - will be checked when the player is in a connected area. - - Areaconnect is incremented/decremented by each door. If >0 they connect. - - Every time a door opens or closes the areabyplayer matrix gets recalculated. - An area is true if it connects with the player's current spor. - -*/ - -#include "../wolfiphone.h" - - - - -W8 areaconnect[ NUMAREAS ][ NUMAREAS ]; -_boolean areabyplayer[ NUMAREAS ]; - - - -/* ------------------------------------------------------------------------------ - Function: Areas_RecursiveConnect() -Scans outward from playerarea, - marking all connected areas. - - Parameters: areanumber -[in] area. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void Areas_RecursiveConnect( int areanumber ) -{ - int i; - - for( i = 0 ; i < NUMAREAS ; ++i ) - { - if( areaconnect[ areanumber ][ i ] && ! areabyplayer[ i ] ) - { - areabyplayer[ i ] = true; - Areas_RecursiveConnect( i ); - } - } -} - -/* ------------------------------------------------------------------------------ - Function: Areas_ConnectAreas() -Connect area. - - Parameters: areanumber -[in] area. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Areas_ConnectAreas( int areanumber ) -{ - int c = 0; - int i; - - assert( areanumber < NUMAREAS ); - memset( areabyplayer, 0, sizeof( areabyplayer ) ); - areabyplayer[ areanumber ] = true; - Areas_RecursiveConnect( areanumber ); - for ( i = 0 ; i < NUMAREAS ; i++ ) { - if ( areabyplayer[i] ) { - c++; - } - } -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Areas_InitAreas( int areanumber ) -{ - memset( areaconnect, 0, sizeof( areaconnect ) ); - memset( areabyplayer, 0, sizeof( areabyplayer ) ); - areabyplayer[ areanumber ] = true; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Areas_JoinAreas( int area1, int area2 ) -{// FIXME: check for overflow! - areaconnect[ area1 ][ area2 ]++; - areaconnect[ area2 ][ area1 ]++; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Areas_DisconnectAreas( int area1, int area2 ) -{// FIXME: check for underflow! - areaconnect[ area1 ][ area2 ]--; - areaconnect[ area2 ][ area1 ]--; -} diff --git a/wolf3d/newCode/wolf/wolf_bj.c b/wolf3d/newCode/wolf/wolf_bj.c deleted file mode 100644 index 0f59ae2..0000000 --- a/wolf3d/newCode/wolf/wolf_bj.c +++ /dev/null @@ -1,136 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -#include "../wolfiphone.h" - - - -#define BJRUNSPEED 2048 -#define BJJUMPSPEED 680 - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -void SpawnBJVictory( void ) -{ - entity_t *bj; - - bj = SpawnActor( en_bj, POS2TILE(Player.position.origin[0]), POS2TILE(Player.position.origin[1]), dir4_north, r_world ); - if( ! bj ) - { - return; - } - - bj->x = Player.position.origin[ 0 ]; - bj->y = Player.position.origin[ 1 ]; - bj->state = st_path1; - bj->speed = BJRUNSPEED; - bj->flags = FL_NONMARK; // FL_NEVERMARK; - bj->temp2 = 6; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -void T_BJRun( entity_t *Guard ) -{ -// MoveObj(Guard, Guard->speed); - - if( ! Guard->distance ) - { - Guard->distance = TILEGLOBAL; - if ( !(--Guard->temp2) ) - { - A_StateChange( Guard, st_shoot1 ); - Guard->speed = BJJUMPSPEED; - return; - } - } -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -void T_BJJump( entity_t *Guard ) -{ -// MoveObj(Guard, Guard->speed); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -void T_BJYell( entity_t *Guard ) -{ - Sound_StartSound( NULL, 0, CHAN_VOICE, Sound_RegisterSound( "sfx/082.wav" ), 1, ATTN_NORM, 0 ); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -void T_BJDone( entity_t *Guard ) -{ - Player.playstate = ex_victory; // exit castle tile -} diff --git a/wolf3d/newCode/wolf/wolf_bj.h b/wolf3d/newCode/wolf/wolf_bj.h deleted file mode 100644 index d2adcef..0000000 --- a/wolf3d/newCode/wolf/wolf_bj.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_bj.h: Wolfenstein3-D bj code . - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - * Portion of this code was derived from Wolfenstein3-D, and was originally - * written by Id Software, Inc. - * - */ - -/* - Notes: - This module is implemented by wolf_bj.c - -*/ - -#ifndef __WOLF_BJ_H__ -#define __WOLF_BJ_H__ - - - -extern void SpawnBJVictory( void ); -extern void T_BJRun( entity_t *Guard ); -extern void T_BJJump( entity_t *Guard ); -extern void T_BJYell( entity_t *Guard ); -extern void T_BJDone( entity_t *Guard ); - - - - - -#endif /* __WOLF_BJ_H__ */ - diff --git a/wolf3d/newCode/wolf/wolf_client_main.c b/wolf3d/newCode/wolf/wolf_client_main.c deleted file mode 100644 index f5507f1..0000000 --- a/wolf3d/newCode/wolf/wolf_client_main.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -#include "../wolfiphone.h" - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Client_PrepRefresh( const char *r_mapname ) -{ - char mapname[ 32 ]; - - if( ! r_mapname || ! *r_mapname ) - { - return; - } - - if( g_version->value == SPEAROFDESTINY ) - { - spritelocation = SODSPRITESDIRNAME; - } - else - { - spritelocation = WL6SPRITESDIRNAME; - } - - my_strlcpy( mapname, r_mapname, sizeof( mapname ) ); // skip "maps/" - - // !@# fix crash bug if you type something short... - if ( strlen( mapname ) > 4 && !strcmp( mapname + strlen( mapname ) - 4, ".map" ) ) { - mapname[ strlen( mapname ) - 4 ] = '\0'; // cut off ".map" - } - - // register models, pics, and skins - R_BeginRegistration( mapname ); - - if( r_world == NULL ) - { - return; - } - - - Com_Printf( "Map: %s\n", r_world->mapName ); - - Level_ScanInfoPlane( r_world ); // Spawn items/guards - - Com_Printf( "Spawning Entities\n" ); - PL_Spawn( r_world->pSpawn, r_world ); // Spawn Player - - Com_Printf( "Caching Textures and Sounds\n" ); - Level_PrecacheTextures_Sound( r_world ); - - // clear any lines of console text - Con_ClearNotify(); - - if( r_world->musicName ) - { - Sound_StartBGTrack( r_world->musicName, r_world->musicName ); - } - - Player.playstate = ex_playing; -} - -int tics; - - - - diff --git a/wolf3d/newCode/wolf/wolf_doors.c b/wolf3d/newCode/wolf/wolf_doors.c deleted file mode 100644 index f1c4d55..0000000 --- a/wolf3d/newCode/wolf/wolf_doors.c +++ /dev/null @@ -1,506 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_doors.c: Wolfenstein 3-D door management. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - * Acknowledgement: - * Portion of this code was derived from Wolfenstein 3-D, and was originally - * written by Id Software, Inc. - * - */ - -#include "../wolfiphone.h" - -#define CLOSEWALL MINDIST // Space between wall & player -#define MAXDOORS 64 // max number of sliding doors - - - - -/* ------------------------------------------------------------------------------ - Function: Door_ResetDoors -Resets doors status - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Door_ResetDoors( LevelDoors_t *lvldoors ) -{ - lvldoors->doornum = 0; - - memset( lvldoors->Doors, 0, sizeof( lvldoors->Doors ) ); - memset( lvldoors->DoorMap, 0, sizeof( lvldoors->DoorMap ) ); -} - - - - -/* ------------------------------------------------------------------------------ - Function: Door_SpawnDoor -Spawns door at x, y, position. - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC int Door_SpawnDoor( LevelDoors_t *lvldoors, int x, int y, int type ) -{ - if( lvldoors->doornum >= MAXDOORS ) - { - Com_DPrintf( "[%s]: Too many Doors on level! (%d)\n", "wolf_doors.c", lvldoors->doornum ); - return 0; - } - - switch( type ) - { - case 0x5A: - lvldoors->DoorMap[ x ][ y ].type = DOOR_VERT; - lvldoors->DoorMap[ x ][ y ].vertical= true; - lvldoors->DoorMap[ x ][ y ].texture = TEX_DDOOR + 1; - break; - - case 0x5B: - lvldoors->DoorMap[ x ][ y ].type = DOOR_HORIZ; - lvldoors->DoorMap[ x ][ y ].vertical = false; - lvldoors->DoorMap[ x ][ y ].texture = TEX_DDOOR; - break; - - case 0x5C: - lvldoors->DoorMap[ x ][ y ].type = DOOR_G_VERT; - lvldoors->DoorMap[ x ][ y ].vertical = true; - lvldoors->DoorMap[ x ][ y ].texture = TEX_DLOCK + 1; - break; - - case 0x5D: - lvldoors->DoorMap[ x ][ y ].type = DOOR_G_HORIZ; - lvldoors->DoorMap[ x ][ y ].vertical = false; - lvldoors->DoorMap[ x ][ y ].texture = TEX_DLOCK; - break; - - case 0x5E: - lvldoors->DoorMap[ x ][ y ].type = DOOR_S_VERT; - lvldoors->DoorMap[ x ][ y ].vertical = true; - lvldoors->DoorMap[ x ][ y ].texture = TEX_DLOCK + 1; - break; - - case 0x5F: - lvldoors->DoorMap[ x ][ y ].type = DOOR_S_HORIZ; - lvldoors->DoorMap[ x ][ y ].vertical = false; - lvldoors->DoorMap[ x ][ y ].texture = TEX_DLOCK; - break; - - case 0x64: - lvldoors->DoorMap[ x ][ y ].type = DOOR_E_VERT; - lvldoors->DoorMap[ x ][ y ].vertical = true; - lvldoors->DoorMap[ x ][ y ].texture = TEX_DELEV + 1; - break; - - case 0x65: - lvldoors->DoorMap[ x ][ y ].type = DOOR_E_HORIZ; - lvldoors->DoorMap[ x ][ y ].vertical = false; - lvldoors->DoorMap[ x ][ y ].texture = TEX_DELEV; - break; - - default: - Com_DPrintf( "Door_SpawnDoor: Unknown door type: %d\n", type ); - return 0; - } - - lvldoors->DoorMap[ x ][ y ].tilex = x; - lvldoors->DoorMap[ x ][ y ].tiley = y; - lvldoors->DoorMap[ x ][ y ].action = dr_closed; - - lvldoors->Doors[ lvldoors->doornum ] = &lvldoors->DoorMap[ x ][ y ]; - lvldoors->doornum++; - - return lvldoors->doornum - 1; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Door_SetAreas( LevelDoors_t *lvldoors, int (*areas)[64] ) -{ - int n, x, y; - - for( n = 0 ; n < lvldoors->doornum ; ++n ) - { - x = lvldoors->Doors[ n ]->tilex; - y = lvldoors->Doors[ n ]->tiley; - - if( lvldoors->Doors[ n ]->vertical ) - { - lvldoors->Doors[ n ]->area1 = areas[ x + 1 ][ y ] >= 0 ? areas[ x + 1 ][ y ] : 0; - lvldoors->Doors[ n ]->area2 = areas[ x - 1 ][ y ] >= 0 ? areas[ x - 1 ][ y ] : 0; - } - else - { - lvldoors->Doors[ n ]->area1 = areas[ x ][ y + 1 ] >= 0 ? areas[ x ][ y + 1 ] : 0; - lvldoors->Doors[ n ]->area2 = areas[ x ][ y - 1 ] >= 0 ? areas[ x ][ y - 1 ] : 0; - } - } -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE W8 CanCloseDoor( int x, int y, char vert ) -{ - int n; - - if( POS2TILE( Player.position.origin[ 0 ] ) == x && - POS2TILE( Player.position.origin[ 1 ] ) == y ) - { - return 0; - } - - if( vert ) - { - if( POS2TILE( Player.position.origin[ 1 ] ) == y ) - { - if( POS2TILE( Player.position.origin[ 0 ] + CLOSEWALL ) == x ) - { - return 0; - } - - if( POS2TILE( Player.position.origin[ 0 ] - CLOSEWALL ) == x ) - { - return 0; - } - } - - for( n = 0 ; n < NumGuards ; ++n ) - { - if( Guards[ n ].tilex == x && Guards[ n ].tiley == y ) - { - return 0; // guard in door - } - - if( Guards[ n ].tilex == x - 1 && - Guards[ n ].tiley == y && - POS2TILE( Guards[ n ].x + CLOSEWALL ) == x ) - { - return 0; // guard in door - } - - if( Guards[ n ].tilex == x + 1 && - Guards[ n ].tiley == y && - POS2TILE( Guards[ n ].x - CLOSEWALL ) == x ) - { - return 0; // guard in door - } - } - } - else - { - if( POS2TILE( Player.position.origin[ 0 ] ) == x ) - { - if( POS2TILE( Player.position.origin[ 1 ] + CLOSEWALL ) == y ) - { - return 0; - } - - if( POS2TILE( Player.position.origin[ 1 ] - CLOSEWALL ) == y ) - { - return 0; - } - } - for( n = 0 ; n < NumGuards ; ++n ) - { - if( Guards[ n ].tilex == x && Guards[ n ].tiley == y ) - { - return 0; // guard in door - } - - if( Guards[ n ].tilex == x && - Guards[ n ].tiley == y - 1 && - POS2TILE( Guards[ n ].y + CLOSEWALL ) == y ) - { - return 0; // guard in door - } - - if( Guards[ n ].tilex == x && - Guards[ n ].tiley == y + 1 && - POS2TILE( Guards[ n ].y - CLOSEWALL ) == y ) - { - return 0; // guard in door - } - } - } - - return 1; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Door_OpenDoor( doors_t *Door ) -{ - if( Door->action == dr_open ) - { - Door->ticcount = 0; // reset opened time - } - else - { - Door->action = dr_opening; // start opening it - } -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void Door_ChangeDoorState( doors_t *Door ) -{ - if( Door->action < dr_opening ) - { - Door_OpenDoor( Door ); - } - else if( Door->action == dr_open && CanCloseDoor( Door->tilex, Door->tiley, Door->vertical ) ) - { - // !@# for the iphone with automatic using, don't allow any door close actions - // Door->action = dr_closing; - // Door->ticcount = DOOR_FULLOPEN; - } -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Door_ProcessDoors_e( LevelDoors_t *lvldoors, int t_tk, int t_ms ) -{ - int n; - - for( n = 0 ; n < lvldoors->doornum ; ++n ) - { - switch( lvldoors->Doors[ n ]->action ) - { - case dr_closed: // this door is closed! - continue; - - case dr_opening: - if( lvldoors->Doors[ n ]->ticcount >= DOOR_FULLOPEN ) // door fully opened! - { - lvldoors->Doors[ n ]->action = dr_open; - lvldoors->Doors[ n ]->ticcount = 0; - } - else // opening! - { - if( lvldoors->Doors[ n ]->ticcount == 0 ) - { // door is just starting to open, so connect the areas - Areas_JoinAreas( lvldoors->Doors[ n ]->area1, lvldoors->Doors[ n ]->area2 ); - Areas_ConnectAreas( Player.areanumber ); - if( areabyplayer[ lvldoors->Doors[ n ]->area1 ] ) // Door Opening sound! - { - Sound_StartSound( NULL, 1, CHAN_AUTO, Sound_RegisterSound( "sfx/010.wav" ), 1, ATTN_STATIC, 0 ); - } - } - - lvldoors->Doors[n]->ticcount += t_tk; - - if( lvldoors->Doors[ n ]->ticcount > DOOR_FULLOPEN ) - { - lvldoors->Doors[ n ]->ticcount = DOOR_FULLOPEN; - } - } - break; - - case dr_closing: - if( lvldoors->Doors[ n ]->ticcount <= 0 ) // door fully closed! disconnect areas! - { - Areas_DisconnectAreas( lvldoors->Doors[ n ]->area1, lvldoors->Doors[ n ]->area2 ); - Areas_ConnectAreas( Player.areanumber ); - lvldoors->Doors[ n ]->ticcount = 0; - lvldoors->Doors[ n ]->action = dr_closed; - } - else // closing! - { - if( lvldoors->Doors[ n ]->ticcount == DOOR_FULLOPEN ) - { - if( areabyplayer[ lvldoors->Doors[ n ]->area1 ] ) // Door Closing sound! - { - Sound_StartSound( NULL, 1, CHAN_AUTO, Sound_RegisterSound( "sfx/007.wav" ), 1, ATTN_STATIC, 0 ); - } - } - lvldoors->Doors[ n ]->ticcount -= t_tk; - if( lvldoors->Doors[ n ]->ticcount < 0 ) - { - lvldoors->Doors[ n ]->ticcount = 0; - } - } - break; - - case dr_open: - if( lvldoors->Doors[ n ]->ticcount > DOOR_MINOPEN ) - { // If player or something is in door do not close it! - if( ! CanCloseDoor( lvldoors->Doors[ n ]->tilex, lvldoors->Doors[ n ]->tiley, lvldoors->Doors[ n ]->vertical ) ) - { - lvldoors->Doors[ n ]->ticcount = DOOR_MINOPEN; // do not close door immediately! - } - } - if( lvldoors->Doors[ n ]->ticcount >= DOOR_TIMEOUT ) - { // Door timeout, time to close it! - lvldoors->Doors[ n ]->action = dr_closing; - lvldoors->Doors[ n ]->ticcount = DOOR_FULLOPEN; - } - else - { // Increase timeout! - lvldoors->Doors[ n ]->ticcount += t_tk; - } - break; - - } // End switch lvldoors->Doors[ n ].action - - } // End for n = 0 ; n < lvldoors->doornum ; ++n - -} - -/* ------------------------------------------------------------------------------ - Function: Door_Opened -Check to see if a door is open. - - Parameters: - - Returns: DOOR_FULLOPEN Door is opened - 0 Door is closed - >0 DoorMap[ x ][ y ].action == dr_open ? DOOR_FULLOPEN : lvldoors->DoorMap[ x ][ y ].ticcount; -} - -/* ------------------------------------------------------------------------------ - Function: Door_TryUse -Try to use a door with keys that the player has. - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC _boolean Door_TryUse( doors_t *Door, int keys ) -{ - switch( Door->type ) - { - case DOOR_VERT: - case DOOR_HORIZ: - case DOOR_E_VERT: - case DOOR_E_HORIZ: - Door_ChangeDoorState( Door ); // does not require key! - break; - - case DOOR_G_VERT: - case DOOR_G_HORIZ: - if( keys & ITEM_KEY_1 ) - { - Door_ChangeDoorState( Door ); - } - else - { - iphoneSetNotifyText( "You need a gold key" ); - } - break; - - case DOOR_S_VERT: - case DOOR_S_HORIZ: - if( keys & ITEM_KEY_2 ) - { - Door_ChangeDoorState( Door ); - } - else - { - iphoneSetNotifyText( "You need a silver key" ); - } - break; - } - - return true; // FIXME - -} diff --git a/wolf3d/newCode/wolf/wolf_level.c b/wolf3d/newCode/wolf/wolf_level.c deleted file mode 100644 index 15bbbca..0000000 --- a/wolf3d/newCode/wolf/wolf_level.c +++ /dev/null @@ -1,1389 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_level.c: Wolfenstein3-D Level management. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - * Acknowledgement: - * Portion of this code was derived from Wolfenstein 3-D, and was originally - * written by Id Software, Inc. - * - */ - -#include "../wolfiphone.h" - - -statinfo_t static_wl6[]= -{ - {false, -1}, // puddle spr1v - { true, -1}, // Green Barrel " - { true, -1}, // Table/chairs " - { true, -1}, // Floor lamp " - {false, -1}, // Chandelier " - { true, -1}, // Hanged man " - {false, pow_alpo}, // Bad food " - { true, -1}, // Red pillar " - { true, -1}, // Tree spr2v - {false, -1}, // Skeleton flat " - { true, -1}, // Sink " (SOD:gibs) - { true, -1}, // Potted plant " - { true, -1}, // Urn " - { true, -1}, // Bare table " - {false, -1}, // Ceiling light " - {false, -1}, // Kitchen stuff " - { true, -1}, // suit of armor spr3v - { true, -1}, // Hanging cage " - { true, -1}, // SkeletoninCage " - {false, -1}, // Skeleton relax " - {false, pow_key1}, // Key 1 " - {false, pow_key2}, // Key 2 " - { true, -1}, // stuff (SOD:gibs) - {false, -1}, // stuff - {false, pow_food}, // Good food spr4v - {false, pow_firstaid}, // First aid " - {false, pow_clip}, // Clip " - {false, pow_machinegun},// Machine gun " - {false, pow_chaingun}, // Gatling gun " - {false, pow_cross}, // Cross " - {false, pow_chalice}, // Chalice " - {false, pow_bible}, // Bible " - {false, pow_crown}, // crown spr5v - {false, pow_fullheal}, // one up " - {false, pow_gibs}, // gibs " - { true, -1}, // barrel " - { true, -1}, // well " - { true, -1}, // Empty well " - {false, pow_gibs}, // Gibs 2 " - { true, -1}, // flag " - { true, -1}, // Call Apogee spr7v - {false, -1}, // junk " - {false, -1}, // junk " - {false, -1}, // junk " - {false, -1}, // pots " - { true, -1}, // stove " (SOD:gibs) - { true, -1}, // spears " (SOD:gibs) - {false, -1}, // vines " -}; - - -statinfo_t static_sod[] = -{ - {false, -1}, // puddle spr1v - { true, -1}, // Green Barrel " - { true, -1}, // Table/chairs " - { true, -1}, // Floor lamp " - {false, -1}, // Chandelier " - { true, -1}, // Hanged man " - {false, pow_alpo}, // Bad food " - { true, -1}, // Red pillar " - { true, -1}, // Tree spr2v - {false, -1}, // Skeleton flat " - { true, -1}, // Sink " (SOD:gibs) - { true, -1}, // Potted plant " - { true, -1}, // Urn " - { true, -1}, // Bare table " - {false, -1}, // Ceiling light " - { true, -1}, // Gibs! - { true, -1}, // suit of armor spr3v - { true, -1}, // Hanging cage " - { true, -1}, // SkeletoninCage " - {false, -1}, // Skeleton relax " - {false, pow_key1}, // Key 1 " - {false, pow_key2}, // Key 2 " - { true, -1}, // stuff (SOD:gibs) - {false, -1}, // stuff - {false, pow_food}, // Good food spr4v - {false, pow_firstaid}, // First aid " - {false, pow_clip}, // Clip " - {false, pow_machinegun},// Machine gun " - {false, pow_chaingun}, // Gatling gun " - {false, pow_cross}, // Cross " - {false, pow_chalice}, // Chalice " - {false, pow_bible}, // Bible " - {false, pow_crown}, // crown spr5v - {false, pow_fullheal}, // one up " - {false, pow_gibs}, // gibs " - { true, -1}, // barrel " - { true, -1}, // well " - { true, -1}, // Empty well " - {false, pow_gibs}, // Gibs 2 " - { true, -1}, // flag " - {false, -1}, // Red light - {false, -1}, // junk " - {false, -1}, // junk " - {false, -1}, // junk " - { true, -1}, // Gibs! - { true, -1}, // stove " (SOD:gibs) - { true, -1}, // spears " (SOD:gibs) - {false, -1}, // vines " - { true, -1}, // marble pillar - {false, pow_25clip}, // bonus 25 clip - { true, -1}, // truck - {false, pow_spear}, // SPEAR OF DESTINY! -}; - -statinfo_t *statinfo = static_wl6; -int num_statics = sizeof( static_wl6 ) / sizeof( static_wl6[ 0 ] ); - -texture_t *wallTextures[1000]; -texture_t *spriteTextures[1000]; - -PRIVATE W16 cachedGuard = 0; -PRIVATE W16 cachedOfficer = 0; -PRIVATE W16 cachedSS = 0; -PRIVATE W16 cachedDog = 0; -PRIVATE W16 cachedMutant = 0; - -PRIVATE int progress_bar = 0; - -extern void R_EndFrame( void ); - -LevelData_t levelData; - - -PRIVATE void CacheTextures( W16 start, W16 end ) -{ - W16 i; - static char texname[ 64 ]; - - - if( end < start ) - { - return; - } - - for( i = start ; i <= end ; ++i ) - { - my_snprintf( texname, sizeof( texname ), "%s/%.3d.tga", spritelocation, i ); - spriteTextures[i] = TM_FindTexture( texname, TT_Wall ); - } - -// R_DrawPsyched( ++progress_bar + 30 ); -// R_EndFrame(); -} - -/* ------------------------------------------------------------------------------ - Function: Level_ScanInfoPlane -Spawn all actors and mark down special places. - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Level_ScanInfoPlane( LevelData_t *lvl ) -{ - int x, y; - W16 tile; - - cachedGuard = 0; - cachedOfficer = 0; - cachedSS = 0; - cachedDog = 0; - cachedMutant = 0; - progress_bar = 0; - - for( y = 0 ; y < 64; ++y ) - { - for( x = 0 ; x < 64 ; ++x ) - { - tile = lvl->Plane2[ (63 - y) * 64 + x ]; - if( ! tile ) - { - continue; - } - - switch( tile ) - { -// -// guard -// - case 180: - case 181: - case 182: - case 183: - if( skill->value < gd_hard ) - break; - tile -= 36; - case 144: - case 145: - case 146: - case 147: - if( skill->value < gd_medium ) - break; - tile -= 36; - case 108: - case 109: - case 110: - case 111: - if( ! cachedGuard ) - { - CacheTextures( SPR_GRD_S_1, SPR_GRD_SHOOT3 ); - cachedGuard = 1; - } - SpawnStand( en_guard, x, y, tile - 108, lvl ); - break; - - case 184: - case 185: - case 186: - case 187: - if( skill->value < gd_hard ) - break; - tile -= 36; - case 148: - case 149: - case 150: - case 151: - if( skill->value < gd_medium ) - break; - tile -= 36; - case 112: - case 113: - case 114: - case 115: - if( ! cachedGuard ) - { - CacheTextures( SPR_GRD_S_1, SPR_GRD_SHOOT3 ); - cachedGuard = 1; - } - SpawnPatrol( en_guard, x, y,tile - 112 ); - break; - - case 124: - SpawnDeadGuard( en_guard, x, y ); - break; -// -// officer -// - case 188: - case 189: - case 190: - case 191: - if( skill->value < gd_hard ) - break; - tile -= 36; - case 152: - case 153: - case 154: - case 155: - if( skill->value < gd_medium ) - break; - tile -= 36; - case 116: - case 117: - case 118: - case 119: - if( ! cachedOfficer ) - { - CacheTextures( SPR_OFC_S_1, SPR_OFC_SHOOT3 ); - cachedOfficer = 1; - } - SpawnStand( en_officer, x, y, tile - 116, lvl ); - break; - - - case 192: - case 193: - case 194: - case 195: - if( skill->value < gd_hard ) - break; - tile -= 36; - case 156: - case 157: - case 158: - case 159: - if( skill->value < gd_medium ) - break; - tile -= 36; - case 120: - case 121: - case 122: - case 123: - if( ! cachedOfficer ) - { - CacheTextures( SPR_OFC_S_1, SPR_OFC_SHOOT3 ); - cachedOfficer = 1; - } - SpawnPatrol( en_officer, x, y, tile - 120 ); - break; -// -// SS -// - case 198: - case 199: - case 200: - case 201: - if( skill->value < gd_hard ) - break; - tile -= 36; - case 162: - case 163: - case 164: - case 165: - if( skill->value < gd_medium ) - break; - tile -= 36; - case 126: - case 127: - case 128: - case 129: - if( ! cachedSS ) - { - CacheTextures( SPR_SS_S_1, SPR_SS_SHOOT3 ); - cachedSS = 1; - } - SpawnStand( en_ss, x, y, tile - 126, lvl ); - break; - - case 202: - case 203: - case 204: - case 205: - if( skill->value < gd_hard ) - break; - tile -= 36; - case 166: - case 167: - case 168: - case 169: - if( skill->value < gd_medium ) - break; - tile -= 36; - case 130: - case 131: - case 132: - case 133: - if( ! cachedSS ) - { - CacheTextures( SPR_SS_S_1, SPR_SS_SHOOT3 ); - cachedSS = 1; - } - SpawnPatrol( en_ss, x, y, tile - 130 ); - break; -// -// dogs -// - case 206: - case 207: - case 208: - case 209: - if( skill->value < gd_hard ) - break; - tile -= 36; - case 170: - case 171: - case 172: - case 173: - if( skill->value < gd_medium ) - break; - tile -= 36; - case 134: - case 135: - case 136: - case 137: - if( ! cachedDog ) - { - CacheTextures( SPR_DOG_W1_1, SPR_DOG_JUMP3 ); - cachedDog = 1; - } - SpawnStand( en_dog, x, y, tile - 134, lvl ); - break; - - case 210: - case 211: - case 212: - case 213: - if( skill->value < gd_hard ) - break; - tile -= 36; - case 174: - case 175: - case 176: - case 177: - if( skill->value < gd_medium ) - break; - tile -= 36; - case 138: - case 139: - case 140: - case 141: - if( ! cachedDog ) - { - CacheTextures( SPR_DOG_W1_1, SPR_DOG_JUMP3 ); - cachedDog = 1; - } - SpawnPatrol( en_dog, x, y, tile - 138 ); - break; -// bosses - case 214: - CacheTextures( SPR_BOSS_W1, SPR_BOSS_DIE3 ); - SpawnBoss( en_boss, x, y ); - break; - - case 197: - CacheTextures( SPR_GRETEL_W1, SPR_GRETEL_DIE3 ); - SpawnBoss( en_gretel, x, y ); - break; - - case 215: - CacheTextures( SPR_GIFT_W1, SPR_GIFT_DEAD ); - SpawnBoss( en_gift, x, y ); - break; - - case 179: - CacheTextures( SPR_FAT_W1, SPR_FAT_DEAD ); - SpawnBoss( en_fat, x, y ); - break; - - case 196: - CacheTextures( SPR_SCHABB_W1, SPR_HYPO4 ); - SpawnBoss( en_schabbs, x, y ); - break; - - case 160: - CacheTextures( SPR_FAKE_W1, SPR_FAKE_DEAD ); - SpawnBoss( en_fake, x, y ); - break; - - case 178: - CacheTextures( SPR_MECHA_W1, SPR_HITLER_DIE7 ); - SpawnBoss( en_mecha, x, y ); - break; -// -// Spear -// - case 106: - CacheTextures( SPR_SPECTRE_W1, SPR_SPECTRE_F4 ); - SpawnBoss( en_spectre, x, y ); - break; - - case 107: - CacheTextures( SPR_ANGEL_W1, SPR_ANGEL_DEAD ); - SpawnBoss( en_angel, x, y ); - break; - - case 125: - CacheTextures( SPR_TRANS_W1, SPR_TRANS_DIE3 ); - SpawnBoss( en_trans, x, y ); - break; - - case 142: - CacheTextures( SPR_UBER_W1, SPR_UBER_DEAD ); - SpawnBoss( en_uber, x, y ); - break; - - case 143: - CacheTextures( SPR_WILL_W1, SPR_WILL_DEAD ); - SpawnBoss( en_will, x, y ); - break; - - case 161: - CacheTextures( SPR_DEATH_W1, SPR_DEATH_DEAD ); - SpawnBoss( en_death, x, y ); - break; -// -// mutants -// - case 252: - case 253: - case 254: - case 255: - if( skill->value < gd_hard ) - break; - tile -= 18; - case 234: - case 235: - case 236: - case 237: - if( skill->value < gd_medium ) - break; - tile -= 18; - case 216: - case 217: - case 218: - case 219: - if( ! cachedMutant ) - { - CacheTextures( SPR_MUT_S_1, SPR_MUT_SHOOT4 ); - cachedMutant = 1; - } - SpawnStand( en_mutant, x, y, tile - 216, lvl ); - break; - - case 256: - case 257: - case 258: - case 259: - if (skill->valuevalue < gd_medium ) - break; - tile -= 18; - case 220: - case 221: - case 222: - case 223: - if( ! cachedMutant ) - { - CacheTextures( SPR_MUT_S_1, SPR_MUT_SHOOT4 ); - cachedMutant = 1; - } - SpawnPatrol( en_mutant, x, y, tile - 220 ); - break; - -// -// ghosts -// - case 224: - CacheTextures( SPR_BLINKY_W1, SPR_BLINKY_W2 ); - SpawnGhosts( en_blinky, x, y ); - break; - - case 225: - CacheTextures( SPR_PINKY_W1, SPR_PINKY_W2 ); - SpawnGhosts( en_clyde, x, y ); - break; - - case 226: - CacheTextures( SPR_CLYDE_W1, SPR_CLYDE_W2 ); - SpawnGhosts( en_pinky, x, y ); - break; - - case 227: - CacheTextures( SPR_INKY_W1, SPR_INKY_W2 ); - SpawnGhosts( en_inky, x, y ); - break; - } - } - } -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void Lvl_SpawnStatic( LevelData_t *lvl, int type, int x, int y ) -{ - int spr_id; - - if( statinfo[ type ].powerup == -1 ) - { - if( statinfo[ type ].block ) // blocking static - { - lvl->tilemap[ x ][ y ] |= BLOCK_TILE; - } - else // dressing static - { - lvl->tilemap[ x ][ y ] |= DRESS_TILE; - } - - spr_id = Sprite_GetNewSprite(); - if( spr_id == -1 ) - { - return; - } - - Sprite_SetPos( spr_id, TILE2POS( x ), TILE2POS( y ), 0 ); - Sprite_SetTex( spr_id, 0, SPR_STAT_0 + type ); - } - else - { - Powerup_Spawn( x, y, statinfo[ type ].powerup, lvl ); - if( statinfo[ type ].powerup == pow_cross || - statinfo[ type ].powerup == pow_chalice || - statinfo[ type ].powerup == pow_bible || - statinfo[ type ].powerup == pow_crown || - statinfo[ type ].powerup == pow_fullheal ) - { - levelstate.total_treasure++; // FIXME: move this to Powerup_Spawn Function! - } - } -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void Lvl_SpawnObj( LevelData_t *lvl, int type, int x, int y ) -{ - if( type >= 23 && type < 23 + num_statics ) - {// static object - Lvl_SpawnStatic( lvl, type - 23, x, y); - return; - } - - switch( type ) - { - case 0x13: // start N - lvl->pSpawn.origin[ 0 ] = TILE2POS( x ); - lvl->pSpawn.origin[ 1 ] = TILE2POS( y ); - lvl->pSpawn.angle = ANG_90; - break; - - case 0x14: // start E - lvl->pSpawn.origin[ 0 ] = TILE2POS( x ); - lvl->pSpawn.origin[ 1 ] = TILE2POS( y ); - lvl->pSpawn.angle = ANG_0; - break; - - case 0x15: // start S - lvl->pSpawn.origin[ 0 ] = TILE2POS( x ); - lvl->pSpawn.origin[ 1 ] = TILE2POS( y ); - lvl->pSpawn.angle = ANG_270; - break; - - case 0x16: // start W - lvl->pSpawn.origin[ 0 ] = TILE2POS( x ); - lvl->pSpawn.origin[ 1 ] = TILE2POS( y ); - lvl->pSpawn.angle = ANG_180; - break; - - case 0x5a: // turn E - lvl->tilemap[ x ][ y ] |= TILE_IS_E_TURN;//FIXME! - break; - - case 0x5b: // turn NE - lvl->tilemap[ x ][ y ] |= TILE_IS_NE_TURN;//FIXME! - break; - - case 0x5c: // turn N - lvl->tilemap[ x ][ y ] |= TILE_IS_N_TURN;//FIXME! - break; - - case 0x5d: // turn NW - lvl->tilemap[ x ][ y ] |= TILE_IS_NW_TURN;//FIXME! - break; - - case 0x5e: // turn W - lvl->tilemap[ x ][ y ] |= TILE_IS_W_TURN;//FIXME! - break; - - case 0x5f: // turn SW - lvl->tilemap[ x ][ y ] |= TILE_IS_SW_TURN;//FIXME! - break; - - case 0x60: // turn S - lvl->tilemap[ x ][ y ] |= TILE_IS_S_TURN;//FIXME! - break; - - case 0x61: // turn SE - lvl->tilemap[ x ][ y ] |= TILE_IS_SE_TURN;//FIXME! - break; - - case 0x62: // pushwall modifier - lvl->tilemap[ x ][ y ] |= SECRET_TILE; - levelstate.total_secrets++; - break; - - case 0x63: // Victory trigger - lvl->tilemap[ x ][ y ] |= EXIT_TILE; - break; - // spawn guards - - } // end of switch( type ) - -} - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - length -[in] The length of the EXPANDED data. - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void Lvl_CarmackExpand( W16 *source, W16 *dest, W16 length ) -{ - #define NEARTAG 0xA7 - #define FARTAG 0xA8 - - - W32 chhigh, offset; - W16 *copyptr, *outptr; - W8 *inptr; - W16 ch, count; - - length /= 2; - - inptr = (W8 *)source; - outptr = dest; - - while( length ) - { - ch = *(W16 *)inptr; - inptr += 2; - chhigh = ch >> 8; - if( chhigh == NEARTAG ) - { - count = ch & 0xff; - if( ! count ) - { // have to insert a word containing the tag byte - ch |= *inptr++; - *outptr++ = (W16)ch; - length--; - } - else - { - offset = *inptr++; - copyptr = outptr - offset; - length -= count; - while( count-- ) - { - *outptr++ = *copyptr++; - } - } - } - else if( chhigh == FARTAG ) - { - count = ch & 0xff; - if( ! count ) - { // have to insert a word containing the tag byte - ch |= *inptr++; - *outptr++ = ch; - length--; - } - else - { - offset = *(W16 *)inptr; - inptr += 2; - copyptr = dest + offset; - length -= count; - while( count-- ) - { - *outptr++ = *copyptr++; - } - } - } - else - { - *outptr++ = ch; - length--; - } - } -} - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - length -[in] Is EXPANDED length - - Returns: - - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void Lvl_RLEWexpand( W16 *source, W16 *dest, - long length, unsigned rlewtag ) -{ - unsigned value,count,i; - W16 *end; - - - -// -// expand it -// - end = dest + (length >> 1); - - do - { - value = *source++; - if( value != rlewtag ) - { - // - // uncompressed - // - *dest++ = value; - } - else - { - // - // compressed string - // - count = *source++; - value = *source++; - - for( i = 1 ; i <= count ; ++i ) - { - *dest++ = value; - } - } - - } while( dest < end ); - -} - - -#define MAPHEADER_SIZE 49 -#define MAP_SIGNATURE 0x21444921 - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC LevelData_t *Level_LoadMap( const char *levelname ) -{ - W16 rle; - W32 offset[ 3 ]; - W16 length[ 3 ]; - W16 w, h; - W32 signature; - W16 *buffer, expanded; - W8 *data; - W32 ceiling, floor; - LevelData_t *newMap; - filehandle_t *fhandle; - W16 mapNameLength; - char *mapName; - W16 musicNameLength; - char *musicName; - SW32 filesize; - - int x, y0, y, layer1, layer2, layer3; - - - - if( g_version->value == SPEAROFDESTINY ) - { - statinfo = static_sod; - num_statics = sizeof( static_sod ) / sizeof( static_sod[ 0 ] ); - } - else - { - statinfo = static_wl6; - num_statics = sizeof( static_wl6 ) / sizeof( static_wl6[ 0 ] ); - } - - - - newMap = &levelData; - memset( newMap, 0, sizeof( LevelData_t ) ); - - - fhandle = FS_OpenFile( levelname, 0 ); - if( ! fhandle ) - { - Com_Printf( "Could not load map (%s)\n", levelname ); - - return NULL; - } - - filesize = FS_GetFileSize( fhandle ); - if( filesize < MAPHEADER_SIZE ) - { - return NULL; - } - - -// -// Process map header -// - FS_ReadFile( &signature, 1, 4, fhandle ); - if( signature != MAP_SIGNATURE ) - { - return NULL; - } - - - - FS_ReadFile( &rle, 2, 1, fhandle ); - - FS_ReadFile( &w, 2, 1, fhandle ); - FS_ReadFile( &h, 2, 1, fhandle ); - - FS_ReadFile( &ceiling, 4, 1, fhandle ); - FS_ReadFile( &floor, 4, 1, fhandle ); - - - FS_ReadFile( &length, 2, 3, fhandle ); - FS_ReadFile( &offset, 4, 3, fhandle ); - - - FS_ReadFile( &mapNameLength, 1, 2, fhandle ); - FS_ReadFile( &musicNameLength, 1, 2, fhandle ); - - FS_ReadFile( &levelstate.fpartime, sizeof( float ), 1, fhandle ); - - FS_ReadFile( levelstate.spartime, sizeof( W8 ), 5, fhandle ); - levelstate.spartime[ 5 ] = '\0'; - - - if( filesize < (MAPHEADER_SIZE + mapNameLength + musicNameLength + - length[ 0 ] + length[ 1 ] + length[ 2 ]) ) - { - return NULL; - } - - mapName = Z_Malloc( mapNameLength + 1 ); - musicName = Z_Malloc( musicNameLength + 1 ); - - - FS_ReadFile( mapName, 1, mapNameLength, fhandle ); - mapName[ mapNameLength ] = '\0'; - - - FS_ReadFile( musicName, 1, musicNameLength, fhandle ); - musicName[ musicNameLength ] = '\0'; - - - if( filesize < (MAPHEADER_SIZE + mapNameLength + musicNameLength) ) - { - return NULL; - } - -// -// Plane1 -Walls -// - data = MM_MALLOC( length[ 0 ] ); - - FS_FileSeek( fhandle, offset[ 0 ], SEEK_SET ); - FS_ReadFile( data, 1, length[ 0 ], fhandle ); - - - expanded = *((unsigned short *)data); - buffer = MM_MALLOC( expanded ); - - Lvl_CarmackExpand( (unsigned short *)data+1, buffer, expanded ); - Lvl_RLEWexpand( buffer+1, newMap->Plane1, 64*64*2, rle ); - - MM_FREE( buffer ); - MM_FREE( data ); - -// -// Plane2 -Objects -// - data = MM_MALLOC( length[ 1 ] ); - - FS_FileSeek( fhandle, offset[ 1 ], SEEK_SET ); - FS_ReadFile( data, 1, length[ 1 ], fhandle ); - - - expanded = *((PW16)data); - buffer = MM_MALLOC( expanded ); - - Lvl_CarmackExpand( (PW16)data+1, buffer, expanded ); - Lvl_RLEWexpand( buffer+1, newMap->Plane2, 64*64*2, rle ); - - MM_FREE( buffer ); - MM_FREE( data ); - -// -// Plane3 -Other -// - data = MM_MALLOC( length[ 2 ] ); - - FS_FileSeek( fhandle, offset[ 2 ], SEEK_SET ); - FS_ReadFile( data, 1, length[ 2 ], fhandle ); - - - expanded = *((PW16)data); - buffer = MM_MALLOC( expanded ); - - Lvl_CarmackExpand( (PW16)data+1, buffer, expanded ); - Lvl_RLEWexpand( buffer+1, newMap->Plane3, 64*64*2, rle ); - - MM_FREE( buffer ); - MM_FREE( data ); - - - FS_CloseFile( fhandle ); - - - for( y0 = 0 ; y0 < 64 ; ++y0 ) - for( x = 0 ; x < 64 ; ++x ) - { - y = 63 - y0; - layer1 = newMap->Plane1[ y0 * 64 + x ]; - layer2 = newMap->Plane2[ y0 * 64 + x ]; - layer3 = newMap->Plane3[ y0 * 64 + x ]; - -// if server, process obj layer! - if( layer2 ) - { - Lvl_SpawnObj( newMap, layer2, x, y ); - } - -// Map data layer - if( layer1 == 0 ) - { - newMap->areas[ x ][ y ] = -3; // unknown area - } - else if( layer1 < 0x6a ) // solid map object - { - if( (layer1 >= 0x5A && layer1 <= 0x5F) || - layer1 == 0x64 || layer1 == 0x65 ) // door - { - newMap->tilemap[ x ][ y ] |= DOOR_TILE; - Door_SpawnDoor( &newMap->Doors, x, y, layer1 ); - newMap->areas[ x ][ y ] = -2; // door area - } - else - { - newMap->tilemap[ x ][ y ] |= WALL_TILE; - - newMap->wall_tex_x[ x ][ y ] = (layer1-1) * 2 + 1; - newMap->wall_tex_y[ x ][ y ] = (layer1-1) * 2; - newMap->areas[ x ][ y ] = -1; // wall area - - if( layer1 == 0x15 ) // elevator - { - newMap->tilemap[ x ][ y ] |= ELEVATOR_TILE; - } - } - } - else if( layer1 == 0x6a ) // Ambush floor tile - { - newMap->tilemap[ x ][ y ] |= AMBUSH_TILE; - newMap->areas[ x ][ y ] = -3; // unknown area - } - else if( layer1 >= FIRSTAREA && - layer1 < (FIRSTAREA + NUMAREAS) ) // area - { - if( layer1 == FIRSTAREA ) // secret level - { - newMap->tilemap[ x ][ y ] |= SECRETLEVEL_TILE; - } - - newMap->areas[ x ][ y ] = layer1 - FIRSTAREA;// spawn area - } - else - { - newMap->areas[ x ][ y ] = -3; // unknown area - } -// End of the map data layer - } - - // JDC: try to replace all the unknown areas with an adjacent area, to - // avoid the silent attack / no damage problem when you get an ambush - // guard stuck on their original tile - for ( x = 1 ; x < 63 ; x++ ) { - for ( y = 1 ; y < 63 ; y++ ) { - if ( newMap->areas[x][y] != -3 ) { - continue; - } - if ( newMap->areas[x-1][y] >= 0 ) { - newMap->areas[x][y] = newMap->areas[x-1][y]; - } else if ( newMap->areas[x+1][y] >= 0 ) { - newMap->areas[x][y] = newMap->areas[x+1][y]; - } else if ( newMap->areas[x][y-1] >= 0 ) { - newMap->areas[x][y] = newMap->areas[x][y-1]; - } else if ( newMap->areas[x+1][y+1] >= 0 ) { - newMap->areas[x][y] = newMap->areas[x][y+1]; - } - } - } - - Door_SetAreas( &newMap->Doors, newMap->areas ); - - my_strlcpy( levelstate.level_name, mapName, sizeof( levelstate.level_name ) ); - - strcpy( newMap->mapName, mapName ); - strcpy( newMap->musicName, musicName ); - - newMap->ceilingColour[ 0 ] = (W8)((ceiling >> 16) & 0xFF); - newMap->ceilingColour[ 1 ] = (W8)((ceiling >> 8) & 0xFF); - newMap->ceilingColour[ 2 ] = (W8)((ceiling ) & 0xFF); - newMap->floorColour[ 0 ] = (W8)((floor >> 16) & 0xFF); - newMap->floorColour[ 1 ] = (W8)((floor >> 8) & 0xFF); - newMap->floorColour[ 2 ] = (W8)((floor ) & 0xFF); - - return newMap; -} - - - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Level_PrecacheTextures_Sound( LevelData_t *lvl ) -{ - int x, y; - char texname[ 32 ]; - - - - for( x = 0 ; x < 64 ; ++x ) - for( y = 0 ; y < 64 ; ++y ) - { - if( lvl->tilemap[ x ][ y ] & WALL_TILE ) - { - my_snprintf( texname, sizeof( texname ), "walls/%.3d.tga", lvl->wall_tex_x[ x ][ y ] ); - wallTextures[lvl->wall_tex_x[ x ][ y ] ] = TM_FindTexture( texname, TT_Wall ); - - my_snprintf( texname, sizeof( texname ), "walls/%.3d.tga", lvl->wall_tex_y[ x ][ y ] ); - wallTextures[lvl->wall_tex_y[ x ][ y ]] = TM_FindTexture( texname, TT_Wall ); - } - - if( lvl->tilemap[ x ][ y ] & POWERUP_TILE ) - { - int tex = lvl->tilemap[ x ][ y ] & POWERUP_TILE; - my_snprintf( texname, sizeof( texname ), "%s/%.3d.tga", spritelocation, tex ); - spriteTextures[tex] = TM_FindTexture( texname, TT_Wall ); - } - } - - // Doors - for( x = TEX_DOOR; x < TEX_DLOCK+1 ; ++x ) - { - my_snprintf( texname, sizeof( texname ), "walls/%.3d.tga", x ); - wallTextures[x] = TM_FindTexture( texname, TT_Wall ); - } - - - // Items - CacheTextures( 26, 36 ); - - // Weapon frames - CacheTextures( SPR_KNIFEREADY, SPR_CHAINATK4 ); -#if 0 - for( x = 1; x < 8 ; ++x ) - { - my_snprintf( texname, sizeof( texname ), "pics/FACE%dAPIC.tga", x ); - (void)TM_FindTexture( texname, TT_Pic ); - - my_snprintf( texname, sizeof( texname ), "pics/FACE%dBPIC.tga", x ); - (void)TM_FindTexture( texname, TT_Pic ); - - my_snprintf( texname, sizeof( texname ), "pics/FACE%dCPIC.tga", x ); - (void)TM_FindTexture( texname, TT_Pic ); - } - - my_snprintf( texname, sizeof( texname ), "pics/FACE8APIC.tga" ); - (void)TM_FindTexture( texname, TT_Pic ); -#endif -} - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: true if a straight line between 2 points is unobstructed, - otherwise false. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC _boolean Level_CheckLine( SW32 x1, SW32 y1, SW32 x2, SW32 y2, LevelData_t *lvl ) -{ - SW32 xt1, yt1, xt2, yt2; /* tile positions */ - SW32 x, y; /* current point in !tiles! */ - SW32 xdist, ydist; - SW32 xstep, ystep; /* Step value for each whole xy */ - - SW32 deltafrac; /* current point in !1/256 of tile! */ - - SW32 Frac; /* Fractional xy stepper */ - - SW32 partial; /* how much to move in our direction to border */ - SW32 intercept; /* Temp for door code */ - - - - #define FRACBITS 8 /* Number of bits of fraction */ - - -// get start & end tiles - xt1 = x1 >> TILESHIFT; - yt1 = y1 >> TILESHIFT; - - xt2 = x2 >> TILESHIFT; - yt2 = y2 >> TILESHIFT; - - xdist = ABS( xt2 - xt1 ); // X distance in tiles - ydist = ABS( yt2 - yt1 ); // Y distance in tiles - -// 1/256 tile precision (TILESHIFT is 16) - x1 >>= FRACBITS; y1 >>= FRACBITS; - x2 >>= FRACBITS; y2 >>= FRACBITS; - - - if( xdist ) // always positive check only for 0 - { - if( xt2 > xt1 ) - { - partial = 256 - (x1 & 0xff); - xstep = 1; - } - else - { - partial = x1 & 0xff; - xstep = -1; - } - - deltafrac = ABS( x2 - x1 ); - ystep = ((y2 - y1) << FRACBITS) / deltafrac; - Frac = y1 + ((ystep * partial) >> FRACBITS); - - x = xt1 + xstep; - xt2 += xstep; - do - { - y = Frac >> FRACBITS; - Frac += ystep; - - - assert( x >= 0 && x < 64 && y >= 0 && y < 64 ); - if( lvl->tilemap[ x ][ y ] & WALL_TILE ) - { - return false; // Wall is in path quitting! - } - - if( lvl->tilemap[ x ][ y ] & DOOR_TILE ) - {// door, see if the door is open enough - if( lvl->Doors.DoorMap[ x ][ y ].action != dr_open ) - { - if( lvl->Doors.DoorMap[ x ][ y ].action == dr_closed ) - { - return false; - } - // checking vertical doors in action: ->_I_ - intercept = ((Frac - ystep / 2) & 0xFF) >> 4; // 1/64 of tile - if( intercept < (63 - lvl->Doors.DoorMap[ x ][ y ].ticcount) ) - { - return false; - } - } - } - x += xstep; - - } while( x != xt2 ); - } - - if( ydist ) // always positive check only for 0 - { - if( yt2 > yt1 ) - { - partial = 256 - (y1 & 0xff); - ystep = 1; - } - else - { - partial = y1 & 0xff; - ystep = -1; - } - - deltafrac = ABS( y2 - y1 ); - xstep = ((x2 - x1) << FRACBITS) / deltafrac; - Frac = x1 + ((xstep * partial) >> FRACBITS); - - y = yt1 + ystep; - yt2 += ystep; - do - { - x = Frac >> FRACBITS; - Frac += xstep; - - assert( x >= 0 && x < 64 && y >= 0 && y < 64 ); - if( lvl->tilemap[ x ][ y ] & WALL_TILE ) - { - return false; // Wall is in path quitting! - } - - if( lvl->tilemap[ x ][ y ] & DOOR_TILE ) - {// door, see if the door is open enough - if( lvl->Doors.DoorMap[ x ][ y ].action != dr_open ) - { - if( lvl->Doors.DoorMap[ x ][ y ].action == dr_closed ) - { - return false; - } - // checking vertical doors in action: ->_I_ - intercept = ((Frac - xstep / 2) & 0xFF) >> 4; // 1/64 of tile - if( intercept < lvl->Doors.DoorMap[ x ][ y ].ticcount ) - { - return false; - } - } - } - y += ystep; - - } while( y != yt2 ); - } - - return true; -} diff --git a/wolf3d/newCode/wolf/wolf_level.h b/wolf3d/newCode/wolf/wolf_level.h deleted file mode 100644 index 52d8386..0000000 --- a/wolf3d/newCode/wolf/wolf_level.h +++ /dev/null @@ -1,285 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_level.h: Wolfenstein3-D level management. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - * Acknowledgement: - * Portion of this code was derived from Wolfenstein3-D, and was originally - * written by Id Software, Inc. - * - */ - -/* - Notes: - This module is implemented by wolf_areas.c, wolf_doors.c, wolf_level.c and - wolf_pushwalls.c - - -*/ - -#ifndef __WOLF_LEVEL_H__ -#define __WOLF_LEVEL_H__ - - -/////////////////// -// -// Areas -// -/////////////////// - -#define NUMAREAS 37 // number of areas -#define FIRSTAREA 0x6B // first area in map data (it is by the way a way to the secret floor!) -#define AMBUSHTILE 0x6A // def guard -#define AMBUSH -2 - -/////////////////// -// -// Doors -// -/////////////////// -#define MAX_DOORS 256 -#define DOOR_TIMEOUT 300 -#define DOOR_MINOPEN 50 - -#define DOOR_FULLOPEN 63 - - -#define DOOR_VERT 255 -#define DOOR_HORIZ 254 -#define DOOR_E_VERT 253 -#define DOOR_E_HORIZ 252 - -#define DOOR_G_VERT 251 -#define DOOR_G_HORIZ 250 -#define DOOR_S_VERT 249 -#define DOOR_S_HORIZ 248 - -#define FIRST_DOOR 248 -#define LAST_LOCK 251 - - - - -#define TEX_DOOR 126 - -// texture IDs used by cache routines -#define TEX_DDOOR (0 + TEX_DOOR) // Simple Door -#define TEX_PLATE (2 + TEX_DOOR) // Door Plate -#define TEX_DELEV (4 + TEX_DOOR) // Elevator Door -#define TEX_DLOCK (6 + TEX_DOOR) // Locked Door - - - -/////////////////// -// -// Level -// -/////////////////// -#define WALL_TILE 1 -#define PUSHWALL_TILE (1 << 20) -#define DOOR_TILE 2 -#define SECRET_TILE 4 -#define DRESS_TILE 8 -#define BLOCK_TILE 16 -#define ACTOR_TILE 32 -#define DEADACTOR_TILE 64 -#define POWERUP_TILE 128 -#define AMBUSH_TILE 256 -#define EXIT_TILE 512 -#define SECRETLEVEL_TILE 1024 -#define ELEVATOR_TILE (1 << 11) -#define TILE_IS_E_TURN (1 << 12) -#define TILE_IS_NE_TURN (1 << 13) -#define TILE_IS_N_TURN (1 << 14) -#define TILE_IS_NW_TURN (1 << 15) -#define TILE_IS_W_TURN (1 << 16) -#define TILE_IS_SW_TURN (1 << 17) -#define TILE_IS_S_TURN (1 << 18) -#define TILE_IS_SE_TURN (1 << 19) - -#define SOLID_TILE (WALL_TILE | BLOCK_TILE | PUSHWALL_TILE) -#define BLOCKS_MOVE_TILE (WALL_TILE | BLOCK_TILE | PUSHWALL_TILE | ACTOR_TILE) -#define WAYPOINT_TILE (TILE_IS_E_TURN | TILE_IS_NE_TURN | TILE_IS_N_TURN | TILE_IS_NW_TURN | TILE_IS_W_TURN | TILE_IS_SW_TURN | TILE_IS_S_TURN | TILE_IS_SE_TURN ) - -/////////////////// -// -// Doors -// -/////////////////// -typedef enum -{ - dr_closing = -1, - dr_closed, - dr_opening, - dr_open - -} dr_state; - -typedef struct -{ - int tilex, tiley; - _boolean vertical; - int ticcount; - - dr_state action; - - int area1, area2; -/*DOOR_VERT 255 - DOOR_HORIZ 254 - DOOR_E_VERT 253 - DOOR_E_HORIZ 252 - DOOR_G_VERT 251 - DOOR_G_HORIZ 250 - DOOR_S_VERT 249 - DOOR_S_HORIZ 248*/ - int type; - - int texture; - -} doors_t; - -typedef struct -{ - int doornum; - doors_t *Doors[ 256 ]; - doors_t DoorMap[ 64 ][ 64 ]; - -} LevelDoors_t; - -/////////////////// -// -// Level -// -/////////////////// -typedef struct -{ - char fname[ 32 ]; /* Map filename */ - - W16 Plane1[ 64 * 64 ]; /* walls */ - W16 Plane2[ 64 * 64 ]; /* objects */ - W16 Plane3[ 64 * 64 ]; /* other */ - - - long tilemap[ 64 ][ 64 ]; // wall values only - W8 spotvis[ 64 ][ 64 ]; -// objtype *actorat[ 64 ][ 64 ]; - - // this is an array of references to texture descriptions -// the renderer must know what to draw by this number - int wall_tex_x[ 64 ][ 64 ]; // x_wall - int wall_tex_y[ 64 ][ 64 ]; // y_wall - -// this is a (0-based) array of area numbers! -// must be all filled by level loading sub -// if -1 it is a wall, if -2 it is a door, if -3 it is unknown - int areas[ 64 ][ 64 ]; - - LevelDoors_t Doors; - - placeonplane_t pSpawn; // player spawn place - - - char mapName[128]; /* Map name */ - char musicName[128]; /* Music file name */ - - colour3_t ceilingColour, floorColour; - - W8 tileEverVisible[ 64 ][ 64 ]; // for automap -} LevelData_t; - - -typedef struct statinfo_t -{ - _boolean block; - int powerup; - -} statinfo_t; - - -extern LevelData_t *r_world; - - -extern LevelData_t *Level_LoadMap( const char *levelname ); -extern void Level_PrecacheTextures_Sound( LevelData_t *lvl ); -extern _boolean Level_CheckLine( SW32 x1, SW32 y1, SW32 x2, SW32 y2, LevelData_t *lvl ); -extern void Level_ScanInfoPlane( LevelData_t *lvl ); - -/////////////////// -// -// Doors -// -/////////////////// -extern void Door_ResetDoors( LevelDoors_t *lvl ); -extern int Door_SpawnDoor( LevelDoors_t *lvl, int x, int y, int type ); -extern void Door_SetAreas( LevelDoors_t *lvl, int (*areas)[64] ); -extern void Door_OpenDoor( doors_t *Door ); -extern void Door_ProcessDoors_e( LevelDoors_t *lvl, int t_tk, int t_ms ); -extern int Door_Opened( LevelDoors_t *lvl, int x, int y ); -extern _boolean Door_TryUse( doors_t *Door, int keys ); - -/////////////////// -// -// Areas -// -/////////////////// -extern _boolean areabyplayer[ NUMAREAS ]; - -extern void Areas_ConnectAreas( int areanumber ); -extern void Areas_InitAreas( int areanumber ); -extern void Areas_JoinAreas( int area1, int area2 ); -extern void Areas_DisconnectAreas( int area1, int area2 ); - - -/////////////////// -// -// Push Walls -// -/////////////////// -typedef struct -{ - _boolean active; - int PWtilesmoved; - int PWpointsmoved; - dir4type dir; - int x, y; - int dx, dy; - int tex_x, tex_y; - -} Pwall_t; - - -extern Pwall_t PWall; - - -extern void PushWall_Reset( void ); -extern _boolean PushWall_Push( int x, int y, dir4type dir ); -extern void PushWall_Process( void ); - - -#endif /* __WOLF_LEVEL_H__ */ diff --git a/wolf3d/newCode/wolf/wolf_local.h b/wolf3d/newCode/wolf/wolf_local.h deleted file mode 100644 index 0c84640..0000000 --- a/wolf3d/newCode/wolf/wolf_local.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_local.h: Wolfenstein3-D init. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from Wolfenstein3-D, and was originally - * written by Id Software, Inc. - * - */ - -/* - Notes: - This module is implemented by wolf_main.c - -*/ - -#ifndef __WOLF_LOCAL_H__ -#define __WOLF_LOCAL_H__ - - -// Game Version -#define WOLFENSTEINWL6 0x00 -#define SPEAROFDESTINY 0x01 - - - -#define TILEGLOBAL 0x10000 -#define HALFTILE 0x8000 -#define TILESHIFT 16 - -#define MINDIST (0x5800) - - - - - -typedef enum difficulty_e -{ - gd_baby, - gd_easy, - gd_medium, - gd_hard - -} difficulty_t; - -// -// this structure is cleared as each map is entered -// -typedef struct -{ - int framenum; - float time; - - char level_name[ MAX_OSPATH ]; // the descriptive name (Outer Base, etc) - char mapname[ MAX_OSPATH ]; // the server name (base1, etc) - char nextmap[ MAX_OSPATH ]; // go here when fraglimit is hit - - // intermission state - W32 levelCompleted; // in case the game was saved at the intermission - - W32 floornum; - float fpartime; - char spartime[6]; - - W32 total_secrets; - W32 found_secrets; - - W32 total_treasure; - W32 found_treasure; - - W32 total_monsters; - W32 killed_monsters; - - -} level_locals_t; - - - -extern level_locals_t levelstate; - - - -typedef struct -{ - W32 total_secrets; - W32 found_secrets; - - W32 total_treasure; - W32 found_treasure; - - W32 total_monsters; - W32 killed_monsters; - W32 time; - -} LRstruct; - - -extern LRstruct LevelRatios; - - - -extern cvar_t *g_version; -extern cvar_t *episode; -extern cvar_t *skill; - -extern int tics; - - -W32 floornumber; - - -extern void Game_Init( void ); -extern void Game_Reset( void ); - - - -extern void ProcessGuards( void ); - - -#define WL6SPRITESDIRNAME "sprites" -#define SODSPRITESDIRNAME "sodsprites" - - -extern char *spritelocation; - - - -#endif /* __WOLF_LOCAL_H__ */ diff --git a/wolf3d/newCode/wolf/wolf_main.c b/wolf3d/newCode/wolf/wolf_main.c deleted file mode 100644 index eea88ca..0000000 --- a/wolf3d/newCode/wolf/wolf_main.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -#include "../wolfiphone.h" - -level_locals_t levelstate; - -LRstruct LevelRatios; - -cvar_t *g_version; // Wolfenstein or Spear of Destiny -cvar_t *episode; -cvar_t *skill; - - -char *spritelocation = WL6SPRITESDIRNAME; - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Game_Reset( void ) -{ - memset( &levelstate, 0, sizeof( levelstate ) ); -} - -extern void Map_f( void ); - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Game_Init( void ) -{ - Com_Printf( "\n------ Game Init ------\n" ); - - episode = Cvar_Get( "episode", "0", CVAR_ARCHIVE ); - skill = Cvar_Get( "skill", "1", CVAR_ARCHIVE ); - g_version = Cvar_Get( "g_version", "0", CVAR_ARCHIVE ); - -#ifndef EPISODE1 - Cmd_AddCommand( "map", Map_f ); -#endif - - G_Build_Tables(); - Powerup_Reset(); - Sprite_Reset(); - Game_Reset(); - PL_Init(); - - Com_Printf( "\n-----------------------\n" ); - -} diff --git a/wolf3d/newCode/wolf/wolf_math.c b/wolf3d/newCode/wolf/wolf_math.c deleted file mode 100644 index ef14f07..0000000 --- a/wolf3d/newCode/wolf/wolf_math.c +++ /dev/null @@ -1,341 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_math.c: Wolfenstein 3-D math routines. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - * - */ - -#include "../wolfiphone.h" - -#define XRES 640 -#define YRES 480 - -// ------------------------- * LUTs * ------------------------- -double SinTable[ ANG_360 + ANG_90 + 1 ], - *CosTable = SinTable + ANG_90, - TanTable[ ANG_360 + 1 ]; - -int XnextTable[ ANG_360 + 1 ], - YnextTable[ ANG_360 + 1 ]; - -int ColumnAngle[ 640 ]; // ViewAngle=PlayerAngle+ColumnAngle[curcolumn]; /in fines/ - -char dx4dir[5]={1, 0, -1, 0, 0}; // dx & dy based on direction -char dy4dir[5]={0, 1, 0, -1, 0}; -char dx8dir[9]={1, 1, 0, -1, -1, -1, 0, 1, 0}; // dx & dy based on direction -char dy8dir[9]={0, 1, 1, 1, 0, -1, -1, -1, 0}; -dir4type opposite4[5]={2, 3, 0, 1, 4}; -dir8type opposite8[9]={4, 5, 6, 7, 0, 1, 2, 3, 8}; -dir8type dir4to8[5]={0, 2, 4, 6, 8}; -dir8type diagonal[9][9]= -{ -/* east */ {dir8_nodir, dir8_nodir, dir8_northeast, dir8_nodir, dir8_nodir, dir8_nodir, dir8_southeast, dir8_nodir, dir8_nodir}, - {dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir}, -/* north */ {dir8_northeast, dir8_nodir, dir8_nodir, dir8_nodir, dir8_northwest, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir}, - {dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir}, -/* west */ {dir8_nodir, dir8_nodir, dir8_northwest, dir8_nodir, dir8_nodir, dir8_nodir, dir8_southwest, dir8_nodir, dir8_nodir}, - {dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir}, -/* south */ {dir8_southeast, dir8_nodir, dir8_nodir, dir8_nodir, dir8_southwest, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir}, - {dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir}, - {dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir, dir8_nodir} -}; -// dir of delta tooks dx{-1|0|1}+1 & dy{-1|0|1}+1 and give direction -dir4type dir4d[3][3]={{dir4_nodir, dir4_west , dir4_nodir}, - {dir4_south, dir4_nodir, dir4_north}, - {dir4_nodir, dir4_east , dir4_nodir}}; -int dir8angle[9]={ANG_0, ANG_45, ANG_90, ANG_135, ANG_180, ANG_225, ANG_270, ANG_315, ANG_0}; -int dir4angle[5]={ANG_0, ANG_90, ANG_180, ANG_270, ANG_0}; - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC int G_Build_Tables( void ) -{ - double angle, tanfov2, tanval, value; - int n; - - for( n = 0 ; n <= ANG_90 ; ++n ) - { - angle = FINE2RAD( n ); - - value = sin( angle ); - SinTable[ n ] = SinTable[ ANG_180 - n ] = SinTable[ n + ANG_360 ] = value; - SinTable[ ANG_180 + n ] = SinTable[ ANG_360 - n ] = -value; - } - - for( n = 0 ; n <= ANG_360 ; ++n ) - { - angle = FINE2RAD( n ); //angle is in radians, n is in FINEs - - if( n == ANG_90 || n == ANG_270 ) - { - TanTable[ n ] = tan( FINE2RAD( n - 0.5 ) ); // infinity - YnextTable[ n ] = (int)(FLOATTILE * tan( FINE2RAD( n - 0.5 ) )); // infinity - } - else - { - TanTable[ n ] = tan( angle ); - YnextTable[ n ] = (int)(FLOATTILE * tan( angle )); - } - - if( n == ANG_0 || n == ANG_360 ) - XnextTable[ n ] = (int)(FLOATTILE / tan( FINE2RAD( n + 0.5 ) )); // infinity - else if( n == ANG_180 ) - XnextTable[ n ] = (int)(FLOATTILE / tan(FINE2RAD( n - 0.5 ) )); // -infinity - else if( n == ANG_90 || n == ANG_270 ) - XnextTable[ n ] = 0; - else - XnextTable[ n ] = (int)(FLOATTILE / tan( angle )); - } - - tanfov2 = TanDgr( CalcFov( 75, XRES, YRES) / 2.0 ) * ((float)XRES / (float)YRES ); - for( n = 0 ; n < XRES ; ++n ) - { - tanval = tanfov2 * (-1.0 + 2.0 * (double)n / (double)(XRES-1) ); - ColumnAngle[ n ] = (int)RAD2FINE( atan( tanval ) ); - } - - US_InitRndT( 1 ); // random number generators - - - return 1; -} - - - -/* ------------------------------------------------------------------------------ - Function: NormalizeAngle -clips angle to [0..360] bounds. - - Parameters: - - Returns: - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC int NormalizeAngle( int alpha ) -{ - if( alpha > ANG_360 ) - alpha %= ANG_360; - - if(alpha x - point1 = {x, y} ------------------------------------------------------------------------------ -*/ -PUBLIC float TransformPoint( double Point1X, double Point1Y, double Point2X, double Point2Y ) -{ - float angle; - - angle = atan2( Point1Y - Point2Y, Point1X - Point2X ); - - return normalize_angle( angle ); -} - diff --git a/wolf3d/newCode/wolf/wolf_math.h b/wolf3d/newCode/wolf/wolf_math.h deleted file mode 100644 index 39f6925..0000000 --- a/wolf3d/newCode/wolf/wolf_math.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_math.h: Wolfenstein 3-D math routines. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * This code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - * - */ - -/* - Notes: - This module is implemented by wolf_math.c - -*/ -#ifndef __WOLF_MATH_H__ -#define __WOLF_MATH_H__ - - -#define FLOATTILE 65536.0f - - -// Angle Direction Types & LUTs (Hard Coded! Please do not mess them) -typedef enum {q_first, q_second, q_third, q_fourth} quadrant; -typedef enum {dir4_east, dir4_north, dir4_west, dir4_south, dir4_nodir} dir4type; -typedef enum { dir8_east, dir8_northeast, dir8_north, dir8_northwest, dir8_west, - dir8_southwest, dir8_south, dir8_southeast, dir8_nodir} dir8type; - -extern char dx4dir[5], dy4dir[5], dx8dir[9], dy8dir[9]; -extern dir4type opposite4[5], dir4d[3][3]; -extern dir8type opposite8[9], dir4to8[5], diagonal[9][9]; -extern int dir8angle[9], dir4angle[5]; -// ------------------------- * Vectors * ------------------------- -// Vectors & angles for 3D-Space - - - -typedef struct -{ - long origin[2]; - long angle; - -} placeonplane_t; - - -// ------------------------- * Some Macroses * ------------------------- - - -#define max_of_2(a, b) ((a)>(b)?(a):(b)) - - - -#define LABS(x) ((long)(x)>0?(x):-(x)) - - -#define TILE2POS(a) (((a)<>TILESHIFT) -#define POS2TILEf(a) ((a)/FLOATTILE) -// ------------------------- * vvv FINE angles vvv * ------------------------- -#define ASTEP 0.0078125f // 1 FINE=x DEGREES -#define ASTEPRAD 0.000136354f // 1 FINE=x RADIANS -#define ANG_1RAD 7333.8598 // 1 RADIAN=x FINES -#define ANG_0 0 //(int)((float)0/ASTEP) -#define ANG_1 128 //(int)((float)1/ASTEP) -#define ANG_6 768 //(int)((float)6/ASTEP) -#define ANG_15 1920 //(int)((float)15/ASTEP) -#define ANG_22_5 2880 //(int)((float)22.5/ASTEP) -#define ANG_30 3840 //(int)((float)30/ASTEP) -#define ANG_45 5760 //(int)((float)45/ASTEP) -#define ANG_67_5 8640 //(int)((float)67.5/ASTEP) -#define ANG_90 11520 //(int)((float)90/ASTEP) -#define ANG_112_5 14400 //(int)((float)112.5/ASTEP) -#define ANG_135 17280 //(int)((float)135/ASTEP) -#define ANG_157_5 20160 //(int)((float)157.5/ASTEP) -#define ANG_180 23040 //(int)((float)180/ASTEP) -#define ANG_202_5 25920 //(int)((float)202.5/ASTEP) -#define ANG_225 28800 //(int)((float)225/ASTEP) -#define ANG_247_5 31680 //(int)((float)247.5/ASTEP) -#define ANG_270 34560 //(int)((float)270/ASTEP) -#define ANG_292_5 37440 //(int)((float)292.5/ASTEP) -#define ANG_315 40320 //(int)((float)225/ASTEP) -#define ANG_337_5 43200 //(int)((float)337.5/ASTEP) -#define ANG_360 46080 //(int)((float)360/ASTEP) -// ------------------------- * ^^^ FINE angles ^^^ * ------------------------- - - - -#define FINE2RAD( a ) (((a) * M_PI ) / ANG_180) -#define RAD2FINE( a ) (((a) * ANG_180) / M_PI) -#define FINE2DEG( a ) ((float)(a) / ANG_1) // !@# don't lose precision bits -#define FINE2DEGf( a ) ((a) / (float)ANG_1) -#define DEG2FINE( a ) ((a) * ANG_1) - -extern double SinTable[], *CosTable, TanTable[ ANG_360 + 1 ]; -extern int XnextTable[ ANG_360 + 1], YnextTable[ ANG_360 + 1 ]; -extern int ColumnAngle[640]; // - -extern int G_Build_Tables(void); - -#define TanDgr( x ) (tan( DEG2RAD( x ) )) -#define SinDgr( x ) (sin( DEG2RAD( x ) )) -#define CosDgr( x ) (cos( DEG2RAD( x ) )) - -#define ArcTanDgr( x ) (RAD2DEG( atan( x ) )) -#define ArcSinDgr( x ) (RAD2DEG( asin( x ) )) -#define ArcCosDgr( x ) (RAD2DEG( acos( x ) )) - - - -extern int NormalizeAngle( int angle ); -extern int Point2LineDist( int x, int y, int a ); -extern int LineLen2Point( int x, int y, int a ); - -extern quadrant GetQuadrant( float angle ); -extern dir4type Get4dir( float angle ); -extern dir8type Get8dir( float angle ); - -extern float TransformPoint( double Point1X, double Point1Y, double Point2X, double Point2Y ); - - - - - -#endif /* __WOLF_MATH_H__ */ diff --git a/wolf3d/newCode/wolf/wolf_opengl.c b/wolf3d/newCode/wolf/wolf_opengl.c deleted file mode 100644 index 04dc67f..0000000 --- a/wolf3d/newCode/wolf/wolf_opengl.c +++ /dev/null @@ -1,629 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_opengl.c: Wolfenstein3-D OpenGL renderer. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - * Portion of this code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#include "../wolfiphone.h" - -// width and height in 2D -#define WIDTH_2D 640 -#define HEIGHT_2D 480 - - -float cur_x_fov, cur_y_fov; // x & y field of view (in degrees) -float ratio; // viewport width/height - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void GL_SetDefaultState( void ) -{ - - pfglClearColor( 1,0, 0.5 , 0.5 ); - pfglCullFace( GL_FRONT ); - pfglEnable( GL_TEXTURE_2D ); - - pfglEnable( GL_ALPHA_TEST ); - pfglAlphaFunc( GL_GREATER, 0.666f ); - - pfglDisable( GL_DEPTH_TEST ); - pfglDisable( GL_CULL_FACE ); - pfglDisable( GL_BLEND ); - - pfglColor4f( 1, 1, 1, 1 ); -#ifndef IPHONE - pfglPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); -#endif - pfglShadeModel( GL_FLAT ); - - - pfglBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); - - - - GL_UpdateSwapInterval(); - -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void R_CheckFOV( void ) -{ -/* - if(!vid_fov->modified) return; - vid_fov->modified=false; - - if( vid_fov->value<1 || vid_fov->value>179) - { - Com_Printf("Wrong FOV: %f\n", vid_fov->value); - Cvar_SetValue(vid_fov->name, (cur_x_fov>=1 && cur_x_fov<=179)?cur_x_fov:DEFAULT_FOV); - } -*/ - ratio = (float) viddef.width / (float)viddef.height; // FIXME: move somewhere - cur_x_fov = 75; - cur_y_fov = CalcFov( cur_x_fov, (float)viddef.width, (float)viddef.height ); - -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_SetGL3D( placeonplane_t viewport ) -{ - R_CheckFOV(); - - pfglMatrixMode( GL_PROJECTION ); - pfglLoadIdentity(); -#ifdef IPHONE - pfglRotatef( 90, 0, 0, 1 ); -#endif - MYgluPerspective( cur_y_fov - 2.0f, ratio, 0.2f, 64.0f ); // tweak fov in to avoid edge tile clips - pfglMatrixMode( GL_MODELVIEW ); - pfglLoadIdentity(); - - pfglRotatef( (float)(90 - FINE2DEG( viewport.angle )), 0, 1, 0 ); - pfglTranslatef( -viewport.origin[ 0 ] / FLOATTILE, 0, viewport.origin[ 1 ] / FLOATTILE ); - - pfglCullFace( GL_BACK ); - - pfglEnable( GL_DEPTH_TEST ); - pfglEnable( GL_CULL_FACE ); - pfglEnable( GL_BLEND ); - pfglDisable( GL_BLEND ); // !@# draw all the walls opaque without alpha test - pfglDisable( GL_ALPHA_TEST ); - qglDepthMask( GL_TRUE ); - - // clear depth buffer - pfglClear( GL_DEPTH_BUFFER_BIT ); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_DrawBox( int x, int y, int w, int h, W32 color ) -{ - pfglDisable( GL_TEXTURE_2D ); - -// pfglEnable( GL_BLEND ); -// pfglBlendFunc( GL_SRC_COLOR, GL_DST_COLOR ); - - pfglColor4ubv( (GLubyte *) & color ); - - pfglBegin( GL_QUADS ); - - pfglVertex2i( x, y ); - pfglVertex2i( x, y + h); - pfglVertex2i( x + w, y + h ); - pfglVertex2i( x + w, y ); - - pfglEnd(); - - pfglColor3f( 1, 1, 1 ); -// pfglBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); -// pfglDisable( GL_BLEND ); - pfglEnable( GL_TEXTURE_2D ); -} - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - - north (y) - __________ - | | - west (x) | | east (x) - |________| - south (y) - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_Draw_Wall( float x, float y, float z1, float z2, int type, int tex ) -{ - float x1, x2, y1, y2; - texture_t *twall; - - switch( type ) - { - // X wall - case dir4_east: - x1 = x2 = x + 1; - y1 = -1 - y; - y2 = -y; - break; - - case dir4_west: - x1 = x2 = x; - y1 = -y; - y2 = -1 - y; - break; - - // Y wall - case dir4_north: - y1 = y2 = -y - 1; - x1 = x; - x2 = x + 1; - break; - - case dir4_south: - y1 = y2 = -y; - x1 = x + 1; - x2 = x; - break; - } - - assert( tex >= 0 && tex < 1000 ); - twall = wallTextures[tex]; - if ( !twall ) { - char name[1024]; - my_snprintf( name, sizeof( name ), "walls/%.3d.tga", tex ); - twall = wallTextures[tex] = TM_FindTexture( name, TT_Wall ); - } - R_Bind( twall->texnum ); - - - pfglBegin( GL_QUADS ); - - pfglTexCoord2f( 1.0, 0.0 ); pfglVertex3f( x1, z2, y1 ); - pfglTexCoord2f( 0.0, 0.0 ); pfglVertex3f( x2, z2, y2 ); - pfglTexCoord2f( 0.0, 1.0 ); pfglVertex3f( x2, z1, y2 ); - pfglTexCoord2f( 1.0, 1.0 ); pfglVertex3f( x1, z1, y1 ); - - pfglEnd(); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_Draw_Door( int x, int y, float z1, float z2, _boolean vertical, _boolean backside, int tex, int amount ) -{ - float x1, x2, y1, y2, amt; - texture_t *twall; - - if( amount == DOOR_FULLOPEN ) - { - return; - } - - amt = (float)amount / DOOR_FULLOPEN; - - - if( vertical ) - { - x1 = x2 = (float)x + 0.5f; - y1 = -((float)y - amt); - y2 = -((float)y - amt); // -1 - if( backside ) - { - y1 -= 1; - } - else - { - y2 -= 1; - } - } - else - { - y1 = y2 = -(float)y - 0.5f; - x1 = (float)x + amt; // +1 - x2 = (float)x + amt; - if( backside ) - { - x2 += 1; - } - else - { - x1 += 1; - } - } - - assert( tex >= 0 && tex < 1000 ); - twall = wallTextures[tex]; - if ( !twall ) { - char name[1024]; - my_snprintf( name, sizeof( name ), "walls/%.3d.tga", tex ); - twall = wallTextures[tex] = TM_FindTexture( name, TT_Wall ); - } - - R_Bind( twall->texnum ); - - - pfglBegin( GL_QUADS ); - - pfglTexCoord2f( backside ? 0.0f : 1.0f, 0.0 ); pfglVertex3f( x1, z2, y1 ); - pfglTexCoord2f( backside ? 1.0f : 0.0f, 0.0 ); pfglVertex3f( x2, z2, y2 ); - pfglTexCoord2f( backside ? 1.0f : 0.0f, 1.0 ); pfglVertex3f( x2, z1, y2 ); - pfglTexCoord2f( backside ? 0.0f : 1.0f, 1.0 ); pfglVertex3f( x1, z1, y1 ); - - pfglEnd(); -} - - -/* ------------------------------------------------------------------------------ - Function: R_DrawSprites -Draws all visible sprites. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_DrawSprites( void ) -{ - float sina, cosa; - float Ex, Ey, Dx, Dy; - int n_sprt, n, ang; - texture_t *twall; - extern cvar_t *cropSprites; - -// build visible sprites list - n_sprt = Sprite_CreateVisList(); - if( ! n_sprt ) - { - return; // nothing to draw - } - -// prepare values for billboarding - ang = NormalizeAngle( Player.position.angle + ANG_90 ); - sina = (float)(0.5 * SinTable[ ang ]); - cosa = (float)(0.5 * CosTable[ ang ]); - - //pfglEnable( GL_ALPHA_TEST ); - pfglEnable( GL_BLEND ); - qglDepthMask( GL_FALSE ); - for( n = 0; n < n_sprt; ++n ) - { - int texnum = vislist[ n ].tex; - if( vislist[ n ].dist < MINDIST / 2 ) - { - continue; // little hack to save speed & z-buffer - } - - - - assert( texnum >= 0 && texnum < 1000 ); - twall = spriteTextures[texnum]; - if ( !twall ) { - char name[1024]; - my_snprintf( name, sizeof( name ), "%s/%.3d.tga", spritelocation, (vislist[ n ].tex) ); - twall = spriteTextures[texnum] = TM_FindTexture( name, TT_Wall ); - } - R_Bind( twall->texnum ); - - pfglBegin( GL_QUADS ); - - if ( cropSprites->value && twall->header.numBounds > 0 ) { - // draw one or two subrects to avoid blending all the empty space - int b; - - for ( b = 0 ; b < twall->header.numBounds ; b++ ) { - // include a bit extra for filtering - float x1 = (float)(twall->header.bounds[b][0][0]-1) / (twall->header.uploadWidth-1); - float y1 = (float)(twall->header.bounds[b][0][1]-1) / (twall->header.uploadHeight-1); - float x2 = (float)(twall->header.bounds[b][1][0]+1) / (twall->header.uploadWidth-1); - float y2 = (float)(twall->header.bounds[b][1][1]+1) / (twall->header.uploadHeight-1); - if ( x1 < 0 ) { - x1 = 0; - } else if ( x2 > 1.0 ) { - x2 = 1.0; - } - if ( y1 < 0 ) { - y1 = 0; - } else if ( y2 > 1.0 ) { - y2 = 1.0; - } - Ex = vislist[ n ].x / FLOATTILE + cosa; - Ey = vislist[ n ].y / FLOATTILE + sina; - - pfglTexCoord2f( x1, y1 ); pfglVertex3f( Ex - x1 * 2*cosa, -(LOWERZCOORD + (UPPERZCOORD - LOWERZCOORD) * y1), -Ey + x1 * 2*sina ); - pfglTexCoord2f( x1, y2 ); pfglVertex3f( Ex - x1 * 2*cosa, -(LOWERZCOORD + (UPPERZCOORD - LOWERZCOORD) * y2), -Ey + x1 * 2*sina ); - pfglTexCoord2f( x2, y2 ); pfglVertex3f( Ex - x2 * 2*cosa, -(LOWERZCOORD + (UPPERZCOORD - LOWERZCOORD) * y2), -Ey + x2 * 2*sina ); - pfglTexCoord2f( x2, y1 ); pfglVertex3f( Ex - x2 * 2*cosa, -(LOWERZCOORD + (UPPERZCOORD - LOWERZCOORD) * y1), -Ey + x2 * 2*sina ); - } - } else { - Ex = Dx = vislist[ n ].x / FLOATTILE; - Ey = Dy = vislist[ n ].y / FLOATTILE; - Ex += cosa; Ey += sina; - Dx -= cosa; Dy -= sina; - - pfglTexCoord2f( 0.0, 0.0 ); pfglVertex3f( Ex, UPPERZCOORD, -Ey ); - pfglTexCoord2f( 0.0, 1.0 ); pfglVertex3f( Ex, LOWERZCOORD, -Ey ); - pfglTexCoord2f( 1.0, 1.0 ); pfglVertex3f( Dx, LOWERZCOORD, -Dy ); - pfglTexCoord2f( 1.0, 0.0 ); pfglVertex3f( Dx, UPPERZCOORD, -Dy ); - } - - pfglEnd(); - } - - //pfglDisable( GL_ALPHA_TEST ); // !@# reanable just for sprites -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_DrawWeapon( void ) -{ - char name[ 32 ]; - texture_t *tex; - static int w = 128; - static int h = 128; - static int scale = 2; - int x = (viddef.width - (128 * scale)) >> 1; - int y = viddef.height - (128 * scale) - 79; - - my_snprintf( name, sizeof( name ), "%s/%d.tga", spritelocation, Player.weapon * 5 + Player.weaponframe + SPR_KNIFEREADY ); - - tex = TM_FindTexture( name, TT_Pic ); - - - R_Bind( tex->texnum ); - - - - pfglAlphaFunc( GL_GREATER, 0.3f ); - - pfglEnable( GL_BLEND ); - - pfglBegin( GL_QUADS ); - - pfglTexCoord2f( 0.0f, 0.0f ); pfglVertex2i( x, y ); - pfglTexCoord2f( 1.0f, 0.0f ); pfglVertex2i( x + w * scale, y ); - pfglTexCoord2f( 1.0f, 1.0f ); pfglVertex2i( x + w * scale, y + h * scale ); - pfglTexCoord2f( 0.0f, 1.0f ); pfglVertex2i( x, y + h * scale ); - - pfglEnd(); - - pfglDisable( GL_BLEND ); - - pfglAlphaFunc( GL_GREATER, 0.666f ); - - -} - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_DrawNumber( int x, int y, int number ) -{ - texture_t *tex; - int col; - float fcol; - static float w = 0.1f; - int i; - char string[ 20 ]; - W32 length; - - - my_snprintf( string, sizeof( string ), "%d", number ); - length = strlen( string ); - - tex = TM_FindTexture( "pics/N_NUMPIC.tga", TT_Pic ); - - - pfglEnable( GL_TEXTURE_2D ); - - R_Bind( tex->texnum ); - - pfglBegin( GL_QUADS ); - - for( i = length-1 ; i >= 0 ; --i ) - { - col = string[ i ] - 48; - - fcol = col * w; - - pfglTexCoord2f( fcol, 0 ); pfglVertex2i( x, y ); - pfglTexCoord2f( fcol+w, 0 ); pfglVertex2i( x+18, y ); - pfglTexCoord2f( fcol+w, 1 ); pfglVertex2i( x+18, y+32 ); - pfglTexCoord2f( fcol, 1 ); pfglVertex2i( x, y+32 ); - - x -= 18; - } - - pfglEnd(); - -} - - -W8 wfont[ ] = { - 32, 15, 32, 32, 32, 32, 32, 12, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 16, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32 }; - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_put_line( int x, int y, const char *string ) -{ - texture_t *tex; - int mx = x; - int num; - float frow, fcol; - static float h = 0.25f; // (32 / 128.0f); - static float w = 0.0625f; // (32 / 512.0f); - - - tex = TM_FindTexture( "pics/L_FONTPIC.tga", TT_Pic ); - - - R_Bind( tex->texnum ); - - pfglBegin( GL_QUADS ); - - while( *string ) - { - if( *string == '\n' ) - { - mx = x; - y += 32; - ++string; - continue; - } - - num = *string; - - num &= 255; - - if( (num & 127) == 32 ) - { - mx += 32; - ++string; - continue; // space - } - - - frow = ((num >> 4) - 2) * h; - fcol = (num & 15) * w; - - - pfglTexCoord2f( fcol, frow ); pfglVertex2i( mx, y ); - pfglTexCoord2f( fcol+w, frow ); pfglVertex2i( mx+32, y ); - pfglTexCoord2f( fcol+w, frow+h ); pfglVertex2i( mx+32, y+32 ); - pfglTexCoord2f( fcol, frow+h ); pfglVertex2i( mx, y+32 ); - - - - mx += wfont[ (num & 127) - 32 ]; - ++string; - } - - pfglEnd(); -} - diff --git a/wolf3d/newCode/wolf/wolf_player.c b/wolf3d/newCode/wolf/wolf_player.c deleted file mode 100644 index 0ce012c..0000000 --- a/wolf3d/newCode/wolf/wolf_player.c +++ /dev/null @@ -1,1023 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_player.c: Wolfenstein3-D player management. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - */ - -#include "../wolfiphone.h" - -player_t Player; // player struct (pos, health etc...) - - -#define PLAYERSIZE MINDIST // player radius - - - -struct atkinf -{ - char tics, attack, frame; // attack is 1 for gun, 2 for knife - -} attackinfo[ 4 ][ 14 ] = // 4 guns, 14 frames max for every gun! -{ - { {6,0,1},{6,2,2},{6,0,3},{6,-1,4} }, - { {6,0,1},{6,1,2},{6,0,3},{6,-1,4} }, - { {6,0,1},{6,1,2},{6,3,3},{6,-1,4} }, - { {6,0,1},{6,1,2},{6,4,3},{6,-1,4} }, -}; - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: true if player can change weapons, otherwise false. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE _boolean PL_ChangeWeapon( player_t *self, int weapon ) -{ - unsigned itemflag; - - itemflag = ITEM_WEAPON_1 << weapon; - - if( self->ammo[ AMMO_BULLETS ] == 0 && weapon != WEAPON_KNIFE ) - { - Com_Printf("Not enough ammo.\n"); - return false; - } - - if( ! (self->items & itemflag) ) - { - Com_Printf( "No weapon.\n" ); - return false; - } - - self->weapon = - self->pendingweapon = weapon; - - self->attackframe = - self->attackcount = - self->weaponframe = 0; - - return true; -} - - -/* ------------------------------------------------------------------------------ - Function: Called if player pressed USE button - - Parameters: - - Returns: returns true if player used something - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE _boolean PL_Use( player_t *self, LevelData_t *lvl ) -{ - int x, y, dir; - - dir = Get4dir( FINE2RAD( self->position.angle ) ); - x = self->tilex + dx4dir[ dir ]; - y = self->tiley + dy4dir[ dir ]; - - if( lvl->tilemap[ x ][ y ] & DOOR_TILE ) - { - return Door_TryUse( &lvl->Doors.DoorMap[ x ][ y ], Player.items ); - } - - if( lvl->tilemap[ x ][ y ] & SECRET_TILE ) - { - return PushWall_Push( x, y, dir ); - } - - if( lvl->tilemap[ x ][ y ] & ELEVATOR_TILE ) - { - int newtex; - - switch( dir ) - { - case dir4_east: - case dir4_west: - newtex = lvl->wall_tex_x[ x ][ y ] += 2; - break; - - case dir4_north: - case dir4_south: - return false; // don't allow to press elevator rails - } - - if( lvl->tilemap[ self->tilex ][ self->tiley ] & SECRETLEVEL_TILE ) - { - self->playstate = ex_secretlevel; - } - else - { - self->playstate = ex_complete; - } - Sound_StartSound( NULL, 0, CHAN_BODY, Sound_RegisterSound( "lsfx/040.wav" ), 1, ATTN_NORM, 0 ); - - iphoneStartIntermission( 0 ); - - return true; - } - - //Sound_StartSound( NULL, 0, CHAN_BODY, Sound_RegisterSound( "lsfx/020.wav" ), 1, ATTN_NORM, 0 ); - return false; -} - - - -#define STOPSPEED 0x0D00 -#define FRICTION 0.25f -#define MAXMOVE (MINDIST*2-1) - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: returns true if move ok - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE _boolean PL_TryMove( player_t *self, LevelData_t *lvl ) -{ - int xl, yl, xh, yh, x, y; - int d, n; - - xl = POS2TILE( Player.position.origin[ 0 ] - PLAYERSIZE ); - yl = POS2TILE( Player.position.origin[ 1 ] - PLAYERSIZE ); - xh = POS2TILE( Player.position.origin[ 0 ] + PLAYERSIZE ); - yh = POS2TILE( Player.position.origin[ 1 ] + PLAYERSIZE ); - - // Cheching for solid walls: - for( y = yl ; y <= yh ; ++y ) - for( x = xl ; x <= xh ; ++x ) - { - if( lvl->tilemap[ x ][ y ] & SOLID_TILE ) - return 0; - - if( lvl->tilemap[ x ][ y ] & DOOR_TILE && - Door_Opened( &lvl->Doors, x, y) != DOOR_FULLOPEN ) { - // iphone hack to allow player to move halfway into door tiles - // if the player bounds doesn't cross the middle of the tile, let the move continue - if ( abs( Player.position.origin[0] - TILE2POS( x ) ) <= 0x9000 - && abs( Player.position.origin[1] - TILE2POS( y ) ) <= 0x9000 ) { - return 0; - } - } - } - -// check for actors - for( n = 0 ; n < NumGuards ; ++n ) - { - if( Guards[ n ].state >= st_die1 ) - continue; - - d = self->position.origin[ 0 ] - Guards[ n ].x; - - if( d < -MINACTORDIST || d > MINACTORDIST ) - continue; - - d = self->position.origin[ 1 ] - Guards[ n ].y; - - if( d < -MINACTORDIST || d > MINACTORDIST) - continue; - - return false; - } - - return true; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void PL_ClipMove( player_t *self, int xmove, int ymove ) -{ - int basex, basey; - - basex = self->position.origin[ 0 ]; - basey = self->position.origin[ 1 ]; - - self->position.origin[ 0 ] += xmove; - self->position.origin[ 1 ] += ymove; - if( PL_TryMove( self, r_world ) ) - { - return; // we moved as we wanted - } - - //Sound_StartSound( NULL, 0, CHAN_BODY, Sound_RegisterSound( "lsfx/000.wav" ), 1, ATTN_NORM, 0 ); - - if( xmove ) // don't bother if we don't move x! - { - self->position.origin[ 0 ] = basex + xmove; - self->position.origin[ 1 ] = basey; - if( PL_TryMove( self, r_world ) ) - { - return; // May be we'll move only X direction? - } - } - if( ymove ) // don't bother if we don't move y! - { - self->position.origin[ 0 ] = basex; - self->position.origin[ 1 ] = basey + ymove; - if( PL_TryMove( self, r_world ) ) - { - return; // May be we'll move only Y direction? - } - } - -// movement blocked; we must stay on one place... :( - self->position.origin[ 0 ] = basex; - self->position.origin[ 1 ] = basey; -} - - -/* ------------------------------------------------------------------------------ - Function: Changes player's angle and position - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void PL_ControlMovement( player_t *self, LevelData_t *lvl ) -{ - int angle, speed; - -// rotation - angle = self->position.angle; - -// if(cmd->forwardmove || cmd->sidemove) - self->movx = self->movy = 0; // clear accumulated movement - - if( Player.cmd.forwardmove ) - { - speed = tics * Player.cmd.forwardmove; - self->movx+=(int)(speed * CosTable[ angle ] ); - self->movy+=(int)(speed * SinTable[ angle ] ); - } - if( Player.cmd.sidemove ) - { - speed = tics * Player.cmd.sidemove; - self->movx += (int)( speed * SinTable[ angle ] ); - self->movy -= (int)( speed * CosTable[ angle ] ); - } - - if( ! self->movx && ! self->movy ) - return; - -#ifdef SPEAR - - funnyticount = 0; // ZERO FUNNY COUNTER IF MOVED! // FIXME! - -#endif - self->speed = self->movx + self->movy; - -// bound movement - if( self->movx > MAXMOVE ) - self->movx = MAXMOVE; - else if( self->movx < -MAXMOVE ) - self->movx = -MAXMOVE; - - if( self->movy > MAXMOVE ) - self->movy = MAXMOVE; - else if( self->movy < -MAXMOVE ) - self->movy = -MAXMOVE; - -// move player and clip movement to walls (check for no-clip mode here) - PL_ClipMove( self, self->movx, self->movy ); - self->tilex = POS2TILE( self->position.origin[ 0 ] ); - self->tiley = POS2TILE( self->position.origin[ 1 ] ); - - // pick up items easier -- any tile you touch, instead of - // just the midpoint tile - { - int x, y; - - for ( x = -1 ; x <= 1 ; x+= 2 ) { - int tilex = POS2TILE( self->position.origin[0] + x * PLAYERSIZE ); - for ( y = -1 ; y <= 1 ; y+= 2 ) { - int tiley = POS2TILE( self->position.origin[1] + y * PLAYERSIZE ); - Powerup_PickUp( tilex, tiley ); - } - } - } -// Powerup_PickUp( self->tilex, self->tiley ); - -// Checking for area change, ambush tiles and doors will have negative values - if( lvl->areas[ self->tilex ][ self->tiley ] >= 0 && - lvl->areas[ self->tilex ][ self->tiley ] != Player.areanumber ) - { - Player.areanumber = lvl->areas[ self->tilex ][ self->tiley ]; - assert( Player.areanumber >= 0 && Player.areanumber < NUMAREAS ); - Areas_ConnectAreas( Player.areanumber ); - } - - if( lvl->tilemap[ self->tilex ][ self->tiley ] & EXIT_TILE ) - { - iphoneStartIntermission( 0 ); - } - - -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void PL_PlayerAttack( player_t *self, _boolean re_attack ) -{ - struct atkinf *cur; - - self->attackcount -= tics; - while( self->attackcount <= 0 ) - { - cur = &attackinfo[ self->weapon ][ self->attackframe ]; - switch( cur->attack ) - { - case -1: - self->flags &= ~PL_FLAG_ATTCK; - if( ! self->ammo[ AMMO_BULLETS ] ) - { - self->weapon = WEAPON_KNIFE; - } - else if( self->weapon != self->pendingweapon ) - { - self->weapon = self->pendingweapon; - } - self->attackframe = self->weaponframe = 0; - return; - - case 4: - if( ! self->ammo[ AMMO_BULLETS ] ) - { - break; - } - - if( re_attack ) - { - self->attackframe -= 2; - } - - case 1: - if( ! self->ammo[ AMMO_BULLETS ] ) // can only happen with chain gun - { - self->attackframe++; - break; - } - fire_lead( self ); - self->ammo[ AMMO_BULLETS ]--; - break; - - case 2: - fire_hit( self ); - break; - - case 3: - if(self->ammo[AMMO_BULLETS] && re_attack) - self->attackframe-=2; - break; - } - - self->attackcount += cur->tics; - self->attackframe++; - self->weaponframe = attackinfo[ self->weapon ][ self->attackframe ].frame; - } - -} - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void PL_Process( player_t *self, LevelData_t *lvl ) -{ - int n; - - self->madenoise = false; - - PL_ControlMovement( self, lvl ); - - if( self->flags & PL_FLAG_ATTCK ) - { - PL_PlayerAttack( self, Player.cmd.buttons & BUTTON_ATTACK ); - } - else - { - if( Player.cmd.buttons & BUTTON_USE ) - { - if(!(self->flags & PL_FLAG_REUSE) && PL_Use( self, lvl ) ) - { - self->flags|=PL_FLAG_REUSE; - } - } - else - { - self->flags &= ~PL_FLAG_REUSE; - } - - if( Player.cmd.buttons & BUTTON_ATTACK ) - { - self->flags |= PL_FLAG_ATTCK; - - self->attackframe = 0; - self->attackcount = attackinfo[ self->weapon ][ 0 ].tics; - self->weaponframe = attackinfo[ self->weapon ][ 0 ].frame; - } - } - -// process impulses - switch( Player.cmd.impulse ) - { - case 0: - break; // no impulse - - case 1: - case 2: - case 3: - case 4: - PL_ChangeWeapon( self, Player.cmd.impulse - 1 ); - break; - - case 10: // next weapon /like in Quake/ FIXME: weapprev, weapnext - self->pendingweapon=self->weapon; - for( n = 0 ; n < 4; ++n ) - { - if( ++self->weapon > WEAPON_CHAIN ) - { - self->weapon = WEAPON_KNIFE; - } - - if( PL_ChangeWeapon( self, self->weapon ) ) - { - break; - } - } - self->weapon = self->pendingweapon; - break; - - default: - Com_Printf( "Unknown Impulse: %d\n", Player.cmd.impulse ); - break; - } - -} - - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void PL_Reset(void) -{ - memset( &Player, 0, sizeof( Player ) ); - Player.playstate = ex_notingame; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void PL_Spawn( placeonplane_t location, LevelData_t *lvl ) -{ - Player.position = location; - Player.tilex = POS2TILE( location.origin[ 0 ] ); - Player.tiley = POS2TILE( location.origin[ 1 ] ); - Player.areanumber = lvl->areas[ Player.tilex ][ Player.tiley ]; - assert( Player.areanumber >= 0 && Player.areanumber < NUMAREAS ); - if( Player.areanumber < 0 ) - { - Player.areanumber = 36; - } - - Areas_ConnectAreas( Player.areanumber ); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void Cmd_Give_f( void ) -{ - PL_GiveHealth( &Player, 999, 0 ); - PL_GiveAmmo( &Player, AMMO_BULLETS, 99 ); - PL_GiveWeapon( &Player, WEAPON_AUTO ); - PL_GiveWeapon( &Player, WEAPON_CHAIN ); - PL_GiveKey( &Player, KEY_GOLD ); - PL_GiveKey( &Player, KEY_SILVER ); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void Cmd_God_f( void ) -{ - Player.flags ^= FL_GODMODE; - - Com_Printf( "God mode %s\n", Player.flags & FL_GODMODE ? "ON":"OFF" ); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE void PL_notarget_f( void ) -{ - Player.flags ^= FL_NOTARGET; -} - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void PL_Init(void) -{ - PL_Reset(); - PL_NewGame( &Player ); - - Cmd_AddCommand( "god", Cmd_God_f ); - Cmd_AddCommand( "notarget", PL_notarget_f ); - - Cmd_AddCommand( "give", Cmd_Give_f ); -} - -// ------------------------- * environment interraction * ------------------------- -#define EXTRAPOINTS 40000 // points for an extra life - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -#ifdef IPHONE -void vibrateDevice(); -#else -void vibrateDevice() {} -#endif - -PUBLIC void PL_Damage( player_t *self, entity_t *attacker, int points ) -{ - - if( self->playstate == ex_dead ) - { - return; - } - - self->LastAttacker = attacker; - - if( skill->value == gd_baby ) - { - points >>= 2; - } - - // vibe the phone - vibrateDevice(); - - // note the direction of the last hit for the directional blends - { - int dx = attacker->x - self->position.origin[0]; - int dy = attacker->y - self->position.origin[1]; - - // probably won't ever have damage from self, but check anyway - if ( dx != 0 || dy != 0 ) { - float angle = atan2f( dy, dx ); - float playerAngle = self->position.angle * 360.0f / (float)ANG_360; - float deltaAngle; - angle = angle * 180.0f / M_PI; - if ( angle < 0 ) { - angle = 360 + angle; - } - deltaAngle = angle - playerAngle; - if ( deltaAngle > 180 ) { - deltaAngle = deltaAngle - 360; - } - if ( deltaAngle < -180 ) { - deltaAngle = 360 + deltaAngle; - } -// Com_Printf( "damage: player angle: %4.0f shotAngle: %4.0f deltaAngle:%4.0f\n", playerAngle, angle, deltaAngle ); - if ( deltaAngle > 40 ) { - iphoneSetAttackDirection( 1 ); - } else if ( deltaAngle < -40 ) { - iphoneSetAttackDirection( -1 ); - } - } - } - - // do everything else but subtract health in god mode, to ease - // testing of damage feedback - if( !(self->flags & FL_GODMODE) ) - { - self->health -= points; - } - - if( self->health <= 0 ) - { - // dead - self->health = 0; - self->playstate = ex_dead; - - Sound_StartSound( NULL, 0, CHAN_BODY, Sound_RegisterSound( "lsfx/009.wav" ), 1, ATTN_NORM, 0 ); - } - - // red screen flash - iphoneStartDamageFlash( points ); - - // stop the happy grin face if shot before it times out - Player.face_gotgun = false; - - // make BJ's eyes bulge on huge hits - if( points > 30 && Player.health != 0 ) - { - Player.face_ouch = true; - Player.facecount = 0; - } -} - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: returns true if player needs this health. - - Notes: - gives player some HP - max can be: - 0 - natural player's health limit (100 or 150 with augment) - >0 - indicates the limit ------------------------------------------------------------------------------ -*/ -PUBLIC _boolean PL_GiveHealth( player_t *self, int points, int max ) -{ - if( max == 0 ) - { - max = (self->items & ITEM_AUGMENT) ? 150 : 100; - } - - if( self->health >= max ) - { - return false; // doesn't need this health - } - - self->health += points; - - if( self->health > max ) - { - self->health = max; - } - - Player.face_gotgun = false; - - return true; // took it -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: returns true if player needs this ammo - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC _boolean PL_GiveAmmo( player_t *self, int type, int ammo ) -{ - int max_ammo[ AMMO_TYPES ] = { 99 }; - int max; - - max = max_ammo[ type ]; - if( self->items & ITEM_BACKPACK ) - { - max *= 2; - } - - if( self->ammo[ type ] >= max ) - { - return false; // don't need - } - - if( ! self->ammo[ type ] && ! self->attackframe ) // knife was out - { - self->weapon = self->pendingweapon; - } - - self->ammo[ type ] += ammo; - if( self->ammo[ type ] > max ) - { - self->ammo[ type ] = max; - } - - return true; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void PL_GiveWeapon( player_t *self, int weapon ) -{ - unsigned itemflag; - - PL_GiveAmmo( self, AMMO_BULLETS, 6 ); // give some ammo with a weapon - - itemflag = ITEM_WEAPON_1 << weapon; - if( self->items & itemflag ) - { - return; // player owns this weapon - } - else - { - self->items |= itemflag; - if ( self->weapon < weapon ) { // don't switch if already using better weapon - self->weapon = self->pendingweapon = weapon; - } - } -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void PL_GiveLife( player_t *self ) -{ - if( self->lives < 9 ) - { - self->lives++; - } - - Sound_StartSound( NULL, 0, CHAN_ITEM, Sound_RegisterSound( "lsfx/044.wav" ), 1, ATTN_NORM, 0 ); -} - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void PL_GivePoints( player_t *self, W32 points ) -{ - self->score += points; - while( self->score >= self->next_extra ) - { - self->next_extra += EXTRAPOINTS; - PL_GiveLife( self ); - } -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void PL_GiveKey( player_t *self, int key ) -{ - self->items |= ITEM_KEY_1 << key; -} - - -/* ------------------------------------------------------------------------------ - Function: Set up player for the new game - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void PL_NewGame( player_t *self ) -{ - memset( self, 0, sizeof( player_t ) ); - - self->health = 100; - self->ammo[ AMMO_BULLETS ] = 16; // JDC: changed for iphone 8; - self->lives = 3; - - self->weapon = self->pendingweapon = WEAPON_PISTOL; - self->items = ITEM_WEAPON_1 | ITEM_WEAPON_2; - self->next_extra = EXTRAPOINTS; -} - -/* ------------------------------------------------------------------------------ - Function: Set up player for level transition - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void PL_NextLevel( player_t *self ) -{ - self->old_score = self->score; - self->attackcount = self->attackframe = self->weaponframe = 0; - self->flags = 0; - - self->items &= ~(ITEM_KEY_1 | ITEM_KEY_2 | ITEM_KEY_3 | ITEM_KEY_4); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: self -[in] Player to respawn in game world. - - Returns: returns false if no lives left - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC _boolean PL_Reborn( player_t *self ) -{ -#if 0 // removed game over from iphone version - if( --self->lives < 1 ) - { - return false; - } -#endif - - self->health = 100; - self->ammo[ AMMO_BULLETS ] = 16; // JDC: changed for iphone 8; - self->score = self->old_score; - self->attackcount = 0; - self->attackframe = 0; - self->weaponframe = 0; - self->flags = 0; - - self->weapon = self->pendingweapon = WEAPON_PISTOL; - self->items = ITEM_WEAPON_1 | ITEM_WEAPON_2; - - self->playstate = ex_playing; - - return true; -} diff --git a/wolf3d/newCode/wolf/wolf_player.h b/wolf3d/newCode/wolf/wolf_player.h deleted file mode 100644 index d04d5d3..0000000 --- a/wolf3d/newCode/wolf/wolf_player.h +++ /dev/null @@ -1,180 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_player.h: Wolfenstein3-D player management. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - */ - -/* - Notes: - This module is implemented by wolf_player.c - -*/ - -#ifndef __WOLF_PLAYER_H__ -#define __WOLF_PLAYER_H__ - -#define ITEM_KEY_1 1 -#define ITEM_KEY_2 2 -#define ITEM_KEY_3 4 -#define ITEM_KEY_4 8 -#define ITEM_WEAPON_1 16 -#define ITEM_WEAPON_2 32 -#define ITEM_WEAPON_3 64 -#define ITEM_WEAPON_4 128 -#define ITEM_WEAPON_5 256 -#define ITEM_WEAPON_6 512 -#define ITEM_WEAPON_7 1024 -#define ITEM_WEAPON_8 2048 -#define ITEM_BACKPACK (1<<12) // doubles carrying capacity -#define ITEM_AUGMENT (1<<13) // adds 50 to maximum health -#define ITEM_UNIFORM (1<<14) // allows you to pass guards -#define ITEM_AUTOMAP (1<<15) // shows unknown map ares in other color (as in DooM) -#define ITEM_FREE (1<<16) // - unused - - - -enum weapon_e -{ - WEAPON_KNIFE, - WEAPON_PISTOL, - WEAPON_AUTO, - WEAPON_CHAIN, - - WEAPON_TYPES -}; - -enum key_e -{ - KEY_GOLD, - KEY_SILVER, - KEY_FREE1, - KEY_FREE2, - - KEY_TYPES -}; - -enum ammo_e -{ - AMMO_BULLETS, - - AMMO_TYPES -}; - - - -// flags -#define PL_FLAG_REUSE 1 // use button pressed -#define PL_FLAG_ATTCK 2 // attacking -// debug (cheat codes) flags -#define FL_GODMODE (1<<4) -#define FL_NOTARGET (1<<6) - - -typedef enum state_e -{ - ex_notingame, - ex_playing, - ex_dead, - ex_secretlevel, - ex_victory, - ex_complete -/* - ex_stillplaying, - ex_completed, - ex_died, - ex_warped, - ex_resetgame, - ex_loadedgame, - ex_victorious, - ex_abort, - ex_demodone, - ex_secretlevel -*/ -} state_t; - -// ------------------------- * types * ------------------------- -// Player structure: Holds all info about player -typedef struct player_s -{ - usercmd_t cmd; // movement / action command - - placeonplane_t position; // player position - int movx, movy, speed; - int tilex, tiley; - -// stats - int health, lives, frags; - int armor; // there are 2 types. The better one is indicated by high bit set - int ammo[AMMO_TYPES]; - int old_score, score, next_extra; - unsigned items; // (keys, weapon) - int weapon, pendingweapon; -// additional info - int attackframe, attackcount, weaponframe; // attack info - unsigned flags; - int areanumber; - - _boolean madenoise; // FIXME: move to flags? - entity_t *LastAttacker; - int faceframe, facecount; // bj's face in the HUD // FIXME decide something! - _boolean face_gotgun, face_ouch; - state_t playstate; // fixme: move to gamestate - -} player_t; - -extern player_t Player; - - - - -extern void PL_Spawn( placeonplane_t location, LevelData_t *lvl ); - -extern void PL_Process( player_t *self, LevelData_t *lvl ); - -extern void PL_Damage( player_t *self, entity_t *attacker, int points ); -extern _boolean PL_GiveHealth( player_t *self, int points, int max ); -extern _boolean PL_GiveAmmo( player_t *self, int type, int ammo ); -extern void PL_GiveWeapon( player_t *self, int weapon ); -extern void PL_GiveLife( player_t *self ); -extern void PL_GivePoints( player_t *self, W32 points ); -extern void PL_GiveKey( player_t *self, int key ); - -extern void PL_NewGame( player_t *self ); -extern void PL_NextLevel( player_t *self ); -extern _boolean PL_Reborn( player_t *self ); - -extern void PL_Init( void ); -extern void PL_Reset( void ); - - -extern void fire_hit( player_t *self ); -extern void fire_lead( player_t *self ); - - -#endif /* __WOLF_PLAYER_H__ */ diff --git a/wolf3d/newCode/wolf/wolf_powerups.c b/wolf3d/newCode/wolf/wolf_powerups.c deleted file mode 100644 index ebc9331..0000000 --- a/wolf3d/newCode/wolf/wolf_powerups.c +++ /dev/null @@ -1,427 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2001 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_pushwalls.c: Wolfenstein3-D power-up handler. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - */ - -#include "../wolfiphone.h" - -typedef struct powerup_s -{ - int x, y; - pow_t type; - int sprite; - struct powerup_s *prev, *next; - -} powerup_t; - -powerup_t *powerups = NULL; - - -int Pow_Texture[ pow_last ] = -{ - SPR_STAT_34, // pow_gibs - SPR_STAT_38, // pow_gibs2 - SPR_STAT_6, // pow_alpo - SPR_STAT_25, // pow_firstaid - SPR_STAT_20, // pow_key1 - SPR_STAT_21, // pow_key2 -// not used - SPR_STAT_20, // pow_key3 - SPR_STAT_20, // pow_key4 - - SPR_STAT_29, // pow_cross - SPR_STAT_30, // pow_chalice - SPR_STAT_31, // pow_bible - SPR_STAT_32, // pow_crown - SPR_STAT_26, // pow_clip - SPR_STAT_26, // pow_clip2 - SPR_STAT_27, // pow_machinegun - SPR_STAT_28, // pow_chaingun - SPR_STAT_24, // pow_food - SPR_STAT_33, // pow_fullheal -// spear - SPR_STAT_49, // pow_25clip - SPR_STAT_51, // pow_spear -}; - - - - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE powerup_t *Pow_Remove( powerup_t *powerup ) -{ - powerup_t *next; - - if( powerup == NULL ) - return NULL; - - if( powerup->prev ) - powerup->prev->next = powerup->next; - - if( powerup->next ) - powerup->next->prev = powerup->prev; - - next = powerup->next; - if( powerups == powerup ) - powerups = next; //fuck! - - MM_FREE( powerup ); - - return next; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE powerup_t *Pow_AddNew( void ) -{ - powerup_t *newp; - - newp = MM_MALLOC( sizeof( powerup_t ) ); - newp->prev = NULL; - newp->next = powerups; - - if( powerups ) - { - powerups->prev = newp; - } - - powerups = newp; - - return newp; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Powerup_Reset( void ) -{ - powerup_t *powerup = powerups; - - while( powerup ) - { - powerup = Pow_Remove( powerup ); - } - - powerups = NULL; -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: 1 if powerup is picked up, otherwise 0. - - Notes: - ------------------------------------------------------------------------------ -*/ -PRIVATE int Pow_Give( pow_t type ) -{ - static const char *keynames[] = { "Gold", "Silver", "?", "?" }; - - switch( type ) - { -// -// Keys -// - case pow_key1: - case pow_key2: - case pow_key3: - case pow_key4: - type -= pow_key1; - PL_GiveKey( &Player, type ); - Sound_StartSound( NULL, 0, CHAN_ITEM, Sound_RegisterSound( "lsfx/012.wav" ), 1, ATTN_NORM, 0 ); - iphoneSetNotifyText( "%s key\n", keynames[ type ] ); - break; -// -// Treasure -// - case pow_cross: - PL_GiveHealth( &Player, 1, 150 ); // iphone -- trasure acts as health crumbs - PL_GivePoints( &Player, 100 ); - Sound_StartSound( NULL, 0, CHAN_ITEM, Sound_RegisterSound( "lsfx/035.wav" ), 1, ATTN_NORM, 0 ); - if ( ++levelstate.found_treasure == levelstate.total_treasure ) { - iphoneSetNotifyText( "You found the last treasure!" ); - } - break; - - case pow_chalice: - PL_GiveHealth( &Player, 1, 150 ); // iphone -- trasure acts as health crumbs - PL_GivePoints( &Player, 500 ); - Sound_StartSound( NULL, 0, CHAN_ITEM, Sound_RegisterSound( "lsfx/036.wav" ), 1, ATTN_NORM, 0 ); - if ( ++levelstate.found_treasure == levelstate.total_treasure ) { - iphoneSetNotifyText( "You found the last treasure!" ); - } - break; - - case pow_bible: - PL_GiveHealth( &Player, 1, 150 ); // iphone -- trasure acts as health crumbs - PL_GivePoints( &Player, 1000 ); - Sound_StartSound( NULL, 0, CHAN_ITEM, Sound_RegisterSound( "lsfx/037.wav" ), 1, ATTN_NORM, 0 ); - if ( ++levelstate.found_treasure == levelstate.total_treasure ) { - iphoneSetNotifyText( "You found the last treasure!" ); - } - break; - - case pow_crown: - PL_GiveHealth( &Player, 1, 150 ); // iphone -- trasure acts as health crumbs - PL_GivePoints( &Player, 5000 ); - Sound_StartSound( NULL, 0, CHAN_ITEM, Sound_RegisterSound( "lsfx/045.wav" ), 1, ATTN_NORM, 0 ); - if ( ++levelstate.found_treasure == levelstate.total_treasure ) { - iphoneSetNotifyText( "You found the last treasure!" ); - } - break; - -// -// Health -// - case pow_gibs: - if( ! PL_GiveHealth( &Player, 1, 11 ) ) - { - return 0; - } - Sound_StartSound( NULL, 0, CHAN_ITEM, Sound_RegisterSound( "lsfx/061.wav" ), 1, ATTN_NORM, 0 ); - break; - - case pow_alpo: - if( ! PL_GiveHealth( &Player, 4, 0 ) ) - { - return 0; - } - Sound_StartSound( NULL, 0, CHAN_ITEM, Sound_RegisterSound( "lsfx/033.wav" ), 1, ATTN_NORM, 0 ); - break; - - case pow_food: - if( ! PL_GiveHealth( &Player, 10, 0 ) ) - { - return 0; - } - Sound_StartSound( NULL, 0, CHAN_ITEM, Sound_RegisterSound( "lsfx/033.wav" ), 1, ATTN_NORM, 0 ); - break; - - case pow_firstaid: - if( ! PL_GiveHealth( &Player, 25, 0 ) ) - { - return 0; - } - Sound_StartSound( NULL, 0, CHAN_ITEM, Sound_RegisterSound( "lsfx/034.wav" ), 1, ATTN_NORM, 0 ); - break; - -// -// Weapon & Ammo -// - case pow_clip: - if( ! PL_GiveAmmo( &Player, AMMO_BULLETS, 8 ) ) - { - return 0; - } - Sound_StartSound( NULL, 0, CHAN_ITEM, Sound_RegisterSound( "lsfx/031.wav" ), 1, ATTN_NORM, 0 ); - break; - - case pow_clip2: - if( ! PL_GiveAmmo( &Player, AMMO_BULLETS, 4 ) ) - { - return 0; - } - Sound_StartSound( NULL, 0, CHAN_ITEM, Sound_RegisterSound( "lsfx/031.wav" ), 1, ATTN_NORM, 0 ); - break; - - case pow_25clip: - if( ! PL_GiveAmmo( &Player, AMMO_BULLETS, 25 ) ) - { - return 0; - } - Sound_StartSound( NULL, 0, CHAN_ITEM, Sound_RegisterSound( "lsfx/064.wav" ), 1, ATTN_NORM, 0 ); - break; - - case pow_machinegun: - PL_GiveWeapon( &Player, WEAPON_AUTO ); - Sound_StartSound( NULL, 0, CHAN_ITEM, Sound_RegisterSound( "lsfx/030.wav" ), 1, ATTN_NORM, 0 ); - iphoneSetNotifyText( "Machinegun" ); - break; - - case pow_chaingun: - PL_GiveWeapon( &Player, WEAPON_CHAIN ); - Sound_StartSound( NULL, 0, CHAN_ITEM, Sound_RegisterSound( "lsfx/038.wav" ), 1, ATTN_NORM, 0 ); - iphoneSetNotifyText( "Chaingun" ); - - Player.facecount = -100; - Player.face_gotgun = true; - break; - -// -// Artifacts -// - case pow_fullheal: - PL_GiveHealth( &Player, 999, 0 ); - PL_GiveAmmo( &Player, AMMO_BULLETS, 25 ); - PL_GiveLife( &Player ); - if ( ++levelstate.found_treasure == levelstate.total_treasure ) { - iphoneSetNotifyText( "You found the last treasure!" ); - } else { - iphoneSetNotifyText( "Full Heal" ); - } - // no extra lives on iPhone Com_Printf( "Extra life!\n" ); - break; - - case pow_spear: - { - char szTextMsg[ 256 ]; - - Sound_StartSound( NULL, 0, CHAN_ITEM, Sound_RegisterSound( "sodsfx/109.wav" ), 1, ATTN_NORM, 0 ); - iphoneSetNotifyText( "Spear of Destiny" ); - - my_snprintf( szTextMsg, sizeof( szTextMsg ), - "loading ; map s%.2d.map\n", 20 ); - Cbuf_AddText( szTextMsg ); - } - break; - - default: - Com_DPrintf( "Warning: Unknown item type: %d\n", type ); - break; - } - - iphoneStartBonusFlash(); - - return 1; -} - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: x, y -[in] In are in TILES. - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Powerup_Spawn( int x, int y, int type, LevelData_t *lvl ) -{ - powerup_t *newp; - - lvl->tilemap[ x ][ y ] |= POWERUP_TILE; - newp = Pow_AddNew(); - newp->sprite = Sprite_GetNewSprite(); - Sprite_SetPos( newp->sprite, TILE2POS( newp->x = x ), TILE2POS( newp->y = y ), 0 ); - newp->type = type; - Sprite_SetTex( newp->sprite, -1, Pow_Texture[ type ] ); - lvl->tilemap[ x ][ y ] |= POWERUP_TILE; -// good place to update total treasure count! -} - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: x, y -[in] In are in TILES. - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Powerup_PickUp( int x, int y ) -{ - powerup_t *pow; - _boolean p_left = false, p_pick = false; - - for( pow = powerups ; pow ; pow = pow->next ) - { -check_again: - if( pow->x == x && pow->y == y) - {// got a powerup here - if( Pow_Give( pow->type ) ) //FIXME script - {// picked up this stuff, remove it! - p_pick = true; - Sprite_RemoveSprite( pow->sprite ); - pow = Pow_Remove( pow ); - if( pow ) - goto check_again; - else - break; - } - else - {// player do not need it, so may be next time! - p_left = true; - } - } - } - - if( p_left ) - { - r_world->tilemap[ x ][ y ] |= POWERUP_TILE; - } - else - { - r_world->tilemap[ x ][ y ] &= ~POWERUP_TILE; - } -} - diff --git a/wolf3d/newCode/wolf/wolf_powerups.h b/wolf3d/newCode/wolf/wolf_powerups.h deleted file mode 100644 index aa87235..0000000 --- a/wolf3d/newCode/wolf/wolf_powerups.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_powerups.h: Wolfenstein3-D power-up handler. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - */ - -/* - Notes: - This module is implemented by wolf_powerups.c - -*/ - -#ifndef __WOLF_POWERUPS_H__ -#define __WOLF_POWERUPS_H__ - -typedef enum -{ -//please provide description - pow_gibs, // 1% if <=10%; SLURPIESND - pow_gibs2, // 1% if <=10%; SLURPIESND - pow_alpo, // 4% if <100%; HEALTH1SND - pow_firstaid, // 25% if <100%; HEALTH2SND - pow_key1, // gold key; GETKEYSND - pow_key2, // silver key; GETKEYSND - pow_key3, // not used - pow_key4, // not used - pow_cross, // 100pts; BONUS1SND - pow_chalice, // 500pts; BONUS2SND - pow_bible, // 1000pts; BONUS3SND - pow_crown, // 5000pts; BONUS4SND - pow_clip, // 8bul if <99bul; GETAMMOSND - pow_clip2, // 4bul if <99bul; GETAMMOSND - pow_machinegun, // machine gun; GETMACHINESND - pow_chaingun, // gatling gun; GETGATLINGSND - pow_food, // 10% if <100%; HEALTH1SND - pow_fullheal, // 99%, 25bul; BONUS1UPSND - pow_25clip, // 25bul if <99bul; GETAMMOBOXSND - pow_spear, // spear of destiny! - - pow_last -// add new types here (after last) - -} pow_t; - - -extern void Powerup_Reset( void ); -extern void Powerup_Spawn( int x, int y, int type, LevelData_t *lvl ); -extern void Powerup_PickUp( int x, int y ); - - -#endif /* __WOLF_POWERUPS_H__ */ - diff --git a/wolf3d/newCode/wolf/wolf_pushwalls.c b/wolf3d/newCode/wolf/wolf_pushwalls.c deleted file mode 100644 index b040d7d..0000000 --- a/wolf3d/newCode/wolf/wolf_pushwalls.c +++ /dev/null @@ -1,175 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_pushwalls.c: Wolfenstein3-D push-wall handler. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - */ - -#include "../wolfiphone.h" - -Pwall_t PWall; - - -/* ------------------------------------------------------------------------------ - Function: PushWall_Reset() -Reset pushwall status. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void PushWall_Reset(void) -{ - memset( &PWall, 0, sizeof( Pwall_t ) ); -} - - -/* ------------------------------------------------------------------------------ - Function: PushWall_Push() -Try to move push-wall. - - Parameters: x, y -[in] Coordinates in tilemap. - dir -[in] Direction in which push-wall is intended to move. - - Returns: true if push successful, otherwise false. - - Notes: Called whenever someone tries to push a secret wall. - ------------------------------------------------------------------------------ -*/ -PUBLIC _boolean PushWall_Push( int x, int y, dir4type dir ) -{ - int dx, dy; - - - if( PWall.active ) - { - return false; // another PWall is moving [only one at a time!] - } - - dx = dx4dir[ dir ]; - dy = dy4dir[ dir ]; - - if( r_world->tilemap[ x + dx ][ y + dy ] & (SOLID_TILE | DOOR_TILE) ) - { // noway (smth is blocking) - return true; - } - -// remove secret flag & make everything needed when pushwall used! - r_world->tilemap[ x ][ y ] &= (~SECRET_TILE); - r_world->tilemap[ x ][ y ] &= (~WALL_TILE); - r_world->tilemap[ x ][ y ] |= PUSHWALL_TILE; - - if ( ++levelstate.found_secrets == levelstate.total_secrets ) { - iphoneSetNotifyText( "You found the last secret!" ); - } else { - iphoneSetNotifyText( "You found a secret!" ); - } - - if( g_version->value == SPEAROFDESTINY ) - { - Sound_StartSound( NULL, 1, CHAN_AUTO, Sound_RegisterSound( "sfx/030.wav" ), 1, ATTN_STATIC, 0 ); - } - else - { - Sound_StartSound( NULL, 1, CHAN_AUTO, Sound_RegisterSound( "sfx/034.wav" ), 1, ATTN_STATIC, 0 ); - } - -// good way to avoid stuckness; [un]comment one more down! -// it makes a tile behind pushwall unpassable - r_world->tilemap[ x + dx ][ y + dy ] |= PUSHWALL_TILE; - r_world->wall_tex_x[ x + dx ][ y + dy ] = r_world->wall_tex_x[ x ][ y ]; - r_world->wall_tex_y[ x + dx ][ y + dy ] = r_world->wall_tex_y[ x ][ y ]; - -// write down PWall info - PWall.active = true; - PWall.PWtilesmoved = PWall.PWpointsmoved = 0; - PWall.dir = dir; - PWall.x = x; PWall.y = y; - PWall.dx = dx; PWall.dy = dy; - PWall.tex_x = r_world->wall_tex_x[ x ][ y ]; - PWall.tex_y = r_world->wall_tex_y[ x ][ y ]; - - return true; -} - -/* ------------------------------------------------------------------------------ - Function: PushWall_Process() -Process push-walls. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void PushWall_Process( void ) -{ - if( ! PWall.active ) - { - return; // no active PWall to work with - } - - PWall.PWpointsmoved += tics; - - if( PWall.PWpointsmoved < 128 ) - { - return; - } - - PWall.PWpointsmoved -= 128; - PWall.PWtilesmoved++; -// Free tile - r_world->tilemap[ PWall.x ][ PWall.y ] &= (~PUSHWALL_TILE); -// Occupy new tile - PWall.x += PWall.dx; - PWall.y += PWall.dy; - -// Shall we move further? - if( r_world->tilemap[ PWall.x + PWall.dx ][ PWall.y + PWall.dy ] & (SOLID_TILE | DOOR_TILE | ACTOR_TILE | POWERUP_TILE) || - PWall.PWtilesmoved == 3 ) - { - r_world->tilemap[ PWall.x ][ PWall.y ] &= (~PUSHWALL_TILE); // wall now - r_world->tilemap[ PWall.x ][ PWall.y ] |= WALL_TILE; // wall now - r_world->wall_tex_x[ PWall.x ][ PWall.y ] = PWall.tex_x; - r_world->wall_tex_y[ PWall.x ][ PWall.y ] = PWall.tex_y; - PWall.active = false; // Free Push Wall - } - else - { - r_world->tilemap[ PWall.x + PWall.dx ][ PWall.y + PWall.dy ] |= PUSHWALL_TILE; - } - -} diff --git a/wolf3d/newCode/wolf/wolf_raycast.c b/wolf3d/newCode/wolf/wolf_raycast.c deleted file mode 100644 index 9321558..0000000 --- a/wolf3d/newCode/wolf/wolf_raycast.c +++ /dev/null @@ -1,370 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_raycast.c: Wolfenstein3-D ray-casting. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - */ - -#include "../wolfiphone.h" - - -W8 tile_visible[ 64 ][ 64 ]; // can player see this tile? - - -/* ------------------------------------------------------------------------------ - Function: R_RayCast() -Ray cast viewport. - - Parameters: viewport -[in] Position of camera. - lvl -[in] Pointer to valid LevelData_t structure. - - Returns: Nothing. - - Notes: Marks all visible tiles in tile_visible[] array. - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_RayCast( placeonplane_t viewport, LevelData_t *lvl ) -{ - int n, x, y, angle, vx, vy; - r_trace_t trace; - - memset( tile_visible, 0, sizeof( tile_visible ) ); // clear tile visible flags - -// viewport tile coordinates - x = viewport.origin[ 0 ]; - y = viewport.origin[ 1 ]; - angle = viewport.angle; - - vx = POS2TILE( viewport.origin[ 0 ] ); - vy = POS2TILE( viewport.origin[ 1 ] ); - - trace.tile_vis = tile_visible; - trace.flags = TRACE_SIGHT | TRACE_MARK_MAP; - -// -// Ray casting -// - - // FIXME: control ray count and make angle init - for( n = 0 ; n < 640 ; ++n ) - { - trace.x = x; - trace.y = y; - trace.a = NormalizeAngle( angle + ColumnAngle[ n ] ); - - R_Trace( &trace, lvl ); - } - -// -// Rendering -// - for( x = 0 ; x < 64; ++x ) - for( y = 0 ; y < 64; ++y ) - if( tile_visible[ x ][ y ] ) - { - lvl->tileEverVisible[x][y] = 1; // for automap - if( lvl->tilemap[ x ][ y ] & DOOR_TILE ) - { - /* door */ - if( lvl->Doors.DoorMap[ x ][ y ].action != dr_open ) - { - _boolean backside = false; - - if( lvl->Doors.DoorMap[ x ][ y ].vertical ) - { - if( x < vx ) - backside = true; - } - else - { - if( y < vy ) - backside = true; - } - - R_Draw_Door( x, y, LOWERZCOORD, UPPERZCOORD, - lvl->Doors.DoorMap[ x ][ y ].vertical, - backside, - lvl->Doors.DoorMap[ x ][ y ].texture, - Door_Opened( &lvl->Doors, x, y ) ); - } - /* door sides */ - if( lvl->Doors.DoorMap[ x ][ y ].vertical ) - { - if( y <= vy ) - R_Draw_Wall( (float)x, (float)(y-1), LOWERZCOORD, UPPERZCOORD, dir4_north, TEX_PLATE ); - - if( y >= vy ) - R_Draw_Wall( (float)x, (float)(y+1), LOWERZCOORD, UPPERZCOORD, dir4_south, TEX_PLATE ); - - if( x <= vx && lvl->tilemap[ x - 1 ][ y ] & WALL_TILE ) - R_Draw_Wall( (float)(x-1), (float)y, LOWERZCOORD, UPPERZCOORD, dir4_east, lvl->wall_tex_x[ x - 1 ][ y ] ); - - if( x >= vx && lvl->tilemap[ x + 1 ][ y ] & WALL_TILE ) - R_Draw_Wall( (float)(x+1), (float)y, LOWERZCOORD, UPPERZCOORD, dir4_west, lvl->wall_tex_x[ x + 1 ][ y ] ); - } - else - { - if( x <= vx ) - R_Draw_Wall((float)(x-1), (float)y, LOWERZCOORD, UPPERZCOORD, dir4_east, TEX_PLATE+1); - - if( x >= vx ) - R_Draw_Wall((float)(x+1), (float)y, LOWERZCOORD, UPPERZCOORD, dir4_west, TEX_PLATE+1); - - if( y <= vy && lvl->tilemap[ x ][ y - 1 ] & WALL_TILE ) - R_Draw_Wall( (float)x, (float)(y-1), LOWERZCOORD, UPPERZCOORD, dir4_north, lvl->wall_tex_y[x][y-1]); - - if( y >= vy && lvl->tilemap[ x ][ y + 1 ] & WALL_TILE ) - R_Draw_Wall( (float)x, (float)(y+1), LOWERZCOORD, UPPERZCOORD, dir4_south, lvl->wall_tex_y[x][y+1]); - } - } - else - { - /* Push-Wall */ - if( (r_world->tilemap[ x ][ y ] & PUSHWALL_TILE) ) - { - float dx, dy; - - dx = PWall.dx * PWall.PWpointsmoved / 128.0f; - dy = PWall.dy * PWall.PWpointsmoved / 128.0f; - - if( PWall.x <= vx ) - R_Draw_Wall( (float)PWall.x + dx, (float)PWall.y + dy, LOWERZCOORD, UPPERZCOORD, dir4_east, PWall.tex_x ); - - if( PWall.x >= vx ) - R_Draw_Wall( (float)PWall.x + dx, (float)PWall.y + dy, LOWERZCOORD, UPPERZCOORD, dir4_west, PWall.tex_x ); - - if( PWall.y <= vy ) - R_Draw_Wall( (float)PWall.x + dx, (float)PWall.y + dy, LOWERZCOORD, UPPERZCOORD, dir4_north, PWall.tex_y ); - - if( PWall.y >= vy ) - R_Draw_Wall( (float)PWall.x + dx, (float)PWall.y + dy, LOWERZCOORD, UPPERZCOORD, dir4_south, PWall.tex_y ); - - } - /* x-wall */ - if( x <= vx && r_world->tilemap[ x - 1 ][ y ] & WALL_TILE ) - R_Draw_Wall( (float)(x-1), (float)y, LOWERZCOORD, UPPERZCOORD, dir4_east, r_world->wall_tex_x[x-1][y]); - - if( x >= vx && r_world->tilemap[ x + 1 ][ y ] & WALL_TILE ) - R_Draw_Wall( (float)(x+1), (float)y, LOWERZCOORD, UPPERZCOORD, dir4_west, r_world->wall_tex_x[x+1][y]); - - /* y-wall */ - if( y <= vy && r_world->tilemap[ x ][ y - 1 ] & WALL_TILE ) - R_Draw_Wall( (float)x, (float)(y-1), LOWERZCOORD, UPPERZCOORD, dir4_north, r_world->wall_tex_y[x][y-1]); - - if( y >= vy && r_world->tilemap[ x ][ y + 1 ] & WALL_TILE ) - R_Draw_Wall( (float)x, (float)(y+1), LOWERZCOORD, UPPERZCOORD, dir4_south, r_world->wall_tex_y[x][y+1]); - } - - - } -} - - -int x_tile_step[ 4 ] = { 1, -1, -1, 1 }; -int y_tile_step[ 4 ] = { 1, 1, -1, -1 }; - - -/* ------------------------------------------------------------------------------ - Function: R_TraceCheck() -Trace ray check. - - Parameters: - lvl -[in] Pointer to valid LevelData_t structure. - x, y -[in] In tiles. - - Returns: true to stop tracing, false otherwise. - - Notes: Tells ray casting if we hit a wall or door and to stop tracing. - ------------------------------------------------------------------------------ -*/ -PRIVATE _boolean R_TraceCheck( LevelData_t *lvl, int x, int y, int frac, int dfrac, _boolean vert, _boolean flip, r_trace_t *trace ) -{ - if( lvl->tilemap[ x ][ y ] & WALL_TILE ) - { - if( vert ) - { - trace->x = (x << TILESHIFT) + (flip ? TILEGLOBAL : 0); - trace->y = (y << TILESHIFT) + frac; - trace->flags |= TRACE_HIT_VERT; - } - else - { - trace->x = (x << TILESHIFT) + frac; - trace->y = (y << TILESHIFT) + (flip ? TILEGLOBAL : 0); - trace->flags &= ~TRACE_HIT_VERT; - } - - return true; // wall, stop tracing - } - - if( trace->tile_vis ) - { - trace->tile_vis[ x ][ y ] = true; // this tile is visible - } - - - if( lvl->tilemap[ x ][ y ] & DOOR_TILE && - lvl->Doors.DoorMap[ x ][ y ].action != dr_open ) - { - frac += dfrac >> 1; - if( POS2TILE( frac ) ) - return false; - - if( vert ) - { - if( lvl->Doors.DoorMap[ x ][ y ].action != dr_closed && - (frac >> 10) > DOOR_FULLOPEN - Door_Opened( &lvl->Doors, x, y ) ) - { - return false; // opened enough - } - - trace->x = TILE2POS( x ); - trace->y = (y << TILESHIFT) + frac; - trace->flags |= TRACE_HIT_VERT; - } - else - { - if( lvl->Doors.DoorMap[ x ][ y ].action != dr_closed && - (frac >> 10) < Door_Opened( &lvl->Doors, x, y ) ) - { - return false; // opened enough - } - - trace->y = TILE2POS( y ); - trace->x = (x << TILESHIFT) + frac; - trace->flags &= ~TRACE_HIT_VERT; - } - trace->flags |= TRACE_HIT_DOOR; - - return true; // closed door, stop tracing - } - - return false; // no intersection, go on! -} - -/* ------------------------------------------------------------------------------ - Function: R_Trace() -Trace ray. - - Parameters: - trace -[in] Pointer to valid r_trace_t structure. - lvl -[in] Pointer to valid LevelData_t structure. - - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_Trace( r_trace_t *trace, LevelData_t *lvl ) -{ - int xtilestep, ytilestep; - int xstep, ystep; - int xtile, ytile; - int xintercept, yintercept; - int YmapPos, XmapPos; - quadrant q; - -// Setup for ray casting - q = GetQuadrant( FINE2RAD( trace->a ) ); - - xtilestep = x_tile_step[ q ]; - ytilestep = y_tile_step[ q ]; - - xtile = POS2TILE( trace->x ) + xtilestep; - ytile = POS2TILE( trace->y ) + ytilestep; - - xstep = ytilestep * XnextTable[ trace->a ]; - ystep = xtilestep * YnextTable[ trace->a ]; - - xintercept = (int)( ( ((ytilestep == -1 ? ytile+1 : ytile) << TILESHIFT) - trace->y ) / TanTable[ trace->a ]) + trace->x; - yintercept = (int)( ( ((xtilestep == -1 ? xtile+1 : xtile) << TILESHIFT) - trace->x ) * TanTable[ trace->a ]) + trace->y; - - YmapPos = yintercept >> TILESHIFT; // toXray - XmapPos = xintercept >> TILESHIFT; // toYray - - if( trace->tile_vis ) - { - // this tile is visible - trace->tile_vis[ POS2TILE( trace->x ) ][ POS2TILE( trace->y ) ] = true; - } - -// -// Start of ray-casting -// - while( 1 ) - { -// -// Vertical loop // an anologue for X-Ray -// - while( ! (ytilestep == -1 && YmapPos <= ytile) && ! (ytilestep == 1 && YmapPos >= ytile) ) - { - if( xtile < 0 || xtile >= 64 || YmapPos < 0 || YmapPos >= 64 ) - { - return; - } - - if( R_TraceCheck( lvl, xtile, YmapPos, yintercept % TILEGLOBAL, ystep, true, (_boolean)(xtilestep == -1), trace ) ) - { - return; - } - - // prepare for next step - xtile += xtilestep; - yintercept += ystep; - YmapPos = yintercept >> TILESHIFT; - } - -// -// Horizontal loop // an anologue for Y-Ray -// - while( ! (xtilestep == -1 && XmapPos <= xtile) && ! (xtilestep == 1 && XmapPos >= xtile) ) - { - if( ytile < 0 || ytile >= 64 || XmapPos < 0 || XmapPos >= 64 ) - { - return; - } - - if( R_TraceCheck( lvl, XmapPos, ytile, xintercept % TILEGLOBAL, xstep, false, (_boolean)(ytilestep == -1), trace ) ) - { - return; - } - - // prepare for next step - ytile += ytilestep; - xintercept += xstep; - XmapPos = xintercept >> TILESHIFT; - } - - } // end of while( 1 ) - -} diff --git a/wolf3d/newCode/wolf/wolf_raycast.h b/wolf3d/newCode/wolf/wolf_raycast.h deleted file mode 100644 index 8a74c7a..0000000 --- a/wolf3d/newCode/wolf/wolf_raycast.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_raycast.h: Wolfenstein3-D ray-casting. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - */ - -/* - Notes: - This module is implemented by wolf_raycast.c - -*/ - -#ifndef __WOLF_RAYCAST_H__ -#define __WOLF_RAYCAST_H__ - -// marks -#define TRACE_MARK_MAP 1 // marks traced area in 'AM_AutoMap.vis' array -// obstacle levels -#define TRACE_SIGHT 2 // player sight -#define TRACE_SIGHT_AI 4 // enemy sight -#define TRACE_BULLET 8 // bullet -#define TRACE_OBJECT 16 // object - -#define TRACE_HIT_VERT 32 // vertical wall was hit -#define TRACE_HIT_DOOR 64 // door was hit -#define TRACE_HIT_PWALL 128 // pushwall was hit - -typedef struct r_trace_s -{ - int x, y; // origin - int a; // trace angle - int flags; - W8 (*tile_vis)[ 64 ]; // should point to [ 64 ][ 64 ] array - -} r_trace_t; - -#define UPPERZCOORD 0.6f -#define LOWERZCOORD -0.6f - -extern W8 tile_visible[ 64 ][ 64 ]; // can player see this tile? - - -extern void R_RayCast( placeonplane_t viewport, LevelData_t *lvl ); -extern void R_Trace( r_trace_t *trace, LevelData_t *lvl ); - - -#endif /* __WOLF_RAYCAST_H__ */ diff --git a/wolf3d/newCode/wolf/wolf_renderer.c b/wolf3d/newCode/wolf/wolf_renderer.c deleted file mode 100644 index cf11bad..0000000 --- a/wolf3d/newCode/wolf/wolf_renderer.c +++ /dev/null @@ -1,96 +0,0 @@ -/* - - Copyright (C) 2004-2005 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_renderer.c: Wolfenstein 3-D renderer. - * - * Author: Michael Liebscher - * - * Acknowledgement: - * Portion of this code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -#include "../wolfiphone.h" - -LevelData_t *r_world; - - -/* ------------------------------------------------------------------------------ - Function: R_BeginRegistration -Start the rendering registration sequence. - - Parameters: map -[in] The name of the map to load. - - Returns: Nothing. - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void R_BeginRegistration( const char *map ) -{ - char fullname[ MAX_GAMEPATH ]; - - if( ! map || ! *map ) - { - return; - } - - ++texture_registration_sequence; - - - my_snprintf( fullname, sizeof( fullname ), "maps/%s.map", map ); - -// Door_ResetDoors( &r_world->Doors ); - Powerup_Reset(); - Sprite_Reset(); - Areas_InitAreas( Player.areanumber ); - PushWall_Reset(); - - memset( &levelstate, 0, sizeof( levelstate ) ); // Reset gamestate - ResetGuards(); - - r_world = Level_LoadMap( fullname ); - - if( r_world == NULL ) - { - Com_Printf( "Could not load map (%s)\n", map ); - return; - } - - levelstate.floornum = floornumber; - - if( g_version->value == SPEAROFDESTINY ) - { - if( strlen( map ) >= 2 ) - { - levelstate.floornum = atoi( map+1 ); - - if( levelstate.floornum == 20 ) - { - levelstate.floornum = 17; - } - } - } - -} diff --git a/wolf3d/newCode/wolf/wolf_renderer.h b/wolf3d/newCode/wolf/wolf_renderer.h deleted file mode 100644 index 689145e..0000000 --- a/wolf3d/newCode/wolf/wolf_renderer.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 1997-2001 Id Software, 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 - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_renderer.h: Wolfenstein3-D renderer. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from Quake II, and was originally - * written by Id Software, Inc. - * - */ - -/* - Notes: - This module is implemented by wolf_renderer.c and wolf_opengl.c - -*/ - -#ifndef __WOLF_RENDERER_H__ -#define __WOLF_RENDERER_H__ - -extern void R_SetGL3D( placeonplane_t viewport ); - -extern void R_DrawBox( int x, int y, int w, int h, W32 color ); - -extern void R_Draw_Door( int x, int y, float z1, float z2, _boolean vertical, _boolean backside, int tex, int amount ); -extern void R_Draw_Wall( float x, float y, float z1, float z2, int type, int tex ); - - - -extern void R_DrawSprites( void ); - -extern void R_DrawPsyched( W32 percent ); - -extern void R_DrawHUD( void ); -extern void R_DrawNumber( int x, int y, int number ); -extern void R_DrawWeapon( void ); - - -extern void R_put_line( int x, int y, const char *string ); - - -#endif /* __WOLF_RENDERER_H__ */ diff --git a/wolf3d/newCode/wolf/wolf_sprites.c b/wolf3d/newCode/wolf/wolf_sprites.c deleted file mode 100644 index 4313f3e..0000000 --- a/wolf3d/newCode/wolf/wolf_sprites.c +++ /dev/null @@ -1,291 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_sprites.c: Wolfenstein3-D sprite handling. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * This code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - */ - -#include "../wolfiphone.h" - - -// nobody should see this array! -sprite_t Spr_Sprites[ MAX_SPRITES ]; -W32 n_of_sprt; - - - -/* ------------------------------------------------------------------------------ - Function: Sprite_Reset -Reset sprite status. - - Parameters: Nothing. - - Returns: Nothing. - - Notes: Called only when client must reconnect will not set remove flag! ------------------------------------------------------------------------------ -*/ -PUBLIC void Sprite_Reset( void ) -{ - n_of_sprt = 0; - memset( Spr_Sprites, 0, sizeof( Spr_Sprites ) ); -} - -/* ------------------------------------------------------------------------------ - Function: Sprite_RemoveSprite -Remove sprite. - - Parameters: sprite_id -[in] sprite id to remove. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void Sprite_RemoveSprite( int sprite_id ) -{ - if( sprite_id == -1 ) - { - return; - } - - Spr_Sprites[ sprite_id ].flags |= SPRT_REMOVE; -} - - -/* ------------------------------------------------------------------------------ - Function: Sprite_GetNewSprite -Get sprite index. - - Parameters: Nothing. - - Returns: "sprite id" index. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC int Sprite_GetNewSprite( void ) -{ - W32 n; - sprite_t* sprt; - - for( n = 0, sprt = Spr_Sprites ; n < n_of_sprt ; ++n, ++sprt ) - { - if( sprt->flags & SPRT_REMOVE ) - { // free spot: clear it first - memset( sprt, 0, sizeof( sprite_t ) ); - return n; - } - } - - if( n_of_sprt >= MAX_SPRITES ) - { - Com_Printf( "Warning n_of_sprt == MAX_SPRITES\n" ); - return -1; - } - - return n_of_sprt++; -} - - - -/* ------------------------------------------------------------------------------ - Function: Sprite_SetPos -Set sprite position. - - Parameters: sprite_id -[in] sprite id to change. - x, y -[in] new x, y. - angle -[in] new angle to set. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void Sprite_SetPos( int sprite_id, int x, int y, int angle ) -{ - if( sprite_id == -1 ) - { - return; - } - - Spr_Sprites[ sprite_id ].x = x; - Spr_Sprites[ sprite_id ].y = y; - Spr_Sprites[ sprite_id ].ang = angle; - Spr_Sprites[ sprite_id ].tilex = POS2TILE( x ); - Spr_Sprites[ sprite_id ].tiley = POS2TILE( y ); - Spr_Sprites[ sprite_id ].flags |= SPRT_CHG_POS; - - if( ! (x & HALFTILE) ) // (x%TILEGLOBAL>=HALFTILE) - { - Spr_Sprites[ sprite_id ].tilex--; - } - - if( ! (y & HALFTILE) ) - { - Spr_Sprites[ sprite_id ].tiley--; - } -} - -/* ------------------------------------------------------------------------------ - Function: Sprite_SetTex -Set sprite texture. - - Parameters: sprite_id -[in] sprite id to change. - index -[in] texture index. - tex -[in] texture to set as. - - Returns: Nothing. - - Notes: ------------------------------------------------------------------------------ -*/ -PUBLIC void Sprite_SetTex( int sprite_id, int index, int tex ) -{ - if( sprite_id == -1 ) - { - return; - } - - if( index == -1 ) // one texture for each phase - { - Spr_Sprites[ sprite_id ].tex[ 0 ] = tex; - Spr_Sprites[ sprite_id ].flags |= SPRT_ONE_TEX; - } - else - { - Spr_Sprites[ sprite_id ].tex[ index ] = tex; - } - - Spr_Sprites[ sprite_id ].flags |= SPRT_CHG_TEX; -} - - -#define MAXVISABLE 128 -visobj_t vislist[ MAXVISABLE ]; - - -/* ------------------------------------------------------------------------------ - Function: Sprite_CreateVisList -Compare function for vislist sorting. - - Parameters: vis1, vis2 -[in] Two values to compare. - - Returns: - <0 elem1 further than elem2 - 0 elem1 equal distance to elem2 - >0 elem1 closer than elem2 - - Notes: ------------------------------------------------------------------------------ -*/ -PRIVATE int Sprite_cmpVis( const void *elem1, const void *elem2 ) -{ - // macro to get distance from a void pointer to visobj_t - #define vis_dist( vis ) ( ((visobj_t *)vis)->dist ) - - if( vis_dist( elem1 ) == vis_dist( elem2 ) ) - { - return 0; // process equal distance - } - else - { - // if dist > sprite must be first - return vis_dist( elem1 ) < vis_dist( elem2 ) ? 1 : -1; - } -} - - -/* ------------------------------------------------------------------------------ - Function: Sprite_CreateVisList -Build and sort visibility list of sprites. - - Parameters: Nothing. - - Returns: Number of visible sprites. - - Notes: - List is sorted from far to near. - List is based on tile visibility array, made by raycaster. - Called only by client. ------------------------------------------------------------------------------ -*/ -PUBLIC int Sprite_CreateVisList( void ) -{ - W32 tx, ty, n, num_visible; - visobj_t *visptr; - sprite_t* sprt; - - visptr = vislist; - num_visible = 0; - - for( n = 0, sprt = Spr_Sprites; n < n_of_sprt; ++n, ++sprt ) - { - if( sprt->flags & SPRT_REMOVE ) - { - continue; - } - - tx = sprt->tilex; - ty = sprt->tiley; - - if( tx > 63 ) - tx = 63; - if( ty > 63 ) - ty = 63; - - // can be in any of 4 surrounding tiles; not 9 - see definition of tilex & tiley - if( tile_visible[ tx ][ ty ] || tile_visible[ tx + 1 ][ ty ] || - tile_visible[ tx ][ ty + 1 ] || tile_visible[ tx + 1 ][ ty + 1 ] ) - { // player spoted it - visptr->dist = LineLen2Point( sprt->x - Player.position.origin[ 0 ], - sprt->y-Player.position.origin[ 1 ], - Player.position.angle ); //FIXME viewport - visptr->x = sprt->x; - visptr->y = sprt->y; - visptr->ang = sprt->ang; - visptr->tex = sprt->tex[ 0 ]; //FIXME! - if( ++num_visible > MAXVISABLE ) - { - break; // vislist full - } - - visptr++; - } - } - -// sorting list - if( num_visible ) // do not sort if no entries - { - qsort( vislist, num_visible, sizeof( visobj_t ), Sprite_cmpVis ); - } - - return num_visible; -} - diff --git a/wolf3d/newCode/wolf/wolf_sprites.h b/wolf3d/newCode/wolf/wolf_sprites.h deleted file mode 100644 index 2e81a13..0000000 --- a/wolf3d/newCode/wolf/wolf_sprites.h +++ /dev/null @@ -1,430 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/* - * wolf_sprites.h: Wolfenstein3-D sprite handling. - * - * Author: Michael Liebscher - * Date: 2004 - * - * Acknowledgement: - * Portion of this code was derived from NewWolf, and was originally - * written by DarkOne the Hacker. - * - * Portion of this code was derived from Wolfenstein3-D, and was originally - * written by Id Software, Inc. - * - */ - -/* - Notes: - This module is implemented by wolf_sprites.c - -*/ - -#ifndef __WOLF_SPRITES_H__ -#define __WOLF_SPRITES_H__ - - -// -// sprite constants -// - -enum { - SPR_DEMO, - SPR_DEATHCAM, -// -// static sprites -// - SPR_STAT_0, SPR_STAT_1,SPR_STAT_2, SPR_STAT_3, - SPR_STAT_4, SPR_STAT_5,SPR_STAT_6, SPR_STAT_7, - - SPR_STAT_8, SPR_STAT_9,SPR_STAT_10,SPR_STAT_11, - SPR_STAT_12,SPR_STAT_13,SPR_STAT_14,SPR_STAT_15, - - SPR_STAT_16,SPR_STAT_17,SPR_STAT_18,SPR_STAT_19, - SPR_STAT_20,SPR_STAT_21,SPR_STAT_22,SPR_STAT_23, - - SPR_STAT_24,SPR_STAT_25,SPR_STAT_26,SPR_STAT_27, - SPR_STAT_28,SPR_STAT_29,SPR_STAT_30,SPR_STAT_31, - - SPR_STAT_32,SPR_STAT_33,SPR_STAT_34,SPR_STAT_35, - SPR_STAT_36,SPR_STAT_37,SPR_STAT_38,SPR_STAT_39, - - SPR_STAT_40,SPR_STAT_41,SPR_STAT_42,SPR_STAT_43, - SPR_STAT_44,SPR_STAT_45,SPR_STAT_46,SPR_STAT_47, - - - - - SPR_STAT_48,SPR_STAT_49,SPR_STAT_50,SPR_STAT_51, - - - - - -// -// Guard -// - SPR_GRD_S_1,SPR_GRD_S_2,SPR_GRD_S_3,SPR_GRD_S_4, - SPR_GRD_S_5,SPR_GRD_S_6,SPR_GRD_S_7,SPR_GRD_S_8, - - SPR_GRD_W1_1,SPR_GRD_W1_2,SPR_GRD_W1_3,SPR_GRD_W1_4, - SPR_GRD_W1_5,SPR_GRD_W1_6,SPR_GRD_W1_7,SPR_GRD_W1_8, - - SPR_GRD_W2_1,SPR_GRD_W2_2,SPR_GRD_W2_3,SPR_GRD_W2_4, - SPR_GRD_W2_5,SPR_GRD_W2_6,SPR_GRD_W2_7,SPR_GRD_W2_8, - - SPR_GRD_W3_1,SPR_GRD_W3_2,SPR_GRD_W3_3,SPR_GRD_W3_4, - SPR_GRD_W3_5,SPR_GRD_W3_6,SPR_GRD_W3_7,SPR_GRD_W3_8, - - SPR_GRD_W4_1,SPR_GRD_W4_2,SPR_GRD_W4_3,SPR_GRD_W4_4, - SPR_GRD_W4_5,SPR_GRD_W4_6,SPR_GRD_W4_7,SPR_GRD_W4_8, - - SPR_GRD_PAIN_1,SPR_GRD_DIE_1,SPR_GRD_DIE_2,SPR_GRD_DIE_3, - SPR_GRD_PAIN_2,SPR_GRD_DEAD, - - SPR_GRD_SHOOT1,SPR_GRD_SHOOT2,SPR_GRD_SHOOT3, - -// -// Dog -// - SPR_DOG_W1_1,SPR_DOG_W1_2,SPR_DOG_W1_3,SPR_DOG_W1_4, - SPR_DOG_W1_5,SPR_DOG_W1_6,SPR_DOG_W1_7,SPR_DOG_W1_8, - - SPR_DOG_W2_1,SPR_DOG_W2_2,SPR_DOG_W2_3,SPR_DOG_W2_4, - SPR_DOG_W2_5,SPR_DOG_W2_6,SPR_DOG_W2_7,SPR_DOG_W2_8, - - SPR_DOG_W3_1,SPR_DOG_W3_2,SPR_DOG_W3_3,SPR_DOG_W3_4, - SPR_DOG_W3_5,SPR_DOG_W3_6,SPR_DOG_W3_7,SPR_DOG_W3_8, - - SPR_DOG_W4_1,SPR_DOG_W4_2,SPR_DOG_W4_3,SPR_DOG_W4_4, - SPR_DOG_W4_5,SPR_DOG_W4_6,SPR_DOG_W4_7,SPR_DOG_W4_8, - - SPR_DOG_DIE_1,SPR_DOG_DIE_2,SPR_DOG_DIE_3,SPR_DOG_DEAD, - SPR_DOG_JUMP1,SPR_DOG_JUMP2,SPR_DOG_JUMP3, - - - -// -// SS -// - SPR_SS_S_1,SPR_SS_S_2,SPR_SS_S_3,SPR_SS_S_4, - SPR_SS_S_5,SPR_SS_S_6,SPR_SS_S_7,SPR_SS_S_8, - - SPR_SS_W1_1,SPR_SS_W1_2,SPR_SS_W1_3,SPR_SS_W1_4, - SPR_SS_W1_5,SPR_SS_W1_6,SPR_SS_W1_7,SPR_SS_W1_8, - - SPR_SS_W2_1,SPR_SS_W2_2,SPR_SS_W2_3,SPR_SS_W2_4, - SPR_SS_W2_5,SPR_SS_W2_6,SPR_SS_W2_7,SPR_SS_W2_8, - - SPR_SS_W3_1,SPR_SS_W3_2,SPR_SS_W3_3,SPR_SS_W3_4, - SPR_SS_W3_5,SPR_SS_W3_6,SPR_SS_W3_7,SPR_SS_W3_8, - - SPR_SS_W4_1,SPR_SS_W4_2,SPR_SS_W4_3,SPR_SS_W4_4, - SPR_SS_W4_5,SPR_SS_W4_6,SPR_SS_W4_7,SPR_SS_W4_8, - - SPR_SS_PAIN_1,SPR_SS_DIE_1,SPR_SS_DIE_2,SPR_SS_DIE_3, - SPR_SS_PAIN_2,SPR_SS_DEAD, - - SPR_SS_SHOOT1,SPR_SS_SHOOT2,SPR_SS_SHOOT3, - -// -// Mutant -// - SPR_MUT_S_1,SPR_MUT_S_2,SPR_MUT_S_3,SPR_MUT_S_4, - SPR_MUT_S_5,SPR_MUT_S_6,SPR_MUT_S_7,SPR_MUT_S_8, - - SPR_MUT_W1_1,SPR_MUT_W1_2,SPR_MUT_W1_3,SPR_MUT_W1_4, - SPR_MUT_W1_5,SPR_MUT_W1_6,SPR_MUT_W1_7,SPR_MUT_W1_8, - - SPR_MUT_W2_1,SPR_MUT_W2_2,SPR_MUT_W2_3,SPR_MUT_W2_4, - SPR_MUT_W2_5,SPR_MUT_W2_6,SPR_MUT_W2_7,SPR_MUT_W2_8, - - SPR_MUT_W3_1,SPR_MUT_W3_2,SPR_MUT_W3_3,SPR_MUT_W3_4, - SPR_MUT_W3_5,SPR_MUT_W3_6,SPR_MUT_W3_7,SPR_MUT_W3_8, - - SPR_MUT_W4_1,SPR_MUT_W4_2,SPR_MUT_W4_3,SPR_MUT_W4_4, - SPR_MUT_W4_5,SPR_MUT_W4_6,SPR_MUT_W4_7,SPR_MUT_W4_8, - - SPR_MUT_PAIN_1,SPR_MUT_DIE_1,SPR_MUT_DIE_2,SPR_MUT_DIE_3, - SPR_MUT_PAIN_2,SPR_MUT_DIE_4,SPR_MUT_DEAD, - - SPR_MUT_SHOOT1,SPR_MUT_SHOOT2,SPR_MUT_SHOOT3,SPR_MUT_SHOOT4, - -// -// Officer -// - SPR_OFC_S_1,SPR_OFC_S_2,SPR_OFC_S_3,SPR_OFC_S_4, - SPR_OFC_S_5,SPR_OFC_S_6,SPR_OFC_S_7,SPR_OFC_S_8, - - SPR_OFC_W1_1,SPR_OFC_W1_2,SPR_OFC_W1_3,SPR_OFC_W1_4, - SPR_OFC_W1_5,SPR_OFC_W1_6,SPR_OFC_W1_7,SPR_OFC_W1_8, - - SPR_OFC_W2_1,SPR_OFC_W2_2,SPR_OFC_W2_3,SPR_OFC_W2_4, - SPR_OFC_W2_5,SPR_OFC_W2_6,SPR_OFC_W2_7,SPR_OFC_W2_8, - - SPR_OFC_W3_1,SPR_OFC_W3_2,SPR_OFC_W3_3,SPR_OFC_W3_4, - SPR_OFC_W3_5,SPR_OFC_W3_6,SPR_OFC_W3_7,SPR_OFC_W3_8, - - SPR_OFC_W4_1,SPR_OFC_W4_2,SPR_OFC_W4_3,SPR_OFC_W4_4, - SPR_OFC_W4_5,SPR_OFC_W4_6,SPR_OFC_W4_7,SPR_OFC_W4_8, - - SPR_OFC_PAIN_1,SPR_OFC_DIE_1,SPR_OFC_DIE_2,SPR_OFC_DIE_3, - SPR_OFC_PAIN_2,SPR_OFC_DIE_4,SPR_OFC_DEAD, - - SPR_OFC_SHOOT1,SPR_OFC_SHOOT2,SPR_OFC_SHOOT3, - - - -// -// Ghosts -// - SPR_BLINKY_W1,SPR_BLINKY_W2,SPR_PINKY_W1,SPR_PINKY_W2, - SPR_CLYDE_W1,SPR_CLYDE_W2,SPR_INKY_W1,SPR_INKY_W2, - -// -// Hans -// - SPR_BOSS_W1,SPR_BOSS_W2,SPR_BOSS_W3,SPR_BOSS_W4, - SPR_BOSS_SHOOT1,SPR_BOSS_SHOOT2,SPR_BOSS_SHOOT3,SPR_BOSS_DEAD, - - SPR_BOSS_DIE1,SPR_BOSS_DIE2,SPR_BOSS_DIE3, - -// -// Schabbs -// - SPR_SCHABB_W1,SPR_SCHABB_W2,SPR_SCHABB_W3,SPR_SCHABB_W4, - SPR_SCHABB_SHOOT1,SPR_SCHABB_SHOOT2, - - SPR_SCHABB_DIE1,SPR_SCHABB_DIE2,SPR_SCHABB_DIE3,SPR_SCHABB_DEAD, - SPR_HYPO1,SPR_HYPO2,SPR_HYPO3,SPR_HYPO4, - -// -// Fake -// - SPR_FAKE_W1,SPR_FAKE_W2,SPR_FAKE_W3,SPR_FAKE_W4, - SPR_FAKE_SHOOT,SPR_FIRE1,SPR_FIRE2, - - SPR_FAKE_DIE1,SPR_FAKE_DIE2,SPR_FAKE_DIE3,SPR_FAKE_DIE4, - SPR_FAKE_DIE5,SPR_FAKE_DEAD, - -// -// Hitler -// - SPR_MECHA_W1,SPR_MECHA_W2,SPR_MECHA_W3,SPR_MECHA_W4, - SPR_MECHA_SHOOT1,SPR_MECHA_SHOOT2,SPR_MECHA_SHOOT3,SPR_MECHA_DEAD, - - SPR_MECHA_DIE1,SPR_MECHA_DIE2,SPR_MECHA_DIE3, - - SPR_HITLER_W1,SPR_HITLER_W2,SPR_HITLER_W3,SPR_HITLER_W4, - SPR_HITLER_SHOOT1,SPR_HITLER_SHOOT2,SPR_HITLER_SHOOT3,SPR_HITLER_DEAD, - - SPR_HITLER_DIE1,SPR_HITLER_DIE2,SPR_HITLER_DIE3,SPR_HITLER_DIE4, - SPR_HITLER_DIE5,SPR_HITLER_DIE6,SPR_HITLER_DIE7, - -// -// Giftmacher -// - SPR_GIFT_W1,SPR_GIFT_W2,SPR_GIFT_W3,SPR_GIFT_W4, - SPR_GIFT_SHOOT1,SPR_GIFT_SHOOT2, - - SPR_GIFT_DIE1,SPR_GIFT_DIE2,SPR_GIFT_DIE3,SPR_GIFT_DEAD, - - -// -// Rocket, smoke and small explosion -// - SPR_ROCKET_1,SPR_ROCKET_2,SPR_ROCKET_3,SPR_ROCKET_4, - SPR_ROCKET_5,SPR_ROCKET_6,SPR_ROCKET_7,SPR_ROCKET_8, - - SPR_SMOKE_1,SPR_SMOKE_2,SPR_SMOKE_3,SPR_SMOKE_4, - SPR_BOOM_1,SPR_BOOM_2,SPR_BOOM_3, - -// -// Angel of Death's DeathSparks(tm) -// - SPR_HROCKET_1,SPR_HROCKET_2,SPR_HROCKET_3,SPR_HROCKET_4, - SPR_HROCKET_5,SPR_HROCKET_6,SPR_HROCKET_7,SPR_HROCKET_8, - - SPR_HSMOKE_1,SPR_HSMOKE_2,SPR_HSMOKE_3,SPR_HSMOKE_4, - SPR_HBOOM_1,SPR_HBOOM_2,SPR_HBOOM_3, - - SPR_SPARK1,SPR_SPARK2,SPR_SPARK3,SPR_SPARK4, - - - -// -// Gretel -// - SPR_GRETEL_W1,SPR_GRETEL_W2,SPR_GRETEL_W3,SPR_GRETEL_W4, - SPR_GRETEL_SHOOT1,SPR_GRETEL_SHOOT2,SPR_GRETEL_SHOOT3,SPR_GRETEL_DEAD, - - SPR_GRETEL_DIE1,SPR_GRETEL_DIE2,SPR_GRETEL_DIE3, - -// -// Fat Face -// - SPR_FAT_W1,SPR_FAT_W2,SPR_FAT_W3,SPR_FAT_W4, - SPR_FAT_SHOOT1,SPR_FAT_SHOOT2,SPR_FAT_SHOOT3,SPR_FAT_SHOOT4, - - SPR_FAT_DIE1,SPR_FAT_DIE2,SPR_FAT_DIE3,SPR_FAT_DEAD, - -// -// bj -// - SPR_BJ_W1,SPR_BJ_W2,SPR_BJ_W3,SPR_BJ_W4, - SPR_BJ_JUMP1,SPR_BJ_JUMP2,SPR_BJ_JUMP3,SPR_BJ_JUMP4, - - -// -// SPEAR OF DESTINY -// - -// -// Trans Grosse -// - SPR_TRANS_W1,SPR_TRANS_W2,SPR_TRANS_W3,SPR_TRANS_W4, - SPR_TRANS_SHOOT1,SPR_TRANS_SHOOT2,SPR_TRANS_SHOOT3,SPR_TRANS_DEAD, - - SPR_TRANS_DIE1,SPR_TRANS_DIE2,SPR_TRANS_DIE3, - -// -// Wilhelm -// - SPR_WILL_W1,SPR_WILL_W2,SPR_WILL_W3,SPR_WILL_W4, - SPR_WILL_SHOOT1,SPR_WILL_SHOOT2,SPR_WILL_SHOOT3,SPR_WILL_SHOOT4, - - SPR_WILL_DIE1,SPR_WILL_DIE2,SPR_WILL_DIE3,SPR_WILL_DEAD, - -// -// UberMutant -// - SPR_UBER_W1,SPR_UBER_W2,SPR_UBER_W3,SPR_UBER_W4, - SPR_UBER_SHOOT1,SPR_UBER_SHOOT2,SPR_UBER_SHOOT3,SPR_UBER_SHOOT4, - - SPR_UBER_DIE1,SPR_UBER_DIE2,SPR_UBER_DIE3,SPR_UBER_DIE4, - SPR_UBER_DEAD, - -// -// Death Knight -// - SPR_DEATH_W1,SPR_DEATH_W2,SPR_DEATH_W3,SPR_DEATH_W4, - SPR_DEATH_SHOOT1,SPR_DEATH_SHOOT2,SPR_DEATH_SHOOT3,SPR_DEATH_SHOOT4, - - SPR_DEATH_DIE1,SPR_DEATH_DIE2,SPR_DEATH_DIE3,SPR_DEATH_DIE4, - SPR_DEATH_DIE5,SPR_DEATH_DIE6,SPR_DEATH_DEAD, - -// -// Ghost -// - SPR_SPECTRE_W1,SPR_SPECTRE_W2,SPR_SPECTRE_W3,SPR_SPECTRE_W4, - SPR_SPECTRE_F1,SPR_SPECTRE_F2,SPR_SPECTRE_F3,SPR_SPECTRE_F4, - -// -// Angel of Death -// - SPR_ANGEL_W1,SPR_ANGEL_W2,SPR_ANGEL_W3,SPR_ANGEL_W4, - SPR_ANGEL_SHOOT1,SPR_ANGEL_SHOOT2,SPR_ANGEL_TIRED1,SPR_ANGEL_TIRED2, - - SPR_ANGEL_DIE1,SPR_ANGEL_DIE2,SPR_ANGEL_DIE3,SPR_ANGEL_DIE4, - SPR_ANGEL_DIE5,SPR_ANGEL_DIE6,SPR_ANGEL_DIE7,SPR_ANGEL_DEAD, - - - -// -// player attack frames -// - SPR_KNIFEREADY,SPR_KNIFEATK1,SPR_KNIFEATK2,SPR_KNIFEATK3, - SPR_KNIFEATK4, - - SPR_PISTOLREADY,SPR_PISTOLATK1,SPR_PISTOLATK2,SPR_PISTOLATK3, - SPR_PISTOLATK4, - - SPR_MACHINEGUNREADY,SPR_MACHINEGUNATK1,SPR_MACHINEGUNATK2,MACHINEGUNATK3, - SPR_MACHINEGUNATK4, - - SPR_CHAINREADY,SPR_CHAINATK1,SPR_CHAINATK2,SPR_CHAINATK3, - SPR_CHAINATK4, - -}; - - - - -#define SPRT_ONE_TEX 1 -#define SPRT_NO_ROT 2 -#define SPRT_CHG_POS 4 -#define SPRT_CHG_TEX 8 -#define SPRT_REMOVE 16 - -typedef struct sprite_s -{ - vec3_t position; - int x, y, ang; -// very clever to make it not just (x>>TILESHIFT) -// but also (x>>TILESHIFT)-1 if (x%TILEWIDTH)\n" ); - return; - } - -// Com_DPrintf( "SV_GameMap( %s )\n", Cmd_Argv( 1 ) ); - - FS_CreatePath( va( "%s/save/current/", FS_Gamedir() ) ); - - // check for clearing the current savegame - map = Cmd_Argv( 1 ); - - // start up the next map - my_strlcpy( r_mapname, Cmd_Argv( 1 ), sizeof( r_mapname ) ); - - Client_PrepRefresh( r_mapname ); -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void Map_f( void ) -{ - char *map; - char expanded[ MAX_GAMEPATH ]; - - // Check to make sure the level exists. - map = Cmd_Argv( 1 ); - if( ! strstr( map, "." ) ) - { - my_snprintf( expanded, sizeof( expanded ), "maps/%s.map", map ); - } - else - { - my_snprintf( expanded, sizeof( expanded ), "maps/%s", map ); - } - - -//sv.state = ss_dead; // don't save current level when changing -// SV_WipeSavegame( "current" ); - SV_GameMap_f(); -} - diff --git a/wolf3d/newCode/wolf/wolf_weapon.c b/wolf3d/newCode/wolf/wolf_weapon.c deleted file mode 100644 index 4953dfa..0000000 --- a/wolf3d/newCode/wolf/wolf_weapon.c +++ /dev/null @@ -1,194 +0,0 @@ -/* - - Copyright (C) 2004 Michael Liebscher - Copyright (C) 2000-2002 by DarkOne the Hacker - - 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -#include "../wolfiphone.h" - - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void fire_hit( player_t *self ) -{ - entity_t *closest; - int dist, d1, n, shot_dist, damage; - - Sound_StartSound( NULL, 0, CHAN_WEAPON, Sound_RegisterSound( "lsfx/023.wav" ), 1, ATTN_NORM, 0 ); - -// actually fire - dist = 0x7fffffff; - closest = NULL; - - for( n = 0 ; n < NumGuards ; ++n ) - { - if( Guards[ n ].flags & FL_SHOOTABLE ) // && Guards[n].flags&FL_VISABLE - { - shot_dist = Point2LineDist( Guards[ n ].x - self->position.origin[ 0 ], Guards[ n ].y - self->position.origin[ 1 ], self->position.angle ); - - if( shot_dist > (2 * TILEGLOBAL / 3) ) - { - continue; // miss - } - - d1 = LineLen2Point( Guards[ n ].x - self->position.origin[ 0 ], Guards[ n ].y - self->position.origin[ 1 ], self->position.angle ); - - if( d1 < 0 || d1 > dist ) - { - continue; - } - - if( ! Level_CheckLine( Guards[ n ].x, Guards[ n ].y, Player.position.origin[0], Player.position.origin[1], r_world ) ) - { - //if( ! CheckLine( &Guards[ n ] ) ) - continue; // obscured - } - - dist = d1; - closest = &Guards[ n ]; - } - } - - if( ! closest || dist > TILE2POS( 1 ) ) - { - return; // missed if further than 1.5 tiles - } - - damage = US_RndT() >> 4; - - A_DamageActor( closest, damage ); // hit something -} - -/* ------------------------------------------------------------------------------ - Function: - - Parameters: - - Returns: - - Notes: - ------------------------------------------------------------------------------ -*/ -PUBLIC void fire_lead( player_t *self ) -{ - entity_t *closest; - int damage; - int dx, dy, dist; - int d1, shot_dist, n; - - switch( self->weapon ) - { - case WEAPON_PISTOL: - Sound_StartSound( NULL, 0, CHAN_WEAPON, Sound_RegisterSound( "sfx/012.wav" ), 1, ATTN_NORM, 0 ); - break; - - case WEAPON_AUTO: - Sound_StartSound( NULL, 0, CHAN_WEAPON, Sound_RegisterSound( "sfx/011.wav" ), 1, ATTN_NORM, 0 ); - break; - - case WEAPON_CHAIN: - Sound_StartSound( NULL, 0, CHAN_WEAPON, Sound_RegisterSound( "sfx/013.wav" ), 1, ATTN_NORM, 0 ); - break; - } - self->madenoise = true; - - dist = 0x7fffffffl; - closest = NULL; - - for( n = 0 ; n < NumGuards; ++n ) - { - if( Guards[ n ].flags & FL_SHOOTABLE ) // && Guards[n].flags&FL_VISABLE - { - shot_dist = Point2LineDist( Guards[ n ].x - self->position.origin[ 0 ], Guards[ n ].y - self->position.origin[ 1 ], self->position.angle ); - if( shot_dist > (2 * TILEGLOBAL / 3) ) - { - continue; // miss - } - - d1 = LineLen2Point( Guards[ n ].x - self->position.origin[ 0 ], Guards[ n ].y - self->position.origin[ 1 ], self->position.angle ); - if( d1 < 0 || d1 > dist ) - { - continue; - } - - if( ! Level_CheckLine( Guards[ n ].x, Guards[ n ].y, Player.position.origin[0], Player.position.origin[1], r_world ) ) - { - //if( ! CheckLine( &Guards[ n ] ) ) - continue; // obscured - } - - dist = d1; - closest = &Guards[ n ]; - } - } - - if( ! closest ) // missed - { - r_trace_t trace; - - trace.a = NormalizeAngle( self->position.angle - DEG2FINE( 2 ) + rand() % (DEG2FINE( 4 ) ) ); - trace.x = self->position.origin[ 0 ]; - trace.y = self->position.origin[ 1 ]; - trace.flags = TRACE_BULLET; - trace.tile_vis = NULL; - R_Trace( &trace, r_world ); - - if( trace.flags & TRACE_HIT_DOOR ) - { - Sound_StartSound( NULL, 0, CHAN_AUTO, Sound_RegisterSound( "lsfx/028.wav" ), 1, ATTN_NORM, 0 ); - } - return; - } - -// hit something - dx = ABS( closest->tilex - self->tilex ); - dy = ABS( closest->tiley - self->tiley ); - dist = max_of_2( dx, dy ); - - if( dist < 2 ) - { - damage = US_RndT() / 4; - } - else if( dist < 4 ) - { - damage = US_RndT() / 6; - } - else - { - if( US_RndT() / 12 < dist ) - { - return; // missed - } - - damage = US_RndT() / 6; - } - - A_DamageActor( closest, damage ); -} diff --git a/wolf3d/newCode/wolfiphone.h b/wolf3d/newCode/wolfiphone.h deleted file mode 100644 index 935a6fb..0000000 --- a/wolf3d/newCode/wolfiphone.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * wolfiphone.h - * wolf3d - * - * Created by John Carmack on 3/13/09. - * Copyright 2009 idSoftware. All rights reserved. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include "iphone/gles_glue.h" - -#include -#include -#include -#undef ALCAPI -#define ALCAPI - -#include "Tremor/ivorbisfile.h" - -#include "env/arch.h" -#include "env/angle.h" -#include "env/matrix.h" -#include "env/vector.h" -#include "env/mymath.h" -#include "env/common_utils.h" -#include "env/cvar.h" -#include "env/zmem.h" -#include "env/mymath.h" -#include "env/cmd.h" -#include "env/num_type.h" -#include "env/filestring.h" -#include "env/filesystem.h" -#include "env/app_def.h" -#include "env/common.h" -#include "env/video.h" -#include "env/texture_manager.h" -#include "env/font_manager.h" -#include "env/renderer.h" -#include "env/opengl_local.h" -#include "env/timer.h" -#include "env/com_string.h" -#include "env/console.h" -#include "env/sound_local.h" -#include "env/sound.h" -#include "env/memory.h" -#include "env/random_number.h" -#include "env/openal_binding.h" -#include "env/glob.h" -#include "env/opengl_local.h" -#include "env/tga.h" -#include "env/wavfile.h" -#include "env/oggfile.h" - - -#include "wolf/wolf_math.h" -#include "wolf/wolf_level.h" -#include "wolf/wolf_local.h" -#include "wolf/wolf_sprites.h" -#include "wolf/wolf_actors.h" -#include "wolf/wolf_actor_ai.h" -#include "wolf/wolf_player.h" -#include "wolf/wolf_powerups.h" -#include "wolf/wolf_raycast.h" -#include "wolf/wolf_renderer.h" - -#include "iphone/iphone_wolf.h" -