├── .github └── FUNDING.yml ├── .gitignore ├── Quake-iOS ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-1024.png │ │ ├── Icon-120.png │ │ ├── Icon-121.png │ │ ├── Icon-152.png │ │ ├── Icon-167.png │ │ ├── Icon-180.png │ │ ├── Icon-20.png │ │ ├── Icon-29.png │ │ ├── Icon-40.png │ │ ├── Icon-41.png │ │ ├── Icon-42.png │ │ ├── Icon-58.png │ │ ├── Icon-59.png │ │ ├── Icon-60.png │ │ ├── Icon-76.png │ │ ├── Icon-80.png │ │ ├── Icon-81.png │ │ └── Icon-87.png │ ├── Contents.json │ ├── JoyStickBase.imageset │ │ ├── Contents.json │ │ ├── JoyStickBase@1x.png │ │ ├── JoyStickBase@2x.png │ │ └── JoyStickBase@3x.png │ ├── JoyStickHandle.imageset │ │ ├── Contents.json │ │ ├── JoyStickHandle@1x.png │ │ ├── JoyStickHandle@2x.png │ │ └── JoyStickHandle@3x.png │ ├── quake-box.imageset │ │ ├── Contents.json │ │ └── quake-box.jpg │ ├── quake-xp1-box.imageset │ │ ├── Contents.json │ │ └── quake-xp1-box.jpg │ ├── quake-xp2-box.imageset │ │ ├── Contents.json │ │ └── quake-xp2-box.jpg │ ├── quake_logo_background.imageset │ │ ├── Contents.json │ │ └── quake_logo_background.png │ └── quake_logo_background_2.imageset │ │ ├── Contents.json │ │ └── quake_logo_background_2.png ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── ChooseGameViewController.swift ├── CoreGraphics+Additions.swift ├── Enums.swift ├── GameControllerSetup.swift ├── GameDataDetection.swift ├── GameOptionsViewController.swift ├── GamePausedViewController.swift ├── GameViewController.swift ├── Info.plist ├── JoyStickView.swift ├── MainMenuViewController.swift ├── SelectEpisodeViewController.swift ├── SelectLevelViewController.swift ├── Settings.bundle │ ├── CommandLines.plist │ ├── Root.plist │ └── en.lproj │ │ └── All.strings ├── bridging.h ├── dpquake.ttf ├── gl_alphapolygon1textureprogram.fsh ├── gl_alphapolygon1textureprogram.vsh ├── gl_coloredpolygon1textureprogram.fsh ├── gl_coloredpolygon1textureprogram.vsh ├── gl_coloredpolygonnotextureprogram.fsh ├── gl_coloredpolygonnotextureprogram.vsh ├── gl_fillprogram.fsh ├── gl_fillprogram.vsh ├── gl_intensitypolygon1textureprogram.fsh ├── gl_intensitypolygon1textureprogram.vsh ├── gl_noalphatextprogram.fsh ├── gl_noalphatextprogram.vsh ├── gl_polygon1textureprogram.fsh ├── gl_polygon1textureprogram.vsh ├── gl_polygon2texturesprogram.fsh ├── gl_polygon2texturesprogram.vsh ├── gl_polygonnotextureprogram.fsh ├── gl_polygonnotextureprogram.vsh ├── gl_textprogram.fsh ├── gl_textprogram.vsh ├── gl_tintedpolygon1textureprogram.fsh ├── gl_tintedpolygon1textureprogram.vsh ├── gl_vidios.c ├── in_ios.c ├── net_ios.c ├── snd_ios.c └── sys_ios.c ├── Quake.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── tomkidd.xcuserdatad │ │ └── IDEFindNavigatorScopes.plist └── xcuserdata │ ├── heribertod.xcuserdatad │ └── xcschemes │ │ ├── Quake_OSX.xcscheme │ │ ├── Quake_iOS_VR.xcscheme │ │ ├── Quake_tvOS.xcscheme │ │ └── xcschememanagement.plist │ ├── heribertodelgado.xcuserdatad │ └── xcschemes │ │ ├── QuakeEd.xcscheme │ │ ├── Quake_Asset_Generator.xcscheme │ │ ├── Quake_OSX.xcscheme │ │ ├── Quake_iOS_VR.xcscheme │ │ ├── Quake_tvOS.xcscheme │ │ └── xcschememanagement.plist │ └── tomkidd.xcuserdatad │ └── xcschemes │ ├── Quake-iOS.xcscheme │ └── xcschememanagement.plist ├── Quake ├── Tremor │ ├── CHANGELOG │ ├── COPYING │ ├── Makefile.am │ ├── README │ ├── Version_script.in │ ├── asm_arm.h │ ├── autogen.sh │ ├── backends.h │ ├── bitwise.c │ ├── block.c │ ├── block.h │ ├── codebook.c │ ├── codebook.h │ ├── codec_internal.h │ ├── config_types.h │ ├── configure.in │ ├── debian │ │ ├── Makefile.am │ │ ├── changelog │ │ ├── control │ │ ├── copyright │ │ ├── libvorbisidec-dev.install │ │ ├── libvorbisidec1.install │ │ └── rules │ ├── doc │ │ ├── OggVorbis_File.html │ │ ├── build.html │ │ ├── callbacks.html │ │ ├── datastructures.html │ │ ├── decoding.html │ │ ├── diff.html │ │ ├── example.html │ │ ├── fileinfo.html │ │ ├── index.html │ │ ├── initialization.html │ │ ├── ov_bitrate.html │ │ ├── ov_bitrate_instant.html │ │ ├── ov_callbacks.html │ │ ├── ov_clear.html │ │ ├── ov_comment.html │ │ ├── ov_info.html │ │ ├── ov_open.html │ │ ├── ov_open_callbacks.html │ │ ├── ov_pcm_seek.html │ │ ├── ov_pcm_seek_page.html │ │ ├── ov_pcm_tell.html │ │ ├── ov_pcm_total.html │ │ ├── ov_raw_seek.html │ │ ├── ov_raw_tell.html │ │ ├── ov_raw_total.html │ │ ├── ov_read.html │ │ ├── ov_seekable.html │ │ ├── ov_serialnumber.html │ │ ├── ov_streams.html │ │ ├── ov_test.html │ │ ├── ov_test_callbacks.html │ │ ├── ov_test_open.html │ │ ├── ov_time_seek.html │ │ ├── ov_time_seek_page.html │ │ ├── ov_time_tell.html │ │ ├── ov_time_total.html │ │ ├── overview.html │ │ ├── reference.html │ │ ├── return.html │ │ ├── seeking.html │ │ ├── style.css │ │ ├── threads.html │ │ ├── vorbis_comment.html │ │ └── vorbis_info.html │ ├── floor0.c │ ├── floor1.c │ ├── framing.c │ ├── info.c │ ├── ivorbiscodec.h │ ├── ivorbisfile.h │ ├── ivorbisfile_example.c │ ├── lsp_lookup.h │ ├── mapping0.c │ ├── mdct.c │ ├── mdct.h │ ├── mdct_lookup.h │ ├── misc.h │ ├── ogg.h │ ├── os.h │ ├── os_types.h │ ├── registry.c │ ├── registry.h │ ├── res012.c │ ├── sharedbook.c │ ├── synthesis.c │ ├── vorbisfile.c │ ├── window.c │ ├── window.h │ └── window_lookup.h ├── adivtab.h ├── anorm_dots.h ├── anorms.h ├── bgmusic.c ├── bgmusic.h ├── bspfile.h ├── cd_null.c ├── cdaudio.h ├── chase.c ├── cl_demo.c ├── cl_input.c ├── cl_main.c ├── cl_parse.c ├── cl_tent.c ├── client.h ├── cmd.c ├── cmd.h ├── common.c ├── common.h ├── console.c ├── console.h ├── crc.c ├── crc.h ├── cvar.c ├── cvar.h ├── d_edge.c ├── d_iface.h ├── d_init.c ├── d_local.h ├── d_modech.c ├── d_part.c ├── d_polyse.c ├── d_scan.c ├── d_sky.c ├── d_sprite.c ├── d_surf.c ├── d_vars.c ├── draw.c ├── draw.h ├── gl_draw.c ├── gl_mesh.c ├── gl_model.c ├── gl_model.h ├── gl_refrag.c ├── gl_rlight.c ├── gl_rmain.c ├── gl_rmisc.c ├── gl_rsurf.c ├── gl_screen.c ├── gl_warp.c ├── gl_warp_sin.h ├── glquake.h ├── host.c ├── host_cmd.c ├── input.h ├── keys.c ├── keys.h ├── mathlib.c ├── mathlib.h ├── menu.c ├── menu.h ├── model.c ├── model.h ├── modelgen.h ├── net.h ├── net_dgrm.c ├── net_dgrm.h ├── net_loop.c ├── net_loop.h ├── net_main.c ├── net_udp.c ├── net_udp.h ├── net_vcr.c ├── net_vcr.h ├── nonintel.c ├── pr_cmds.c ├── pr_comp.h ├── pr_edict.c ├── pr_exec.c ├── progdefs.h ├── progdefs.q1 ├── progs.h ├── protocol.h ├── quakedef.h ├── r_aclip.c ├── r_alias.c ├── r_bsp.c ├── r_draw.c ├── r_edge.c ├── r_efrag.c ├── r_light.c ├── r_local.h ├── r_main.c ├── r_misc.c ├── r_part.c ├── r_shared.h ├── r_sky.c ├── r_sprite.c ├── r_surf.c ├── r_vars.c ├── render.h ├── sbar.c ├── sbar.h ├── screen.c ├── screen.h ├── server.h ├── snd_codec.c ├── snd_codec.h ├── snd_codeci.h ├── snd_dma.c ├── snd_flac.c ├── snd_flac.h ├── snd_mem.c ├── snd_mikmod.c ├── snd_mikmod.h ├── snd_mix.c ├── snd_mp3.c ├── snd_mp3.h ├── snd_opus.c ├── snd_opus.h ├── snd_umx.c ├── snd_umx.h ├── snd_vorbis.c ├── snd_vorbis.h ├── snd_wave.c ├── snd_wave.h ├── snd_xmp.c ├── snd_xmp.h ├── sound.h ├── spritegn.h ├── strl_fn.h ├── strlcpy.c ├── sv_main.c ├── sv_move.c ├── sv_phys.c ├── sv_user.c ├── sys.h ├── vid.h ├── view.c ├── view.h ├── wad.c ├── wad.h ├── world.c ├── world.h ├── zone.c └── zone.h ├── QuakeTV ├── AppDelegate.swift ├── Assets.xcassets │ ├── App Icon & Top Shelf Image.brandassets │ │ ├── App Icon - App Store.imagestack │ │ │ ├── Back.imagestacklayer │ │ │ │ ├── Content.imageset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ ├── Front.imagestacklayer │ │ │ │ ├── Content.imageset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ └── Middle.imagestacklayer │ │ │ │ ├── Content.imageset │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ ├── App Icon.imagestack │ │ │ ├── Back.imagestacklayer │ │ │ │ ├── Content.imageset │ │ │ │ │ ├── Contents.json │ │ │ │ │ └── quake_tv_back.png │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ ├── Front.imagestacklayer │ │ │ │ ├── Content.imageset │ │ │ │ │ ├── Contents.json │ │ │ │ │ └── quake_tv_front.png │ │ │ │ └── Contents.json │ │ │ └── Middle.imagestacklayer │ │ │ │ ├── Content.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── quake_tv_middle.png │ │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── Top Shelf Image Wide.imageset │ │ │ └── Contents.json │ │ └── Top Shelf Image.imageset │ │ │ ├── Contents.json │ │ │ └── quake_banner.png │ ├── Contents.json │ ├── LaunchImage.launchimage │ │ ├── Contents.json │ │ └── quake_tv_launch.png │ ├── quake-box.imageset │ │ ├── Contents.json │ │ └── quake-box.jpg │ ├── quake-xp1-box.imageset │ │ ├── Contents.json │ │ └── quake-xp1-box.jpg │ ├── quake-xp2-box.imageset │ │ ├── Contents.json │ │ └── quake-xp2-box.jpg │ ├── quake_logo_background.imageset │ │ ├── Contents.json │ │ └── quake_logo_background.png │ └── quake_logo_background_2.imageset │ │ ├── Contents.json │ │ └── quake_logo_background_2.png ├── Base.lproj │ └── Main.storyboard └── Info.plist ├── README.md ├── folders.png ├── icon_quake.png └── ss_quake.png /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: schnapple 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | # Package.resolved 41 | .build/ 42 | 43 | # CocoaPods 44 | # 45 | # We recommend against adding the Pods directory to your .gitignore. However 46 | # you should judge for yourself, the pros and cons are mentioned at: 47 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 48 | # 49 | # Pods/ 50 | # 51 | # Add this line if you want to avoid checking in source code from the Xcode workspace 52 | # *.xcworkspace 53 | 54 | # Carthage 55 | # 56 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 57 | # Carthage/Checkouts 58 | 59 | Carthage/Build 60 | 61 | # fastlane 62 | # 63 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 64 | # screenshots whenever they are needed. 65 | # For more information about the recommended setup visit: 66 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 67 | 68 | fastlane/report.xml 69 | fastlane/Preview.html 70 | fastlane/screenshots/**/*.png 71 | fastlane/test_output 72 | 73 | # Code Injection 74 | # 75 | # After new code Injection tools there's a generated folder /iOSInjectionProject 76 | # https://github.com/johnno1962/injectionforxcode 77 | 78 | iOSInjectionProject/ 79 | .DS_Store 80 | -------------------------------------------------------------------------------- /Quake-iOS/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/2/16. 6 | // 7 | // 8 | 9 | import UIKit 10 | import GameController 11 | 12 | @UIApplicationMain 13 | class AppDelegate: UIResponder, UIApplicationDelegate 14 | { 15 | var window: UIWindow? 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool 18 | { 19 | NotificationCenter.default.addObserver(self, selector: #selector(controllerDidConnect), name: NSNotification.Name(rawValue: "GCControllerDidConnectNotification"), object: nil) 20 | 21 | NotificationCenter.default.addObserver(self, selector: #selector(controllerDidDisconnect), name: NSNotification.Name(rawValue: "GCControllerDidDisconnectNotification"), object: nil) 22 | 23 | 24 | return true 25 | } 26 | 27 | func applicationWillResignActive(_ application: UIApplication) 28 | { 29 | if startGame 30 | { 31 | gameInterrupted = true 32 | 33 | if (host_initialized != qboolean(0)) 34 | { 35 | Host_Shutdown() 36 | } 37 | 38 | sys_ended = qboolean(1) 39 | } 40 | } 41 | 42 | func applicationDidEnterBackground(_ application: UIApplication) 43 | { 44 | } 45 | 46 | func applicationWillEnterForeground(_ application: UIApplication) 47 | { 48 | } 49 | 50 | func applicationDidBecomeActive(_ application: UIApplication) 51 | { 52 | } 53 | 54 | func applicationWillTerminate(_ application: UIApplication) 55 | { 56 | } 57 | 58 | @objc func controllerDidConnect(_ notification: Notification) 59 | { 60 | GameControllerSetup.connect(notification.object as! GCController?) 61 | } 62 | 63 | @objc func controllerDidDisconnect(_ notification: Notification) 64 | { 65 | GameControllerSetup.disconnect(notification.object as! GCController?) 66 | } 67 | 68 | } 69 | 70 | -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-40.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-60.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-58.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-87.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-80.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-120.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-121.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-180.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "size" : "20x20", 53 | "idiom" : "ipad", 54 | "filename" : "Icon-20.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-41.png", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "size" : "29x29", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-29.png", 67 | "scale" : "1x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-59.png", 73 | "scale" : "2x" 74 | }, 75 | { 76 | "size" : "40x40", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-42.png", 79 | "scale" : "1x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-81.png", 85 | "scale" : "2x" 86 | }, 87 | { 88 | "size" : "76x76", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-76.png", 91 | "scale" : "1x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-152.png", 97 | "scale" : "2x" 98 | }, 99 | { 100 | "size" : "83.5x83.5", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-167.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "1024x1024", 107 | "idiom" : "ios-marketing", 108 | "filename" : "Icon-1024.png", 109 | "scale" : "1x" 110 | } 111 | ], 112 | "info" : { 113 | "version" : 1, 114 | "author" : "xcode" 115 | } 116 | } -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-1024.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-120.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-121.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-121.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-152.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-167.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-180.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-20.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-29.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-40.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-41.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-42.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-58.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-59.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-59.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-60.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-80.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-81.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-81.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/AppIcon.appiconset/Icon-87.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/JoyStickBase.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "JoyStickBase@1x.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "JoyStickBase@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "JoyStickBase@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/JoyStickBase.imageset/JoyStickBase@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/JoyStickBase.imageset/JoyStickBase@1x.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/JoyStickBase.imageset/JoyStickBase@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/JoyStickBase.imageset/JoyStickBase@2x.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/JoyStickBase.imageset/JoyStickBase@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/JoyStickBase.imageset/JoyStickBase@3x.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/JoyStickHandle.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "JoyStickHandle@1x.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "JoyStickHandle@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "JoyStickHandle@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/JoyStickHandle.imageset/JoyStickHandle@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/JoyStickHandle.imageset/JoyStickHandle@1x.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/JoyStickHandle.imageset/JoyStickHandle@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/JoyStickHandle.imageset/JoyStickHandle@2x.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/JoyStickHandle.imageset/JoyStickHandle@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/JoyStickHandle.imageset/JoyStickHandle@3x.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/quake-box.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "quake-box.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/quake-box.imageset/quake-box.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/quake-box.imageset/quake-box.jpg -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/quake-xp1-box.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "quake-xp1-box.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/quake-xp1-box.imageset/quake-xp1-box.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/quake-xp1-box.imageset/quake-xp1-box.jpg -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/quake-xp2-box.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "quake-xp2-box.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/quake-xp2-box.imageset/quake-xp2-box.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/quake-xp2-box.imageset/quake-xp2-box.jpg -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/quake_logo_background.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "quake_logo_background.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/quake_logo_background.imageset/quake_logo_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/quake_logo_background.imageset/quake_logo_background.png -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/quake_logo_background_2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "quake_logo_background_2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Quake-iOS/Assets.xcassets/quake_logo_background_2.imageset/quake_logo_background_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Assets.xcassets/quake_logo_background_2.imageset/quake_logo_background_2.png -------------------------------------------------------------------------------- /Quake-iOS/ChooseGameViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChooseGameViewController.swift 3 | // Quake 4 | // 5 | // Created by Tom Kidd on 6/28/18. 6 | // 7 | 8 | import UIKit 9 | 10 | class ChooseGameViewController: UIViewController { 11 | 12 | override func viewDidLoad() { 13 | super.viewDidLoad() 14 | 15 | // Do any additional setup after loading the view. 16 | } 17 | 18 | override func viewDidAppear(_ animated: Bool) { 19 | self.navigationController?.setNavigationBarHidden(true, animated: false) 20 | } 21 | 22 | override func didReceiveMemoryWarning() { 23 | super.didReceiveMemoryWarning() 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | 28 | // MARK: - Navigation 29 | 30 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 31 | let defaults = UserDefaults() 32 | if segue.identifier == "quakeSegue" { 33 | (segue.destination as! GameOptionsViewController).selectedGame = .Quake 34 | defaults.set(QuakeGame.Quake.rawValue, forKey: "selectedGame") 35 | } else if segue.identifier == "quakeXP1Segue" { 36 | (segue.destination as! GameOptionsViewController).selectedGame = .QuakeXP1 37 | defaults.set(QuakeGame.QuakeXP1.rawValue, forKey: "selectedGame") 38 | } else if segue.identifier == "quakeXP2Segue" { 39 | (segue.destination as! GameOptionsViewController).selectedGame = .QuakeXP2 40 | defaults.set(QuakeGame.QuakeXP2.rawValue, forKey: "selectedGame") 41 | } 42 | } 43 | 44 | @IBAction func exitToChooseGameController(segue: UIStoryboardSegue) { 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /Quake-iOS/CoreGraphics+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CGVector+Additions.swift 3 | // Robotroon 4 | // 5 | // Created by Brad Howes on 11/20/16. 6 | // Copyright © 2016 Brad Howes. All rights reserved. 7 | // 8 | 9 | import CoreGraphics 10 | 11 | public extension CGRect { 12 | var mid: CGPoint { 13 | return CGPoint(x: midX, y: midY) 14 | } 15 | } 16 | 17 | public extension CGVector { 18 | 19 | static func *(lhs: CGVector, rhs: CGFloat) -> CGVector { 20 | return CGVector(dx: lhs.dx * rhs, dy: lhs.dy * rhs) 21 | } 22 | 23 | static func *(lhs: CGVector, rhs: Double) -> CGVector { 24 | return lhs * CGFloat(rhs) 25 | } 26 | 27 | var magnitude2: CGFloat { return dx * dx + dy * dy } 28 | var magnitude: CGFloat { return sqrt(magnitude2) } 29 | } 30 | 31 | public extension CGPoint { 32 | 33 | static func + (lhs: CGPoint, rhs: CGVector) -> CGPoint { 34 | return CGPoint(x: lhs.x + rhs.dx, y: lhs.y + rhs.dy) 35 | } 36 | 37 | static func + (lhs: CGPoint, rhs: CGSize) -> CGPoint { 38 | return CGPoint(x: lhs.x + rhs.width, y: lhs.y + rhs.height) 39 | } 40 | 41 | static func - (lhs: CGPoint, rhs: CGVector) -> CGPoint { 42 | return CGPoint(x: lhs.x - rhs.dx, y: lhs.y - rhs.dy) 43 | } 44 | 45 | static func - (lhs: CGPoint, rhs: CGSize) -> CGPoint { 46 | return CGPoint(x: lhs.x - rhs.width, y: lhs.y - rhs.height) 47 | } 48 | 49 | static func - (lhs: CGPoint, rhs: CGPoint) -> CGVector { 50 | return CGVector(dx: lhs.x - rhs.x, dy: lhs.y - rhs.y) 51 | } 52 | } 53 | 54 | public extension CGSize { 55 | 56 | static func + (lhs: CGSize, rhs: CGSize) -> CGSize { 57 | return CGSize(width: lhs.width + rhs.width, height: lhs.height + rhs.height) 58 | } 59 | 60 | static func * (lhs: CGSize, rhs: CGFloat) -> CGSize { 61 | return CGSize(width: lhs.width * rhs, height: lhs.height * rhs) 62 | } 63 | 64 | static func / (lhs: CGSize, rhs: CGFloat) -> CGSize { 65 | return CGSize(width: lhs.width / rhs, height: lhs.height / rhs) 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Quake-iOS/Enums.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Enums.swift 3 | // Quake-iOS 4 | // 5 | // Created by Tom Kidd on 7/2/18. 6 | // 7 | 8 | import Foundation 9 | 10 | enum QuakeGame: Int { 11 | case Quake 12 | case QuakeXP1 13 | case QuakeXP2 14 | case QuakeEp5 15 | } 16 | -------------------------------------------------------------------------------- /Quake-iOS/GameDataDetection.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GameDataDetection.swift 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 7/9/16. 6 | // 7 | // 8 | 9 | import UIKit 10 | 11 | class GameDataDetection: NSObject 12 | { 13 | static var sharewarePresent = false 14 | 15 | static var registeredPresent = false 16 | 17 | static var missionPack1Present = false 18 | 19 | static var missionPack2Present = false 20 | 21 | static func detect() 22 | { 23 | let documentsDir = Bundle.main.resourcePath! 24 | 25 | let id1pak0Attributes = try? FileManager.default.attributesOfItem(atPath: "\(documentsDir)/id1/pak0.pak") as NSDictionary 26 | let id1pak1Attributes = try? FileManager.default.attributesOfItem(atPath: "\(documentsDir)/id1/pak1.pak") as NSDictionary 27 | 28 | let hipnoticpak0Attributes = try? FileManager.default.attributesOfItem(atPath: "\(documentsDir)/hipnotic/pak0.pak") as NSDictionary 29 | 30 | let roguepak0Attributes = try? FileManager.default.attributesOfItem(atPath: "\(documentsDir)/rogue/pak0.pak") as NSDictionary 31 | 32 | sharewarePresent = false 33 | registeredPresent = false 34 | missionPack1Present = false 35 | missionPack2Present = false 36 | 37 | if id1pak0Attributes != nil && id1pak0Attributes!.fileSize() == 18689235 38 | { 39 | if id1pak1Attributes != nil && id1pak1Attributes!.fileSize() == 34257856 40 | { 41 | registeredPresent = true 42 | 43 | if hipnoticpak0Attributes != nil && hipnoticpak0Attributes!.fileSize() == 35527205 44 | { 45 | missionPack1Present = true 46 | } 47 | 48 | if roguepak0Attributes != nil && roguepak0Attributes!.fileSize() == 37875279 49 | { 50 | missionPack2Present = true 51 | } 52 | } 53 | else 54 | { 55 | sharewarePresent = true 56 | } 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Quake-iOS/GamePausedViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GamePausedViewController.swift 3 | // Quake 4 | // 5 | // Created by Tom Kidd on 7/7/18. 6 | // 7 | 8 | import UIKit 9 | 10 | class GamePausedViewController: UIViewController { 11 | 12 | #if os(iOS) 13 | @IBOutlet weak var tiltAimingSwitch: UISwitch! 14 | @IBOutlet weak var devModeSwitch: UISwitch! 15 | #endif 16 | let defaults = UserDefaults() 17 | 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | 21 | #if os(iOS) 22 | tiltAimingSwitch.isOn = defaults.integer(forKey: "tiltAiming") == 1 23 | devModeSwitch.isOn = defaults.bool(forKey: "devMode") 24 | #endif 25 | 26 | // Do any additional setup after loading the view. 27 | } 28 | 29 | override func didReceiveMemoryWarning() { 30 | super.didReceiveMemoryWarning() 31 | // Dispose of any resources that can be recreated. 32 | } 33 | 34 | @IBAction func saveGame(_ sender: UIButton) { 35 | Sys_Key_Event(140, qboolean(1)) 36 | Sys_Key_Event(140, qboolean(0)) 37 | navigationController?.popViewController(animated: true) 38 | } 39 | 40 | @IBAction func loadGame(_ sender: UIButton) { 41 | Sys_Key_Event(143, qboolean(1)) 42 | Sys_Key_Event(143, qboolean(0)) 43 | navigationController?.popViewController(animated: true) 44 | } 45 | 46 | @IBAction func exitToMainMenu(_ sender: UIButton) { 47 | // CL_Disconnect (); 48 | // Host_ShutdownServer(qboolean(0)); 49 | Host_Shutdown() 50 | navigationController?.popToRootViewController(animated: true) 51 | } 52 | 53 | #if os(iOS) 54 | @IBAction func tiltAimingToggle(_ sender: UISwitch) { 55 | defaults.set(sender.isOn ? 1 : 0, forKey: "tiltAiming") 56 | } 57 | @IBAction func devModeToggle(_ sender: UISwitch) { 58 | defaults.set(sender.isOn, forKey: "devMode") 59 | } 60 | #endif 61 | 62 | 63 | /* 64 | // MARK: - Navigation 65 | 66 | // In a storyboard-based application, you will often want to do a little preparation before navigation 67 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 68 | // Get the new view controller using segue.destinationViewController. 69 | // Pass the selected object to the new view controller. 70 | } 71 | */ 72 | 73 | } 74 | -------------------------------------------------------------------------------- /Quake-iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Quake 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSCameraUsageDescription 28 | Scan a barcode to configure Cardboard settings 29 | UIAppFonts 30 | 31 | dpquake.ttf 32 | 33 | UIFileSharingEnabled 34 | 35 | UILaunchStoryboardName 36 | LaunchScreen 37 | UIMainStoryboardFile 38 | Main 39 | UIRequiredDeviceCapabilities 40 | 41 | armv7 42 | opengles-3 43 | 44 | UIRequiresFullScreen 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationLandscapeLeft 49 | UIInterfaceOrientationLandscapeRight 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Quake-iOS/MainMenuViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MainMenuViewController.swift 3 | // Quake 4 | // 5 | // Created by Tom Kidd on 6/27/18. 6 | // 7 | 8 | import UIKit 9 | 10 | class MainMenuViewController: UIViewController { 11 | 12 | var selectedGame = QuakeGame.Quake 13 | 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | 17 | let defaults = UserDefaults() 18 | selectedGame = QuakeGame(rawValue: defaults.integer(forKey: "selectedGame"))! 19 | 20 | // Do any additional setup after loading the view. 21 | } 22 | 23 | override func didReceiveMemoryWarning() { 24 | super.didReceiveMemoryWarning() 25 | // Dispose of any resources that can be recreated. 26 | } 27 | 28 | 29 | // MARK: - Navigation 30 | 31 | // In a storyboard-based application, you will often want to do a little preparation before navigation 32 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 33 | if segue.identifier == "DemoSegue" { 34 | (segue.destination as! GameViewController).additionalCommandLine = " demos" 35 | (segue.destination as! GameViewController).demoMode = true 36 | } else if segue.identifier == "StartGameSegue" { 37 | (segue.destination as! GameViewController).additionalCommandLine = " +map start" 38 | (segue.destination as! GameViewController).selectedGame = .Quake 39 | } else if segue.identifier == "ResumeGameSegue" { 40 | (segue.destination as! GameViewController).selectedGame = selectedGame 41 | 42 | switch selectedGame { 43 | case .Quake: 44 | (segue.destination as! GameViewController).additionalCommandLine = "+map start" 45 | case .QuakeXP1: 46 | (segue.destination as! GameViewController).additionalCommandLine = "-game hipnotic -hipnotic +map start" 47 | case .QuakeXP2: 48 | (segue.destination as! GameViewController).additionalCommandLine = "-rogue +map start" 49 | default: () 50 | } 51 | 52 | (segue.destination as! GameViewController).quickLoadGame = true 53 | } 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /Quake-iOS/Settings.bundle/en.lproj/All.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/Settings.bundle/en.lproj/All.strings -------------------------------------------------------------------------------- /Quake-iOS/bridging.h: -------------------------------------------------------------------------------- 1 | // 2 | // bridging.h 3 | // Quake-iOS Bridging Header 4 | // 5 | // Created by Heriberto Delgado on 5/01/16. 6 | // 7 | // 8 | 9 | #include "quakedef.h" 10 | 11 | extern float frame_lapse; 12 | 13 | extern int gl_screenwidth; 14 | 15 | extern int gl_screenheight; 16 | 17 | extern float in_forwardmove; 18 | 19 | extern float in_sidestepmove; 20 | 21 | extern float in_rollangle; 22 | 23 | extern float in_pitchangle; 24 | 25 | extern int lanConfig_port; 26 | 27 | extern char* lanConfig_joinname; 28 | 29 | extern int sys_logmaxlines; 30 | 31 | extern qboolean sys_ended; 32 | 33 | extern qboolean sys_inerror; 34 | 35 | void Sys_Cbuf_AddText(const char* text); 36 | 37 | void Sys_Con_Printf(const char* text); 38 | 39 | void Sys_Key_Event(int key, qboolean down); 40 | 41 | void Sys_Init(const char* resourcesDir, const char* documentsDir, const char* commandLine, const char* selectedGame); 42 | 43 | void Sys_Frame(); 44 | 45 | int Sys_MessagesCount(); 46 | 47 | char* Sys_GetMessage(int i); 48 | -------------------------------------------------------------------------------- /Quake-iOS/dpquake.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/Quake-iOS/dpquake.ttf -------------------------------------------------------------------------------- /Quake-iOS/gl_alphapolygon1textureprogram.fsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_alphapolygon1textureprogram.fsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/18/16. 6 | // 7 | // 8 | 9 | uniform sampler2D texture; 10 | 11 | varying mediump vec2 texcoords_fragment; 12 | 13 | invariant gl_FragColor; 14 | 15 | void main() 16 | { 17 | mediump vec4 result = texture2D(texture, texcoords_fragment); 18 | 19 | if (result.a > 0.66) 20 | { 21 | gl_FragColor = result; 22 | } 23 | else 24 | { 25 | discard; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Quake-iOS/gl_alphapolygon1textureprogram.vsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_alphapolygon1textureprogram.vsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/18/16. 6 | // 7 | // 8 | 9 | attribute vec3 position; 10 | attribute vec2 texcoords; 11 | 12 | varying vec2 texcoords_fragment; 13 | 14 | uniform mat4 transform; 15 | 16 | invariant gl_Position; 17 | 18 | void main() 19 | { 20 | gl_Position = transform * vec4(position, 1.0); 21 | 22 | texcoords_fragment = texcoords; 23 | } 24 | -------------------------------------------------------------------------------- /Quake-iOS/gl_coloredpolygon1textureprogram.fsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_coloredpolygon1textureprogram.fsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/14/16. 6 | // 7 | // 8 | 9 | uniform sampler2D texture; 10 | 11 | varying mediump vec2 texcoords_fragment; 12 | varying mediump vec4 color_fragment; 13 | 14 | invariant gl_FragColor; 15 | 16 | void main() 17 | { 18 | gl_FragColor = color_fragment * texture2D(texture, texcoords_fragment); 19 | } 20 | -------------------------------------------------------------------------------- /Quake-iOS/gl_coloredpolygon1textureprogram.vsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_coloredpolygon1textureprogram.vsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/14/16. 6 | // 7 | // 8 | 9 | attribute vec3 position; 10 | attribute vec4 color; 11 | attribute vec2 texcoords; 12 | 13 | varying vec2 texcoords_fragment; 14 | varying vec4 color_fragment; 15 | 16 | uniform mat4 transform; 17 | 18 | invariant gl_Position; 19 | 20 | void main() 21 | { 22 | gl_Position = transform * vec4(position, 1.0); 23 | 24 | texcoords_fragment = texcoords; 25 | 26 | color_fragment = color; 27 | } 28 | -------------------------------------------------------------------------------- /Quake-iOS/gl_coloredpolygonnotextureprogram.fsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_coloredpolygonnotextureprogram.fsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/14/16. 6 | // 7 | // 8 | 9 | varying mediump vec4 color_fragment; 10 | 11 | invariant gl_FragColor; 12 | 13 | void main() 14 | { 15 | gl_FragColor = color_fragment; 16 | } 17 | -------------------------------------------------------------------------------- /Quake-iOS/gl_coloredpolygonnotextureprogram.vsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_coloredpolygonnotextureprogram.vsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/14/16. 6 | // 7 | // 8 | 9 | attribute vec4 position; 10 | attribute vec4 color; 11 | 12 | uniform mat4 transform; 13 | 14 | varying vec4 color_fragment; 15 | 16 | invariant gl_Position; 17 | 18 | void main() 19 | { 20 | color_fragment = color; 21 | 22 | gl_Position = transform * vec4(position); 23 | } 24 | -------------------------------------------------------------------------------- /Quake-iOS/gl_fillprogram.fsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_fillprogram.fsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/14/16. 6 | // 7 | // 8 | 9 | uniform mediump vec4 color; 10 | 11 | invariant gl_FragColor; 12 | 13 | void main() 14 | { 15 | gl_FragColor = color; 16 | } 17 | -------------------------------------------------------------------------------- /Quake-iOS/gl_fillprogram.vsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_fillprogram.vsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/14/16. 6 | // 7 | // 8 | 9 | attribute vec2 position; 10 | 11 | uniform mat4 transform; 12 | 13 | invariant gl_Position; 14 | 15 | void main() 16 | { 17 | gl_Position = transform * vec4(position, -4.0, 1.0); 18 | } 19 | -------------------------------------------------------------------------------- /Quake-iOS/gl_intensitypolygon1textureprogram.fsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_intensitypolygon1textureprogram.fsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/14/16. 6 | // 7 | // 8 | 9 | uniform sampler2D texture; 10 | 11 | varying mediump vec2 texcoords_fragment; 12 | varying mediump vec4 color_fragment; 13 | 14 | invariant gl_FragColor; 15 | 16 | void main() 17 | { 18 | gl_FragColor = color_fragment * texture2D(texture, texcoords_fragment); 19 | } 20 | -------------------------------------------------------------------------------- /Quake-iOS/gl_intensitypolygon1textureprogram.vsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_intensitypolygon1textureprogram.vsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 6/19/16. 6 | // 7 | // 8 | 9 | attribute vec3 position; 10 | attribute float intensity; 11 | attribute vec2 texcoords; 12 | 13 | varying vec2 texcoords_fragment; 14 | varying vec4 color_fragment; 15 | 16 | uniform mat4 transform; 17 | 18 | invariant gl_Position; 19 | 20 | void main() 21 | { 22 | gl_Position = transform * vec4(position, 1.0); 23 | 24 | texcoords_fragment = texcoords; 25 | 26 | color_fragment = vec4(intensity, intensity, intensity, 1.0); 27 | } 28 | -------------------------------------------------------------------------------- /Quake-iOS/gl_noalphatextprogram.fsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_noalphatextprogram.fsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/14/16. 6 | // 7 | // 8 | 9 | uniform sampler2D texture; 10 | uniform mediump vec4 color; 11 | 12 | varying mediump vec2 texcoords_fragment; 13 | 14 | invariant gl_FragColor; 15 | 16 | void main() 17 | { 18 | gl_FragColor = color * texture2D(texture, texcoords_fragment); 19 | } 20 | -------------------------------------------------------------------------------- /Quake-iOS/gl_noalphatextprogram.vsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_noalphatextprogram.vsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/14/16. 6 | // 7 | // 8 | 9 | attribute vec2 position; 10 | attribute vec2 texcoords; 11 | 12 | varying vec2 texcoords_fragment; 13 | 14 | uniform mat4 transform; 15 | 16 | invariant gl_Position; 17 | 18 | void main() 19 | { 20 | gl_Position = transform * vec4(position, -4.0, 1.0); 21 | 22 | texcoords_fragment = texcoords; 23 | } 24 | -------------------------------------------------------------------------------- /Quake-iOS/gl_polygon1textureprogram.fsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_polygon1textureprogram.fsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/14/16. 6 | // 7 | // 8 | 9 | uniform sampler2D texture; 10 | 11 | varying mediump vec2 texcoords_fragment; 12 | 13 | invariant gl_FragColor; 14 | 15 | void main() 16 | { 17 | gl_FragColor = texture2D(texture, texcoords_fragment); 18 | } 19 | -------------------------------------------------------------------------------- /Quake-iOS/gl_polygon1textureprogram.vsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_polygon1textureprogram.vsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/14/16. 6 | // 7 | // 8 | 9 | attribute vec3 position; 10 | attribute vec2 texcoords; 11 | 12 | varying vec2 texcoords_fragment; 13 | 14 | uniform mat4 transform; 15 | 16 | invariant gl_Position; 17 | 18 | void main() 19 | { 20 | gl_Position = transform * vec4(position, 1.0); 21 | 22 | texcoords_fragment = texcoords; 23 | } 24 | -------------------------------------------------------------------------------- /Quake-iOS/gl_polygon2texturesprogram.fsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_polygon2texturesprogram.fsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/14/16. 6 | // 7 | // 8 | 9 | uniform sampler2D texture0; 10 | uniform sampler2D texture1; 11 | 12 | varying mediump vec2 texcoords0_fragment; 13 | varying mediump vec2 texcoords1_fragment; 14 | 15 | invariant gl_FragColor; 16 | 17 | void main() 18 | { 19 | gl_FragColor = texture2D(texture0, texcoords0_fragment) * (vec4(1.0, 1.0, 1.0, 1.0) - texture2D(texture1, texcoords1_fragment)); 20 | } 21 | -------------------------------------------------------------------------------- /Quake-iOS/gl_polygon2texturesprogram.vsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_polygon2texturesprogram.vsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/14/16. 6 | // 7 | // 8 | 9 | attribute vec3 position; 10 | attribute vec2 texcoords0; 11 | attribute vec2 texcoords1; 12 | 13 | varying vec2 texcoords0_fragment; 14 | varying vec2 texcoords1_fragment; 15 | 16 | uniform mat4 transform; 17 | 18 | invariant gl_Position; 19 | 20 | void main() 21 | { 22 | gl_Position = transform * vec4(position, 1.0); 23 | 24 | texcoords0_fragment = texcoords0; 25 | texcoords1_fragment = texcoords1; 26 | } 27 | -------------------------------------------------------------------------------- /Quake-iOS/gl_polygonnotextureprogram.fsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_polygonnotextureprogram.fsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/14/16. 6 | // 7 | // 8 | 9 | uniform mediump vec4 color; 10 | 11 | invariant gl_FragColor; 12 | 13 | void main() 14 | { 15 | gl_FragColor = color; 16 | } 17 | -------------------------------------------------------------------------------- /Quake-iOS/gl_polygonnotextureprogram.vsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_polygonnotextureprogram.vsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/14/16. 6 | // 7 | // 8 | 9 | attribute vec4 position; 10 | 11 | uniform mat4 transform; 12 | 13 | invariant gl_Position; 14 | 15 | void main() 16 | { 17 | gl_Position = transform * vec4(position); 18 | } 19 | -------------------------------------------------------------------------------- /Quake-iOS/gl_textprogram.fsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_textprogram.fsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/14/16. 6 | // 7 | // 8 | 9 | uniform sampler2D texture; 10 | uniform mediump vec4 color; 11 | 12 | varying mediump vec2 texcoords_fragment; 13 | 14 | invariant gl_FragColor; 15 | 16 | void main() 17 | { 18 | mediump vec4 result = color * texture2D(texture, texcoords_fragment); 19 | 20 | if (result.a > 0.66) 21 | { 22 | gl_FragColor = result; 23 | } 24 | else 25 | { 26 | discard; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Quake-iOS/gl_textprogram.vsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_textprogram.vsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/14/16. 6 | // 7 | // 8 | 9 | attribute vec2 position; 10 | attribute vec2 texcoords; 11 | 12 | varying vec2 texcoords_fragment; 13 | 14 | uniform mat4 transform; 15 | 16 | invariant gl_Position; 17 | 18 | void main() 19 | { 20 | gl_Position = transform * vec4(position, -4.0, 1.0); 21 | 22 | texcoords_fragment = texcoords; 23 | } 24 | -------------------------------------------------------------------------------- /Quake-iOS/gl_tintedpolygon1textureprogram.fsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_tintedpolygon1textureprogram.fsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/14/16. 6 | // 7 | // 8 | 9 | uniform mediump vec4 color; 10 | uniform sampler2D texture; 11 | 12 | varying mediump vec2 texcoords_fragment; 13 | 14 | invariant gl_FragColor; 15 | 16 | void main() 17 | { 18 | gl_FragColor = color * texture2D(texture, texcoords_fragment); 19 | } 20 | -------------------------------------------------------------------------------- /Quake-iOS/gl_tintedpolygon1textureprogram.vsh: -------------------------------------------------------------------------------- 1 | // 2 | // gl_tintedpolygon1textureprogram.vsh 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/14/16. 6 | // 7 | // 8 | 9 | attribute vec3 position; 10 | attribute vec2 texcoords; 11 | 12 | varying vec2 texcoords_fragment; 13 | 14 | uniform mat4 transform; 15 | 16 | invariant gl_Position; 17 | 18 | void main() 19 | { 20 | gl_Position = transform * vec4(position, 1.0); 21 | 22 | texcoords_fragment = texcoords; 23 | } 24 | -------------------------------------------------------------------------------- /Quake-iOS/in_ios.c: -------------------------------------------------------------------------------- 1 | // 2 | // in_ios.c 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/13/16. 6 | // 7 | // 8 | 9 | #include "quakedef.h" 10 | 11 | float in_forwardmove; 12 | float in_sidestepmove; 13 | 14 | float in_pitchangle; 15 | float in_rollangle; 16 | 17 | cvar_t in_anglescaling = {"in_anglescaling","0.1"}; 18 | 19 | void IN_Init (void) 20 | { 21 | Cvar_RegisterVariable (&in_anglescaling); 22 | } 23 | 24 | void IN_Shutdown (void) 25 | { 26 | } 27 | 28 | void IN_Commands (void) 29 | { 30 | } 31 | 32 | void IN_Move (usercmd_t *cmd) 33 | { 34 | cl.viewangles[YAW] -= in_rollangle * in_anglescaling.value * 90; 35 | 36 | V_StopPitchDrift(); 37 | 38 | if (tiltaim_enabled) { 39 | cl.viewangles[PITCH] = (in_pitchangle + 1.5) * 90; 40 | } else { 41 | cl.viewangles[PITCH] += in_pitchangle * in_anglescaling.value * 90; 42 | } 43 | 44 | if (cl.viewangles[PITCH] > 80) 45 | cl.viewangles[PITCH] = 80; 46 | if (cl.viewangles[PITCH] < -70) 47 | cl.viewangles[PITCH] = -70; 48 | 49 | if (key_dest == key_game) 50 | { 51 | float speed; 52 | 53 | if (in_speed.state & 1) 54 | speed = cl_movespeedkey.value; 55 | else 56 | speed = 1; 57 | 58 | cmd->sidemove += in_forwardmove * speed * cl_forwardspeed.value; 59 | 60 | cmd->forwardmove += in_sidestepmove * speed * cl_sidespeed.value; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Quake-iOS/net_ios.c: -------------------------------------------------------------------------------- 1 | // 2 | // net_ios.c 3 | // Quake-iOS 4 | // 5 | // Created by Heriberto Delgado on 5/12/16. 6 | // 7 | // 8 | 9 | #include "quakedef.h" 10 | 11 | #include "net_loop.h" 12 | #include "net_dgrm.h" 13 | 14 | net_driver_t net_drivers[MAX_NET_DRIVERS] = 15 | { 16 | { 17 | "Loopback", 18 | false, 19 | Loop_Init, 20 | Loop_Listen, 21 | Loop_SearchForHosts, 22 | Loop_Connect, 23 | Loop_CheckNewConnections, 24 | Loop_GetMessage, 25 | Loop_SendMessage, 26 | Loop_SendUnreliableMessage, 27 | Loop_CanSendMessage, 28 | Loop_CanSendUnreliableMessage, 29 | Loop_Close, 30 | Loop_Shutdown 31 | } 32 | , 33 | { 34 | "Datagram", 35 | false, 36 | Datagram_Init, 37 | Datagram_Listen, 38 | Datagram_SearchForHosts, 39 | Datagram_Connect, 40 | Datagram_CheckNewConnections, 41 | Datagram_GetMessage, 42 | Datagram_SendMessage, 43 | Datagram_SendUnreliableMessage, 44 | Datagram_CanSendMessage, 45 | Datagram_CanSendUnreliableMessage, 46 | Datagram_Close, 47 | Datagram_Shutdown 48 | } 49 | }; 50 | 51 | int net_numdrivers = 2; 52 | 53 | #include "net_udp.h" 54 | 55 | net_landriver_t net_landrivers[MAX_NET_DRIVERS] = 56 | { 57 | { 58 | "UDP", 59 | false, 60 | 0, 61 | UDP_Init, 62 | UDP_Shutdown, 63 | UDP_Listen, 64 | UDP_OpenSocket, 65 | UDP_CloseSocket, 66 | UDP_Connect, 67 | UDP_CheckNewConnections, 68 | UDP_Read, 69 | UDP_Write, 70 | UDP_Broadcast, 71 | UDP_AddrToString, 72 | UDP_StringToAddr, 73 | UDP_GetSocketAddr, 74 | UDP_GetNameFromAddr, 75 | UDP_GetAddrFromName, 76 | UDP_AddrCompare, 77 | UDP_GetSocketPort, 78 | UDP_SetSocketPort 79 | } 80 | }; 81 | 82 | int net_numlandrivers = 1; 83 | -------------------------------------------------------------------------------- /Quake.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Quake.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Quake.xcodeproj/project.xcworkspace/xcuserdata/tomkidd.xcuserdatad/IDEFindNavigatorScopes.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Quake.xcodeproj/xcuserdata/heribertod.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Quake_OSX.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | Quake_iOS_VR.xcscheme 13 | 14 | orderHint 15 | 2 16 | 17 | Quake_tvOS.xcscheme 18 | 19 | orderHint 20 | 1 21 | 22 | 23 | SuppressBuildableAutocreation 24 | 25 | 2839AD3F1C5D6EF700CEC48E 26 | 27 | primary 28 | 29 | 30 | 2887813A1CD83E0800AF4F24 31 | 32 | primary 33 | 34 | 35 | 28C3BDBF1C5D77AA00CBB0D9 36 | 37 | primary 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Quake.xcodeproj/xcuserdata/heribertodelgado.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | QuakeEd.xcscheme 8 | 9 | orderHint 10 | 6 11 | 12 | Quake_Asset_Generator.xcscheme 13 | 14 | orderHint 15 | 5 16 | 17 | Quake_OSX.xcscheme 18 | 19 | orderHint 20 | 0 21 | 22 | Quake_iOS_VR.xcscheme 23 | 24 | orderHint 25 | 2 26 | 27 | Quake_tvOS.xcscheme 28 | 29 | orderHint 30 | 1 31 | 32 | 33 | SuppressBuildableAutocreation 34 | 35 | 2839AD3F1C5D6EF700CEC48E 36 | 37 | primary 38 | 39 | 40 | 2887813A1CD83E0800AF4F24 41 | 42 | primary 43 | 44 | 45 | 289AF1E81D3400BE001CBC0F 46 | 47 | primary 48 | 49 | 50 | 28BFE1BB1D50435C0061CFB3 51 | 52 | primary 53 | 54 | 55 | 28C3BDBF1C5D77AA00CBB0D9 56 | 57 | primary 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /Quake.xcodeproj/xcuserdata/tomkidd.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Quake-iOS.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | QuakeEd.xcscheme 13 | 14 | orderHint 15 | 4 16 | 17 | QuakeTV.xcscheme 18 | 19 | orderHint 20 | 1 21 | 22 | QuakeTV.xcscheme_^#shared#^_ 23 | 24 | orderHint 25 | 1 26 | 27 | Quake_Asset_Generator.xcscheme 28 | 29 | orderHint 30 | 3 31 | 32 | 33 | SuppressBuildableAutocreation 34 | 35 | 2839AD3F1C5D6EF700CEC48E 36 | 37 | primary 38 | 39 | 40 | 2887813A1CD83E0800AF4F24 41 | 42 | primary 43 | 44 | 45 | 28C3BDBF1C5D77AA00CBB0D9 46 | 47 | primary 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Quake/Tremor/CHANGELOG: -------------------------------------------------------------------------------- 1 | *** 20020517: 1.0.2 *** 2 | 3 | Playback bugfix to floor1; mode mistakenly used for sizing instead 4 | of blockflag 5 | 6 | *** 20020515: 1.0.1 *** 7 | 8 | Added complete API documentation to source tarball. No code 9 | changes. 10 | 11 | *** 20020412: 1.0.1 *** 12 | 13 | Fixed a clipping bug that affected ARM processors; negative 14 | overflows were being properly clipped, but then clobbered to 15 | positive by the positive overflow chec (asm_arm.h:CLIP_TO_15) 16 | 17 | *** 20020403: 1.0.0 *** 18 | 19 | Initial version -------------------------------------------------------------------------------- /Quake/Tremor/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002, Xiph.org Foundation 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | - Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | - Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | - Neither the name of the Xiph.org Foundation nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 22 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /Quake/Tremor/Makefile.am: -------------------------------------------------------------------------------- 1 | AUTOMAKE_OPTIONS = foreign 2 | 3 | INCLUDES = -I./ 4 | 5 | lib_LTLIBRARIES = libvorbisidec.la 6 | 7 | libvorbisidec_la_SOURCES = mdct.c block.c window.c \ 8 | synthesis.c info.c \ 9 | floor1.c floor0.c vorbisfile.c \ 10 | res012.c mapping0.c registry.c codebook.c \ 11 | sharedbook.c framing.c bitwise.c \ 12 | codebook.h misc.h mdct_lookup.h\ 13 | os.h mdct.h block.h ivorbisfile.h lsp_lookup.h\ 14 | registry.h window.h window_lookup.h\ 15 | codec_internal.h backends.h ogg.h \ 16 | asm_arm.h ivorbiscodec.h 17 | libvorbisidec_la_LDFLAGS = -version-info @V_LIB_CURRENT@:@V_LIB_REVISION@:@V_LIB_AGE@ 18 | 19 | EXTRA_PROGRAMS = ivorbisfile_example 20 | CLEANFILES = $(EXTRA_PROGRAMS) $(lib_LTLIBRARIES) 21 | 22 | ivorbisfile_example_SOURCES = ivorbisfile_example.c 23 | ivorbisfile_example_LDFLAGS = -static 24 | ivorbisfile_example_LDADD = libvorbisidec.la 25 | 26 | includedir = $(prefix)/include/tremor 27 | 28 | include_HEADERS = ivorbiscodec.h ivorbisfile.h ogg.h os_types.h config_types.h 29 | 30 | example: 31 | -ln -fs . vorbis 32 | $(MAKE) ivorbisfile_example 33 | 34 | debug: 35 | $(MAKE) all CFLAGS="@DEBUG@" 36 | 37 | profile: 38 | $(MAKE) all CFLAGS="@PROFILE@" 39 | -------------------------------------------------------------------------------- /Quake/Tremor/README: -------------------------------------------------------------------------------- 1 | This README covers the Ogg Vorbis 'Tremor' integer playback codec 2 | source as of date 2002 09 02, version 1.0.0. 3 | 4 | ****** 5 | 6 | The C source in this package will build on any ANSI C compiler and 7 | function completely and properly on any platform. The included build 8 | system assumes GNU build system and make tools (m4, automake, 9 | autoconf, libtool and gmake). GCC is not required, although GCC is 10 | the most tested compiler. To build using GNU tools, type in the 11 | source directory: 12 | 13 | ./autogen.sh 14 | make 15 | 16 | Currently, the source implements playback in pure C on all platforms 17 | except ARM, where a [currently] small amount of assembly (see 18 | asm_arm.h) is used to implement 64 bit math operations and fast LSP 19 | computation. If building on ARM without the benefit of GNU build 20 | system tools, be sure that '_ARM_ASSEM_' is #defined by the build 21 | system if this assembly is desired, else the resulting library will 22 | use whatever 64 bit math builtins the compiler implements. 23 | 24 | No math library is required by this source. No floating point 25 | operations are used at any point in either setup or decode. This 26 | decoder library will properly decode any past, current or future 27 | Vorbis I file or stream. 28 | 29 | ******** 30 | 31 | The build system produces a static and [when supported by the OS] 32 | dynamic library named 'libvorbisidec'. This library exposes an API 33 | nearly identical to the BSD reference library's 'libvorbisfile', 34 | including all the features familiar to users of vorbisfile. This API 35 | is similar enough that the proper header file to include is named 36 | 'ivorbisfile.h' [included in the source build directory]. Lower level 37 | libvorbis-style headers and structures are in 'ivorbiscodec.h' 38 | [included in the source build directory]. A simple example program, 39 | ivorbisfile_example.c, can be built with 'make example'. 40 | 41 | ******** 42 | 43 | Detailed Tremor API Documentation begins at doc/index.html 44 | 45 | Monty 46 | xiph.org 47 | -------------------------------------------------------------------------------- /Quake/Tremor/Version_script.in: -------------------------------------------------------------------------------- 1 | # 2 | # Export file for libvorbisidec 3 | # 4 | # Only the symbols listed in the global section will be callable from 5 | # applications linking to libvorbisidec. 6 | # 7 | 8 | @PACKAGE@.so.1 9 | { 10 | global: 11 | ov_clear; 12 | ov_open; 13 | ov_open_callbacks; 14 | ov_test; 15 | ov_test_callbacks; 16 | ov_test_open; 17 | ov_bitrate; 18 | ov_bitrate_instant; 19 | ov_streams; 20 | ov_seekable; 21 | ov_serialnumber; 22 | ov_raw_total; 23 | ov_pcm_total; 24 | ov_time_total; 25 | ov_raw_seek; 26 | ov_pcm_seek; 27 | ov_pcm_seek_page; 28 | ov_time_seek; 29 | ov_time_seek_page; 30 | ov_raw_tell; 31 | ov_pcm_tell; 32 | ov_time_tell; 33 | ov_info; 34 | ov_comment; 35 | ov_read; 36 | 37 | vorbis_info_init; 38 | vorbis_info_clear; 39 | vorbis_info_blocksize; 40 | vorbis_comment_init; 41 | vorbis_comment_add; 42 | vorbis_comment_add_tag; 43 | vorbis_comment_query; 44 | vorbis_comment_query_count; 45 | vorbis_comment_clear; 46 | 47 | local: 48 | *; 49 | }; 50 | -------------------------------------------------------------------------------- /Quake/Tremor/block.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 4 | * * 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 8 | * * 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2008 * 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: shared block functions 15 | 16 | ********************************************************************/ 17 | 18 | #ifndef _V_BLOCK_ 19 | #define _V_BLOCK_ 20 | 21 | extern void _vorbis_block_ripcord(vorbis_block *vb); 22 | extern void *_vorbis_block_alloc(vorbis_block *vb,long bytes); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /Quake/Tremor/config_types.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 4 | * * 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 8 | * * 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: #ifdef jail to whip a few platforms into the UNIX ideal. 15 | 16 | ********************************************************************/ 17 | #ifndef _OS_CVTYPES_H 18 | #define _OS_CVTYPES_H 19 | 20 | typedef long long ogg_int64_t; 21 | typedef int ogg_int32_t; 22 | typedef unsigned int ogg_uint32_t; 23 | typedef short ogg_int16_t; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Quake/Tremor/debian/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | AUTOMAKE_OPTIONS = foreign 4 | 5 | EXTRA_DIST = changelog control copyright libvorbisidec1.install\ 6 | libvorbisidec-dev.install rules 7 | -------------------------------------------------------------------------------- /Quake/Tremor/debian/changelog: -------------------------------------------------------------------------------- 1 | libvorbisidec (1.2.0-1) unstable; urgency=low 2 | 3 | * Initial Release. 4 | 5 | -- Christopher L Cheney Wed, 09 Oct 2002 22:00:00 -0500 6 | 7 | Local variables: 8 | mode: debian-changelog 9 | End: 10 | -------------------------------------------------------------------------------- /Quake/Tremor/debian/control: -------------------------------------------------------------------------------- 1 | Source: libvorbisidec 2 | Section: libs 3 | Priority: optional 4 | Maintainer: Christopher L Cheney 5 | Build-Depends: autotools-dev, debhelper (>> 4.0.18), devscripts, gawk 6 | Standards-Version: 3.5.7.0 7 | 8 | Package: libvorbisidec1 9 | Architecture: any 10 | Section: libs 11 | Depends: ${shlibs:Depends} 12 | Description: Ogg Bitstream Library 13 | Libogg is a library for manipulating ogg bitstreams. It handles 14 | both making ogg bitstreams and getting packets from ogg bitstreams. 15 | 16 | Package: libvorbisidec-dev 17 | Architecture: any 18 | Section: devel 19 | Depends: libvorbisidec1 (= ${Source-Version}), libc6-dev 20 | Description: Ogg Bitstream Library Development 21 | The libogg-dev package contains the header files and documentation 22 | needed to develop applications with libogg. 23 | -------------------------------------------------------------------------------- /Quake/Tremor/debian/copyright: -------------------------------------------------------------------------------- 1 | This package was debianized by Christopher L Cheney on 2 | Wed, 09 Oct 2002 22:00:00 -0500. 3 | 4 | It was downloaded from cvs. 5 | 6 | Upstream Author(s): Monty 7 | 8 | Copyright: 9 | Copyright (c) 2002, Xiph.org Foundation 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | 15 | - Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | - Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | - Neither the name of the Xiph.Org Foundation nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR 30 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 31 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 32 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 33 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 34 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 35 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 36 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | 38 | -------------------------------------------------------------------------------- /Quake/Tremor/debian/libvorbisidec-dev.install: -------------------------------------------------------------------------------- 1 | debian/tmp/usr/include/tremor/config_types.h 2 | debian/tmp/usr/include/tremor/ivorbiscodec.h 3 | debian/tmp/usr/include/tremor/ivorbisfile.h 4 | debian/tmp/usr/include/tremor/ogg.h 5 | debian/tmp/usr/include/tremor/os_types.h 6 | debian/tmp/usr/lib/libvorbisidec.a 7 | debian/tmp/usr/lib/libvorbisidec.la 8 | debian/tmp/usr/lib/libvorbisidec.so 9 | -------------------------------------------------------------------------------- /Quake/Tremor/debian/libvorbisidec1.install: -------------------------------------------------------------------------------- 1 | debian/tmp/usr/lib/libvorbisidec.so.* 2 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/datastructures.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - Base Data Structures 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

Tremor documentation

Tremor version 1.0 - 20020403

15 | 16 |

Base Data Structures

17 |

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". 18 |

19 |

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. 20 |

21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 32 | 33 | 34 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
datatypepurpose
OggVorbis_FileThis structure represents the basic file information. It contains 30 | a pointer to the physical file or bitstream and various information about that bitstream.
vorbis_commentThis structure contains the file comments. It contains 35 | 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.
46 | 47 |

48 |


49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |

copyright © 2002 Xiph.org

Ogg Vorbis

Tremor documentation

Tremor version 1.0 - 20020403

58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/decoding.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - Decoding 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

Tremor documentation

Tremor version 1.0 - 20020403

15 | 16 |

Decoding

17 | 18 |

19 | All libivorbisdec decoding routines are declared in "ivorbisfile.h". 20 |

21 | 22 | After initialization, decoding audio 23 | is as simple as calling ov_read(). This 24 | function works similarly to reading from a normal file using 25 | read().

26 | 27 | However, a few differences are worth noting: 28 | 29 |

multiple stream links

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

returned data amount

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

file cursor position

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

55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 65 | 66 |
functionpurpose
ov_readThis function makes up the main chunk of a decode loop. It takes an 63 | OggVorbis_File structure, which must have been initialized by a previous 64 | call to ov_open().
67 | 68 |

69 |


70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |

copyright © 2002 Xiph.org

Ogg Vorbis

Tremor documentation

Tremor version 1.0 - 20020403

79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/diff.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - Vorbisfile Differences 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

Tremor documentation

Tremor version 1.0 - 20020403

15 | 16 |

Tremor / Vorbisfile API Differences

17 | 18 |

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

24 | 25 |

OggVorbis_File structure

26 | 27 | The bittrack and samptrack fields in the OggVorbis_File structure are changed to 29 | 64 bit integers in Tremor, from doubles in vorbisfile. 30 | 31 |

Time-related seek and tell function calls

32 | 33 | The ov_time_total() and ov_time_tell() functions return milliseconds as 35 | 64 bit integers in Tremor. In vorbisfile, these functions returned 36 | seconds as doubles.

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

42 | 43 |

Reading decoded data

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

49 | 50 | Tremor does not implement ov_read_float().

51 | 52 | 53 |

54 |


55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |

copyright © 2002 Xiph.org

Ogg Vorbis

Tremor documentation

Tremor version 1.0 - 20020403

64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - Documentation 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

Tremor documentation

Tremor version 1.0 - 20020403

15 | 16 |

Tremor Documentation

17 | 18 |

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

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

33 | Building libvorbisidec
34 | API overview
35 | API reference
36 | Example code
37 | Tremor / vorbisfile API differences
38 | 39 |

40 |


41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 |

copyright © 2002 Xiph.org

Ogg Vorbis

Tremor documentation

Tremor version 1.0 - 20020403

50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_bitrate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_bitrate 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

Tremor documentation

Tremor version 1.0 - 20020403

15 | 16 |

ov_bitrate

17 | 18 |

declared in "ivorbisfile.h";

19 | 20 |

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. 21 |

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

23 | 24 |

25 | 26 | 27 | 32 | 33 |
28 |

29 | long ov_bitrate(OggVorbis_File *vf,int i);
30 | 
31 |
34 | 35 |

Parameters

36 |
37 |
vf
38 |
A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec 39 | functions.
40 |
i
41 |
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.
42 |
43 | 44 | 45 |

Return Values

46 |
47 |
  • OV_EINVAL indicates that an invalid argument value was submitted or that the stream represented by vf is not open.
  • 48 |
  • 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. 49 |
  • n indicates the bitrate for the given logical bitstream or the entire 50 | physical bitstream. If the file is open for random (seekable) access, it will 51 | find the *actual* average bitrate. If the file is streaming (nonseekable), it 52 | returns the nominal bitrate (if set) or else the average of the 53 | upper/lower bounds (if set).
  • 54 |
    55 |

    56 | 57 | 58 |

    59 |


    60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_bitrate_instant.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_bitrate 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    ov_bitrate_instant

    17 | 18 |

    declared in "ivorbisfile.h";

    19 | 20 |

    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. 21 | 22 |

    23 | 24 | 25 | 30 | 31 |
    26 |
    
    27 | long ov_bitrate_instant(OggVorbis_File *vf);
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    vf
    36 |
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec 37 | functions. 38 |
    39 | 40 | 41 |

    Return Values

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

    49 | 50 | 51 |

    52 |


    53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_callbacks.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - datatype - ov_callbacks 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    ov_callbacks

    17 | 18 |

    declared in "ivorbiscodec.h"

    19 | 20 |

    21 | The ov_callbacks structure contains file manipulation function prototypes necessary for opening, closing, seeking, and location. 22 | 23 |

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

    32 | 33 | 34 | 35 | 43 | 44 |
    36 |
    typedef struct {
    37 |   size_t (*read_func)  (void *ptr, size_t size, size_t nmemb, void *datasource);
    38 |   int    (*seek_func)  (void *datasource, ogg_int64_t offset, int whence);
    39 |   int    (*close_func) (void *datasource);
    40 |   long   (*tell_func)  (void *datasource);
    41 | } ov_callbacks;
    42 |
    45 | 46 |

    Relevant Struct Members

    47 |
    48 |
    read_func
    49 |
    Pointer to custom data reading function.
    50 |
    seek_func
    51 |
    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).
    52 |
    close_func
    53 |
    Pointer to custom data source closure function.
    54 |
    tell_func
    55 |
    Pointer to custom data location function.
    56 |
    57 | 58 |

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

    63 | 64 |

    65 |


    66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_clear.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_clear 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    ov_clear

    17 | 18 |

    declared in "ivorbisfile.h";

    19 | 20 |

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

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

    24 | 25 |

    26 | 27 | 28 | 33 | 34 |
    29 |
    
    30 | int ov_clear(OggVorbis_File *vf);
    31 | 
    32 |
    35 | 36 |

    Parameters

    37 |
    38 |
    vf
    39 |
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec 40 | functions. After ov_clear has been called, the structure is deallocated and can no longer be used.
    41 |
    42 | 43 | 44 |

    Return Values

    45 |
    46 |
  • 0 for success
  • 47 |
    48 | 49 | 50 |

    51 |
    52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_comment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_bitrate 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    16 | 17 |

    ov_comment

    18 | 19 |

    declared in "ivorbisfile.h";

    20 | 21 |

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

    23 | 24 |

    25 | 26 | 27 | 32 | 33 |
    28 |
    
    29 | vorbis_comment *ov_comment(OggVorbis_File *vf,int link);
    30 | 
    31 |
    34 | 35 |

    Parameters

    36 |
    37 |
    vf
    38 |
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec 39 | functions.
    40 |
    i
    41 |
    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.
    42 |
    43 | 44 | 45 |

    Return Values

    46 |
    47 |
  • Returns the vorbis_comment struct for the specified bitstream.
  • 48 |
  • NULL if the specified bitstream does not exist or the file has been initialized improperly.
  • 49 |
    50 |

    51 | 52 |

    53 |


    54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_info.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_info 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    ov_info

    17 | 18 |

    declared in "ivorbisfile.h";

    19 | 20 |

    Returns the vorbis_info struct for the specified bitstream. For nonseekable files, always returns the current vorbis_info struct. 21 | 22 |

    23 | 24 | 25 | 30 | 31 |
    26 |
    
    27 | vorbis_info *ov_info(OggVorbis_File *vf,int link);
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    vf
    36 |
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec 37 | functions.
    38 |
    i
    39 |
    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.
    40 |
    41 | 42 | 43 |

    Return Values

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

    49 | 50 |

    51 |


    52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_pcm_seek.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_pcm_seek 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    ov_pcm_seek

    17 | 18 |

    declared in "ivorbisfile.h";

    19 | 20 |

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

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

    25 | 26 |

    27 | 28 | 29 | 34 | 35 |
    30 |
    
    31 | int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos);
    32 | 
    33 |
    36 | 37 |

    Parameters

    38 |
    39 |
    vf
    40 |
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec 41 | functions.
    42 |
    pos
    43 |
    Position in pcm samples to seek to in the bitstream.
    44 |
    45 | 46 | 47 |

    Return Values

    48 |
    49 |
  • 0 for success
  • 50 | 51 |
  • 52 | nonzero indicates failure, described by several error codes:
  • 53 |
      54 |
    • OV_ENOSEEK - Bitstream is not seekable. 55 |
    • 56 |
    • OV_EINVAL - Invalid argument value. 57 |
    • 58 |
    • OV_EREAD - A read from media returned an error. 59 |
    • 60 |
    • OV_EFAULT - Internal logic fault; indicates a bug or heap/stack 61 | corruption. 62 |
    • 63 |
    • OV_EBADLINK - Invalid stream section supplied to libvorbisidec, or the requested link is corrupt. 64 |
    • 65 |
    66 | 67 |

    68 |
    69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_pcm_seek_page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_pcm_seek_page 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    ov_pcm_seek_page

    17 | 18 |

    declared in "ivorbisfile.h";

    19 | 20 |

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

    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. 22 |

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

    26 | 27 |

    28 | 29 | 30 | 35 | 36 |
    31 |
    
    32 | int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos);
    33 | 
    34 |
    37 | 38 |

    Parameters

    39 |
    40 |
    vf
    41 |
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec 42 | functions.
    43 |
    pos
    44 |
    Position in pcm samples to seek to in the bitstream.
    45 |
    46 | 47 | 48 |

    Return Values

    49 |
    50 |
  • 51 | 0 for success
  • 52 | 53 |
  • 54 | nonzero indicates failure, described by several error codes:
  • 55 |
      56 |
    • OV_ENOSEEK - Bitstream is not seekable. 57 |
    • 58 |
    • OV_EINVAL - Invalid argument value. 59 |
    • 60 |
    • OV_EREAD - A read from media returned an error. 61 |
    • 62 |
    • OV_EFAULT - Internal logic fault; indicates a bug or heap/stack 63 | corruption. 64 |
    • 65 |
    • OV_EBADLINK - Invalid stream section supplied to libvorbisidec, or the requested link is corrupt. 66 |
    • 67 |
    68 | 69 |

    70 |
    71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_pcm_tell.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_pcm_tell 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    ov_pcm_tell

    17 | 18 |

    declared in "ivorbisfile.h";

    19 | 20 |

    Returns the current offset in samples. 21 | 22 |

    23 | 24 | 25 | 30 | 31 |
    26 |
    
    27 | ogg_int64_t ov_pcm_tell(OggVorbis_File *vf);
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    vf
    36 |
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec 37 | functions.
    38 |
    39 | 40 | 41 |

    Return Values

    42 |
    43 |
  • n indicates the current offset in samples.
  • 44 |
  • OV_EINVAL means that the argument was invalid. In this case, the requested bitstream did not exist.
  • 45 |
    46 |

    47 | 48 | 49 |

    50 |


    51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_pcm_total.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_pcm_total 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    ov_pcm_total

    17 | 18 |

    declared in "ivorbisfile.h";

    19 | 20 |

    Returns the total pcm samples of the physical bitstream or a specified logical bitstream. 21 | 22 |

    23 | 24 | 25 | 30 | 31 |
    26 |
    
    27 | ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i);
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    vf
    36 |
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec 37 | functions.
    38 |
    i
    39 |
    Link to the desired logical bitstream. To retrieve the total pcm samples for the entire physical bitstream, this parameter should be set to -1.
    40 |
    41 | 42 | 43 |

    Return Values

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

    51 | 52 | 53 |

    54 |


    55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_raw_seek.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_raw_seek 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    ov_raw_seek

    17 | 18 |

    declared in "ivorbisfile.h";

    19 | 20 |

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

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

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

    26 | 27 | 28 | 33 | 34 |
    29 |
    
    30 | int ov_raw_seek(OggVorbis_File *vf,long pos);
    31 | 
    32 |
    35 | 36 |

    Parameters

    37 |
    38 |
    vf
    39 |
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec 40 | functions.
    41 |
    pos
    42 |
    Position in compressed bytes to seek to in the bitstream.
    43 |
    44 | 45 | 46 |

    Return Values

    47 |
    48 |
  • 0 indicates success
  • 49 |
  • nonzero indicates failure, described by several error codes:
  • 50 |
      51 |
    • OV_ENOSEEK - Bitstream is not seekable. 52 |
    • 53 |
    • OV_EINVAL - Invalid argument value. 54 |
    • 55 |
    • OV_EBADLINK - Invalid stream section supplied to libvorbisidec, or the requested link is corrupt. 56 |
    • 57 |
    58 |
    59 |

    60 | 61 |

    62 |


    63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_raw_tell.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_raw_tell 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    ov_raw_tell

    17 | 18 |

    declared in "ivorbisfile.h";

    19 | 20 |

    Returns the current offset in raw compressed bytes. 21 | 22 |

    23 | 24 | 25 | 30 | 31 |
    26 |
    
    27 | ogg_int64_t ov_raw_tell(OggVorbis_File *vf);
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    vf
    36 |
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec 37 | functions.
    38 |
    39 | 40 | 41 |

    Return Values

    42 |
    43 |
  • n indicates the current offset in bytes.
  • 44 |
  • OV_EINVAL means that the argument was invalid. In this case, the requested bitstream did not exist.
  • 45 |
    46 |

    47 | 48 | 49 |

    50 |


    51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_raw_total.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_raw_total 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    ov_raw_total

    17 | 18 |

    declared in "ivorbisfile.h";

    19 | 20 |

    Returns the total (compressed) bytes of the physical bitstream or a specified logical bitstream. 21 | 22 |

    23 | 24 | 25 | 30 | 31 |
    26 |
    
    27 | ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i);
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    vf
    36 |
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec 37 | functions.
    38 |
    i
    39 |
    Link to the desired logical bitstream. To retrieve the total bytes for the entire physical bitstream, this parameter should be set to -1.
    40 |
    41 | 42 | 43 |

    Return Values

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

    51 | 52 | 53 | 54 |

    55 |


    56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_seekable.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_seekable 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    ov_seekable

    17 | 18 |

    declared in "ivorbisfile.h";

    19 | 20 |

    This indicates whether or not the bitstream is seekable. 21 | 22 | 23 |

    24 | 25 | 26 | 31 | 32 |
    27 |
    
    28 | long ov_seekable(OggVorbis_File *vf);
    29 | 
    30 |
    33 | 34 |

    Parameters

    35 |
    36 |
    vf
    37 |
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec 38 | functions.
    39 |
    40 | 41 | 42 |

    Return Values

    43 |
    44 |
  • 0 indicates that the file is not seekable.
  • 45 |
  • nonzero indicates that the file is seekable.
  • 46 |
    47 |

    48 | 49 |

    50 |


    51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_serialnumber.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_serialnumber 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    ov_serialnumber

    17 | 18 |

    declared in "ivorbisfile.h";

    19 | 20 |

    Returns the serialnumber of the specified logical bitstream link number within the overall physical bitstream. 21 | 22 |

    23 | 24 | 25 | 30 | 31 |
    26 |
    
    27 | long ov_serialnumber(OggVorbis_File *vf,int i);
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    vf
    36 |
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec 37 | functions.
    38 |
    i
    39 |
    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.
    40 |
    41 | 42 | 43 |

    Return Values

    44 |
    45 |
  • 46 | -1 if the specified logical bitstream i does not exist.
  • 47 | 48 |
  • Returns the serial number of the logical bitstream i or the serial number of the current bitstream if the file is nonseekable.
  • 49 |
    50 |

    51 | 52 | 53 |

    54 |


    55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_streams.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_streams 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    ov_streams

    17 | 18 |

    declared in "ivorbisfile.h";

    19 | 20 |

    Returns the number of logical bitstreams within our physical bitstream. 21 | 22 |

    23 | 24 | 25 | 30 | 31 |
    26 |
    
    27 | long ov_streams(OggVorbis_File *vf);
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    vf
    36 |
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec 37 | functions.
    38 |
    39 | 40 | 41 |

    Return Values

    42 |
    43 |
  • 44 | 1 indicates a single logical bitstream or an unseekable file.
  • 45 |
  • n indicates the number of logical bitstreams.
  • 46 |
    47 |

    48 | 49 | 50 |

    51 |


    52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_test_open.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_test_open 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    ov_test_open

    17 | 18 |

    declared in "ivorbisfile.h";

    19 | 20 |

    21 | Finish opening a file partially opened with ov_test() 22 | or ov_test_callbacks(). 23 |

    24 | 25 | 26 | 27 | 32 | 33 |
    28 |
    
    29 | int ov_test_open(OggVorbis_File *vf);
    30 | 
    31 |
    34 | 35 |

    Parameters

    36 |
    37 |
    vf
    38 |
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec 39 | functions. Once this has been called, the same OggVorbis_File 40 | struct should be passed to all the libvorbisidec functions.
    41 |
    42 | 43 | 44 |

    Return Values

    45 |
    46 |
  • 47 | 0 for success
  • 48 | 49 |
  • less than zero for failure:
  • 50 |
      51 |
    • OV_EREAD - A read from media returned an error.
    • 52 |
    • OV_ENOTVORBIS - Bitstream is not Vorbis data.
    • 53 |
    • OV_EVERSION - Vorbis version mismatch.
    • 54 |
    • OV_EBADHEADER - Invalid Vorbis bitstream header.
    • 55 |
    • OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
    • 56 |
    57 |
    58 |

    59 | 60 | 61 |

    62 |


    63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_time_seek.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_time_seek 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    ov_time_seek

    17 | 18 |

    declared in "ivorbisfile.h";

    19 | 20 |

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

    27 | 28 | 29 | 34 | 35 |
    30 |
    
    31 | int ov_time_seek(OggVorbis_File *vf, ogg_int64_t ms);
    32 | 
    33 |
    36 | 37 |

    Parameters

    38 |
    39 |
    vf
    40 |
    Pointer to our already opened and initialized OggVorbis_File structure.
    41 |
    ms
    42 |
    Location to seek to within the file, specified in milliseconds.
    43 |
    44 | 45 | 46 |

    Return Values

    47 |
    48 |
  • 49 | 0 for success
  • 50 | 51 |
  • 52 | Nonzero for failure
  • 53 |
    54 | 55 | 56 |

    57 |
    58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_time_seek_page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_time_seek_page 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    ov_time_seek_page

    17 | 18 |

    declared in "ivorbisfile.h";

    19 | 20 |

    For seekable 21 | 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. 22 |

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

    This function does not work for unseekable streams. 26 | 27 |

    28 | 29 | 30 | 35 | 36 |
    31 |
    
    32 | int ov_time_seek_page(OggVorbis_File *vf, ogg_int64_t ms);
    33 | 
    34 |
    37 | 38 |

    Parameters

    39 |
    40 |
    vf
    41 |
    Pointer to our already opened and initialized OggVorbis_File structure.
    42 |
    ms
    43 |
    Location to seek to within the file, specified in milliseconds.
    44 |
    45 | 46 | 47 |

    Return Values

    48 |
    49 |
  • 50 | 0 for success
  • 51 | 52 |
  • 53 | nonzero indicates failure, described by several error codes:
  • 54 |
      55 |
    • OV_ENOSEEK - Bitstream is not seekable. 56 |
    • 57 |
    • OV_EINVAL - Invalid argument value. 58 |
    • 59 |
    • OV_EREAD - A read from media returned an error. 60 |
    • 61 |
    • OV_EFAULT - Internal logic fault; indicates a bug or heap/stack 62 | corruption. 63 |
    • 64 |
    • OV_EBADLINK - Invalid stream section supplied to libvorbisidec, or the requested link is corrupt. 65 |
    • 66 |
    67 | 68 | 69 |

    70 |
    71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_time_tell.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_bitrate 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    ov_time_tell

    17 | 18 |

    declared in "ivorbisfile.h";

    19 | 20 |

    Returns the current decoding offset in milliseconds. 21 | 22 |

    23 | 24 | 25 | 30 | 31 |
    26 |
    
    27 | ogg_int64_t ov_time_tell(OggVorbis_File *vf);
    28 | 
    29 |
    32 | 33 |

    Parameters

    34 |
    35 |
    vf
    36 |
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec 37 | functions.
    38 |
    39 | 40 | 41 |

    Return Values

    42 |
    43 |
  • n indicates the current decoding time offset in milliseconds.
  • 44 |
  • OV_EINVAL means that the argument was invalid. In this case, the requested bitstream did not exist.
  • 45 |
    46 |

    47 | 48 | 49 |

    50 |


    51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/ov_time_total.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - function - ov_time_total 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    ov_time_total

    17 | 18 |

    declared in "ivorbisfile.h";

    19 | 20 | 21 |

    Returns the total time in seconds of the physical bitstream or a specified logical bitstream. 22 | 23 | 24 |

    25 | 26 | 27 | 32 | 33 |
    28 |
    
    29 | ogg_int64_t ov_time_total(OggVorbis_File *vf,int i);
    30 | 
    31 |
    34 | 35 |

    Parameters

    36 |
    37 |
    vf
    38 |
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec 39 | functions.
    40 |
    i
    41 |
    Link to the desired logical bitstream. To retrieve the time total for the entire physical bitstream, this parameter should be set to -1.
    42 |
    43 | 44 | 45 |

    Return Values

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

    52 | 53 |

    54 |


    55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/overview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - API Overview 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    Tremor API Overview

    17 | 18 |

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

    24 | The Tremor API consists of the following functional categories: 25 |

    26 |

    33 |

    34 | In addition, the following subjects deserve attention additional to 35 | the above general overview: 36 |

    37 |

    43 |

    44 | 45 | 46 |

    47 |


    48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/reference.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor API Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    Tremor API Reference

    17 | 18 |

    19 | Data Structures
    20 | OggVorbis_File
    21 | vorbis_comment
    22 | vorbis_info
    23 | ov_callbacks
    24 |
    25 | Setup/Teardown
    26 | ov_open()
    27 | ov_open_callbacks()
    28 | ov_clear()
    29 | ov_test()
    30 | ov_test_callbacks()
    31 | ov_test_open()
    32 |
    33 | Decoding
    34 | ov_read()
    35 |
    36 | Seeking
    37 | ov_raw_seek()
    38 | ov_pcm_seek()
    39 | ov_time_seek()
    40 | ov_pcm_seek_page()
    41 | ov_time_seek_page()
    42 |
    43 | File Information
    44 | ov_bitrate()
    45 | ov_bitrate_instant()
    46 | ov_streams()
    47 | ov_seekable()
    48 | ov_serialnumber()
    49 | ov_raw_total()
    50 | ov_pcm_total()
    51 | ov_time_total()
    52 | ov_raw_tell()
    53 | ov_pcm_tell()
    54 | ov_time_tell()
    55 | ov_info()
    56 | ov_comment()
    57 |
    58 | Return Codes
    59 | 60 | 61 |

    62 |


    63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/return.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - Return Codes 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    Return Codes

    17 | 18 |

    19 | 20 | The following return codes are #defined in "ivorbiscodec.h" 21 | may be returned by libvorbisidec. Descriptions of a code relevant to 22 | a specific function are found in the reference description of that 23 | function. 24 | 25 |

    26 | 27 |
    OV_FALSE
    28 |
    Not true, or no data available
    29 | 30 |
    OV_HOLE
    31 |
    Tremor encoutered missing or corrupt data in the bitstream. Recovery 32 | is normally automatic and this return code is for informational purposes only.
    33 | 34 |
    OV_EREAD
    35 |
    Read error while fetching compressed data for decode
    36 | 37 |
    OV_EFAULT
    38 |
    Internal inconsistency in decode state. Continuing is likely not possible.
    39 | 40 |
    OV_EIMPL
    41 |
    Feature not implemented
    42 | 43 |
    OV_EINVAL
    44 |
    Either an invalid argument, or incompletely initialized argument passed to libvorbisidec call
    45 | 46 |
    OV_ENOTVORBIS
    47 |
    The given file/data was not recognized as Ogg Vorbis data.
    48 | 49 |
    OV_EBADHEADER
    50 |
    The file/data is apparently an Ogg Vorbis stream, but contains a corrupted or undecipherable header.
    51 | 52 |
    OV_EVERSION
    53 |
    The bitstream format revision of the given stream is not supported.
    54 | 55 |
    OV_EBADLINK
    56 |
    The given link exists in the Vorbis data stream, but is not decipherable due to garbacge or corruption.
    57 | 58 |
    OV_ENOSEEK
    59 |
    The given stream is not seekable
    60 | 61 |
    62 | 63 |

    64 |
    65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/style.css: -------------------------------------------------------------------------------- 1 | BODY { font-family: Helvetica, sans-serif } 2 | TD { font-family: Helvetica, sans-serif } 3 | P { font-family: Helvetica, sans-serif } 4 | H1 { font-family: Helvetica, sans-serif } 5 | H2 { font-family: Helvetica, sans-serif } 6 | H4 { font-family: Helvetica, sans-serif } 7 | P.tiny { font-size: 8pt } 8 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/threads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - Thread Safety 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    Thread Safety

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

      26 | 27 |

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

      31 | 32 |

    • 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.

      34 |

    35 | 36 |

    37 |
    38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/vorbis_comment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - datatype - vorbis_comment 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    vorbis_comment

    17 | 18 |

    declared in "ivorbiscodec.h"

    19 | 20 |

    21 | The vorbis_comment structure defines an Ogg Vorbis comment. 22 |

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

    27 | 28 | 29 | 30 | 40 | 41 |
    31 |
    typedef struct vorbis_comment{
    32 |   /* unlimited user comment fields. */
    33 |   char **user_comments;
    34 |   int  *comment_lengths;
    35 |   int  comments;
    36 |   char *vendor;
    37 | 
    38 | } vorbis_comment;
    39 |
    42 | 43 |

    Parameters

    44 |
    45 |
    user_comments
    46 |
    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).
    47 |
    comment_lengths
    48 |
    An int array that stores the length of each comment string
    49 |
    comments
    50 |
    Int signifying number of user comments in user_comments field.
    51 |
    vendor
    52 |
    Information about the creator of the file. Stored in a standard C 0-terminated string.
    53 |
    54 | 55 | 56 |

    57 |
    58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /Quake/Tremor/doc/vorbis_info.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tremor - datatype - vorbis_info 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Tremor documentation

    Tremor version 1.0 - 20020403

    15 | 16 |

    vorbis_info

    17 | 18 |

    declared in "ivorbiscodec.h"

    19 | 20 |

    21 | The vorbis_info structure contains basic information about the audio in a vorbis bitstream. 22 |

    23 | 24 | 25 | 26 | 41 | 42 |
    27 |
    typedef struct vorbis_info{
    28 |   int version;
    29 |   int channels;
    30 |   long rate;
    31 |   
    32 |   long bitrate_upper;
    33 |   long bitrate_nominal;
    34 |   long bitrate_lower;
    35 |   long bitrate_window;
    36 | 
    37 |   void *codec_setup;
    38 | 
    39 | } vorbis_info;
    40 |
    43 | 44 |

    Relevant Struct Members

    45 |
    46 |
    version
    47 |
    Vorbis encoder version used to create this bitstream.
    48 |
    channels
    49 |
    Int signifying number of channels in bitstream.
    50 |
    rate
    51 |
    Sampling rate of the bitstream.
    52 |
    bitrate_upper
    53 |
    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.
    54 |
    bitrate_nominal
    55 |
    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.
    56 |
    bitrate_lower
    57 |
    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.
    58 |
    bitrate_window
    59 |
    Currently unset.
    60 | 61 |
    codec_setup
    62 |
    Internal structure that contains the detailed/unpacked configuration for decoding the current Vorbis bitstream.
    63 |
    64 | 65 | 66 |

    67 |
    68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 |

    copyright © 2002 Xiph.org

    Ogg Vorbis

    Tremor documentation

    Tremor version 1.0 - 20020403

    77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Quake/Tremor/mdct.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 4 | * * 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 8 | * * 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: modified discrete cosine transform prototypes 15 | 16 | ********************************************************************/ 17 | 18 | #ifndef _OGG_mdct_H_ 19 | #define _OGG_mdct_H_ 20 | 21 | #include "ivorbiscodec.h" 22 | #include "misc.h" 23 | 24 | #define DATA_TYPE ogg_int32_t 25 | #define REG_TYPE register ogg_int32_t 26 | 27 | #ifdef _LOW_ACCURACY_ 28 | #define cPI3_8 (0x0062) 29 | #define cPI2_8 (0x00b5) 30 | #define cPI1_8 (0x00ed) 31 | #else 32 | #define cPI3_8 (0x30fbc54d) 33 | #define cPI2_8 (0x5a82799a) 34 | #define cPI1_8 (0x7641af3d) 35 | #endif 36 | 37 | extern void mdct_forward(int n, DATA_TYPE *in, DATA_TYPE *out); 38 | extern void mdct_backward(int n, DATA_TYPE *in, DATA_TYPE *out); 39 | 40 | #endif 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Quake/Tremor/os.h: -------------------------------------------------------------------------------- 1 | #ifndef _OS_H 2 | #define _OS_H 3 | /******************************************************************** 4 | * * 5 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 6 | * * 7 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 8 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 9 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 10 | * * 11 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 12 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 13 | * * 14 | ******************************************************************** 15 | 16 | function: #ifdef jail to whip a few platforms into the UNIX ideal. 17 | 18 | ********************************************************************/ 19 | 20 | #include 21 | #include "os_types.h" 22 | 23 | #ifndef _V_IFDEFJAIL_H_ 24 | # define _V_IFDEFJAIL_H_ 25 | 26 | # ifdef __GNUC__ 27 | # define STIN static __inline__ 28 | # elif _WIN32 29 | # define STIN static __inline 30 | # endif 31 | #else 32 | # define STIN static 33 | #endif 34 | 35 | #ifndef M_PI 36 | # define M_PI (3.1415926536f) 37 | #endif 38 | 39 | #ifdef _WIN32 40 | # include 41 | # define rint(x) (floor((x)+0.5f)) 42 | # define NO_FLOAT_MATH_LIB 43 | # define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b)) 44 | # define LITTLE_ENDIAN 1 45 | # define BYTE_ORDER LITTLE_ENDIAN 46 | #endif 47 | 48 | #ifdef HAVE_ALLOCA_H 49 | # include 50 | #endif 51 | 52 | #ifdef USE_MEMORY_H 53 | # include 54 | #endif 55 | 56 | #ifndef min 57 | # define min(x,y) ((x)>(y)?(y):(x)) 58 | #endif 59 | 60 | #ifndef max 61 | # define max(x,y) ((x)<(y)?(y):(x)) 62 | #endif 63 | 64 | #endif /* _OS_H */ 65 | -------------------------------------------------------------------------------- /Quake/Tremor/os_types.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 4 | * * 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 8 | * * 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: #ifdef jail to whip a few platforms into the UNIX ideal. 15 | 16 | ********************************************************************/ 17 | #ifndef _OS_TYPES_H 18 | #define _OS_TYPES_H 19 | 20 | #ifdef _LOW_ACCURACY_ 21 | # define X(n) (((((n)>>22)+1)>>1) - ((((n)>>22)+1)>>9)) 22 | # define LOOKUP_T const unsigned char 23 | #else 24 | # define X(n) (n) 25 | # define LOOKUP_T const ogg_int32_t 26 | #endif 27 | 28 | /* make it easy on the folks that want to compile the libs with a 29 | different malloc than stdlib */ 30 | #define _ogg_malloc malloc 31 | #define _ogg_calloc calloc 32 | #define _ogg_realloc realloc 33 | #define _ogg_free free 34 | 35 | #ifdef _WIN32 36 | 37 | # ifndef __GNUC__ 38 | /* MSVC/Borland */ 39 | typedef __int64 ogg_int64_t; 40 | typedef __int32 ogg_int32_t; 41 | typedef unsigned __int32 ogg_uint32_t; 42 | typedef __int16 ogg_int16_t; 43 | # else 44 | /* Cygwin */ 45 | #include <_G_config.h> 46 | typedef _G_int64_t ogg_int64_t; 47 | typedef _G_int32_t ogg_int32_t; 48 | typedef _G_uint32_t ogg_uint32_t; 49 | typedef _G_int16_t ogg_int16_t; 50 | # endif 51 | 52 | #elif defined(__MACOS__) 53 | 54 | # include 55 | typedef SInt16 ogg_int16_t; 56 | typedef SInt32 ogg_int32_t; 57 | typedef UInt32 ogg_uint32_t; 58 | typedef SInt64 ogg_int64_t; 59 | 60 | #elif (defined(__APPLE__) && defined(__MACH__)) /* MacOS X Framework build */ 61 | 62 | # include 63 | typedef int16_t ogg_int16_t; 64 | typedef int32_t ogg_int32_t; 65 | typedef u_int32_t ogg_uint32_t; 66 | typedef int64_t ogg_int64_t; 67 | 68 | #elif defined(__BEOS__) 69 | 70 | /* Be */ 71 | # include 72 | 73 | #elif defined (__EMX__) 74 | 75 | /* OS/2 GCC */ 76 | typedef short ogg_int16_t; 77 | typedef int ogg_int32_t; 78 | typedef unsigned int ogg_uint32_t; 79 | typedef long long ogg_int64_t; 80 | 81 | #else 82 | 83 | # include 84 | # include "config_types.h" 85 | 86 | #endif 87 | 88 | #endif /* _OS_TYPES_H */ 89 | -------------------------------------------------------------------------------- /Quake/Tremor/registry.c: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 4 | * * 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 8 | * * 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: registry for floor, res backends and channel mappings 15 | 16 | ********************************************************************/ 17 | 18 | #include "ivorbiscodec.h" 19 | #include "codec_internal.h" 20 | #include "registry.h" 21 | #include "misc.h" 22 | 23 | 24 | /* seems like major overkill now; the backend numbers will grow into 25 | the infrastructure soon enough */ 26 | 27 | extern vorbis_func_floor floor0_exportbundle; 28 | extern vorbis_func_floor floor1_exportbundle; 29 | extern vorbis_func_residue residue0_exportbundle; 30 | extern vorbis_func_residue residue1_exportbundle; 31 | extern vorbis_func_residue residue2_exportbundle; 32 | extern vorbis_func_mapping mapping0_exportbundle; 33 | 34 | vorbis_func_floor *_floor_P[]={ 35 | &floor0_exportbundle, 36 | &floor1_exportbundle, 37 | }; 38 | 39 | vorbis_func_residue *_residue_P[]={ 40 | &residue0_exportbundle, 41 | &residue1_exportbundle, 42 | &residue2_exportbundle, 43 | }; 44 | 45 | vorbis_func_mapping *_mapping_P[]={ 46 | &mapping0_exportbundle, 47 | }; 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Quake/Tremor/registry.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 4 | * * 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 8 | * * 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: registry for time, floor, res backends and channel mappings 15 | 16 | ********************************************************************/ 17 | 18 | #ifndef _V_REG_H_ 19 | #define _V_REG_H_ 20 | 21 | #define VI_TRANSFORMB 1 22 | #define VI_WINDOWB 1 23 | #define VI_TIMEB 1 24 | #define VI_FLOORB 2 25 | #define VI_RESB 3 26 | #define VI_MAPB 1 27 | 28 | #include "backends.h" 29 | 30 | #if defined(_WIN32) && defined(VORBISDLL_IMPORT) 31 | # define EXTERN __declspec(dllimport) extern 32 | #else 33 | # define EXTERN extern 34 | #endif 35 | 36 | EXTERN vorbis_func_floor *_floor_P[]; 37 | EXTERN vorbis_func_residue *_residue_P[]; 38 | EXTERN vorbis_func_mapping *_mapping_P[]; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /Quake/Tremor/window.c: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 4 | * * 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 8 | * * 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: window functions 15 | 16 | ********************************************************************/ 17 | 18 | #include 19 | #include 20 | #include "misc.h" 21 | #include "window.h" 22 | #include "window_lookup.h" 23 | 24 | const void *_vorbis_window(int type, int left){ 25 | 26 | switch(type){ 27 | case 0: 28 | 29 | switch(left){ 30 | case 32: 31 | return vwin64; 32 | case 64: 33 | return vwin128; 34 | case 128: 35 | return vwin256; 36 | case 256: 37 | return vwin512; 38 | case 512: 39 | return vwin1024; 40 | case 1024: 41 | return vwin2048; 42 | case 2048: 43 | return vwin4096; 44 | case 4096: 45 | return vwin8192; 46 | default: 47 | return(0); 48 | } 49 | break; 50 | default: 51 | return(0); 52 | } 53 | } 54 | 55 | void _vorbis_apply_window(ogg_int32_t *d,const void *window_p[2], 56 | long *blocksizes, 57 | int lW,int W,int nW){ 58 | 59 | LOOKUP_T *window[2]={window_p[0],window_p[1]}; 60 | long n=blocksizes[W]; 61 | long ln=blocksizes[lW]; 62 | long rn=blocksizes[nW]; 63 | 64 | long leftbegin=n/4-ln/4; 65 | long leftend=leftbegin+ln/2; 66 | 67 | long rightbegin=n/2+n/4-rn/4; 68 | long rightend=rightbegin+rn/2; 69 | 70 | int i,p; 71 | 72 | for(i=0;i 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 | * 17 | * See the GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License along 20 | * with this program; if not, write to the Free Software Foundation, Inc., 21 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * 23 | */ 24 | 25 | #ifndef _BGMUSIC_H_ 26 | #define _BGMUSIC_H_ 27 | 28 | extern qboolean bgmloop; 29 | extern cvar_t bgm_extmusic; 30 | 31 | qboolean BGM_Init (void); 32 | void BGM_Shutdown (void); 33 | 34 | void BGM_Play (const char *filename); 35 | void BGM_Stop (void); 36 | void BGM_Update (void); 37 | void BGM_Pause (void); 38 | void BGM_Resume (void); 39 | 40 | void BGM_PlayCDtrack (byte track, qboolean looping); 41 | 42 | #endif /* _BGMUSIC_H_ */ 43 | 44 | -------------------------------------------------------------------------------- /Quake/cd_null.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | #include "quakedef.h" 21 | 22 | int CDAudio_Play(byte track, qboolean looping) 23 | { 24 | return 0; 25 | } 26 | 27 | 28 | void CDAudio_Stop(void) 29 | { 30 | } 31 | 32 | 33 | void CDAudio_Pause(void) 34 | { 35 | } 36 | 37 | 38 | void CDAudio_Resume(void) 39 | { 40 | } 41 | 42 | 43 | void CDAudio_Update(void) 44 | { 45 | } 46 | 47 | 48 | int CDAudio_Init(void) 49 | { 50 | return 0; 51 | } 52 | 53 | 54 | void CDAudio_Shutdown(void) 55 | { 56 | } 57 | -------------------------------------------------------------------------------- /Quake/cdaudio.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | int CDAudio_Init(void); 22 | int CDAudio_Play(byte track, qboolean looping); 23 | void CDAudio_Stop(void); 24 | void CDAudio_Pause(void); 25 | void CDAudio_Resume(void); 26 | void CDAudio_Shutdown(void); 27 | void CDAudio_Update(void); 28 | -------------------------------------------------------------------------------- /Quake/chase.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // chase.c -- chase camera code 21 | 22 | #include "quakedef.h" 23 | 24 | cvar_t chase_back = {"chase_back", "100"}; 25 | cvar_t chase_up = {"chase_up", "16"}; 26 | cvar_t chase_right = {"chase_right", "0"}; 27 | cvar_t chase_active = {"chase_active", "0"}; 28 | 29 | vec3_t chase_pos; 30 | vec3_t chase_angles; 31 | 32 | vec3_t chase_dest; 33 | vec3_t chase_dest_angles; 34 | 35 | 36 | void Chase_Init (void) 37 | { 38 | Cvar_RegisterVariable (&chase_back); 39 | Cvar_RegisterVariable (&chase_up); 40 | Cvar_RegisterVariable (&chase_right); 41 | Cvar_RegisterVariable (&chase_active); 42 | } 43 | 44 | void Chase_Reset (void) 45 | { 46 | // for respawning and teleporting 47 | // start position 12 units behind head 48 | } 49 | 50 | void TraceLine (vec3_t start, vec3_t end, vec3_t impact) 51 | { 52 | trace_t trace; 53 | 54 | memset (&trace, 0, sizeof(trace)); 55 | SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1, start, end, &trace); 56 | 57 | VectorCopy (trace.endpos, impact); 58 | } 59 | 60 | void Chase_Update (void) 61 | { 62 | int i; 63 | float dist; 64 | vec3_t forward, up, right; 65 | vec3_t dest, stop; 66 | 67 | 68 | // if can't see player, reset 69 | AngleVectors (cl.viewangles, forward, right, up); 70 | 71 | // calc exact destination 72 | for (i=0 ; i<3 ; i++) 73 | chase_dest[i] = r_refdef.vieworg[i] 74 | - forward[i]*chase_back.value 75 | - right[i]*chase_right.value; 76 | chase_dest[2] = r_refdef.vieworg[2] + chase_up.value; 77 | 78 | // find the spot the player is looking at 79 | VectorMA (r_refdef.vieworg, 4096, forward, dest); 80 | TraceLine (r_refdef.vieworg, dest, stop); 81 | 82 | // calculate pitch to look at the same spot from camera 83 | VectorSubtract (stop, r_refdef.vieworg, stop); 84 | dist = DotProduct (stop, forward); 85 | if (dist < 1) 86 | dist = 1; 87 | r_refdef.viewangles[PITCH] = -atan(stop[2] / dist) / M_PI * 180; 88 | 89 | // move towards destination 90 | VectorCopy (chase_dest, r_refdef.vieworg); 91 | } 92 | 93 | -------------------------------------------------------------------------------- /Quake/console.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | // 22 | // console 23 | // 24 | extern int con_totallines; 25 | extern int con_backscroll; 26 | extern qboolean con_forcedup; // because no entities to refresh 27 | extern qboolean con_initialized; 28 | extern byte *con_chars; 29 | extern int con_notifylines; // scan lines to clear for notify lines 30 | 31 | void Con_DrawCharacter (int cx, int line, int num); 32 | 33 | void Con_CheckResize (void); 34 | void Con_Init (void); 35 | void Con_DrawConsole (int lines, qboolean drawinput); 36 | void Con_Print (char *txt); 37 | void Con_Printf (char *fmt, ...); 38 | void Con_DPrintf (char *fmt, ...); 39 | void Con_DPrintf2 (const char *fmt, ...) FUNC_PRINTF(1,2); //johnfitz 40 | void Con_SafePrintf (char *fmt, ...); 41 | void Con_Clear_f (void); 42 | void Con_DrawNotify (void); 43 | void Con_ClearNotify (void); 44 | void Con_ToggleConsole_f (void); 45 | 46 | void Con_NotifyBox (char *text); // during startup for sound / cd warnings 47 | 48 | -------------------------------------------------------------------------------- /Quake/crc.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /* crc.h */ 21 | 22 | void CRC_Init(unsigned short *crcvalue); 23 | void CRC_ProcessByte(unsigned short *crcvalue, byte data); 24 | unsigned short CRC_Value(unsigned short crcvalue); 25 | -------------------------------------------------------------------------------- /Quake/d_modech.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // d_modech.c: called when mode has just changed 21 | 22 | #include "quakedef.h" 23 | #include "d_local.h" 24 | 25 | int d_vrectx, d_vrecty, d_vrectright_particle, d_vrectbottom_particle; 26 | 27 | int d_y_aspect_shift, d_pix_min, d_pix_max, d_pix_shift; 28 | 29 | int d_scantable[MAXHEIGHT]; 30 | short *zspantable[MAXHEIGHT]; 31 | 32 | /* 33 | ================ 34 | D_Patch 35 | ================ 36 | */ 37 | void D_Patch (void) 38 | { 39 | #if id386 40 | 41 | static qboolean protectset8 = false; 42 | 43 | if (!protectset8) 44 | { 45 | Sys_MakeCodeWriteable ((int)D_PolysetAff8Start, 46 | (int)D_PolysetAff8End - (int)D_PolysetAff8Start); 47 | protectset8 = true; 48 | } 49 | 50 | #endif // id386 51 | } 52 | 53 | 54 | /* 55 | ================ 56 | D_ViewChanged 57 | ================ 58 | */ 59 | void D_ViewChanged (void) 60 | { 61 | int rowbytes; 62 | 63 | if (r_dowarp) 64 | rowbytes = WARP_WIDTH; 65 | else 66 | rowbytes = vid.rowbytes; 67 | 68 | scale_for_mip = xscale; 69 | if (yscale > xscale) 70 | scale_for_mip = yscale; 71 | 72 | d_zrowbytes = vid.width * 2; 73 | d_zwidth = vid.width; 74 | 75 | d_pix_min = r_refdef.vrect.width / 320; 76 | if (d_pix_min < 1) 77 | d_pix_min = 1; 78 | 79 | d_pix_max = (int)((float)r_refdef.vrect.width / (320.0 / 4.0) + 0.5); 80 | d_pix_shift = 8 - (int)((float)r_refdef.vrect.width / 320.0 + 0.5); 81 | if (d_pix_max < 1) 82 | d_pix_max = 1; 83 | 84 | if (pixelAspect > 1.4) 85 | d_y_aspect_shift = 1; 86 | else 87 | d_y_aspect_shift = 0; 88 | 89 | d_vrectx = r_refdef.vrect.x; 90 | d_vrecty = r_refdef.vrect.y; 91 | d_vrectright_particle = r_refdef.vrectright - d_pix_max; 92 | d_vrectbottom_particle = 93 | r_refdef.vrectbottom - (d_pix_max << d_y_aspect_shift); 94 | 95 | { 96 | int i; 97 | 98 | for (i=0 ; i 7 | * Copyright (C) 2010-2012 O.Sezer 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or (at 12 | * your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, but 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * 18 | * See the GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License along 21 | * with this program; if not, write to the Free Software Foundation, Inc., 22 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 23 | * 24 | */ 25 | 26 | #ifndef _SND_CODECI_H_ 27 | #define _SND_CODECI_H_ 28 | 29 | /* Codec internals */ 30 | typedef qboolean (*CODEC_INIT)(void); 31 | typedef void (*CODEC_SHUTDOWN)(void); 32 | typedef qboolean (*CODEC_OPEN)(snd_stream_t *stream); 33 | typedef int (*CODEC_READ)(snd_stream_t *stream, int bytes, void *buffer); 34 | typedef int (*CODEC_REWIND)(snd_stream_t *stream); 35 | typedef void (*CODEC_CLOSE)(snd_stream_t *stream); 36 | 37 | struct snd_codec_s 38 | { 39 | unsigned int type; /* handled data type. (1U << n) */ 40 | qboolean initialized; /* init succeedded */ 41 | const char *ext; /* expected extension */ 42 | CODEC_INIT initialize; 43 | CODEC_SHUTDOWN shutdown; 44 | CODEC_OPEN codec_open; 45 | CODEC_READ codec_read; 46 | CODEC_REWIND codec_rewind; 47 | CODEC_CLOSE codec_close; 48 | snd_codec_t *next; 49 | }; 50 | 51 | qboolean S_CodecForwardStream (snd_stream_t *stream, unsigned int type); 52 | /* Forward a stream to another codec of 'type' type. */ 53 | 54 | #endif /* _SND_CODECI_H_ */ 55 | 56 | -------------------------------------------------------------------------------- /Quake/snd_flac.h: -------------------------------------------------------------------------------- 1 | /* fLaC streaming music support. */ 2 | 3 | #if !defined(_SND_FLAC_H_) 4 | #define _SND_FLAC_H_ 1 5 | 6 | #if defined(USE_CODEC_FLAC) 7 | 8 | extern snd_codec_t flac_codec; 9 | 10 | #endif /* USE_CODEC_FLAC */ 11 | 12 | #endif /* ! _SND_FLAC_H_ */ 13 | 14 | -------------------------------------------------------------------------------- /Quake/snd_mikmod.h: -------------------------------------------------------------------------------- 1 | /* module tracker decoding support using libmikmod */ 2 | 3 | #if !defined(_SND_MIKMOD_H_) 4 | #define _SND_MIKMOD_H_ 5 | 6 | #if defined(USE_CODEC_MIKMOD) 7 | 8 | extern snd_codec_t mikmod_codec; 9 | 10 | #endif /* USE_CODEC_MIKMOD */ 11 | 12 | #endif /* ! _SND_MIKMOD_H_ */ 13 | 14 | -------------------------------------------------------------------------------- /Quake/snd_mp3.h: -------------------------------------------------------------------------------- 1 | /* MP3 decoding support using libmad or libmpg123. */ 2 | 3 | #if !defined(_SND_MP3_H_) 4 | #define _SND_MP3_H_ 5 | 6 | #if defined(USE_CODEC_MP3) 7 | 8 | extern snd_codec_t mp3_codec; 9 | 10 | #endif /* USE_CODEC_MP3 */ 11 | 12 | #endif /* ! _SND_MP3_H_ */ 13 | 14 | -------------------------------------------------------------------------------- /Quake/snd_opus.h: -------------------------------------------------------------------------------- 1 | /* Ogg/Opus streaming music support. */ 2 | 3 | #if !defined(_SND_OPUS_H_) 4 | #define _SND_OPUS_H_ 1 5 | 6 | #if defined(USE_CODEC_OPUS) 7 | 8 | extern snd_codec_t opus_codec; 9 | 10 | #endif /* USE_CODEC_OPUS */ 11 | 12 | #endif /* ! _SND_OPUS_H_ */ 13 | 14 | -------------------------------------------------------------------------------- /Quake/snd_umx.h: -------------------------------------------------------------------------------- 1 | /* Unreal UMX format support */ 2 | #if !defined(_SND_UMX_H_) 3 | #define _SND_UMX_H_ 4 | 5 | #if defined(USE_CODEC_UMX) 6 | 7 | extern snd_codec_t umx_codec; 8 | 9 | #endif /* USE_CODEC_UMX */ 10 | 11 | #endif /* ! _SND_UMX_H_ */ 12 | 13 | -------------------------------------------------------------------------------- /Quake/snd_vorbis.h: -------------------------------------------------------------------------------- 1 | /* Ogg/Vorbis streaming music support. */ 2 | 3 | #if !defined(_SND_VORBIS_H_) 4 | #define _SND_VORBIS_H_ 1 5 | 6 | #if defined(USE_CODEC_VORBIS) 7 | 8 | extern snd_codec_t vorbis_codec; 9 | 10 | #endif /* USE_CODEC_VORBIS */ 11 | 12 | #endif /* ! _SND_VORBIS_H_ */ 13 | 14 | -------------------------------------------------------------------------------- /Quake/snd_wave.h: -------------------------------------------------------------------------------- 1 | /* WAV streaming music support. */ 2 | 3 | #if !defined(_SND_WAVE_H_) 4 | #define _SND_WAVE_H_ 5 | 6 | #if defined(USE_CODEC_WAVE) 7 | 8 | extern snd_codec_t wav_codec; 9 | 10 | #endif /* USE_CODEC_WAVE */ 11 | 12 | #endif /* ! _SND_WAVE_H_ */ 13 | 14 | -------------------------------------------------------------------------------- /Quake/snd_xmp.h: -------------------------------------------------------------------------------- 1 | /* module tracker decoding support using libxmp */ 2 | #if !defined(_SND_XMP_H_) 3 | #define _SND_XMP_H_ 4 | 5 | #if defined(USE_CODEC_XMP) 6 | 7 | extern snd_codec_t xmp_codec; 8 | 9 | #endif /* USE_CODEC_XMP */ 10 | 11 | #endif /* ! _SND_XMP_H_ */ 12 | 13 | -------------------------------------------------------------------------------- /Quake/strl_fn.h: -------------------------------------------------------------------------------- 1 | /* header file for BSD strlcat and strlcpy */ 2 | 3 | #ifndef __STRLFUNCS_H 4 | #define __STRLFUNCS_H 5 | 6 | /* use our own copies of strlcpy and strlcat taken from OpenBSD */ 7 | extern size_t q_strlcpy (char *dst, const char *src, size_t size); 8 | extern size_t q_strlcat (char *dst, const char *src, size_t size); 9 | 10 | #endif /* __STRLFUNCS_H */ 11 | 12 | -------------------------------------------------------------------------------- /Quake/strlcpy.c: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $ */ 2 | 3 | /* 4 | * Copyright (c) 1998 Todd C. Miller 5 | * 6 | * Permission to use, copy, modify, and distribute this software for any 7 | * purpose with or without fee is hereby granted, provided that the above 8 | * copyright notice and this permission notice appear in all copies. 9 | * 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 | */ 18 | 19 | #include 20 | #include 21 | 22 | #include "strl_fn.h" 23 | 24 | /* 25 | * Copy src to string dst of size siz. At most siz-1 characters 26 | * will be copied. Always NUL terminates (unless siz == 0). 27 | * Returns strlen(src); if retval >= siz, truncation occurred. 28 | */ 29 | 30 | size_t 31 | q_strlcpy (char *dst, const char *src, size_t siz) 32 | { 33 | char *d = dst; 34 | const char *s = src; 35 | size_t n = siz; 36 | 37 | /* Copy as many bytes as will fit */ 38 | if (n != 0) { 39 | while (--n != 0) { 40 | if ((*d++ = *s++) == '\0') 41 | break; 42 | } 43 | } 44 | 45 | /* Not enough room in dst, add NUL and traverse rest of src */ 46 | if (n == 0) { 47 | if (siz != 0) 48 | *d = '\0'; /* NUL-terminate dst */ 49 | while (*s++) 50 | ; 51 | } 52 | 53 | return(s - src - 1); /* count does not include NUL */ 54 | } 55 | 56 | -------------------------------------------------------------------------------- /Quake/sys.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // sys.h -- non-portable functions 21 | 22 | // 23 | // file IO 24 | // 25 | 26 | // returns the file size 27 | // return -1 if file is not present 28 | // the file should be in BINARY mode for stupid OSs that care 29 | int Sys_FileOpenRead (char *path, int *hndl); 30 | 31 | int Sys_FileOpenWrite (char *path); 32 | void Sys_FileClose (int handle); 33 | void Sys_FileSeek (int handle, int position); 34 | int Sys_FileRead (int handle, void *dest, int count); 35 | int Sys_FileWrite (int handle, void *data, int count); 36 | int Sys_FileTime (char *path); 37 | void Sys_mkdir (char *path); 38 | 39 | char* Sys_LoadTextFromFile(const char* directory, const char* filename); 40 | 41 | // 42 | // memory protection 43 | // 44 | void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length); 45 | 46 | // 47 | // system IO 48 | // 49 | void Sys_DebugLog(char *file, char *fmt, ...); 50 | 51 | void Sys_Error (char *error, ...); 52 | // an error will cause the entire program to exit 53 | 54 | void Sys_Printf (char *fmt, ...); 55 | // send text to the console 56 | 57 | void Sys_Quit (void); 58 | 59 | double Sys_FloatTime (void); 60 | 61 | char *Sys_ConsoleInput (void); 62 | 63 | void Sys_Sleep (void); 64 | // called to yield for a little bit so as 65 | // not to hog cpu when paused or debugging 66 | 67 | void Sys_SendKeyEvents (void); 68 | // Perform Key_Event () callbacks until the input que is empty 69 | 70 | void Sys_LowFPPrecision (void); 71 | void Sys_HighFPPrecision (void); 72 | void Sys_SetFPCW (void); 73 | 74 | -------------------------------------------------------------------------------- /Quake/view.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // view.h 21 | 22 | extern cvar_t v_gamma; 23 | 24 | extern byte gammatable[256]; // palette is sent through this 25 | extern byte ramps[3][256]; 26 | extern float v_blend[4]; 27 | 28 | extern cvar_t lcd_x; 29 | 30 | 31 | void V_Init (void); 32 | void V_RenderView (void); 33 | float V_CalcRoll (vec3_t angles, vec3_t velocity); 34 | void V_UpdatePalette (void); 35 | 36 | -------------------------------------------------------------------------------- /Quake/wad.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // wad.h 21 | 22 | //=============== 23 | // TYPES 24 | //=============== 25 | 26 | #define CMP_NONE 0 27 | #define CMP_LZSS 1 28 | 29 | #define TYP_NONE 0 30 | #define TYP_LABEL 1 31 | 32 | #define TYP_LUMPY 64 // 64 + grab command number 33 | #define TYP_PALETTE 64 34 | #define TYP_QTEX 65 35 | #define TYP_QPIC 66 36 | #define TYP_SOUND 67 37 | #define TYP_MIPTEX 68 38 | 39 | typedef struct 40 | { 41 | int width, height; 42 | byte data[4]; // variably sized 43 | } qpic_t; 44 | 45 | 46 | 47 | typedef struct 48 | { 49 | char identification[4]; // should be WAD2 or 2DAW 50 | int numlumps; 51 | int infotableofs; 52 | } wadinfo_t; 53 | 54 | typedef struct 55 | { 56 | int filepos; 57 | int disksize; 58 | int size; // uncompressed 59 | char type; 60 | char compression; 61 | char pad1, pad2; 62 | char name[16]; // must be null terminated 63 | } lumpinfo_t; 64 | 65 | extern int wad_numlumps; 66 | extern lumpinfo_t *wad_lumps; 67 | extern byte *wad_base; 68 | 69 | void W_LoadWadFile (char *filename); 70 | void W_CleanupName (char *in, char *out); 71 | lumpinfo_t *W_GetLumpinfo (char *name); 72 | void *W_GetLumpName (char *name); 73 | void *W_GetLumpNum (int num); 74 | 75 | void SwapPic (qpic_t *pic); 76 | -------------------------------------------------------------------------------- /Quake/world.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // world.h 21 | 22 | typedef struct 23 | { 24 | vec3_t normal; 25 | float dist; 26 | } plane_t; 27 | 28 | typedef struct 29 | { 30 | qboolean allsolid; // if true, plane is not valid 31 | qboolean startsolid; // if true, the initial point was in a solid area 32 | qboolean inopen, inwater; 33 | float fraction; // time completed, 1.0 = didn't hit anything 34 | vec3_t endpos; // final position 35 | plane_t plane; // surface normal at impact 36 | edict_t *ent; // entity the surface is on 37 | } trace_t; 38 | 39 | 40 | #define MOVE_NORMAL 0 41 | #define MOVE_NOMONSTERS 1 42 | #define MOVE_MISSILE 2 43 | 44 | 45 | void SV_ClearWorld (void); 46 | // called after the world model has been loaded, before linking any entities 47 | 48 | void SV_UnlinkEdict (edict_t *ent); 49 | // call before removing an entity, and before trying to move one, 50 | // so it doesn't clip against itself 51 | // flags ent->v.modified 52 | 53 | void SV_LinkEdict (edict_t *ent, qboolean touch_triggers); 54 | // Needs to be called any time an entity changes origin, mins, maxs, or solid 55 | // flags ent->v.modified 56 | // sets ent->v.absmin and ent->v.absmax 57 | // if touchtriggers, calls prog functions for the intersected triggers 58 | 59 | int SV_PointContents (vec3_t p); 60 | int SV_TruePointContents (vec3_t p); 61 | // returns the CONTENTS_* value from the world at the given point. 62 | // does not check any entities at all 63 | // the non-true version remaps the water current contents to content_water 64 | 65 | edict_t *SV_TestEntityPosition (edict_t *ent); 66 | 67 | trace_t SV_Move (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int type, edict_t *passedict); 68 | // mins and maxs are reletive 69 | 70 | // if the entire move stays in a solid volume, trace.allsolid will be set 71 | 72 | // if the starting point is in a solid, it will be allowed to move out 73 | // to an open area 74 | 75 | // nomonsters is used for line of sight or edge testing, where mosnters 76 | // shouldn't be considered solid objects 77 | 78 | // passedict is explicitly excluded from clipping checks (normally NULL) 79 | -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv" 5 | } 6 | ], 7 | "info" : { 8 | "version" : 1, 9 | "author" : "xcode" 10 | } 11 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "layers" : [ 3 | { 4 | "filename" : "Front.imagestacklayer" 5 | }, 6 | { 7 | "filename" : "Middle.imagestacklayer" 8 | }, 9 | { 10 | "filename" : "Back.imagestacklayer" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv" 5 | } 6 | ], 7 | "info" : { 8 | "version" : 1, 9 | "author" : "xcode" 10 | } 11 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv" 5 | } 6 | ], 7 | "info" : { 8 | "version" : 1, 9 | "author" : "xcode" 10 | } 11 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "filename" : "quake_tv_back.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "tv", 10 | "scale" : "2x" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/quake_tv_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/quake_tv_back.png -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "layers" : [ 3 | { 4 | "filename" : "Front.imagestacklayer" 5 | }, 6 | { 7 | "filename" : "Middle.imagestacklayer" 8 | }, 9 | { 10 | "filename" : "Back.imagestacklayer" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "filename" : "quake_tv_front.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "tv", 10 | "scale" : "2x" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/quake_tv_front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/quake_tv_front.png -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "filename" : "quake_tv_middle.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "tv", 10 | "scale" : "2x" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/quake_tv_middle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/quake_tv_middle.png -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets" : [ 3 | { 4 | "size" : "1280x768", 5 | "idiom" : "tv", 6 | "filename" : "App Icon - App Store.imagestack", 7 | "role" : "primary-app-icon" 8 | }, 9 | { 10 | "size" : "400x240", 11 | "idiom" : "tv", 12 | "filename" : "App Icon.imagestack", 13 | "role" : "primary-app-icon" 14 | }, 15 | { 16 | "size" : "2320x720", 17 | "idiom" : "tv", 18 | "filename" : "Top Shelf Image Wide.imageset", 19 | "role" : "top-shelf-image-wide" 20 | }, 21 | { 22 | "size" : "1920x720", 23 | "idiom" : "tv", 24 | "filename" : "Top Shelf Image.imageset", 25 | "role" : "top-shelf-image" 26 | } 27 | ], 28 | "info" : { 29 | "version" : 1, 30 | "author" : "xcode" 31 | } 32 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "tv-marketing", 13 | "scale" : "1x" 14 | }, 15 | { 16 | "idiom" : "tv-marketing", 17 | "scale" : "2x" 18 | } 19 | ], 20 | "info" : { 21 | "version" : 1, 22 | "author" : "xcode" 23 | } 24 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "filename" : "quake_banner.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "tv", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "tv-marketing", 14 | "scale" : "1x" 15 | }, 16 | { 17 | "idiom" : "tv-marketing", 18 | "scale" : "2x" 19 | } 20 | ], 21 | "info" : { 22 | "version" : 1, 23 | "author" : "xcode" 24 | } 25 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/quake_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/QuakeTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/quake_banner.png -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "landscape", 5 | "idiom" : "tv", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "11.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "landscape", 12 | "idiom" : "tv", 13 | "filename" : "quake_tv_launch.png", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "9.0", 16 | "scale" : "1x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/LaunchImage.launchimage/quake_tv_launch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/QuakeTV/Assets.xcassets/LaunchImage.launchimage/quake_tv_launch.png -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/quake-box.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "quake-box.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/quake-box.imageset/quake-box.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/QuakeTV/Assets.xcassets/quake-box.imageset/quake-box.jpg -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/quake-xp1-box.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "quake-xp1-box.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/quake-xp1-box.imageset/quake-xp1-box.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/QuakeTV/Assets.xcassets/quake-xp1-box.imageset/quake-xp1-box.jpg -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/quake-xp2-box.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "quake-xp2-box.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/quake-xp2-box.imageset/quake-xp2-box.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/QuakeTV/Assets.xcassets/quake-xp2-box.imageset/quake-xp2-box.jpg -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/quake_logo_background.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "quake_logo_background.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/quake_logo_background.imageset/quake_logo_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/QuakeTV/Assets.xcassets/quake_logo_background.imageset/quake_logo_background.png -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/quake_logo_background_2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "quake_logo_background_2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QuakeTV/Assets.xcassets/quake_logo_background_2.imageset/quake_logo_background_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/QuakeTV/Assets.xcassets/quake_logo_background_2.imageset/quake_logo_background_2.png -------------------------------------------------------------------------------- /QuakeTV/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Quake 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | arm64 30 | 31 | UIUserInterfaceStyle 32 | Automatic 33 | 34 | 35 | -------------------------------------------------------------------------------- /folders.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/folders.png -------------------------------------------------------------------------------- /icon_quake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/icon_quake.png -------------------------------------------------------------------------------- /ss_quake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkidd/Quake-iOS/104ee274c451ff6da5a50bd5c33a2b9a8704e683/ss_quake.png --------------------------------------------------------------------------------